minify-html/bench/inputs/ECMA-262

41604 lines
6.0 MiB
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><head><meta charset="utf-8">
<link rel="icon" href="img/favicon.ico">
<link href="ecmarkup.css" rel="stylesheet">
<script src="ecmarkup.js"></script>
<style>
/* custom styles */
#metadata-block {
margin: 4em 0;
padding: 10px;
border: 1px solid #ee8421;
}
#metadata-block h1 {
font-size: 1.5em;
margin-top: 0;
}
#metadata-block > ul {
list-style-type: none;
margin: 0; padding: 0;
}
#ecma-logo {
width: 500px;
}
.unicode-property-table {
table-layout: fixed;
width: 100%;
font-size: 80%;
}
.unicode-property-table ul {
padding-left: 0;
list-style: none;
}
</style>
<script>
if (location.hostname === 'tc39.github.io' && location.protocol !== 'https:') {
location.protocol = 'https:';
}
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-32577963-1']);
_gaq.push(['_trackPageview', '/view/ST-262 10th edition']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<title>ECMAScript® 2019 Language&nbsp;Specification</title><script type="application/json" id="menu-search-biblio">[{"type":"clause","id":"sec-intro","aoid":null,"title":"Introduction","titleHTML":"Introduction","number":"","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Introduction"},{"type":"clause","id":"sec-scope","aoid":null,"title":"Scope","titleHTML":"Scope","number":"1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Scope"},{"type":"clause","id":"sec-conformance","aoid":null,"title":"Conformance","titleHTML":"Conformance","number":"2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Conformance"},{"type":"clause","id":"sec-normative-references","aoid":null,"title":"Normative References","titleHTML":"Normative References","number":"3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Normative References"},{"type":"clause","id":"sec-web-scripting","aoid":null,"title":"Web Scripting","titleHTML":"Web Scripting","number":"4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Web Scripting"},{"type":"figure","id":"figure-1","number":1,"caption":"Figure 1: Object/Prototype Relationships","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Figure 1: Object/Prototype Relationships"},{"type":"clause","id":"sec-objects","aoid":null,"title":"Objects","titleHTML":"Objects","number":"4.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Objects"},{"type":"clause","id":"sec-strict-variant-of-ecmascript","aoid":null,"title":"The Strict Variant of ECMAScript","titleHTML":"The Strict Variant of ECMAScript","number":"4.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"The Strict Variant of ECMAScript"},{"type":"clause","id":"sec-ecmascript-overview","aoid":null,"title":"ECMAScript Overview","titleHTML":"ECMAScript Overview","number":"4.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"ECMAScript Overview"},{"type":"clause","id":"sec-type","aoid":null,"title":"type","titleHTML":"type","number":"4.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"type"},{"type":"clause","id":"sec-primitive-value","aoid":null,"title":"primitive value","titleHTML":"primitive value","number":"4.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"primitive value"},{"type":"clause","id":"sec-terms-and-definitions-object","aoid":null,"title":"object","titleHTML":"object","number":"4.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"object"},{"type":"clause","id":"sec-constructor","aoid":null,"title":"constructor","titleHTML":"constructor","number":"4.3.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"constructor"},{"type":"clause","id":"sec-terms-and-definitions-prototype","aoid":null,"title":"prototype","titleHTML":"prototype","number":"4.3.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"prototype"},{"type":"clause","id":"sec-ordinary-object","aoid":null,"title":"ordinary object","titleHTML":"ordinary object","number":"4.3.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"ordinary object"},{"type":"clause","id":"sec-exotic-object","aoid":null,"title":"exotic object","titleHTML":"exotic object","number":"4.3.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"exotic object"},{"type":"clause","id":"sec-standard-object","aoid":null,"title":"standard object","titleHTML":"standard object","number":"4.3.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"standard object"},{"type":"clause","id":"sec-built-in-object","aoid":null,"title":"built-in object","titleHTML":"built-in object","number":"4.3.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"built-in object"},{"type":"clause","id":"sec-undefined-value","aoid":null,"title":"undefined value","titleHTML":"undefined value","number":"4.3.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"undefined value"},{"type":"clause","id":"sec-terms-and-definitions-undefined-type","aoid":null,"title":"Undefined type","titleHTML":"Undefined type","number":"4.3.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Undefined type"},{"type":"clause","id":"sec-null-value","aoid":null,"title":"null value","titleHTML":"null value","number":"4.3.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"null value"},{"type":"clause","id":"sec-terms-and-definitions-null-type","aoid":null,"title":"Null type","titleHTML":"Null type","number":"4.3.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Null type"},{"type":"clause","id":"sec-terms-and-definitions-boolean-value","aoid":null,"title":"Boolean value","titleHTML":"Boolean value","number":"4.3.14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Boolean value"},{"type":"clause","id":"sec-terms-and-definitions-boolean-type","aoid":null,"title":"Boolean type","titleHTML":"Boolean type","number":"4.3.15","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Boolean type"},{"type":"clause","id":"sec-boolean-object","aoid":null,"title":"Boolean object","titleHTML":"Boolean object","number":"4.3.16","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Boolean object"},{"type":"clause","id":"sec-terms-and-definitions-string-value","aoid":null,"title":"String value","titleHTML":"String value","number":"4.3.17","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String value"},{"type":"clause","id":"sec-terms-and-definitions-string-type","aoid":null,"title":"String type","titleHTML":"String type","number":"4.3.18","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String type"},{"type":"clause","id":"sec-string-object","aoid":null,"title":"String object","titleHTML":"String object","number":"4.3.19","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String object"},{"type":"clause","id":"sec-terms-and-definitions-number-value","aoid":null,"title":"Number value","titleHTML":"Number value","number":"4.3.20","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Number value"},{"type":"clause","id":"sec-terms-and-definitions-number-type","aoid":null,"title":"Number type","titleHTML":"Number type","number":"4.3.21","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Number type"},{"type":"clause","id":"sec-number-object","aoid":null,"title":"Number object","titleHTML":"Number object","number":"4.3.22","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Number object"},{"type":"clause","id":"sec-terms-and-definitions-infinity","aoid":null,"title":"Infinity","titleHTML":"Infinity","number":"4.3.23","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Infinity"},{"type":"clause","id":"sec-terms-and-definitions-nan","aoid":null,"title":"NaN","titleHTML":"NaN","number":"4.3.24","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"NaN"},{"type":"clause","id":"sec-symbol-value","aoid":null,"title":"Symbol value","titleHTML":"Symbol value","number":"4.3.25","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Symbol value"},{"type":"clause","id":"sec-terms-and-definitions-symbol-type","aoid":null,"title":"Symbol type","titleHTML":"Symbol type","number":"4.3.26","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Symbol type"},{"type":"clause","id":"sec-symbol-object","aoid":null,"title":"Symbol object","titleHTML":"Symbol object","number":"4.3.27","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Symbol object"},{"type":"clause","id":"sec-terms-and-definitions-function","aoid":null,"title":"function","titleHTML":"function","number":"4.3.28","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"function"},{"type":"clause","id":"sec-built-in-function","aoid":null,"title":"built-in function","titleHTML":"built-in function","number":"4.3.29","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"built-in function"},{"type":"clause","id":"sec-property","aoid":null,"title":"property","titleHTML":"property","number":"4.3.30","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"property"},{"type":"clause","id":"sec-method","aoid":null,"title":"method","titleHTML":"method","number":"4.3.31","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"method"},{"type":"clause","id":"sec-built-in-method","aoid":null,"title":"built-in method","titleHTML":"built-in method","number":"4.3.32","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"built-in method"},{"type":"clause","id":"sec-attribute","aoid":null,"title":"attribute","titleHTML":"attribute","number":"4.3.33","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"attribute"},{"type":"clause","id":"sec-own-property","aoid":null,"title":"own property","titleHTML":"own property","number":"4.3.34","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"own property"},{"type":"clause","id":"sec-inherited-property","aoid":null,"title":"inherited property","titleHTML":"inherited property","number":"4.3.35","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"inherited property"},{"type":"clause","id":"sec-terms-and-definitions","aoid":null,"title":"Terms and Definitions","titleHTML":"Terms and Definitions","number":"4.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Terms and Definitions"},{"type":"clause","id":"sec-organization-of-this-specification","aoid":null,"title":"Organization of This Specification","titleHTML":"Organization of This Specification","number":"4.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Organization of This Specification"},{"type":"clause","id":"sec-overview","aoid":null,"title":"Overview","titleHTML":"Overview","number":"4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Overview"},{"type":"term","term":"chain production","refId":"sec-context-free-grammars","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"chain production"},{"type":"term","term":"goal symbol","refId":"sec-context-free-grammars","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"goal symbol"},{"type":"clause","id":"sec-context-free-grammars","aoid":null,"title":"Context-Free Grammars","titleHTML":"Context-Free Grammars","number":"5.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_885","_ref_886","_ref_887","_ref_889","_ref_3113","_ref_3114","_ref_3133","_ref_3137","_ref_3218","_ref_4271","_ref_4272","_ref_4294","_ref_4296","_ref_4394","_ref_4397","_ref_4552","_ref_4558","_ref_4577","_ref_4766","_ref_4805","_ref_5010","_ref_5011","_ref_6101","_ref_6102","_ref_6104","_ref_8632","_ref_8633","_ref_8636","_ref_8637"],"key":"Context-Free Grammars"},{"type":"clause","id":"sec-lexical-and-regexp-grammars","aoid":null,"title":"The Lexical and RegExp Grammars","titleHTML":"The Lexical and RegExp Grammars","number":"5.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_12"],"key":"The Lexical and RegExp Grammars"},{"type":"clause","id":"sec-numeric-string-grammar","aoid":null,"title":"The Numeric String Grammar","titleHTML":"The Numeric String Grammar","number":"5.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"The Numeric String Grammar"},{"type":"term","term":"Parse Node","refId":"sec-syntactic-grammar","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Parse Node"},{"type":"term","term":"the same Parse Node","refId":"sec-syntactic-grammar","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"the same Parse Node"},{"type":"term","term":"covering","refId":"sec-syntactic-grammar","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"covering"},{"type":"term","term":"covered","refId":"sec-syntactic-grammar","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"covered"},{"type":"clause","id":"sec-syntactic-grammar","aoid":null,"title":"The Syntactic Grammar","titleHTML":"The Syntactic Grammar","number":"5.1.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_931","_ref_2073","_ref_2076","_ref_2077","_ref_2415","_ref_2416","_ref_2491","_ref_2492","_ref_2496","_ref_2497","_ref_2502","_ref_2503","_ref_2508","_ref_2509","_ref_2514","_ref_2515","_ref_2591","_ref_2795","_ref_3158","_ref_3236","_ref_3238","_ref_3266","_ref_3271","_ref_3307","_ref_3521","_ref_3529","_ref_3538","_ref_3598","_ref_3612","_ref_3618","_ref_3660","_ref_3817","_ref_3818","_ref_3858","_ref_4062","_ref_4064","_ref_4334","_ref_4335","_ref_4364","_ref_4367","_ref_4368","_ref_4393","_ref_4431","_ref_4557","_ref_4853","_ref_5402"],"key":"The Syntactic Grammar"},{"type":"clause","id":"sec-grammar-notation","aoid":null,"title":"Grammar Notation","titleHTML":"Grammar Notation","number":"5.1.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Grammar Notation"},{"type":"clause","id":"sec-syntactic-and-lexical-grammars","aoid":null,"title":"Syntactic and Lexical Grammars","titleHTML":"Syntactic and Lexical Grammars","number":"5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Syntactic and Lexical Grammars"},{"type":"term","term":"Assert","refId":"sec-algorithm-conventions","referencingIds":["_ref_901","_ref_927","_ref_1244","_ref_1258","_ref_1266","_ref_1273","_ref_1276","_ref_1279","_ref_1282","_ref_1286","_ref_1290","_ref_1293","_ref_1303","_ref_1322","_ref_1330","_ref_1336","_ref_1339","_ref_1342","_ref_1354","_ref_1361","_ref_1383","_ref_1398","_ref_1401","_ref_1408","_ref_1411","_ref_1412","_ref_1413","_ref_1424","_ref_1431","_ref_1438","_ref_1440","_ref_1509","_ref_1529","_ref_1541","_ref_1543","_ref_1556","_ref_1558","_ref_1600","_ref_1602","_ref_1605","_ref_1608","_ref_1610","_ref_1612","_ref_1614","_ref_1616","_ref_1618","_ref_1620","_ref_1622","_ref_1624","_ref_1628","_ref_1630","_ref_1632","_ref_1634","_ref_1638","_ref_1642","_ref_1644","_ref_1646","_ref_1648","_ref_1660","_ref_1662","_ref_1664","_ref_1666","_ref_1670","_ref_1672","_ref_1676","_ref_1681","_ref_1694","_ref_1709","_ref_1715","_ref_1721","_ref_1724","_ref_1731","_ref_1733","_ref_1741","_ref_1754","_ref_1758","_ref_1763","_ref_1765","_ref_1774","_ref_1776","_ref_1786","_ref_1797","_ref_1799","_ref_1836","_ref_1841","_ref_1845","_ref_1851","_ref_1855","_ref_1858","_ref_1880","_ref_1903","_ref_1907","_ref_1909","_ref_1956","_ref_2009","_ref_2011","_ref_2015","_ref_2024","_ref_2025","_ref_2027","_ref_2043","_ref_2044","_ref_2094","_ref_2143","_ref_2151","_ref_2157","_ref_2182","_ref_2184","_ref_2185","_ref_2212","_ref_2309","_ref_2317","_ref_2328","_ref_2330","_ref_2352","_ref_2357","_ref_2360","_ref_2366","_ref_2371","_ref_2377","_ref_2381","_ref_2393","_ref_2398","_ref_2399","_ref_2426","_ref_2430","_ref_2442","_ref_2454","_ref_2459","_ref_2461","_ref_2467","_ref_2469","_ref_2474","_ref_2485","_ref_2487","_ref_2522","_ref_2530","_ref_2532","_ref_2534","_ref_2540","_ref_2542","_ref_2544","_ref_2546","_ref_2549","_ref_2550","_ref_2552","_ref_2558","_ref_2559","_ref_2561","_ref_2575","_ref_2618","_ref_2620","_ref_2635","_ref_2639","_ref_2658","_ref_2663","_ref_2668","_ref_2670","_ref_2675","_ref_2702","_ref_2713","_ref_2719","_ref_2726","_ref_2734","_ref_2738","_ref_2739","_ref_2744","_ref_2769","_ref_2780","_ref_2798","_ref_2824","_ref_2826","_ref_2832","_ref_2834","_ref_2842","_ref_2844","_ref_2853","_ref_2861","_ref_2869","_ref_2875","_ref_2876","_ref_2878","_ref_2882","_ref_2884","_ref_2914","_ref_2918","_ref_2920","_ref_2926","_ref_2932","_ref_2934","_ref_2935","_ref_2941","_ref_2949","_ref_2957","_ref_2960","_ref_2968","_ref_2975","_ref_2981","_ref_2983","_ref_2995","_ref_2997","_ref_3007","_ref_3009","_ref_3017","_ref_3019","_ref_3030","_ref_3032","_ref_3043","_ref_3045","_ref_3051","_ref_3057","_ref_3059","_ref_3070","_ref_3079","_ref_3081","_ref_3095","_ref_3098","_ref_3146","_ref_3164","_ref_3170","_ref_3179","_ref_3209","_ref_3210","_ref_3215","_ref_3216","_ref_3233","_ref_3240","_ref_3267","_ref_3284","_ref_3285","_ref_3321","_ref_3322","_ref_3335","_ref_3342","_ref_3344","_ref_3348","_ref_3394","_ref_3550","_ref_3560","_ref_3610","_ref_3663","_ref_3743","_ref_3753","_ref_3813","_ref_3823","_ref_3845","_ref_3854","_ref_3857","_ref_3865","_ref_3866","_ref_3869","_ref_3874","_ref_3875","_ref_3876","_ref_3880","_ref_3886","_ref_3891","_ref_3958","_ref_4027","_ref_4028","_ref_4033","_ref_4034","_ref_4070","_ref_4191","_ref_4274","_ref_4340","_ref_4363","_ref_4376","_ref_4396","_ref_4413","_ref_4422","_ref_4426","_ref_4436","_ref_4488","_ref_4492","_ref_4493","_ref_4494","_ref_4495","_ref_4498","_ref_4501","_ref_4502","_ref_4503","_ref_4507","_ref_4508","_ref_4514","_ref_4518","_ref_4519","_ref_4520","_ref_4521","_ref_4525","_ref_4528","_ref_4529","_ref_4530","_ref_4534","_ref_4535","_ref_4576","_ref_4587","_ref_4593","_ref_4597","_ref_4599","_ref_4612","_ref_4616","_ref_4620","_ref_4623","_ref_4626","_ref_4628","_ref_4635","_ref_4637","_ref_4638","_ref_4650","_ref_4652","_ref_4670","_ref_4672","_ref_4677","_ref_4683","_ref_4794","_ref_4801","_ref_4840","_ref_4846","_ref_4855","_ref_4858","_ref_4926","_ref_4929","_ref_4931","_ref_4999","_ref_5005","_ref_5091","_ref_5104","_ref_5114","_ref_5119","_ref_5126","_ref_5128","_ref_5196","_ref_5203","_ref_5210","_ref_5220","_ref_5411","_ref_5429","_ref_5436","_ref_5443","_ref_5701","_ref_5703","_ref_5708","_ref_5710","_ref_5716","_ref_5718","_ref_5726","_ref_5794","_ref_5824","_ref_5831","_ref_5838","_ref_5879","_ref_5881","_ref_5883","_ref_5884","_ref_5885","_ref_5887","_ref_5923","_ref_5930","_ref_5952","_ref_5960","_ref_5998","_ref_6003","_ref_6004","_ref_6015","_ref_6021","_ref_6023","_ref_6024","_ref_6029","_ref_6032","_ref_6033","_ref_6036","_ref_6050","_ref_6055","_ref_6059","_ref_6063","_ref_6071","_ref_6078","_ref_6081","_ref_6082","_ref_6124","_ref_6126","_ref_6133","_ref_6134","_ref_6141","_ref_6144","_ref_6146","_ref_6153","_ref_6156","_ref_6161","_ref_6163","_ref_6164","_ref_6206","_ref_6267","_ref_6324","_ref_6329","_ref_6335","_ref_6339","_ref_6346","_ref_6347","_ref_6493","_ref_6520","_ref_6531","_ref_6779","_ref_6787","_ref_6801","_ref_6838","_ref_6869","_ref_6873","_ref_6878","_ref_6898","_ref_6954","_ref_6974","_ref_6977","_ref_6988","_ref_6990","_ref_7036","_ref_7043","_ref_7065","_ref_7074","_ref_7084","_ref_7086","_ref_7087","_ref_7088","_ref_7091","_ref_7107","_ref_7117","_ref_7125","_ref_7140","_ref_7157","_ref_7224","_ref_7227","_ref_7288","_ref_7362","_ref_7364","_ref_7366","_ref_7368","_ref_7374","_ref_7376","_ref_7382","_ref_7384","_ref_7385","_ref_7402","_ref_7404","_ref_7405","_ref_7406","_ref_7417","_ref_7419","_ref_7420","_ref_7421","_ref_7473","_ref_7475","_ref_7478","_ref_7511","_ref_7517","_ref_7539","_ref_7542","_ref_7546","_ref_7573","_ref_7575","_ref_7577","_ref_7584","_ref_7586","_ref_7587","_ref_7590","_ref_7596","_ref_7600","_ref_7602","_ref_7606","_ref_7608","_ref_7610","_ref_7616","_ref_7618","_ref_7620","_ref_7621","_ref_7631","_ref_7633","_ref_7697","_ref_7719","_ref_7724","_ref_7766","_ref_7795","_ref_7922","_ref_7925","_ref_7931","_ref_7936","_ref_7939","_ref_7945","_ref_7953","_ref_7958","_ref_7963","_ref_7965","_ref_7967","_ref_7990","_ref_7991","_ref_7994","_ref_8002","_ref_8003","_ref_8008","_ref_8009","_ref_8013","_ref_8014","_ref_8016","_ref_8023","_ref_8026","_ref_8031","_ref_8033","_ref_8050","_ref_8058","_ref_8060","_ref_8071","_ref_8095","_ref_8098","_ref_8110","_ref_8127","_ref_8130","_ref_8135","_ref_8138","_ref_8141","_ref_8182","_ref_8184","_ref_8215","_ref_8217","_ref_8238","_ref_8254","_ref_8264","_ref_8267","_ref_8275","_ref_8278","_ref_8287","_ref_8289","_ref_8297","_ref_8323","_ref_8330","_ref_8334","_ref_8337","_ref_8386","_ref_8469","_ref_8471","_ref_8482","_ref_8485","_ref_8540","_ref_8731","_ref_8732","_ref_8753","_ref_8767"],"id":"assert","namespace":"https://tc39.github.io/ecma262/","location":"","key":"Assert"},{"type":"term","term":"abstract operations","refId":"sec-algorithm-conventions-abstract-operations","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"abstract operations"},{"type":"clause","id":"sec-algorithm-conventions-abstract-operations","aoid":null,"title":"Abstract Operations","titleHTML":"Abstract Operations","number":"5.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_891","_ref_920","_ref_1272","_ref_1345","_ref_1391","_ref_1397","_ref_1427","_ref_1428","_ref_1429","_ref_2029","_ref_2181","_ref_4112","_ref_4204","_ref_4574","_ref_5247","_ref_5364","_ref_6701","_ref_8391","_ref_8392","_ref_8393","_ref_8410","_ref_8787"],"key":"Abstract Operations"},{"type":"clause","id":"sec-algorithm-conventions-syntax-directed-operations","aoid":null,"title":"Syntax-Directed Operations","titleHTML":"Syntax-Directed Operations","number":"5.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Syntax-Directed Operations"},{"type":"term","term":"runtime semantics","refId":"sec-runtime-semantics","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"runtime semantics"},{"type":"clause","id":"sec-implicit-completion-values","aoid":null,"title":"Implicit Completion Values","titleHTML":"Implicit Completion Values","number":"5.2.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Implicit Completion Values"},{"type":"clause","id":"sec-throw-an-exception","aoid":null,"title":"Throw an Exception","titleHTML":"Throw an Exception","number":"5.2.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Throw an Exception"},{"type":"op","aoid":"ReturnIfAbrupt","refId":"sec-returnifabrupt","location":"","referencingIds":[],"key":"ReturnIfAbrupt"},{"type":"clause","id":"sec-returnifabrupt","aoid":"ReturnIfAbrupt","title":"ReturnIfAbrupt","titleHTML":"ReturnIfAbrupt","number":"5.2.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_911","_ref_914","_ref_917","_ref_921","_ref_923","_ref_924","_ref_1233","_ref_1296","_ref_1310","_ref_1311","_ref_1334","_ref_1335","_ref_2437","_ref_2484","_ref_3165","_ref_3171","_ref_3186","_ref_3191","_ref_3212","_ref_3232","_ref_3252","_ref_3257","_ref_3259","_ref_3263","_ref_3288","_ref_3316","_ref_3338","_ref_3361","_ref_3363","_ref_3390","_ref_3468","_ref_3472","_ref_3476","_ref_3480","_ref_3524","_ref_3573","_ref_3575","_ref_3582","_ref_3586","_ref_3588","_ref_3591","_ref_3594","_ref_3600","_ref_3604","_ref_3607","_ref_3613","_ref_3655","_ref_3667","_ref_3669","_ref_3682","_ref_3684","_ref_3703","_ref_3716","_ref_3719","_ref_3726","_ref_3729","_ref_3735","_ref_3740","_ref_3747","_ref_3750","_ref_3790","_ref_4073","_ref_4076","_ref_4088","_ref_4095","_ref_4098","_ref_4105","_ref_4132","_ref_4224","_ref_4285","_ref_4288","_ref_4290","_ref_4313","_ref_4343","_ref_4346","_ref_4687","_ref_4740","_ref_8190","_ref_8195","_ref_8221","_ref_8224","_ref_8726"],"key":"ReturnIfAbrupt"},{"type":"clause","id":"sec-returnifabrupt-shorthands","aoid":null,"title":"ReturnIfAbrupt Shorthands","titleHTML":"ReturnIfAbrupt Shorthands","number":"5.2.3.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"ReturnIfAbrupt Shorthands"},{"type":"clause","id":"sec-runtime-semantics","aoid":null,"title":"Runtime Semantics","titleHTML":"Runtime Semantics","number":"5.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_858","_ref_930","_ref_8780"],"key":"Runtime Semantics"},{"type":"term","term":"static semantics","refId":"sec-static-semantic-rules","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"static semantics"},{"type":"term","term":"Early Error Rule","refId":"sec-static-semantic-rules","referencingIds":[],"id":"early-error-rule","namespace":"https://tc39.github.io/ecma262/","location":"","key":"Early Error Rule"},{"type":"clause","id":"sec-static-semantic-rules","aoid":null,"title":"Static Semantics","titleHTML":"Static Semantics","number":"5.2.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3130","_ref_3672","_ref_3984","_ref_4293","_ref_4828","_ref_4831","_ref_4834","_ref_5012","_ref_8773","_ref_8774","_ref_8775","_ref_8776","_ref_8777","_ref_8778"],"key":"Static Semantics"},{"type":"op","aoid":"abs","id":"eqn-abs","referencingIds":["_ref_937","_ref_938","_ref_1456","_ref_1459","_ref_1464","_ref_1470","_ref_1474","_ref_1479","_ref_1483","_ref_1497","_ref_1499","_ref_1533","_ref_1534","_ref_3426","_ref_3427","_ref_3428","_ref_3429","_ref_3430","_ref_3431","_ref_5185","_ref_5400","_ref_5721","_ref_5723"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"abs"},{"type":"op","aoid":"min","id":"eqn-min","referencingIds":["_ref_1507","_ref_4505","_ref_4532","_ref_5817","_ref_5825","_ref_5832","_ref_5840","_ref_5903","_ref_5905","_ref_5931","_ref_5937","_ref_5939","_ref_5941","_ref_6026","_ref_6066","_ref_6241","_ref_6286","_ref_6420","_ref_6423","_ref_6426","_ref_6427","_ref_6450","_ref_6453","_ref_6553","_ref_6641","_ref_6644","_ref_6708","_ref_6710","_ref_6886","_ref_6889","_ref_6892","_ref_6893","_ref_6910","_ref_6913","_ref_7010","_ref_7013","_ref_7046","_ref_7049","_ref_7458","_ref_7461","_ref_7499","_ref_7502","_ref_7760","_ref_8677"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"min"},{"type":"op","aoid":"max","id":"eqn-max","referencingIds":["_ref_5818","_ref_5826","_ref_5833","_ref_5841","_ref_5902","_ref_5904","_ref_5906","_ref_5932","_ref_5938","_ref_5940","_ref_5942","_ref_6235","_ref_6240","_ref_6292","_ref_6419","_ref_6422","_ref_6425","_ref_6449","_ref_6452","_ref_6640","_ref_6643","_ref_6645","_ref_6707","_ref_6711","_ref_6885","_ref_6888","_ref_6891","_ref_6909","_ref_6912","_ref_7009","_ref_7012","_ref_7014","_ref_7045","_ref_7048","_ref_7050","_ref_7457","_ref_7460","_ref_7462","_ref_7498","_ref_7501","_ref_7503","_ref_7688","_ref_7703","_ref_8676","_ref_8678"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"max"},{"type":"op","aoid":"modulo","id":"eqn-modulo","referencingIds":["_ref_940","_ref_1460","_ref_1465","_ref_1471","_ref_1475","_ref_1480","_ref_1484","_ref_3097","_ref_5242","_ref_5251","_ref_5253","_ref_5254","_ref_5255","_ref_5256","_ref_5257","_ref_5258","_ref_5347","_ref_5367","_ref_5371","_ref_5375","_ref_5377","_ref_5394","_ref_7131","_ref_7134"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"modulo"},{"type":"op","aoid":"floor","id":"eqn-floor","referencingIds":["_ref_939","_ref_1455","_ref_1458","_ref_1463","_ref_1469","_ref_1473","_ref_1478","_ref_1482","_ref_1486","_ref_1532","_ref_3096","_ref_5249","_ref_5259","_ref_5260","_ref_5261","_ref_5365","_ref_5369","_ref_5373","_ref_5393","_ref_6609"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"floor"},{"type":"clause","id":"sec-mathematical-operations","aoid":null,"title":"Mathematical Operations","titleHTML":"Mathematical Operations","number":"5.2.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Mathematical Operations"},{"type":"clause","id":"sec-algorithm-conventions","aoid":null,"title":"Algorithm Conventions","titleHTML":"Algorithm Conventions","number":"5.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Algorithm Conventions"},{"type":"clause","id":"sec-notational-conventions","aoid":null,"title":"Notational Conventions","titleHTML":"Notational Conventions","number":"5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Notational Conventions"},{"type":"term","term":"type","refId":"sec-ecmascript-data-types-and-values","referencingIds":[],"id":"type","namespace":"https://tc39.github.io/ecma262/","location":"","key":"type"},{"type":"term","term":"ECMAScript language type","refId":"sec-ecmascript-language-types","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ECMAScript language type"},{"type":"term","term":"ECMAScript language value","refId":"sec-ecmascript-language-types","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ECMAScript language value"},{"type":"clause","id":"sec-ecmascript-language-types-undefined-type","aoid":null,"title":"The Undefined Type","titleHTML":"The Undefined Type","number":"6.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_407"],"key":"The Undefined Type"},{"type":"clause","id":"sec-ecmascript-language-types-null-type","aoid":null,"title":"The Null Type","titleHTML":"The Null Type","number":"6.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"The Null Type"},{"type":"clause","id":"sec-ecmascript-language-types-boolean-type","aoid":null,"title":"The Boolean Type","titleHTML":"The Boolean Type","number":"6.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"The Boolean Type"},{"type":"term","term":"leading surrogate","refId":"sec-ecmascript-language-types-string-type","referencingIds":["_ref_14","_ref_16","_ref_19","_ref_137","_ref_252","_ref_424","_ref_678"],"id":"leading-surrogate","namespace":"https://tc39.github.io/ecma262/","location":"","key":"leading surrogate"},{"type":"term","term":"high-surrogate code unit","refId":"sec-ecmascript-language-types-string-type","referencingIds":[],"id":"high-surrogate-code-unit","namespace":"https://tc39.github.io/ecma262/","location":"","key":"high-surrogate code unit"},{"type":"term","term":"trailing surrogate","refId":"sec-ecmascript-language-types-string-type","referencingIds":["_ref_15","_ref_17","_ref_20","_ref_138","_ref_253","_ref_423","_ref_425","_ref_679"],"id":"trailing-surrogate","namespace":"https://tc39.github.io/ecma262/","location":"","key":"trailing surrogate"},{"type":"term","term":"low-surrogate code unit","refId":"sec-ecmascript-language-types-string-type","referencingIds":[],"id":"low-surrogate-code-unit","namespace":"https://tc39.github.io/ecma262/","location":"","key":"low-surrogate code unit"},{"type":"term","term":"surrogate pair","refId":"sec-ecmascript-language-types-string-type","referencingIds":["_ref_21","_ref_251","_ref_422","_ref_427","_ref_524","_ref_4876"],"id":"surrogate-pair","namespace":"https://tc39.github.io/ecma262/","location":"","key":"surrogate pair"},{"type":"term","term":"string-concatenation","refId":"sec-ecmascript-language-types-string-type","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"string-concatenation"},{"type":"clause","id":"sec-ecmascript-language-types-string-type","aoid":null,"title":"The String Type","titleHTML":"The String Type","number":"6.1.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_136","_ref_408","_ref_428","_ref_429","_ref_469","_ref_470","_ref_523","_ref_527","_ref_528","_ref_529","_ref_530","_ref_531","_ref_532","_ref_533","_ref_534","_ref_535","_ref_536","_ref_548","_ref_549","_ref_570","_ref_572","_ref_672","_ref_674","_ref_675","_ref_1491","_ref_1493","_ref_1494","_ref_1495","_ref_1496","_ref_1498","_ref_1545","_ref_2555","_ref_2556","_ref_3258","_ref_3260","_ref_3444","_ref_4866","_ref_4870","_ref_4871","_ref_4875","_ref_4987","_ref_5008","_ref_5025","_ref_5130","_ref_5151","_ref_5204","_ref_5205","_ref_5206","_ref_5207","_ref_5212","_ref_5213","_ref_5214","_ref_5219","_ref_5221","_ref_5222","_ref_5223","_ref_5224","_ref_5225","_ref_5226","_ref_5707","_ref_5715","_ref_5724","_ref_5725","_ref_5729","_ref_5736","_ref_5745","_ref_5810","_ref_5858","_ref_5863","_ref_5878","_ref_5968","_ref_6111","_ref_6251","_ref_6252","_ref_6275","_ref_6311","_ref_6541","_ref_6545","_ref_6740","_ref_6745","_ref_7718","_ref_7789","_ref_7790","_ref_7792","_ref_7794","_ref_7796","_ref_7797","_ref_7802","_ref_7803","_ref_7804","_ref_7805","_ref_7806","_ref_7807","_ref_7808","_ref_7814","_ref_7815","_ref_7816","_ref_8647","_ref_8648","_ref_8649","_ref_8652","_ref_8682","_ref_8684","_ref_8685","_ref_8686","_ref_8687"],"key":"The String Type"},{"type":"table","id":"table-1","number":1,"caption":"Table 1: Well-known Symbols","referencingIds":["_ref_26","_ref_478","_ref_480","_ref_481","_ref_482","_ref_484","_ref_485","_ref_486","_ref_487","_ref_488","_ref_489","_ref_490","_ref_491"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 1: Well-known Symbols"},{"type":"clause","id":"sec-well-known-symbols","aoid":null,"title":"Well-Known Symbols","titleHTML":"Well-Known Symbols","number":"6.1.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Well-Known Symbols"},{"type":"clause","id":"sec-ecmascript-language-types-symbol-type","aoid":null,"title":"The Symbol Type","titleHTML":"The Symbol Type","number":"6.1.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"The Symbol Type"},{"type":"clause","id":"sec-ecmascript-language-types-number-type","aoid":null,"title":"The Number Type","titleHTML":"The Number Type","number":"6.1.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_142","_ref_286","_ref_405","_ref_406","_ref_502","_ref_503"],"key":"The Number Type"},{"type":"term","term":"data property","refId":"sec-object-type","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"data property"},{"type":"term","term":"accessor property","refId":"sec-object-type","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"accessor property"},{"type":"term","term":"property name","refId":"sec-object-type","referencingIds":["_ref_2097","_ref_2644","_ref_2651","_ref_3690","_ref_3893","_ref_4787","_ref_4788","_ref_5074","_ref_5978","_ref_5979","_ref_5984","_ref_6039","_ref_6040","_ref_6041","_ref_6042","_ref_6044","_ref_6045","_ref_6046","_ref_6047","_ref_6048","_ref_6053","_ref_6054","_ref_6072","_ref_6073","_ref_6079","_ref_6784","_ref_6785","_ref_7769"],"id":"property-name","namespace":"https://tc39.github.io/ecma262/","location":"","key":"property name"},{"type":"term","term":"integer index","refId":"sec-object-type","referencingIds":["_ref_576","_ref_590","_ref_592","_ref_594","_ref_596","_ref_598","_ref_600","_ref_602","_ref_605","_ref_607","_ref_609","_ref_623","_ref_625","_ref_630","_ref_947","_ref_1514","_ref_2821","_ref_2872","_ref_5918","_ref_5971","_ref_6671","_ref_6702","_ref_6805","_ref_6806","_ref_7232","_ref_7295"],"id":"integer-index","namespace":"https://tc39.github.io/ecma262/","location":"","key":"integer index"},{"type":"term","term":"array index","refId":"sec-object-type","referencingIds":["_ref_577","_ref_680","_ref_786","_ref_2385","_ref_2386","_ref_2643","_ref_2645","_ref_2646","_ref_2647","_ref_2648","_ref_2649","_ref_2650","_ref_2652","_ref_2661","_ref_2729","_ref_2732","_ref_2749","_ref_6780","_ref_6782","_ref_6783","_ref_8609"],"id":"array-index","namespace":"https://tc39.github.io/ecma262/","location":"","key":"array index"},{"type":"term","term":"Ordinary objects","refId":"sec-object-type","referencingIds":[],"id":"ordinary-objects","namespace":"https://tc39.github.io/ecma262/","location":"","key":"Ordinary objects"},{"type":"term","term":"exotic object","refId":"sec-object-type","referencingIds":["_ref_872","_ref_973","_ref_1521","_ref_1522","_ref_1725","_ref_1727","_ref_1730","_ref_2195","_ref_2595","_ref_2625","_ref_2630","_ref_2634","_ref_2642","_ref_2656","_ref_2672","_ref_2696","_ref_2709","_ref_2711","_ref_2712","_ref_2717","_ref_2724","_ref_2736","_ref_2746","_ref_2747","_ref_2748","_ref_2750","_ref_2751","_ref_2757","_ref_2761","_ref_2770","_ref_2775","_ref_2782","_ref_2799","_ref_2820","_ref_2889","_ref_2890","_ref_2891","_ref_2896","_ref_2898","_ref_2899","_ref_2900","_ref_2903","_ref_2909","_ref_2912","_ref_2922","_ref_2923","_ref_2925","_ref_2930","_ref_2938","_ref_2945","_ref_2948","_ref_2956","_ref_2967","_ref_2974","_ref_2980","_ref_2993","_ref_3006","_ref_3015","_ref_3028","_ref_3042","_ref_3050","_ref_3068","_ref_3076","_ref_3077","_ref_3088","_ref_3090","_ref_3092","_ref_4430","_ref_4669","_ref_4852","_ref_4984","_ref_5790","_ref_6318","_ref_6322","_ref_6393","_ref_6395","_ref_6673","_ref_8374","_ref_8387","_ref_8788"],"id":"exotic-object","namespace":"https://tc39.github.io/ecma262/","location":"","key":"exotic object"},{"type":"table","id":"table-2","number":2,"caption":"Table 2: Attributes of a Data Property","referencingIds":["_ref_37","_ref_129"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 2: Attributes of a Data Property"},{"type":"table","id":"table-3","number":3,"caption":"Table 3: Attributes of an Accessor Property","referencingIds":["_ref_39","_ref_130"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 3: Attributes of an Accessor Property"},{"type":"table","id":"table-4","number":4,"caption":"Table 4: Default Attribute Values","referencingIds":["_ref_43"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 4: Default Attribute Values"},{"type":"clause","id":"sec-property-attributes","aoid":null,"title":"Property Attributes","titleHTML":"Property Attributes","number":"6.1.7.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_128"],"key":"Property Attributes"},{"type":"table","id":"table-5","number":5,"caption":"Table 5: Essential Internal Methods","referencingIds":["_ref_44","_ref_45"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 5: Essential Internal Methods"},{"type":"term","term":"function object","refId":"sec-object-internal-methods-and-internal-slots","referencingIds":["_ref_867","_ref_884","_ref_952","_ref_953","_ref_963","_ref_967","_ref_970","_ref_1179","_ref_1527","_ref_1650","_ref_1651","_ref_1656","_ref_1657","_ref_1796","_ref_1811","_ref_1895","_ref_2110","_ref_2111","_ref_2406","_ref_2407","_ref_2410","_ref_2424","_ref_2427","_ref_2440","_ref_2450","_ref_2463","_ref_2465","_ref_2468","_ref_2488","_ref_2490","_ref_2520","_ref_2527","_ref_2531","_ref_2541","_ref_2545","_ref_2569","_ref_2594","_ref_2596","_ref_2598","_ref_2602","_ref_2603","_ref_2614","_ref_2617","_ref_2623","_ref_2624","_ref_2626","_ref_2627","_ref_2752","_ref_2813","_ref_2817","_ref_3099","_ref_3112","_ref_3345","_ref_4085","_ref_4087","_ref_4759","_ref_4769","_ref_4770","_ref_4773","_ref_4782","_ref_4783","_ref_4784","_ref_4785","_ref_4786","_ref_4789","_ref_4991","_ref_5028","_ref_5032","_ref_5035","_ref_5073","_ref_5187","_ref_5190","_ref_5233","_ref_6766","_ref_6820","_ref_7057","_ref_7060","_ref_7216","_ref_7275","_ref_7280","_ref_7881","_ref_7886","_ref_7891","_ref_7892","_ref_7900","_ref_7904","_ref_7910","_ref_7911","_ref_8077","_ref_8078","_ref_8089","_ref_8166","_ref_8261","_ref_8262","_ref_8272","_ref_8273","_ref_8311","_ref_8316","_ref_8320","_ref_8341","_ref_8700","_ref_8701","_ref_8719","_ref_8720"],"id":"function-object","namespace":"https://tc39.github.io/ecma262/","location":"","key":"function object"},{"type":"term","term":"constructor","refId":"sec-object-internal-methods-and-internal-slots","referencingIds":["_ref_859","_ref_860","_ref_861","_ref_862","_ref_863","_ref_864","_ref_865","_ref_866","_ref_868","_ref_869","_ref_870","_ref_871","_ref_873","_ref_874","_ref_875","_ref_876","_ref_877","_ref_878","_ref_879","_ref_880","_ref_881","_ref_882","_ref_883","_ref_941","_ref_942","_ref_943","_ref_962","_ref_964","_ref_965","_ref_966","_ref_971","_ref_972","_ref_1005","_ref_1007","_ref_1029","_ref_1036","_ref_1042","_ref_1047","_ref_1052","_ref_1061","_ref_1066","_ref_1068","_ref_1070","_ref_1073","_ref_1081","_ref_1085","_ref_1087","_ref_1089","_ref_1101","_ref_1108","_ref_1113","_ref_1126","_ref_1143","_ref_1144","_ref_1146","_ref_1150","_ref_1155","_ref_1161","_ref_1166","_ref_1172","_ref_1176","_ref_1184","_ref_1186","_ref_1188","_ref_1190","_ref_1192","_ref_1194","_ref_1197","_ref_1202","_ref_1699","_ref_1706","_ref_1707","_ref_1708","_ref_2390","_ref_2396","_ref_2397","_ref_2529","_ref_2599","_ref_2600","_ref_2601","_ref_2674","_ref_2690","_ref_3100","_ref_3101","_ref_3102","_ref_3127","_ref_4060","_ref_4752","_ref_4756","_ref_4757","_ref_4758","_ref_4774","_ref_4775","_ref_4776","_ref_4777","_ref_4778","_ref_4779","_ref_4780","_ref_4793","_ref_4885","_ref_4887","_ref_4888","_ref_4893","_ref_4894","_ref_4989","_ref_4992","_ref_4993","_ref_4996","_ref_4997","_ref_5026","_ref_5027","_ref_5033","_ref_5070","_ref_5071","_ref_5076","_ref_5077","_ref_5078","_ref_5080","_ref_5081","_ref_5082","_ref_5085","_ref_5096","_ref_5099","_ref_5133","_ref_5135","_ref_5136","_ref_5141","_ref_5152","_ref_5153","_ref_5154","_ref_5155","_ref_5156","_ref_5161","_ref_5162","_ref_5164","_ref_5166","_ref_5167","_ref_5168","_ref_5169","_ref_5170","_ref_5172","_ref_5173","_ref_5174","_ref_5177","_ref_5234","_ref_5405","_ref_5407","_ref_5408","_ref_5409","_ref_5410","_ref_5428","_ref_5442","_ref_5448","_ref_5469","_ref_5752","_ref_5754","_ref_5755","_ref_5756","_ref_5762","_ref_5959","_ref_5972","_ref_5992","_ref_6084","_ref_6086","_ref_6087","_ref_6112","_ref_6116","_ref_6117","_ref_6316","_ref_6319","_ref_6320","_ref_6321","_ref_6323","_ref_6328","_ref_6338","_ref_6348","_ref_6379","_ref_6388","_ref_6391","_ref_6392","_ref_6786","_ref_6807","_ref_6808","_ref_6809","_ref_6817","_ref_6818","_ref_6819","_ref_6821","_ref_6823","_ref_6825","_ref_6827","_ref_6863","_ref_6864","_ref_7067","_ref_7068","_ref_7069","_ref_7071","_ref_7072","_ref_7077","_ref_7078","_ref_7080","_ref_7081","_ref_7093","_ref_7094","_ref_7109","_ref_7110","_ref_7127","_ref_7128","_ref_7135","_ref_7139","_ref_7143","_ref_7145","_ref_7148","_ref_7150","_ref_7151","_ref_7173","_ref_7177","_ref_7178","_ref_7179","_ref_7217","_ref_7234","_ref_7236","_ref_7237","_ref_7248","_ref_7252","_ref_7253","_ref_7254","_ref_7281","_ref_7296","_ref_7298","_ref_7299","_ref_7304","_ref_7330","_ref_7332","_ref_7333","_ref_7344","_ref_7373","_ref_7434","_ref_7436","_ref_7437","_ref_7440","_ref_7445","_ref_7446","_ref_7480","_ref_7482","_ref_7483","_ref_7486","_ref_7523","_ref_7525","_ref_7526","_ref_7533","_ref_7565","_ref_7568","_ref_7716","_ref_7820","_ref_7875","_ref_7876","_ref_7877","_ref_7880","_ref_7882","_ref_7894","_ref_7895","_ref_7896","_ref_7899","_ref_7901","_ref_8112","_ref_8113","_ref_8114","_ref_8117","_ref_8118","_ref_8123","_ref_8124","_ref_8125","_ref_8154","_ref_8156","_ref_8157","_ref_8167","_ref_8168","_ref_8169","_ref_8180","_ref_8181","_ref_8213","_ref_8214","_ref_8230","_ref_8231","_ref_8232","_ref_8235","_ref_8236","_ref_8237","_ref_8246","_ref_8247","_ref_8260","_ref_8271","_ref_8305","_ref_8306","_ref_8307","_ref_8310","_ref_8312","_ref_8342","_ref_8372","_ref_8375","_ref_8377","_ref_8388","_ref_8607","_ref_8623","_ref_8630","_ref_8631"],"id":"constructor","namespace":"https://tc39.github.io/ecma262/","location":"","key":"constructor"},{"type":"table","id":"table-6","number":6,"caption":"Table 6: Additional Essential Internal Methods of Function Objects","referencingIds":["_ref_40","_ref_41","_ref_47"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 6: Additional Essential Internal Methods of Function Objects"},{"type":"clause","id":"sec-object-internal-methods-and-internal-slots","aoid":null,"title":"Object Internal Methods and Internal Slots","titleHTML":"Object Internal Methods and Internal Slots","number":"6.1.7.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Object Internal Methods and Internal Slots"},{"type":"clause","id":"sec-invariants-of-the-essential-internal-methods","aoid":null,"title":"Invariants of the Essential Internal Methods","titleHTML":"Invariants of the Essential Internal Methods","number":"6.1.7.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_184","_ref_246","_ref_247"],"key":"Invariants of the Essential Internal Methods"},{"type":"table","id":"table-7","number":7,"caption":"Table 7: Well-Known Intrinsic Objects","referencingIds":["_ref_51","_ref_172","_ref_744"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 7: Well-Known Intrinsic Objects"},{"type":"clause","id":"sec-well-known-intrinsic-objects","aoid":null,"title":"Well-Known Intrinsic Objects","titleHTML":"Well-Known Intrinsic Objects","number":"6.1.7.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_474"],"key":"Well-Known Intrinsic Objects"},{"type":"clause","id":"sec-object-type","aoid":null,"title":"The Object Type","titleHTML":"The Object Type","number":"6.1.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_24","_ref_207","_ref_948","_ref_950","_ref_951","_ref_954","_ref_980","_ref_982","_ref_983","_ref_984","_ref_985","_ref_987","_ref_988","_ref_990","_ref_991","_ref_993","_ref_994","_ref_1009","_ref_1013","_ref_1016","_ref_1019","_ref_1022","_ref_1025","_ref_1031","_ref_1044","_ref_1049","_ref_1054","_ref_1063","_ref_1067","_ref_1069","_ref_1071","_ref_1075","_ref_1078","_ref_1083","_ref_1086","_ref_1088","_ref_1090","_ref_1096","_ref_1098","_ref_1104","_ref_1110","_ref_1115","_ref_1118","_ref_1121","_ref_1128","_ref_1131","_ref_1134","_ref_1137","_ref_1140","_ref_1145","_ref_1147","_ref_1152","_ref_1158","_ref_1163","_ref_1169","_ref_1174","_ref_1177","_ref_1182","_ref_1185","_ref_1187","_ref_1189","_ref_1191","_ref_1193","_ref_1195","_ref_1199","_ref_1204","_ref_2098","_ref_2320","_ref_2321","_ref_2333","_ref_2335","_ref_2340","_ref_2341","_ref_2342","_ref_2343","_ref_2664","_ref_2703","_ref_2710","_ref_2754","_ref_2755","_ref_2756","_ref_3026","_ref_3027","_ref_3040","_ref_3041","_ref_3535","_ref_3536","_ref_4251","_ref_4761","_ref_4790","_ref_4791","_ref_5030","_ref_5122","_ref_5186","_ref_5189","_ref_6115","_ref_6166","_ref_6170","_ref_6184","_ref_6188","_ref_6212","_ref_6263","_ref_6299","_ref_6312","_ref_6390","_ref_6672","_ref_6674","_ref_6675","_ref_6767","_ref_6781","_ref_6861","_ref_6867","_ref_6871","_ref_6876","_ref_6952","_ref_7056","_ref_7063","_ref_7176","_ref_7211","_ref_7251","_ref_7276","_ref_7444","_ref_7448","_ref_7489","_ref_7491","_ref_7537","_ref_7540","_ref_7544","_ref_7884","_ref_7903","_ref_8245","_ref_8314","_ref_8596","_ref_8597","_ref_8598","_ref_8653"],"key":"The Object Type"},{"type":"clause","id":"sec-ecmascript-language-types","aoid":null,"title":"ECMAScript Language Types","titleHTML":"ECMAScript Language Types","number":"6.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_945","_ref_946","_ref_949","_ref_955","_ref_956","_ref_1217","_ref_1430","_ref_1432","_ref_1524","_ref_1526","_ref_1535","_ref_1604","_ref_1636","_ref_1637","_ref_1652","_ref_1692","_ref_1820","_ref_1822","_ref_2305","_ref_2354","_ref_2356","_ref_2363","_ref_2365","_ref_2369","_ref_2441","_ref_2771","_ref_2776","_ref_2852","_ref_2860","_ref_2913","_ref_2924","_ref_2946","_ref_3016","_ref_3029","_ref_3325","_ref_6975","_ref_7817"],"key":"ECMAScript Language Types"},{"type":"term","term":"List","refId":"sec-list-and-record-specification-type","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"List"},{"type":"term","term":"Record","refId":"sec-list-and-record-specification-type","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Record"},{"type":"clause","id":"sec-list-and-record-specification-type","aoid":null,"title":"The List and Record Specification Types","titleHTML":"The List and Record Specification Types","number":"6.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_960","_ref_961","_ref_968","_ref_969","_ref_995","_ref_996","_ref_997","_ref_998","_ref_999","_ref_1207","_ref_1214","_ref_1215","_ref_1385","_ref_1418","_ref_1442","_ref_1653","_ref_1654","_ref_1658","_ref_1659","_ref_1675","_ref_1677","_ref_1682","_ref_1683","_ref_1684","_ref_1688","_ref_1693","_ref_1696","_ref_1717","_ref_1718","_ref_1734","_ref_1736","_ref_1737","_ref_1750","_ref_1795","_ref_1815","_ref_1846","_ref_1881","_ref_1937","_ref_1986","_ref_1993","_ref_1996","_ref_2053","_ref_2064","_ref_2071","_ref_2072","_ref_2081","_ref_2082","_ref_2164","_ref_2165","_ref_2166","_ref_2167","_ref_2186","_ref_2249","_ref_2285","_ref_2384","_ref_2387","_ref_2388","_ref_2389","_ref_2391","_ref_2392","_ref_2425","_ref_2464","_ref_2466","_ref_2573","_ref_2574","_ref_2578","_ref_2580","_ref_2584","_ref_2604","_ref_2616","_ref_2628","_ref_2631","_ref_2725","_ref_2796","_ref_2805","_ref_2868","_ref_2874","_ref_2894","_ref_2895","_ref_2936","_ref_2937","_ref_3058","_ref_3060","_ref_3061","_ref_3062","_ref_3063","_ref_3064","_ref_3065","_ref_3066","_ref_3067","_ref_3069","_ref_3078","_ref_3138","_ref_3139","_ref_3140","_ref_3196","_ref_3197","_ref_3206","_ref_3222","_ref_3223","_ref_3224","_ref_3225","_ref_3226","_ref_3227","_ref_3229","_ref_3234","_ref_3235","_ref_3239","_ref_3246","_ref_3249","_ref_3251","_ref_3254","_ref_3287","_ref_3352","_ref_3353","_ref_3355","_ref_3356","_ref_3565","_ref_3572","_ref_3574","_ref_3623","_ref_3624","_ref_3632","_ref_3633","_ref_3634","_ref_3635","_ref_3636","_ref_3637","_ref_3638","_ref_3639","_ref_3640","_ref_3641","_ref_3642","_ref_3643","_ref_3644","_ref_3645","_ref_3646","_ref_3647","_ref_3648","_ref_3681","_ref_3693","_ref_3694","_ref_3701","_ref_3702","_ref_3704","_ref_3819","_ref_3820","_ref_3844","_ref_3917","_ref_3918","_ref_3919","_ref_3920","_ref_3921","_ref_3922","_ref_3923","_ref_3924","_ref_3925","_ref_3926","_ref_3927","_ref_3928","_ref_3929","_ref_3930","_ref_3931","_ref_3932","_ref_3934","_ref_3940","_ref_3945","_ref_3970","_ref_3971","_ref_3972","_ref_3973","_ref_3974","_ref_3975","_ref_3976","_ref_3977","_ref_3981","_ref_4015","_ref_4018","_ref_4019","_ref_4020","_ref_4021","_ref_4022","_ref_4065","_ref_4066","_ref_4067","_ref_4068","_ref_4077","_ref_4094","_ref_4115","_ref_4207","_ref_4252","_ref_4253","_ref_4254","_ref_4255","_ref_4256","_ref_4257","_ref_4280","_ref_4304","_ref_4336","_ref_4337","_ref_4338","_ref_4339","_ref_4347","_ref_4398","_ref_4401","_ref_4424","_ref_4425","_ref_4427","_ref_4439","_ref_4443","_ref_4444","_ref_4445","_ref_4446","_ref_4447","_ref_4448","_ref_4449","_ref_4450","_ref_4451","_ref_4453","_ref_4454","_ref_4455","_ref_4456","_ref_4457","_ref_4458","_ref_4459","_ref_4460","_ref_4461","_ref_4462","_ref_4463","_ref_4464","_ref_4477","_ref_4478","_ref_4479","_ref_4489","_ref_4515","_ref_4559","_ref_4560","_ref_4561","_ref_4562","_ref_4563","_ref_4564","_ref_4565","_ref_4566","_ref_4567","_ref_4571","_ref_4578","_ref_4581","_ref_4583","_ref_4584","_ref_4585","_ref_4594","_ref_4595","_ref_4609","_ref_4613","_ref_4644","_ref_4673","_ref_4680","_ref_4691","_ref_4692","_ref_4693","_ref_4695","_ref_4697","_ref_4698","_ref_4700","_ref_4702","_ref_4703","_ref_4704","_ref_4705","_ref_4706","_ref_4707","_ref_4708","_ref_4709","_ref_4710","_ref_4711","_ref_4712","_ref_4714","_ref_4715","_ref_4717","_ref_4719","_ref_4721","_ref_4724","_ref_4725","_ref_4726","_ref_4728","_ref_4730","_ref_4731","_ref_4732","_ref_4733","_ref_4734","_ref_4735","_ref_4736","_ref_4737","_ref_4738","_ref_4753","_ref_4844","_ref_4845","_ref_4848","_ref_4868","_ref_4869","_ref_4872","_ref_4873","_ref_4897","_ref_4899","_ref_4908","_ref_4909","_ref_4912","_ref_4940","_ref_4946","_ref_4947","_ref_4998","_ref_5046","_ref_5058","_ref_5102","_ref_5105","_ref_5106","_ref_5107","_ref_5108","_ref_5109","_ref_5112","_ref_5764","_ref_5765","_ref_5767","_ref_5768","_ref_5769","_ref_5774","_ref_5776","_ref_5777","_ref_5778","_ref_5784","_ref_5788","_ref_5808","_ref_5876","_ref_5886","_ref_5945","_ref_5946","_ref_5976","_ref_5977","_ref_5980","_ref_5981","_ref_5982","_ref_5983","_ref_5986","_ref_5988","_ref_5989","_ref_5990","_ref_5991","_ref_5994","_ref_5995","_ref_5996","_ref_5997","_ref_5999","_ref_6000","_ref_6001","_ref_6007","_ref_6012","_ref_6013","_ref_6020","_ref_6022","_ref_6025","_ref_6031","_ref_6035","_ref_6037","_ref_6038","_ref_6043","_ref_6049","_ref_6051","_ref_6052","_ref_6056","_ref_6057","_ref_6058","_ref_6065","_ref_6076","_ref_6103","_ref_6105","_ref_6106","_ref_6143","_ref_6152","_ref_6154","_ref_6157","_ref_6225","_ref_6242","_ref_6247","_ref_6343","_ref_6381","_ref_6398","_ref_6580","_ref_6719","_ref_6760","_ref_6839","_ref_6849","_ref_6852","_ref_6853","_ref_6920","_ref_7118","_ref_7138","_ref_7153","_ref_7182","_ref_7183","_ref_7184","_ref_7185","_ref_7188","_ref_7189","_ref_7194","_ref_7195","_ref_7198","_ref_7199","_ref_7202","_ref_7203","_ref_7207","_ref_7208","_ref_7210","_ref_7213","_ref_7214","_ref_7225","_ref_7226","_ref_7239","_ref_7257","_ref_7260","_ref_7261","_ref_7262","_ref_7265","_ref_7270","_ref_7273","_ref_7278","_ref_7289","_ref_7301","_ref_7310","_ref_7312","_ref_7315","_ref_7317","_ref_7320","_ref_7322","_ref_7325","_ref_7327","_ref_7329","_ref_7335","_ref_7350","_ref_7355","_ref_7358","_ref_7381","_ref_7390","_ref_7394","_ref_7398","_ref_7399","_ref_7400","_ref_7401","_ref_7429","_ref_7612","_ref_7613","_ref_7640","_ref_7641","_ref_7649","_ref_7650","_ref_7651","_ref_7653","_ref_7654","_ref_7663","_ref_7665","_ref_7672","_ref_7673","_ref_7679","_ref_7680","_ref_7681","_ref_7707","_ref_7711","_ref_7712","_ref_7742","_ref_7746","_ref_7788","_ref_7799","_ref_7809","_ref_7822","_ref_7823","_ref_7864","_ref_7986","_ref_7987","_ref_7988","_ref_8001","_ref_8004","_ref_8010","_ref_8015","_ref_8074","_ref_8076","_ref_8079","_ref_8084","_ref_8087","_ref_8088","_ref_8090","_ref_8093","_ref_8115","_ref_8128","_ref_8136","_ref_8160","_ref_8161","_ref_8185","_ref_8186","_ref_8187","_ref_8198","_ref_8218","_ref_8290","_ref_8293","_ref_8294","_ref_8302","_ref_8303","_ref_8395","_ref_8402","_ref_8403","_ref_8406","_ref_8407","_ref_8408","_ref_8409","_ref_8415","_ref_8418","_ref_8419","_ref_8422","_ref_8427","_ref_8429","_ref_8430","_ref_8431","_ref_8434","_ref_8437","_ref_8449","_ref_8464","_ref_8467","_ref_8468","_ref_8475","_ref_8476","_ref_8486","_ref_8494","_ref_8504","_ref_8533","_ref_8725","_ref_8745","_ref_8752","_ref_8779"],"key":"The List and Record Specification Types"},{"type":"term","term":"Set","refId":"sec-set-and-relation-specification-type","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Set"},{"type":"term","term":"Relation","refId":"sec-set-and-relation-specification-type","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Relation"},{"type":"term","term":"strict partial order","refId":"sec-set-and-relation-specification-type","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"strict partial order"},{"type":"term","term":"strict total order","refId":"sec-set-and-relation-specification-type","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"strict total order"},{"type":"clause","id":"sec-set-and-relation-specification-type","aoid":null,"title":"The Set and Relation Specification Types","titleHTML":"The Set and Relation Specification Types","number":"6.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_8439","_ref_8442","_ref_8444","_ref_8446","_ref_8448","_ref_8491","_ref_8497","_ref_8508","_ref_8511","_ref_8515","_ref_8520","_ref_8542","_ref_8559","_ref_8560"],"key":"The Set and Relation Specification Types"},{"type":"term","term":"Completion Record","refId":"sec-completion-record-specification-type","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Completion Record"},{"type":"table","id":"table-8","number":8,"caption":"Table 8: Completion Record Fields","referencingIds":["_ref_123"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 8: Completion Record Fields"},{"type":"term","term":"abrupt completion","refId":"sec-completion-record-specification-type","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"abrupt completion"},{"type":"clause","id":"await-fulfilled","aoid":null,"title":"Await Fulfilled Functions","titleHTML":"Await Fulfilled Functions","number":"6.2.3.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_124"],"key":"Await Fulfilled Functions"},{"type":"clause","id":"await-rejected","aoid":null,"title":"Await Rejected Functions","titleHTML":"Await Rejected Functions","number":"6.2.3.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_125"],"key":"Await Rejected Functions"},{"type":"op","aoid":"Await","refId":"await","location":"","referencingIds":[],"key":"Await"},{"type":"clause","id":"await","aoid":"Await","title":"Await","titleHTML":"Await","number":"6.2.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1218","_ref_1230","_ref_1231","_ref_1232","_ref_1234","_ref_1235","_ref_1236","_ref_1237","_ref_1247","_ref_1248","_ref_1249","_ref_1250","_ref_1251","_ref_1261","_ref_1781","_ref_3134","_ref_3135","_ref_3860","_ref_3901","_ref_4172","_ref_4181","_ref_4193","_ref_4196","_ref_4291","_ref_4292","_ref_4295","_ref_4297","_ref_4333","_ref_8062","_ref_8069","_ref_8338"],"key":"Await"},{"type":"op","aoid":"NormalCompletion","refId":"sec-normalcompletion","location":"","referencingIds":[],"key":"NormalCompletion"},{"type":"clause","id":"sec-normalcompletion","aoid":"NormalCompletion","title":"NormalCompletion","titleHTML":"NormalCompletion","number":"6.2.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_894","_ref_904","_ref_1243","_ref_1262","_ref_1426","_ref_1837","_ref_1842","_ref_1847","_ref_1850","_ref_1852","_ref_1990","_ref_1998","_ref_2028","_ref_2189","_ref_2203","_ref_2436","_ref_2438","_ref_2452","_ref_2482","_ref_2483","_ref_2539","_ref_2543","_ref_2548","_ref_2592","_ref_3149","_ref_3540","_ref_3542","_ref_3545","_ref_3583","_ref_3587","_ref_3625","_ref_3626","_ref_3628","_ref_3629","_ref_3631","_ref_3649","_ref_3668","_ref_3683","_ref_3685","_ref_3699","_ref_3700","_ref_3712","_ref_3763","_ref_3772","_ref_3781","_ref_3784","_ref_3805","_ref_3863","_ref_3933","_ref_3939","_ref_3950","_ref_3957","_ref_3967","_ref_3968","_ref_3979","_ref_4001","_ref_4025","_ref_4047","_ref_4048","_ref_4061","_ref_4170","_ref_4289","_ref_4321","_ref_4322","_ref_4387","_ref_4410","_ref_4432","_ref_4441","_ref_4645","_ref_4682","_ref_4684","_ref_4685","_ref_4690","_ref_4739","_ref_4743","_ref_4748","_ref_4821","_ref_4860","_ref_7371","_ref_7416","_ref_7934","_ref_7944","_ref_7974","_ref_7979","_ref_8137","_ref_8143","_ref_8730","_ref_8743","_ref_8750","_ref_8762"],"key":"NormalCompletion"},{"type":"op","aoid":"ThrowCompletion","refId":"sec-throwcompletion","location":"","referencingIds":[],"key":"ThrowCompletion"},{"type":"clause","id":"sec-throwcompletion","aoid":"ThrowCompletion","title":"ThrowCompletion","titleHTML":"ThrowCompletion","number":"6.2.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_910","_ref_1257","_ref_1264","_ref_3983","_ref_6356","_ref_7162","_ref_7919","_ref_7983","_ref_8139"],"key":"ThrowCompletion"},{"type":"op","aoid":"UpdateEmpty","refId":"sec-updateempty","location":"","referencingIds":[],"key":"UpdateEmpty"},{"type":"clause","id":"sec-updateempty","aoid":"UpdateEmpty","title":"UpdateEmpty ( completionRecord, value )","titleHTML":"UpdateEmpty ( <var>completionRecord</var>, <var>value</var> )","number":"6.2.3.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3657","_ref_3769","_ref_3774","_ref_3778","_ref_3787","_ref_3808","_ref_3885","_ref_3887","_ref_3915","_ref_3938","_ref_3944","_ref_3949","_ref_3953","_ref_3956","_ref_3995","_ref_3997","_ref_3999","_ref_4689"],"key":"UpdateEmpty ( completionRecord, value )"},{"type":"op","aoid":"Completion","refId":"sec-completion-record-specification-type","location":"","referencingIds":[],"key":"Completion"},{"type":"clause","id":"sec-completion-record-specification-type","aoid":"Completion","title":"The Completion Record Specification Type","titleHTML":"The Completion Record Specification Type","number":"6.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_892","_ref_893","_ref_895","_ref_896","_ref_897","_ref_898","_ref_899","_ref_900","_ref_902","_ref_903","_ref_905","_ref_906","_ref_907","_ref_908","_ref_909","_ref_912","_ref_913","_ref_915","_ref_916","_ref_918","_ref_919","_ref_922","_ref_925","_ref_926","_ref_928","_ref_929","_ref_957","_ref_1208","_ref_1216","_ref_1229","_ref_1263","_ref_1265","_ref_1267","_ref_1268","_ref_1766","_ref_1768","_ref_1770","_ref_1771","_ref_1773","_ref_1777","_ref_1779","_ref_1782","_ref_1783","_ref_1785","_ref_1876","_ref_2218","_ref_2462","_ref_2610","_ref_2615","_ref_3247","_ref_3323","_ref_3549","_ref_3551","_ref_3556","_ref_3558","_ref_3559","_ref_3561","_ref_3563","_ref_3581","_ref_3585","_ref_3590","_ref_3593","_ref_3603","_ref_3606","_ref_3627","_ref_3630","_ref_3656","_ref_3715","_ref_3718","_ref_3725","_ref_3728","_ref_3734","_ref_3739","_ref_3746","_ref_3749","_ref_3768","_ref_3773","_ref_3777","_ref_3786","_ref_3796","_ref_3798","_ref_3801","_ref_3807","_ref_3851","_ref_3871","_ref_3877","_ref_3884","_ref_3894","_ref_3895","_ref_3896","_ref_3897","_ref_3898","_ref_3902","_ref_3914","_ref_3916","_ref_3936","_ref_3937","_ref_3942","_ref_3943","_ref_3947","_ref_3948","_ref_3951","_ref_3952","_ref_3954","_ref_3955","_ref_3980","_ref_3989","_ref_3991","_ref_3993","_ref_3994","_ref_3996","_ref_3998","_ref_4000","_ref_4072","_ref_4075","_ref_4080","_ref_4119","_ref_4188","_ref_4194","_ref_4200","_ref_4211","_ref_4275","_ref_4281","_ref_4283","_ref_4308","_ref_4310","_ref_4312","_ref_4342","_ref_4345","_ref_4351","_ref_4353","_ref_4355","_ref_4417","_ref_4434","_ref_4476","_ref_4491","_ref_4517","_ref_4662","_ref_4686","_ref_4688","_ref_4826","_ref_4856","_ref_4859","_ref_5237","_ref_5238","_ref_5437","_ref_5453","_ref_5454","_ref_6363","_ref_6366","_ref_6690","_ref_6904","_ref_6930","_ref_6933","_ref_6936","_ref_6939","_ref_6942","_ref_6945","_ref_6950","_ref_6966","_ref_6969","_ref_6972","_ref_7026","_ref_7054","_ref_7165","_ref_7168","_ref_7171","_ref_7246","_ref_7342","_ref_7917","_ref_7932","_ref_7948","_ref_7952","_ref_7961","_ref_7973","_ref_7981","_ref_7989","_ref_8017","_ref_8032","_ref_8051","_ref_8067","_ref_8068","_ref_8070","_ref_8072","_ref_8081","_ref_8083","_ref_8104","_ref_8142","_ref_8144","_ref_8147","_ref_8150","_ref_8152","_ref_8153","_ref_8164","_ref_8176","_ref_8179","_ref_8189","_ref_8194","_ref_8209","_ref_8212","_ref_8220","_ref_8223"],"key":"The Completion Record Specification Type"},{"type":"term","term":"Reference","refId":"sec-reference-specification-type","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Reference"},{"type":"term","term":"Super Reference","refId":"sec-reference-specification-type","referencingIds":["_ref_1270","_ref_3351"],"id":"super-reference","namespace":"https://tc39.github.io/ecma262/","location":"","key":"Super Reference"},{"type":"op","aoid":"GetBase","refId":"sec-getbase","location":"","referencingIds":[],"key":"GetBase"},{"type":"clause","id":"sec-getbase","aoid":"GetBase","title":"GetBase ( V )","titleHTML":"GetBase ( <var>V</var> )","number":"6.2.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1299","_ref_1314","_ref_1333","_ref_1341","_ref_3313","_ref_3399","_ref_3404"],"key":"GetBase ( V )"},{"type":"op","aoid":"GetReferencedName","refId":"sec-getreferencedname","location":"","referencingIds":[],"key":"GetReferencedName"},{"type":"clause","id":"sec-getreferencedname","aoid":"GetReferencedName","title":"GetReferencedName ( V )","titleHTML":"GetReferencedName ( <var>V</var> )","number":"6.2.4.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1305","_ref_1308","_ref_1319","_ref_1324","_ref_1328","_ref_1344","_ref_3295","_ref_3400","_ref_3405","_ref_3526","_ref_3596","_ref_3616"],"key":"GetReferencedName ( V )"},{"type":"op","aoid":"IsStrictReference","refId":"sec-isstrictreference","location":"","referencingIds":[],"key":"IsStrictReference"},{"type":"clause","id":"sec-isstrictreference","aoid":"IsStrictReference","title":"IsStrictReference ( V )","titleHTML":"IsStrictReference ( <var>V</var> )","number":"6.2.4.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1309","_ref_1316","_ref_1326","_ref_1329","_ref_3395","_ref_3401"],"key":"IsStrictReference ( V )"},{"type":"op","aoid":"HasPrimitiveBase","refId":"sec-hasprimitivebase","location":"","referencingIds":[],"key":"HasPrimitiveBase"},{"type":"clause","id":"sec-hasprimitivebase","aoid":"HasPrimitiveBase","title":"HasPrimitiveBase ( V )","titleHTML":"HasPrimitiveBase ( <var>V</var> )","number":"6.2.4.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1289","_ref_1302","_ref_1321"],"key":"HasPrimitiveBase ( V )"},{"type":"op","aoid":"IsPropertyReference","refId":"sec-ispropertyreference","location":"","referencingIds":[],"key":"IsPropertyReference"},{"type":"clause","id":"sec-ispropertyreference","aoid":"IsPropertyReference","title":"IsPropertyReference ( V )","titleHTML":"IsPropertyReference ( <var>V</var> )","number":"6.2.4.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1301","_ref_1320","_ref_1331","_ref_3294","_ref_3310","_ref_3396"],"key":"IsPropertyReference ( V )"},{"type":"op","aoid":"IsUnresolvableReference","refId":"sec-isunresolvablereference","location":"","referencingIds":[],"key":"IsUnresolvableReference"},{"type":"clause","id":"sec-isunresolvablereference","aoid":"IsUnresolvableReference","title":"IsUnresolvableReference ( V )","titleHTML":"IsUnresolvableReference ( <var>V</var> )","number":"6.2.4.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1300","_ref_1315","_ref_1340","_ref_3393","_ref_3412"],"key":"IsUnresolvableReference ( V )"},{"type":"op","aoid":"IsSuperReference","refId":"sec-issuperreference","location":"","referencingIds":[],"key":"IsSuperReference"},{"type":"clause","id":"sec-issuperreference","aoid":"IsSuperReference","title":"IsSuperReference ( V )","titleHTML":"IsSuperReference ( <var>V</var> )","number":"6.2.4.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1332","_ref_3397"],"key":"IsSuperReference ( V )"},{"type":"op","aoid":"GetValue","refId":"sec-getvalue","location":"","referencingIds":[],"key":"GetValue"},{"type":"clause","id":"sec-getvalue","aoid":"GetValue","title":"GetValue ( V )","titleHTML":"GetValue ( <var>V</var> )","number":"6.2.4.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3160","_ref_3166","_ref_3172","_ref_3203","_ref_3205","_ref_3208","_ref_3214","_ref_3231","_ref_3250","_ref_3253","_ref_3255","_ref_3261","_ref_3264","_ref_3270","_ref_3272","_ref_3273","_ref_3278","_ref_3286","_ref_3291","_ref_3304","_ref_3327","_ref_3354","_ref_3357","_ref_3362","_ref_3365","_ref_3368","_ref_3371","_ref_3378","_ref_3381","_ref_3384","_ref_3387","_ref_3408","_ref_3409","_ref_3413","_ref_3415","_ref_3417","_ref_3419","_ref_3421","_ref_3422","_ref_3423","_ref_3432","_ref_3433","_ref_3436","_ref_3437","_ref_3449","_ref_3450","_ref_3453","_ref_3454","_ref_3457","_ref_3458","_ref_3461","_ref_3462","_ref_3465","_ref_3466","_ref_3469","_ref_3470","_ref_3473","_ref_3474","_ref_3477","_ref_3478","_ref_3481","_ref_3482","_ref_3484","_ref_3485","_ref_3495","_ref_3496","_ref_3498","_ref_3499","_ref_3501","_ref_3502","_ref_3504","_ref_3505","_ref_3507","_ref_3508","_ref_3511","_ref_3513","_ref_3514","_ref_3516","_ref_3518","_ref_3519","_ref_3520","_ref_3527","_ref_3530","_ref_3531","_ref_3532","_ref_3570","_ref_3597","_ref_3617","_ref_3620","_ref_3621","_ref_3622","_ref_3675","_ref_3677","_ref_3688","_ref_3692","_ref_3721","_ref_3730","_ref_3756","_ref_3760","_ref_3764","_ref_3767","_ref_3771","_ref_3779","_ref_3782","_ref_3788","_ref_3803","_ref_3810","_ref_3850","_ref_3899","_ref_3908","_ref_3959","_ref_3961","_ref_3982","_ref_4079","_ref_4163","_ref_4168","_ref_4265","_ref_4332","_ref_4369","_ref_4370","_ref_4745","_ref_8728","_ref_8783"],"key":"GetValue ( V )"},{"type":"op","aoid":"PutValue","refId":"sec-putvalue","location":"","referencingIds":[],"key":"PutValue"},{"type":"clause","id":"sec-putvalue","aoid":"PutValue","title":"PutValue ( V, W )","titleHTML":"PutValue ( <var>V</var>, <var>W</var> )","number":"6.2.4.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_779","_ref_3142","_ref_3151","_ref_3379","_ref_3382","_ref_3385","_ref_3388","_ref_3528","_ref_3533","_ref_3571","_ref_3579","_ref_3599","_ref_3611","_ref_3619","_ref_3689","_ref_3695","_ref_3709","_ref_3711","_ref_3722","_ref_3736","_ref_3754","_ref_3761","_ref_3821","_ref_3873","_ref_4024","_ref_4069","_ref_8784"],"key":"PutValue ( V, W )"},{"type":"op","aoid":"GetThisValue","refId":"sec-getthisvalue","location":"","referencingIds":[],"key":"GetThisValue"},{"type":"clause","id":"sec-getthisvalue","aoid":"GetThisValue","title":"GetThisValue ( V )","titleHTML":"GetThisValue ( <var>V</var> )","number":"6.2.4.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1306","_ref_1325","_ref_3311"],"key":"GetThisValue ( V )"},{"type":"op","aoid":"InitializeReferencedBinding","refId":"sec-initializereferencedbinding","location":"","referencingIds":[],"key":"InitializeReferencedBinding"},{"type":"clause","id":"sec-initializereferencedbinding","aoid":"InitializeReferencedBinding","title":"InitializeReferencedBinding ( V, W )","titleHTML":"InitializeReferencedBinding ( <var>V</var>, <var>W</var> )","number":"6.2.4.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3671","_ref_3676","_ref_3710","_ref_3723","_ref_3737","_ref_3762","_ref_3872"],"key":"InitializeReferencedBinding ( V, W )"},{"type":"clause","id":"sec-reference-specification-type","aoid":null,"title":"The Reference Specification Type","titleHTML":"The Reference Specification Type","number":"6.2.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_815","_ref_1206","_ref_1275","_ref_1278","_ref_1281","_ref_1284","_ref_1288","_ref_1292","_ref_1295","_ref_1298","_ref_1313","_ref_1338","_ref_2017","_ref_2031","_ref_2033","_ref_2147","_ref_3155","_ref_3269","_ref_3277","_ref_3281","_ref_3293","_ref_3309","_ref_3315","_ref_3350","_ref_3375","_ref_3376","_ref_3392","_ref_3402","_ref_3411","_ref_3522","_ref_3523","_ref_8595","_ref_8617"],"key":"The Reference Specification Type"},{"type":"term","term":"Property Descriptor","refId":"sec-property-descriptor-specification-type","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Property Descriptor"},{"type":"op","aoid":"IsAccessorDescriptor","refId":"sec-isaccessordescriptor","location":"","referencingIds":[],"key":"IsAccessorDescriptor"},{"type":"clause","id":"sec-isaccessordescriptor","aoid":"IsAccessorDescriptor","title":"IsAccessorDescriptor ( Desc )","titleHTML":"IsAccessorDescriptor ( <var>Desc</var> )","number":"6.2.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1349","_ref_1668","_ref_2347","_ref_2348","_ref_2361","_ref_2375","_ref_2378","_ref_2767","_ref_2848","_ref_2907","_ref_3025","_ref_3039","_ref_8668","_ref_8671"],"key":"IsAccessorDescriptor ( Desc )"},{"type":"op","aoid":"IsDataDescriptor","refId":"sec-isdatadescriptor","location":"","referencingIds":[],"key":"IsDataDescriptor"},{"type":"clause","id":"sec-isdatadescriptor","aoid":"IsDataDescriptor","title":"IsDataDescriptor ( Desc )","titleHTML":"IsDataDescriptor ( <var>Desc</var> )","number":"6.2.5.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1350","_ref_1387","_ref_1674","_ref_1983","_ref_2332","_ref_2337","_ref_2338","_ref_2339","_ref_2344","_ref_2345","_ref_2359","_ref_2373","_ref_2764","_ref_3023","_ref_3037"],"key":"IsDataDescriptor ( Desc )"},{"type":"op","aoid":"IsGenericDescriptor","refId":"sec-isgenericdescriptor","location":"","referencingIds":[],"key":"IsGenericDescriptor"},{"type":"clause","id":"sec-isgenericdescriptor","aoid":"IsGenericDescriptor","title":"IsGenericDescriptor ( Desc )","titleHTML":"IsGenericDescriptor ( <var>Desc</var> )","number":"6.2.5.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1386","_ref_2331","_ref_2336"],"key":"IsGenericDescriptor ( Desc )"},{"type":"op","aoid":"FromPropertyDescriptor","refId":"sec-frompropertydescriptor","location":"","referencingIds":[],"key":"FromPropertyDescriptor"},{"type":"clause","id":"sec-frompropertydescriptor","aoid":"FromPropertyDescriptor","title":"FromPropertyDescriptor ( Desc )","titleHTML":"FromPropertyDescriptor ( <var>Desc</var> )","number":"6.2.5.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3000","_ref_4936","_ref_4941","_ref_8360"],"key":"FromPropertyDescriptor ( Desc )"},{"type":"op","aoid":"ToPropertyDescriptor","refId":"sec-topropertydescriptor","location":"","referencingIds":[],"key":"ToPropertyDescriptor"},{"type":"clause","id":"sec-topropertydescriptor","aoid":"ToPropertyDescriptor","title":"ToPropertyDescriptor ( Obj )","titleHTML":"ToPropertyDescriptor ( <var>Obj</var> )","number":"6.2.5.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2990","_ref_4911","_ref_4916","_ref_8353"],"key":"ToPropertyDescriptor ( Obj )"},{"type":"op","aoid":"CompletePropertyDescriptor","refId":"sec-completepropertydescriptor","location":"","referencingIds":[],"key":"CompletePropertyDescriptor"},{"type":"clause","id":"sec-completepropertydescriptor","aoid":"CompletePropertyDescriptor","title":"CompletePropertyDescriptor ( Desc )","titleHTML":"CompletePropertyDescriptor ( <var>Desc</var> )","number":"6.2.5.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_49","_ref_2991"],"key":"CompletePropertyDescriptor ( Desc )"},{"type":"clause","id":"sec-property-descriptor-specification-type","aoid":null,"title":"The Property Descriptor Specification Type","titleHTML":"The Property Descriptor Specification Type","number":"6.2.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_958","_ref_959","_ref_978","_ref_979","_ref_1209","_ref_1346","_ref_1347","_ref_1348","_ref_1351","_ref_1364","_ref_1382","_ref_1384","_ref_1627","_ref_2306","_ref_2319","_ref_2322","_ref_2324","_ref_2334","_ref_2370","_ref_2657","_ref_2697","_ref_2718","_ref_2762","_ref_2841","_ref_2904","_ref_2947","_ref_2994","_ref_3005"],"key":"The Property Descriptor Specification Type"},{"type":"clause","id":"sec-lexical-environment-and-environment-record-specification-types","aoid":null,"title":"The Lexical Environment and Environment Record Specification Types","titleHTML":"The Lexical Environment and Environment Record Specification Types","number":"6.2.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"The Lexical Environment and Environment Record Specification Types"},{"type":"term","term":"Data Block","refId":"sec-data-blocks","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Data Block"},{"type":"term","term":"Shared Data Block","refId":"sec-data-blocks","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Shared Data Block"},{"type":"op","aoid":"CreateByteDataBlock","refId":"sec-createbytedatablock","location":"","referencingIds":[],"key":"CreateByteDataBlock"},{"type":"clause","id":"sec-createbytedatablock","aoid":"CreateByteDataBlock","title":"CreateByteDataBlock ( size )","titleHTML":"CreateByteDataBlock ( <var>size</var> )","number":"6.2.7.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7363"],"key":"CreateByteDataBlock ( size )"},{"type":"op","aoid":"CreateSharedByteDataBlock","refId":"sec-createsharedbytedatablock","location":"","referencingIds":[],"key":"CreateSharedByteDataBlock"},{"type":"clause","id":"sec-createsharedbytedatablock","aoid":"CreateSharedByteDataBlock","title":"CreateSharedByteDataBlock ( size )","titleHTML":"CreateSharedByteDataBlock ( <var>size</var> )","number":"6.2.7.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7474"],"key":"CreateSharedByteDataBlock ( size )"},{"type":"op","aoid":"CopyDataBlockBytes","refId":"sec-copydatablockbytes","location":"","referencingIds":[],"key":"CopyDataBlockBytes"},{"type":"clause","id":"sec-copydatablockbytes","aoid":"CopyDataBlockBytes","title":"CopyDataBlockBytes ( toBlock, toIndex, fromBlock, fromIndex, count )","titleHTML":"CopyDataBlockBytes ( <var>toBlock</var>, <var>toIndex</var>, <var>fromBlock</var>, <var>fromIndex</var>, <var>count</var> )","number":"6.2.7.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7380","_ref_7470","_ref_7509"],"key":"CopyDataBlockBytes ( toBlock, toIndex, fromBlock, fromIndex, count )"},{"type":"clause","id":"sec-data-blocks","aoid":null,"title":"Data Blocks","titleHTML":"Data Blocks","number":"6.2.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1212","_ref_1399","_ref_1400","_ref_1402","_ref_1403","_ref_1409","_ref_1410","_ref_1414","_ref_1422","_ref_1425","_ref_6996","_ref_7372","_ref_7477","_ref_7479","_ref_7508","_ref_7578","_ref_7583","_ref_7585","_ref_8389","_ref_8398","_ref_8401","_ref_8405","_ref_8411","_ref_8517"],"key":"Data Blocks"},{"type":"clause","id":"sec-ecmascript-specification-types","aoid":null,"title":"ECMAScript Specification Types","titleHTML":"ECMAScript Specification Types","number":"6.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"ECMAScript Specification Types"},{"type":"op","aoid":"Type","refId":"sec-ecmascript-data-types-and-values","location":"","referencingIds":[],"key":"Type"},{"type":"clause","id":"sec-ecmascript-data-types-and-values","aoid":"Type","title":"ECMAScript Data Types and Values","titleHTML":"ECMAScript Data Types and Values","number":"6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3","_ref_4","_ref_46","_ref_1274","_ref_1277","_ref_1280","_ref_1283","_ref_1285","_ref_1287","_ref_1291","_ref_1294","_ref_1297","_ref_1312","_ref_1337","_ref_1363","_ref_1433","_ref_1436","_ref_1439","_ref_1441","_ref_1446","_ref_1504","_ref_1510","_ref_1520","_ref_1525","_ref_1528","_ref_1530","_ref_1531","_ref_1536","_ref_1537","_ref_1538","_ref_1542","_ref_1544","_ref_1546","_ref_1547","_ref_1548","_ref_1551","_ref_1552","_ref_1553","_ref_1557","_ref_1559","_ref_1560","_ref_1561","_ref_1562","_ref_1563","_ref_1564","_ref_1565","_ref_1570","_ref_1571","_ref_1576","_ref_1577","_ref_1579","_ref_1580","_ref_1582","_ref_1583","_ref_1585","_ref_1587","_ref_1589","_ref_1590","_ref_1592","_ref_1593","_ref_1595","_ref_1596","_ref_1597","_ref_1601","_ref_1609","_ref_1613","_ref_1615","_ref_1619","_ref_1623","_ref_1629","_ref_1633","_ref_1643","_ref_1647","_ref_1665","_ref_1671","_ref_1685","_ref_1691","_ref_1702","_ref_1704","_ref_1710","_ref_1712","_ref_1716","_ref_1719","_ref_1732","_ref_1748","_ref_1753","_ref_1755","_ref_1759","_ref_1764","_ref_1772","_ref_1775","_ref_1784","_ref_1787","_ref_1798","_ref_1868","_ref_1910","_ref_2045","_ref_2095","_ref_2183","_ref_2310","_ref_2311","_ref_2374","_ref_2402","_ref_2443","_ref_2470","_ref_2481","_ref_2486","_ref_2547","_ref_2551","_ref_2553","_ref_2554","_ref_2560","_ref_2640","_ref_2685","_ref_2727","_ref_2731","_ref_2733","_ref_2735","_ref_2741","_ref_2745","_ref_2827","_ref_2835","_ref_2845","_ref_2855","_ref_2863","_ref_2871","_ref_2873","_ref_2877","_ref_2883","_ref_2901","_ref_2905","_ref_2910","_ref_2916","_ref_2928","_ref_2942","_ref_2943","_ref_2950","_ref_2953","_ref_2958","_ref_2959","_ref_2961","_ref_2969","_ref_2976","_ref_2984","_ref_2987","_ref_2998","_ref_3010","_ref_3020","_ref_3033","_ref_3046","_ref_3052","_ref_3071","_ref_3080","_ref_3087","_ref_3089","_ref_3091","_ref_3147","_ref_3292","_ref_3308","_ref_3314","_ref_3317","_ref_3324","_ref_3336","_ref_3391","_ref_3410","_ref_3440","_ref_3441","_ref_3486","_ref_3489","_ref_3861","_ref_3892","_ref_4173","_ref_4182","_ref_4197","_ref_4269","_ref_4802","_ref_4902","_ref_4906","_ref_4914","_ref_4921","_ref_4930","_ref_4948","_ref_4952","_ref_4954","_ref_4956","_ref_4961","_ref_4963","_ref_4966","_ref_4967","_ref_4976","_ref_4986","_ref_5050","_ref_5054","_ref_5065","_ref_5066","_ref_5067","_ref_5089","_ref_5090","_ref_5092","_ref_5111","_ref_5117","_ref_5118","_ref_5120","_ref_5127","_ref_5129","_ref_5146","_ref_5179","_ref_5180","_ref_5182","_ref_5183","_ref_5194","_ref_5195","_ref_5197","_ref_5432","_ref_5435","_ref_5438","_ref_5473","_ref_5697","_ref_5702","_ref_5709","_ref_5717","_ref_5727","_ref_5748","_ref_5757","_ref_5792","_ref_5793","_ref_5795","_ref_5880","_ref_5882","_ref_5888","_ref_5924","_ref_5961","_ref_5965","_ref_6034","_ref_6092","_ref_6121","_ref_6125","_ref_6127","_ref_6131","_ref_6135","_ref_6162","_ref_6165","_ref_6167","_ref_6171","_ref_6185","_ref_6189","_ref_6192","_ref_6213","_ref_6216","_ref_6253","_ref_6264","_ref_6269","_ref_6300","_ref_6303","_ref_6306","_ref_6313","_ref_6333","_ref_6410","_ref_6693","_ref_6788","_ref_6792","_ref_6868","_ref_6872","_ref_6877","_ref_6897","_ref_6953","_ref_6976","_ref_6989","_ref_7037","_ref_7038","_ref_7042","_ref_7064","_ref_7066","_ref_7075","_ref_7092","_ref_7108","_ref_7126","_ref_7161","_ref_7181","_ref_7187","_ref_7192","_ref_7197","_ref_7201","_ref_7206","_ref_7212","_ref_7218","_ref_7222","_ref_7256","_ref_7259","_ref_7264","_ref_7268","_ref_7272","_ref_7277","_ref_7282","_ref_7286","_ref_7309","_ref_7311","_ref_7314","_ref_7316","_ref_7319","_ref_7321","_ref_7324","_ref_7326","_ref_7348","_ref_7349","_ref_7353","_ref_7354","_ref_7357","_ref_7359","_ref_7365","_ref_7367","_ref_7375","_ref_7407","_ref_7422","_ref_7442","_ref_7449","_ref_7453","_ref_7476","_ref_7492","_ref_7495","_ref_7510","_ref_7516","_ref_7527","_ref_7538","_ref_7541","_ref_7545","_ref_7572","_ref_7727","_ref_7743","_ref_7751","_ref_7752","_ref_7754","_ref_7756","_ref_7759","_ref_7762","_ref_7771","_ref_7776","_ref_7779","_ref_7781","_ref_7783","_ref_7830","_ref_7837","_ref_7845","_ref_7850","_ref_7857","_ref_7935","_ref_8054","_ref_8101","_ref_8129","_ref_8171","_ref_8204","_ref_8227","_ref_8233","_ref_8239","_ref_8251","_ref_8351","_ref_8354","_ref_8356","_ref_8358","_ref_8361","_ref_8362","_ref_8364","_ref_8365","_ref_8367","_ref_8368","_ref_8370","_ref_8371","_ref_8656","_ref_8657","_ref_8721","_ref_8722","_ref_8723","_ref_8729","_ref_8790","_ref_8792"],"key":"ECMAScript Data Types and Values"},{"type":"op","aoid":"OrdinaryToPrimitive","refId":"sec-ordinarytoprimitive","location":"","referencingIds":[],"key":"OrdinaryToPrimitive"},{"type":"clause","id":"sec-ordinarytoprimitive","aoid":"OrdinaryToPrimitive","title":"OrdinaryToPrimitive ( O, hint )","titleHTML":"OrdinaryToPrimitive ( <var>O</var>, <var>hint</var> )","number":"7.1.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1437","_ref_5749"],"key":"OrdinaryToPrimitive ( O, hint )"},{"type":"op","aoid":"ToPrimitive","refId":"sec-toprimitive","location":"","referencingIds":[],"key":"ToPrimitive"},{"type":"clause","id":"sec-toprimitive","aoid":"ToPrimitive","title":"ToPrimitive ( input [ , PreferredType ] )","titleHTML":"ToPrimitive ( <var>input</var> [ , <var>PreferredType</var> ] )","number":"7.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_944","_ref_1449","_ref_1489","_ref_1503","_ref_1566","_ref_1567","_ref_1568","_ref_1569","_ref_1591","_ref_1594","_ref_3438","_ref_3439","_ref_3447","_ref_5434","_ref_5696"],"key":"ToPrimitive ( input [ , PreferredType ] )"},{"type":"table","id":"table-10","number":9,"caption":"Table 9: ToBoolean Conversions","referencingIds":["_ref_134","_ref_772"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 9: ToBoolean Conversions"},{"type":"op","aoid":"ToBoolean","refId":"sec-toboolean","location":"","referencingIds":[],"key":"ToBoolean"},{"type":"clause","id":"sec-toboolean","aoid":"ToBoolean","title":"ToBoolean ( argument )","titleHTML":"ToBoolean ( <var>argument</var> )","number":"7.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_769","_ref_1366","_ref_1369","_ref_1374","_ref_1447","_ref_1540","_ref_1756","_ref_1869","_ref_2963","_ref_2971","_ref_2978","_ref_3001","_ref_3012","_ref_3035","_ref_3048","_ref_3420","_ref_3491","_ref_3512","_ref_3515","_ref_3517","_ref_3766","_ref_3770","_ref_3780","_ref_3783","_ref_3804","_ref_5083","_ref_6172","_ref_6174","_ref_6176","_ref_6178","_ref_6180","_ref_6182","_ref_6194","_ref_6197","_ref_6220","_ref_6222","_ref_6412","_ref_6443","_ref_6464","_ref_6474","_ref_6482","_ref_6660","_ref_6923","_ref_7513","_ref_7520"],"key":"ToBoolean ( argument )"},{"type":"table","id":"table-11","number":10,"caption":"Table 10: ToNumber Conversions","referencingIds":["_ref_135"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 10: ToNumber Conversions"},{"type":"production","id":"prod-StringNumericLiteral","name":"StringNumericLiteral","referencingIds":["_ref_8934","_ref_8957","_ref_8959","_ref_8960","_ref_8961","_ref_8962","_ref_8963","_ref_14826"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"StringNumericLiteral"},{"type":"production","id":"prod-StrWhiteSpace","name":"StrWhiteSpace","referencingIds":["_ref_8935","_ref_8936","_ref_8938","_ref_8940","_ref_8965","_ref_8966","_ref_8968"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"StrWhiteSpace"},{"type":"production","id":"prod-StrWhiteSpaceChar","name":"StrWhiteSpaceChar","referencingIds":["_ref_8939","_ref_14316","_ref_14319"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"StrWhiteSpaceChar"},{"type":"production","id":"prod-StrNumericLiteral","name":"StrNumericLiteral","referencingIds":["_ref_8937","_ref_8967","_ref_8969"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"StrNumericLiteral"},{"type":"production","id":"prod-StrDecimalLiteral","name":"StrDecimalLiteral","referencingIds":["_ref_8943","_ref_8970","_ref_8971","_ref_14317","_ref_14318"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"StrDecimalLiteral"},{"type":"production","id":"prod-StrUnsignedDecimalLiteral","name":"StrUnsignedDecimalLiteral","referencingIds":["_ref_8947","_ref_8948","_ref_8949","_ref_8978","_ref_8979","_ref_8980","_ref_8981","_ref_8982","_ref_8983","_ref_8984","_ref_9017"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"StrUnsignedDecimalLiteral"},{"type":"clause","id":"sec-runtime-semantics-mv-s","aoid":null,"title":"Runtime Semantics: MV","titleHTML":"Runtime Semantics: MV","number":"7.1.3.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: MV"},{"type":"clause","id":"sec-tonumber-applied-to-the-string-type","aoid":null,"title":"ToNumber Applied to the String Type","titleHTML":"ToNumber Applied to the String Type","number":"7.1.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_11","_ref_417","_ref_814"],"key":"ToNumber Applied to the String Type"},{"type":"op","aoid":"ToNumber","refId":"sec-tonumber","location":"","referencingIds":[],"key":"ToNumber"},{"type":"clause","id":"sec-tonumber","aoid":"ToNumber","title":"ToNumber ( argument )","titleHTML":"ToNumber ( <var>argument</var> )","number":"7.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1448","_ref_1450","_ref_1451","_ref_1452","_ref_1453","_ref_1454","_ref_1457","_ref_1462","_ref_1468","_ref_1472","_ref_1477","_ref_1481","_ref_1485","_ref_1500","_ref_1511","_ref_1574","_ref_1575","_ref_1581","_ref_1584","_ref_1586","_ref_1588","_ref_2700","_ref_2885","_ref_3377","_ref_3380","_ref_3383","_ref_3386","_ref_3414","_ref_3416","_ref_3424","_ref_3425","_ref_3434","_ref_3435","_ref_3445","_ref_3446","_ref_3451","_ref_3452","_ref_4861","_ref_4862","_ref_5175","_ref_5235","_ref_5236","_ref_5243","_ref_5245","_ref_5414","_ref_5415","_ref_5416","_ref_5417","_ref_5418","_ref_5419","_ref_5420","_ref_5439","_ref_5457","_ref_5458","_ref_5459","_ref_5460","_ref_5461","_ref_5462","_ref_5463","_ref_5521","_ref_5532","_ref_5534","_ref_5536","_ref_5545","_ref_5547","_ref_5549","_ref_5551","_ref_5560","_ref_5572","_ref_5574","_ref_5576","_ref_5586","_ref_5588","_ref_5598","_ref_5600","_ref_5610","_ref_5614","_ref_5623","_ref_5625","_ref_5627","_ref_5634","_ref_5636","_ref_5638","_ref_5640","_ref_5647","_ref_5657","_ref_5659","_ref_5661","_ref_5669","_ref_5671","_ref_5679","_ref_5681","_ref_5770","_ref_5837","_ref_6694","_ref_6907","_ref_6984","_ref_7039","_ref_7519","_ref_7687","_ref_7757","_ref_7777","_ref_8614","_ref_8615","_ref_8616","_ref_8707"],"key":"ToNumber ( argument )"},{"type":"op","aoid":"ToInteger","refId":"sec-tointeger","location":"","referencingIds":[],"key":"ToInteger"},{"type":"clause","id":"sec-tointeger","aoid":"ToInteger","title":"ToInteger ( argument )","titleHTML":"ToInteger ( <var>argument</var> )","number":"7.1.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1506","_ref_1515","_ref_2562","_ref_2730","_ref_5051","_ref_5181","_ref_5184","_ref_5202","_ref_5209","_ref_5218","_ref_5228","_ref_5383","_ref_5384","_ref_5385","_ref_5386","_ref_5390","_ref_5391","_ref_5392","_ref_5401","_ref_5421","_ref_5464","_ref_5772","_ref_5798","_ref_5801","_ref_5804","_ref_5816","_ref_5823","_ref_5830","_ref_5839","_ref_5866","_ref_5900","_ref_5901","_ref_5929","_ref_5935","_ref_5936","_ref_6238","_ref_6418","_ref_6421","_ref_6424","_ref_6448","_ref_6451","_ref_6487","_ref_6519","_ref_6530","_ref_6552","_ref_6639","_ref_6642","_ref_6706","_ref_6709","_ref_6884","_ref_6887","_ref_6890","_ref_6908","_ref_6911","_ref_6978","_ref_6991","_ref_7008","_ref_7011","_ref_7044","_ref_7047","_ref_7456","_ref_7459","_ref_7497","_ref_7500","_ref_7644","_ref_7658","_ref_7659","_ref_7667","_ref_7677","_ref_7702","_ref_7761","_ref_8674","_ref_8675","_ref_8709"],"key":"ToInteger ( argument )"},{"type":"op","aoid":"ToInt32","refId":"sec-toint32","location":"","referencingIds":[],"key":"ToInt32"},{"type":"clause","id":"sec-toint32","aoid":"ToInt32","title":"ToInt32 ( argument )","titleHTML":"ToInt32 ( <var>argument</var> )","number":"7.1.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1466","_ref_1467","_ref_3418","_ref_3455","_ref_3459","_ref_3509","_ref_3510","_ref_4865","_ref_6815","_ref_7686"],"key":"ToInt32 ( argument )"},{"type":"op","aoid":"ToUint32","refId":"sec-touint32","location":"","referencingIds":[],"key":"ToUint32"},{"type":"clause","id":"sec-touint32","aoid":"ToUint32","title":"ToUint32 ( argument )","titleHTML":"ToUint32 ( <var>argument</var> )","number":"7.1.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1461","_ref_1476","_ref_2654","_ref_2655","_ref_2665","_ref_2699","_ref_3163","_ref_3169","_ref_3178","_ref_3183","_ref_3188","_ref_3193","_ref_3456","_ref_3460","_ref_3463","_ref_3464","_ref_5239","_ref_5240","_ref_5241","_ref_5912","_ref_6278","_ref_6336","_ref_6816"],"key":"ToUint32 ( argument )"},{"type":"op","aoid":"ToInt16","refId":"sec-toint16","location":"","referencingIds":[],"key":"ToInt16"},{"type":"clause","id":"sec-toint16","aoid":"ToInt16","title":"ToInt16 ( argument )","titleHTML":"ToInt16 ( <var>argument</var> )","number":"7.1.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_6813"],"key":"ToInt16 ( argument )"},{"type":"op","aoid":"ToUint16","refId":"sec-touint16","location":"","referencingIds":[],"key":"ToUint16"},{"type":"clause","id":"sec-touint16","aoid":"ToUint16","title":"ToUint16 ( argument )","titleHTML":"ToUint16 ( <var>argument</var> )","number":"7.1.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_5766","_ref_6814"],"key":"ToUint16 ( argument )"},{"type":"op","aoid":"ToInt8","refId":"sec-toint8","location":"","referencingIds":[],"key":"ToInt8"},{"type":"clause","id":"sec-toint8","aoid":"ToInt8","title":"ToInt8 ( argument )","titleHTML":"ToInt8 ( <var>argument</var> )","number":"7.1.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_6810"],"key":"ToInt8 ( argument )"},{"type":"op","aoid":"ToUint8","refId":"sec-touint8","location":"","referencingIds":[],"key":"ToUint8"},{"type":"clause","id":"sec-touint8","aoid":"ToUint8","title":"ToUint8 ( argument )","titleHTML":"ToUint8 ( <var>argument</var> )","number":"7.1.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_6811"],"key":"ToUint8 ( argument )"},{"type":"op","aoid":"ToUint8Clamp","refId":"sec-touint8clamp","location":"","referencingIds":[],"key":"ToUint8Clamp"},{"type":"clause","id":"sec-touint8clamp","aoid":"ToUint8Clamp","title":"ToUint8Clamp ( argument )","titleHTML":"ToUint8Clamp ( <var>argument</var> )","number":"7.1.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_6812"],"key":"ToUint8Clamp ( argument )"},{"type":"table","id":"table-12","number":11,"caption":"Table 11: ToString Conversions","referencingIds":["_ref_143"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 11: ToString Conversions"},{"type":"op","aoid":"NumberToString","refId":"sec-tostring-applied-to-the-number-type","location":"","referencingIds":[],"key":"NumberToString"},{"type":"clause","id":"sec-tostring-applied-to-the-number-type","aoid":"NumberToString","title":"NumberToString ( m )","titleHTML":"NumberToString ( <var>m</var> )","number":"7.1.12.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_501","_ref_1488","_ref_1492"],"key":"NumberToString ( m )"},{"type":"op","aoid":"ToString","refId":"sec-tostring","location":"","referencingIds":[],"key":"ToString"},{"type":"clause","id":"sec-tostring","aoid":"ToString","title":"ToString ( argument )","titleHTML":"ToString ( <var>argument</var> )","number":"7.1.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1487","_ref_1490","_ref_1501","_ref_1505","_ref_1508","_ref_1513","_ref_1680","_ref_1689","_ref_2653","_ref_2706","_ref_2728","_ref_2789","_ref_2803","_ref_2808","_ref_2870","_ref_3162","_ref_3168","_ref_3177","_ref_3195","_ref_3202","_ref_3243","_ref_3256","_ref_3262","_ref_3265","_ref_3442","_ref_3443","_ref_3609","_ref_3742","_ref_3752","_ref_4863","_ref_4864","_ref_4877","_ref_4879","_ref_4881","_ref_4883","_ref_5006","_ref_5007","_ref_5009","_ref_5098","_ref_5101","_ref_5139","_ref_5148","_ref_5150","_ref_5159","_ref_5200","_ref_5211","_ref_5215","_ref_5217","_ref_5229","_ref_5451","_ref_5452","_ref_5759","_ref_5785","_ref_5786","_ref_5789","_ref_5797","_ref_5800","_ref_5803","_ref_5807","_ref_5809","_ref_5813","_ref_5815","_ref_5820","_ref_5822","_ref_5828","_ref_5829","_ref_5835","_ref_5836","_ref_5843","_ref_5844","_ref_5848","_ref_5852","_ref_5853","_ref_5855","_ref_5857","_ref_5860","_ref_5862","_ref_5865","_ref_5870","_ref_5871","_ref_5873","_ref_5875","_ref_5891","_ref_5895","_ref_5899","_ref_5910","_ref_5913","_ref_5920","_ref_5922","_ref_5926","_ref_5928","_ref_5934","_ref_5944","_ref_5951","_ref_5957","_ref_6099","_ref_6100","_ref_6120","_ref_6122","_ref_6159","_ref_6193","_ref_6202","_ref_6205","_ref_6217","_ref_6219","_ref_6227","_ref_6236","_ref_6244","_ref_6245","_ref_6249","_ref_6254","_ref_6270","_ref_6273","_ref_6289","_ref_6294","_ref_6296","_ref_6298","_ref_6304","_ref_6307","_ref_6309","_ref_6344","_ref_6358","_ref_6374","_ref_6385","_ref_6402","_ref_6406","_ref_6408","_ref_6428","_ref_6429","_ref_6440","_ref_6454","_ref_6461","_ref_6467","_ref_6472","_ref_6480","_ref_6490","_ref_6500","_ref_6511","_ref_6522","_ref_6533","_ref_6535","_ref_6540","_ref_6543","_ref_6544","_ref_6555","_ref_6557","_ref_6564","_ref_6573","_ref_6582","_ref_6588","_ref_6591","_ref_6599","_ref_6602","_ref_6610","_ref_6611","_ref_6627","_ref_6628","_ref_6634","_ref_6647","_ref_6651","_ref_6657","_ref_6666","_ref_6669","_ref_6676","_ref_6678","_ref_6696","_ref_6697","_ref_6700","_ref_6713","_ref_6717","_ref_6720","_ref_6721","_ref_6727","_ref_6728","_ref_6729","_ref_6735","_ref_6742","_ref_6743","_ref_6754","_ref_6755","_ref_6762","_ref_6799","_ref_6835","_ref_6844","_ref_6856","_ref_6915","_ref_6921","_ref_6927","_ref_6960","_ref_6983","_ref_7017","_ref_7020","_ref_7115","_ref_7122","_ref_7717","_ref_7732","_ref_7733","_ref_7735","_ref_7750","_ref_7753","_ref_7755","_ref_7758","_ref_7768","_ref_7778","_ref_7782","_ref_7813","_ref_8646","_ref_8651","_ref_8673","_ref_8681","_ref_8683"],"key":"ToString ( argument )"},{"type":"table","id":"table-13","number":12,"caption":"Table 12: ToObject Conversions","referencingIds":["_ref_144"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 12: ToObject Conversions"},{"type":"op","aoid":"ToObject","refId":"sec-toobject","location":"","referencingIds":[],"key":"ToObject"},{"type":"clause","id":"sec-toobject","aoid":"ToObject","title":"ToObject ( argument )","titleHTML":"ToObject ( <var>argument</var> )","number":"7.1.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1304","_ref_1323","_ref_1502","_ref_1518","_ref_1607","_ref_1735","_ref_2456","_ref_2457","_ref_3398","_ref_3852","_ref_3907","_ref_4892","_ref_4896","_ref_4898","_ref_4907","_ref_4918","_ref_4934","_ref_4937","_ref_4945","_ref_4950","_ref_4958","_ref_4968","_ref_4974","_ref_4977","_ref_4980","_ref_4982","_ref_4988","_ref_5043","_ref_5062","_ref_5695","_ref_5779","_ref_5780","_ref_5889","_ref_6368","_ref_6396","_ref_6415","_ref_6434","_ref_6436","_ref_6445","_ref_6456","_ref_6468","_ref_6476","_ref_6484","_ref_6501","_ref_6507","_ref_6516","_ref_6527","_ref_6537","_ref_6546","_ref_6549","_ref_6559","_ref_6569","_ref_6577","_ref_6584","_ref_6595","_ref_6606","_ref_6622","_ref_6636","_ref_6653","_ref_6663","_ref_6703","_ref_6737","_ref_6746","_ref_6751","_ref_6764","_ref_6840","_ref_6980","_ref_8624","_ref_8625","_ref_8626","_ref_8627","_ref_8654","_ref_8658","_ref_8662","_ref_8666","_ref_8669"],"key":"ToObject ( argument )"},{"type":"op","aoid":"ToPropertyKey","refId":"sec-topropertykey","location":"","referencingIds":[],"key":"ToPropertyKey"},{"type":"clause","id":"sec-topropertykey","aoid":"ToPropertyKey","title":"ToPropertyKey ( argument )","titleHTML":"ToPropertyKey ( <var>argument</var> )","number":"7.1.14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3204","_ref_3275","_ref_3328","_ref_3488","_ref_4915","_ref_4932","_ref_4935","_ref_4973","_ref_4979","_ref_8352","_ref_8355","_ref_8357","_ref_8359","_ref_8363","_ref_8369","_ref_8660","_ref_8664","_ref_8667","_ref_8670"],"key":"ToPropertyKey ( argument )"},{"type":"op","aoid":"ToLength","refId":"sec-tolength","location":"","referencingIds":[],"key":"ToLength"},{"type":"clause","id":"sec-tolength","aoid":"ToLength","title":"ToLength ( argument )","titleHTML":"ToLength ( <var>argument</var> )","number":"7.1.15","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1516","_ref_1686","_ref_5782","_ref_5856","_ref_5861","_ref_6136","_ref_6207","_ref_6229","_ref_6233","_ref_6284","_ref_6290","_ref_6369","_ref_6400","_ref_6416","_ref_6437","_ref_6446","_ref_6457","_ref_6469","_ref_6477","_ref_6485","_ref_6496","_ref_6502","_ref_6508","_ref_6517","_ref_6528","_ref_6538","_ref_6550","_ref_6560","_ref_6570","_ref_6578","_ref_6585","_ref_6596","_ref_6607","_ref_6623","_ref_6637","_ref_6654","_ref_6664","_ref_6704","_ref_6738","_ref_6752","_ref_6795","_ref_6841","_ref_6981","_ref_7119","_ref_7729","_ref_7747","_ref_7810"],"key":"ToLength ( argument )"},{"type":"op","aoid":"CanonicalNumericIndexString","refId":"sec-canonicalnumericindexstring","location":"","referencingIds":[],"key":"CanonicalNumericIndexString"},{"type":"clause","id":"sec-canonicalnumericindexstring","aoid":"CanonicalNumericIndexString","title":"CanonicalNumericIndexString ( argument )","titleHTML":"CanonicalNumericIndexString ( <var>argument</var> )","number":"7.1.16","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_36","_ref_2742","_ref_2828","_ref_2836","_ref_2846","_ref_2856","_ref_2864"],"key":"CanonicalNumericIndexString ( argument )"},{"type":"op","aoid":"ToIndex","refId":"sec-toindex","location":"","referencingIds":[],"key":"ToIndex"},{"type":"clause","id":"sec-toindex","aoid":"ToIndex","title":"ToIndex ( value )","titleHTML":"ToIndex ( <var>value</var> )","number":"7.1.17","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7076","_ref_7130","_ref_7132","_ref_7438","_ref_7484","_ref_7512","_ref_7518","_ref_7528","_ref_7530","_ref_7576"],"key":"ToIndex ( value )"},{"type":"clause","id":"sec-type-conversion","aoid":null,"title":"Type Conversion","titleHTML":"Type Conversion","number":"7.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_35"],"key":"Type Conversion"},{"type":"table","id":"table-14","number":13,"caption":"Table 13: RequireObjectCoercible Results","referencingIds":["_ref_149"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 13: RequireObjectCoercible Results"},{"type":"op","aoid":"RequireObjectCoercible","refId":"sec-requireobjectcoercible","location":"","referencingIds":[],"key":"RequireObjectCoercible"},{"type":"clause","id":"sec-requireobjectcoercible","aoid":"RequireObjectCoercible","title":"RequireObjectCoercible ( argument )","titleHTML":"RequireObjectCoercible ( <var>argument</var> )","number":"7.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1519","_ref_3274","_ref_3279","_ref_3349","_ref_3539","_ref_3541","_ref_3564","_ref_3566","_ref_3696","_ref_4923","_ref_4965","_ref_5796","_ref_5799","_ref_5802","_ref_5806","_ref_5812","_ref_5819","_ref_5827","_ref_5834","_ref_5842","_ref_5845","_ref_5851","_ref_5854","_ref_5859","_ref_5864","_ref_5867","_ref_5892","_ref_5898","_ref_5907","_ref_5925","_ref_5933","_ref_5943","_ref_5950","_ref_5956","_ref_8655","_ref_8672","_ref_8680"],"key":"RequireObjectCoercible ( argument )"},{"type":"op","aoid":"IsArray","refId":"sec-isarray","location":"","referencingIds":[],"key":"IsArray"},{"type":"clause","id":"sec-isarray","aoid":"IsArray","title":"IsArray ( argument )","titleHTML":"IsArray ( <var>argument</var> )","number":"7.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1523","_ref_2676","_ref_4983","_ref_6380","_ref_6413","_ref_6495","_ref_7728","_ref_7745","_ref_7785"],"key":"IsArray ( argument )"},{"type":"op","aoid":"IsCallable","refId":"sec-iscallable","location":"","referencingIds":[],"key":"IsCallable"},{"type":"clause","id":"sec-iscallable","aoid":"IsCallable","title":"IsCallable ( argument )","titleHTML":"IsCallable ( <var>argument</var> )","number":"7.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1378","_ref_1381","_ref_1444","_ref_1641","_ref_1655","_ref_1700","_ref_2400","_ref_3093","_ref_3318","_ref_3493","_ref_5036","_ref_5045","_ref_5057","_ref_5068","_ref_5872","_ref_6129","_ref_6218","_ref_6350","_ref_6439","_ref_6459","_ref_6471","_ref_6479","_ref_6504","_ref_6510","_ref_6562","_ref_6587","_ref_6598","_ref_6656","_ref_6662","_ref_6748","_ref_6831","_ref_6919","_ref_6958","_ref_7029","_ref_7156","_ref_7193","_ref_7241","_ref_7269","_ref_7337","_ref_7720","_ref_7744","_ref_7773","_ref_7784","_ref_8106","_ref_8121","_ref_8122","_ref_8158","_ref_8256","_ref_8265","_ref_8276","_ref_8291","_ref_8292","_ref_8343","_ref_8659","_ref_8663"],"key":"IsCallable ( argument )"},{"type":"op","aoid":"IsConstructor","refId":"sec-isconstructor","location":"","referencingIds":[],"key":"IsConstructor"},{"type":"clause","id":"sec-isconstructor","aoid":"IsConstructor","title":"IsConstructor ( argument )","titleHTML":"IsConstructor ( <var>argument</var> )","number":"7.2.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1661","_ref_1663","_ref_1714","_ref_2533","_ref_2636","_ref_2641","_ref_2679","_ref_2688","_ref_3082","_ref_3094","_ref_3289","_ref_3346","_ref_4267","_ref_6352","_ref_6371","_ref_6382","_ref_6830","_ref_6854","_ref_7377","_ref_8116","_ref_8183","_ref_8216","_ref_8255","_ref_8268","_ref_8279","_ref_8347","_ref_8348"],"key":"IsConstructor ( argument )"},{"type":"op","aoid":"IsExtensible","refId":"sec-isextensible-o","location":"","referencingIds":[],"key":"IsExtensible"},{"type":"clause","id":"sec-isextensible-o","aoid":"IsExtensible","title":"IsExtensible ( O )","titleHTML":"IsExtensible ( <var>O</var> )","number":"7.2.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1673","_ref_1979","_ref_1982","_ref_1989","_ref_2325","_ref_2954","_ref_2965","_ref_2988","_ref_2989","_ref_3003","_ref_3014","_ref_3056","_ref_3537","_ref_4953","_ref_6670"],"key":"IsExtensible ( O )"},{"type":"op","aoid":"IsInteger","refId":"sec-isinteger","location":"","referencingIds":[],"key":"IsInteger"},{"type":"clause","id":"sec-isinteger","aoid":"IsInteger","title":"IsInteger ( argument )","titleHTML":"IsInteger ( <var>argument</var> )","number":"7.2.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2743","_ref_2838","_ref_2847","_ref_2880","_ref_2887"],"key":"IsInteger ( argument )"},{"type":"op","aoid":"IsPropertyKey","refId":"sec-ispropertykey","location":"","referencingIds":[],"key":"IsPropertyKey"},{"type":"clause","id":"sec-ispropertykey","aoid":"IsPropertyKey","title":"IsPropertyKey ( argument )","titleHTML":"IsPropertyKey ( <var>argument</var> )","number":"7.2.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1603","_ref_1606","_ref_1611","_ref_1617","_ref_1621","_ref_1625","_ref_1631","_ref_1635","_ref_1639","_ref_1645","_ref_1649","_ref_1695","_ref_2318","_ref_2329","_ref_2353","_ref_2358","_ref_2367","_ref_2372","_ref_2382","_ref_2659","_ref_2714","_ref_2720","_ref_2740","_ref_2825","_ref_2833","_ref_2843","_ref_2854","_ref_2862","_ref_2915","_ref_2927","_ref_2982","_ref_2996","_ref_3008","_ref_3018","_ref_3031","_ref_3044"],"key":"IsPropertyKey ( argument )"},{"type":"op","aoid":"IsRegExp","refId":"sec-isregexp","location":"","referencingIds":[],"key":"IsRegExp"},{"type":"clause","id":"sec-isregexp","aoid":"IsRegExp","title":"IsRegExp ( argument )","titleHTML":"IsRegExp ( <var>argument</var> )","number":"7.2.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_5814","_ref_5821","_ref_5927","_ref_6088","_ref_6211"],"key":"IsRegExp ( argument )"},{"type":"op","aoid":"IsStringPrefix","refId":"sec-isstringprefix","location":"","referencingIds":[],"key":"IsStringPrefix"},{"type":"clause","id":"sec-isstringprefix","aoid":"IsStringPrefix","title":"IsStringPrefix ( p, q )","titleHTML":"IsStringPrefix ( <var>p</var>, <var>q</var> )","number":"7.2.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1572","_ref_1573"],"key":"IsStringPrefix ( p, q )"},{"type":"op","aoid":"SameValue","refId":"sec-samevalue","location":"","referencingIds":[],"key":"SameValue"},{"type":"clause","id":"sec-samevalue","aoid":"SameValue","title":"SameValue ( x, y )","titleHTML":"SameValue ( <var>x</var>, <var>y</var> )","number":"7.2.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_974","_ref_975","_ref_976","_ref_977","_ref_981","_ref_986","_ref_989","_ref_992","_ref_1512","_ref_1555","_ref_1599","_ref_1705","_ref_1738","_ref_2312","_ref_2313","_ref_2346","_ref_2349","_ref_2350","_ref_2637","_ref_2683","_ref_2777","_ref_2908","_ref_2944","_ref_2955","_ref_2966","_ref_2973","_ref_3024","_ref_3038","_ref_3296","_ref_3978","_ref_4602","_ref_4611","_ref_4615","_ref_4619","_ref_4622","_ref_4630","_ref_4951","_ref_4978","_ref_5103","_ref_5113","_ref_5771","_ref_6091","_ref_6168","_ref_6186","_ref_6190","_ref_6214","_ref_6256","_ref_6260","_ref_6265","_ref_6301","_ref_6314","_ref_6997","_ref_7001","_ref_7016","_ref_7101","_ref_7313","_ref_7318","_ref_7323","_ref_7328","_ref_7351","_ref_7356","_ref_7360","_ref_7370","_ref_7468","_ref_8099","_ref_8242"],"key":"SameValue ( x, y )"},{"type":"op","aoid":"SameValueZero","refId":"sec-samevaluezero","location":"","referencingIds":[],"key":"SameValueZero"},{"type":"clause","id":"sec-samevaluezero","aoid":"SameValueZero","title":"SameValueZero ( x, y )","titleHTML":"SameValueZero ( <var>x</var>, <var>y</var> )","number":"7.2.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1517","_ref_6515","_ref_6523","_ref_6524","_ref_7147","_ref_7190","_ref_7200","_ref_7204","_ref_7209","_ref_7233","_ref_7258","_ref_7266","_ref_7274"],"key":"SameValueZero ( x, y )"},{"type":"op","aoid":"SameValueNonNumber","refId":"sec-samevaluenonnumber","location":"","referencingIds":[],"key":"SameValueNonNumber"},{"type":"clause","id":"sec-samevaluenonnumber","aoid":"SameValueNonNumber","title":"SameValueNonNumber ( x, y )","titleHTML":"SameValueNonNumber ( <var>x</var>, <var>y</var> )","number":"7.2.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1549","_ref_1554","_ref_1598"],"key":"SameValueNonNumber ( x, y )"},{"type":"op","aoid":"Abstract Relational Comparison","refId":"sec-abstract-relational-comparison","location":"","referencingIds":[],"key":"Abstract Relational Comparison"},{"type":"clause","id":"sec-abstract-relational-comparison","aoid":"Abstract Relational Comparison","title":"Abstract Relational Comparison","titleHTML":"Abstract Relational Comparison","number":"7.2.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3448","_ref_3467","_ref_3471","_ref_3475","_ref_3479","_ref_5244","_ref_5246","_ref_6698","_ref_6699"],"key":"Abstract Relational Comparison"},{"type":"op","aoid":"Abstract Equality Comparison","refId":"sec-abstract-equality-comparison","location":"","referencingIds":[],"key":"Abstract Equality Comparison"},{"type":"clause","id":"sec-abstract-equality-comparison","aoid":"Abstract Equality Comparison","title":"Abstract Equality Comparison","titleHTML":"Abstract Equality Comparison","number":"7.2.14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_770","_ref_773","_ref_3497","_ref_3500"],"key":"Abstract Equality Comparison"},{"type":"op","aoid":"Strict Equality Comparison","refId":"sec-strict-equality-comparison","location":"","referencingIds":[],"key":"Strict Equality Comparison"},{"type":"clause","id":"sec-strict-equality-comparison","aoid":"Strict Equality Comparison","title":"Strict Equality Comparison","titleHTML":"Strict Equality Comparison","number":"7.2.15","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1550","_ref_1578","_ref_3503","_ref_3506","_ref_3960","_ref_6525","_ref_6526","_ref_6536","_ref_6548","_ref_6558"],"key":"Strict Equality Comparison"},{"type":"clause","id":"sec-testing-and-comparison-operations","aoid":null,"title":"Testing and Comparison Operations","titleHTML":"Testing and Comparison Operations","number":"7.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Testing and Comparison Operations"},{"type":"op","aoid":"Get","refId":"sec-get-o-p","location":"","referencingIds":[],"key":"Get"},{"type":"clause","id":"sec-get-o-p","aoid":"Get","title":"Get ( O, P )","titleHTML":"Get ( <var>O</var>, <var>P</var> )","number":"7.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1367","_ref_1370","_ref_1372","_ref_1375","_ref_1377","_ref_1380","_ref_1443","_ref_1539","_ref_1687","_ref_1690","_ref_1703","_ref_1711","_ref_1713","_ref_1720","_ref_1739","_ref_1757","_ref_1760","_ref_1867","_ref_1870","_ref_1890","_ref_2401","_ref_2678","_ref_2686","_ref_2760","_ref_2765","_ref_2774","_ref_4268","_ref_4900","_ref_4910","_ref_4985","_ref_5049","_ref_5053","_ref_5147","_ref_5149","_ref_5781","_ref_5783","_ref_5787","_ref_5890","_ref_6090","_ref_6093","_ref_6094","_ref_6128","_ref_6137","_ref_6173","_ref_6175","_ref_6177","_ref_6179","_ref_6181","_ref_6183","_ref_6195","_ref_6198","_ref_6203","_ref_6208","_ref_6221","_ref_6223","_ref_6228","_ref_6230","_ref_6234","_ref_6237","_ref_6239","_ref_6243","_ref_6246","_ref_6255","_ref_6259","_ref_6262","_ref_6274","_ref_6285","_ref_6291","_ref_6293","_ref_6308","_ref_6310","_ref_6370","_ref_6375","_ref_6401","_ref_6404","_ref_6411","_ref_6417","_ref_6431","_ref_6438","_ref_6442","_ref_6447","_ref_6458","_ref_6463","_ref_6470","_ref_6473","_ref_6478","_ref_6481","_ref_6486","_ref_6492","_ref_6497","_ref_6503","_ref_6509","_ref_6513","_ref_6518","_ref_6521","_ref_6529","_ref_6534","_ref_6539","_ref_6542","_ref_6551","_ref_6556","_ref_6561","_ref_6566","_ref_6571","_ref_6574","_ref_6579","_ref_6586","_ref_6590","_ref_6593","_ref_6597","_ref_6601","_ref_6604","_ref_6608","_ref_6613","_ref_6615","_ref_6624","_ref_6626","_ref_6630","_ref_6638","_ref_6649","_ref_6655","_ref_6659","_ref_6665","_ref_6705","_ref_6715","_ref_6723","_ref_6731","_ref_6739","_ref_6741","_ref_6747","_ref_6753","_ref_6757","_ref_6796","_ref_6800","_ref_6842","_ref_6845","_ref_6922","_ref_6961","_ref_6982","_ref_6985","_ref_7018","_ref_7120","_ref_7123","_ref_7154","_ref_7164","_ref_7167","_ref_7240","_ref_7302","_ref_7336","_ref_7726","_ref_7730","_ref_7748","_ref_7749","_ref_7770","_ref_7772","_ref_7811","_ref_8103","_ref_8241"],"key":"Get ( O, P )"},{"type":"op","aoid":"GetV","refId":"sec-getv","location":"","referencingIds":[],"key":"GetV"},{"type":"clause","id":"sec-getv","aoid":"GetV","title":"GetV ( V, P )","titleHTML":"GetV ( <var>V</var>, <var>P</var> )","number":"7.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1640","_ref_1697","_ref_1749","_ref_3568","_ref_3614","_ref_3755","_ref_3758"],"key":"GetV ( V, P )"},{"type":"op","aoid":"Set","refId":"sec-set-o-p-v-throw","location":"","referencingIds":[],"key":"Set"},{"type":"clause","id":"sec-set-o-p-v-throw","aoid":"Set","title":"Set ( O, P, V, Throw )","titleHTML":"Set ( <var>O</var>, <var>P</var>, <var>V</var>, <var>Throw</var> )","number":"7.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1318","_ref_1886","_ref_1997","_ref_2768","_ref_2779","_ref_3182","_ref_3187","_ref_3192","_ref_4901","_ref_6107","_ref_6138","_ref_6139","_ref_6142","_ref_6199","_ref_6210","_ref_6224","_ref_6232","_ref_6257","_ref_6261","_ref_6281","_ref_6337","_ref_6360","_ref_6378","_ref_6387","_ref_6409","_ref_6432","_ref_6455","_ref_6572","_ref_6576","_ref_6581","_ref_6583","_ref_6616","_ref_6617","_ref_6618","_ref_6621","_ref_6625","_ref_6631","_ref_6635","_ref_6652","_ref_6718","_ref_6724","_ref_6732","_ref_6734","_ref_6736","_ref_6758","_ref_6761","_ref_6763","_ref_6837","_ref_6847","_ref_6857","_ref_6916","_ref_6926","_ref_6963","_ref_7019","_ref_7116","_ref_7124"],"key":"Set ( O, P, V, Throw )"},{"type":"op","aoid":"CreateDataProperty","refId":"sec-createdataproperty","location":"","referencingIds":[],"key":"CreateDataProperty"},{"type":"clause","id":"sec-createdataproperty","aoid":"CreateDataProperty","title":"CreateDataProperty ( O, P, V )","titleHTML":"CreateDataProperty ( <var>O</var>, <var>P</var>, <var>V</var> )","number":"7.3.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1355","_ref_1356","_ref_1357","_ref_1358","_ref_1359","_ref_1360","_ref_1362","_ref_1626","_ref_1679","_ref_1740","_ref_1790","_ref_1791","_ref_2376","_ref_2788","_ref_2802","_ref_3161","_ref_3167","_ref_3176","_ref_3180","_ref_3608","_ref_3741","_ref_3751","_ref_4942","_ref_5914","_ref_5916","_ref_5919","_ref_5921","_ref_6147","_ref_6148","_ref_6149","_ref_6151","_ref_6158","_ref_6160","_ref_6204","_ref_6280","_ref_6288","_ref_6295","_ref_6297","_ref_6334","_ref_6345","_ref_6769","_ref_6770","_ref_6771","_ref_6772","_ref_6773","_ref_6774","_ref_6775","_ref_6776","_ref_6777","_ref_6778","_ref_7723","_ref_7734","_ref_7736","_ref_7739","_ref_7740","_ref_7765","_ref_8383","_ref_8384"],"key":"CreateDataProperty ( O, P, V )"},{"type":"op","aoid":"CreateMethodProperty","refId":"sec-createmethodproperty","location":"","referencingIds":[],"key":"CreateMethodProperty"},{"type":"clause","id":"sec-createmethodproperty","aoid":"CreateMethodProperty","title":"CreateMethodProperty ( O, P, V )","titleHTML":"CreateMethodProperty ( <var>O</var>, <var>P</var>, <var>V</var> )","number":"7.3.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_4279"],"key":"CreateMethodProperty ( O, P, V )"},{"type":"op","aoid":"CreateDataPropertyOrThrow","refId":"sec-createdatapropertyorthrow","location":"","referencingIds":[],"key":"CreateDataPropertyOrThrow"},{"type":"clause","id":"sec-createdatapropertyorthrow","aoid":"CreateDataPropertyOrThrow","title":"CreateDataPropertyOrThrow ( O, P, V )","titleHTML":"CreateDataPropertyOrThrow ( <var>O</var>, <var>P</var>, <var>V</var> )","number":"7.3.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3211","_ref_3217","_ref_4933","_ref_6365","_ref_6377","_ref_6386","_ref_6405","_ref_6407","_ref_6466","_ref_6499","_ref_6568","_ref_6650","_ref_6716","_ref_8733"],"key":"CreateDataPropertyOrThrow ( O, P, V )"},{"type":"op","aoid":"DefinePropertyOrThrow","refId":"sec-definepropertyorthrow","location":"","referencingIds":[],"key":"DefinePropertyOrThrow"},{"type":"clause","id":"sec-definepropertyorthrow","aoid":"DefinePropertyOrThrow","title":"DefinePropertyOrThrow ( O, P, desc )","titleHTML":"DefinePropertyOrThrow ( <var>O</var>, <var>P</var>, <var>desc</var> )","number":"7.3.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1667","_ref_1669","_ref_1874","_ref_1875","_ref_1995","_ref_2099","_ref_2525","_ref_2526","_ref_2537","_ref_2538","_ref_2557","_ref_2563","_ref_2737","_ref_2787","_ref_2790","_ref_2792","_ref_2804","_ref_2809","_ref_2811","_ref_4097","_ref_4104","_ref_4111","_ref_4124","_ref_4129","_ref_4139","_ref_4141","_ref_4148","_ref_4156","_ref_4216","_ref_4222","_ref_4231","_ref_4233","_ref_4240","_ref_4248","_ref_4319","_ref_4913","_ref_4917","_ref_5019","_ref_5022","_ref_5140","_ref_5160","_ref_6098","_ref_8661","_ref_8665"],"key":"DefinePropertyOrThrow ( O, P, desc )"},{"type":"op","aoid":"DeletePropertyOrThrow","refId":"sec-deletepropertyorthrow","location":"","referencingIds":[],"key":"DeletePropertyOrThrow"},{"type":"clause","id":"sec-deletepropertyorthrow","aoid":"DeletePropertyOrThrow","title":"DeletePropertyOrThrow ( O, P )","titleHTML":"DeletePropertyOrThrow ( <var>O</var>, <var>P</var> )","number":"7.3.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_6433","_ref_6575","_ref_6619","_ref_6620","_ref_6632","_ref_6633","_ref_6680","_ref_6684","_ref_6689","_ref_6725","_ref_6726","_ref_6733","_ref_6759"],"key":"DeletePropertyOrThrow ( O, P )"},{"type":"op","aoid":"GetMethod","refId":"sec-getmethod","location":"","referencingIds":[],"key":"GetMethod"},{"type":"clause","id":"sec-getmethod","aoid":"GetMethod","title":"GetMethod ( V, P )","titleHTML":"GetMethod ( <var>V</var>, <var>P</var> )","number":"7.3.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1434","_ref_1742","_ref_1743","_ref_1746","_ref_1767","_ref_1778","_ref_2951","_ref_2962","_ref_2970","_ref_2977","_ref_2985","_ref_2999","_ref_3011","_ref_3021","_ref_3034","_ref_3047","_ref_3053","_ref_3072","_ref_3083","_ref_3490","_ref_4179","_ref_4192","_ref_5846","_ref_5868","_ref_5893","_ref_5908","_ref_6351","_ref_6832","_ref_7112","_ref_7839","_ref_7852"],"key":"GetMethod ( V, P )"},{"type":"op","aoid":"HasProperty","refId":"sec-hasproperty","location":"","referencingIds":[],"key":"HasProperty"},{"type":"clause","id":"sec-hasproperty","aoid":"HasProperty","title":"HasProperty ( O, P )","titleHTML":"HasProperty ( <var>O</var>, <var>P</var> )","number":"7.3.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1365","_ref_1368","_ref_1371","_ref_1373","_ref_1376","_ref_1379","_ref_1866","_ref_1889","_ref_3487","_ref_6403","_ref_6430","_ref_6441","_ref_6462","_ref_6491","_ref_6512","_ref_6532","_ref_6554","_ref_6565","_ref_6589","_ref_6592","_ref_6600","_ref_6603","_ref_6612","_ref_6614","_ref_6629","_ref_6648","_ref_6658","_ref_6668","_ref_6714","_ref_6722","_ref_6730","_ref_6756"],"key":"HasProperty ( O, P )"},{"type":"op","aoid":"HasOwnProperty","refId":"sec-hasownproperty","location":"","referencingIds":[],"key":"HasOwnProperty"},{"type":"clause","id":"sec-hasownproperty","aoid":"HasOwnProperty","title":"HasOwnProperty ( O, P )","titleHTML":"HasOwnProperty ( <var>O</var>, <var>P</var> )","number":"7.3.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1964","_ref_1978","_ref_1988","_ref_2759","_ref_2763","_ref_2772","_ref_2778","_ref_2783","_ref_4975","_ref_5048","_ref_6681","_ref_6683","_ref_6686"],"key":"HasOwnProperty ( O, P )"},{"type":"op","aoid":"Call","refId":"sec-call","location":"","referencingIds":[],"key":"Call"},{"type":"clause","id":"sec-call","aoid":"Call","title":"Call ( F, V [ , argumentsList ] )","titleHTML":"Call ( <var>F</var>, <var>V</var> [ , <var>argumentsList</var> ] )","number":"7.3.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1435","_ref_1445","_ref_1698","_ref_1747","_ref_1751","_ref_1752","_ref_1769","_ref_1780","_ref_2362","_ref_2379","_ref_2632","_ref_2952","_ref_2964","_ref_2972","_ref_2979","_ref_2986","_ref_3002","_ref_3013","_ref_3022","_ref_3036","_ref_3049","_ref_3054","_ref_3073","_ref_3075","_ref_3086","_ref_3320","_ref_3492","_ref_3859","_ref_4171","_ref_4180","_ref_4195","_ref_4311","_ref_4354","_ref_5038","_ref_5041","_ref_5060","_ref_5847","_ref_5869","_ref_5874","_ref_5894","_ref_5909","_ref_6130","_ref_6248","_ref_6362","_ref_6376","_ref_6444","_ref_6465","_ref_6475","_ref_6483","_ref_6494","_ref_6514","_ref_6567","_ref_6594","_ref_6605","_ref_6661","_ref_6695","_ref_6750","_ref_6836","_ref_6846","_ref_6924","_ref_6962","_ref_7040","_ref_7170","_ref_7196","_ref_7245","_ref_7271","_ref_7341","_ref_7741","_ref_7774","_ref_7775","_ref_7831","_ref_7838","_ref_7842","_ref_7843","_ref_7846","_ref_7851","_ref_7854","_ref_7855","_ref_7858","_ref_8006","_ref_8011","_ref_8055","_ref_8082","_ref_8140","_ref_8145","_ref_8146","_ref_8149","_ref_8151","_ref_8163","_ref_8165","_ref_8192","_ref_8202","_ref_8229","_ref_8244","_ref_8266","_ref_8277","_ref_8328","_ref_8329","_ref_8331","_ref_8346"],"key":"Call ( F, V [ , argumentsList ] )"},{"type":"op","aoid":"Construct","refId":"sec-construct","location":"","referencingIds":[],"key":"Construct"},{"type":"clause","id":"sec-construct","aoid":"Construct","title":"Construct ( F [ , argumentsList [ , newTarget ] ] )","titleHTML":"Construct ( <var>F</var> [ , <var>argumentsList</var> [ , <var>newTarget</var> ] ] )","number":"7.3.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2638","_ref_2689","_ref_3084","_ref_3290","_ref_3339","_ref_6276","_ref_6353","_ref_6372","_ref_6383","_ref_7136","_ref_7465","_ref_7506","_ref_8120","_ref_8350"],"key":"Construct ( F [ , argumentsList [ , newTarget ] ] )"},{"type":"op","aoid":"SetIntegrityLevel","refId":"sec-setintegritylevel","location":"","referencingIds":[],"key":"SetIntegrityLevel"},{"type":"clause","id":"sec-setintegritylevel","aoid":"SetIntegrityLevel","title":"SetIntegrityLevel ( O, level )","titleHTML":"SetIntegrityLevel ( <var>O</var>, <var>level</var> )","number":"7.3.14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3244","_ref_3245","_ref_4922","_ref_4964"],"key":"SetIntegrityLevel ( O, level )"},{"type":"op","aoid":"TestIntegrityLevel","refId":"sec-testintegritylevel","location":"","referencingIds":[],"key":"TestIntegrityLevel"},{"type":"clause","id":"sec-testintegritylevel","aoid":"TestIntegrityLevel","title":"TestIntegrityLevel ( O, level )","titleHTML":"TestIntegrityLevel ( <var>O</var>, <var>level</var> )","number":"7.3.15","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_4955","_ref_4957"],"key":"TestIntegrityLevel ( O, level )"},{"type":"op","aoid":"CreateArrayFromList","refId":"sec-createarrayfromlist","location":"","referencingIds":[],"key":"CreateArrayFromList"},{"type":"clause","id":"sec-createarrayfromlist","aoid":"CreateArrayFromList","title":"CreateArrayFromList ( elements )","titleHTML":"CreateArrayFromList ( <var>elements</var> )","number":"7.3.16","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1722","_ref_3074","_ref_3085","_ref_4920","_ref_4949","_ref_4960","_ref_4970","_ref_6802","_ref_7228","_ref_7291","_ref_8191","_ref_8201","_ref_8366"],"key":"CreateArrayFromList ( elements )"},{"type":"op","aoid":"CreateListFromArrayLike","refId":"sec-createlistfromarraylike","location":"","referencingIds":[],"key":"CreateListFromArrayLike"},{"type":"clause","id":"sec-createlistfromarraylike","aoid":"CreateListFromArrayLike","title":"CreateListFromArrayLike ( obj [ , elementTypes ] )","titleHTML":"CreateListFromArrayLike ( <var>obj</var> [ , <var>elementTypes</var> ] )","number":"7.3.17","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3055","_ref_5039","_ref_8344","_ref_8349"],"key":"CreateListFromArrayLike ( obj [ , elementTypes ] )"},{"type":"op","aoid":"Invoke","refId":"sec-invoke","location":"","referencingIds":[],"key":"Invoke"},{"type":"clause","id":"sec-invoke","aoid":"Invoke","title":"Invoke ( V, P [ , argumentsList ] )","titleHTML":"Invoke ( <var>V</var>, <var>P</var> [ , <var>argumentsList</var> ] )","number":"7.3.18","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_4981","_ref_5698","_ref_5850","_ref_5897","_ref_6744","_ref_8196","_ref_8199","_ref_8225","_ref_8226","_ref_8249","_ref_8259","_ref_8270","_ref_8281"],"key":"Invoke ( V, P [ , argumentsList ] )"},{"type":"op","aoid":"OrdinaryHasInstance","refId":"sec-ordinaryhasinstance","location":"","referencingIds":[],"key":"OrdinaryHasInstance"},{"type":"clause","id":"sec-ordinaryhasinstance","aoid":"OrdinaryHasInstance","title":"OrdinaryHasInstance ( C, O )","titleHTML":"OrdinaryHasInstance ( <var>C</var>, <var>O</var> )","number":"7.3.19","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3494","_ref_5069"],"key":"OrdinaryHasInstance ( C, O )"},{"type":"op","aoid":"SpeciesConstructor","refId":"sec-speciesconstructor","location":"","referencingIds":[],"key":"SpeciesConstructor"},{"type":"clause","id":"sec-speciesconstructor","aoid":"SpeciesConstructor","title":"SpeciesConstructor ( O, defaultConstructor )","titleHTML":"SpeciesConstructor ( <var>O</var>, <var>defaultConstructor</var> )","number":"7.3.20","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_6271","_ref_7098","_ref_7141","_ref_7463","_ref_7504","_ref_8252","_ref_8283"],"key":"SpeciesConstructor ( O, defaultConstructor )"},{"type":"op","aoid":"EnumerableOwnPropertyNames","refId":"sec-enumerableownpropertynames","location":"","referencingIds":[],"key":"EnumerableOwnPropertyNames"},{"type":"clause","id":"sec-enumerableownpropertynames","aoid":"EnumerableOwnPropertyNames","title":"EnumerableOwnPropertyNames ( O, kind )","titleHTML":"EnumerableOwnPropertyNames ( <var>O</var>, <var>kind</var> )","number":"7.3.21","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_4919","_ref_4959","_ref_4969","_ref_7737","_ref_7798"],"key":"EnumerableOwnPropertyNames ( O, kind )"},{"type":"op","aoid":"GetFunctionRealm","refId":"sec-getfunctionrealm","location":"","referencingIds":[],"key":"GetFunctionRealm"},{"type":"clause","id":"sec-getfunctionrealm","aoid":"GetFunctionRealm","title":"GetFunctionRealm ( obj )","titleHTML":"GetFunctionRealm ( <var>obj</var> )","number":"7.3.22","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1726","_ref_1728","_ref_2403","_ref_2681"],"key":"GetFunctionRealm ( obj )"},{"type":"op","aoid":"CopyDataProperties","refId":"sec-copydataproperties","location":"","referencingIds":[],"key":"CopyDataProperties"},{"type":"clause","id":"sec-copydataproperties","aoid":"CopyDataProperties","title":"CopyDataProperties ( target, source, excludedItems )","titleHTML":"CopyDataProperties ( <var>target</var>, <var>source</var>, <var>excludedItems</var> )","number":"7.3.23","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3207","_ref_3578","_ref_3708"],"key":"CopyDataProperties ( target, source, excludedItems )"},{"type":"clause","id":"sec-operations-on-objects","aoid":null,"title":"Operations on Objects","titleHTML":"Operations on Objects","number":"7.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Operations on Objects"},{"type":"op","aoid":"GetIterator","refId":"sec-getiterator","location":"","referencingIds":[],"key":"GetIterator"},{"type":"clause","id":"sec-getiterator","aoid":"GetIterator","title":"GetIterator ( obj [ , hint [ , method ] ] )","titleHTML":"GetIterator ( <var>obj</var> [ , <var>hint</var> [ , <var>method</var> ] ] )","number":"7.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1744","_ref_3173","_ref_3358","_ref_3364","_ref_3543","_ref_3546","_ref_3548","_ref_3553","_ref_3555","_ref_3697","_ref_3855","_ref_4169","_ref_6355","_ref_6848","_ref_7158","_ref_7242","_ref_7338","_ref_7826","_ref_7865","_ref_8173","_ref_8206"],"key":"GetIterator ( obj [ , hint [ , method ] ] )"},{"type":"op","aoid":"IteratorNext","refId":"sec-iteratornext","location":"","referencingIds":[],"key":"IteratorNext"},{"type":"clause","id":"sec-iteratornext","aoid":"IteratorNext","title":"IteratorNext ( iteratorRecord [ , value ] )","titleHTML":"IteratorNext ( <var>iteratorRecord</var> [ , <var>value</var> ] )","number":"7.4.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1761","_ref_7832"],"key":"IteratorNext ( iteratorRecord [ , value ] )"},{"type":"op","aoid":"IteratorComplete","refId":"sec-iteratorcomplete","location":"","referencingIds":[],"key":"IteratorComplete"},{"type":"clause","id":"sec-iteratorcomplete","aoid":"IteratorComplete","title":"IteratorComplete ( iterResult )","titleHTML":"IteratorComplete ( <var>iterResult</var> )","number":"7.4.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1762","_ref_3862","_ref_4174","_ref_4183","_ref_4198","_ref_7866"],"key":"IteratorComplete ( iterResult )"},{"type":"op","aoid":"IteratorValue","refId":"sec-iteratorvalue","location":"","referencingIds":[],"key":"IteratorValue"},{"type":"clause","id":"sec-iteratorvalue","aoid":"IteratorValue","title":"IteratorValue ( iterResult )","titleHTML":"IteratorValue ( <var>iterResult</var> )","number":"7.4.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3175","_ref_3360","_ref_3367","_ref_3592","_ref_3605","_ref_3717","_ref_3727","_ref_3738","_ref_3748","_ref_3864","_ref_4074","_ref_4175","_ref_4177","_ref_4184","_ref_4186","_ref_4199","_ref_4202","_ref_4344","_ref_6361","_ref_6851","_ref_7160","_ref_7244","_ref_7340","_ref_7868","_ref_8193","_ref_8222"],"key":"IteratorValue ( iterResult )"},{"type":"op","aoid":"IteratorStep","refId":"sec-iteratorstep","location":"","referencingIds":[],"key":"IteratorStep"},{"type":"clause","id":"sec-iteratorstep","aoid":"IteratorStep","title":"IteratorStep ( iteratorRecord )","titleHTML":"IteratorStep ( <var>iteratorRecord</var> )","number":"7.4.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3174","_ref_3359","_ref_3366","_ref_3580","_ref_3584","_ref_3589","_ref_3602","_ref_3714","_ref_3724","_ref_3733","_ref_3745","_ref_4071","_ref_4341","_ref_6359","_ref_6850","_ref_7159","_ref_7243","_ref_7339","_ref_8188","_ref_8219"],"key":"IteratorStep ( iteratorRecord )"},{"type":"op","aoid":"IteratorClose","refId":"sec-iteratorclose","location":"","referencingIds":[],"key":"IteratorClose"},{"type":"clause","id":"sec-iteratorclose","aoid":"IteratorClose","title":"IteratorClose ( iteratorRecord, completion )","titleHTML":"IteratorClose ( <var>iteratorRecord</var>, <var>completion</var> )","number":"7.4.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3544","_ref_3547","_ref_3552","_ref_3554","_ref_3557","_ref_3562","_ref_3698","_ref_3881","_ref_3889","_ref_4190","_ref_6357","_ref_6364","_ref_6367","_ref_7163","_ref_7166","_ref_7169","_ref_7172","_ref_7247","_ref_7343","_ref_8177","_ref_8210"],"key":"IteratorClose ( iteratorRecord, completion )"},{"type":"op","aoid":"AsyncIteratorClose","refId":"sec-asynciteratorclose","location":"","referencingIds":[],"key":"AsyncIteratorClose"},{"type":"clause","id":"sec-asynciteratorclose","aoid":"AsyncIteratorClose","title":"AsyncIteratorClose ( iteratorRecord, completion )","titleHTML":"AsyncIteratorClose ( <var>iteratorRecord</var>, <var>completion</var> )","number":"7.4.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3879","_ref_3888","_ref_4189"],"key":"AsyncIteratorClose ( iteratorRecord, completion )"},{"type":"op","aoid":"CreateIterResultObject","refId":"sec-createiterresultobject","location":"","referencingIds":[],"key":"CreateIterResultObject"},{"type":"clause","id":"sec-createiterresultobject","aoid":"CreateIterResultObject","title":"CreateIterResultObject ( value, done )","titleHTML":"CreateIterResultObject ( <var>value</var>, <var>done</var> )","number":"7.4.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1800","_ref_1801","_ref_4161","_ref_4166","_ref_5966","_ref_5967","_ref_5969","_ref_6793","_ref_6797","_ref_6798","_ref_6803","_ref_7223","_ref_7229","_ref_7230","_ref_7287","_ref_7290","_ref_7292","_ref_7293","_ref_7841","_ref_7862","_ref_7933","_ref_7938","_ref_7951","_ref_8005"],"key":"CreateIterResultObject ( value, done )"},{"type":"clause","id":"sec-listiterator-next","aoid":null,"title":"ListIterator next ( )","titleHTML":"ListIterator next ( )","number":"7.4.9.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_153"],"key":"ListIterator next ( )"},{"type":"op","aoid":"CreateListIteratorRecord","refId":"sec-createlistiteratorRecord","location":"","referencingIds":[],"key":"CreateListIteratorRecord"},{"type":"clause","id":"sec-createlistiteratorRecord","aoid":"CreateListIteratorRecord","title":"CreateListIteratorRecord ( list )","titleHTML":"CreateListIteratorRecord ( <var>list</var> )","number":"7.4.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2579"],"key":"CreateListIteratorRecord ( list )"},{"type":"clause","id":"sec-operations-on-iterator-objects","aoid":null,"title":"Operations on Iterator Objects","titleHTML":"Operations on Iterator Objects","number":"7.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Operations on Iterator Objects"},{"type":"clause","id":"sec-abstract-operations","aoid":null,"title":"Abstract Operations","titleHTML":"Abstract Operations","number":"7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Abstract Operations"},{"type":"term","term":"Lexical Environment","refId":"sec-lexical-environments","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Lexical Environment"},{"type":"term","term":"EnvironmentRecord","refId":"sec-lexical-environments","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"EnvironmentRecord"},{"type":"term","term":"global environment","refId":"sec-lexical-environments","referencingIds":["_ref_1804","_ref_1805","_ref_1807","_ref_1810","_ref_2060","_ref_2061","_ref_2069","_ref_2152","_ref_4419"],"id":"global-environment","namespace":"https://tc39.github.io/ecma262/","location":"","key":"global environment"},{"type":"term","term":"module environment","refId":"sec-lexical-environments","referencingIds":["_ref_1809","_ref_4653"],"id":"module-environment","namespace":"https://tc39.github.io/ecma262/","location":"","key":"module environment"},{"type":"term","term":"function environment","refId":"sec-lexical-environments","referencingIds":["_ref_1812","_ref_1813"],"id":"function-environment","namespace":"https://tc39.github.io/ecma262/","location":"","key":"function environment"},{"type":"term","term":"Environment Record","refId":"sec-environment-records","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Environment Record"},{"type":"table","id":"table-15","number":14,"caption":"Table 14: Abstract Methods of Environment Records","referencingIds":["_ref_155","_ref_158","_ref_166"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 14: Abstract Methods of Environment Records"},{"type":"clause","id":"sec-declarative-environment-records-hasbinding-n","aoid":null,"title":"HasBinding ( N )","titleHTML":"HasBinding ( <var>N</var> )","number":"8.1.1.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"HasBinding ( N )"},{"type":"clause","id":"sec-declarative-environment-records-createmutablebinding-n-d","aoid":null,"title":"CreateMutableBinding ( N, D )","titleHTML":"CreateMutableBinding ( <var>N</var>, <var>D</var> )","number":"8.1.1.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"CreateMutableBinding ( N, D )"},{"type":"clause","id":"sec-declarative-environment-records-createimmutablebinding-n-s","aoid":null,"title":"CreateImmutableBinding ( N, S )","titleHTML":"CreateImmutableBinding ( <var>N</var>, <var>S</var> )","number":"8.1.1.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"CreateImmutableBinding ( N, S )"},{"type":"clause","id":"sec-declarative-environment-records-initializebinding-n-v","aoid":null,"title":"InitializeBinding ( N, V )","titleHTML":"InitializeBinding ( <var>N</var>, <var>V</var> )","number":"8.1.1.1.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"InitializeBinding ( N, V )"},{"type":"clause","id":"sec-declarative-environment-records-setmutablebinding-n-v-s","aoid":null,"title":"SetMutableBinding ( N, V, S )","titleHTML":"SetMutableBinding ( <var>N</var>, <var>V</var>, <var>S</var> )","number":"8.1.1.1.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"SetMutableBinding ( N, V, S )"},{"type":"clause","id":"sec-declarative-environment-records-getbindingvalue-n-s","aoid":null,"title":"GetBindingValue ( N, S )","titleHTML":"GetBindingValue ( <var>N</var>, <var>S</var> )","number":"8.1.1.1.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"GetBindingValue ( N, S )"},{"type":"clause","id":"sec-declarative-environment-records-deletebinding-n","aoid":null,"title":"DeleteBinding ( N )","titleHTML":"DeleteBinding ( <var>N</var> )","number":"8.1.1.1.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"DeleteBinding ( N )"},{"type":"clause","id":"sec-declarative-environment-records-hasthisbinding","aoid":null,"title":"HasThisBinding ( )","titleHTML":"HasThisBinding ( )","number":"8.1.1.1.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"HasThisBinding ( )"},{"type":"clause","id":"sec-declarative-environment-records-hassuperbinding","aoid":null,"title":"HasSuperBinding ( )","titleHTML":"HasSuperBinding ( )","number":"8.1.1.1.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"HasSuperBinding ( )"},{"type":"clause","id":"sec-declarative-environment-records-withbaseobject","aoid":null,"title":"WithBaseObject ( )","titleHTML":"WithBaseObject ( )","number":"8.1.1.1.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"WithBaseObject ( )"},{"type":"clause","id":"sec-declarative-environment-records","aoid":null,"title":"Declarative Environment Records","titleHTML":"Declarative Environment Records","number":"8.1.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Declarative Environment Records"},{"type":"clause","id":"sec-object-environment-records-hasbinding-n","aoid":null,"title":"HasBinding ( N )","titleHTML":"HasBinding ( <var>N</var> )","number":"8.1.1.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"HasBinding ( N )"},{"type":"clause","id":"sec-object-environment-records-createmutablebinding-n-d","aoid":null,"title":"CreateMutableBinding ( N, D )","titleHTML":"CreateMutableBinding ( <var>N</var>, <var>D</var> )","number":"8.1.1.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"CreateMutableBinding ( N, D )"},{"type":"clause","id":"sec-object-environment-records-createimmutablebinding-n-s","aoid":null,"title":"CreateImmutableBinding ( N, S )","titleHTML":"CreateImmutableBinding ( <var>N</var>, <var>S</var> )","number":"8.1.1.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"CreateImmutableBinding ( N, S )"},{"type":"clause","id":"sec-object-environment-records-initializebinding-n-v","aoid":null,"title":"InitializeBinding ( N, V )","titleHTML":"InitializeBinding ( <var>N</var>, <var>V</var> )","number":"8.1.1.2.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"InitializeBinding ( N, V )"},{"type":"clause","id":"sec-object-environment-records-setmutablebinding-n-v-s","aoid":null,"title":"SetMutableBinding ( N, V, S )","titleHTML":"SetMutableBinding ( <var>N</var>, <var>V</var>, <var>S</var> )","number":"8.1.1.2.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"SetMutableBinding ( N, V, S )"},{"type":"clause","id":"sec-object-environment-records-getbindingvalue-n-s","aoid":null,"title":"GetBindingValue ( N, S )","titleHTML":"GetBindingValue ( <var>N</var>, <var>S</var> )","number":"8.1.1.2.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"GetBindingValue ( N, S )"},{"type":"clause","id":"sec-object-environment-records-deletebinding-n","aoid":null,"title":"DeleteBinding ( N )","titleHTML":"DeleteBinding ( <var>N</var> )","number":"8.1.1.2.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"DeleteBinding ( N )"},{"type":"clause","id":"sec-object-environment-records-hasthisbinding","aoid":null,"title":"HasThisBinding ( )","titleHTML":"HasThisBinding ( )","number":"8.1.1.2.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"HasThisBinding ( )"},{"type":"clause","id":"sec-object-environment-records-hassuperbinding","aoid":null,"title":"HasSuperBinding ( )","titleHTML":"HasSuperBinding ( )","number":"8.1.1.2.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"HasSuperBinding ( )"},{"type":"clause","id":"sec-object-environment-records-withbaseobject","aoid":null,"title":"WithBaseObject ( )","titleHTML":"WithBaseObject ( )","number":"8.1.1.2.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"WithBaseObject ( )"},{"type":"clause","id":"sec-object-environment-records","aoid":null,"title":"Object Environment Records","titleHTML":"Object Environment Records","number":"8.1.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Object Environment Records"},{"type":"term","term":"function Environment Record","refId":"sec-function-environment-records","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"function Environment Record"},{"type":"table","id":"table-16","number":15,"caption":"Table 15: Additional Fields of Function Environment Records","referencingIds":["_ref_157"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 15: Additional Fields of Function Environment Records"},{"type":"table","id":"table-17","number":16,"caption":"Table 16: Additional Methods of Function Environment Records","referencingIds":["_ref_159"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 16: Additional Methods of Function Environment Records"},{"type":"clause","id":"sec-bindthisvalue","aoid":null,"title":"BindThisValue ( V )","titleHTML":"BindThisValue ( <var>V</var> )","number":"8.1.1.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"BindThisValue ( V )"},{"type":"clause","id":"sec-function-environment-records-hasthisbinding","aoid":null,"title":"HasThisBinding ( )","titleHTML":"HasThisBinding ( )","number":"8.1.1.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"HasThisBinding ( )"},{"type":"clause","id":"sec-function-environment-records-hassuperbinding","aoid":null,"title":"HasSuperBinding ( )","titleHTML":"HasSuperBinding ( )","number":"8.1.1.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"HasSuperBinding ( )"},{"type":"clause","id":"sec-function-environment-records-getthisbinding","aoid":null,"title":"GetThisBinding ( )","titleHTML":"GetThisBinding ( )","number":"8.1.1.3.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"GetThisBinding ( )"},{"type":"clause","id":"sec-getsuperbase","aoid":null,"title":"GetSuperBase ( )","titleHTML":"GetSuperBase ( )","number":"8.1.1.3.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"GetSuperBase ( )"},{"type":"clause","id":"sec-function-environment-records","aoid":null,"title":"Function Environment Records","titleHTML":"Function Environment Records","number":"8.1.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1902","_ref_1904","_ref_1905","_ref_1906","_ref_1908","_ref_2047","_ref_2460","_ref_2565","_ref_3343","_ref_4804"],"key":"Function Environment Records"},{"type":"table","id":"table-18","number":17,"caption":"Table 17: Additional Fields of Global Environment Records","referencingIds":["_ref_164"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 17: Additional Fields of Global Environment Records"},{"type":"table","id":"table-19","number":18,"caption":"Table 18: Additional Methods of Global Environment Records","referencingIds":["_ref_165"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 18: Additional Methods of Global Environment Records"},{"type":"clause","id":"sec-global-environment-records-hasbinding-n","aoid":null,"title":"HasBinding ( N )","titleHTML":"HasBinding ( <var>N</var> )","number":"8.1.1.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"HasBinding ( N )"},{"type":"clause","id":"sec-global-environment-records-createmutablebinding-n-d","aoid":null,"title":"CreateMutableBinding ( N, D )","titleHTML":"CreateMutableBinding ( <var>N</var>, <var>D</var> )","number":"8.1.1.4.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"CreateMutableBinding ( N, D )"},{"type":"clause","id":"sec-global-environment-records-createimmutablebinding-n-s","aoid":null,"title":"CreateImmutableBinding ( N, S )","titleHTML":"CreateImmutableBinding ( <var>N</var>, <var>S</var> )","number":"8.1.1.4.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"CreateImmutableBinding ( N, S )"},{"type":"clause","id":"sec-global-environment-records-initializebinding-n-v","aoid":null,"title":"InitializeBinding ( N, V )","titleHTML":"InitializeBinding ( <var>N</var>, <var>V</var> )","number":"8.1.1.4.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"InitializeBinding ( N, V )"},{"type":"clause","id":"sec-global-environment-records-setmutablebinding-n-v-s","aoid":null,"title":"SetMutableBinding ( N, V, S )","titleHTML":"SetMutableBinding ( <var>N</var>, <var>V</var>, <var>S</var> )","number":"8.1.1.4.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"SetMutableBinding ( N, V, S )"},{"type":"clause","id":"sec-global-environment-records-getbindingvalue-n-s","aoid":null,"title":"GetBindingValue ( N, S )","titleHTML":"GetBindingValue ( <var>N</var>, <var>S</var> )","number":"8.1.1.4.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"GetBindingValue ( N, S )"},{"type":"clause","id":"sec-global-environment-records-deletebinding-n","aoid":null,"title":"DeleteBinding ( N )","titleHTML":"DeleteBinding ( <var>N</var> )","number":"8.1.1.4.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"DeleteBinding ( N )"},{"type":"clause","id":"sec-global-environment-records-hasthisbinding","aoid":null,"title":"HasThisBinding ( )","titleHTML":"HasThisBinding ( )","number":"8.1.1.4.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"HasThisBinding ( )"},{"type":"clause","id":"sec-global-environment-records-hassuperbinding","aoid":null,"title":"HasSuperBinding ( )","titleHTML":"HasSuperBinding ( )","number":"8.1.1.4.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"HasSuperBinding ( )"},{"type":"clause","id":"sec-global-environment-records-withbaseobject","aoid":null,"title":"WithBaseObject ( )","titleHTML":"WithBaseObject ( )","number":"8.1.1.4.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"WithBaseObject ( )"},{"type":"clause","id":"sec-global-environment-records-getthisbinding","aoid":null,"title":"GetThisBinding ( )","titleHTML":"GetThisBinding ( )","number":"8.1.1.4.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"GetThisBinding ( )"},{"type":"clause","id":"sec-hasvardeclaration","aoid":null,"title":"HasVarDeclaration ( N )","titleHTML":"HasVarDeclaration ( <var>N</var> )","number":"8.1.1.4.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"HasVarDeclaration ( N )"},{"type":"clause","id":"sec-haslexicaldeclaration","aoid":null,"title":"HasLexicalDeclaration ( N )","titleHTML":"HasLexicalDeclaration ( <var>N</var> )","number":"8.1.1.4.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"HasLexicalDeclaration ( N )"},{"type":"clause","id":"sec-hasrestrictedglobalproperty","aoid":null,"title":"HasRestrictedGlobalProperty ( N )","titleHTML":"HasRestrictedGlobalProperty ( <var>N</var> )","number":"8.1.1.4.14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"HasRestrictedGlobalProperty ( N )"},{"type":"clause","id":"sec-candeclareglobalvar","aoid":null,"title":"CanDeclareGlobalVar ( N )","titleHTML":"CanDeclareGlobalVar ( <var>N</var> )","number":"8.1.1.4.15","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_800"],"key":"CanDeclareGlobalVar ( N )"},{"type":"clause","id":"sec-candeclareglobalfunction","aoid":null,"title":"CanDeclareGlobalFunction ( N )","titleHTML":"CanDeclareGlobalFunction ( <var>N</var> )","number":"8.1.1.4.16","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"CanDeclareGlobalFunction ( N )"},{"type":"clause","id":"sec-createglobalvarbinding","aoid":null,"title":"CreateGlobalVarBinding ( N, D )","titleHTML":"CreateGlobalVarBinding ( <var>N</var>, <var>D</var> )","number":"8.1.1.4.17","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"CreateGlobalVarBinding ( N, D )"},{"type":"clause","id":"sec-createglobalfunctionbinding","aoid":null,"title":"CreateGlobalFunctionBinding ( N, V, D )","titleHTML":"CreateGlobalFunctionBinding ( <var>N</var>, <var>V</var>, <var>D</var> )","number":"8.1.1.4.18","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_801"],"key":"CreateGlobalFunctionBinding ( N, V, D )"},{"type":"clause","id":"sec-global-environment-records","aoid":null,"title":"Global Environment Records","titleHTML":"Global Environment Records","number":"8.1.1.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Global Environment Records"},{"type":"table","id":"table-20","number":19,"caption":"Table 19: Additional Methods of Module Environment Records","referencingIds":["_ref_167"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 19: Additional Methods of Module Environment Records"},{"type":"clause","id":"sec-module-environment-records-getbindingvalue-n-s","aoid":null,"title":"GetBindingValue ( N, S )","titleHTML":"GetBindingValue ( <var>N</var>, <var>S</var> )","number":"8.1.1.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"GetBindingValue ( N, S )"},{"type":"clause","id":"sec-module-environment-records-deletebinding-n","aoid":null,"title":"DeleteBinding ( N )","titleHTML":"DeleteBinding ( <var>N</var> )","number":"8.1.1.5.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"DeleteBinding ( N )"},{"type":"clause","id":"sec-module-environment-records-hasthisbinding","aoid":null,"title":"HasThisBinding ( )","titleHTML":"HasThisBinding ( )","number":"8.1.1.5.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"HasThisBinding ( )"},{"type":"clause","id":"sec-module-environment-records-getthisbinding","aoid":null,"title":"GetThisBinding ( )","titleHTML":"GetThisBinding ( )","number":"8.1.1.5.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"GetThisBinding ( )"},{"type":"clause","id":"sec-createimportbinding","aoid":null,"title":"CreateImportBinding ( N, M, N2 )","titleHTML":"CreateImportBinding ( <var>N</var>, <var>M</var>, <var>N2</var> )","number":"8.1.1.5.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"CreateImportBinding ( N, M, N2 )"},{"type":"clause","id":"sec-module-environment-records","aoid":null,"title":"Module Environment Records","titleHTML":"Module Environment Records","number":"8.1.1.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Module Environment Records"},{"type":"clause","id":"sec-environment-records","aoid":null,"title":"Environment Records","titleHTML":"Environment Records","number":"8.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_126","_ref_127","_ref_1211","_ref_1269","_ref_1271","_ref_1307","_ref_1327","_ref_1343","_ref_1389","_ref_1802","_ref_1803","_ref_1814","_ref_1816","_ref_1817","_ref_1818","_ref_1819","_ref_1821","_ref_1823","_ref_1825","_ref_1826","_ref_1827","_ref_1828","_ref_1829","_ref_1830","_ref_1831","_ref_1832","_ref_1833","_ref_1834","_ref_1835","_ref_1838","_ref_1839","_ref_1840","_ref_1843","_ref_1844","_ref_1848","_ref_1849","_ref_1853","_ref_1854","_ref_1856","_ref_1857","_ref_1859","_ref_1860","_ref_1861","_ref_1862","_ref_1863","_ref_1864","_ref_1865","_ref_1871","_ref_1872","_ref_1873","_ref_1877","_ref_1878","_ref_1879","_ref_1882","_ref_1883","_ref_1884","_ref_1885","_ref_1887","_ref_1888","_ref_1891","_ref_1892","_ref_1893","_ref_1894","_ref_1896","_ref_1897","_ref_1898","_ref_1899","_ref_1900","_ref_1901","_ref_1911","_ref_1913","_ref_1915","_ref_1916","_ref_1917","_ref_1918","_ref_1922","_ref_1923","_ref_1924","_ref_1925","_ref_1926","_ref_1928","_ref_1929","_ref_1931","_ref_1932","_ref_1935","_ref_1939","_ref_1940","_ref_1941","_ref_1943","_ref_1945","_ref_1947","_ref_1948","_ref_1949","_ref_1950","_ref_1951","_ref_1952","_ref_1953","_ref_1954","_ref_1955","_ref_1957","_ref_1958","_ref_1959","_ref_1960","_ref_1961","_ref_1962","_ref_1963","_ref_1965","_ref_1966","_ref_1967","_ref_1968","_ref_1969","_ref_1970","_ref_1972","_ref_1975","_ref_1977","_ref_1980","_ref_1981","_ref_1984","_ref_1985","_ref_1987","_ref_1991","_ref_1992","_ref_1994","_ref_2000","_ref_2001","_ref_2002","_ref_2003","_ref_2004","_ref_2006","_ref_2007","_ref_2008","_ref_2010","_ref_2014","_ref_2018","_ref_2019","_ref_2020","_ref_2022","_ref_2023","_ref_2037","_ref_2041","_ref_2050","_ref_2051","_ref_2052","_ref_2057","_ref_2148","_ref_2455","_ref_2566","_ref_2567","_ref_2568","_ref_2581","_ref_2586","_ref_2589","_ref_2797","_ref_2812","_ref_2816","_ref_3312","_ref_3403","_ref_3658","_ref_3659","_ref_3664","_ref_3691","_ref_3824","_ref_3903","_ref_4030","_ref_4036","_ref_4423","_ref_4473","_ref_4839","_ref_4842","_ref_4847","_ref_4849","_ref_4850","_ref_4854","_ref_4857","_ref_8755","_ref_8756","_ref_8757","_ref_8770","_ref_8771"],"key":"Environment Records"},{"type":"op","aoid":"GetIdentifierReference","refId":"sec-getidentifierreference","location":"","referencingIds":[],"key":"GetIdentifierReference"},{"type":"clause","id":"sec-getidentifierreference","aoid":"GetIdentifierReference","title":"GetIdentifierReference ( lex, name, strict )","titleHTML":"GetIdentifierReference ( <var>lex</var>, <var>name</var>, <var>strict</var> )","number":"8.1.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2034","_ref_2146"],"key":"GetIdentifierReference ( lex, name, strict )"},{"type":"op","aoid":"NewDeclarativeEnvironment","refId":"sec-newdeclarativeenvironment","location":"","referencingIds":[],"key":"NewDeclarativeEnvironment"},{"type":"clause","id":"sec-newdeclarativeenvironment","aoid":"NewDeclarativeEnvironment","title":"NewDeclarativeEnvironment ( E )","titleHTML":"NewDeclarativeEnvironment ( <var>E</var> )","number":"8.1.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2582","_ref_2585","_ref_3651","_ref_3793","_ref_3814","_ref_3846","_ref_3867","_ref_3963","_ref_3986","_ref_4029","_ref_4035","_ref_4055","_ref_4151","_ref_4243","_ref_4259","_ref_4328","_ref_4814","_ref_4815"],"key":"NewDeclarativeEnvironment ( E )"},{"type":"op","aoid":"NewObjectEnvironment","refId":"sec-newobjectenvironment","location":"","referencingIds":[],"key":"NewObjectEnvironment"},{"type":"clause","id":"sec-newobjectenvironment","aoid":"NewObjectEnvironment","title":"NewObjectEnvironment ( O, E )","titleHTML":"NewObjectEnvironment ( <var>O</var>, <var>E</var> )","number":"8.1.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3910"],"key":"NewObjectEnvironment ( O, E )"},{"type":"op","aoid":"NewFunctionEnvironment","refId":"sec-newfunctionenvironment","location":"","referencingIds":[],"key":"NewFunctionEnvironment"},{"type":"clause","id":"sec-newfunctionenvironment","aoid":"NewFunctionEnvironment","title":"NewFunctionEnvironment ( F, newTarget )","titleHTML":"NewFunctionEnvironment ( <var>F</var>, <var>newTarget</var> )","number":"8.1.2.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2447"],"key":"NewFunctionEnvironment ( F, newTarget )"},{"type":"op","aoid":"NewGlobalEnvironment","refId":"sec-newglobalenvironment","location":"","referencingIds":[],"key":"NewGlobalEnvironment"},{"type":"clause","id":"sec-newglobalenvironment","aoid":"NewGlobalEnvironment","title":"NewGlobalEnvironment ( G, thisValue )","titleHTML":"NewGlobalEnvironment ( <var>G</var>, <var>thisValue</var> )","number":"8.1.2.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2096"],"key":"NewGlobalEnvironment ( G, thisValue )"},{"type":"op","aoid":"NewModuleEnvironment","refId":"sec-newmoduleenvironment","location":"","referencingIds":[],"key":"NewModuleEnvironment"},{"type":"clause","id":"sec-newmoduleenvironment","aoid":"NewModuleEnvironment","title":"NewModuleEnvironment ( E )","titleHTML":"NewModuleEnvironment ( <var>E</var> )","number":"8.1.2.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_4639"],"key":"NewModuleEnvironment ( E )"},{"type":"clause","id":"sec-lexical-environment-operations","aoid":null,"title":"Lexical Environment Operations","titleHTML":"Lexical Environment Operations","number":"8.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Lexical Environment Operations"},{"type":"clause","id":"sec-lexical-environments","aoid":null,"title":"Lexical Environments","titleHTML":"Lexical Environments","number":"8.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_131","_ref_1210","_ref_1388","_ref_2012","_ref_2030","_ref_2032","_ref_2035","_ref_2036","_ref_2038","_ref_2039","_ref_2040","_ref_2042","_ref_2046","_ref_2048","_ref_2049","_ref_2054","_ref_2055","_ref_2056","_ref_2058","_ref_2068","_ref_2127","_ref_2129","_ref_2130","_ref_2141","_ref_2144","_ref_2150","_ref_2413","_ref_2414","_ref_2453","_ref_2458","_ref_2477","_ref_2493","_ref_2498","_ref_2504","_ref_2510","_ref_2516","_ref_2572","_ref_2583","_ref_2590","_ref_2921","_ref_3148","_ref_3661","_ref_3662","_ref_3666","_ref_3680","_ref_3794","_ref_3812","_ref_3815","_ref_3822","_ref_3847","_ref_3911","_ref_3987","_ref_4056","_ref_4152","_ref_4244","_ref_4260","_ref_4329","_ref_4391","_ref_4392","_ref_4421","_ref_4470","_ref_4471","_ref_4481","_ref_4640","_ref_4837","_ref_4838","_ref_4841","_ref_8740","_ref_8742","_ref_8747","_ref_8749","_ref_8754","_ref_8759","_ref_8761"],"key":"Lexical Environments"},{"type":"term","term":"realm","refId":"sec-code-realms","referencingIds":["_ref_1000","_ref_1001","_ref_1002","_ref_1003","_ref_1912","_ref_1934","_ref_1936","_ref_1938","_ref_2059","_ref_2062","_ref_2065","_ref_2067","_ref_2070","_ref_2074","_ref_2112","_ref_2124","_ref_2161","_ref_2188","_ref_2192","_ref_2215","_ref_2404","_ref_2418","_ref_2446","_ref_2528","_ref_2607","_ref_2691","_ref_2692","_ref_2694","_ref_3248","_ref_4390","_ref_4404","_ref_4469","_ref_4651","_ref_4772","_ref_4797","_ref_4817","_ref_5002","_ref_5110"],"id":"realm","namespace":"https://tc39.github.io/ecma262/","location":"","key":"realm"},{"type":"term","term":"Realm Record","refId":"sec-code-realms","referencingIds":["_ref_1920","_ref_2063","_ref_2075","_ref_2078","_ref_2079","_ref_2113","_ref_2168","_ref_2169","_ref_2417","_ref_2521","_ref_2621","_ref_2682","_ref_4389","_ref_4468","_ref_4771"],"id":"realm-record","namespace":"https://tc39.github.io/ecma262/","location":"","key":"Realm Record"},{"type":"table","id":"table-21","number":20,"caption":"Table 20: Realm Record Fields","referencingIds":["_ref_170"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 20: Realm Record Fields"},{"type":"op","aoid":"CreateRealm","refId":"sec-createrealm","location":"","referencingIds":[],"key":"CreateRealm"},{"type":"clause","id":"sec-createrealm","aoid":"CreateRealm","title":"CreateRealm ( )","titleHTML":"CreateRealm ( )","number":"8.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2190"],"key":"CreateRealm ( )"},{"type":"op","aoid":"CreateIntrinsics","refId":"sec-createintrinsics","location":"","referencingIds":[],"key":"CreateIntrinsics"},{"type":"clause","id":"sec-createintrinsics","aoid":"CreateIntrinsics","title":"CreateIntrinsics ( realmRec )","titleHTML":"CreateIntrinsics ( <var>realmRec</var> )","number":"8.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2080"],"key":"CreateIntrinsics ( realmRec )"},{"type":"op","aoid":"SetRealmGlobalObject","refId":"sec-setrealmglobalobject","location":"","referencingIds":[],"key":"SetRealmGlobalObject"},{"type":"clause","id":"sec-setrealmglobalobject","aoid":"SetRealmGlobalObject","title":"SetRealmGlobalObject ( realmRec, globalObj, thisValue )","titleHTML":"SetRealmGlobalObject ( <var>realmRec</var>, <var>globalObj</var>, <var>thisValue</var> )","number":"8.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2200"],"key":"SetRealmGlobalObject ( realmRec, globalObj, thisValue )"},{"type":"op","aoid":"SetDefaultGlobalBindings","refId":"sec-setdefaultglobalbindings","location":"","referencingIds":[],"key":"SetDefaultGlobalBindings"},{"type":"clause","id":"sec-setdefaultglobalbindings","aoid":"SetDefaultGlobalBindings","title":"SetDefaultGlobalBindings ( realmRec )","titleHTML":"SetDefaultGlobalBindings ( <var>realmRec</var> )","number":"8.2.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2201"],"key":"SetDefaultGlobalBindings ( realmRec )"},{"type":"clause","id":"sec-code-realms","aoid":null,"title":"Realms","titleHTML":"Realms","number":"8.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_25"],"key":"Realms"},{"type":"term","term":"execution context","refId":"sec-execution-contexts","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"execution context"},{"type":"term","term":"running execution context","refId":"sec-execution-contexts","referencingIds":["_ref_1219","_ref_1228","_ref_1239","_ref_1242","_ref_1246","_ref_1253","_ref_1256","_ref_1260","_ref_2102","_ref_2103","_ref_2105","_ref_2106","_ref_2107","_ref_2118","_ref_2119","_ref_2120","_ref_2121","_ref_2122","_ref_2123","_ref_2125","_ref_2126","_ref_2133","_ref_2135","_ref_2136","_ref_2142","_ref_2149","_ref_2153","_ref_2155","_ref_2159","_ref_2160","_ref_2162","_ref_2176","_ref_2179","_ref_2187","_ref_2194","_ref_2210","_ref_2217","_ref_2221","_ref_2239","_ref_2295","_ref_2405","_ref_2428","_ref_2431","_ref_2435","_ref_2444","_ref_2449","_ref_2471","_ref_2475","_ref_2480","_ref_2571","_ref_2605","_ref_2609","_ref_2612","_ref_2693","_ref_2695","_ref_3650","_ref_3653","_ref_3654","_ref_3665","_ref_3678","_ref_3679","_ref_3792","_ref_3795","_ref_3797","_ref_3800","_ref_3811","_ref_3816","_ref_3843","_ref_3848","_ref_3849","_ref_3856","_ref_3868","_ref_3878","_ref_3882","_ref_3904","_ref_3909","_ref_3912","_ref_3913","_ref_3962","_ref_3965","_ref_3966","_ref_3985","_ref_3988","_ref_3990","_ref_3992","_ref_4026","_ref_4032","_ref_4050","_ref_4054","_ref_4083","_ref_4090","_ref_4100","_ref_4107","_ref_4134","_ref_4144","_ref_4150","_ref_4226","_ref_4236","_ref_4242","_ref_4258","_ref_4263","_ref_4264","_ref_4273","_ref_4282","_ref_4284","_ref_4286","_ref_4315","_ref_4324","_ref_4327","_ref_4358","_ref_4361","_ref_4371","_ref_4375","_ref_4377","_ref_4406","_ref_4408","_ref_4416","_ref_4655","_ref_4657","_ref_4661","_ref_4741","_ref_4746","_ref_4810","_ref_4819","_ref_4825","_ref_7923","_ref_7929","_ref_7940","_ref_7943","_ref_7947","_ref_7954","_ref_7957","_ref_7960","_ref_7962","_ref_7964","_ref_7972","_ref_7992","_ref_7998","_ref_8027","_ref_8030","_ref_8035","_ref_8057","_ref_8066","_ref_8321","_ref_8327","_ref_8333","_ref_8336","_ref_8739","_ref_8741","_ref_8746","_ref_8748","_ref_8758","_ref_8760"],"id":"running-execution-context","namespace":"https://tc39.github.io/ecma262/","location":"","key":"running execution context"},{"type":"term","term":"execution context stack","refId":"sec-execution-contexts","referencingIds":["_ref_1225","_ref_1227","_ref_1241","_ref_1245","_ref_1255","_ref_1259","_ref_2134","_ref_2137","_ref_2139","_ref_2163","_ref_2177","_ref_2193","_ref_2211","_ref_2213","_ref_2216","_ref_2220","_ref_2240","_ref_2434","_ref_2439","_ref_2448","_ref_2479","_ref_2608","_ref_2611","_ref_2613","_ref_4373","_ref_4407","_ref_4412","_ref_4414","_ref_4415","_ref_4656","_ref_4659","_ref_4660","_ref_4795","_ref_4796","_ref_4818","_ref_4823","_ref_4824","_ref_5000","_ref_5001","_ref_7926","_ref_7928","_ref_7942","_ref_7946","_ref_7956","_ref_7959","_ref_7969","_ref_7971","_ref_7995","_ref_7997","_ref_8029","_ref_8034","_ref_8063","_ref_8065","_ref_8324","_ref_8326","_ref_8332","_ref_8335"],"id":"execution-context-stack","namespace":"https://tc39.github.io/ecma262/","location":"","key":"execution context stack"},{"type":"table","id":"table-22","number":21,"caption":"Table 21: State Components for All Execution Contexts","referencingIds":["_ref_177"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 21: State Components for All Execution Contexts"},{"type":"term","term":"the current Realm Record","refId":"sec-execution-contexts","referencingIds":["_ref_1729","_ref_2489","_ref_2619","_ref_2680","_ref_3237","_ref_3299","_ref_4437","_ref_4678","_ref_4798","_ref_5003"],"id":"current-realm","namespace":"https://tc39.github.io/ecma262/","location":"","key":"the current Realm Record"},{"type":"term","term":"active function object","refId":"sec-execution-contexts","referencingIds":["_ref_1238","_ref_1252","_ref_2815","_ref_2819","_ref_4994","_ref_5137","_ref_5157","_ref_6089","_ref_6325","_ref_6330","_ref_6340","_ref_7861","_ref_7878","_ref_7897","_ref_8040","_ref_8047","_ref_8094","_ref_8097","_ref_8126","_ref_8200","_ref_8263","_ref_8274","_ref_8308","_ref_8385"],"id":"active-function-object","namespace":"https://tc39.github.io/ecma262/","location":"","key":"active function object"},{"type":"table","id":"table-23","number":22,"caption":"Table 22: Additional State Components for ECMAScript Code Execution Contexts","referencingIds":["_ref_178"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 22: Additional State Components for ECMAScript Code Execution Contexts"},{"type":"table","id":"table-24","number":23,"caption":"Table 23: Additional State Components for Generator Execution Contexts","referencingIds":["_ref_179"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 23: Additional State Components for Generator Execution Contexts"},{"type":"op","aoid":"GetActiveScriptOrModule","refId":"sec-getactivescriptormodule","location":"","referencingIds":[],"key":"GetActiveScriptOrModule"},{"type":"clause","id":"sec-getactivescriptormodule","aoid":"GetActiveScriptOrModule","title":"GetActiveScriptOrModule ( )","titleHTML":"GetActiveScriptOrModule ( )","number":"8.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2495"],"key":"GetActiveScriptOrModule ( )"},{"type":"op","aoid":"ResolveBinding","refId":"sec-resolvebinding","location":"","referencingIds":[],"key":"ResolveBinding"},{"type":"clause","id":"sec-resolvebinding","aoid":"ResolveBinding","title":"ResolveBinding ( name [ , env ] )","titleHTML":"ResolveBinding ( <var>name</var> [ , <var>env</var> ] )","number":"8.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3150","_ref_3152","_ref_3153","_ref_3154","_ref_3567","_ref_3670","_ref_3673","_ref_3686","_ref_3705","_ref_3713","_ref_3731","_ref_3757","_ref_3870","_ref_3890","_ref_8781"],"key":"ResolveBinding ( name [ , env ] )"},{"type":"op","aoid":"GetThisEnvironment","refId":"sec-getthisenvironment","location":"","referencingIds":[],"key":"GetThisEnvironment"},{"type":"clause","id":"sec-getthisenvironment","aoid":"GetThisEnvironment","title":"GetThisEnvironment ( )","titleHTML":"GetThisEnvironment ( )","number":"8.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2154","_ref_2156","_ref_3326","_ref_3331","_ref_3340","_ref_3341","_ref_3347","_ref_4803"],"key":"GetThisEnvironment ( )"},{"type":"op","aoid":"ResolveThisBinding","refId":"sec-resolvethisbinding","location":"","referencingIds":[],"key":"ResolveThisBinding"},{"type":"clause","id":"sec-resolvethisbinding","aoid":"ResolveThisBinding","title":"ResolveThisBinding ( )","titleHTML":"ResolveThisBinding ( )","number":"8.3.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3159"],"key":"ResolveThisBinding ( )"},{"type":"op","aoid":"GetNewTarget","refId":"sec-getnewtarget","location":"","referencingIds":[],"key":"GetNewTarget"},{"type":"clause","id":"sec-getnewtarget","aoid":"GetNewTarget","title":"GetNewTarget ( )","titleHTML":"GetNewTarget ( )","number":"8.3.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3334","_ref_3374"],"key":"GetNewTarget ( )"},{"type":"op","aoid":"GetGlobalObject","refId":"sec-getglobalobject","location":"","referencingIds":[],"key":"GetGlobalObject"},{"type":"clause","id":"sec-getglobalobject","aoid":"GetGlobalObject","title":"GetGlobalObject ( )","titleHTML":"GetGlobalObject ( )","number":"8.3.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1317"],"key":"GetGlobalObject ( )"},{"type":"clause","id":"sec-execution-contexts","aoid":null,"title":"Execution Contexts","titleHTML":"Execution Contexts","number":"8.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_50","_ref_1226","_ref_2108","_ref_2109","_ref_2116","_ref_2128","_ref_2131","_ref_2132","_ref_2138","_ref_2140","_ref_2170","_ref_2173","_ref_2178","_ref_2191","_ref_2214","_ref_2445","_ref_2451","_ref_2564","_ref_2570","_ref_2606","_ref_2753","_ref_4374","_ref_4378","_ref_4403","_ref_4418","_ref_4420","_ref_4483","_ref_4649","_ref_4792","_ref_4811","_ref_4813","_ref_4816","_ref_7921","_ref_7924","_ref_7927","_ref_7930","_ref_7950","_ref_7966","_ref_7970","_ref_7985","_ref_7993","_ref_7996","_ref_8059","_ref_8064","_ref_8322","_ref_8325"],"key":"Execution Contexts"},{"type":"table","id":"table-25","number":24,"caption":"Table 24: PendingJob Record Fields","referencingIds":["_ref_180"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 24: PendingJob Record Fields"},{"type":"table","id":"table-26","number":25,"caption":"Table 25: Required Job Queues","referencingIds":["_ref_181"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 25: Required Job Queues"},{"type":"op","aoid":"EnqueueJob","refId":"sec-enqueuejob","location":"","referencingIds":[],"key":"EnqueueJob"},{"type":"clause","id":"sec-enqueuejob","aoid":"EnqueueJob","title":"EnqueueJob ( queueName, job, arguments )","titleHTML":"EnqueueJob ( <var>queueName</var>, <var>job</var>, <var>arguments</var> )","number":"8.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2205","_ref_2207","_ref_8108","_ref_8133","_ref_8295","_ref_8299"],"key":"EnqueueJob ( queueName, job, arguments )"},{"type":"clause","id":"sec-jobs-and-job-queues","aoid":null,"title":"Jobs and Job Queues","titleHTML":"Jobs and Job Queues","number":"8.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Jobs and Job Queues"},{"type":"op","aoid":"InitializeHostDefinedRealm","refId":"sec-initializehostdefinedrealm","location":"","referencingIds":[],"key":"InitializeHostDefinedRealm"},{"type":"clause","id":"sec-initializehostdefinedrealm","aoid":"InitializeHostDefinedRealm","title":"InitializeHostDefinedRealm ( )","titleHTML":"InitializeHostDefinedRealm ( )","number":"8.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2117","_ref_2204"],"key":"InitializeHostDefinedRealm ( )"},{"type":"op","aoid":"RunJobs","refId":"sec-runjobs","location":"","referencingIds":[],"key":"RunJobs"},{"type":"clause","id":"sec-runjobs","aoid":"RunJobs","title":"RunJobs ( )","titleHTML":"RunJobs ( )","number":"8.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"RunJobs ( )"},{"type":"term","term":"agent","refId":"sec-agents","referencingIds":["_ref_856","_ref_2100","_ref_2101","_ref_2174","_ref_2180","_ref_2223","_ref_2224","_ref_2225","_ref_2227","_ref_2228","_ref_2233","_ref_2235","_ref_2236","_ref_2238","_ref_2245","_ref_2246","_ref_2251","_ref_2255","_ref_2260","_ref_2261","_ref_2262","_ref_2263","_ref_2264","_ref_2265","_ref_2266","_ref_2267","_ref_2268","_ref_2269","_ref_2270","_ref_2271","_ref_2272","_ref_2273","_ref_2274","_ref_2275","_ref_2276","_ref_2277","_ref_2278","_ref_2279","_ref_2280","_ref_2286","_ref_2288","_ref_2293","_ref_2294","_ref_2297","_ref_2298","_ref_2301","_ref_2302","_ref_2303","_ref_7569","_ref_7580","_ref_7581","_ref_7591","_ref_7593","_ref_7594","_ref_7597","_ref_7599","_ref_7601","_ref_7605","_ref_7607","_ref_7611","_ref_7615","_ref_7617","_ref_7624","_ref_7627","_ref_7630","_ref_7632","_ref_7639","_ref_7670","_ref_7683","_ref_7708","_ref_8390","_ref_8412","_ref_8417","_ref_8432","_ref_8433","_ref_8495","_ref_8496","_ref_8567","_ref_8569","_ref_8570","_ref_8571","_ref_8572","_ref_8573","_ref_8578","_ref_8582","_ref_8584"],"id":"agent","namespace":"https://tc39.github.io/ecma262/","location":"","key":"agent"},{"type":"term","term":"Agent Record","refId":"sec-agents","referencingIds":["_ref_1405","_ref_1416","_ref_2231","_ref_2241","_ref_2242","_ref_2256","_ref_2258","_ref_2281","_ref_2290","_ref_2296","_ref_7388","_ref_7396","_ref_7409","_ref_7413","_ref_7424","_ref_7427","_ref_7635","_ref_7661","_ref_7668"],"id":"agent-record","namespace":"https://tc39.github.io/ecma262/","location":"","key":"Agent Record"},{"type":"term","term":"executing thread","refId":"sec-agents","referencingIds":["_ref_2222","_ref_2226","_ref_2229","_ref_2230","_ref_2232","_ref_2234","_ref_2299","_ref_2300"],"id":"executing-thread","namespace":"https://tc39.github.io/ecma262/","location":"","key":"executing thread"},{"type":"term","term":"surrounding agent","refId":"sec-agents","referencingIds":["_ref_1404","_ref_1415","_ref_2104","_ref_2175","_ref_2237","_ref_2257","_ref_2259","_ref_7387","_ref_7395","_ref_7408","_ref_7412","_ref_7423","_ref_7426","_ref_7634","_ref_7660","_ref_7669"],"id":"surrounding-agent","namespace":"https://tc39.github.io/ecma262/","location":"","key":"surrounding agent"},{"type":"table","id":"table-agent-record","number":26,"caption":"Table 26: Agent Record Fields","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 26: Agent Record Fields"},{"type":"op","aoid":"AgentSignifier","refId":"sec-agentsignifier","location":"","referencingIds":[],"key":"AgentSignifier"},{"type":"clause","id":"sec-agentsignifier","aoid":"AgentSignifier","title":"AgentSignifier ( )","titleHTML":"AgentSignifier ( )","number":"8.7.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1406","_ref_1417","_ref_7389","_ref_7414","_ref_7428","_ref_7619","_ref_7637","_ref_7694"],"key":"AgentSignifier ( )"},{"type":"op","aoid":"AgentCanSuspend","refId":"sec-agentcansuspend","location":"","referencingIds":[],"key":"AgentCanSuspend"},{"type":"clause","id":"sec-agentcansuspend","aoid":"AgentCanSuspend","title":"AgentCanSuspend ( )","titleHTML":"AgentCanSuspend ( )","number":"8.7.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7622","_ref_7689"],"key":"AgentCanSuspend ( )"},{"type":"clause","id":"sec-agents","aoid":null,"title":"Agents","titleHTML":"Agents","number":"8.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Agents"},{"type":"term","term":"agent cluster","refId":"sec-agent-clusters","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"agent cluster"},{"type":"clause","id":"sec-agent-clusters","aoid":null,"title":"Agent Clusters","titleHTML":"Agent Clusters","number":"8.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2247","_ref_2252","_ref_7579","_ref_7582","_ref_8394","_ref_8413","_ref_8428"],"key":"Agent Clusters"},{"type":"clause","id":"sec-forward-progress","aoid":null,"title":"Forward Progress","titleHTML":"Forward Progress","number":"8.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Forward Progress"},{"type":"clause","id":"sec-executable-code-and-execution-contexts","aoid":null,"title":"Executable Code and Execution Contexts","titleHTML":"Executable Code and Execution Contexts","number":"8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Executable Code and Execution Contexts"},{"type":"op","aoid":"OrdinaryGetPrototypeOf","refId":"sec-ordinarygetprototypeof","location":"","referencingIds":[],"key":"OrdinaryGetPrototypeOf"},{"type":"clause","id":"sec-ordinarygetprototypeof","aoid":"OrdinaryGetPrototypeOf","title":"OrdinaryGetPrototypeOf ( O )","titleHTML":"OrdinaryGetPrototypeOf ( <var>O</var> )","number":"9.1.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2307"],"key":"OrdinaryGetPrototypeOf ( O )"},{"type":"clause","id":"sec-ordinary-object-internal-methods-and-internal-slots-getprototypeof","aoid":null,"title":"[[GetPrototypeOf]] ( )","titleHTML":"[[GetPrototypeOf]] ( )","number":"9.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_185","_ref_242"],"key":"[[GetPrototypeOf]] ( )"},{"type":"op","aoid":"OrdinarySetPrototypeOf","refId":"sec-ordinarysetprototypeof","location":"","referencingIds":[],"key":"OrdinarySetPrototypeOf"},{"type":"clause","id":"sec-ordinarysetprototypeof","aoid":"OrdinarySetPrototypeOf","title":"OrdinarySetPrototypeOf ( O, V )","titleHTML":"OrdinarySetPrototypeOf ( <var>O</var>, <var>V</var> )","number":"9.1.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2308"],"key":"OrdinarySetPrototypeOf ( O, V )"},{"type":"clause","id":"sec-ordinary-object-internal-methods-and-internal-slots-setprototypeof-v","aoid":null,"title":"[[SetPrototypeOf]] ( V )","titleHTML":"[[SetPrototypeOf]] ( <var>V</var> )","number":"9.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"[[SetPrototypeOf]] ( V )"},{"type":"op","aoid":"OrdinaryIsExtensible","refId":"sec-ordinaryisextensible","location":"","referencingIds":[],"key":"OrdinaryIsExtensible"},{"type":"clause","id":"sec-ordinaryisextensible","aoid":"OrdinaryIsExtensible","title":"OrdinaryIsExtensible ( O )","titleHTML":"OrdinaryIsExtensible ( <var>O</var> )","number":"9.1.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2314"],"key":"OrdinaryIsExtensible ( O )"},{"type":"clause","id":"sec-ordinary-object-internal-methods-and-internal-slots-isextensible","aoid":null,"title":"[[IsExtensible]] ( )","titleHTML":"[[IsExtensible]] ( )","number":"9.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"[[IsExtensible]] ( )"},{"type":"op","aoid":"OrdinaryPreventExtensions","refId":"sec-ordinarypreventextensions","location":"","referencingIds":[],"key":"OrdinaryPreventExtensions"},{"type":"clause","id":"sec-ordinarypreventextensions","aoid":"OrdinaryPreventExtensions","title":"OrdinaryPreventExtensions ( O )","titleHTML":"OrdinaryPreventExtensions ( <var>O</var> )","number":"9.1.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2315"],"key":"OrdinaryPreventExtensions ( O )"},{"type":"clause","id":"sec-ordinary-object-internal-methods-and-internal-slots-preventextensions","aoid":null,"title":"[[PreventExtensions]] ( )","titleHTML":"[[PreventExtensions]] ( )","number":"9.1.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"[[PreventExtensions]] ( )"},{"type":"op","aoid":"OrdinaryGetOwnProperty","refId":"sec-ordinarygetownproperty","location":"","referencingIds":[],"key":"OrdinaryGetOwnProperty"},{"type":"clause","id":"sec-ordinarygetownproperty","aoid":"OrdinaryGetOwnProperty","title":"OrdinaryGetOwnProperty ( O, P )","titleHTML":"OrdinaryGetOwnProperty ( <var>O</var>, <var>P</var> )","number":"9.1.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2316","_ref_2662","_ref_2701","_ref_2715","_ref_2758","_ref_2830","_ref_2902"],"key":"OrdinaryGetOwnProperty ( O, P )"},{"type":"clause","id":"sec-ordinary-object-internal-methods-and-internal-slots-getownproperty-p","aoid":null,"title":"[[GetOwnProperty]] ( P )","titleHTML":"[[GetOwnProperty]] ( <var>P</var> )","number":"9.1.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"[[GetOwnProperty]] ( P )"},{"type":"op","aoid":"OrdinaryDefineOwnProperty","refId":"sec-ordinarydefineownproperty","location":"","referencingIds":[],"key":"OrdinaryDefineOwnProperty"},{"type":"clause","id":"sec-ordinarydefineownproperty","aoid":"OrdinaryDefineOwnProperty","title":"OrdinaryDefineOwnProperty ( O, P, Desc )","titleHTML":"OrdinaryDefineOwnProperty ( <var>O</var>, <var>P</var>, <var>Desc</var> )","number":"9.1.6.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2323","_ref_2666","_ref_2667","_ref_2669","_ref_2673","_ref_2698","_ref_2704","_ref_2705","_ref_2707","_ref_2708","_ref_2723","_ref_2766","_ref_2850","_ref_2906"],"key":"OrdinaryDefineOwnProperty ( O, P, Desc )"},{"type":"op","aoid":"IsCompatiblePropertyDescriptor","refId":"sec-iscompatiblepropertydescriptor","location":"","referencingIds":[],"key":"IsCompatiblePropertyDescriptor"},{"type":"clause","id":"sec-iscompatiblepropertydescriptor","aoid":"IsCompatiblePropertyDescriptor","title":"IsCompatiblePropertyDescriptor ( Extensible, Desc, Current )","titleHTML":"IsCompatiblePropertyDescriptor ( <var>Extensible</var>, <var>Desc</var>, <var>Current</var> )","number":"9.1.6.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2722","_ref_2992","_ref_3004"],"key":"IsCompatiblePropertyDescriptor ( Extensible, Desc, Current )"},{"type":"op","aoid":"ValidateAndApplyPropertyDescriptor","refId":"sec-validateandapplypropertydescriptor","location":"","referencingIds":[],"key":"ValidateAndApplyPropertyDescriptor"},{"type":"clause","id":"sec-validateandapplypropertydescriptor","aoid":"ValidateAndApplyPropertyDescriptor","title":"ValidateAndApplyPropertyDescriptor ( O, P, extensible, Desc, current )","titleHTML":"ValidateAndApplyPropertyDescriptor ( <var>O</var>, <var>P</var>, <var>extensible</var>, <var>Desc</var>, <var>current</var> )","number":"9.1.6.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2326","_ref_2327"],"key":"ValidateAndApplyPropertyDescriptor ( O, P, extensible, Desc, current )"},{"type":"clause","id":"sec-ordinary-object-internal-methods-and-internal-slots-defineownproperty-p-desc","aoid":null,"title":"[[DefineOwnProperty]] ( P, Desc )","titleHTML":"[[DefineOwnProperty]] ( <var>P</var>, <var>Desc</var> )","number":"9.1.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"[[DefineOwnProperty]] ( P, Desc )"},{"type":"op","aoid":"OrdinaryHasProperty","refId":"sec-ordinaryhasproperty","location":"","referencingIds":[],"key":"OrdinaryHasProperty"},{"type":"clause","id":"sec-ordinaryhasproperty","aoid":"OrdinaryHasProperty","title":"OrdinaryHasProperty ( O, P )","titleHTML":"OrdinaryHasProperty ( <var>O</var>, <var>P</var> )","number":"9.1.7.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2351","_ref_2839","_ref_2911"],"key":"OrdinaryHasProperty ( O, P )"},{"type":"clause","id":"sec-ordinary-object-internal-methods-and-internal-slots-hasproperty-p","aoid":null,"title":"[[HasProperty]] ( P )","titleHTML":"[[HasProperty]] ( <var>P</var> )","number":"9.1.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"[[HasProperty]] ( P )"},{"type":"op","aoid":"OrdinaryGet","refId":"sec-ordinaryget","location":"","referencingIds":[],"key":"OrdinaryGet"},{"type":"clause","id":"sec-ordinaryget","aoid":"OrdinaryGet","title":"OrdinaryGet ( O, P, Receiver )","titleHTML":"OrdinaryGet ( <var>O</var>, <var>P</var>, <var>Receiver</var> )","number":"9.1.8.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2355","_ref_2773","_ref_2858","_ref_2917"],"key":"OrdinaryGet ( O, P, Receiver )"},{"type":"clause","id":"sec-ordinary-object-internal-methods-and-internal-slots-get-p-receiver","aoid":null,"title":"[[Get]] ( P, Receiver )","titleHTML":"[[Get]] ( <var>P</var>, <var>Receiver</var> )","number":"9.1.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"[[Get]] ( P, Receiver )"},{"type":"op","aoid":"OrdinarySet","refId":"sec-ordinaryset","location":"","referencingIds":[],"key":"OrdinarySet"},{"type":"clause","id":"sec-ordinaryset","aoid":"OrdinarySet","title":"OrdinarySet ( O, P, V, Receiver )","titleHTML":"OrdinarySet ( <var>O</var>, <var>P</var>, <var>V</var>, <var>Receiver</var> )","number":"9.1.9.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2364","_ref_2781","_ref_2866"],"key":"OrdinarySet ( O, P, V, Receiver )"},{"type":"op","aoid":"OrdinarySetWithOwnDescriptor","refId":"sec-ordinarysetwithowndescriptor","location":"","referencingIds":[],"key":"OrdinarySetWithOwnDescriptor"},{"type":"clause","id":"sec-ordinarysetwithowndescriptor","aoid":"OrdinarySetWithOwnDescriptor","title":"OrdinarySetWithOwnDescriptor ( O, P, V, Receiver, ownDesc )","titleHTML":"OrdinarySetWithOwnDescriptor ( <var>O</var>, <var>P</var>, <var>V</var>, <var>Receiver</var>, <var>ownDesc</var> )","number":"9.1.9.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2368"],"key":"OrdinarySetWithOwnDescriptor ( O, P, V, Receiver, ownDesc )"},{"type":"clause","id":"sec-ordinary-object-internal-methods-and-internal-slots-set-p-v-receiver","aoid":null,"title":"[[Set]] ( P, V, Receiver )","titleHTML":"[[Set]] ( <var>P</var>, <var>V</var>, <var>Receiver</var> )","number":"9.1.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"[[Set]] ( P, V, Receiver )"},{"type":"op","aoid":"OrdinaryDelete","refId":"sec-ordinarydelete","location":"","referencingIds":[],"key":"OrdinaryDelete"},{"type":"clause","id":"sec-ordinarydelete","aoid":"OrdinaryDelete","title":"OrdinaryDelete ( O, P )","titleHTML":"OrdinaryDelete ( <var>O</var>, <var>P</var> )","number":"9.1.10.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2380","_ref_2784","_ref_2929"],"key":"OrdinaryDelete ( O, P )"},{"type":"clause","id":"sec-ordinary-object-internal-methods-and-internal-slots-delete-p","aoid":null,"title":"[[Delete]] ( P )","titleHTML":"[[Delete]] ( <var>P</var> )","number":"9.1.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"[[Delete]] ( P )"},{"type":"op","aoid":"OrdinaryOwnPropertyKeys","refId":"sec-ordinaryownpropertykeys","location":"","referencingIds":[],"key":"OrdinaryOwnPropertyKeys"},{"type":"clause","id":"sec-ordinaryownpropertykeys","aoid":"OrdinaryOwnPropertyKeys","title":"OrdinaryOwnPropertyKeys ( O )","titleHTML":"OrdinaryOwnPropertyKeys ( <var>O</var> )","number":"9.1.11.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2383","_ref_2931"],"key":"OrdinaryOwnPropertyKeys ( O )"},{"type":"clause","id":"sec-ordinary-object-internal-methods-and-internal-slots-ownpropertykeys","aoid":null,"title":"[[OwnPropertyKeys]] ( )","titleHTML":"[[OwnPropertyKeys]] ( )","number":"9.1.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"[[OwnPropertyKeys]] ( )"},{"type":"op","aoid":"ObjectCreate","refId":"sec-objectcreate","location":"","referencingIds":[],"key":"ObjectCreate"},{"type":"clause","id":"sec-objectcreate","aoid":"ObjectCreate","title":"ObjectCreate ( proto [ , internalSlotsList ] )","titleHTML":"ObjectCreate ( <var>proto</var> [ , <var>internalSlotsList</var> ] )","number":"9.1.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1352","_ref_1788","_ref_1792","_ref_2083","_ref_2092","_ref_2395","_ref_2535","_ref_2785","_ref_2801","_ref_3198","_ref_3200","_ref_3576","_ref_3706","_ref_4122","_ref_4127","_ref_4137","_ref_4146","_ref_4154","_ref_4214","_ref_4220","_ref_4229","_ref_4238","_ref_4246","_ref_4270","_ref_4890","_ref_4903","_ref_4924","_ref_4938","_ref_5017","_ref_5020","_ref_5962","_ref_6150","_ref_6768","_ref_6789","_ref_7219","_ref_7283","_ref_7721","_ref_7763","_ref_7824","_ref_8381"],"key":"ObjectCreate ( proto [ , internalSlotsList ] )"},{"type":"op","aoid":"OrdinaryCreateFromConstructor","refId":"sec-ordinarycreatefromconstructor","location":"","referencingIds":[],"key":"OrdinaryCreateFromConstructor"},{"type":"clause","id":"sec-ordinarycreatefromconstructor","aoid":"OrdinaryCreateFromConstructor","title":"OrdinaryCreateFromConstructor ( constructor, intrinsicDefaultProto [ , internalSlotsList ] )","titleHTML":"OrdinaryCreateFromConstructor ( <var>constructor</var>, <var>intrinsicDefaultProto</var> [ , <var>internalSlotsList</var> ] )","number":"9.1.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2472","_ref_4117","_ref_4209","_ref_4889","_ref_5084","_ref_5138","_ref_5158","_ref_5176","_ref_5425","_ref_5440","_ref_5446","_ref_6097","_ref_7152","_ref_7238","_ref_7300","_ref_7334","_ref_7361","_ref_7472","_ref_7531","_ref_8159"],"key":"OrdinaryCreateFromConstructor ( constructor, intrinsicDefaultProto [ , internalSlotsList ] )"},{"type":"op","aoid":"GetPrototypeFromConstructor","refId":"sec-getprototypefromconstructor","location":"","referencingIds":[],"key":"GetPrototypeFromConstructor"},{"type":"clause","id":"sec-getprototypefromconstructor","aoid":"GetPrototypeFromConstructor","title":"GetPrototypeFromConstructor ( constructor, intrinsicDefaultProto )","titleHTML":"GetPrototypeFromConstructor ( <var>constructor</var>, <var>intrinsicDefaultProto</var> )","number":"9.1.14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2394","_ref_5014","_ref_5761","_ref_6326","_ref_6331","_ref_6341","_ref_7082"],"key":"GetPrototypeFromConstructor ( constructor, intrinsicDefaultProto )"},{"type":"clause","id":"sec-ordinary-object-internal-methods-and-internal-slots","aoid":null,"title":"Ordinary Object Internal Methods and Internal Slots","titleHTML":"Ordinary Object Internal Methods and Internal Slots","number":"9.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_186","_ref_191","_ref_199","_ref_203","_ref_204","_ref_208","_ref_209","_ref_211","_ref_212","_ref_217","_ref_223","_ref_226","_ref_228"],"key":"Ordinary Object Internal Methods and Internal Slots"},{"type":"term","term":"strict function","refId":"sec-ecmascript-function-objects","referencingIds":["_ref_2422","_ref_4760","_ref_4762","_ref_8606"],"id":"strict-function","namespace":"https://tc39.github.io/ecma262/","location":"","key":"strict function"},{"type":"term","term":"non-strict function","refId":"sec-ecmascript-function-objects","referencingIds":["_ref_2423"],"id":"non-strict-function","namespace":"https://tc39.github.io/ecma262/","location":"","key":"non-strict function"},{"type":"table","id":"table-27","number":27,"caption":"Table 27: Internal Slots of ECMAScript Function Objects","referencingIds":["_ref_188","_ref_190","_ref_201","_ref_475","_ref_691","_ref_693","_ref_697","_ref_699","_ref_717","_ref_718"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 27: Internal Slots of ECMAScript Function Objects"},{"type":"op","aoid":"PrepareForOrdinaryCall","refId":"sec-prepareforordinarycall","location":"","referencingIds":[],"key":"PrepareForOrdinaryCall"},{"type":"clause","id":"sec-prepareforordinarycall","aoid":"PrepareForOrdinaryCall","title":"PrepareForOrdinaryCall ( F, newTarget )","titleHTML":"PrepareForOrdinaryCall ( <var>F</var>, <var>newTarget</var> )","number":"9.2.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2429","_ref_2473"],"key":"PrepareForOrdinaryCall ( F, newTarget )"},{"type":"op","aoid":"OrdinaryCallBindThis","refId":"sec-ordinarycallbindthis","location":"","referencingIds":[],"key":"OrdinaryCallBindThis"},{"type":"clause","id":"sec-ordinarycallbindthis","aoid":"OrdinaryCallBindThis","title":"OrdinaryCallBindThis ( F, calleeContext, thisArgument )","titleHTML":"OrdinaryCallBindThis ( <var>F</var>, <var>calleeContext</var>, <var>thisArgument</var> )","number":"9.2.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_791","_ref_2432","_ref_2476"],"key":"OrdinaryCallBindThis ( F, calleeContext, thisArgument )"},{"type":"op","aoid":"OrdinaryCallEvaluateBody","refId":"sec-ordinarycallevaluatebody","location":"","referencingIds":[],"key":"OrdinaryCallEvaluateBody"},{"type":"clause","id":"sec-ordinarycallevaluatebody","aoid":"OrdinaryCallEvaluateBody","title":"OrdinaryCallEvaluateBody ( F, argumentsList )","titleHTML":"OrdinaryCallEvaluateBody ( <var>F</var>, <var>argumentsList</var> )","number":"9.2.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2433","_ref_2478"],"key":"OrdinaryCallEvaluateBody ( F, argumentsList )"},{"type":"clause","id":"sec-ecmascript-function-objects-call-thisargument-argumentslist","aoid":null,"title":"[[Call]] ( thisArgument, argumentsList )","titleHTML":"[[Call]] ( <var>thisArgument</var>, <var>argumentsList</var> )","number":"9.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_192","_ref_354"],"key":"[[Call]] ( thisArgument, argumentsList )"},{"type":"clause","id":"sec-ecmascript-function-objects-construct-argumentslist-newtarget","aoid":null,"title":"[[Construct]] ( argumentsList, newTarget )","titleHTML":"[[Construct]] ( <var>argumentsList</var>, <var>newTarget</var> )","number":"9.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_193"],"key":"[[Construct]] ( argumentsList, newTarget )"},{"type":"op","aoid":"FunctionAllocate","refId":"sec-functionallocate","location":"","referencingIds":[],"key":"FunctionAllocate"},{"type":"clause","id":"sec-functionallocate","aoid":"FunctionAllocate","title":"FunctionAllocate ( functionPrototype, strict, functionKind )","titleHTML":"FunctionAllocate ( <var>functionPrototype</var>, <var>strict</var>, <var>functionKind</var> )","number":"9.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2500","_ref_2506","_ref_2512","_ref_2518","_ref_5015"],"key":"FunctionAllocate ( functionPrototype, strict, functionKind )"},{"type":"op","aoid":"FunctionInitialize","refId":"sec-functioninitialize","location":"","referencingIds":[],"key":"FunctionInitialize"},{"type":"clause","id":"sec-functioninitialize","aoid":"FunctionInitialize","title":"FunctionInitialize ( F, kind, ParameterList, Body, Scope )","titleHTML":"FunctionInitialize ( <var>F</var>, <var>kind</var>, <var>ParameterList</var>, <var>Body</var>, <var>Scope</var> )","number":"9.2.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2501","_ref_2507","_ref_2513","_ref_2519","_ref_5016"],"key":"FunctionInitialize ( F, kind, ParameterList, Body, Scope )"},{"type":"op","aoid":"FunctionCreate","refId":"sec-functioncreate","location":"","referencingIds":[],"key":"FunctionCreate"},{"type":"clause","id":"sec-functioncreate","aoid":"FunctionCreate","title":"FunctionCreate ( kind, ParameterList, Body, Scope, Strict [ , prototype ] )","titleHTML":"FunctionCreate ( <var>kind</var>, <var>ParameterList</var>, <var>Body</var>, <var>Scope</var>, <var>Strict</var> [ , <var>prototype</var> ] )","number":"9.2.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_4039","_ref_4042","_ref_4051","_ref_4057","_ref_4084","_ref_4092","_ref_4101","_ref_4108"],"key":"FunctionCreate ( kind, ParameterList, Body, Scope, Strict [ , prototype ] )"},{"type":"op","aoid":"GeneratorFunctionCreate","refId":"sec-generatorfunctioncreate","location":"","referencingIds":[],"key":"GeneratorFunctionCreate"},{"type":"clause","id":"sec-generatorfunctioncreate","aoid":"GeneratorFunctionCreate","title":"GeneratorFunctionCreate ( kind, ParameterList, Body, Scope, Strict )","titleHTML":"GeneratorFunctionCreate ( <var>kind</var>, <var>ParameterList</var>, <var>Body</var>, <var>Scope</var>, <var>Strict</var> )","number":"9.2.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_4121","_ref_4126","_ref_4135","_ref_4145","_ref_4153"],"key":"GeneratorFunctionCreate ( kind, ParameterList, Body, Scope, Strict )"},{"type":"op","aoid":"AsyncGeneratorFunctionCreate","refId":"sec-asyncgeneratorfunctioncreate","location":"","referencingIds":[],"key":"AsyncGeneratorFunctionCreate"},{"type":"clause","id":"sec-asyncgeneratorfunctioncreate","aoid":"AsyncGeneratorFunctionCreate","title":"AsyncGeneratorFunctionCreate ( kind, ParameterList, Body, Scope, Strict )","titleHTML":"AsyncGeneratorFunctionCreate ( <var>kind</var>, <var>ParameterList</var>, <var>Body</var>, <var>Scope</var>, <var>Strict</var> )","number":"9.2.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_4213","_ref_4219","_ref_4227","_ref_4237","_ref_4245"],"key":"AsyncGeneratorFunctionCreate ( kind, ParameterList, Body, Scope, Strict )"},{"type":"op","aoid":"AsyncFunctionCreate","refId":"sec-async-functions-abstract-operations-async-function-create","location":"","referencingIds":[],"key":"AsyncFunctionCreate"},{"type":"clause","id":"sec-async-functions-abstract-operations-async-function-create","aoid":"AsyncFunctionCreate","title":"AsyncFunctionCreate ( kind, parameters, body, Scope, Strict )","titleHTML":"AsyncFunctionCreate ( <var>kind</var>, <var>parameters</var>, <var>body</var>, <var>Scope</var>, <var>Strict</var> )","number":"9.2.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_4299","_ref_4302","_ref_4316","_ref_4325","_ref_4330","_ref_4359","_ref_4362"],"key":"AsyncFunctionCreate ( kind, parameters, body, Scope, Strict )"},{"type":"term","term":"%ThrowTypeError%","refId":"sec-%throwtypeerror%","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%ThrowTypeError%"},{"type":"clause","id":"sec-%throwtypeerror%","aoid":null,"title":"%ThrowTypeError% ( )","titleHTML":"%ThrowTypeError% ( )","number":"9.2.9.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_171","_ref_1178","_ref_2085","_ref_2087","_ref_2523","_ref_2524","_ref_2793","_ref_2794"],"key":"%ThrowTypeError% ( )"},{"type":"op","aoid":"AddRestrictedFunctionProperties","refId":"sec-addrestrictedfunctionproperties","location":"","referencingIds":[],"key":"AddRestrictedFunctionProperties"},{"type":"clause","id":"sec-addrestrictedfunctionproperties","aoid":"AddRestrictedFunctionProperties","title":"AddRestrictedFunctionProperties ( F, realm )","titleHTML":"AddRestrictedFunctionProperties ( <var>F</var>, <var>realm</var> )","number":"9.2.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_359","_ref_2090"],"key":"AddRestrictedFunctionProperties ( F, realm )"},{"type":"op","aoid":"MakeConstructor","refId":"sec-makeconstructor","location":"","referencingIds":[],"key":"MakeConstructor"},{"type":"clause","id":"sec-makeconstructor","aoid":"MakeConstructor","title":"MakeConstructor ( F [ , writablePrototype [ , prototype ] ] )","titleHTML":"MakeConstructor ( <var>F</var> [ , <var>writablePrototype</var> [ , <var>prototype</var> ] ] )","number":"9.2.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_4040","_ref_4043","_ref_4052","_ref_4058","_ref_4276","_ref_5023"],"key":"MakeConstructor ( F [ , writablePrototype [ , prototype ] ] )"},{"type":"op","aoid":"MakeClassConstructor","refId":"sec-makeclassconstructor","location":"","referencingIds":[],"key":"MakeClassConstructor"},{"type":"clause","id":"sec-makeclassconstructor","aoid":"MakeClassConstructor","title":"MakeClassConstructor ( F )","titleHTML":"MakeClassConstructor ( <var>F</var> )","number":"9.2.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_4277"],"key":"MakeClassConstructor ( F )"},{"type":"op","aoid":"MakeMethod","refId":"sec-makemethod","location":"","referencingIds":[],"key":"MakeMethod"},{"type":"clause","id":"sec-makemethod","aoid":"MakeMethod","title":"MakeMethod ( F, homeObject )","titleHTML":"MakeMethod ( <var>F</var>, <var>homeObject</var> )","number":"9.2.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_4086","_ref_4093","_ref_4102","_ref_4109","_ref_4136","_ref_4228","_ref_4317"],"key":"MakeMethod ( F, homeObject )"},{"type":"op","aoid":"SetFunctionName","refId":"sec-setfunctionname","location":"","referencingIds":[],"key":"SetFunctionName"},{"type":"clause","id":"sec-setfunctionname","aoid":"SetFunctionName","title":"SetFunctionName ( F, name [ , prefix ] )","titleHTML":"SetFunctionName ( <var>F</var>, <var>name</var> [ , <var>prefix</var> ] )","number":"9.2.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_4041","_ref_4044","_ref_4046","_ref_4059","_ref_4081","_ref_4096","_ref_4103","_ref_4110","_ref_4125","_ref_4130","_ref_4140","_ref_4142","_ref_4157","_ref_4217","_ref_4223","_ref_4232","_ref_4234","_ref_4249","_ref_4278","_ref_4300","_ref_4303","_ref_4318","_ref_4320","_ref_4331","_ref_4356","_ref_5024","_ref_5055"],"key":"SetFunctionName ( F, name [ , prefix ] )"},{"type":"op","aoid":"SetFunctionLength","refId":"sec-setfunctionlength","location":"","referencingIds":[],"key":"SetFunctionLength"},{"type":"clause","id":"sec-setfunctionlength","aoid":"SetFunctionLength","title":"SetFunctionLength ( F, length )","titleHTML":"SetFunctionLength ( <var>F</var>, <var>length</var> )","number":"9.2.14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2494","_ref_5052"],"key":"SetFunctionLength ( F, length )"},{"type":"op","aoid":"FunctionDeclarationInstantiation","refId":"sec-functiondeclarationinstantiation","location":"","referencingIds":[],"key":"FunctionDeclarationInstantiation"},{"type":"clause","id":"sec-functiondeclarationinstantiation","aoid":"FunctionDeclarationInstantiation","title":"FunctionDeclarationInstantiation ( func, argumentsList )","titleHTML":"FunctionDeclarationInstantiation ( <var>func</var>, <var>argumentsList</var> )","number":"9.2.15","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_304","_ref_347","_ref_788","_ref_4023","_ref_4078","_ref_4116","_ref_4208","_ref_4307","_ref_4350","_ref_8738"],"key":"FunctionDeclarationInstantiation ( func, argumentsList )"},{"type":"clause","id":"sec-ecmascript-function-objects","aoid":null,"title":"ECMAScript Function Objects","titleHTML":"ECMAScript Function Objects","number":"9.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_198","_ref_254","_ref_353"],"key":"ECMAScript Function Objects"},{"type":"clause","id":"sec-built-in-function-objects-call-thisargument-argumentslist","aoid":null,"title":"[[Call]] ( thisArgument, argumentsList )","titleHTML":"[[Call]] ( <var>thisArgument</var>, <var>argumentsList</var> )","number":"9.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_200"],"key":"[[Call]] ( thisArgument, argumentsList )"},{"type":"clause","id":"sec-built-in-function-objects-construct-argumentslist-newtarget","aoid":null,"title":"[[Construct]] ( argumentsList, newTarget )","titleHTML":"[[Construct]] ( <var>argumentsList</var>, <var>newTarget</var> )","number":"9.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"[[Construct]] ( argumentsList, newTarget )"},{"type":"op","aoid":"CreateBuiltinFunction","refId":"sec-createbuiltinfunction","location":"","referencingIds":[],"key":"CreateBuiltinFunction"},{"type":"clause","id":"sec-createbuiltinfunction","aoid":"CreateBuiltinFunction","title":"CreateBuiltinFunction ( steps, internalSlotsList [ , realm [ , prototype ] ] )","titleHTML":"CreateBuiltinFunction ( <var>steps</var>, <var>internalSlotsList</var> [ , <var>realm</var> [ , <var>prototype</var> ] ] )","number":"9.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_402","_ref_1222","_ref_1223","_ref_1794","_ref_2086","_ref_2088","_ref_2091","_ref_2814","_ref_2818","_ref_4781","_ref_4927","_ref_7872","_ref_8020","_ref_8021","_ref_8091","_ref_8092","_ref_8119","_ref_8197","_ref_8257","_ref_8258","_ref_8380"],"key":"CreateBuiltinFunction ( steps, internalSlotsList [ , realm [ , prototype ] ] )"},{"type":"clause","id":"sec-built-in-function-objects","aoid":null,"title":"Built-in Function Objects","titleHTML":"Built-in Function Objects","number":"9.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_398","_ref_399","_ref_473"],"key":"Built-in Function Objects"},{"type":"term","term":"bound function","refId":"sec-bound-function-exotic-objects","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"bound function"},{"type":"table","id":"table-28","number":28,"caption":"Table 28: Internal Slots of Bound Function Exotic Objects","referencingIds":["_ref_202","_ref_477"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 28: Internal Slots of Bound Function Exotic Objects"},{"type":"clause","id":"sec-bound-function-exotic-objects-call-thisargument-argumentslist","aoid":null,"title":"[[Call]] ( thisArgument, argumentsList )","titleHTML":"[[Call]] ( <var>thisArgument</var>, <var>argumentsList</var> )","number":"9.4.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_205"],"key":"[[Call]] ( thisArgument, argumentsList )"},{"type":"clause","id":"sec-bound-function-exotic-objects-construct-argumentslist-newtarget","aoid":null,"title":"[[Construct]] ( argumentsList, newTarget )","titleHTML":"[[Construct]] ( <var>argumentsList</var>, <var>newTarget</var> )","number":"9.4.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_206"],"key":"[[Construct]] ( argumentsList, newTarget )"},{"type":"op","aoid":"BoundFunctionCreate","refId":"sec-boundfunctioncreate","location":"","referencingIds":[],"key":"BoundFunctionCreate"},{"type":"clause","id":"sec-boundfunctioncreate","aoid":"BoundFunctionCreate","title":"BoundFunctionCreate ( targetFunction, boundThis, boundArgs )","titleHTML":"BoundFunctionCreate ( <var>targetFunction</var>, <var>boundThis</var>, <var>boundArgs</var> )","number":"9.4.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_5047"],"key":"BoundFunctionCreate ( targetFunction, boundThis, boundArgs )"},{"type":"clause","id":"sec-bound-function-exotic-objects","aoid":null,"title":"Bound Function Exotic Objects","titleHTML":"Bound Function Exotic Objects","number":"9.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_472","_ref_2629","_ref_2633","_ref_5044","_ref_5056","_ref_5063","_ref_5072","_ref_8628"],"key":"Bound Function Exotic Objects"},{"type":"clause","id":"sec-array-exotic-objects-defineownproperty-p-desc","aoid":null,"title":"[[DefineOwnProperty]] ( P, Desc )","titleHTML":"[[DefineOwnProperty]] ( <var>P</var>, <var>Desc</var> )","number":"9.4.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_210","_ref_578","_ref_802"],"key":"[[DefineOwnProperty]] ( P, Desc )"},{"type":"op","aoid":"ArrayCreate","refId":"sec-arraycreate","location":"","referencingIds":[],"key":"ArrayCreate"},{"type":"clause","id":"sec-arraycreate","aoid":"ArrayCreate","title":"ArrayCreate ( length [ , proto ] )","titleHTML":"ArrayCreate ( <var>length</var> [ , <var>proto</var> ] )","number":"9.4.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1678","_ref_2677","_ref_2687","_ref_3181","_ref_3184","_ref_3185","_ref_3189","_ref_3190","_ref_3194","_ref_3241","_ref_3242","_ref_3601","_ref_3732","_ref_3744","_ref_5911","_ref_6145","_ref_6200","_ref_6277","_ref_6327","_ref_6332","_ref_6342","_ref_6354","_ref_6373","_ref_6384"],"key":"ArrayCreate ( length [ , proto ] )"},{"type":"op","aoid":"ArraySpeciesCreate","refId":"sec-arrayspeciescreate","location":"","referencingIds":[],"key":"ArraySpeciesCreate"},{"type":"clause","id":"sec-arrayspeciescreate","aoid":"ArraySpeciesCreate","title":"ArraySpeciesCreate ( originalArray, length )","titleHTML":"ArraySpeciesCreate ( <var>originalArray</var>, <var>length</var> )","number":"9.4.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_6397","_ref_6460","_ref_6488","_ref_6505","_ref_6563","_ref_6646","_ref_6712"],"key":"ArraySpeciesCreate ( originalArray, length )"},{"type":"op","aoid":"ArraySetLength","refId":"sec-arraysetlength","location":"","referencingIds":[],"key":"ArraySetLength"},{"type":"clause","id":"sec-arraysetlength","aoid":"ArraySetLength","title":"ArraySetLength ( A, Desc )","titleHTML":"ArraySetLength ( <var>A</var>, <var>Desc</var> )","number":"9.4.2.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2660"],"key":"ArraySetLength ( A, Desc )"},{"type":"clause","id":"sec-array-exotic-objects","aoid":null,"title":"Array Exotic Objects","titleHTML":"Array Exotic Objects","number":"9.4.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_575"],"key":"Array Exotic Objects"},{"type":"clause","id":"sec-string-exotic-objects-getownproperty-p","aoid":null,"title":"[[GetOwnProperty]] ( P )","titleHTML":"[[GetOwnProperty]] ( <var>P</var> )","number":"9.4.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_213"],"key":"[[GetOwnProperty]] ( P )"},{"type":"clause","id":"sec-string-exotic-objects-defineownproperty-p-desc","aoid":null,"title":"[[DefineOwnProperty]] ( P, Desc )","titleHTML":"[[DefineOwnProperty]] ( <var>P</var>, <var>Desc</var> )","number":"9.4.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_214"],"key":"[[DefineOwnProperty]] ( P, Desc )"},{"type":"clause","id":"sec-string-exotic-objects-ownpropertykeys","aoid":null,"title":"[[OwnPropertyKeys]] ( )","titleHTML":"[[OwnPropertyKeys]] ( )","number":"9.4.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_215"],"key":"[[OwnPropertyKeys]] ( )"},{"type":"op","aoid":"StringCreate","refId":"sec-stringcreate","location":"","referencingIds":[],"key":"StringCreate"},{"type":"clause","id":"sec-stringcreate","aoid":"StringCreate","title":"StringCreate ( value, prototype )","titleHTML":"StringCreate ( <var>value</var>, <var>prototype</var> )","number":"9.4.3.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_5760"],"key":"StringCreate ( value, prototype )"},{"type":"op","aoid":"StringGetOwnProperty","refId":"sec-stringgetownproperty","location":"","referencingIds":[],"key":"StringGetOwnProperty"},{"type":"clause","id":"sec-stringgetownproperty","aoid":"StringGetOwnProperty","title":"StringGetOwnProperty ( S, P )","titleHTML":"StringGetOwnProperty ( <var>S</var>, <var>P</var> )","number":"9.4.3.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2716","_ref_2721"],"key":"StringGetOwnProperty ( S, P )"},{"type":"clause","id":"sec-string-exotic-objects","aoid":null,"title":"String Exotic Objects","titleHTML":"String Exotic Objects","number":"9.4.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String Exotic Objects"},{"type":"clause","id":"sec-arguments-exotic-objects-getownproperty-p","aoid":null,"title":"[[GetOwnProperty]] ( P )","titleHTML":"[[GetOwnProperty]] ( <var>P</var> )","number":"9.4.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_218"],"key":"[[GetOwnProperty]] ( P )"},{"type":"clause","id":"sec-arguments-exotic-objects-defineownproperty-p-desc","aoid":null,"title":"[[DefineOwnProperty]] ( P, Desc )","titleHTML":"[[DefineOwnProperty]] ( <var>P</var>, <var>Desc</var> )","number":"9.4.4.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_219"],"key":"[[DefineOwnProperty]] ( P, Desc )"},{"type":"clause","id":"sec-arguments-exotic-objects-get-p-receiver","aoid":null,"title":"[[Get]] ( P, Receiver )","titleHTML":"[[Get]] ( <var>P</var>, <var>Receiver</var> )","number":"9.4.4.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_220"],"key":"[[Get]] ( P, Receiver )"},{"type":"clause","id":"sec-arguments-exotic-objects-set-p-v-receiver","aoid":null,"title":"[[Set]] ( P, V, Receiver )","titleHTML":"[[Set]] ( <var>P</var>, <var>V</var>, <var>Receiver</var> )","number":"9.4.4.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_221"],"key":"[[Set]] ( P, V, Receiver )"},{"type":"clause","id":"sec-arguments-exotic-objects-delete-p","aoid":null,"title":"[[Delete]] ( P )","titleHTML":"[[Delete]] ( <var>P</var> )","number":"9.4.4.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_222"],"key":"[[Delete]] ( P )"},{"type":"op","aoid":"CreateUnmappedArgumentsObject","refId":"sec-createunmappedargumentsobject","location":"","referencingIds":[],"key":"CreateUnmappedArgumentsObject"},{"type":"clause","id":"sec-createunmappedargumentsobject","aoid":"CreateUnmappedArgumentsObject","title":"CreateUnmappedArgumentsObject ( argumentsList )","titleHTML":"CreateUnmappedArgumentsObject ( <var>argumentsList</var> )","number":"9.4.4.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_785","_ref_2576"],"key":"CreateUnmappedArgumentsObject ( argumentsList )"},{"type":"op","aoid":"MakeArgGetter","refId":"sec-makearggetter","location":"","referencingIds":[],"key":"MakeArgGetter"},{"type":"clause","id":"sec-makearggetter","aoid":"MakeArgGetter","title":"MakeArgGetter ( name, env )","titleHTML":"MakeArgGetter ( <var>name</var>, <var>env</var> )","number":"9.4.4.7.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2806"],"key":"MakeArgGetter ( name, env )"},{"type":"op","aoid":"MakeArgSetter","refId":"sec-makeargsetter","location":"","referencingIds":[],"key":"MakeArgSetter"},{"type":"clause","id":"sec-makeargsetter","aoid":"MakeArgSetter","title":"MakeArgSetter ( name, env )","titleHTML":"MakeArgSetter ( <var>name</var>, <var>env</var> )","number":"9.4.4.7.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2807"],"key":"MakeArgSetter ( name, env )"},{"type":"op","aoid":"CreateMappedArgumentsObject","refId":"sec-createmappedargumentsobject","location":"","referencingIds":[],"key":"CreateMappedArgumentsObject"},{"type":"clause","id":"sec-createmappedargumentsobject","aoid":"CreateMappedArgumentsObject","title":"CreateMappedArgumentsObject ( func, formals, argumentsList, env )","titleHTML":"CreateMappedArgumentsObject ( <var>func</var>, <var>formals</var>, <var>argumentsList</var>, <var>env</var> )","number":"9.4.4.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2577"],"key":"CreateMappedArgumentsObject ( func, formals, argumentsList, env )"},{"type":"clause","id":"sec-arguments-exotic-objects","aoid":null,"title":"Arguments Exotic Objects","titleHTML":"Arguments Exotic Objects","number":"9.4.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_787"],"key":"Arguments Exotic Objects"},{"type":"term","term":"Integer-Indexed exotic object","refId":"sec-integer-indexed-exotic-objects","referencingIds":["_ref_224","_ref_225","_ref_227","_ref_650","_ref_2822","_ref_2823","_ref_2831","_ref_2840","_ref_2851","_ref_2859","_ref_2867"],"id":"integer-indexed-exotic-object","namespace":"https://tc39.github.io/ecma262/","location":"","key":"Integer-Indexed exotic object"},{"type":"clause","id":"sec-integer-indexed-exotic-objects-getownproperty-p","aoid":null,"title":"[[GetOwnProperty]] ( P )","titleHTML":"[[GetOwnProperty]] ( <var>P</var> )","number":"9.4.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_229"],"key":"[[GetOwnProperty]] ( P )"},{"type":"clause","id":"sec-integer-indexed-exotic-objects-hasproperty-p","aoid":null,"title":"[[HasProperty]] ( P )","titleHTML":"[[HasProperty]] ( <var>P</var> )","number":"9.4.5.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_230"],"key":"[[HasProperty]] ( P )"},{"type":"clause","id":"sec-integer-indexed-exotic-objects-defineownproperty-p-desc","aoid":null,"title":"[[DefineOwnProperty]] ( P, Desc )","titleHTML":"[[DefineOwnProperty]] ( <var>P</var>, <var>Desc</var> )","number":"9.4.5.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_231"],"key":"[[DefineOwnProperty]] ( P, Desc )"},{"type":"clause","id":"sec-integer-indexed-exotic-objects-get-p-receiver","aoid":null,"title":"[[Get]] ( P, Receiver )","titleHTML":"[[Get]] ( <var>P</var>, <var>Receiver</var> )","number":"9.4.5.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_232"],"key":"[[Get]] ( P, Receiver )"},{"type":"clause","id":"sec-integer-indexed-exotic-objects-set-p-v-receiver","aoid":null,"title":"[[Set]] ( P, V, Receiver )","titleHTML":"[[Set]] ( <var>P</var>, <var>V</var>, <var>Receiver</var> )","number":"9.4.5.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_233"],"key":"[[Set]] ( P, V, Receiver )"},{"type":"clause","id":"sec-integer-indexed-exotic-objects-ownpropertykeys","aoid":null,"title":"[[OwnPropertyKeys]] ( )","titleHTML":"[[OwnPropertyKeys]] ( )","number":"9.4.5.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_234"],"key":"[[OwnPropertyKeys]] ( )"},{"type":"op","aoid":"IntegerIndexedObjectCreate","refId":"sec-integerindexedobjectcreate","location":"","referencingIds":[],"key":"IntegerIndexedObjectCreate"},{"type":"clause","id":"sec-integerindexedobjectcreate","aoid":"IntegerIndexedObjectCreate","title":"IntegerIndexedObjectCreate ( prototype, internalSlotsList )","titleHTML":"IntegerIndexedObjectCreate ( <var>prototype</var>, <var>internalSlotsList</var> )","number":"9.4.5.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7083"],"key":"IntegerIndexedObjectCreate ( prototype, internalSlotsList )"},{"type":"op","aoid":"IntegerIndexedElementGet","refId":"sec-integerindexedelementget","location":"","referencingIds":[],"key":"IntegerIndexedElementGet"},{"type":"clause","id":"sec-integerindexedelementget","aoid":"IntegerIndexedElementGet","title":"IntegerIndexedElementGet ( O, index )","titleHTML":"IntegerIndexedElementGet ( <var>O</var>, <var>index</var> )","number":"9.4.5.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2829","_ref_2857"],"key":"IntegerIndexedElementGet ( O, index )"},{"type":"op","aoid":"IntegerIndexedElementSet","refId":"sec-integerindexedelementset","location":"","referencingIds":[],"key":"IntegerIndexedElementSet"},{"type":"clause","id":"sec-integerindexedelementset","aoid":"IntegerIndexedElementSet","title":"IntegerIndexedElementSet ( O, index, value )","titleHTML":"IntegerIndexedElementSet ( <var>O</var>, <var>index</var>, <var>value</var> )","number":"9.4.5.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2849","_ref_2865"],"key":"IntegerIndexedElementSet ( O, index, value )"},{"type":"clause","id":"sec-integer-indexed-exotic-objects","aoid":null,"title":"Integer-Indexed Exotic Objects","titleHTML":"Integer-Indexed Exotic Objects","number":"9.4.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Integer-Indexed Exotic Objects"},{"type":"table","id":"table-29","number":29,"caption":"Table 29: Internal Slots of Module Namespace Exotic Objects","referencingIds":["_ref_240"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 29: Internal Slots of Module Namespace Exotic Objects"},{"type":"clause","id":"sec-module-namespace-exotic-objects-setprototypeof-v","aoid":null,"title":"[[SetPrototypeOf]] ( V )","titleHTML":"[[SetPrototypeOf]] ( <var>V</var> )","number":"9.4.6.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_241"],"key":"[[SetPrototypeOf]] ( V )"},{"type":"clause","id":"sec-module-namespace-exotic-objects-isextensible","aoid":null,"title":"[[IsExtensible]] ( )","titleHTML":"[[IsExtensible]] ( )","number":"9.4.6.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"[[IsExtensible]] ( )"},{"type":"clause","id":"sec-module-namespace-exotic-objects-preventextensions","aoid":null,"title":"[[PreventExtensions]] ( )","titleHTML":"[[PreventExtensions]] ( )","number":"9.4.6.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"[[PreventExtensions]] ( )"},{"type":"clause","id":"sec-module-namespace-exotic-objects-getownproperty-p","aoid":null,"title":"[[GetOwnProperty]] ( P )","titleHTML":"[[GetOwnProperty]] ( <var>P</var> )","number":"9.4.6.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"[[GetOwnProperty]] ( P )"},{"type":"clause","id":"sec-module-namespace-exotic-objects-defineownproperty-p-desc","aoid":null,"title":"[[DefineOwnProperty]] ( P, Desc )","titleHTML":"[[DefineOwnProperty]] ( <var>P</var>, <var>Desc</var> )","number":"9.4.6.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"[[DefineOwnProperty]] ( P, Desc )"},{"type":"clause","id":"sec-module-namespace-exotic-objects-hasproperty-p","aoid":null,"title":"[[HasProperty]] ( P )","titleHTML":"[[HasProperty]] ( <var>P</var> )","number":"9.4.6.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"[[HasProperty]] ( P )"},{"type":"clause","id":"sec-module-namespace-exotic-objects-get-p-receiver","aoid":null,"title":"[[Get]] ( P, Receiver )","titleHTML":"[[Get]] ( <var>P</var>, <var>Receiver</var> )","number":"9.4.6.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"[[Get]] ( P, Receiver )"},{"type":"clause","id":"sec-module-namespace-exotic-objects-set-p-v-receiver","aoid":null,"title":"[[Set]] ( P, V, Receiver )","titleHTML":"[[Set]] ( <var>P</var>, <var>V</var>, <var>Receiver</var> )","number":"9.4.6.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"[[Set]] ( P, V, Receiver )"},{"type":"clause","id":"sec-module-namespace-exotic-objects-delete-p","aoid":null,"title":"[[Delete]] ( P )","titleHTML":"[[Delete]] ( <var>P</var> )","number":"9.4.6.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"[[Delete]] ( P )"},{"type":"clause","id":"sec-module-namespace-exotic-objects-ownpropertykeys","aoid":null,"title":"[[OwnPropertyKeys]] ( )","titleHTML":"[[OwnPropertyKeys]] ( )","number":"9.4.6.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"[[OwnPropertyKeys]] ( )"},{"type":"op","aoid":"ModuleNamespaceCreate","refId":"sec-modulenamespacecreate","location":"","referencingIds":[],"key":"ModuleNamespaceCreate"},{"type":"clause","id":"sec-modulenamespacecreate","aoid":"ModuleNamespaceCreate","title":"ModuleNamespaceCreate ( module, exports )","titleHTML":"ModuleNamespaceCreate ( <var>module</var>, <var>exports</var> )","number":"9.4.6.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_4675"],"key":"ModuleNamespaceCreate ( module, exports )"},{"type":"clause","id":"sec-module-namespace-exotic-objects","aoid":null,"title":"Module Namespace Exotic Objects","titleHTML":"Module Namespace Exotic Objects","number":"9.4.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_243","_ref_722"],"key":"Module Namespace Exotic Objects"},{"type":"term","term":"immutable prototype exotic object","refId":"sec-immutable-prototype-exotic-objects","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"immutable prototype exotic object"},{"type":"clause","id":"sec-immutable-prototype-exotic-objects-setprototypeof-v","aoid":null,"title":"[[SetPrototypeOf]] ( V )","titleHTML":"[[SetPrototypeOf]] ( <var>V</var> )","number":"9.4.7.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"[[SetPrototypeOf]] ( V )"},{"type":"op","aoid":"SetImmutablePrototype","refId":"sec-set-immutable-prototype","location":"","referencingIds":[],"key":"SetImmutablePrototype"},{"type":"clause","id":"sec-set-immutable-prototype","aoid":"SetImmutablePrototype","title":"SetImmutablePrototype ( O, V )","titleHTML":"SetImmutablePrototype ( <var>O</var>, <var>V</var> )","number":"9.4.7.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2897","_ref_2940"],"key":"SetImmutablePrototype ( O, V )"},{"type":"clause","id":"sec-immutable-prototype-exotic-objects","aoid":null,"title":"Immutable Prototype Exotic Objects","titleHTML":"Immutable Prototype Exotic Objects","number":"9.4.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2939","_ref_4971"],"key":"Immutable Prototype Exotic Objects"},{"type":"clause","id":"sec-built-in-exotic-object-internal-methods-and-slots","aoid":null,"title":"Built-in Exotic Object Internal Methods and Slots","titleHTML":"Built-in Exotic Object Internal Methods and Slots","number":"9.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Built-in Exotic Object Internal Methods and Slots"},{"type":"table","id":"table-30","number":30,"caption":"Table 30: Proxy Handler Methods","referencingIds":["_ref_245"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 30: Proxy Handler Methods"},{"type":"clause","id":"sec-proxy-object-internal-methods-and-internal-slots-getprototypeof","aoid":null,"title":"[[GetPrototypeOf]] ( )","titleHTML":"[[GetPrototypeOf]] ( )","number":"9.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"[[GetPrototypeOf]] ( )"},{"type":"clause","id":"sec-proxy-object-internal-methods-and-internal-slots-setprototypeof-v","aoid":null,"title":"[[SetPrototypeOf]] ( V )","titleHTML":"[[SetPrototypeOf]] ( <var>V</var> )","number":"9.5.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"[[SetPrototypeOf]] ( V )"},{"type":"clause","id":"sec-proxy-object-internal-methods-and-internal-slots-isextensible","aoid":null,"title":"[[IsExtensible]] ( )","titleHTML":"[[IsExtensible]] ( )","number":"9.5.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"[[IsExtensible]] ( )"},{"type":"clause","id":"sec-proxy-object-internal-methods-and-internal-slots-preventextensions","aoid":null,"title":"[[PreventExtensions]] ( )","titleHTML":"[[PreventExtensions]] ( )","number":"9.5.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"[[PreventExtensions]] ( )"},{"type":"clause","id":"sec-proxy-object-internal-methods-and-internal-slots-getownproperty-p","aoid":null,"title":"[[GetOwnProperty]] ( P )","titleHTML":"[[GetOwnProperty]] ( <var>P</var> )","number":"9.5.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"[[GetOwnProperty]] ( P )"},{"type":"clause","id":"sec-proxy-object-internal-methods-and-internal-slots-defineownproperty-p-desc","aoid":null,"title":"[[DefineOwnProperty]] ( P, Desc )","titleHTML":"[[DefineOwnProperty]] ( <var>P</var>, <var>Desc</var> )","number":"9.5.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"[[DefineOwnProperty]] ( P, Desc )"},{"type":"clause","id":"sec-proxy-object-internal-methods-and-internal-slots-hasproperty-p","aoid":null,"title":"[[HasProperty]] ( P )","titleHTML":"[[HasProperty]] ( <var>P</var> )","number":"9.5.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"[[HasProperty]] ( P )"},{"type":"clause","id":"sec-proxy-object-internal-methods-and-internal-slots-get-p-receiver","aoid":null,"title":"[[Get]] ( P, Receiver )","titleHTML":"[[Get]] ( <var>P</var>, <var>Receiver</var> )","number":"9.5.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"[[Get]] ( P, Receiver )"},{"type":"clause","id":"sec-proxy-object-internal-methods-and-internal-slots-set-p-v-receiver","aoid":null,"title":"[[Set]] ( P, V, Receiver )","titleHTML":"[[Set]] ( <var>P</var>, <var>V</var>, <var>Receiver</var> )","number":"9.5.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"[[Set]] ( P, V, Receiver )"},{"type":"clause","id":"sec-proxy-object-internal-methods-and-internal-slots-delete-p","aoid":null,"title":"[[Delete]] ( P )","titleHTML":"[[Delete]] ( <var>P</var> )","number":"9.5.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"[[Delete]] ( P )"},{"type":"clause","id":"sec-proxy-object-internal-methods-and-internal-slots-ownpropertykeys","aoid":null,"title":"[[OwnPropertyKeys]] ( )","titleHTML":"[[OwnPropertyKeys]] ( )","number":"9.5.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"[[OwnPropertyKeys]] ( )"},{"type":"clause","id":"sec-proxy-object-internal-methods-and-internal-slots-call-thisargument-argumentslist","aoid":null,"title":"[[Call]] ( thisArgument, argumentsList )","titleHTML":"[[Call]] ( <var>thisArgument</var>, <var>argumentsList</var> )","number":"9.5.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_249"],"key":"[[Call]] ( thisArgument, argumentsList )"},{"type":"clause","id":"sec-proxy-object-internal-methods-and-internal-slots-construct-argumentslist-newtarget","aoid":null,"title":"[[Construct]] ( argumentsList, newTarget )","titleHTML":"[[Construct]] ( <var>argumentsList</var>, <var>newTarget</var> )","number":"9.5.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_250"],"key":"[[Construct]] ( argumentsList, newTarget )"},{"type":"op","aoid":"ProxyCreate","refId":"sec-proxycreate","location":"","referencingIds":[],"key":"ProxyCreate"},{"type":"clause","id":"sec-proxycreate","aoid":"ProxyCreate","title":"ProxyCreate ( target, handler )","titleHTML":"ProxyCreate ( <var>target</var>, <var>handler</var> )","number":"9.5.14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_8376","_ref_8379"],"key":"ProxyCreate ( target, handler )"},{"type":"clause","id":"sec-proxy-object-internal-methods-and-internal-slots","aoid":null,"title":"Proxy Object Internal Methods and Internal Slots","titleHTML":"Proxy Object Internal Methods and Internal Slots","number":"9.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_248"],"key":"Proxy Object Internal Methods and Internal Slots"},{"type":"clause","id":"sec-ordinary-and-exotic-objects-behaviours","aoid":null,"title":"Ordinary and Exotic Objects Behaviours","titleHTML":"Ordinary and Exotic Objects Behaviours","number":"9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_48","_ref_750"],"key":"Ordinary and Exotic Objects Behaviours"},{"type":"production","id":"prod-SourceCharacter","name":"SourceCharacter","referencingIds":["_ref_8795","_ref_8802","_ref_8804","_ref_9095","_ref_9096","_ref_9216","_ref_9230","_ref_9231","_ref_9235","_ref_9265","_ref_9267","_ref_9302","_ref_9343","_ref_9450","_ref_9454","_ref_9466","_ref_9480","_ref_9501","_ref_9503","_ref_9507","_ref_9509","_ref_9523","_ref_9526","_ref_9560","_ref_9592","_ref_9638","_ref_9640","_ref_9663","_ref_9665","_ref_9709","_ref_9714","_ref_9738","_ref_14388","_ref_14427","_ref_14462","_ref_14522","_ref_14525","_ref_14526","_ref_14567","_ref_14568","_ref_14569","_ref_14769","_ref_14770","_ref_14788","_ref_14929","_ref_14934","_ref_14971","_ref_14987","_ref_14988","_ref_14989"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"SourceCharacter"},{"type":"op","aoid":"UTF16Encoding","refId":"sec-utf16encoding","location":"","referencingIds":[],"key":"UTF16Encoding"},{"type":"clause","id":"sec-utf16encoding","aoid":"UTF16Encoding","title":"Static Semantics: UTF16Encoding ( cp )","titleHTML":"Static Semantics: UTF16Encoding ( <var>cp</var> )","number":"10.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_287","_ref_3115","_ref_3116","_ref_3117","_ref_3118","_ref_3123","_ref_3124","_ref_3125","_ref_3126","_ref_3128","_ref_3129","_ref_3219","_ref_3220","_ref_4874","_ref_5773","_ref_5947","_ref_5973","_ref_5974","_ref_5975","_ref_5987","_ref_6155","_ref_7793"],"key":"Static Semantics: UTF16Encoding ( cp )"},{"type":"op","aoid":"UTF16Decode","refId":"sec-utf16decode","location":"","referencingIds":[],"key":"UTF16Decode"},{"type":"clause","id":"sec-utf16decode","aoid":"UTF16Decode","title":"Static Semantics: UTF16Decode ( lead, trail )","titleHTML":"Static Semantics: UTF16Decode ( <var>lead</var>, <var>trail</var> )","number":"10.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_18","_ref_4867","_ref_5805","_ref_5985","_ref_5993"],"key":"Static Semantics: UTF16Decode ( lead, trail )"},{"type":"clause","id":"sec-source-text","aoid":null,"title":"Source Text","titleHTML":"Source Text","number":"10.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_8","_ref_189","_ref_291"],"key":"Source Text"},{"type":"term","term":"strict mode code","refId":"sec-strict-mode-code","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"strict mode code"},{"type":"term","term":"non-strict code","refId":"sec-strict-mode-code","referencingIds":["_ref_2409","_ref_3156","_ref_3157","_ref_4365","_ref_8621","_ref_8734","_ref_8736","_ref_8768","_ref_8772"],"id":"non-strict-code","namespace":"https://tc39.github.io/ecma262/","location":"","key":"non-strict code"},{"type":"clause","id":"sec-strict-mode-code","aoid":null,"title":"Strict Mode Code","titleHTML":"Strict Mode Code","number":"10.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_187","_ref_1824","_ref_2013","_ref_2145","_ref_2408","_ref_2411","_ref_2412","_ref_3119","_ref_3120","_ref_3121","_ref_3122","_ref_3131","_ref_3132","_ref_3136","_ref_3141","_ref_3276","_ref_3280","_ref_3298","_ref_3329","_ref_3332","_ref_3389","_ref_3406","_ref_3407","_ref_3534","_ref_3905","_ref_4012","_ref_4013","_ref_4014","_ref_4038","_ref_4045","_ref_4049","_ref_4053","_ref_4082","_ref_4089","_ref_4099","_ref_4106","_ref_4113","_ref_4114","_ref_4120","_ref_4131","_ref_4133","_ref_4143","_ref_4149","_ref_4205","_ref_4206","_ref_4212","_ref_4218","_ref_4225","_ref_4235","_ref_4241","_ref_4250","_ref_4298","_ref_4301","_ref_4314","_ref_4323","_ref_4326","_ref_4357","_ref_4360","_ref_4366","_ref_4754","_ref_4755","_ref_4764","_ref_4765","_ref_4827","_ref_8589","_ref_8590","_ref_8591","_ref_8592","_ref_8594","_ref_8599","_ref_8600","_ref_8602","_ref_8603","_ref_8604","_ref_8605","_ref_8619","_ref_8634","_ref_8635","_ref_8763","_ref_8764"],"key":"Strict Mode Code"},{"type":"clause","id":"sec-non-ecmascript-functions","aoid":null,"title":"Non-ECMAScript Functions","titleHTML":"Non-ECMAScript Functions","number":"10.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Non-ECMAScript Functions"},{"type":"clause","id":"sec-types-of-source-code","aoid":null,"title":"Types of Source Code","titleHTML":"Types of Source Code","number":"10.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_196"],"key":"Types of Source Code"},{"type":"clause","id":"sec-ecmascript-language-source-code","aoid":null,"title":"ECMAScript Language: Source Code","titleHTML":"ECMAScript Language: Source Code","number":"10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_183","_ref_363","_ref_366","_ref_375","_ref_382","_ref_383"],"key":"ECMAScript Language: Source Code"},{"type":"production","id":"prod-InputElementDiv","name":"InputElementDiv","referencingIds":["_ref_8796","_ref_9170"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"InputElementDiv"},{"type":"production","id":"prod-InputElementRegExp","name":"InputElementRegExp","referencingIds":["_ref_8798","_ref_9162"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"InputElementRegExp"},{"type":"production","id":"prod-InputElementRegExpOrTemplateTail","name":"InputElementRegExpOrTemplateTail","referencingIds":["_ref_8799","_ref_9158","_ref_12936"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"InputElementRegExpOrTemplateTail"},{"type":"production","id":"prod-InputElementTemplateTail","name":"InputElementTemplateTail","referencingIds":["_ref_8797","_ref_9166","_ref_9621"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"InputElementTemplateTail"},{"type":"table","id":"table-31","number":31,"caption":"Table 31: Format-Control Code Point Usage","referencingIds":["_ref_267"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 31: Format-Control Code Point Usage"},{"type":"clause","id":"sec-unicode-format-control-characters","aoid":null,"title":"Unicode Format-Control Characters","titleHTML":"Unicode Format-Control Characters","number":"11.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Unicode Format-Control Characters"},{"type":"table","id":"table-32","number":32,"caption":"Table 32: White Space Code Points","referencingIds":["_ref_268","_ref_269","_ref_273"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 32: White Space Code Points"},{"type":"production","id":"prod-WhiteSpace","name":"WhiteSpace","referencingIds":["_ref_8941","_ref_9174","_ref_9180","_ref_9186","_ref_9192","_ref_9201","_ref_9207","_ref_9208","_ref_14359","_ref_14715","_ref_14936"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"WhiteSpace"},{"type":"clause","id":"sec-white-space","aoid":null,"title":"White Space","titleHTML":"White Space","number":"11.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_266","_ref_563"],"key":"White Space"},{"type":"table","id":"table-33","number":33,"caption":"Table 33: Line Terminator Code Points","referencingIds":["_ref_271","_ref_272"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 33: Line Terminator Code Points"},{"type":"production","id":"prod-LineTerminator","name":"LineTerminator","referencingIds":["_ref_8909","_ref_8910","_ref_8911","_ref_8913","_ref_8915","_ref_8916","_ref_8942","_ref_9172","_ref_9173","_ref_9175","_ref_9181","_ref_9187","_ref_9193","_ref_9217","_ref_9218","_ref_9220","_ref_9236","_ref_9451","_ref_9455","_ref_9468","_ref_9502","_ref_9508","_ref_9525","_ref_9561","_ref_9593","_ref_9639","_ref_9664","_ref_9745","_ref_9746","_ref_9747","_ref_9749","_ref_9751","_ref_9752","_ref_9754","_ref_9756","_ref_9758","_ref_9761","_ref_9763","_ref_9765","_ref_9767","_ref_9768","_ref_9772","_ref_9773","_ref_10388","_ref_10390","_ref_11458","_ref_12047","_ref_12056","_ref_12065","_ref_12387","_ref_12740","_ref_12932","_ref_12934","_ref_13070","_ref_13074","_ref_13078","_ref_13081","_ref_13350","_ref_13354","_ref_13357","_ref_13360","_ref_13364","_ref_13523","_ref_13525","_ref_13528","_ref_13538","_ref_14110","_ref_14360","_ref_14637","_ref_14638","_ref_14661","_ref_14716","_ref_14793","_ref_14915","_ref_14930","_ref_14935","_ref_14943","_ref_15267"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"LineTerminator"},{"type":"production","id":"prod-LineTerminatorSequence","name":"LineTerminatorSequence","referencingIds":["_ref_9458","_ref_9591","_ref_9646","_ref_9647","_ref_9648","_ref_9672","_ref_9673","_ref_9740","_ref_9741","_ref_9743","_ref_14920"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"LineTerminatorSequence"},{"type":"clause","id":"sec-line-terminators","aoid":null,"title":"Line Terminators","titleHTML":"Line Terminators","number":"11.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Line Terminators"},{"type":"production","id":"prod-Comment","name":"Comment","referencingIds":["_ref_9176","_ref_9182","_ref_9188","_ref_9194","_ref_9206"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Comment"},{"type":"production","id":"prod-MultiLineComment","name":"MultiLineComment","referencingIds":["_ref_8800","_ref_8801","_ref_9214","_ref_9219","_ref_9221"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"MultiLineComment"},{"type":"production","id":"prod-MultiLineCommentChars","name":"MultiLineCommentChars","referencingIds":["_ref_9223","_ref_9225","_ref_9228","_ref_14916"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"MultiLineCommentChars"},{"type":"production","id":"prod-PostAsteriskCommentChars","name":"PostAsteriskCommentChars","referencingIds":["_ref_9226","_ref_9229"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"PostAsteriskCommentChars"},{"type":"production","id":"prod-MultiLineNotAsteriskChar","name":"MultiLineNotAsteriskChar","referencingIds":["_ref_9224"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"MultiLineNotAsteriskChar"},{"type":"production","id":"prod-MultiLineNotForwardSlashOrAsteriskChar","name":"MultiLineNotForwardSlashOrAsteriskChar","referencingIds":["_ref_9227"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"MultiLineNotForwardSlashOrAsteriskChar"},{"type":"production","id":"prod-SingleLineComment","name":"SingleLineComment","referencingIds":["_ref_9215","_ref_9222","_ref_14795","_ref_14910"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"SingleLineComment"},{"type":"production","id":"prod-SingleLineCommentChars","name":"SingleLineCommentChars","referencingIds":["_ref_9232","_ref_9234","_ref_14919","_ref_14925"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"SingleLineCommentChars"},{"type":"production","id":"prod-SingleLineCommentChar","name":"SingleLineCommentChar","referencingIds":["_ref_9233"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"SingleLineCommentChar"},{"type":"clause","id":"sec-comments","aoid":null,"title":"Comments","titleHTML":"Comments","number":"11.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_726"],"key":"Comments"},{"type":"production","id":"prod-CommonToken","name":"CommonToken","referencingIds":["_ref_9177","_ref_9183","_ref_9189","_ref_9195","_ref_9246"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"CommonToken"},{"type":"clause","id":"sec-tokens","aoid":null,"title":"Tokens","titleHTML":"Tokens","number":"11.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Tokens"},{"type":"production","id":"prod-IdentifierName","name":"IdentifierName","referencingIds":["_ref_8917","_ref_8920","_ref_9034","_ref_9198","_ref_9237","_ref_9247","_ref_9250","_ref_9252","_ref_9254","_ref_9255","_ref_9256","_ref_9257","_ref_9261","_ref_9263","_ref_9266","_ref_9268","_ref_9269","_ref_9270","_ref_9273","_ref_9289","_ref_9291","_ref_9294","_ref_9295","_ref_9777","_ref_9788","_ref_9790","_ref_9792","_ref_9793","_ref_9795","_ref_9796","_ref_9804","_ref_9806","_ref_9956","_ref_9985","_ref_9988","_ref_9997","_ref_9998","_ref_10015","_ref_10016","_ref_10181","_ref_10189","_ref_10200","_ref_10222","_ref_10226","_ref_10227","_ref_10231","_ref_10233","_ref_10237","_ref_10241","_ref_10257","_ref_10269","_ref_10281","_ref_10285","_ref_10299","_ref_10301","_ref_10307","_ref_10310","_ref_10312","_ref_10319","_ref_10321","_ref_10329","_ref_10331","_ref_10357","_ref_10358","_ref_13112","_ref_13113","_ref_13788","_ref_13793","_ref_14045","_ref_14067","_ref_14093","_ref_14095","_ref_14117","_ref_14118","_ref_14119","_ref_14121","_ref_14156","_ref_14157","_ref_14158","_ref_14159","_ref_14160","_ref_14177","_ref_14178","_ref_14179","_ref_14180","_ref_14181","_ref_14203","_ref_14204","_ref_14205","_ref_14206","_ref_14207","_ref_14208","_ref_14242","_ref_14243","_ref_14244","_ref_14245","_ref_14246","_ref_15262","_ref_15263"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"IdentifierName"},{"type":"production","id":"prod-IdentifierStart","name":"IdentifierStart","referencingIds":["_ref_9272","_ref_9288","_ref_9345"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"IdentifierStart"},{"type":"production","id":"prod-IdentifierPart","name":"IdentifierPart","referencingIds":["_ref_9199","_ref_9200","_ref_9274","_ref_9280","_ref_9290","_ref_9568","_ref_9570","_ref_9571"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"IdentifierPart"},{"type":"production","id":"prod-UnicodeIDStart","name":"UnicodeIDStart","referencingIds":["_ref_9275","_ref_9284","_ref_14405","_ref_14502"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"UnicodeIDStart"},{"type":"production","id":"prod-UnicodeIDContinue","name":"UnicodeIDContinue","referencingIds":["_ref_9277","_ref_9281","_ref_9287","_ref_14407","_ref_14428","_ref_14505"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"UnicodeIDContinue"},{"type":"clause","id":"sec-identifier-names-static-semantics-early-errors","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"11.6.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: Early Errors"},{"type":"clause","id":"sec-identifier-names-static-semantics-stringvalue","aoid":null,"title":"Static Semantics: StringValue","titleHTML":"Static Semantics: StringValue","number":"11.6.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: StringValue"},{"type":"clause","id":"sec-identifier-names","aoid":null,"title":"Identifier Names","titleHTML":"Identifier Names","number":"11.6.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Identifier Names"},{"type":"production","id":"prod-ReservedWord","name":"ReservedWord","referencingIds":["_ref_8918","_ref_8921","_ref_9248","_ref_9249","_ref_9253","_ref_9301","_ref_9303","_ref_9778","_ref_9789","_ref_9794","_ref_9798","_ref_9805","_ref_9986","_ref_10224","_ref_10228","_ref_10229","_ref_10235","_ref_14123"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ReservedWord"},{"type":"production","id":"prod-Keyword","name":"Keyword","referencingIds":["_ref_9297"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Keyword"},{"type":"clause","id":"sec-keywords","aoid":null,"title":"Keywords","titleHTML":"Keywords","number":"11.6.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Keywords"},{"type":"production","id":"prod-FutureReservedWord","name":"FutureReservedWord","referencingIds":["_ref_9298","_ref_14820"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"FutureReservedWord"},{"type":"clause","id":"sec-future-reserved-words","aoid":null,"title":"Future Reserved Words","titleHTML":"Future Reserved Words","number":"11.6.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1"],"key":"Future Reserved Words"},{"type":"clause","id":"sec-reserved-words","aoid":null,"title":"Reserved Words","titleHTML":"Reserved Words","number":"11.6.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_776"],"key":"Reserved Words"},{"type":"clause","id":"sec-names-and-keywords","aoid":null,"title":"Names and Keywords","titleHTML":"Names and Keywords","number":"11.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_816"],"key":"Names and Keywords"},{"type":"production","id":"prod-Punctuator","name":"Punctuator","referencingIds":["_ref_9238"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Punctuator"},{"type":"production","id":"prod-DivPunctuator","name":"DivPunctuator","referencingIds":["_ref_9178","_ref_9196","_ref_9242"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"DivPunctuator"},{"type":"production","id":"prod-RightBracePunctuator","name":"RightBracePunctuator","referencingIds":["_ref_9179","_ref_9184","_ref_9244"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"RightBracePunctuator"},{"type":"clause","id":"sec-punctuators","aoid":null,"title":"Punctuators","titleHTML":"Punctuators","number":"11.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Punctuators"},{"type":"production","id":"prod-NullLiteral","name":"NullLiteral","referencingIds":["_ref_9299","_ref_9875","_ref_9879"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"NullLiteral"},{"type":"clause","id":"sec-null-literals","aoid":null,"title":"Null Literals","titleHTML":"Null Literals","number":"11.8.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Null Literals"},{"type":"production","id":"prod-BooleanLiteral","name":"BooleanLiteral","referencingIds":["_ref_9300","_ref_9876","_ref_9880","_ref_9881","_ref_9882"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"BooleanLiteral"},{"type":"clause","id":"sec-boolean-literals","aoid":null,"title":"Boolean Literals","titleHTML":"Boolean Literals","number":"11.8.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Boolean Literals"},{"type":"production","id":"prod-NumericLiteral","name":"NumericLiteral","referencingIds":["_ref_8958","_ref_8964","_ref_9239","_ref_9344","_ref_9347","_ref_9877","_ref_9883","_ref_9884","_ref_9958","_ref_10001","_ref_10002","_ref_10019","_ref_10020","_ref_14285","_ref_15243"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"NumericLiteral"},{"type":"production","id":"prod-DecimalLiteral","name":"DecimalLiteral","referencingIds":["_ref_9307","_ref_9349","_ref_9350","_ref_9441","_ref_14831"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"DecimalLiteral"},{"type":"production","id":"prod-DecimalIntegerLiteral","name":"DecimalIntegerLiteral","referencingIds":["_ref_9311","_ref_9316","_ref_9348","_ref_9357","_ref_9358","_ref_9359","_ref_9361","_ref_9364","_ref_9366","_ref_9368","_ref_9371","_ref_9383","_ref_9384","_ref_9385","_ref_9387","_ref_14286","_ref_15244"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"DecimalIntegerLiteral"},{"type":"production","id":"prod-DecimalDigits","name":"DecimalDigits","referencingIds":["_ref_8950","_ref_8951","_ref_8953","_ref_8955","_ref_8985","_ref_8986","_ref_8987","_ref_8988","_ref_8989","_ref_8990","_ref_8991","_ref_8992","_ref_8994","_ref_8996","_ref_8997","_ref_8999","_ref_9000","_ref_9001","_ref_9003","_ref_9004","_ref_9005","_ref_9006","_ref_9008","_ref_9009","_ref_9011","_ref_9012","_ref_9013","_ref_9015","_ref_9312","_ref_9314","_ref_9319","_ref_9321","_ref_9325","_ref_9326","_ref_9327","_ref_9360","_ref_9362","_ref_9363","_ref_9369","_ref_9372","_ref_9373","_ref_9375","_ref_9376","_ref_9377","_ref_9378","_ref_9380","_ref_9381","_ref_9392","_ref_9394","_ref_9395","_ref_9398","_ref_9400","_ref_9405","_ref_9406","_ref_9407","_ref_9408","_ref_9409","_ref_9410","_ref_14378","_ref_14379","_ref_14380","_ref_14381","_ref_14430","_ref_14470","_ref_14471","_ref_14472","_ref_14473","_ref_14516","_ref_14517","_ref_14519","_ref_14521","_ref_14651","_ref_14652","_ref_14653","_ref_14654","_ref_14655","_ref_14656","_ref_14657","_ref_14658","_ref_14713","_ref_14840","_ref_14967","_ref_14968","_ref_14969","_ref_14970"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"DecimalDigits"},{"type":"production","id":"prod-DecimalDigit","name":"DecimalDigit","referencingIds":["_ref_9320","_ref_9322","_ref_9346","_ref_9396","_ref_9397","_ref_9399","_ref_9401","_ref_9460","_ref_9470","_ref_9594","_ref_9595","_ref_9680","_ref_9681","_ref_14327","_ref_14396","_ref_14431","_ref_14530","_ref_14706","_ref_14846","_ref_14865","_ref_14867","_ref_14980","_ref_14994"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"DecimalDigit"},{"type":"production","id":"prod-NonZeroDigit","name":"NonZeroDigit","referencingIds":["_ref_9318","_ref_9389","_ref_9390","_ref_9391","_ref_9393","_ref_14429","_ref_14513","_ref_14514","_ref_14515","_ref_14518","_ref_14520","_ref_14712","_ref_14839"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"NonZeroDigit"},{"type":"production","id":"prod-ExponentPart","name":"ExponentPart","referencingIds":["_ref_8952","_ref_8954","_ref_8956","_ref_8993","_ref_8995","_ref_8998","_ref_9002","_ref_9007","_ref_9010","_ref_9014","_ref_9016","_ref_9018","_ref_9019","_ref_9313","_ref_9315","_ref_9317","_ref_9365","_ref_9367","_ref_9370","_ref_9374","_ref_9379","_ref_9382","_ref_9386","_ref_9388","_ref_9442","_ref_9443"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ExponentPart"},{"type":"production","id":"prod-ExponentIndicator","name":"ExponentIndicator","referencingIds":["_ref_9323","_ref_9402"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ExponentIndicator"},{"type":"production","id":"prod-SignedInteger","name":"SignedInteger","referencingIds":["_ref_9324","_ref_9403","_ref_9404"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"SignedInteger"},{"type":"production","id":"prod-BinaryIntegerLiteral","name":"BinaryIntegerLiteral","referencingIds":["_ref_8944","_ref_8972","_ref_8973","_ref_9308","_ref_9351","_ref_9352","_ref_14832","_ref_15260"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"BinaryIntegerLiteral"},{"type":"production","id":"prod-BinaryDigits","name":"BinaryDigits","referencingIds":["_ref_9328","_ref_9329","_ref_9331","_ref_9411","_ref_9412","_ref_9413","_ref_9414","_ref_9417","_ref_9419"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"BinaryDigits"},{"type":"production","id":"prod-BinaryDigit","name":"BinaryDigit","referencingIds":["_ref_9330","_ref_9332","_ref_9415","_ref_9416","_ref_9418","_ref_9420"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"BinaryDigit"},{"type":"production","id":"prod-OctalIntegerLiteral","name":"OctalIntegerLiteral","referencingIds":["_ref_8945","_ref_8974","_ref_8975","_ref_9309","_ref_9353","_ref_9354","_ref_14833","_ref_15261"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"OctalIntegerLiteral"},{"type":"production","id":"prod-OctalDigits","name":"OctalDigits","referencingIds":["_ref_9333","_ref_9334","_ref_9336","_ref_9421","_ref_9422","_ref_9423","_ref_9424","_ref_9427","_ref_9429"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"OctalDigits"},{"type":"production","id":"prod-OctalDigit","name":"OctalDigit","referencingIds":["_ref_9335","_ref_9337","_ref_9425","_ref_9426","_ref_9428","_ref_9430","_ref_14836","_ref_14838","_ref_14847","_ref_14849","_ref_14850","_ref_14851","_ref_14853","_ref_14855","_ref_14868","_ref_14869","_ref_14871","_ref_14873","_ref_14878","_ref_14879","_ref_14881","_ref_14882","_ref_14884","_ref_14886","_ref_14887","_ref_14892","_ref_14893","_ref_14895","_ref_14897","_ref_14899","_ref_14901","_ref_14903","_ref_14904","_ref_14906","_ref_14907"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"OctalDigit"},{"type":"production","id":"prod-HexIntegerLiteral","name":"HexIntegerLiteral","referencingIds":["_ref_8946","_ref_8976","_ref_8977","_ref_9310","_ref_9355","_ref_9356","_ref_14834"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"HexIntegerLiteral"},{"type":"production","id":"prod-HexDigits","name":"HexDigits","referencingIds":["_ref_9338","_ref_9339","_ref_9341","_ref_9431","_ref_9432","_ref_9433","_ref_9434","_ref_9437","_ref_9439","_ref_9614","_ref_9615","_ref_9616","_ref_9617","_ref_9733","_ref_9735","_ref_14550"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"HexDigits"},{"type":"production","id":"prod-HexDigit","name":"HexDigit","referencingIds":["_ref_9340","_ref_9342","_ref_9435","_ref_9436","_ref_9438","_ref_9440","_ref_9471","_ref_9472","_ref_9475","_ref_9476","_ref_9477","_ref_9478","_ref_9479","_ref_9527","_ref_9528","_ref_9529","_ref_9530","_ref_9533","_ref_9534","_ref_9535","_ref_9536","_ref_9537","_ref_9538","_ref_9539","_ref_9540","_ref_9596","_ref_9597","_ref_9598","_ref_9599","_ref_9600","_ref_9601","_ref_9602","_ref_9603","_ref_9604","_ref_9605","_ref_9606","_ref_9607","_ref_9608","_ref_9609","_ref_9611","_ref_9613","_ref_9682","_ref_9683","_ref_9684","_ref_9685","_ref_9686","_ref_9687","_ref_9688","_ref_9689","_ref_9690","_ref_9691","_ref_9692","_ref_9693","_ref_9694","_ref_9695","_ref_9696","_ref_9697","_ref_9698","_ref_9699","_ref_9700","_ref_9701","_ref_9702","_ref_9704","_ref_9707","_ref_9715","_ref_9716","_ref_9717","_ref_9718","_ref_9723","_ref_9724","_ref_9725","_ref_9726","_ref_9727","_ref_9728","_ref_9729","_ref_9730","_ref_9731","_ref_9732","_ref_9734","_ref_9736","_ref_9737","_ref_9739","_ref_14329","_ref_14330"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"HexDigit"},{"type":"clause","id":"sec-static-semantics-mv","aoid":null,"title":"Static Semantics: MV","titleHTML":"Static Semantics: MV","number":"11.8.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_141"],"key":"Static Semantics: MV"},{"type":"clause","id":"sec-literals-numeric-literals","aoid":null,"title":"Numeric Literals","titleHTML":"Numeric Literals","number":"11.8.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_139","_ref_140","_ref_290","_ref_292","_ref_300","_ref_306","_ref_546","_ref_553","_ref_723","_ref_724"],"key":"Numeric Literals"},{"type":"production","id":"prod-StringLiteral","name":"StringLiteral","referencingIds":["_ref_9202","_ref_9209","_ref_9212","_ref_9240","_ref_9484","_ref_9878","_ref_9885","_ref_9886","_ref_9957","_ref_9999","_ref_10000","_ref_10017","_ref_10018","_ref_12548","_ref_12550","_ref_14047","_ref_14100","_ref_14101","_ref_14781","_ref_14782","_ref_14783"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"StringLiteral"},{"type":"production","id":"prod-DoubleStringCharacters","name":"DoubleStringCharacters","referencingIds":["_ref_9444","_ref_9447","_ref_9482","_ref_9485","_ref_9486","_ref_9492","_ref_9494"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"DoubleStringCharacters"},{"type":"production","id":"prod-SingleStringCharacters","name":"SingleStringCharacters","referencingIds":["_ref_9445","_ref_9449","_ref_9483","_ref_9487","_ref_9488","_ref_9498","_ref_9500"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"SingleStringCharacters"},{"type":"production","id":"prod-DoubleStringCharacter","name":"DoubleStringCharacter","referencingIds":["_ref_9446","_ref_9489","_ref_9490","_ref_9491","_ref_9493"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"DoubleStringCharacter"},{"type":"production","id":"prod-SingleStringCharacter","name":"SingleStringCharacter","referencingIds":["_ref_9448","_ref_9495","_ref_9496","_ref_9497","_ref_9499"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"SingleStringCharacter"},{"type":"production","id":"prod-LineContinuation","name":"LineContinuation","referencingIds":["_ref_9213","_ref_9453","_ref_9457","_ref_9481","_ref_9506","_ref_9512","_ref_9590","_ref_9644","_ref_9645","_ref_9670","_ref_9671","_ref_9742","_ref_12552"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"LineContinuation"},{"type":"production","id":"prod-EscapeSequence","name":"EscapeSequence","referencingIds":["_ref_9452","_ref_9456","_ref_9463","_ref_9504","_ref_9505","_ref_9510","_ref_9511","_ref_9588","_ref_9618","_ref_9641","_ref_9642","_ref_9666","_ref_9667","_ref_9744","_ref_12551","_ref_15245"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"EscapeSequence"},{"type":"production","id":"prod-CharacterEscapeSequence","name":"CharacterEscapeSequence","referencingIds":["_ref_9459","_ref_9513","_ref_9514","_ref_9674","_ref_9675","_ref_14874"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"CharacterEscapeSequence"},{"type":"production","id":"prod-SingleEscapeCharacter","name":"SingleEscapeCharacter","referencingIds":["_ref_9464","_ref_9469","_ref_9519","_ref_9520","_ref_9710","_ref_9711"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"SingleEscapeCharacter"},{"type":"production","id":"prod-NonEscapeCharacter","name":"NonEscapeCharacter","referencingIds":["_ref_9465","_ref_9521","_ref_9522","_ref_9712","_ref_9713"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"NonEscapeCharacter"},{"type":"production","id":"prod-EscapeCharacter","name":"EscapeCharacter","referencingIds":["_ref_9467","_ref_9524"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"EscapeCharacter"},{"type":"production","id":"prod-HexEscapeSequence","name":"HexEscapeSequence","referencingIds":["_ref_9461","_ref_9515","_ref_9516","_ref_9676","_ref_9677","_ref_14397","_ref_14531","_ref_14532","_ref_14707","_ref_14876","_ref_14981"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"HexEscapeSequence"},{"type":"production","id":"prod-UnicodeEscapeSequence","name":"UnicodeEscapeSequence","referencingIds":["_ref_9259","_ref_9260","_ref_9262","_ref_9264","_ref_9271","_ref_9276","_ref_9278","_ref_9279","_ref_9282","_ref_9283","_ref_9285","_ref_9286","_ref_9292","_ref_9293","_ref_9304","_ref_9462","_ref_9517","_ref_9518","_ref_9678","_ref_9679","_ref_14877"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"UnicodeEscapeSequence"},{"type":"production","id":"prod-Hex4Digits","name":"Hex4Digits","referencingIds":["_ref_9473","_ref_9531","_ref_9532","_ref_9719","_ref_9720","_ref_14414","_ref_14420","_ref_14421","_ref_14422","_ref_14423","_ref_14424","_ref_14425","_ref_14543","_ref_14544","_ref_14547","_ref_14548","_ref_14549"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Hex4Digits"},{"type":"clause","id":"sec-string-literals-static-semantics-stringvalue","aoid":null,"title":"Static Semantics: StringValue","titleHTML":"Static Semantics: StringValue","number":"11.8.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_307"],"key":"Static Semantics: StringValue"},{"type":"table","id":"table-34","number":34,"caption":"Table 34: String Single Character Escape Sequences","referencingIds":["_ref_293"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 34: String Single Character Escape Sequences"},{"type":"clause","id":"sec-static-semantics-sv","aoid":null,"title":"Static Semantics: SV","titleHTML":"Static Semantics: SV","number":"11.8.4.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: SV"},{"type":"clause","id":"sec-literals-string-literals","aoid":null,"title":"String Literals","titleHTML":"String Literals","number":"11.8.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_275","_ref_276","_ref_299","_ref_725"],"key":"String Literals"},{"type":"production","id":"prod-RegularExpressionLiteral","name":"RegularExpressionLiteral","referencingIds":["_ref_9159","_ref_9163","_ref_9169","_ref_9171","_ref_9185","_ref_9190","_ref_9203","_ref_9243","_ref_9823","_ref_9846","_ref_9859","_ref_9870","_ref_10043","_ref_10044","_ref_10046","_ref_10047","_ref_10048","_ref_10049","_ref_13807","_ref_14794","_ref_14796","_ref_14800"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"RegularExpressionLiteral"},{"type":"production","id":"prod-RegularExpressionBody","name":"RegularExpressionBody","referencingIds":["_ref_9543","_ref_9545","_ref_9547","_ref_9572","_ref_9574","_ref_9575"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"RegularExpressionBody"},{"type":"production","id":"prod-RegularExpressionChars","name":"RegularExpressionChars","referencingIds":["_ref_9550","_ref_9551"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"RegularExpressionChars"},{"type":"production","id":"prod-RegularExpressionFirstChar","name":"RegularExpressionFirstChar","referencingIds":["_ref_9549"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"RegularExpressionFirstChar"},{"type":"production","id":"prod-RegularExpressionChar","name":"RegularExpressionChar","referencingIds":["_ref_9552"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"RegularExpressionChar"},{"type":"production","id":"prod-RegularExpressionBackslashSequence","name":"RegularExpressionBackslashSequence","referencingIds":["_ref_9554","_ref_9557","_ref_9566"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"RegularExpressionBackslashSequence"},{"type":"production","id":"prod-RegularExpressionNonTerminator","name":"RegularExpressionNonTerminator","referencingIds":["_ref_9553","_ref_9556","_ref_9559","_ref_9565"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"RegularExpressionNonTerminator"},{"type":"production","id":"prod-RegularExpressionClass","name":"RegularExpressionClass","referencingIds":["_ref_9555","_ref_9558"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"RegularExpressionClass"},{"type":"production","id":"prod-RegularExpressionClassChars","name":"RegularExpressionClassChars","referencingIds":["_ref_9562","_ref_9563"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"RegularExpressionClassChars"},{"type":"production","id":"prod-RegularExpressionClassChar","name":"RegularExpressionClassChar","referencingIds":["_ref_9564"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"RegularExpressionClassChar"},{"type":"production","id":"prod-RegularExpressionFlags","name":"RegularExpressionFlags","referencingIds":["_ref_9544","_ref_9546","_ref_9548","_ref_9567","_ref_9569","_ref_9573","_ref_9576","_ref_9577"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"RegularExpressionFlags"},{"type":"clause","id":"sec-literals-regular-expression-literals-static-semantics-early-errors","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"11.8.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: Early Errors"},{"type":"clause","id":"sec-static-semantics-bodytext","aoid":null,"title":"Static Semantics: BodyText","titleHTML":"Static Semantics: BodyText","number":"11.8.5.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: BodyText"},{"type":"clause","id":"sec-static-semantics-flagtext","aoid":null,"title":"Static Semantics: FlagText","titleHTML":"Static Semantics: FlagText","number":"11.8.5.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: FlagText"},{"type":"clause","id":"sec-literals-regular-expression-literals","aoid":null,"title":"Regular Expression Literals","titleHTML":"Regular Expression Literals","number":"11.8.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_315"],"key":"Regular Expression Literals"},{"type":"production","id":"prod-Template","name":"Template","referencingIds":["_ref_9204","_ref_9210","_ref_9241"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Template"},{"type":"production","id":"prod-NoSubstitutionTemplate","name":"NoSubstitutionTemplate","referencingIds":["_ref_9578","_ref_10050","_ref_10063","_ref_10065","_ref_10082","_ref_10083","_ref_10084","_ref_10109","_ref_10131","_ref_10132"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"NoSubstitutionTemplate"},{"type":"production","id":"prod-TemplateHead","name":"TemplateHead","referencingIds":["_ref_9579","_ref_10052","_ref_10067","_ref_10070","_ref_10085","_ref_10088","_ref_10089","_ref_10111","_ref_10133","_ref_10136"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"TemplateHead"},{"type":"production","id":"prod-TemplateSubstitutionTail","name":"TemplateSubstitutionTail","referencingIds":["_ref_9191","_ref_9197","_ref_9205","_ref_9211","_ref_9245","_ref_9620"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"TemplateSubstitutionTail"},{"type":"production","id":"prod-TemplateMiddle","name":"TemplateMiddle","referencingIds":["_ref_9160","_ref_9164","_ref_9167","_ref_9582","_ref_10058","_ref_10061","_ref_10075","_ref_10078","_ref_10080","_ref_10099","_ref_10101","_ref_10102","_ref_10104","_ref_10107","_ref_10108","_ref_10123","_ref_10127","_ref_10146","_ref_10148","_ref_10152","_ref_10155"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"TemplateMiddle"},{"type":"production","id":"prod-TemplateTail","name":"TemplateTail","referencingIds":["_ref_9161","_ref_9165","_ref_9168","_ref_9583","_ref_10055","_ref_10057","_ref_10072","_ref_10073","_ref_10091","_ref_10092","_ref_10093","_ref_10095","_ref_10097","_ref_10098","_ref_10119","_ref_10121","_ref_10140","_ref_10141","_ref_10143","_ref_10145"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"TemplateTail"},{"type":"production","id":"prod-TemplateCharacters","name":"TemplateCharacters","referencingIds":["_ref_9580","_ref_9581","_ref_9584","_ref_9585","_ref_9587","_ref_9622","_ref_9623","_ref_9624","_ref_9625","_ref_9626","_ref_9627","_ref_9628","_ref_9629","_ref_9633","_ref_9635","_ref_9637","_ref_9649","_ref_9650","_ref_9651","_ref_9652","_ref_9653","_ref_9654","_ref_9655","_ref_9656","_ref_9660","_ref_9662"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"TemplateCharacters"},{"type":"production","id":"prod-TemplateCharacter","name":"TemplateCharacter","referencingIds":["_ref_9586","_ref_9619","_ref_9630","_ref_9631","_ref_9632","_ref_9634","_ref_9636","_ref_9657","_ref_9658","_ref_9659","_ref_9661","_ref_14287","_ref_14889"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"TemplateCharacter"},{"type":"production","id":"prod-NotEscapeSequence","name":"NotEscapeSequence","referencingIds":["_ref_9589","_ref_9643","_ref_9668","_ref_9669","_ref_10066","_ref_10071","_ref_10074","_ref_10081"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"NotEscapeSequence"},{"type":"production","id":"prod-NotCodePoint","name":"NotCodePoint","referencingIds":["_ref_9610","_ref_9703","_ref_9705"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"NotCodePoint"},{"type":"production","id":"prod-CodePoint","name":"CodePoint","referencingIds":["_ref_9258","_ref_9474","_ref_9541","_ref_9542","_ref_9612","_ref_9706","_ref_9708","_ref_9721","_ref_9722","_ref_14415","_ref_14545","_ref_14546"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"CodePoint"},{"type":"clause","id":"sec-static-semantics-tv-and-trv","aoid":null,"title":"Static Semantics: TV and TRV","titleHTML":"Static Semantics: TV and TRV","number":"11.8.6.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: TV and TRV"},{"type":"clause","id":"sec-template-literal-lexical-components","aoid":null,"title":"Template Literal Lexical Components","titleHTML":"Template Literal Lexical Components","number":"11.8.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_318","_ref_319","_ref_320","_ref_321","_ref_322","_ref_323"],"key":"Template Literal Lexical Components"},{"type":"clause","id":"sec-ecmascript-language-lexical-grammar-literals","aoid":null,"title":"Literals","titleHTML":"Literals","number":"11.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Literals"},{"type":"clause","id":"sec-rules-of-automatic-semicolon-insertion","aoid":null,"title":"Rules of Automatic Semicolon Insertion","titleHTML":"Rules of Automatic Semicolon Insertion","number":"11.9.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_817"],"key":"Rules of Automatic Semicolon Insertion"},{"type":"clause","id":"sec-examples-of-automatic-semicolon-insertion","aoid":null,"title":"Examples of Automatic Semicolon Insertion","titleHTML":"Examples of Automatic Semicolon Insertion","number":"11.9.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Examples of Automatic Semicolon Insertion"},{"type":"clause","id":"sec-automatic-semicolon-insertion","aoid":null,"title":"Automatic Semicolon Insertion","titleHTML":"Automatic Semicolon Insertion","number":"11.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_9","_ref_265","_ref_270","_ref_274"],"key":"Automatic Semicolon Insertion"},{"type":"clause","id":"sec-ecmascript-language-lexical-grammar","aoid":null,"title":"ECMAScript Language: Lexical Grammar","titleHTML":"ECMAScript Language: Lexical Grammar","number":"11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7","_ref_301"],"key":"ECMAScript Language: Lexical Grammar"},{"type":"production","id":"prod-IdentifierReference","name":"IdentifierReference","referencingIds":["_ref_9802","_ref_9811","_ref_9812","_ref_9814","_ref_9842","_ref_9850","_ref_9874","_ref_9948","_ref_9960","_ref_9991","_ref_9992","_ref_10029","_ref_10030","_ref_10031","_ref_10445","_ref_10801","_ref_10809","_ref_10811","_ref_10856","_ref_10858","_ref_13798","_ref_14125","_ref_15099","_ref_15107","_ref_15110","_ref_15114","_ref_15117","_ref_15248"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"IdentifierReference"},{"type":"production","id":"prod-BindingIdentifier","name":"BindingIdentifier","referencingIds":["_ref_8832","_ref_8834","_ref_8835","_ref_8884","_ref_8886","_ref_8887","_ref_8888","_ref_8890","_ref_8892","_ref_9087","_ref_9779","_ref_9828","_ref_9831","_ref_11155","_ref_11163","_ref_11175","_ref_11177","_ref_11191","_ref_11192","_ref_11194","_ref_11196","_ref_11204","_ref_11215","_ref_11223","_ref_11225","_ref_11243","_ref_11244","_ref_11246","_ref_11251","_ref_11270","_ref_11285","_ref_11287","_ref_11315","_ref_11317","_ref_11350","_ref_11351","_ref_11353","_ref_11359","_ref_11360","_ref_11365","_ref_11366","_ref_11392","_ref_11393","_ref_11430","_ref_11432","_ref_11442","_ref_11443","_ref_11451","_ref_11453","_ref_11581","_ref_11901","_ref_12045","_ref_12046","_ref_12402","_ref_12520","_ref_12525","_ref_12556","_ref_12561","_ref_12565","_ref_12566","_ref_12585","_ref_12594","_ref_12597","_ref_12608","_ref_12613","_ref_12644","_ref_12649","_ref_12654","_ref_12693","_ref_12697","_ref_12710","_ref_12721","_ref_12725","_ref_12729","_ref_12734","_ref_12742","_ref_12776","_ref_12778","_ref_12781","_ref_12784","_ref_12787","_ref_12790","_ref_12799","_ref_12800","_ref_12923","_ref_12928","_ref_12950","_ref_12955","_ref_12959","_ref_12960","_ref_12975","_ref_12978","_ref_12985","_ref_12990","_ref_13002","_ref_13005","_ref_13010","_ref_13019","_ref_13023","_ref_13050","_ref_13054","_ref_13058","_ref_13063","_ref_13075","_ref_13082","_ref_13102","_ref_13107","_ref_13111","_ref_13130","_ref_13133","_ref_13140","_ref_13145","_ref_13157","_ref_13160","_ref_13165","_ref_13174","_ref_13178","_ref_13206","_ref_13210","_ref_13214","_ref_13219","_ref_13222","_ref_13225","_ref_13250","_ref_13252","_ref_13283","_ref_13285","_ref_13288","_ref_13327","_ref_13329","_ref_13339","_ref_13344","_ref_13346","_ref_13347","_ref_13351","_ref_13361","_ref_13386","_ref_13402","_ref_13409","_ref_13417","_ref_13418","_ref_13429","_ref_13432","_ref_13439","_ref_13446","_ref_13458","_ref_13461","_ref_13468","_ref_13475","_ref_13479","_ref_13502","_ref_13513","_ref_13517","_ref_13532","_ref_13578","_ref_13579","_ref_13584","_ref_13592","_ref_13593","_ref_13869","_ref_13876","_ref_14048","_ref_14284","_ref_14308","_ref_14315","_ref_15252","_ref_15258"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"BindingIdentifier"},{"type":"production","id":"prod-LabelIdentifier","name":"LabelIdentifier","referencingIds":["_ref_9753","_ref_9755","_ref_9771","_ref_12048","_ref_12049","_ref_12052","_ref_12053","_ref_12054","_ref_12055","_ref_12057","_ref_12061","_ref_12062","_ref_12063","_ref_12064","_ref_12300","_ref_12309","_ref_12311","_ref_12314","_ref_12316","_ref_12319","_ref_12321","_ref_12328","_ref_12334","_ref_12340","_ref_12342","_ref_12344","_ref_12354","_ref_12364","_ref_12368","_ref_12372","_ref_12374","_ref_12384","_ref_13686"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"LabelIdentifier"},{"type":"production","id":"prod-Identifier","name":"Identifier","referencingIds":["_ref_9020","_ref_9251","_ref_9296","_ref_9305","_ref_9306","_ref_9774","_ref_9775","_ref_9776","_ref_9780","_ref_9781","_ref_9783","_ref_9784","_ref_9785","_ref_9786","_ref_9787","_ref_9797","_ref_9799","_ref_9800","_ref_9801","_ref_9803","_ref_9807","_ref_9808","_ref_9809","_ref_9810","_ref_9813","_ref_9987","_ref_10225","_ref_10230","_ref_10236","_ref_11253","_ref_15219","_ref_15264","_ref_15268","_ref_15270","_ref_15298","_ref_15303"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Identifier"},{"type":"clause","id":"sec-identifiers-static-semantics-early-errors","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"12.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_277","_ref_278","_ref_282","_ref_789"],"key":"Static Semantics: Early Errors"},{"type":"clause","id":"sec-identifiers-static-semantics-boundnames","aoid":null,"title":"Static Semantics: BoundNames","titleHTML":"Static Semantics: BoundNames","number":"12.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: BoundNames"},{"type":"clause","id":"sec-identifiers-static-semantics-assignmenttargettype","aoid":null,"title":"Static Semantics: AssignmentTargetType","titleHTML":"Static Semantics: AssignmentTargetType","number":"12.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: AssignmentTargetType"},{"type":"clause","id":"sec-identifiers-static-semantics-stringvalue","aoid":null,"title":"Static Semantics: StringValue","titleHTML":"Static Semantics: StringValue","number":"12.1.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: StringValue"},{"type":"op","aoid":"InitializeBoundName","refId":"sec-initializeboundname","location":"","referencingIds":[],"key":"InitializeBoundName"},{"type":"clause","id":"sec-initializeboundname","aoid":"InitializeBoundName","title":"Runtime Semantics: InitializeBoundName ( name, value, environment )","titleHTML":"Runtime Semantics: InitializeBoundName ( <var>name</var>, <var>value</var>, <var>environment</var> )","number":"12.1.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3143","_ref_3144","_ref_3145","_ref_4287","_ref_4742","_ref_4747"],"key":"Runtime Semantics: InitializeBoundName ( name, value, environment )"},{"type":"clause","id":"sec-identifiers-runtime-semantics-bindinginitialization","aoid":null,"title":"Runtime Semantics: BindingInitialization","titleHTML":"Runtime Semantics: BindingInitialization","number":"12.1.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: BindingInitialization"},{"type":"clause","id":"sec-identifiers-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.1.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-identifiers","aoid":null,"title":"Identifiers","titleHTML":"Identifiers","number":"12.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_305"],"key":"Identifiers"},{"type":"production","id":"prod-PrimaryExpression","name":"PrimaryExpression","referencingIds":["_ref_10177","_ref_10250","_ref_10251","_ref_14805"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"PrimaryExpression"},{"type":"production","id":"prod-CoverParenthesizedExpressionAndArrowParameterList","name":"CoverParenthesizedExpressionAndArrowParameterList","referencingIds":["_ref_9825","_ref_9834","_ref_9835","_ref_9839","_ref_9840","_ref_9841","_ref_9848","_ref_9849","_ref_9861","_ref_9872","_ref_9873","_ref_9971","_ref_9974","_ref_10158","_ref_10159","_ref_10162","_ref_10167","_ref_10168","_ref_10172","_ref_10173","_ref_10447","_ref_10448","_ref_12743","_ref_12746","_ref_12747","_ref_12759","_ref_12760","_ref_12763","_ref_12764","_ref_12765","_ref_12774","_ref_12775","_ref_12782","_ref_12783","_ref_12794","_ref_13833","_ref_13834","_ref_14821","_ref_14824","_ref_14825","_ref_15063"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"CoverParenthesizedExpressionAndArrowParameterList"},{"type":"production","id":"prod-ParenthesizedExpression","name":"ParenthesizedExpression","referencingIds":["_ref_9838","_ref_10160","_ref_10161"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ParenthesizedExpression"},{"type":"clause","id":"sec-static-semantics-coveredparenthesizedexpression","aoid":null,"title":"Static Semantics: CoveredParenthesizedExpression","titleHTML":"Static Semantics: CoveredParenthesizedExpression","number":"12.2.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: CoveredParenthesizedExpression"},{"type":"clause","id":"sec-semantics-static-semantics-hasname","aoid":null,"title":"Static Semantics: HasName","titleHTML":"Static Semantics: HasName","number":"12.2.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: HasName"},{"type":"clause","id":"sec-semantics-static-semantics-isfunctiondefinition","aoid":null,"title":"Static Semantics: IsFunctionDefinition","titleHTML":"Static Semantics: IsFunctionDefinition","number":"12.2.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsFunctionDefinition"},{"type":"clause","id":"sec-semantics-static-semantics-isidentifierref","aoid":null,"title":"Static Semantics: IsIdentifierRef","titleHTML":"Static Semantics: IsIdentifierRef","number":"12.2.1.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsIdentifierRef"},{"type":"clause","id":"sec-semantics-static-semantics-assignmenttargettype","aoid":null,"title":"Static Semantics: AssignmentTargetType","titleHTML":"Static Semantics: AssignmentTargetType","number":"12.2.1.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: AssignmentTargetType"},{"type":"clause","id":"sec-primary-expression-semantics","aoid":null,"title":"Semantics","titleHTML":"Semantics","number":"12.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Semantics"},{"type":"clause","id":"sec-this-keyword-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.2.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-this-keyword","aoid":null,"title":"The this Keyword","titleHTML":"The <code>this</code> Keyword","number":"12.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"The this Keyword"},{"type":"clause","id":"sec-identifier-reference","aoid":null,"title":"Identifier Reference","titleHTML":"Identifier Reference","number":"12.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Identifier Reference"},{"type":"production","id":"prod-Literal","name":"Literal","referencingIds":["_ref_9815","_ref_9843","_ref_9851","_ref_9862","_ref_13799"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Literal"},{"type":"clause","id":"sec-literals-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.2.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-primary-expression-literals","aoid":null,"title":"Literals","titleHTML":"Literals","number":"12.2.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Literals"},{"type":"production","id":"prod-ArrayLiteral","name":"ArrayLiteral","referencingIds":["_ref_9816","_ref_9844","_ref_9852","_ref_9863","_ref_9887","_ref_10253","_ref_10725","_ref_10730","_ref_10734","_ref_10761","_ref_10814","_ref_10819","_ref_10824","_ref_10887","_ref_10896","_ref_10904","_ref_10908","_ref_10915","_ref_10924","_ref_11783","_ref_11788","_ref_13800","_ref_14803"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ArrayLiteral"},{"type":"production","id":"prod-ElementList","name":"ElementList","referencingIds":["_ref_9890","_ref_9891","_ref_9897","_ref_9900","_ref_9917","_ref_9920","_ref_9924","_ref_9927","_ref_9936","_ref_9937","_ref_9938","_ref_9940"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ElementList"},{"type":"production","id":"prod-Elision","name":"Elision","referencingIds":["_ref_9889","_ref_9892","_ref_9893","_ref_9895","_ref_9898","_ref_9901","_ref_9903","_ref_9905","_ref_9906","_ref_9907","_ref_9909","_ref_9910","_ref_9912","_ref_9914","_ref_9915","_ref_9918","_ref_9921","_ref_9922","_ref_9925","_ref_9928","_ref_9929","_ref_9933","_ref_9934","_ref_9935","_ref_9939","_ref_9941","_ref_9942","_ref_10786","_ref_10790","_ref_10799","_ref_10829","_ref_10830","_ref_10831","_ref_10833","_ref_10834","_ref_10839","_ref_10842","_ref_10843","_ref_10877","_ref_10879","_ref_10881","_ref_10882","_ref_11264","_ref_11268","_ref_11277","_ref_11289","_ref_11290","_ref_11294","_ref_11297","_ref_11309","_ref_11321","_ref_11322","_ref_11326","_ref_11329","_ref_11341","_ref_11394","_ref_11395","_ref_11396","_ref_11398","_ref_11399","_ref_11406","_ref_11408","_ref_11410","_ref_11413","_ref_11414","_ref_11424","_ref_11426"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Elision"},{"type":"production","id":"prod-SpreadElement","name":"SpreadElement","referencingIds":["_ref_9896","_ref_9902","_ref_9913","_ref_9916","_ref_9926","_ref_9930"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"SpreadElement"},{"type":"clause","id":"sec-static-semantics-elisionwidth","aoid":null,"title":"Static Semantics: ElisionWidth","titleHTML":"Static Semantics: ElisionWidth","number":"12.2.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ElisionWidth"},{"type":"clause","id":"sec-runtime-semantics-arrayaccumulation","aoid":null,"title":"Runtime Semantics: ArrayAccumulation","titleHTML":"Runtime Semantics: ArrayAccumulation","number":"12.2.5.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: ArrayAccumulation"},{"type":"clause","id":"sec-array-initializer-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.2.5.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-array-initializer","aoid":null,"title":"Array Initializer","titleHTML":"Array Initializer","number":"12.2.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Array Initializer"},{"type":"production","id":"prod-ObjectLiteral","name":"ObjectLiteral","referencingIds":["_ref_9817","_ref_9845","_ref_9853","_ref_9864","_ref_9964","_ref_9966","_ref_9969","_ref_9972","_ref_9977","_ref_10252","_ref_10724","_ref_10729","_ref_10733","_ref_10760","_ref_10815","_ref_10818","_ref_10823","_ref_10886","_ref_10895","_ref_10903","_ref_10907","_ref_10914","_ref_10923","_ref_11782","_ref_11787","_ref_13801","_ref_14804","_ref_15315"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ObjectLiteral"},{"type":"production","id":"prod-PropertyDefinitionList","name":"PropertyDefinitionList","referencingIds":["_ref_9943","_ref_9944","_ref_9946","_ref_10007","_ref_10009","_ref_10012","_ref_10013","_ref_10014","_ref_10023","_ref_10025","_ref_15065","_ref_15066","_ref_15067"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"PropertyDefinitionList"},{"type":"production","id":"prod-PropertyDefinition","name":"PropertyDefinition","referencingIds":["_ref_9945","_ref_9947","_ref_10004","_ref_10005","_ref_10006","_ref_10008","_ref_10010","_ref_10011","_ref_10024","_ref_10026"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"PropertyDefinition"},{"type":"production","id":"prod-PropertyName","name":"PropertyName","referencingIds":["_ref_9950","_ref_9994","_ref_9996","_ref_10032","_ref_10034","_ref_10803","_ref_10863","_ref_10865","_ref_11280","_ref_11312","_ref_11344","_ref_11346","_ref_11388","_ref_11390","_ref_12818","_ref_12824","_ref_12826","_ref_12830","_ref_12837","_ref_12845","_ref_12848","_ref_12850","_ref_12853","_ref_12856","_ref_12863","_ref_12867","_ref_12874","_ref_12877","_ref_12879","_ref_12882","_ref_12883","_ref_12889","_ref_12891","_ref_12894","_ref_12897","_ref_12902","_ref_12906","_ref_12908","_ref_12912","_ref_12915","_ref_12920","_ref_12940","_ref_12981","_ref_12984","_ref_12993","_ref_13013","_ref_13016","_ref_13033","_ref_13036","_ref_13071","_ref_13090","_ref_13136","_ref_13139","_ref_13148","_ref_13168","_ref_13171","_ref_13189","_ref_13192","_ref_13273","_ref_13365","_ref_13392","_ref_13435","_ref_13438","_ref_13449","_ref_13471","_ref_13474","_ref_13491","_ref_13494","_ref_14351","_ref_14353","_ref_15068","_ref_15071","_ref_15073","_ref_15075","_ref_15076"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"PropertyName"},{"type":"production","id":"prod-LiteralPropertyName","name":"LiteralPropertyName","referencingIds":["_ref_9954","_ref_9979","_ref_9989"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"LiteralPropertyName"},{"type":"production","id":"prod-ComputedPropertyName","name":"ComputedPropertyName","referencingIds":["_ref_9955","_ref_9980","_ref_9981","_ref_9990","_ref_15070"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ComputedPropertyName"},{"type":"production","id":"prod-CoverInitializedName","name":"CoverInitializedName","referencingIds":["_ref_9949","_ref_9965","_ref_9976"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"CoverInitializedName"},{"type":"production","id":"prod-Initializer","name":"Initializer","referencingIds":["_ref_8833","_ref_8836","_ref_8885","_ref_8889","_ref_8891","_ref_9092","_ref_9961","_ref_10802","_ref_10806","_ref_10810","_ref_10857","_ref_10859","_ref_10860","_ref_10861","_ref_10862","_ref_10884","_ref_10889","_ref_10890","_ref_10892","_ref_10893","_ref_10900","_ref_10912","_ref_10917","_ref_10918","_ref_10920","_ref_10921","_ref_11143","_ref_11144","_ref_11148","_ref_11156","_ref_11158","_ref_11164","_ref_11165","_ref_11176","_ref_11179","_ref_11195","_ref_11197","_ref_11198","_ref_11199","_ref_11201","_ref_11202","_ref_11207","_ref_11208","_ref_11216","_ref_11218","_ref_11224","_ref_11227","_ref_11245","_ref_11247","_ref_11248","_ref_11249","_ref_11255","_ref_11256","_ref_11284","_ref_11286","_ref_11316","_ref_11319","_ref_11349","_ref_11352","_ref_11358","_ref_11361","_ref_11364","_ref_11367","_ref_11431","_ref_11433","_ref_11434","_ref_11435","_ref_11436","_ref_11438","_ref_11439","_ref_11440","_ref_11447","_ref_11448","_ref_11449","_ref_11452","_ref_11454","_ref_11455","_ref_11456","_ref_11457","_ref_12648","_ref_15194","_ref_15201","_ref_15205","_ref_15210","_ref_15215","_ref_15221","_ref_15227","_ref_15233","_ref_15237","_ref_15238","_ref_15239","_ref_15300"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Initializer"},{"type":"clause","id":"sec-object-initializer-static-semantics-early-errors","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"12.2.6.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_747","_ref_818"],"key":"Static Semantics: Early Errors"},{"type":"clause","id":"sec-object-initializer-static-semantics-computedpropertycontains","aoid":null,"title":"Static Semantics: ComputedPropertyContains","titleHTML":"Static Semantics: ComputedPropertyContains","number":"12.2.6.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ComputedPropertyContains"},{"type":"clause","id":"sec-object-initializer-static-semantics-contains","aoid":null,"title":"Static Semantics: Contains","titleHTML":"Static Semantics: Contains","number":"12.2.6.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: Contains"},{"type":"clause","id":"sec-static-semantics-iscomputedpropertykey","aoid":null,"title":"Static Semantics: IsComputedPropertyKey","titleHTML":"Static Semantics: IsComputedPropertyKey","number":"12.2.6.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsComputedPropertyKey"},{"type":"clause","id":"sec-object-initializer-static-semantics-propname","aoid":null,"title":"Static Semantics: PropName","titleHTML":"Static Semantics: PropName","number":"12.2.6.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: PropName"},{"type":"clause","id":"sec-static-semantics-propertynamelist","aoid":null,"title":"Static Semantics: PropertyNameList","titleHTML":"Static Semantics: PropertyNameList","number":"12.2.6.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: PropertyNameList"},{"type":"clause","id":"sec-object-initializer-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.2.6.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-object-initializer-runtime-semantics-propertydefinitionevaluation","aoid":null,"title":"Runtime Semantics: PropertyDefinitionEvaluation","titleHTML":"Runtime Semantics: PropertyDefinitionEvaluation","number":"12.2.6.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_748"],"key":"Runtime Semantics: PropertyDefinitionEvaluation"},{"type":"clause","id":"sec-object-initializer","aoid":null,"title":"Object Initializer","titleHTML":"Object Initializer","number":"12.2.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Object Initializer"},{"type":"clause","id":"sec-function-defining-expressions","aoid":null,"title":"Function Defining Expressions","titleHTML":"Function Defining Expressions","number":"12.2.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Function Defining Expressions"},{"type":"clause","id":"sec-primary-expression-regular-expression-literals-static-semantics-early-errors","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"12.2.8.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: Early Errors"},{"type":"clause","id":"sec-regular-expression-literals-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.2.8.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-primary-expression-regular-expression-literals","aoid":null,"title":"Regular Expression Literals","titleHTML":"Regular Expression Literals","number":"12.2.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Regular Expression Literals"},{"type":"production","id":"prod-TemplateLiteral","name":"TemplateLiteral","referencingIds":["_ref_9079","_ref_9824","_ref_9847","_ref_9860","_ref_9871","_ref_10064","_ref_10110","_ref_10114","_ref_10117","_ref_10118","_ref_10183","_ref_10202","_ref_10243","_ref_10259","_ref_10271","_ref_10292","_ref_10295","_ref_10374","_ref_10375","_ref_10377","_ref_10380","_ref_10382","_ref_10385","_ref_13808","_ref_13828","_ref_13831"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"TemplateLiteral"},{"type":"production","id":"prod-SubstitutionTemplate","name":"SubstitutionTemplate","referencingIds":["_ref_10051"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"SubstitutionTemplate"},{"type":"production","id":"prod-TemplateSpans","name":"TemplateSpans","referencingIds":["_ref_10054","_ref_10069","_ref_10087","_ref_10090","_ref_10113","_ref_10116","_ref_10135","_ref_10138"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"TemplateSpans"},{"type":"production","id":"prod-TemplateMiddleList","name":"TemplateMiddleList","referencingIds":["_ref_10056","_ref_10060","_ref_10077","_ref_10094","_ref_10096","_ref_10103","_ref_10106","_ref_10120","_ref_10122","_ref_10126","_ref_10129","_ref_10142","_ref_10144","_ref_10151","_ref_10154"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"TemplateMiddleList"},{"type":"clause","id":"sec-static-semantics-template-early-errors","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"12.2.9.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: Early Errors"},{"type":"clause","id":"sec-static-semantics-templatestrings","aoid":null,"title":"Static Semantics: TemplateStrings","titleHTML":"Static Semantics: TemplateStrings","number":"12.2.9.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: TemplateStrings"},{"type":"clause","id":"sec-template-literals-runtime-semantics-argumentlistevaluation","aoid":null,"title":"Runtime Semantics: ArgumentListEvaluation","titleHTML":"Runtime Semantics: ArgumentListEvaluation","number":"12.2.9.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: ArgumentListEvaluation"},{"type":"op","aoid":"GetTemplateObject","refId":"sec-gettemplateobject","location":"","referencingIds":[],"key":"GetTemplateObject"},{"type":"clause","id":"sec-gettemplateobject","aoid":"GetTemplateObject","title":"Runtime Semantics: GetTemplateObject ( templateLiteral )","titleHTML":"Runtime Semantics: GetTemplateObject ( <var>templateLiteral</var> )","number":"12.2.9.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_325","_ref_3228","_ref_3230"],"key":"Runtime Semantics: GetTemplateObject ( templateLiteral )"},{"type":"clause","id":"sec-runtime-semantics-substitutionevaluation","aoid":null,"title":"Runtime Semantics: SubstitutionEvaluation","titleHTML":"Runtime Semantics: SubstitutionEvaluation","number":"12.2.9.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: SubstitutionEvaluation"},{"type":"clause","id":"sec-template-literals-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.2.9.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_317"],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-template-literals","aoid":null,"title":"Template Literals","titleHTML":"Template Literals","number":"12.2.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_324"],"key":"Template Literals"},{"type":"clause","id":"sec-grouping-operator-static-semantics-early-errors","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"12.2.10.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: Early Errors"},{"type":"clause","id":"sec-grouping-operator-static-semantics-isfunctiondefinition","aoid":null,"title":"Static Semantics: IsFunctionDefinition","titleHTML":"Static Semantics: IsFunctionDefinition","number":"12.2.10.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsFunctionDefinition"},{"type":"clause","id":"sec-grouping-operator-static-semantics-assignmenttargettype","aoid":null,"title":"Static Semantics: AssignmentTargetType","titleHTML":"Static Semantics: AssignmentTargetType","number":"12.2.10.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: AssignmentTargetType"},{"type":"clause","id":"sec-grouping-operator-runtime-semantics-namedevaluation","aoid":null,"title":"Runtime Semantics: NamedEvaluation","titleHTML":"Runtime Semantics: NamedEvaluation","number":"12.2.10.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: NamedEvaluation"},{"type":"clause","id":"sec-grouping-operator-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.2.10.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-grouping-operator","aoid":null,"title":"The Grouping Operator","titleHTML":"The Grouping Operator","number":"12.2.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"The Grouping Operator"},{"type":"clause","id":"sec-primary-expression","aoid":null,"title":"Primary Expression","titleHTML":"Primary Expression","number":"12.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Primary Expression"},{"type":"production","id":"prod-MemberExpression","name":"MemberExpression","referencingIds":["_ref_10178","_ref_10180","_ref_10182","_ref_10186","_ref_10191","_ref_10216","_ref_10221","_ref_10223","_ref_10238","_ref_10240","_ref_10242","_ref_10246","_ref_10254","_ref_10256","_ref_10258","_ref_10262","_ref_10266","_ref_10268","_ref_10270","_ref_10274","_ref_10282","_ref_10284","_ref_10294","_ref_10296","_ref_10298","_ref_10302","_ref_10306","_ref_10308","_ref_10313","_ref_10315","_ref_10317","_ref_10318","_ref_10320","_ref_10322","_ref_10325","_ref_10330","_ref_10335","_ref_10337","_ref_10340","_ref_10344","_ref_10376","_ref_10378","_ref_10379","_ref_13533","_ref_13558","_ref_13562","_ref_13585","_ref_13790","_ref_13792","_ref_13796","_ref_13830","_ref_13832"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"MemberExpression"},{"type":"production","id":"prod-SuperProperty","name":"SuperProperty","referencingIds":["_ref_10184","_ref_10244","_ref_10260","_ref_10272","_ref_10286","_ref_10356","_ref_10359","_ref_12572","_ref_12574","_ref_12769","_ref_12968","_ref_12970","_ref_13123","_ref_13125","_ref_13422","_ref_13424","_ref_13568","_ref_13574","_ref_13794","_ref_14300","_ref_14346","_ref_14347"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"SuperProperty"},{"type":"production","id":"prod-MetaProperty","name":"MetaProperty","referencingIds":["_ref_10185","_ref_10245","_ref_10261","_ref_10273","_ref_13795"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"MetaProperty"},{"type":"production","id":"prod-NewTarget","name":"NewTarget","referencingIds":["_ref_10190","_ref_12768","_ref_13567","_ref_13573","_ref_13846","_ref_13847","_ref_13848","_ref_13899","_ref_14296"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"NewTarget"},{"type":"production","id":"prod-NewExpression","name":"NewExpression","referencingIds":["_ref_10192","_ref_10212","_ref_10248","_ref_10264","_ref_10276","_ref_10293","_ref_10333","_ref_10334","_ref_10339","_ref_13789"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"NewExpression"},{"type":"production","id":"prod-CallExpression","name":"CallExpression","referencingIds":["_ref_10195","_ref_10197","_ref_10199","_ref_10201","_ref_10213","_ref_10232","_ref_10234","_ref_10249","_ref_10265","_ref_10277","_ref_10278","_ref_10280","_ref_10289","_ref_10291","_ref_10300","_ref_10304","_ref_10309","_ref_10311","_ref_10323","_ref_10327","_ref_10328","_ref_10332","_ref_10346","_ref_10347","_ref_10348","_ref_10349","_ref_10351","_ref_10352","_ref_10381","_ref_10383","_ref_10384","_ref_13785","_ref_13787","_ref_13825","_ref_13827","_ref_13829"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"CallExpression"},{"type":"production","id":"prod-SuperCall","name":"SuperCall","referencingIds":["_ref_10194","_ref_10288","_ref_12576","_ref_12578","_ref_12770","_ref_12860","_ref_12862","_ref_12866","_ref_12871","_ref_12873","_ref_12972","_ref_12974","_ref_12997","_ref_12999","_ref_13127","_ref_13129","_ref_13152","_ref_13154","_ref_13426","_ref_13428","_ref_13453","_ref_13455","_ref_13569","_ref_13575","_ref_13784","_ref_14305","_ref_14344","_ref_14345"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"SuperCall"},{"type":"production","id":"prod-Arguments","name":"Arguments","referencingIds":["_ref_10187","_ref_10196","_ref_10203","_ref_10217","_ref_10247","_ref_10263","_ref_10275","_ref_10290","_ref_10297","_ref_10336","_ref_10338","_ref_10341","_ref_10345","_ref_10350","_ref_10353","_ref_10360","_ref_10361","_ref_13534","_ref_13559","_ref_13563","_ref_13586","_ref_13797","_ref_13826"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Arguments"},{"type":"production","id":"prod-ArgumentList","name":"ArgumentList","referencingIds":["_ref_10204","_ref_10205","_ref_10208","_ref_10210","_ref_10366","_ref_10368","_ref_10370","_ref_10372"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ArgumentList"},{"type":"production","id":"prod-LeftHandSideExpression","name":"LeftHandSideExpression","referencingIds":["_ref_9748","_ref_9750","_ref_10386","_ref_10387","_ref_10389","_ref_10393","_ref_10394","_ref_10395","_ref_10396","_ref_10401","_ref_10402","_ref_10405","_ref_10406","_ref_10409","_ref_10410","_ref_10411","_ref_10412","_ref_10716","_ref_10718","_ref_10721","_ref_10723","_ref_10726","_ref_10728","_ref_10731","_ref_10732","_ref_10735","_ref_10736","_ref_10739","_ref_10740","_ref_10744","_ref_10746","_ref_10752","_ref_10754","_ref_10757","_ref_10759","_ref_10762","_ref_10764","_ref_10768","_ref_10770","_ref_10773","_ref_10776","_ref_10777","_ref_10779","_ref_10808","_ref_10816","_ref_10817","_ref_10820","_ref_10822","_ref_10825","_ref_11552","_ref_11561","_ref_11570","_ref_11599","_ref_11608","_ref_11617","_ref_11772","_ref_11775","_ref_11778","_ref_11781","_ref_11784","_ref_11786","_ref_11789","_ref_11792","_ref_11793","_ref_11796","_ref_11814","_ref_11823","_ref_11832","_ref_11842","_ref_11851","_ref_11860","_ref_11870","_ref_11879","_ref_11888","_ref_11903","_ref_11916","_ref_11919","_ref_11938","_ref_11950","_ref_11954","_ref_11983","_ref_11987","_ref_12002","_ref_12006","_ref_12021","_ref_12025","_ref_12040","_ref_13229","_ref_13642","_ref_13674","_ref_13726","_ref_13728","_ref_13772","_ref_13773","_ref_14823","_ref_15246","_ref_15247","_ref_15249","_ref_15281"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"LeftHandSideExpression"},{"type":"production","id":"prod-CallMemberExpression","name":"CallMemberExpression","referencingIds":["_ref_10219"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"CallMemberExpression"},{"type":"clause","id":"sec-left-hand-side-expressions-static-semantics-coveredcallexpression","aoid":null,"title":"Static Semantics: CoveredCallExpression","titleHTML":"Static Semantics: CoveredCallExpression","number":"12.3.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: CoveredCallExpression"},{"type":"clause","id":"sec-static-semantics-static-semantics-contains","aoid":null,"title":"Static Semantics: Contains","titleHTML":"Static Semantics: Contains","number":"12.3.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: Contains"},{"type":"clause","id":"sec-static-semantics-static-semantics-isfunctiondefinition","aoid":null,"title":"Static Semantics: IsFunctionDefinition","titleHTML":"Static Semantics: IsFunctionDefinition","number":"12.3.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsFunctionDefinition"},{"type":"clause","id":"sec-static-semantics-static-semantics-isdestructuring","aoid":null,"title":"Static Semantics: IsDestructuring","titleHTML":"Static Semantics: IsDestructuring","number":"12.3.1.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsDestructuring"},{"type":"clause","id":"sec-static-semantics-static-semantics-isidentifierref","aoid":null,"title":"Static Semantics: IsIdentifierRef","titleHTML":"Static Semantics: IsIdentifierRef","number":"12.3.1.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsIdentifierRef"},{"type":"clause","id":"sec-static-semantics-static-semantics-assignmenttargettype","aoid":null,"title":"Static Semantics: AssignmentTargetType","titleHTML":"Static Semantics: AssignmentTargetType","number":"12.3.1.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: AssignmentTargetType"},{"type":"clause","id":"sec-static-semantics","aoid":null,"title":"Static Semantics","titleHTML":"Static Semantics","number":"12.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics"},{"type":"clause","id":"sec-property-accessors-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.3.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-property-accessors","aoid":null,"title":"Property Accessors","titleHTML":"Property Accessors","number":"12.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Property Accessors"},{"type":"op","aoid":"EvaluateNew","refId":"sec-evaluatenew","location":"","referencingIds":[],"key":"EvaluateNew"},{"type":"clause","id":"sec-evaluatenew","aoid":"EvaluateNew","title":"Runtime Semantics: EvaluateNew ( constructExpr, arguments )","titleHTML":"Runtime Semantics: EvaluateNew ( <var>constructExpr</var>, <var>arguments</var> )","number":"12.3.3.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3282","_ref_3283"],"key":"Runtime Semantics: EvaluateNew ( constructExpr, arguments )"},{"type":"clause","id":"sec-new-operator-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.3.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-new-operator","aoid":null,"title":"The new Operator","titleHTML":"The <code>new</code> Operator","number":"12.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"The new Operator"},{"type":"term","term":"direct eval","refId":"sec-function-calls-runtime-semantics-evaluation","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"direct eval"},{"type":"clause","id":"sec-function-calls-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.3.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2587","_ref_2588","_ref_2593","_ref_3107","_ref_4031","_ref_4037","_ref_4379","_ref_4381","_ref_4382","_ref_4384","_ref_4812","_ref_4830","_ref_4833","_ref_4836","_ref_4843","_ref_8769"],"key":"Runtime Semantics: Evaluation"},{"type":"op","aoid":"EvaluateCall","refId":"sec-evaluatecall","location":"","referencingIds":[],"key":"EvaluateCall"},{"type":"clause","id":"sec-evaluatecall","aoid":"EvaluateCall","title":"Runtime Semantics: EvaluateCall ( func, ref, arguments, tailPosition )","titleHTML":"Runtime Semantics: EvaluateCall ( <var>func</var>, <var>ref</var>, <var>arguments</var>, <var>tailPosition</var> )","number":"12.3.4.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3303","_ref_3306","_ref_3370","_ref_3373"],"key":"Runtime Semantics: EvaluateCall ( func, ref, arguments, tailPosition )"},{"type":"clause","id":"sec-function-calls","aoid":null,"title":"Function Calls","titleHTML":"Function Calls","number":"12.3.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Function Calls"},{"type":"clause","id":"sec-super-keyword-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.3.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"op","aoid":"GetSuperConstructor","refId":"sec-getsuperconstructor","location":"","referencingIds":[],"key":"GetSuperConstructor"},{"type":"clause","id":"sec-getsuperconstructor","aoid":"GetSuperConstructor","title":"Runtime Semantics: GetSuperConstructor ( )","titleHTML":"Runtime Semantics: GetSuperConstructor ( )","number":"12.3.5.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3337"],"key":"Runtime Semantics: GetSuperConstructor ( )"},{"type":"op","aoid":"MakeSuperPropertyReference","refId":"sec-makesuperpropertyreference","location":"","referencingIds":[],"key":"MakeSuperPropertyReference"},{"type":"clause","id":"sec-makesuperpropertyreference","aoid":"MakeSuperPropertyReference","title":"Runtime Semantics: MakeSuperPropertyReference ( actualThis, propertyKey, strict )","titleHTML":"Runtime Semantics: MakeSuperPropertyReference ( <var>actualThis</var>, <var>propertyKey</var>, <var>strict</var> )","number":"12.3.5.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3330","_ref_3333"],"key":"Runtime Semantics: MakeSuperPropertyReference ( actualThis, propertyKey, strict )"},{"type":"clause","id":"sec-super-keyword","aoid":null,"title":"The super Keyword","titleHTML":"The <code>super</code> Keyword","number":"12.3.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"The super Keyword"},{"type":"clause","id":"sec-argument-lists-runtime-semantics-argumentlistevaluation","aoid":null,"title":"Runtime Semantics: ArgumentListEvaluation","titleHTML":"Runtime Semantics: ArgumentListEvaluation","number":"12.3.6.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: ArgumentListEvaluation"},{"type":"clause","id":"sec-argument-lists","aoid":null,"title":"Argument Lists","titleHTML":"Argument Lists","number":"12.3.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_122"],"key":"Argument Lists"},{"type":"clause","id":"sec-tagged-templates-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.3.7.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-tagged-templates","aoid":null,"title":"Tagged Templates","titleHTML":"Tagged Templates","number":"12.3.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_522"],"key":"Tagged Templates"},{"type":"clause","id":"sec-meta-properties-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.3.8.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-meta-properties","aoid":null,"title":"Meta Properties","titleHTML":"Meta Properties","number":"12.3.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Meta Properties"},{"type":"clause","id":"sec-left-hand-side-expressions","aoid":null,"title":"Left-Hand-Side Expressions","titleHTML":"Left-Hand-Side Expressions","number":"12.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Left-Hand-Side Expressions"},{"type":"production","id":"prod-UpdateExpression","name":"UpdateExpression","referencingIds":["_ref_10417","_ref_10466","_ref_10468","_ref_10470","_ref_10472","_ref_10474","_ref_13770","_ref_15250"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"UpdateExpression"},{"type":"clause","id":"sec-update-expressions-static-semantics-early-errors","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"12.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: Early Errors"},{"type":"clause","id":"sec-update-expressions-static-semantics-isfunctiondefinition","aoid":null,"title":"Static Semantics: IsFunctionDefinition","titleHTML":"Static Semantics: IsFunctionDefinition","number":"12.4.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsFunctionDefinition"},{"type":"clause","id":"sec-update-expressions-static-semantics-assignmenttargettype","aoid":null,"title":"Static Semantics: AssignmentTargetType","titleHTML":"Static Semantics: AssignmentTargetType","number":"12.4.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: AssignmentTargetType"},{"type":"clause","id":"sec-postfix-increment-operator-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.4.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-postfix-increment-operator","aoid":null,"title":"Postfix Increment Operator","titleHTML":"Postfix Increment Operator","number":"12.4.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Postfix Increment Operator"},{"type":"clause","id":"sec-postfix-decrement-operator-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.4.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-postfix-decrement-operator","aoid":null,"title":"Postfix Decrement Operator","titleHTML":"Postfix Decrement Operator","number":"12.4.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Postfix Decrement Operator"},{"type":"clause","id":"sec-prefix-increment-operator-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.4.6.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-prefix-increment-operator","aoid":null,"title":"Prefix Increment Operator","titleHTML":"Prefix Increment Operator","number":"12.4.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_783"],"key":"Prefix Increment Operator"},{"type":"clause","id":"sec-prefix-decrement-operator-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.4.7.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-prefix-decrement-operator","aoid":null,"title":"Prefix Decrement Operator","titleHTML":"Prefix Decrement Operator","number":"12.4.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_784"],"key":"Prefix Decrement Operator"},{"type":"clause","id":"sec-update-expressions","aoid":null,"title":"Update Expressions","titleHTML":"Update Expressions","number":"12.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_782"],"key":"Update Expressions"},{"type":"production","id":"prod-UnaryExpression","name":"UnaryExpression","referencingIds":["_ref_10391","_ref_10392","_ref_10397","_ref_10398","_ref_10399","_ref_10400","_ref_10403","_ref_10404","_ref_10407","_ref_10408","_ref_10413","_ref_10414","_ref_10415","_ref_10416","_ref_10418","_ref_10419","_ref_10420","_ref_10421","_ref_10422","_ref_10423","_ref_10424","_ref_10426","_ref_10427","_ref_10428","_ref_10429","_ref_10430","_ref_10431","_ref_10432","_ref_10434","_ref_10435","_ref_10436","_ref_10437","_ref_10438","_ref_10439","_ref_10440","_ref_10442","_ref_10443","_ref_10444","_ref_10446","_ref_10449","_ref_10450","_ref_10451","_ref_10452","_ref_10453","_ref_10454","_ref_10455","_ref_10456","_ref_10457","_ref_10458","_ref_10459","_ref_10460","_ref_10461","_ref_10462","_ref_10463","_ref_10464","_ref_10465","_ref_13369","_ref_13521","_ref_13522","_ref_13774","_ref_13775","_ref_13776","_ref_13777","_ref_13778","_ref_13779","_ref_13780","_ref_13781","_ref_13782","_ref_15251","_ref_15253"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"UnaryExpression"},{"type":"clause","id":"sec-unary-operators-static-semantics-isfunctiondefinition","aoid":null,"title":"Static Semantics: IsFunctionDefinition","titleHTML":"Static Semantics: IsFunctionDefinition","number":"12.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsFunctionDefinition"},{"type":"clause","id":"sec-unary-operators-static-semantics-assignmenttargettype","aoid":null,"title":"Static Semantics: AssignmentTargetType","titleHTML":"Static Semantics: AssignmentTargetType","number":"12.5.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: AssignmentTargetType"},{"type":"clause","id":"sec-delete-operator-static-semantics-early-errors","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"12.5.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_168","_ref_169","_ref_794"],"key":"Static Semantics: Early Errors"},{"type":"clause","id":"sec-delete-operator-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.5.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_795"],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-delete-operator","aoid":null,"title":"The delete Operator","titleHTML":"The <code>delete</code> Operator","number":"12.5.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"The delete Operator"},{"type":"clause","id":"sec-void-operator-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.5.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-void-operator","aoid":null,"title":"The void Operator","titleHTML":"The <code>void</code> Operator","number":"12.5.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"The void Operator"},{"type":"table","id":"table-35","number":35,"caption":"Table 35: typeof Operator Results","referencingIds":["_ref_330","_ref_774"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 35: typeof Operator Results"},{"type":"clause","id":"sec-typeof-operator-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.5.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-typeof-operator","aoid":null,"title":"The typeof Operator","titleHTML":"The <code>typeof</code> Operator","number":"12.5.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_771","_ref_775"],"key":"The typeof Operator"},{"type":"clause","id":"sec-unary-plus-operator-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.5.6.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-unary-plus-operator","aoid":null,"title":"Unary + Operator","titleHTML":"Unary <code>+</code> Operator","number":"12.5.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Unary + Operator"},{"type":"clause","id":"sec-unary-minus-operator-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.5.7.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-unary-minus-operator","aoid":null,"title":"Unary - Operator","titleHTML":"Unary <code>-</code> Operator","number":"12.5.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Unary - Operator"},{"type":"clause","id":"sec-bitwise-not-operator-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.5.8.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-bitwise-not-operator","aoid":null,"title":"Bitwise NOT Operator ( ~ )","titleHTML":"Bitwise NOT Operator ( <code>~</code> )","number":"12.5.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Bitwise NOT Operator ( ~ )"},{"type":"clause","id":"sec-logical-not-operator-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.5.9.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-logical-not-operator","aoid":null,"title":"Logical NOT Operator ( ! )","titleHTML":"Logical NOT Operator ( <code>!</code> )","number":"12.5.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Logical NOT Operator ( ! )"},{"type":"clause","id":"sec-unary-operators","aoid":null,"title":"Unary Operators","titleHTML":"Unary Operators","number":"12.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Unary Operators"},{"type":"production","id":"prod-ExponentiationExpression","name":"ExponentiationExpression","referencingIds":["_ref_10467","_ref_10469","_ref_10471","_ref_10473","_ref_10475","_ref_10476","_ref_10479","_ref_10482","_ref_10485","_ref_10488","_ref_10490","_ref_13769","_ref_13771"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ExponentiationExpression"},{"type":"clause","id":"sec-exp-operator-static-semantics-isfunctiondefinition","aoid":null,"title":"Static Semantics: IsFunctionDefinition","titleHTML":"Static Semantics: IsFunctionDefinition","number":"12.6.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsFunctionDefinition"},{"type":"clause","id":"sec-exp-operator-static-semantics-assignmenttargettype","aoid":null,"title":"Static Semantics: AssignmentTargetType","titleHTML":"Static Semantics: AssignmentTargetType","number":"12.6.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: AssignmentTargetType"},{"type":"clause","id":"sec-exp-operator-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.6.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-applying-the-exp-operator","aoid":null,"title":"Applying the ** Operator","titleHTML":"Applying the <code>**</code> Operator","number":"12.6.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_331","_ref_332","_ref_504","_ref_505"],"key":"Applying the ** Operator"},{"type":"clause","id":"sec-exp-operator","aoid":null,"title":"Exponentiation Operator","titleHTML":"Exponentiation Operator","number":"12.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Exponentiation Operator"},{"type":"production","id":"prod-MultiplicativeExpression","name":"MultiplicativeExpression","referencingIds":["_ref_10477","_ref_10480","_ref_10483","_ref_10486","_ref_10489","_ref_10495","_ref_10497","_ref_10499","_ref_10501","_ref_10503","_ref_10505","_ref_10507","_ref_10509","_ref_10511","_ref_10513","_ref_10515","_ref_13764","_ref_13766","_ref_13767"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"MultiplicativeExpression"},{"type":"production","id":"prod-MultiplicativeOperator","name":"MultiplicativeOperator","referencingIds":["_ref_10478","_ref_10481","_ref_10484","_ref_10487","_ref_10491","_ref_10492","_ref_10493","_ref_10494","_ref_13768"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"MultiplicativeOperator"},{"type":"clause","id":"sec-multiplicative-operators-static-semantics-isfunctiondefinition","aoid":null,"title":"Static Semantics: IsFunctionDefinition","titleHTML":"Static Semantics: IsFunctionDefinition","number":"12.7.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsFunctionDefinition"},{"type":"clause","id":"sec-multiplicative-operators-static-semantics-assignmenttargettype","aoid":null,"title":"Static Semantics: AssignmentTargetType","titleHTML":"Static Semantics: AssignmentTargetType","number":"12.7.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: AssignmentTargetType"},{"type":"clause","id":"sec-applying-the-mul-operator","aoid":null,"title":"Applying the * Operator","titleHTML":"Applying the <code>*</code> Operator","number":"12.7.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_333"],"key":"Applying the * Operator"},{"type":"clause","id":"sec-applying-the-div-operator","aoid":null,"title":"Applying the / Operator","titleHTML":"Applying the <code>/</code> Operator","number":"12.7.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_334"],"key":"Applying the / Operator"},{"type":"clause","id":"sec-applying-the-mod-operator","aoid":null,"title":"Applying the % Operator","titleHTML":"Applying the <code>%</code> Operator","number":"12.7.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_335"],"key":"Applying the % Operator"},{"type":"clause","id":"sec-multiplicative-operators-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.7.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-multiplicative-operators","aoid":null,"title":"Multiplicative Operators","titleHTML":"Multiplicative Operators","number":"12.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Multiplicative Operators"},{"type":"production","id":"prod-AdditiveExpression","name":"AdditiveExpression","referencingIds":["_ref_10496","_ref_10498","_ref_10500","_ref_10502","_ref_10504","_ref_10506","_ref_10508","_ref_10510","_ref_10512","_ref_10514","_ref_10516","_ref_10518","_ref_10520","_ref_10522","_ref_10524","_ref_10526","_ref_10528","_ref_10530","_ref_10532","_ref_10534","_ref_10536","_ref_10538","_ref_10540","_ref_10542","_ref_10544","_ref_10546","_ref_13758","_ref_13760","_ref_13762","_ref_13763","_ref_13765"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"AdditiveExpression"},{"type":"clause","id":"sec-additive-operators-static-semantics-isfunctiondefinition","aoid":null,"title":"Static Semantics: IsFunctionDefinition","titleHTML":"Static Semantics: IsFunctionDefinition","number":"12.8.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsFunctionDefinition"},{"type":"clause","id":"sec-additive-operators-static-semantics-assignmenttargettype","aoid":null,"title":"Static Semantics: AssignmentTargetType","titleHTML":"Static Semantics: AssignmentTargetType","number":"12.8.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: AssignmentTargetType"},{"type":"clause","id":"sec-addition-operator-plus-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.8.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-addition-operator-plus","aoid":null,"title":"The Addition Operator ( + )","titleHTML":"The Addition Operator ( <code>+</code> )","number":"12.8.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_150"],"key":"The Addition Operator ( + )"},{"type":"clause","id":"sec-subtraction-operator-minus-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.8.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-subtraction-operator-minus","aoid":null,"title":"The Subtraction Operator ( - )","titleHTML":"The Subtraction Operator ( <code>-</code> )","number":"12.8.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"The Subtraction Operator ( - )"},{"type":"clause","id":"sec-applying-the-additive-operators-to-numbers","aoid":null,"title":"Applying the Additive Operators to Numbers","titleHTML":"Applying the Additive Operators to Numbers","number":"12.8.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_326","_ref_327","_ref_328","_ref_329","_ref_336","_ref_337"],"key":"Applying the Additive Operators to Numbers"},{"type":"clause","id":"sec-additive-operators","aoid":null,"title":"Additive Operators","titleHTML":"Additive Operators","number":"12.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Additive Operators"},{"type":"production","id":"prod-ShiftExpression","name":"ShiftExpression","referencingIds":["_ref_10517","_ref_10519","_ref_10521","_ref_10523","_ref_10525","_ref_10527","_ref_10529","_ref_10531","_ref_10533","_ref_10535","_ref_10537","_ref_10539","_ref_10541","_ref_10543","_ref_10545","_ref_10547","_ref_10549","_ref_10551","_ref_10553","_ref_10555","_ref_10557","_ref_10559","_ref_10561","_ref_10563","_ref_10565","_ref_10567","_ref_10569","_ref_10571","_ref_10573","_ref_10575","_ref_10577","_ref_10579","_ref_10581","_ref_10583","_ref_10585","_ref_10587","_ref_10589","_ref_10591","_ref_10593","_ref_10595","_ref_10597","_ref_10599","_ref_10601","_ref_10603","_ref_10605","_ref_10607","_ref_13746","_ref_13748","_ref_13750","_ref_13752","_ref_13754","_ref_13756","_ref_13757","_ref_13759","_ref_13761"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ShiftExpression"},{"type":"clause","id":"sec-bitwise-shift-operators-static-semantics-isfunctiondefinition","aoid":null,"title":"Static Semantics: IsFunctionDefinition","titleHTML":"Static Semantics: IsFunctionDefinition","number":"12.9.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsFunctionDefinition"},{"type":"clause","id":"sec-bitwise-shift-operators-static-semantics-assignmenttargettype","aoid":null,"title":"Static Semantics: AssignmentTargetType","titleHTML":"Static Semantics: AssignmentTargetType","number":"12.9.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: AssignmentTargetType"},{"type":"clause","id":"sec-left-shift-operator-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.9.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-left-shift-operator","aoid":null,"title":"The Left Shift Operator ( << )","titleHTML":"The Left Shift Operator ( <code>&lt;&lt;</code> )","number":"12.9.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"The Left Shift Operator ( << )"},{"type":"clause","id":"sec-signed-right-shift-operator-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.9.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-signed-right-shift-operator","aoid":null,"title":"The Signed Right Shift Operator ( >> )","titleHTML":"The Signed Right Shift Operator ( <code>&gt;&gt;</code> )","number":"12.9.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"The Signed Right Shift Operator ( >> )"},{"type":"clause","id":"sec-unsigned-right-shift-operator-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.9.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-unsigned-right-shift-operator","aoid":null,"title":"The Unsigned Right Shift Operator ( >>> )","titleHTML":"The Unsigned Right Shift Operator ( <code>&gt;&gt;&gt;</code> )","number":"12.9.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"The Unsigned Right Shift Operator ( >>> )"},{"type":"clause","id":"sec-bitwise-shift-operators","aoid":null,"title":"Bitwise Shift Operators","titleHTML":"Bitwise Shift Operators","number":"12.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Bitwise Shift Operators"},{"type":"production","id":"prod-RelationalExpression","name":"RelationalExpression","referencingIds":["_ref_10548","_ref_10550","_ref_10552","_ref_10554","_ref_10556","_ref_10558","_ref_10560","_ref_10562","_ref_10564","_ref_10566","_ref_10568","_ref_10570","_ref_10572","_ref_10574","_ref_10576","_ref_10578","_ref_10580","_ref_10582","_ref_10584","_ref_10586","_ref_10588","_ref_10590","_ref_10592","_ref_10594","_ref_10596","_ref_10598","_ref_10600","_ref_10602","_ref_10604","_ref_10606","_ref_10608","_ref_10610","_ref_10612","_ref_10614","_ref_10616","_ref_10618","_ref_10620","_ref_10622","_ref_10624","_ref_10626","_ref_10628","_ref_10630","_ref_10632","_ref_10634","_ref_10636","_ref_10638","_ref_10640","_ref_10642","_ref_10644","_ref_10646","_ref_10648","_ref_13738","_ref_13740","_ref_13742","_ref_13744","_ref_13745","_ref_13747","_ref_13749","_ref_13751","_ref_13753","_ref_13755"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"RelationalExpression"},{"type":"clause","id":"sec-relational-operators-static-semantics-isfunctiondefinition","aoid":null,"title":"Static Semantics: IsFunctionDefinition","titleHTML":"Static Semantics: IsFunctionDefinition","number":"12.10.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsFunctionDefinition"},{"type":"clause","id":"sec-relational-operators-static-semantics-assignmenttargettype","aoid":null,"title":"Static Semantics: AssignmentTargetType","titleHTML":"Static Semantics: AssignmentTargetType","number":"12.10.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: AssignmentTargetType"},{"type":"clause","id":"sec-relational-operators-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.10.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"op","aoid":"InstanceofOperator","refId":"sec-instanceofoperator","location":"","referencingIds":[],"key":"InstanceofOperator"},{"type":"clause","id":"sec-instanceofoperator","aoid":"InstanceofOperator","title":"Runtime Semantics: InstanceofOperator ( V, target )","titleHTML":"Runtime Semantics: InstanceofOperator ( <var>V</var>, <var>target</var> )","number":"12.10.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1701","_ref_3483"],"key":"Runtime Semantics: InstanceofOperator ( V, target )"},{"type":"clause","id":"sec-relational-operators","aoid":null,"title":"Relational Operators","titleHTML":"Relational Operators","number":"12.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Relational Operators"},{"type":"production","id":"prod-EqualityExpression","name":"EqualityExpression","referencingIds":["_ref_10609","_ref_10611","_ref_10613","_ref_10615","_ref_10617","_ref_10619","_ref_10621","_ref_10623","_ref_10625","_ref_10627","_ref_10629","_ref_10631","_ref_10633","_ref_10635","_ref_10637","_ref_10639","_ref_10641","_ref_10643","_ref_10645","_ref_10647","_ref_10649","_ref_10651","_ref_10659","_ref_10665","_ref_13732","_ref_13737","_ref_13739","_ref_13741","_ref_13743"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"EqualityExpression"},{"type":"clause","id":"sec-equality-operators-static-semantics-isfunctiondefinition","aoid":null,"title":"Static Semantics: IsFunctionDefinition","titleHTML":"Static Semantics: IsFunctionDefinition","number":"12.11.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsFunctionDefinition"},{"type":"clause","id":"sec-equality-operators-static-semantics-assignmenttargettype","aoid":null,"title":"Static Semantics: AssignmentTargetType","titleHTML":"Static Semantics: AssignmentTargetType","number":"12.11.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: AssignmentTargetType"},{"type":"clause","id":"sec-equality-operators-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.11.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-equality-operators","aoid":null,"title":"Equality Operators","titleHTML":"Equality Operators","number":"12.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Equality Operators"},{"type":"production","id":"prod-BitwiseANDExpression","name":"BitwiseANDExpression","referencingIds":["_ref_10650","_ref_10652","_ref_10654","_ref_10658","_ref_10661","_ref_10664","_ref_10667","_ref_13731","_ref_13734"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"BitwiseANDExpression"},{"type":"production","id":"prod-BitwiseXORExpression","name":"BitwiseXORExpression","referencingIds":["_ref_10653","_ref_10655","_ref_10657","_ref_10660","_ref_10663","_ref_10666","_ref_10669","_ref_13733","_ref_13736"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"BitwiseXORExpression"},{"type":"production","id":"prod-BitwiseORExpression","name":"BitwiseORExpression","referencingIds":["_ref_10656","_ref_10662","_ref_10668","_ref_10671","_ref_10673","_ref_10678","_ref_10682","_ref_10686","_ref_10688","_ref_13735","_ref_13819","_ref_13820"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"BitwiseORExpression"},{"type":"clause","id":"sec-binary-bitwise-operators-static-semantics-isfunctiondefinition","aoid":null,"title":"Static Semantics: IsFunctionDefinition","titleHTML":"Static Semantics: IsFunctionDefinition","number":"12.12.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsFunctionDefinition"},{"type":"clause","id":"sec-binary-bitwise-operators-static-semantics-assignmenttargettype","aoid":null,"title":"Static Semantics: AssignmentTargetType","titleHTML":"Static Semantics: AssignmentTargetType","number":"12.12.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: AssignmentTargetType"},{"type":"production","id":"prod-A","name":"A","referencingIds":["_ref_10670"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"A"},{"type":"clause","id":"sec-binary-bitwise-operators-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.12.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-binary-bitwise-operators","aoid":null,"title":"Binary Bitwise Operators","titleHTML":"Binary Bitwise Operators","number":"12.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Binary Bitwise Operators"},{"type":"production","id":"prod-LogicalANDExpression","name":"LogicalANDExpression","referencingIds":["_ref_10672","_ref_10674","_ref_10676","_ref_10677","_ref_10680","_ref_10681","_ref_10684","_ref_10685","_ref_10687","_ref_10690","_ref_10692","_ref_13818","_ref_13822","_ref_13823"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"LogicalANDExpression"},{"type":"production","id":"prod-LogicalORExpression","name":"LogicalORExpression","referencingIds":["_ref_10675","_ref_10679","_ref_10683","_ref_10689","_ref_10691","_ref_10693","_ref_10694","_ref_10700","_ref_10703","_ref_10706","_ref_10709","_ref_13813","_ref_13821"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"LogicalORExpression"},{"type":"clause","id":"sec-binary-logical-operators-static-semantics-isfunctiondefinition","aoid":null,"title":"Static Semantics: IsFunctionDefinition","titleHTML":"Static Semantics: IsFunctionDefinition","number":"12.13.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsFunctionDefinition"},{"type":"clause","id":"sec-binary-logical-operators-static-semantics-assignmenttargettype","aoid":null,"title":"Static Semantics: AssignmentTargetType","titleHTML":"Static Semantics: AssignmentTargetType","number":"12.13.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: AssignmentTargetType"},{"type":"clause","id":"sec-binary-logical-operators-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.13.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-binary-logical-operators","aoid":null,"title":"Binary Logical Operators","titleHTML":"Binary Logical Operators","number":"12.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Binary Logical Operators"},{"type":"production","id":"prod-ConditionalExpression","name":"ConditionalExpression","referencingIds":["_ref_10697","_ref_10699","_ref_10712"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ConditionalExpression"},{"type":"clause","id":"sec-conditional-operator-static-semantics-isfunctiondefinition","aoid":null,"title":"Static Semantics: IsFunctionDefinition","titleHTML":"Static Semantics: IsFunctionDefinition","number":"12.14.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsFunctionDefinition"},{"type":"clause","id":"sec-conditional-operator-static-semantics-assignmenttargettype","aoid":null,"title":"Static Semantics: AssignmentTargetType","titleHTML":"Static Semantics: AssignmentTargetType","number":"12.14.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: AssignmentTargetType"},{"type":"clause","id":"sec-conditional-operator-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.14.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-conditional-operator","aoid":null,"title":"Conditional Operator ( ? : )","titleHTML":"Conditional Operator ( <code>? :</code> )","number":"12.14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Conditional Operator ( ? : )"},{"type":"production","id":"prod-AssignmentExpression","name":"AssignmentExpression","referencingIds":["_ref_8822","_ref_8824","_ref_8826","_ref_8828","_ref_8831","_ref_9764","_ref_9766","_ref_9770","_ref_9888","_ref_9894","_ref_9899","_ref_9904","_ref_9908","_ref_9911","_ref_9919","_ref_9923","_ref_9931","_ref_9932","_ref_9951","_ref_9953","_ref_9959","_ref_9962","_ref_9993","_ref_9995","_ref_10003","_ref_10021","_ref_10022","_ref_10027","_ref_10028","_ref_10033","_ref_10035","_ref_10036","_ref_10037","_ref_10206","_ref_10207","_ref_10209","_ref_10211","_ref_10362","_ref_10363","_ref_10364","_ref_10365","_ref_10367","_ref_10369","_ref_10371","_ref_10373","_ref_10695","_ref_10696","_ref_10701","_ref_10702","_ref_10704","_ref_10705","_ref_10707","_ref_10708","_ref_10710","_ref_10711","_ref_10717","_ref_10720","_ref_10722","_ref_10738","_ref_10745","_ref_10748","_ref_10753","_ref_10756","_ref_10758","_ref_10763","_ref_10765","_ref_10766","_ref_10769","_ref_10772","_ref_10774","_ref_10778","_ref_10927","_ref_10929","_ref_10931","_ref_10933","_ref_10935","_ref_10937","_ref_11145","_ref_11209","_ref_11562","_ref_11565","_ref_11568","_ref_11571","_ref_11574","_ref_11577","_ref_11609","_ref_11612","_ref_11615","_ref_11618","_ref_11621","_ref_11624","_ref_11776","_ref_11779","_ref_11802","_ref_11805","_ref_11824","_ref_11827","_ref_11830","_ref_11833","_ref_11836","_ref_11839","_ref_11852","_ref_11855","_ref_11858","_ref_11861","_ref_11864","_ref_11867","_ref_11880","_ref_11883","_ref_11886","_ref_11889","_ref_11892","_ref_11895","_ref_11917","_ref_11920","_ref_11924","_ref_11927","_ref_11932","_ref_11935","_ref_11951","_ref_11955","_ref_11958","_ref_11962","_ref_11965","_ref_11970","_ref_11973","_ref_12003","_ref_12005","_ref_12009","_ref_12011","_ref_12015","_ref_12018","_ref_12022","_ref_12024","_ref_12028","_ref_12030","_ref_12034","_ref_12037","_ref_12647","_ref_12744","_ref_12777","_ref_12795","_ref_12796","_ref_12797","_ref_12798","_ref_12801","_ref_12802","_ref_12933","_ref_12935","_ref_13066","_ref_13067","_ref_13068","_ref_13069","_ref_13530","_ref_13588","_ref_13589","_ref_13590","_ref_13591","_ref_13594","_ref_13595","_ref_13627","_ref_13628","_ref_13643","_ref_13646","_ref_13649","_ref_13727","_ref_13730","_ref_13809","_ref_13811","_ref_13812","_ref_13814","_ref_13815","_ref_13816","_ref_13817","_ref_14111","_ref_14138","_ref_14150","_ref_14172","_ref_14198","_ref_14213","_ref_14214","_ref_14226","_ref_14237","_ref_14260","_ref_14261","_ref_14262","_ref_14263","_ref_15069","_ref_15072","_ref_15074","_ref_15077","_ref_15078","_ref_15079"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"AssignmentExpression"},{"type":"production","id":"prod-AssignmentOperator","name":"AssignmentOperator","referencingIds":["_ref_10719","_ref_10737","_ref_10747","_ref_10755","_ref_10771","_ref_10775","_ref_13729"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"AssignmentOperator"},{"type":"clause","id":"sec-assignment-operators-static-semantics-early-errors","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"12.15.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_819"],"key":"Static Semantics: Early Errors"},{"type":"clause","id":"sec-assignment-operators-static-semantics-isfunctiondefinition","aoid":null,"title":"Static Semantics: IsFunctionDefinition","titleHTML":"Static Semantics: IsFunctionDefinition","number":"12.15.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsFunctionDefinition"},{"type":"clause","id":"sec-assignment-operators-static-semantics-assignmenttargettype","aoid":null,"title":"Static Semantics: AssignmentTargetType","titleHTML":"Static Semantics: AssignmentTargetType","number":"12.15.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: AssignmentTargetType"},{"type":"clause","id":"sec-assignment-operators-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.15.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"production","id":"prod-AssignmentPattern","name":"AssignmentPattern","referencingIds":["_ref_10727","_ref_10767","_ref_10821","_ref_10897","_ref_10909","_ref_10925","_ref_11785","_ref_11790","_ref_11791","_ref_12041"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"AssignmentPattern"},{"type":"production","id":"prod-ObjectAssignmentPattern","name":"ObjectAssignmentPattern","referencingIds":["_ref_9970","_ref_9973","_ref_9978","_ref_10780","_ref_15062"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ObjectAssignmentPattern"},{"type":"production","id":"prod-ArrayAssignmentPattern","name":"ArrayAssignmentPattern","referencingIds":["_ref_10781"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ArrayAssignmentPattern"},{"type":"production","id":"prod-AssignmentRestProperty","name":"AssignmentRestProperty","referencingIds":["_ref_10782","_ref_10785","_ref_10846","_ref_10847","_ref_10849","_ref_10851"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"AssignmentRestProperty"},{"type":"production","id":"prod-AssignmentPropertyList","name":"AssignmentPropertyList","referencingIds":["_ref_10783","_ref_10784","_ref_10794","_ref_10826","_ref_10827","_ref_10828","_ref_10848","_ref_10850","_ref_10852","_ref_10854"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"AssignmentPropertyList"},{"type":"production","id":"prod-AssignmentElementList","name":"AssignmentElementList","referencingIds":["_ref_10788","_ref_10789","_ref_10797","_ref_10836","_ref_10837","_ref_10838","_ref_10841","_ref_10871","_ref_10873"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"AssignmentElementList"},{"type":"production","id":"prod-AssignmentElisionElement","name":"AssignmentElisionElement","referencingIds":["_ref_10796","_ref_10798","_ref_10869","_ref_10870","_ref_10872","_ref_10874"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"AssignmentElisionElement"},{"type":"production","id":"prod-AssignmentProperty","name":"AssignmentProperty","referencingIds":["_ref_10793","_ref_10795","_ref_10853","_ref_10855"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"AssignmentProperty"},{"type":"production","id":"prod-AssignmentElement","name":"AssignmentElement","referencingIds":["_ref_10800","_ref_10804","_ref_10864","_ref_10866","_ref_10875","_ref_10876","_ref_10878","_ref_10880"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"AssignmentElement"},{"type":"production","id":"prod-AssignmentRestElement","name":"AssignmentRestElement","referencingIds":["_ref_10787","_ref_10791","_ref_10832","_ref_10835","_ref_10840","_ref_10844","_ref_10845"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"AssignmentRestElement"},{"type":"production","id":"prod-DestructuringAssignmentTarget","name":"DestructuringAssignmentTarget","referencingIds":["_ref_10792","_ref_10805","_ref_10807","_ref_10812","_ref_10813","_ref_10867","_ref_10868","_ref_10883","_ref_10885","_ref_10888","_ref_10891","_ref_10894","_ref_10898","_ref_10899","_ref_10901","_ref_10902","_ref_10905","_ref_10906","_ref_10910","_ref_10911","_ref_10913","_ref_10916","_ref_10919","_ref_10922","_ref_10926"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"DestructuringAssignmentTarget"},{"type":"clause","id":"sec-destructuring-assignment-static-semantics-early-errors","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"12.15.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: Early Errors"},{"type":"clause","id":"sec-runtime-semantics-destructuringassignmentevaluation","aoid":null,"title":"Runtime Semantics: DestructuringAssignmentEvaluation","titleHTML":"Runtime Semantics: DestructuringAssignmentEvaluation","number":"12.15.5.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: DestructuringAssignmentEvaluation"},{"type":"clause","id":"sec-runtime-semantics-propertydestructuringassignmentevaluation","aoid":null,"title":"Runtime Semantics: PropertyDestructuringAssignmentEvaluation","titleHTML":"Runtime Semantics: PropertyDestructuringAssignmentEvaluation","number":"12.15.5.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: PropertyDestructuringAssignmentEvaluation"},{"type":"clause","id":"sec-runtime-semantics-restdestructuringassignmentevaluation","aoid":null,"title":"Runtime Semantics: RestDestructuringAssignmentEvaluation","titleHTML":"Runtime Semantics: RestDestructuringAssignmentEvaluation","number":"12.15.5.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: RestDestructuringAssignmentEvaluation"},{"type":"clause","id":"sec-runtime-semantics-iteratordestructuringassignmentevaluation","aoid":null,"title":"Runtime Semantics: IteratorDestructuringAssignmentEvaluation","titleHTML":"Runtime Semantics: IteratorDestructuringAssignmentEvaluation","number":"12.15.5.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: IteratorDestructuringAssignmentEvaluation"},{"type":"clause","id":"sec-runtime-semantics-keyeddestructuringassignmentevaluation","aoid":null,"title":"Runtime Semantics: KeyedDestructuringAssignmentEvaluation","titleHTML":"Runtime Semantics: KeyedDestructuringAssignmentEvaluation","number":"12.15.5.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: KeyedDestructuringAssignmentEvaluation"},{"type":"clause","id":"sec-destructuring-assignment","aoid":null,"title":"Destructuring Assignment","titleHTML":"Destructuring Assignment","number":"12.15.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Destructuring Assignment"},{"type":"clause","id":"sec-assignment-operators","aoid":null,"title":"Assignment Operators","titleHTML":"Assignment Operators","number":"12.15","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_780","_ref_781"],"key":"Assignment Operators"},{"type":"production","id":"prod-Expression","name":"Expression","referencingIds":["_ref_8815","_ref_8818","_ref_8820","_ref_8838","_ref_8839","_ref_8842","_ref_8845","_ref_8846","_ref_8851","_ref_8854","_ref_8857","_ref_8858","_ref_8912","_ref_8914","_ref_9757","_ref_9759","_ref_9769","_ref_9826","_ref_9827","_ref_9830","_ref_9832","_ref_9836","_ref_9837","_ref_10053","_ref_10059","_ref_10062","_ref_10068","_ref_10076","_ref_10079","_ref_10086","_ref_10100","_ref_10105","_ref_10112","_ref_10115","_ref_10124","_ref_10125","_ref_10128","_ref_10130","_ref_10134","_ref_10137","_ref_10139","_ref_10147","_ref_10149","_ref_10150","_ref_10153","_ref_10156","_ref_10157","_ref_10163","_ref_10164","_ref_10165","_ref_10166","_ref_10169","_ref_10170","_ref_10171","_ref_10174","_ref_10175","_ref_10176","_ref_10179","_ref_10188","_ref_10198","_ref_10239","_ref_10255","_ref_10267","_ref_10279","_ref_10283","_ref_10303","_ref_10305","_ref_10314","_ref_10316","_ref_10324","_ref_10326","_ref_10354","_ref_10355","_ref_10698","_ref_10928","_ref_10930","_ref_10932","_ref_10934","_ref_10936","_ref_11459","_ref_11473","_ref_11474","_ref_11475","_ref_11478","_ref_11480","_ref_11483","_ref_11486","_ref_11491","_ref_11494","_ref_11499","_ref_11502","_ref_11507","_ref_11510","_ref_11515","_ref_11518","_ref_11523","_ref_11526","_ref_11529","_ref_11532","_ref_11534","_ref_11537","_ref_11538","_ref_11540","_ref_11541","_ref_11542","_ref_11545","_ref_11546","_ref_11549","_ref_11550","_ref_11553","_ref_11556","_ref_11559","_ref_11584","_ref_11585","_ref_11587","_ref_11588","_ref_11589","_ref_11592","_ref_11593","_ref_11596","_ref_11597","_ref_11600","_ref_11603","_ref_11606","_ref_11631","_ref_11634","_ref_11637","_ref_11640","_ref_11643","_ref_11646","_ref_11648","_ref_11649","_ref_11652","_ref_11655","_ref_11658","_ref_11661","_ref_11664","_ref_11666","_ref_11669","_ref_11670","_ref_11674","_ref_11675","_ref_11676","_ref_11679","_ref_11680","_ref_11683","_ref_11684","_ref_11687","_ref_11688","_ref_11689","_ref_11692","_ref_11693","_ref_11696","_ref_11697","_ref_11700","_ref_11701","_ref_11702","_ref_11705","_ref_11706","_ref_11709","_ref_11710","_ref_11713","_ref_11714","_ref_11715","_ref_11719","_ref_11720","_ref_11725","_ref_11726","_ref_11729","_ref_11730","_ref_11731","_ref_11735","_ref_11736","_ref_11741","_ref_11742","_ref_11745","_ref_11746","_ref_11747","_ref_11749","_ref_11750","_ref_11751","_ref_11752","_ref_11755","_ref_11756","_ref_11759","_ref_11760","_ref_11763","_ref_11764","_ref_11769","_ref_11770","_ref_11773","_ref_11794","_ref_11795","_ref_11797","_ref_11799","_ref_11815","_ref_11818","_ref_11821","_ref_11843","_ref_11846","_ref_11849","_ref_11871","_ref_11874","_ref_11877","_ref_11904","_ref_11908","_ref_11913","_ref_11939","_ref_11943","_ref_11948","_ref_11984","_ref_11986","_ref_11990","_ref_11992","_ref_11996","_ref_11999","_ref_12066","_ref_12067","_ref_12068","_ref_12069","_ref_12070","_ref_12071","_ref_12073","_ref_12076","_ref_12079","_ref_12082","_ref_12085","_ref_12088","_ref_12091","_ref_12093","_ref_12096","_ref_12105","_ref_12108","_ref_12113","_ref_12128","_ref_12135","_ref_12150","_ref_12157","_ref_12172","_ref_12191","_ref_12210","_ref_12217","_ref_12232","_ref_12239","_ref_12254","_ref_12282","_ref_12284","_ref_12288","_ref_12290","_ref_12294","_ref_12295","_ref_12388","_ref_12389","_ref_12390","_ref_12786","_ref_12789","_ref_12791","_ref_13651","_ref_13656","_ref_13659","_ref_13660","_ref_13662","_ref_13663","_ref_13664","_ref_13667","_ref_13668","_ref_13671","_ref_13672","_ref_13675","_ref_13678","_ref_13681","_ref_13683","_ref_13689","_ref_13690","_ref_13691","_ref_13706","_ref_13786","_ref_13791","_ref_13810","_ref_13835","_ref_13836","_ref_15161","_ref_15166","_ref_15169","_ref_15172","_ref_15175","_ref_15202","_ref_15206","_ref_15211","_ref_15216","_ref_15222","_ref_15228","_ref_15234","_ref_15240","_ref_15279"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Expression"},{"type":"clause","id":"sec-comma-operator-static-semantics-isfunctiondefinition","aoid":null,"title":"Static Semantics: IsFunctionDefinition","titleHTML":"Static Semantics: IsFunctionDefinition","number":"12.16.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsFunctionDefinition"},{"type":"clause","id":"sec-comma-operator-static-semantics-assignmenttargettype","aoid":null,"title":"Static Semantics: AssignmentTargetType","titleHTML":"Static Semantics: AssignmentTargetType","number":"12.16.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: AssignmentTargetType"},{"type":"clause","id":"sec-comma-operator-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"12.16.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-comma-operator","aoid":null,"title":"Comma Operator ( , )","titleHTML":"Comma Operator ( <code>,</code> )","number":"12.16","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Comma Operator ( , )"},{"type":"clause","id":"sec-ecmascript-language-expressions","aoid":null,"title":"ECMAScript Language: Expressions","titleHTML":"ECMAScript Language: Expressions","number":"12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"ECMAScript Language: Expressions"},{"type":"production","id":"prod-Statement","name":"Statement","referencingIds":["_ref_8816","_ref_8819","_ref_8821","_ref_8840","_ref_8843","_ref_8847","_ref_8849","_ref_8852","_ref_8855","_ref_8859","_ref_11030","_ref_11055","_ref_11056","_ref_11065","_ref_11066","_ref_11075","_ref_11084","_ref_11097","_ref_11098","_ref_11100","_ref_11101","_ref_11106","_ref_11107","_ref_11109","_ref_11110","_ref_11476","_ref_11477","_ref_11479","_ref_11481","_ref_11482","_ref_11484","_ref_11485","_ref_11487","_ref_11488","_ref_11489","_ref_11490","_ref_11492","_ref_11493","_ref_11495","_ref_11496","_ref_11497","_ref_11498","_ref_11500","_ref_11501","_ref_11503","_ref_11504","_ref_11505","_ref_11506","_ref_11508","_ref_11509","_ref_11511","_ref_11512","_ref_11513","_ref_11514","_ref_11516","_ref_11517","_ref_11519","_ref_11520","_ref_11521","_ref_11522","_ref_11524","_ref_11525","_ref_11527","_ref_11528","_ref_11530","_ref_11531","_ref_11533","_ref_11535","_ref_11536","_ref_11539","_ref_11543","_ref_11547","_ref_11551","_ref_11554","_ref_11557","_ref_11560","_ref_11563","_ref_11566","_ref_11569","_ref_11572","_ref_11575","_ref_11578","_ref_11583","_ref_11586","_ref_11590","_ref_11594","_ref_11598","_ref_11601","_ref_11604","_ref_11607","_ref_11610","_ref_11613","_ref_11616","_ref_11619","_ref_11622","_ref_11625","_ref_11626","_ref_11627","_ref_11630","_ref_11632","_ref_11633","_ref_11635","_ref_11636","_ref_11638","_ref_11639","_ref_11641","_ref_11642","_ref_11644","_ref_11645","_ref_11647","_ref_11650","_ref_11651","_ref_11653","_ref_11654","_ref_11656","_ref_11657","_ref_11659","_ref_11660","_ref_11662","_ref_11663","_ref_11665","_ref_11667","_ref_11671","_ref_11673","_ref_11677","_ref_11681","_ref_11685","_ref_11686","_ref_11690","_ref_11694","_ref_11698","_ref_11699","_ref_11703","_ref_11707","_ref_11711","_ref_11712","_ref_11716","_ref_11717","_ref_11721","_ref_11723","_ref_11727","_ref_11728","_ref_11732","_ref_11733","_ref_11737","_ref_11739","_ref_11743","_ref_11744","_ref_11748","_ref_11753","_ref_11757","_ref_11761","_ref_11765","_ref_11771","_ref_11774","_ref_11777","_ref_11780","_ref_11800","_ref_11803","_ref_11806","_ref_11809","_ref_11816","_ref_11819","_ref_11822","_ref_11825","_ref_11828","_ref_11831","_ref_11834","_ref_11837","_ref_11840","_ref_11841","_ref_11844","_ref_11847","_ref_11850","_ref_11853","_ref_11856","_ref_11859","_ref_11862","_ref_11865","_ref_11868","_ref_11869","_ref_11872","_ref_11875","_ref_11878","_ref_11881","_ref_11884","_ref_11887","_ref_11890","_ref_11893","_ref_11896","_ref_11897","_ref_11905","_ref_11906","_ref_11909","_ref_11911","_ref_11914","_ref_11915","_ref_11918","_ref_11921","_ref_11922","_ref_11925","_ref_11928","_ref_11930","_ref_11933","_ref_11936","_ref_11937","_ref_11940","_ref_11941","_ref_11944","_ref_11946","_ref_11949","_ref_11952","_ref_11953","_ref_11956","_ref_11959","_ref_11960","_ref_11963","_ref_11966","_ref_11968","_ref_11971","_ref_11974","_ref_11975","_ref_11985","_ref_11988","_ref_11991","_ref_11994","_ref_11997","_ref_12001","_ref_12004","_ref_12007","_ref_12010","_ref_12013","_ref_12016","_ref_12020","_ref_12023","_ref_12026","_ref_12029","_ref_12032","_ref_12035","_ref_12039","_ref_12072","_ref_12074","_ref_12075","_ref_12077","_ref_12078","_ref_12080","_ref_12081","_ref_12083","_ref_12084","_ref_12086","_ref_12087","_ref_12089","_ref_12090","_ref_12092","_ref_12094","_ref_12095","_ref_12302","_ref_12304","_ref_12305","_ref_12327","_ref_12331","_ref_12337","_ref_12347","_ref_12348","_ref_12350","_ref_12351","_ref_12357","_ref_12358","_ref_12360","_ref_12361","_ref_12376","_ref_12377","_ref_12380","_ref_12381","_ref_13644","_ref_13647","_ref_13650","_ref_13652","_ref_13653","_ref_13654","_ref_13655","_ref_13657","_ref_13658","_ref_13661","_ref_13665","_ref_13669","_ref_13673","_ref_13676","_ref_13679","_ref_13682","_ref_13684","_ref_13685","_ref_15168","_ref_15170","_ref_15203","_ref_15207","_ref_15208","_ref_15212","_ref_15213","_ref_15217","_ref_15218","_ref_15223","_ref_15225","_ref_15229","_ref_15231","_ref_15235","_ref_15242","_ref_15275","_ref_15276","_ref_15285","_ref_15287","_ref_15290"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Statement"},{"type":"production","id":"prod-Declaration","name":"Declaration","referencingIds":["_ref_11031","_ref_11040","_ref_11045","_ref_11050","_ref_11059","_ref_11060","_ref_11069","_ref_11070","_ref_11076","_ref_11077","_ref_11079","_ref_11085","_ref_11086","_ref_11088","_ref_11093","_ref_11094","_ref_11111","_ref_11112","_ref_11119","_ref_11124","_ref_13633","_ref_14107","_ref_14132","_ref_14133","_ref_14146","_ref_14147","_ref_14168","_ref_14169","_ref_14192","_ref_14193","_ref_14220","_ref_14221","_ref_14234","_ref_14253","_ref_14254"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Declaration"},{"type":"production","id":"prod-HoistableDeclaration","name":"HoistableDeclaration","referencingIds":["_ref_10952","_ref_11078","_ref_11087","_ref_11095","_ref_11096","_ref_11113","_ref_11114","_ref_14108","_ref_14134","_ref_14135","_ref_14148","_ref_14170","_ref_14194","_ref_14195","_ref_14222","_ref_14223","_ref_14235","_ref_14255","_ref_14256"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"HoistableDeclaration"},{"type":"production","id":"prod-BreakableStatement","name":"BreakableStatement","referencingIds":["_ref_10943","_ref_11015","_ref_11024","_ref_12379"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"BreakableStatement"},{"type":"clause","id":"sec-statement-semantics-static-semantics-containsduplicatelabels","aoid":null,"title":"Static Semantics: ContainsDuplicateLabels","titleHTML":"Static Semantics: ContainsDuplicateLabels","number":"13.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsDuplicateLabels"},{"type":"clause","id":"sec-statement-semantics-static-semantics-containsundefinedbreaktarget","aoid":null,"title":"Static Semantics: ContainsUndefinedBreakTarget","titleHTML":"Static Semantics: ContainsUndefinedBreakTarget","number":"13.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsUndefinedBreakTarget"},{"type":"clause","id":"sec-statement-semantics-static-semantics-containsundefinedcontinuetarget","aoid":null,"title":"Static Semantics: ContainsUndefinedContinueTarget","titleHTML":"Static Semantics: ContainsUndefinedContinueTarget","number":"13.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsUndefinedContinueTarget"},{"type":"clause","id":"sec-static-semantics-declarationpart","aoid":null,"title":"Static Semantics: DeclarationPart","titleHTML":"Static Semantics: DeclarationPart","number":"13.1.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: DeclarationPart"},{"type":"clause","id":"sec-statement-semantics-static-semantics-vardeclarednames","aoid":null,"title":"Static Semantics: VarDeclaredNames","titleHTML":"Static Semantics: VarDeclaredNames","number":"13.1.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: VarDeclaredNames"},{"type":"clause","id":"sec-statement-semantics-static-semantics-varscopeddeclarations","aoid":null,"title":"Static Semantics: VarScopedDeclarations","titleHTML":"Static Semantics: VarScopedDeclarations","number":"13.1.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: VarScopedDeclarations"},{"type":"clause","id":"sec-statement-semantics-runtime-semantics-labelledevaluation","aoid":null,"title":"Runtime Semantics: LabelledEvaluation","titleHTML":"Runtime Semantics: LabelledEvaluation","number":"13.1.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: LabelledEvaluation"},{"type":"clause","id":"sec-statement-semantics-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"13.1.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-statement-semantics","aoid":null,"title":"Statement Semantics","titleHTML":"Statement Semantics","number":"13.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Statement Semantics"},{"type":"production","id":"prod-BlockStatement","name":"BlockStatement","referencingIds":["_ref_9022","_ref_10938","_ref_15179","_ref_15180"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"BlockStatement"},{"type":"production","id":"prod-Block","name":"Block","referencingIds":["_ref_11025","_ref_11128","_ref_11135","_ref_11461","_ref_12391","_ref_12393","_ref_12395","_ref_12399","_ref_12400","_ref_12401","_ref_12406","_ref_12409","_ref_12411","_ref_12412","_ref_12414","_ref_12416","_ref_12418","_ref_12420","_ref_12423","_ref_12427","_ref_12428","_ref_12429","_ref_12431","_ref_12433","_ref_12435","_ref_12437","_ref_12440","_ref_12444","_ref_12445","_ref_12446","_ref_12448","_ref_12450","_ref_12452","_ref_12454","_ref_12457","_ref_12461","_ref_12462","_ref_12463","_ref_12465","_ref_12467","_ref_12469","_ref_12471","_ref_12474","_ref_12478","_ref_12479","_ref_12480","_ref_12482","_ref_12484","_ref_12486","_ref_12488","_ref_12491","_ref_12495","_ref_12496","_ref_12498","_ref_12501","_ref_12502","_ref_12503","_ref_12504","_ref_12505","_ref_12507","_ref_12509","_ref_12511","_ref_12513","_ref_12516","_ref_13711","_ref_13714","_ref_13716","_ref_13721","_ref_13722","_ref_15306","_ref_15309"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Block"},{"type":"production","id":"prod-StatementList","name":"StatementList","referencingIds":["_ref_8923","_ref_8924","_ref_8925","_ref_11026","_ref_11028","_ref_11032","_ref_11033","_ref_11034","_ref_11035","_ref_11036","_ref_11038","_ref_11041","_ref_11043","_ref_11046","_ref_11048","_ref_11051","_ref_11053","_ref_11061","_ref_11063","_ref_11071","_ref_11073","_ref_11080","_ref_11082","_ref_11089","_ref_11091","_ref_11102","_ref_11104","_ref_11115","_ref_11117","_ref_11120","_ref_11122","_ref_11125","_ref_11126","_ref_11127","_ref_11129","_ref_11131","_ref_11133","_ref_11134","_ref_12106","_ref_12107","_ref_12129","_ref_12130","_ref_12131","_ref_12132","_ref_12133","_ref_12134","_ref_12151","_ref_12152","_ref_12153","_ref_12154","_ref_12155","_ref_12156","_ref_12173","_ref_12174","_ref_12175","_ref_12176","_ref_12177","_ref_12178","_ref_12192","_ref_12193","_ref_12194","_ref_12195","_ref_12196","_ref_12197","_ref_12211","_ref_12212","_ref_12213","_ref_12214","_ref_12215","_ref_12216","_ref_12233","_ref_12234","_ref_12235","_ref_12236","_ref_12237","_ref_12238","_ref_12255","_ref_12256","_ref_12257","_ref_12258","_ref_12259","_ref_12260","_ref_12283","_ref_12285","_ref_12287","_ref_12296","_ref_12297","_ref_12298","_ref_12299","_ref_12540","_ref_12665","_ref_12666","_ref_12667","_ref_12668","_ref_12669","_ref_12670","_ref_12671","_ref_12672","_ref_13629","_ref_13631","_ref_13707","_ref_13708","_ref_13709","_ref_13710","_ref_13838","_ref_13843","_ref_13844","_ref_13845","_ref_13849","_ref_13850","_ref_13851","_ref_13852","_ref_13853","_ref_13854","_ref_13855","_ref_13857","_ref_13858","_ref_13859","_ref_13860","_ref_13861","_ref_13862","_ref_14294","_ref_14295","_ref_14298","_ref_14299","_ref_14303","_ref_14304","_ref_15093","_ref_15100","_ref_15108","_ref_15115","_ref_15122","_ref_15135","_ref_15148","_ref_15159","_ref_15160","_ref_15266"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"StatementList"},{"type":"production","id":"prod-StatementListItem","name":"StatementListItem","referencingIds":["_ref_11027","_ref_11029","_ref_11037","_ref_11039","_ref_11042","_ref_11044","_ref_11047","_ref_11049","_ref_11052","_ref_11054","_ref_11062","_ref_11064","_ref_11072","_ref_11074","_ref_11081","_ref_11083","_ref_11090","_ref_11092","_ref_11103","_ref_11105","_ref_11116","_ref_11118","_ref_11121","_ref_11123","_ref_11130","_ref_11132","_ref_12542","_ref_13630","_ref_13632","_ref_13888","_ref_13931","_ref_13940","_ref_13946","_ref_13952","_ref_13959","_ref_13971","_ref_13972","_ref_15178","_ref_15271"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"StatementListItem"},{"type":"clause","id":"sec-block-static-semantics-early-errors","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"13.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: Early Errors"},{"type":"clause","id":"sec-block-static-semantics-containsduplicatelabels","aoid":null,"title":"Static Semantics: ContainsDuplicateLabels","titleHTML":"Static Semantics: ContainsDuplicateLabels","number":"13.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsDuplicateLabels"},{"type":"clause","id":"sec-block-static-semantics-containsundefinedbreaktarget","aoid":null,"title":"Static Semantics: ContainsUndefinedBreakTarget","titleHTML":"Static Semantics: ContainsUndefinedBreakTarget","number":"13.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsUndefinedBreakTarget"},{"type":"clause","id":"sec-block-static-semantics-containsundefinedcontinuetarget","aoid":null,"title":"Static Semantics: ContainsUndefinedContinueTarget","titleHTML":"Static Semantics: ContainsUndefinedContinueTarget","number":"13.2.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsUndefinedContinueTarget"},{"type":"clause","id":"sec-block-static-semantics-lexicallydeclarednames","aoid":null,"title":"Static Semantics: LexicallyDeclaredNames","titleHTML":"Static Semantics: LexicallyDeclaredNames","number":"13.2.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: LexicallyDeclaredNames"},{"type":"clause","id":"sec-block-static-semantics-lexicallyscopeddeclarations","aoid":null,"title":"Static Semantics: LexicallyScopedDeclarations","titleHTML":"Static Semantics: LexicallyScopedDeclarations","number":"13.2.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: LexicallyScopedDeclarations"},{"type":"clause","id":"sec-block-static-semantics-toplevellexicallydeclarednames","aoid":null,"title":"Static Semantics: TopLevelLexicallyDeclaredNames","titleHTML":"Static Semantics: TopLevelLexicallyDeclaredNames","number":"13.2.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: TopLevelLexicallyDeclaredNames"},{"type":"clause","id":"sec-block-static-semantics-toplevellexicallyscopeddeclarations","aoid":null,"title":"Static Semantics: TopLevelLexicallyScopedDeclarations","titleHTML":"Static Semantics: TopLevelLexicallyScopedDeclarations","number":"13.2.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_161"],"key":"Static Semantics: TopLevelLexicallyScopedDeclarations"},{"type":"clause","id":"sec-block-static-semantics-toplevelvardeclarednames","aoid":null,"title":"Static Semantics: TopLevelVarDeclaredNames","titleHTML":"Static Semantics: TopLevelVarDeclaredNames","number":"13.2.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: TopLevelVarDeclaredNames"},{"type":"clause","id":"sec-block-static-semantics-toplevelvarscopeddeclarations","aoid":null,"title":"Static Semantics: TopLevelVarScopedDeclarations","titleHTML":"Static Semantics: TopLevelVarScopedDeclarations","number":"13.2.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_162"],"key":"Static Semantics: TopLevelVarScopedDeclarations"},{"type":"clause","id":"sec-block-static-semantics-vardeclarednames","aoid":null,"title":"Static Semantics: VarDeclaredNames","titleHTML":"Static Semantics: VarDeclaredNames","number":"13.2.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: VarDeclaredNames"},{"type":"clause","id":"sec-block-static-semantics-varscopeddeclarations","aoid":null,"title":"Static Semantics: VarScopedDeclarations","titleHTML":"Static Semantics: VarScopedDeclarations","number":"13.2.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: VarScopedDeclarations"},{"type":"clause","id":"sec-block-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"13.2.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"op","aoid":"BlockDeclarationInstantiation","refId":"sec-blockdeclarationinstantiation","location":"","referencingIds":[],"key":"BlockDeclarationInstantiation"},{"type":"clause","id":"sec-blockdeclarationinstantiation","aoid":"BlockDeclarationInstantiation","title":"Runtime Semantics: BlockDeclarationInstantiation ( code, env )","titleHTML":"Runtime Semantics: BlockDeclarationInstantiation ( <var>code</var>, <var>env</var> )","number":"13.2.14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3652","_ref_3964","_ref_8765","_ref_8766"],"key":"Runtime Semantics: BlockDeclarationInstantiation ( code, env )"},{"type":"clause","id":"sec-block","aoid":null,"title":"Block","titleHTML":"Block","number":"13.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_820"],"key":"Block"},{"type":"production","id":"prod-LexicalDeclaration","name":"LexicalDeclaration","referencingIds":["_ref_8837","_ref_8841","_ref_8844","_ref_8848","_ref_8850","_ref_8853","_ref_8856","_ref_9071","_ref_9075","_ref_10954","_ref_10995","_ref_10996","_ref_11166","_ref_11470","_ref_11548","_ref_11595","_ref_11668","_ref_11672","_ref_11682","_ref_11695","_ref_11708","_ref_11724","_ref_11740","_ref_11762","_ref_11766","_ref_11767","_ref_11768","_ref_13670","_ref_15269","_ref_15272","_ref_15278"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"LexicalDeclaration"},{"type":"production","id":"prod-LetOrConst","name":"LetOrConst","referencingIds":["_ref_11150","_ref_11159","_ref_11168","_ref_11181","_ref_11183","_ref_11184","_ref_11579","_ref_11811","_ref_11898","_ref_11976","_ref_11979","_ref_11982"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"LetOrConst"},{"type":"production","id":"prod-BindingList","name":"BindingList","referencingIds":["_ref_11151","_ref_11153","_ref_11160","_ref_11161","_ref_11162","_ref_11169","_ref_11170","_ref_11171","_ref_11173","_ref_11182","_ref_11185","_ref_11186","_ref_11187","_ref_11189"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"BindingList"},{"type":"production","id":"prod-LexicalBinding","name":"LexicalBinding","referencingIds":["_ref_11141","_ref_11142","_ref_11146","_ref_11147","_ref_11149","_ref_11152","_ref_11154","_ref_11167","_ref_11172","_ref_11174","_ref_11188","_ref_11190","_ref_11193","_ref_11471"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"LexicalBinding"},{"type":"clause","id":"sec-let-and-const-declarations-static-semantics-early-errors","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"13.3.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_279"],"key":"Static Semantics: Early Errors"},{"type":"clause","id":"sec-let-and-const-declarations-static-semantics-boundnames","aoid":null,"title":"Static Semantics: BoundNames","titleHTML":"Static Semantics: BoundNames","number":"13.3.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: BoundNames"},{"type":"clause","id":"sec-let-and-const-declarations-static-semantics-isconstantdeclaration","aoid":null,"title":"Static Semantics: IsConstantDeclaration","titleHTML":"Static Semantics: IsConstantDeclaration","number":"13.3.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsConstantDeclaration"},{"type":"clause","id":"sec-let-and-const-declarations-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"13.3.1.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-let-and-const-declarations","aoid":null,"title":"Let and Const Declarations","titleHTML":"Let and Const Declarations","number":"13.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Let and Const Declarations"},{"type":"production","id":"prod-VariableStatement","name":"VariableStatement","referencingIds":["_ref_9045","_ref_9073","_ref_9082","_ref_10939","_ref_10961","_ref_10969","_ref_10976","_ref_13634","_ref_13969","_ref_13986","_ref_13995","_ref_13996","_ref_14106","_ref_14130","_ref_14131","_ref_14144","_ref_14145","_ref_14166","_ref_14167","_ref_14190","_ref_14191","_ref_14219","_ref_14233","_ref_14251","_ref_14252","_ref_15129","_ref_15142","_ref_15155"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"VariableStatement"},{"type":"production","id":"prod-VariableDeclarationList","name":"VariableDeclarationList","referencingIds":["_ref_11211","_ref_11213","_ref_11219","_ref_11221","_ref_11229","_ref_11230","_ref_11233","_ref_11235","_ref_11237","_ref_11238","_ref_11239","_ref_11241","_ref_11544","_ref_11591","_ref_11678","_ref_11691","_ref_11704","_ref_11718","_ref_11722","_ref_11734","_ref_11738","_ref_11754","_ref_11758","_ref_13666"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"VariableDeclarationList"},{"type":"production","id":"prod-VariableDeclaration","name":"VariableDeclaration","referencingIds":["_ref_9030","_ref_9050","_ref_9055","_ref_9060","_ref_9065","_ref_9066","_ref_9085","_ref_11205","_ref_11206","_ref_11210","_ref_11212","_ref_11214","_ref_11220","_ref_11222","_ref_11231","_ref_11232","_ref_11234","_ref_11236","_ref_11240","_ref_11242","_ref_11250","_ref_11252","_ref_13867","_ref_13874","_ref_14306","_ref_14313","_ref_15282"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"VariableDeclaration"},{"type":"clause","id":"sec-variable-statement-static-semantics-boundnames","aoid":null,"title":"Static Semantics: BoundNames","titleHTML":"Static Semantics: BoundNames","number":"13.3.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: BoundNames"},{"type":"clause","id":"sec-variable-statement-static-semantics-vardeclarednames","aoid":null,"title":"Static Semantics: VarDeclaredNames","titleHTML":"Static Semantics: VarDeclaredNames","number":"13.3.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: VarDeclaredNames"},{"type":"clause","id":"sec-variable-statement-static-semantics-varscopeddeclarations","aoid":null,"title":"Static Semantics: VarScopedDeclarations","titleHTML":"Static Semantics: VarScopedDeclarations","number":"13.3.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: VarScopedDeclarations"},{"type":"clause","id":"sec-variable-statement-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"13.3.2.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-variable-statement","aoid":null,"title":"Variable Statement","titleHTML":"Variable Statement","number":"13.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Variable Statement"},{"type":"production","id":"prod-BindingPattern","name":"BindingPattern","referencingIds":["_ref_9829","_ref_9833","_ref_11157","_ref_11178","_ref_11180","_ref_11200","_ref_11203","_ref_11217","_ref_11226","_ref_11228","_ref_11254","_ref_11257","_ref_11283","_ref_11288","_ref_11318","_ref_11320","_ref_11348","_ref_11354","_ref_11355","_ref_11356","_ref_11357","_ref_11362","_ref_11363","_ref_11437","_ref_11441","_ref_11444","_ref_11445","_ref_11446","_ref_11450","_ref_11582","_ref_11902","_ref_12403","_ref_12788","_ref_12792"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"BindingPattern"},{"type":"production","id":"prod-ObjectBindingPattern","name":"ObjectBindingPattern","referencingIds":["_ref_11258","_ref_11368","_ref_11369"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ObjectBindingPattern"},{"type":"production","id":"prod-ArrayBindingPattern","name":"ArrayBindingPattern","referencingIds":["_ref_11259","_ref_11370","_ref_11371","_ref_11472"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ArrayBindingPattern"},{"type":"production","id":"prod-BindingRestProperty","name":"BindingRestProperty","referencingIds":["_ref_11260","_ref_11263","_ref_11375","_ref_11376","_ref_11378","_ref_11380"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"BindingRestProperty"},{"type":"production","id":"prod-BindingPropertyList","name":"BindingPropertyList","referencingIds":["_ref_11261","_ref_11262","_ref_11272","_ref_11301","_ref_11303","_ref_11333","_ref_11335","_ref_11372","_ref_11373","_ref_11374","_ref_11377","_ref_11379","_ref_11381","_ref_11383"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"BindingPropertyList"},{"type":"production","id":"prod-BindingElementList","name":"BindingElementList","referencingIds":["_ref_11266","_ref_11267","_ref_11275","_ref_11293","_ref_11295","_ref_11296","_ref_11299","_ref_11305","_ref_11307","_ref_11325","_ref_11327","_ref_11328","_ref_11331","_ref_11337","_ref_11339","_ref_11401","_ref_11402","_ref_11403","_ref_11404","_ref_11405","_ref_11407","_ref_11409","_ref_11412","_ref_11418","_ref_11420"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"BindingElementList"},{"type":"production","id":"prod-BindingElisionElement","name":"BindingElisionElement","referencingIds":["_ref_11274","_ref_11276","_ref_11306","_ref_11308","_ref_11338","_ref_11340","_ref_11416","_ref_11417","_ref_11419","_ref_11421"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"BindingElisionElement"},{"type":"production","id":"prod-BindingProperty","name":"BindingProperty","referencingIds":["_ref_11271","_ref_11273","_ref_11302","_ref_11304","_ref_11334","_ref_11336","_ref_11382","_ref_11384"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"BindingProperty"},{"type":"production","id":"prod-BindingElement","name":"BindingElement","referencingIds":["_ref_11278","_ref_11281","_ref_11310","_ref_11311","_ref_11313","_ref_11314","_ref_11342","_ref_11343","_ref_11345","_ref_11347","_ref_11389","_ref_11391","_ref_11422","_ref_11423","_ref_11425","_ref_11427","_ref_12538","_ref_12663","_ref_12664","_ref_12683","_ref_12684","_ref_12685","_ref_12686","_ref_12687"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"BindingElement"},{"type":"production","id":"prod-SingleNameBinding","name":"SingleNameBinding","referencingIds":["_ref_11279","_ref_11282","_ref_11385","_ref_11386","_ref_11387","_ref_11428","_ref_11429"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"SingleNameBinding"},{"type":"production","id":"prod-BindingRestElement","name":"BindingRestElement","referencingIds":["_ref_11265","_ref_11269","_ref_11291","_ref_11292","_ref_11298","_ref_11300","_ref_11323","_ref_11324","_ref_11330","_ref_11332","_ref_11397","_ref_11400","_ref_11411","_ref_11415","_ref_12537","_ref_12688","_ref_12689","_ref_12690","_ref_12691","_ref_12692"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"BindingRestElement"},{"type":"clause","id":"sec-destructuring-binding-patterns-static-semantics-boundnames","aoid":null,"title":"Static Semantics: BoundNames","titleHTML":"Static Semantics: BoundNames","number":"13.3.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: BoundNames"},{"type":"clause","id":"sec-destructuring-binding-patterns-static-semantics-containsexpression","aoid":null,"title":"Static Semantics: ContainsExpression","titleHTML":"Static Semantics: ContainsExpression","number":"13.3.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsExpression"},{"type":"clause","id":"sec-destructuring-binding-patterns-static-semantics-hasinitializer","aoid":null,"title":"Static Semantics: HasInitializer","titleHTML":"Static Semantics: HasInitializer","number":"13.3.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: HasInitializer"},{"type":"clause","id":"sec-destructuring-binding-patterns-static-semantics-issimpleparameterlist","aoid":null,"title":"Static Semantics: IsSimpleParameterList","titleHTML":"Static Semantics: IsSimpleParameterList","number":"13.3.3.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsSimpleParameterList"},{"type":"clause","id":"sec-destructuring-binding-patterns-runtime-semantics-bindinginitialization","aoid":null,"title":"Runtime Semantics: BindingInitialization","titleHTML":"Runtime Semantics: BindingInitialization","number":"13.3.3.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: BindingInitialization"},{"type":"clause","id":"sec-destructuring-binding-patterns-runtime-semantics-propertybindinginitialization","aoid":null,"title":"Runtime Semantics: PropertyBindingInitialization","titleHTML":"Runtime Semantics: PropertyBindingInitialization","number":"13.3.3.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: PropertyBindingInitialization"},{"type":"clause","id":"sec-destructuring-binding-patterns-runtime-semantics-restbindinginitialization","aoid":null,"title":"Runtime Semantics: RestBindingInitialization","titleHTML":"Runtime Semantics: RestBindingInitialization","number":"13.3.3.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: RestBindingInitialization"},{"type":"clause","id":"sec-destructuring-binding-patterns-runtime-semantics-iteratorbindinginitialization","aoid":null,"title":"Runtime Semantics: IteratorBindingInitialization","titleHTML":"Runtime Semantics: IteratorBindingInitialization","number":"13.3.3.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: IteratorBindingInitialization"},{"type":"clause","id":"sec-runtime-semantics-keyedbindinginitialization","aoid":null,"title":"Runtime Semantics: KeyedBindingInitialization","titleHTML":"Runtime Semantics: KeyedBindingInitialization","number":"13.3.3.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: KeyedBindingInitialization"},{"type":"clause","id":"sec-destructuring-binding-patterns","aoid":null,"title":"Destructuring Binding Patterns","titleHTML":"Destructuring Binding Patterns","number":"13.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Destructuring Binding Patterns"},{"type":"clause","id":"sec-declarations-and-the-variable-statement","aoid":null,"title":"Declarations and the Variable Statement","titleHTML":"Declarations and the Variable Statement","number":"13.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Declarations and the Variable Statement"},{"type":"production","id":"prod-EmptyStatement","name":"EmptyStatement","referencingIds":["_ref_10940","_ref_10962","_ref_10970","_ref_10977","_ref_10997","_ref_11004","_ref_13635"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"EmptyStatement"},{"type":"clause","id":"sec-empty-statement-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"13.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-empty-statement","aoid":null,"title":"Empty Statement","titleHTML":"Empty Statement","number":"13.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Empty Statement"},{"type":"production","id":"prod-ExpressionStatement","name":"ExpressionStatement","referencingIds":["_ref_8862","_ref_8864","_ref_8866","_ref_8868","_ref_8870","_ref_8872","_ref_8874","_ref_8876","_ref_8878","_ref_8881","_ref_8883","_ref_8894","_ref_8895","_ref_8897","_ref_8899","_ref_8901","_ref_8902","_ref_10941","_ref_10963","_ref_10971","_ref_10978","_ref_10998","_ref_11005","_ref_11460","_ref_11462","_ref_11466","_ref_11469","_ref_12541","_ref_12547","_ref_12549","_ref_12553","_ref_12554","_ref_12555","_ref_13636","_ref_15273"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ExpressionStatement"},{"type":"clause","id":"sec-expression-statement-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"13.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-expression-statement","aoid":null,"title":"Expression Statement","titleHTML":"Expression Statement","number":"13.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_821"],"key":"Expression Statement"},{"type":"production","id":"prod-IfStatement","name":"IfStatement","referencingIds":["_ref_10942","_ref_15274","_ref_15277"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"IfStatement"},{"type":"clause","id":"sec-if-statement-static-semantics-early-errors","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"13.6.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: Early Errors"},{"type":"clause","id":"sec-if-statement-static-semantics-containsduplicatelabels","aoid":null,"title":"Static Semantics: ContainsDuplicateLabels","titleHTML":"Static Semantics: ContainsDuplicateLabels","number":"13.6.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsDuplicateLabels"},{"type":"clause","id":"sec-if-statement-static-semantics-containsundefinedbreaktarget","aoid":null,"title":"Static Semantics: ContainsUndefinedBreakTarget","titleHTML":"Static Semantics: ContainsUndefinedBreakTarget","number":"13.6.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsUndefinedBreakTarget"},{"type":"clause","id":"sec-if-statement-static-semantics-containsundefinedcontinuetarget","aoid":null,"title":"Static Semantics: ContainsUndefinedContinueTarget","titleHTML":"Static Semantics: ContainsUndefinedContinueTarget","number":"13.6.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsUndefinedContinueTarget"},{"type":"clause","id":"sec-if-statement-static-semantics-vardeclarednames","aoid":null,"title":"Static Semantics: VarDeclaredNames","titleHTML":"Static Semantics: VarDeclaredNames","number":"13.6.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: VarDeclaredNames"},{"type":"clause","id":"sec-if-statement-static-semantics-varscopeddeclarations","aoid":null,"title":"Static Semantics: VarScopedDeclarations","titleHTML":"Static Semantics: VarScopedDeclarations","number":"13.6.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: VarScopedDeclarations"},{"type":"clause","id":"sec-if-statement-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"13.6.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_822"],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-if-statement","aoid":null,"title":"The if Statement","titleHTML":"The <code>if</code> Statement","number":"13.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_757"],"key":"The if Statement"},{"type":"production","id":"prod-IterationStatement","name":"IterationStatement","referencingIds":["_ref_10959","_ref_10983","_ref_10984","_ref_11011","_ref_11012","_ref_11022","_ref_11628","_ref_12051","_ref_12059","_ref_15284","_ref_15286","_ref_15288"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"IterationStatement"},{"type":"production","id":"prod-ForDeclaration","name":"ForDeclaration","referencingIds":["_ref_11558","_ref_11567","_ref_11576","_ref_11605","_ref_11614","_ref_11623","_ref_11798","_ref_11801","_ref_11804","_ref_11807","_ref_11808","_ref_11810","_ref_11820","_ref_11829","_ref_11838","_ref_11848","_ref_11857","_ref_11866","_ref_11876","_ref_11885","_ref_11894","_ref_11912","_ref_11931","_ref_11934","_ref_11947","_ref_11969","_ref_11972","_ref_11995","_ref_11998","_ref_12000","_ref_12014","_ref_12017","_ref_12019","_ref_12033","_ref_12036","_ref_12038","_ref_12042","_ref_12044","_ref_13648","_ref_13680","_ref_15280"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ForDeclaration"},{"type":"production","id":"prod-ForBinding","name":"ForBinding","referencingIds":["_ref_9086","_ref_11555","_ref_11564","_ref_11573","_ref_11580","_ref_11602","_ref_11611","_ref_11620","_ref_11812","_ref_11813","_ref_11817","_ref_11826","_ref_11835","_ref_11845","_ref_11854","_ref_11863","_ref_11873","_ref_11882","_ref_11891","_ref_11899","_ref_11900","_ref_11907","_ref_11910","_ref_11923","_ref_11926","_ref_11929","_ref_11942","_ref_11945","_ref_11957","_ref_11961","_ref_11964","_ref_11967","_ref_11977","_ref_11978","_ref_11980","_ref_11981","_ref_11989","_ref_11993","_ref_12008","_ref_12012","_ref_12027","_ref_12031","_ref_12043","_ref_13645","_ref_13677","_ref_13868","_ref_13875","_ref_14307","_ref_14314","_ref_15283"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ForBinding"},{"type":"clause","id":"sec-semantics-static-semantics-early-errors","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"13.7.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: Early Errors"},{"type":"op","aoid":"LoopContinues","refId":"sec-loopcontinues","location":"","referencingIds":[],"key":"LoopContinues"},{"type":"clause","id":"sec-loopcontinues","aoid":"LoopContinues","title":"Runtime Semantics: LoopContinues ( completion, labelSet )","titleHTML":"Runtime Semantics: LoopContinues ( <var>completion</var>, <var>labelSet</var> )","number":"13.7.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3776","_ref_3785","_ref_3806","_ref_3883"],"key":"Runtime Semantics: LoopContinues ( completion, labelSet )"},{"type":"clause","id":"sec-iteration-statements-semantics","aoid":null,"title":"Semantics","titleHTML":"Semantics","number":"13.7.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Semantics"},{"type":"clause","id":"sec-do-while-statement-static-semantics-containsduplicatelabels","aoid":null,"title":"Static Semantics: ContainsDuplicateLabels","titleHTML":"Static Semantics: ContainsDuplicateLabels","number":"13.7.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsDuplicateLabels"},{"type":"clause","id":"sec-do-while-statement-static-semantics-containsundefinedbreaktarget","aoid":null,"title":"Static Semantics: ContainsUndefinedBreakTarget","titleHTML":"Static Semantics: ContainsUndefinedBreakTarget","number":"13.7.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsUndefinedBreakTarget"},{"type":"clause","id":"sec-do-while-statement-static-semantics-containsundefinedcontinuetarget","aoid":null,"title":"Static Semantics: ContainsUndefinedContinueTarget","titleHTML":"Static Semantics: ContainsUndefinedContinueTarget","number":"13.7.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsUndefinedContinueTarget"},{"type":"clause","id":"sec-do-while-statement-static-semantics-vardeclarednames","aoid":null,"title":"Static Semantics: VarDeclaredNames","titleHTML":"Static Semantics: VarDeclaredNames","number":"13.7.2.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: VarDeclaredNames"},{"type":"clause","id":"sec-do-while-statement-static-semantics-varscopeddeclarations","aoid":null,"title":"Static Semantics: VarScopedDeclarations","titleHTML":"Static Semantics: VarScopedDeclarations","number":"13.7.2.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: VarScopedDeclarations"},{"type":"clause","id":"sec-do-while-statement-runtime-semantics-labelledevaluation","aoid":null,"title":"Runtime Semantics: LabelledEvaluation","titleHTML":"Runtime Semantics: LabelledEvaluation","number":"13.7.2.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: LabelledEvaluation"},{"type":"clause","id":"sec-do-while-statement","aoid":null,"title":"The do-while Statement","titleHTML":"The <code>do</code>-<code>while</code> Statement","number":"13.7.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_302"],"key":"The do-while Statement"},{"type":"clause","id":"sec-while-statement-static-semantics-containsduplicatelabels","aoid":null,"title":"Static Semantics: ContainsDuplicateLabels","titleHTML":"Static Semantics: ContainsDuplicateLabels","number":"13.7.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsDuplicateLabels"},{"type":"clause","id":"sec-while-statement-static-semantics-containsundefinedbreaktarget","aoid":null,"title":"Static Semantics: ContainsUndefinedBreakTarget","titleHTML":"Static Semantics: ContainsUndefinedBreakTarget","number":"13.7.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsUndefinedBreakTarget"},{"type":"clause","id":"sec-while-statement-static-semantics-containsundefinedcontinuetarget","aoid":null,"title":"Static Semantics: ContainsUndefinedContinueTarget","titleHTML":"Static Semantics: ContainsUndefinedContinueTarget","number":"13.7.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsUndefinedContinueTarget"},{"type":"clause","id":"sec-while-statement-static-semantics-vardeclarednames","aoid":null,"title":"Static Semantics: VarDeclaredNames","titleHTML":"Static Semantics: VarDeclaredNames","number":"13.7.3.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: VarDeclaredNames"},{"type":"clause","id":"sec-while-statement-static-semantics-varscopeddeclarations","aoid":null,"title":"Static Semantics: VarScopedDeclarations","titleHTML":"Static Semantics: VarScopedDeclarations","number":"13.7.3.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: VarScopedDeclarations"},{"type":"clause","id":"sec-while-statement-runtime-semantics-labelledevaluation","aoid":null,"title":"Runtime Semantics: LabelledEvaluation","titleHTML":"Runtime Semantics: LabelledEvaluation","number":"13.7.3.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: LabelledEvaluation"},{"type":"clause","id":"sec-while-statement","aoid":null,"title":"The while Statement","titleHTML":"The <code>while</code> Statement","number":"13.7.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"The while Statement"},{"type":"clause","id":"sec-for-statement-static-semantics-early-errors","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"13.7.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: Early Errors"},{"type":"clause","id":"sec-for-statement-static-semantics-containsduplicatelabels","aoid":null,"title":"Static Semantics: ContainsDuplicateLabels","titleHTML":"Static Semantics: ContainsDuplicateLabels","number":"13.7.4.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsDuplicateLabels"},{"type":"clause","id":"sec-for-statement-static-semantics-containsundefinedbreaktarget","aoid":null,"title":"Static Semantics: ContainsUndefinedBreakTarget","titleHTML":"Static Semantics: ContainsUndefinedBreakTarget","number":"13.7.4.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsUndefinedBreakTarget"},{"type":"clause","id":"sec-for-statement-static-semantics-containsundefinedcontinuetarget","aoid":null,"title":"Static Semantics: ContainsUndefinedContinueTarget","titleHTML":"Static Semantics: ContainsUndefinedContinueTarget","number":"13.7.4.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsUndefinedContinueTarget"},{"type":"clause","id":"sec-for-statement-static-semantics-vardeclarednames","aoid":null,"title":"Static Semantics: VarDeclaredNames","titleHTML":"Static Semantics: VarDeclaredNames","number":"13.7.4.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: VarDeclaredNames"},{"type":"clause","id":"sec-for-statement-static-semantics-varscopeddeclarations","aoid":null,"title":"Static Semantics: VarScopedDeclarations","titleHTML":"Static Semantics: VarScopedDeclarations","number":"13.7.4.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: VarScopedDeclarations"},{"type":"clause","id":"sec-for-statement-runtime-semantics-labelledevaluation","aoid":null,"title":"Runtime Semantics: LabelledEvaluation","titleHTML":"Runtime Semantics: LabelledEvaluation","number":"13.7.4.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: LabelledEvaluation"},{"type":"op","aoid":"ForBodyEvaluation","refId":"sec-forbodyevaluation","location":"","referencingIds":[],"key":"ForBodyEvaluation"},{"type":"clause","id":"sec-forbodyevaluation","aoid":"ForBodyEvaluation","title":"Runtime Semantics: ForBodyEvaluation ( test, increment, stmt, perIterationBindings, labelSet )","titleHTML":"Runtime Semantics: ForBodyEvaluation ( <var>test</var>, <var>increment</var>, <var>stmt</var>, <var>perIterationBindings</var>, <var>labelSet</var> )","number":"13.7.4.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3789","_ref_3791","_ref_3799"],"key":"Runtime Semantics: ForBodyEvaluation ( test, increment, stmt, perIterationBindings, labelSet )"},{"type":"op","aoid":"CreatePerIterationEnvironment","refId":"sec-createperiterationenvironment","location":"","referencingIds":[],"key":"CreatePerIterationEnvironment"},{"type":"clause","id":"sec-createperiterationenvironment","aoid":"CreatePerIterationEnvironment","title":"Runtime Semantics: CreatePerIterationEnvironment ( perIterationBindings )","titleHTML":"Runtime Semantics: CreatePerIterationEnvironment ( <var>perIterationBindings</var> )","number":"13.7.4.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3802","_ref_3809"],"key":"Runtime Semantics: CreatePerIterationEnvironment ( perIterationBindings )"},{"type":"clause","id":"sec-for-statement","aoid":null,"title":"The for Statement","titleHTML":"The <code>for</code> Statement","number":"13.7.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_303"],"key":"The for Statement"},{"type":"clause","id":"sec-for-in-and-for-of-statements-static-semantics-early-errors","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"13.7.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_280"],"key":"Static Semantics: Early Errors"},{"type":"clause","id":"sec-for-in-and-for-of-statements-static-semantics-boundnames","aoid":null,"title":"Static Semantics: BoundNames","titleHTML":"Static Semantics: BoundNames","number":"13.7.5.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: BoundNames"},{"type":"clause","id":"sec-for-in-and-for-of-statements-static-semantics-containsduplicatelabels","aoid":null,"title":"Static Semantics: ContainsDuplicateLabels","titleHTML":"Static Semantics: ContainsDuplicateLabels","number":"13.7.5.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_762"],"key":"Static Semantics: ContainsDuplicateLabels"},{"type":"clause","id":"sec-for-in-and-for-of-statements-static-semantics-containsundefinedbreaktarget","aoid":null,"title":"Static Semantics: ContainsUndefinedBreakTarget","titleHTML":"Static Semantics: ContainsUndefinedBreakTarget","number":"13.7.5.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_763"],"key":"Static Semantics: ContainsUndefinedBreakTarget"},{"type":"clause","id":"sec-for-in-and-for-of-statements-static-semantics-containsundefinedcontinuetarget","aoid":null,"title":"Static Semantics: ContainsUndefinedContinueTarget","titleHTML":"Static Semantics: ContainsUndefinedContinueTarget","number":"13.7.5.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_764"],"key":"Static Semantics: ContainsUndefinedContinueTarget"},{"type":"clause","id":"sec-for-in-and-for-of-statements-static-semantics-isdestructuring","aoid":null,"title":"Static Semantics: IsDestructuring","titleHTML":"Static Semantics: IsDestructuring","number":"13.7.5.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_765"],"key":"Static Semantics: IsDestructuring"},{"type":"clause","id":"sec-for-in-and-for-of-statements-static-semantics-vardeclarednames","aoid":null,"title":"Static Semantics: VarDeclaredNames","titleHTML":"Static Semantics: VarDeclaredNames","number":"13.7.5.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_766"],"key":"Static Semantics: VarDeclaredNames"},{"type":"clause","id":"sec-for-in-and-for-of-statements-static-semantics-varscopeddeclarations","aoid":null,"title":"Static Semantics: VarScopedDeclarations","titleHTML":"Static Semantics: VarScopedDeclarations","number":"13.7.5.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_767"],"key":"Static Semantics: VarScopedDeclarations"},{"type":"clause","id":"sec-for-in-and-for-of-statements-runtime-semantics-bindinginitialization","aoid":null,"title":"Runtime Semantics: BindingInitialization","titleHTML":"Runtime Semantics: BindingInitialization","number":"13.7.5.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: BindingInitialization"},{"type":"clause","id":"sec-runtime-semantics-bindinginstantiation","aoid":null,"title":"Runtime Semantics: BindingInstantiation","titleHTML":"Runtime Semantics: BindingInstantiation","number":"13.7.5.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: BindingInstantiation"},{"type":"clause","id":"sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation","aoid":null,"title":"Runtime Semantics: LabelledEvaluation","titleHTML":"Runtime Semantics: LabelledEvaluation","number":"13.7.5.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_768"],"key":"Runtime Semantics: LabelledEvaluation"},{"type":"op","aoid":"ForIn/OfHeadEvaluation","refId":"sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind","location":"","referencingIds":[],"key":"ForIn/OfHeadEvaluation"},{"type":"clause","id":"sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind","aoid":"ForIn/OfHeadEvaluation","title":"Runtime Semantics: ForIn/OfHeadEvaluation ( TDZnames, expr, iterationKind )","titleHTML":"Runtime Semantics: ForIn/OfHeadEvaluation ( <var>TDZnames</var>, <var>expr</var>, <var>iterationKind</var> )","number":"13.7.5.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3825","_ref_3827","_ref_3829","_ref_3831","_ref_3833","_ref_3835","_ref_3837","_ref_3839","_ref_3841","_ref_8785"],"key":"Runtime Semantics: ForIn/OfHeadEvaluation ( TDZnames, expr, iterationKind )"},{"type":"op","aoid":"ForIn/OfBodyEvaluation","refId":"sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset","location":"","referencingIds":[],"key":"ForIn/OfBodyEvaluation"},{"type":"clause","id":"sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset","aoid":"ForIn/OfBodyEvaluation","title":"Runtime Semantics: ForIn/OfBodyEvaluation ( lhs, stmt, iteratorRecord, iterationKind, lhsKind, labelSet [ , iteratorKind ] )","titleHTML":"Runtime Semantics: ForIn/OfBodyEvaluation ( <var>lhs</var>, <var>stmt</var>, <var>iteratorRecord</var>, <var>iterationKind</var>, <var>lhsKind</var>, <var>labelSet</var> [ , <var>iteratorKind</var> ] )","number":"13.7.5.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3826","_ref_3828","_ref_3830","_ref_3832","_ref_3834","_ref_3836","_ref_3838","_ref_3840","_ref_3842","_ref_8786"],"key":"Runtime Semantics: ForIn/OfBodyEvaluation ( lhs, stmt, iteratorRecord, iterationKind, lhsKind, labelSet [ , iteratorKind ] )"},{"type":"clause","id":"sec-for-in-and-for-of-statements-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"13.7.5.14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"op","aoid":"EnumerateObjectProperties","refId":"sec-enumerate-object-properties","location":"","referencingIds":[],"key":"EnumerateObjectProperties"},{"type":"clause","id":"sec-enumerate-object-properties","aoid":"EnumerateObjectProperties","title":"EnumerateObjectProperties ( O )","titleHTML":"EnumerateObjectProperties ( <var>O</var> )","number":"13.7.5.15","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1723","_ref_3853"],"key":"EnumerateObjectProperties ( O )"},{"type":"clause","id":"sec-for-in-and-for-of-statements","aoid":null,"title":"The for-in, for-of, and for-await-of Statements","titleHTML":"The <code>for</code>-<code>in</code>, <code>for</code>-<code>of</code>, and <code>for</code>-<code>await</code>-<code>of</code> Statements","number":"13.7.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_38","_ref_42"],"key":"The for-in, for-of, and for-await-of Statements"},{"type":"clause","id":"sec-iteration-statements","aoid":null,"title":"Iteration Statements","titleHTML":"Iteration Statements","number":"13.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_761","_ref_823","_ref_824","_ref_825","_ref_826"],"key":"Iteration Statements"},{"type":"production","id":"prod-ContinueStatement","name":"ContinueStatement","referencingIds":["_ref_10944","_ref_10964","_ref_10972","_ref_10999","_ref_11006","_ref_11629","_ref_12050","_ref_13637"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ContinueStatement"},{"type":"clause","id":"sec-continue-statement-static-semantics-early-errors","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"13.8.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: Early Errors"},{"type":"clause","id":"sec-continue-statement-static-semantics-containsundefinedcontinuetarget","aoid":null,"title":"Static Semantics: ContainsUndefinedContinueTarget","titleHTML":"Static Semantics: ContainsUndefinedContinueTarget","number":"13.8.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsUndefinedContinueTarget"},{"type":"clause","id":"sec-continue-statement-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"13.8.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-continue-statement","aoid":null,"title":"The continue Statement","titleHTML":"The <code>continue</code> Statement","number":"13.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"The continue Statement"},{"type":"production","id":"prod-BreakStatement","name":"BreakStatement","referencingIds":["_ref_10945","_ref_10965","_ref_10979","_ref_11000","_ref_11007","_ref_11016","_ref_12058","_ref_13638"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"BreakStatement"},{"type":"clause","id":"sec-break-statement-static-semantics-early-errors","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"13.9.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: Early Errors"},{"type":"clause","id":"sec-break-statement-static-semantics-containsundefinedbreaktarget","aoid":null,"title":"Static Semantics: ContainsUndefinedBreakTarget","titleHTML":"Static Semantics: ContainsUndefinedBreakTarget","number":"13.9.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsUndefinedBreakTarget"},{"type":"clause","id":"sec-break-statement-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"13.9.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-break-statement","aoid":null,"title":"The break Statement","titleHTML":"The <code>break</code> Statement","number":"13.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"The break Statement"},{"type":"production","id":"prod-ReturnStatement","name":"ReturnStatement","referencingIds":["_ref_8861","_ref_8863","_ref_8865","_ref_8867","_ref_8869","_ref_8871","_ref_8873","_ref_8875","_ref_8877","_ref_8879","_ref_8880","_ref_8882","_ref_8893","_ref_8896","_ref_8898","_ref_8900","_ref_10946","_ref_10966","_ref_10973","_ref_10980","_ref_11001","_ref_11008"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ReturnStatement"},{"type":"clause","id":"sec-return-statement-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"13.10.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-return-statement","aoid":null,"title":"The return Statement","titleHTML":"The <code>return</code> Statement","number":"13.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"The return Statement"},{"type":"production","id":"prod-WithStatement","name":"WithStatement","referencingIds":["_ref_9032","_ref_10947","_ref_15087","_ref_15254","_ref_15255","_ref_15289","_ref_15291","_ref_15292"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"WithStatement"},{"type":"clause","id":"sec-with-statement-static-semantics-early-errors","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"13.11.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_796"],"key":"Static Semantics: Early Errors"},{"type":"clause","id":"sec-with-statement-static-semantics-containsduplicatelabels","aoid":null,"title":"Static Semantics: ContainsDuplicateLabels","titleHTML":"Static Semantics: ContainsDuplicateLabels","number":"13.11.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsDuplicateLabels"},{"type":"clause","id":"sec-with-statement-static-semantics-containsundefinedbreaktarget","aoid":null,"title":"Static Semantics: ContainsUndefinedBreakTarget","titleHTML":"Static Semantics: ContainsUndefinedBreakTarget","number":"13.11.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsUndefinedBreakTarget"},{"type":"clause","id":"sec-with-statement-static-semantics-containsundefinedcontinuetarget","aoid":null,"title":"Static Semantics: ContainsUndefinedContinueTarget","titleHTML":"Static Semantics: ContainsUndefinedContinueTarget","number":"13.11.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsUndefinedContinueTarget"},{"type":"clause","id":"sec-with-statement-static-semantics-vardeclarednames","aoid":null,"title":"Static Semantics: VarDeclaredNames","titleHTML":"Static Semantics: VarDeclaredNames","number":"13.11.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: VarDeclaredNames"},{"type":"clause","id":"sec-with-statement-static-semantics-varscopeddeclarations","aoid":null,"title":"Static Semantics: VarScopedDeclarations","titleHTML":"Static Semantics: VarScopedDeclarations","number":"13.11.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: VarScopedDeclarations"},{"type":"clause","id":"sec-with-statement-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"13.11.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_827"],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-with-statement","aoid":null,"title":"The with Statement","titleHTML":"The <code>with</code> Statement","number":"13.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_156"],"key":"The with Statement"},{"type":"production","id":"prod-SwitchStatement","name":"SwitchStatement","referencingIds":["_ref_10960","_ref_11013","_ref_11014","_ref_11023","_ref_12060","_ref_12293","_ref_15293","_ref_15295","_ref_15296"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"SwitchStatement"},{"type":"production","id":"prod-CaseBlock","name":"CaseBlock","referencingIds":["_ref_11136","_ref_12097","_ref_12109","_ref_12110","_ref_12111","_ref_12112","_ref_12114","_ref_12115","_ref_12136","_ref_12137","_ref_12158","_ref_12159","_ref_12218","_ref_12219","_ref_12240","_ref_12241","_ref_12286","_ref_12289","_ref_12291","_ref_12292","_ref_13692","_ref_13693","_ref_15162","_ref_15163","_ref_15294"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"CaseBlock"},{"type":"production","id":"prod-CaseClauses","name":"CaseClauses","referencingIds":["_ref_12098","_ref_12099","_ref_12101","_ref_12103","_ref_12116","_ref_12118","_ref_12119","_ref_12120","_ref_12122","_ref_12123","_ref_12124","_ref_12126","_ref_12138","_ref_12140","_ref_12141","_ref_12142","_ref_12144","_ref_12145","_ref_12146","_ref_12148","_ref_12160","_ref_12162","_ref_12163","_ref_12164","_ref_12166","_ref_12167","_ref_12168","_ref_12170","_ref_12179","_ref_12181","_ref_12182","_ref_12183","_ref_12185","_ref_12186","_ref_12187","_ref_12189","_ref_12198","_ref_12200","_ref_12201","_ref_12202","_ref_12204","_ref_12205","_ref_12206","_ref_12208","_ref_12220","_ref_12222","_ref_12223","_ref_12224","_ref_12226","_ref_12227","_ref_12228","_ref_12230","_ref_12242","_ref_12244","_ref_12245","_ref_12246","_ref_12248","_ref_12249","_ref_12250","_ref_12252","_ref_12261","_ref_12263","_ref_12265","_ref_12267","_ref_12268","_ref_12270","_ref_12272","_ref_12274","_ref_12279","_ref_13694","_ref_13696","_ref_13697","_ref_13698","_ref_13700","_ref_13701","_ref_13702","_ref_13704"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"CaseClauses"},{"type":"production","id":"prod-CaseClause","name":"CaseClause","referencingIds":["_ref_12102","_ref_12104","_ref_12125","_ref_12127","_ref_12147","_ref_12149","_ref_12169","_ref_12171","_ref_12188","_ref_12190","_ref_12207","_ref_12209","_ref_12229","_ref_12231","_ref_12251","_ref_12253","_ref_12262","_ref_12264","_ref_12269","_ref_12271","_ref_12273","_ref_12275","_ref_12276","_ref_12278","_ref_12280","_ref_12281","_ref_13703","_ref_13705","_ref_15124","_ref_15137","_ref_15150"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"CaseClause"},{"type":"production","id":"prod-DefaultClause","name":"DefaultClause","referencingIds":["_ref_12100","_ref_12117","_ref_12121","_ref_12139","_ref_12143","_ref_12161","_ref_12165","_ref_12180","_ref_12184","_ref_12199","_ref_12203","_ref_12221","_ref_12225","_ref_12243","_ref_12247","_ref_12266","_ref_12277","_ref_13695","_ref_13699","_ref_15125","_ref_15138","_ref_15151"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"DefaultClause"},{"type":"clause","id":"sec-switch-statement-static-semantics-early-errors","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"13.12.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: Early Errors"},{"type":"clause","id":"sec-switch-statement-static-semantics-containsduplicatelabels","aoid":null,"title":"Static Semantics: ContainsDuplicateLabels","titleHTML":"Static Semantics: ContainsDuplicateLabels","number":"13.12.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsDuplicateLabels"},{"type":"clause","id":"sec-switch-statement-static-semantics-containsundefinedbreaktarget","aoid":null,"title":"Static Semantics: ContainsUndefinedBreakTarget","titleHTML":"Static Semantics: ContainsUndefinedBreakTarget","number":"13.12.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsUndefinedBreakTarget"},{"type":"clause","id":"sec-switch-statement-static-semantics-containsundefinedcontinuetarget","aoid":null,"title":"Static Semantics: ContainsUndefinedContinueTarget","titleHTML":"Static Semantics: ContainsUndefinedContinueTarget","number":"13.12.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsUndefinedContinueTarget"},{"type":"clause","id":"sec-switch-statement-static-semantics-lexicallydeclarednames","aoid":null,"title":"Static Semantics: LexicallyDeclaredNames","titleHTML":"Static Semantics: LexicallyDeclaredNames","number":"13.12.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: LexicallyDeclaredNames"},{"type":"clause","id":"sec-switch-statement-static-semantics-lexicallyscopeddeclarations","aoid":null,"title":"Static Semantics: LexicallyScopedDeclarations","titleHTML":"Static Semantics: LexicallyScopedDeclarations","number":"13.12.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: LexicallyScopedDeclarations"},{"type":"clause","id":"sec-switch-statement-static-semantics-vardeclarednames","aoid":null,"title":"Static Semantics: VarDeclaredNames","titleHTML":"Static Semantics: VarDeclaredNames","number":"13.12.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: VarDeclaredNames"},{"type":"clause","id":"sec-switch-statement-static-semantics-varscopeddeclarations","aoid":null,"title":"Static Semantics: VarScopedDeclarations","titleHTML":"Static Semantics: VarScopedDeclarations","number":"13.12.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: VarScopedDeclarations"},{"type":"clause","id":"sec-runtime-semantics-caseblockevaluation","aoid":null,"title":"Runtime Semantics: CaseBlockEvaluation","titleHTML":"Runtime Semantics: CaseBlockEvaluation","number":"13.12.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: CaseBlockEvaluation"},{"type":"op","aoid":"CaseClauseIsSelected","refId":"sec-runtime-semantics-caseclauseisselected","location":"","referencingIds":[],"key":"CaseClauseIsSelected"},{"type":"clause","id":"sec-runtime-semantics-caseclauseisselected","aoid":"CaseClauseIsSelected","title":"Runtime Semantics: CaseClauseIsSelected ( C, input )","titleHTML":"Runtime Semantics: CaseClauseIsSelected ( <var>C</var>, <var>input</var> )","number":"13.12.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3935","_ref_3941","_ref_3946"],"key":"Runtime Semantics: CaseClauseIsSelected ( C, input )"},{"type":"clause","id":"sec-switch-statement-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"13.12.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_828"],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-switch-statement","aoid":null,"title":"The switch Statement","titleHTML":"The <code>switch</code> Statement","number":"13.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"The switch Statement"},{"type":"production","id":"prod-LabelledStatement","name":"LabelledStatement","referencingIds":["_ref_10948","_ref_11057","_ref_11058","_ref_11067","_ref_11068","_ref_11099","_ref_11108","_ref_12306","_ref_12307","_ref_12324","_ref_12349","_ref_12359","_ref_12378","_ref_12386","_ref_15080","_ref_15083"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"LabelledStatement"},{"type":"production","id":"prod-LabelledItem","name":"LabelledItem","referencingIds":["_ref_12301","_ref_12310","_ref_12312","_ref_12315","_ref_12317","_ref_12320","_ref_12322","_ref_12325","_ref_12329","_ref_12330","_ref_12335","_ref_12336","_ref_12341","_ref_12343","_ref_12345","_ref_12346","_ref_12355","_ref_12356","_ref_12365","_ref_12366","_ref_12369","_ref_12370","_ref_12373","_ref_12375","_ref_12385","_ref_13687","_ref_13688"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"LabelledItem"},{"type":"clause","id":"sec-labelled-statements-static-semantics-early-errors","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"13.13.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_749"],"key":"Static Semantics: Early Errors"},{"type":"clause","id":"sec-labelled-statements-static-semantics-containsduplicatelabels","aoid":null,"title":"Static Semantics: ContainsDuplicateLabels","titleHTML":"Static Semantics: ContainsDuplicateLabels","number":"13.13.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsDuplicateLabels"},{"type":"clause","id":"sec-labelled-statements-static-semantics-containsundefinedbreaktarget","aoid":null,"title":"Static Semantics: ContainsUndefinedBreakTarget","titleHTML":"Static Semantics: ContainsUndefinedBreakTarget","number":"13.13.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsUndefinedBreakTarget"},{"type":"clause","id":"sec-labelled-statements-static-semantics-containsundefinedcontinuetarget","aoid":null,"title":"Static Semantics: ContainsUndefinedContinueTarget","titleHTML":"Static Semantics: ContainsUndefinedContinueTarget","number":"13.13.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsUndefinedContinueTarget"},{"type":"op","aoid":"IsLabelledFunction","refId":"sec-islabelledfunction","location":"","referencingIds":[],"key":"IsLabelledFunction"},{"type":"clause","id":"sec-islabelledfunction","aoid":"IsLabelledFunction","title":"Static Semantics: IsLabelledFunction ( stmt )","titleHTML":"Static Semantics: IsLabelledFunction ( <var>stmt</var> )","number":"13.13.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3765","_ref_3775","_ref_3906","_ref_3969"],"key":"Static Semantics: IsLabelledFunction ( stmt )"},{"type":"clause","id":"sec-labelled-statements-static-semantics-lexicallydeclarednames","aoid":null,"title":"Static Semantics: LexicallyDeclaredNames","titleHTML":"Static Semantics: LexicallyDeclaredNames","number":"13.13.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: LexicallyDeclaredNames"},{"type":"clause","id":"sec-labelled-statements-static-semantics-lexicallyscopeddeclarations","aoid":null,"title":"Static Semantics: LexicallyScopedDeclarations","titleHTML":"Static Semantics: LexicallyScopedDeclarations","number":"13.13.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: LexicallyScopedDeclarations"},{"type":"clause","id":"sec-labelled-statements-static-semantics-toplevellexicallydeclarednames","aoid":null,"title":"Static Semantics: TopLevelLexicallyDeclaredNames","titleHTML":"Static Semantics: TopLevelLexicallyDeclaredNames","number":"13.13.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: TopLevelLexicallyDeclaredNames"},{"type":"clause","id":"sec-labelled-statements-static-semantics-toplevellexicallyscopeddeclarations","aoid":null,"title":"Static Semantics: TopLevelLexicallyScopedDeclarations","titleHTML":"Static Semantics: TopLevelLexicallyScopedDeclarations","number":"13.13.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: TopLevelLexicallyScopedDeclarations"},{"type":"clause","id":"sec-labelled-statements-static-semantics-toplevelvardeclarednames","aoid":null,"title":"Static Semantics: TopLevelVarDeclaredNames","titleHTML":"Static Semantics: TopLevelVarDeclaredNames","number":"13.13.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: TopLevelVarDeclaredNames"},{"type":"clause","id":"sec-labelled-statements-static-semantics-toplevelvarscopeddeclarations","aoid":null,"title":"Static Semantics: TopLevelVarScopedDeclarations","titleHTML":"Static Semantics: TopLevelVarScopedDeclarations","number":"13.13.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: TopLevelVarScopedDeclarations"},{"type":"clause","id":"sec-labelled-statements-static-semantics-vardeclarednames","aoid":null,"title":"Static Semantics: VarDeclaredNames","titleHTML":"Static Semantics: VarDeclaredNames","number":"13.13.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: VarDeclaredNames"},{"type":"clause","id":"sec-labelled-statements-static-semantics-varscopeddeclarations","aoid":null,"title":"Static Semantics: VarScopedDeclarations","titleHTML":"Static Semantics: VarScopedDeclarations","number":"13.13.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: VarScopedDeclarations"},{"type":"clause","id":"sec-labelled-statements-runtime-semantics-labelledevaluation","aoid":null,"title":"Runtime Semantics: LabelledEvaluation","titleHTML":"Runtime Semantics: LabelledEvaluation","number":"13.13.14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: LabelledEvaluation"},{"type":"clause","id":"sec-labelled-statements-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"13.13.15","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-labelled-statements","aoid":null,"title":"Labelled Statements","titleHTML":"Labelled Statements","number":"13.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Labelled Statements"},{"type":"production","id":"prod-ThrowStatement","name":"ThrowStatement","referencingIds":["_ref_10949","_ref_10967","_ref_10974","_ref_10981","_ref_11002","_ref_11009","_ref_13639"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ThrowStatement"},{"type":"clause","id":"sec-throw-statement-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"13.14.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-throw-statement","aoid":null,"title":"The throw Statement","titleHTML":"The <code>throw</code> Statement","number":"13.14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"The throw Statement"},{"type":"production","id":"prod-TryStatement","name":"TryStatement","referencingIds":["_ref_9024","_ref_10950","_ref_15305","_ref_15307","_ref_15308","_ref_15310","_ref_15312"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"TryStatement"},{"type":"production","id":"prod-Catch","name":"Catch","referencingIds":["_ref_9023","_ref_9031","_ref_12392","_ref_12396","_ref_12413","_ref_12415","_ref_12421","_ref_12424","_ref_12430","_ref_12432","_ref_12438","_ref_12441","_ref_12447","_ref_12449","_ref_12455","_ref_12458","_ref_12464","_ref_12466","_ref_12472","_ref_12475","_ref_12481","_ref_12483","_ref_12489","_ref_12492","_ref_12506","_ref_12508","_ref_12514","_ref_12517","_ref_13712","_ref_13713","_ref_13717","_ref_15297","_ref_15299","_ref_15301","_ref_15302","_ref_15304","_ref_15311"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Catch"},{"type":"production","id":"prod-Finally","name":"Finally","referencingIds":["_ref_12394","_ref_12397","_ref_12417","_ref_12419","_ref_12422","_ref_12425","_ref_12434","_ref_12436","_ref_12439","_ref_12442","_ref_12451","_ref_12453","_ref_12456","_ref_12459","_ref_12468","_ref_12470","_ref_12473","_ref_12476","_ref_12485","_ref_12487","_ref_12490","_ref_12493","_ref_12510","_ref_12512","_ref_12515","_ref_12518","_ref_13715","_ref_13718","_ref_13719","_ref_15313","_ref_15314"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Finally"},{"type":"production","id":"prod-CatchParameter","name":"CatchParameter","referencingIds":["_ref_12398","_ref_12404","_ref_12405","_ref_12407","_ref_12408","_ref_12410","_ref_12426","_ref_12443","_ref_12460","_ref_12477","_ref_12494","_ref_12497","_ref_12499","_ref_12500","_ref_13720","_ref_15256","_ref_15257"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"CatchParameter"},{"type":"clause","id":"sec-try-statement-static-semantics-early-errors","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"13.15.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_759","_ref_797"],"key":"Static Semantics: Early Errors"},{"type":"clause","id":"sec-try-statement-static-semantics-containsduplicatelabels","aoid":null,"title":"Static Semantics: ContainsDuplicateLabels","titleHTML":"Static Semantics: ContainsDuplicateLabels","number":"13.15.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsDuplicateLabels"},{"type":"clause","id":"sec-try-statement-static-semantics-containsundefinedbreaktarget","aoid":null,"title":"Static Semantics: ContainsUndefinedBreakTarget","titleHTML":"Static Semantics: ContainsUndefinedBreakTarget","number":"13.15.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsUndefinedBreakTarget"},{"type":"clause","id":"sec-try-statement-static-semantics-containsundefinedcontinuetarget","aoid":null,"title":"Static Semantics: ContainsUndefinedContinueTarget","titleHTML":"Static Semantics: ContainsUndefinedContinueTarget","number":"13.15.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsUndefinedContinueTarget"},{"type":"clause","id":"sec-try-statement-static-semantics-vardeclarednames","aoid":null,"title":"Static Semantics: VarDeclaredNames","titleHTML":"Static Semantics: VarDeclaredNames","number":"13.15.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: VarDeclaredNames"},{"type":"clause","id":"sec-try-statement-static-semantics-varscopeddeclarations","aoid":null,"title":"Static Semantics: VarScopedDeclarations","titleHTML":"Static Semantics: VarScopedDeclarations","number":"13.15.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: VarScopedDeclarations"},{"type":"clause","id":"sec-runtime-semantics-catchclauseevaluation","aoid":null,"title":"Runtime Semantics: CatchClauseEvaluation","titleHTML":"Runtime Semantics: CatchClauseEvaluation","number":"13.15.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: CatchClauseEvaluation"},{"type":"clause","id":"sec-try-statement-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"13.15.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_832"],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-try-statement","aoid":null,"title":"The try Statement","titleHTML":"The <code>try</code> Statement","number":"13.15","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_829","_ref_830"],"key":"The try Statement"},{"type":"production","id":"prod-DebuggerStatement","name":"DebuggerStatement","referencingIds":["_ref_10951","_ref_10968","_ref_10975","_ref_10982","_ref_11003","_ref_11010","_ref_12519","_ref_13640"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"DebuggerStatement"},{"type":"clause","id":"sec-debugger-statement-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"13.16.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-debugger-statement","aoid":null,"title":"The debugger Statement","titleHTML":"The <code>debugger</code> Statement","number":"13.16","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"The debugger Statement"},{"type":"clause","id":"sec-ecmascript-language-statements-and-declarations","aoid":null,"title":"ECMAScript Language: Statements and Declarations","titleHTML":"ECMAScript Language: Statements and Declarations","number":"13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"ECMAScript Language: Statements and Declarations"},{"type":"production","id":"prod-FunctionDeclaration","name":"FunctionDeclaration","referencingIds":["_ref_9021","_ref_9025","_ref_9026","_ref_9029","_ref_9041","_ref_9046","_ref_9051","_ref_9056","_ref_9061","_ref_9067","_ref_9074","_ref_9088","_ref_9099","_ref_9114","_ref_9128","_ref_9144","_ref_10955","_ref_10985","_ref_10986","_ref_11020","_ref_11021","_ref_11137","_ref_11463","_ref_12303","_ref_12308","_ref_12313","_ref_12318","_ref_12323","_ref_12326","_ref_12332","_ref_12333","_ref_12338","_ref_12339","_ref_12352","_ref_12353","_ref_12362","_ref_12363","_ref_12367","_ref_12371","_ref_12382","_ref_12383","_ref_12696","_ref_12700","_ref_12705","_ref_12706","_ref_12733","_ref_12737","_ref_13641","_ref_13870","_ref_14010","_ref_14309","_ref_15081","_ref_15082","_ref_15084","_ref_15086","_ref_15090","_ref_15091","_ref_15094","_ref_15096","_ref_15104","_ref_15111","_ref_15120","_ref_15121","_ref_15127","_ref_15128","_ref_15131","_ref_15132","_ref_15133","_ref_15134","_ref_15140","_ref_15141","_ref_15144","_ref_15145","_ref_15146","_ref_15147","_ref_15153","_ref_15154","_ref_15157","_ref_15158","_ref_15164","_ref_15167","_ref_15171","_ref_15173","_ref_15174","_ref_15176","_ref_15177"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"FunctionDeclaration"},{"type":"production","id":"prod-FunctionExpression","name":"FunctionExpression","referencingIds":["_ref_9100","_ref_9115","_ref_9129","_ref_9145","_ref_9818","_ref_9854","_ref_9865","_ref_10038","_ref_12709","_ref_12717","_ref_12720","_ref_12724","_ref_12728","_ref_12730","_ref_12731","_ref_12735","_ref_12736","_ref_12738","_ref_13387","_ref_13802","_ref_15265"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"FunctionExpression"},{"type":"production","id":"prod-UniqueFormalParameters","name":"UniqueFormalParameters","referencingIds":["_ref_12748","_ref_12819","_ref_12831","_ref_12834","_ref_12835","_ref_12846","_ref_12857","_ref_12859","_ref_12875","_ref_12884","_ref_12895","_ref_12899","_ref_12903","_ref_12921","_ref_12941","_ref_12944","_ref_12947","_ref_12948","_ref_12982","_ref_12994","_ref_12996","_ref_13014","_ref_13034","_ref_13038","_ref_13072","_ref_13091","_ref_13094","_ref_13096","_ref_13099","_ref_13100","_ref_13137","_ref_13149","_ref_13151","_ref_13169","_ref_13190","_ref_13194","_ref_13366","_ref_13393","_ref_13396","_ref_13398","_ref_13400","_ref_13436","_ref_13450","_ref_13452","_ref_13472","_ref_13492","_ref_13496"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"UniqueFormalParameters"},{"type":"production","id":"prod-FormalParameters","name":"FormalParameters","referencingIds":["_ref_12521","_ref_12523","_ref_12526","_ref_12528","_ref_12557","_ref_12559","_ref_12562","_ref_12564","_ref_12568","_ref_12569","_ref_12571","_ref_12575","_ref_12580","_ref_12581","_ref_12595","_ref_12598","_ref_12609","_ref_12611","_ref_12614","_ref_12630","_ref_12642","_ref_12645","_ref_12650","_ref_12652","_ref_12655","_ref_12694","_ref_12698","_ref_12701","_ref_12703","_ref_12707","_ref_12711","_ref_12713","_ref_12715","_ref_12718","_ref_12722","_ref_12726","_ref_12924","_ref_12926","_ref_12929","_ref_12938","_ref_12939","_ref_12951","_ref_12953","_ref_12956","_ref_12958","_ref_12962","_ref_12963","_ref_12965","_ref_12967","_ref_12971","_ref_12976","_ref_12979","_ref_12986","_ref_12988","_ref_12991","_ref_13000","_ref_13003","_ref_13006","_ref_13008","_ref_13011","_ref_13020","_ref_13024","_ref_13027","_ref_13029","_ref_13041","_ref_13044","_ref_13047","_ref_13051","_ref_13055","_ref_13076","_ref_13079","_ref_13083","_ref_13088","_ref_13089","_ref_13103","_ref_13105","_ref_13108","_ref_13110","_ref_13115","_ref_13116","_ref_13118","_ref_13120","_ref_13122","_ref_13126","_ref_13131","_ref_13134","_ref_13141","_ref_13143","_ref_13146","_ref_13155","_ref_13158","_ref_13161","_ref_13163","_ref_13166","_ref_13175","_ref_13179","_ref_13182","_ref_13185","_ref_13197","_ref_13200","_ref_13203","_ref_13207","_ref_13211","_ref_13352","_ref_13355","_ref_13358","_ref_13362","_ref_13372","_ref_13381","_ref_13403","_ref_13405","_ref_13407","_ref_13410","_ref_13413","_ref_13414","_ref_13416","_ref_13419","_ref_13421","_ref_13425","_ref_13430","_ref_13433","_ref_13440","_ref_13442","_ref_13444","_ref_13447","_ref_13456","_ref_13459","_ref_13462","_ref_13464","_ref_13466","_ref_13469","_ref_13476","_ref_13480","_ref_13483","_ref_13486","_ref_13499","_ref_13503","_ref_13505","_ref_13507","_ref_13510","_ref_13514","_ref_13518","_ref_14336","_ref_14338","_ref_14340","_ref_14342","_ref_14343","_ref_14354","_ref_15259"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"FormalParameters"},{"type":"production","id":"prod-FormalParameterList","name":"FormalParameterList","referencingIds":["_ref_12530","_ref_12531","_ref_12532","_ref_12535","_ref_12582","_ref_12583","_ref_12584","_ref_12586","_ref_12600","_ref_12602","_ref_12604","_ref_12606","_ref_12616","_ref_12618","_ref_12620","_ref_12622","_ref_12626","_ref_12628","_ref_12629","_ref_12633","_ref_12635","_ref_12636","_ref_12638","_ref_12640","_ref_12657","_ref_12659","_ref_12661","_ref_12675","_ref_12677","_ref_12679","_ref_12681"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"FormalParameterList"},{"type":"production","id":"prod-FunctionRestParameter","name":"FunctionRestParameter","referencingIds":["_ref_12529","_ref_12533","_ref_12601","_ref_12603","_ref_12617","_ref_12619","_ref_12627","_ref_12658","_ref_12676","_ref_12678"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"FunctionRestParameter"},{"type":"production","id":"prod-FormalParameter","name":"FormalParameter","referencingIds":["_ref_12534","_ref_12536","_ref_12605","_ref_12607","_ref_12621","_ref_12623","_ref_12631","_ref_12632","_ref_12634","_ref_12637","_ref_12639","_ref_12641","_ref_12660","_ref_12662","_ref_12680","_ref_12682","_ref_12829","_ref_12854","_ref_12855"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"FormalParameter"},{"type":"production","id":"prod-FunctionBody","name":"FunctionBody","referencingIds":["_ref_9155","_ref_12522","_ref_12524","_ref_12527","_ref_12544","_ref_12558","_ref_12560","_ref_12563","_ref_12567","_ref_12570","_ref_12573","_ref_12577","_ref_12579","_ref_12596","_ref_12599","_ref_12610","_ref_12612","_ref_12615","_ref_12643","_ref_12646","_ref_12651","_ref_12653","_ref_12656","_ref_12695","_ref_12699","_ref_12702","_ref_12704","_ref_12708","_ref_12712","_ref_12714","_ref_12716","_ref_12719","_ref_12723","_ref_12727","_ref_12732","_ref_12745","_ref_12820","_ref_12825","_ref_12828","_ref_12832","_ref_12833","_ref_12836","_ref_12839","_ref_12841","_ref_12844","_ref_12847","_ref_12849","_ref_12852","_ref_12858","_ref_12861","_ref_12864","_ref_12865","_ref_12869","_ref_12872","_ref_12876","_ref_12878","_ref_12881","_ref_12885","_ref_12890","_ref_12893","_ref_12896","_ref_12900","_ref_12904","_ref_12907","_ref_12910","_ref_12914","_ref_12918","_ref_12931","_ref_13017","_ref_13018","_ref_13061","_ref_13085","_ref_13172","_ref_13173","_ref_13368","_ref_13489","_ref_13490","_ref_13614","_ref_13617","_ref_13620","_ref_13622","_ref_13624","_ref_14335"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"FunctionBody"},{"type":"production","id":"prod-FunctionStatementList","name":"FunctionStatementList","referencingIds":["_ref_12539","_ref_12587","_ref_12588","_ref_12589","_ref_12590","_ref_12591","_ref_12592","_ref_12593","_ref_12624","_ref_12625","_ref_12673","_ref_12674"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"FunctionStatementList"},{"type":"term","term":"Directive Prologue","refId":"sec-directive-prologues-and-the-use-strict-directive","referencingIds":["_ref_3103","_ref_3105","_ref_3108","_ref_3110","_ref_4002","_ref_4003","_ref_4005","_ref_4007","_ref_4009","_ref_4010","_ref_4016","_ref_4385"],"id":"directive-prologue","namespace":"https://tc39.github.io/ecma262/","location":"","key":"Directive Prologue"},{"type":"term","term":"Use Strict Directive","refId":"sec-directive-prologues-and-the-use-strict-directive","referencingIds":["_ref_3104","_ref_3106","_ref_3109","_ref_3111","_ref_4004","_ref_4006","_ref_4008","_ref_4011","_ref_4017","_ref_4386"],"id":"use-strict-directive","namespace":"https://tc39.github.io/ecma262/","location":"","key":"Use Strict Directive"},{"type":"clause","id":"sec-directive-prologues-and-the-use-strict-directive","aoid":null,"title":"Directive Prologues and the Use Strict Directive","titleHTML":"Directive Prologues and the Use Strict Directive","number":"14.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Directive Prologues and the Use Strict Directive"},{"type":"clause","id":"sec-function-definitions-static-semantics-early-errors","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"14.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_798"],"key":"Static Semantics: Early Errors"},{"type":"clause","id":"sec-function-definitions-static-semantics-boundnames","aoid":null,"title":"Static Semantics: BoundNames","titleHTML":"Static Semantics: BoundNames","number":"14.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: BoundNames"},{"type":"clause","id":"sec-function-definitions-static-semantics-contains","aoid":null,"title":"Static Semantics: Contains","titleHTML":"Static Semantics: Contains","number":"14.1.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: Contains"},{"type":"clause","id":"sec-function-definitions-static-semantics-containsexpression","aoid":null,"title":"Static Semantics: ContainsExpression","titleHTML":"Static Semantics: ContainsExpression","number":"14.1.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsExpression"},{"type":"clause","id":"sec-function-definitions-static-semantics-containsusestrict","aoid":null,"title":"Static Semantics: ContainsUseStrict","titleHTML":"Static Semantics: ContainsUseStrict","number":"14.1.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsUseStrict"},{"type":"clause","id":"sec-function-definitions-static-semantics-expectedargumentcount","aoid":null,"title":"Static Semantics: ExpectedArgumentCount","titleHTML":"Static Semantics: ExpectedArgumentCount","number":"14.1.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ExpectedArgumentCount"},{"type":"clause","id":"sec-function-definitions-static-semantics-hasinitializer","aoid":null,"title":"Static Semantics: HasInitializer","titleHTML":"Static Semantics: HasInitializer","number":"14.1.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: HasInitializer"},{"type":"clause","id":"sec-function-definitions-static-semantics-hasname","aoid":null,"title":"Static Semantics: HasName","titleHTML":"Static Semantics: HasName","number":"14.1.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: HasName"},{"type":"op","aoid":"IsAnonymousFunctionDefinition","refId":"sec-isanonymousfunctiondefinition","location":"","referencingIds":[],"key":"IsAnonymousFunctionDefinition"},{"type":"clause","id":"sec-isanonymousfunctiondefinition","aoid":"IsAnonymousFunctionDefinition","title":"Static Semantics: IsAnonymousFunctionDefinition ( expr )","titleHTML":"Static Semantics: IsAnonymousFunctionDefinition ( <var>expr</var> )","number":"14.1.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3213","_ref_3268","_ref_3525","_ref_3569","_ref_3595","_ref_3615","_ref_3674","_ref_3687","_ref_3720","_ref_3759","_ref_4744","_ref_8727","_ref_8782"],"key":"Static Semantics: IsAnonymousFunctionDefinition ( expr )"},{"type":"clause","id":"sec-function-definitions-static-semantics-isconstantdeclaration","aoid":null,"title":"Static Semantics: IsConstantDeclaration","titleHTML":"Static Semantics: IsConstantDeclaration","number":"14.1.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsConstantDeclaration"},{"type":"clause","id":"sec-function-definitions-static-semantics-isfunctiondefinition","aoid":null,"title":"Static Semantics: IsFunctionDefinition","titleHTML":"Static Semantics: IsFunctionDefinition","number":"14.1.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsFunctionDefinition"},{"type":"clause","id":"sec-function-definitions-static-semantics-issimpleparameterlist","aoid":null,"title":"Static Semantics: IsSimpleParameterList","titleHTML":"Static Semantics: IsSimpleParameterList","number":"14.1.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsSimpleParameterList"},{"type":"clause","id":"sec-function-definitions-static-semantics-lexicallydeclarednames","aoid":null,"title":"Static Semantics: LexicallyDeclaredNames","titleHTML":"Static Semantics: LexicallyDeclaredNames","number":"14.1.14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: LexicallyDeclaredNames"},{"type":"clause","id":"sec-function-definitions-static-semantics-lexicallyscopeddeclarations","aoid":null,"title":"Static Semantics: LexicallyScopedDeclarations","titleHTML":"Static Semantics: LexicallyScopedDeclarations","number":"14.1.15","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: LexicallyScopedDeclarations"},{"type":"clause","id":"sec-function-definitions-static-semantics-vardeclarednames","aoid":null,"title":"Static Semantics: VarDeclaredNames","titleHTML":"Static Semantics: VarDeclaredNames","number":"14.1.16","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: VarDeclaredNames"},{"type":"clause","id":"sec-function-definitions-static-semantics-varscopeddeclarations","aoid":null,"title":"Static Semantics: VarScopedDeclarations","titleHTML":"Static Semantics: VarScopedDeclarations","number":"14.1.17","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: VarScopedDeclarations"},{"type":"clause","id":"sec-function-definitions-runtime-semantics-evaluatebody","aoid":null,"title":"Runtime Semantics: EvaluateBody","titleHTML":"Runtime Semantics: EvaluateBody","number":"14.1.18","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: EvaluateBody"},{"type":"clause","id":"sec-function-definitions-runtime-semantics-iteratorbindinginitialization","aoid":null,"title":"Runtime Semantics: IteratorBindingInitialization","titleHTML":"Runtime Semantics: IteratorBindingInitialization","number":"14.1.19","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_197"],"key":"Runtime Semantics: IteratorBindingInitialization"},{"type":"clause","id":"sec-function-definitions-runtime-semantics-instantiatefunctionobject","aoid":null,"title":"Runtime Semantics: InstantiateFunctionObject","titleHTML":"Runtime Semantics: InstantiateFunctionObject","number":"14.1.20","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: InstantiateFunctionObject"},{"type":"clause","id":"sec-function-definitions-runtime-semantics-namedevaluation","aoid":null,"title":"Runtime Semantics: NamedEvaluation","titleHTML":"Runtime Semantics: NamedEvaluation","number":"14.1.21","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: NamedEvaluation"},{"type":"clause","id":"sec-function-definitions-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"14.1.22","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_754","_ref_755","_ref_756"],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-function-definitions","aoid":null,"title":"Function Definitions","titleHTML":"Function Definitions","number":"14.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_255","_ref_310"],"key":"Function Definitions"},{"type":"production","id":"prod-ArrowFunction","name":"ArrowFunction","referencingIds":["_ref_9035","_ref_9036","_ref_9037","_ref_9038","_ref_9108","_ref_9123","_ref_9137","_ref_9153","_ref_10714","_ref_10741","_ref_10750","_ref_12773","_ref_12805","_ref_12808","_ref_12811","_ref_12812","_ref_12813","_ref_12814","_ref_12815","_ref_12816","_ref_12817","_ref_13724","_ref_14272","_ref_14358"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ArrowFunction"},{"type":"production","id":"prod-ArrowParameters","name":"ArrowParameters","referencingIds":["_ref_9760","_ref_12739","_ref_12749","_ref_12751","_ref_12753","_ref_12756","_ref_12757","_ref_12766","_ref_12771","_ref_12779","_ref_12785","_ref_12803","_ref_12806","_ref_12809"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ArrowParameters"},{"type":"production","id":"prod-ConciseBody","name":"ConciseBody","referencingIds":["_ref_9762","_ref_12741","_ref_12750","_ref_12755","_ref_12758","_ref_12767","_ref_12772","_ref_12780","_ref_12804","_ref_12807","_ref_12810","_ref_13615","_ref_13618"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ConciseBody"},{"type":"production","id":"prod-ArrowFormalParameters","name":"ArrowFormalParameters","referencingIds":["_ref_12761","_ref_12762","_ref_12793","_ref_13539","_ref_13612"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ArrowFormalParameters"},{"type":"clause","id":"sec-arrow-function-definitions-static-semantics-early-errors","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"14.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: Early Errors"},{"type":"clause","id":"sec-arrow-function-definitions-static-semantics-boundnames","aoid":null,"title":"Static Semantics: BoundNames","titleHTML":"Static Semantics: BoundNames","number":"14.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: BoundNames"},{"type":"clause","id":"sec-arrow-function-definitions-static-semantics-contains","aoid":null,"title":"Static Semantics: Contains","titleHTML":"Static Semantics: Contains","number":"14.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: Contains"},{"type":"clause","id":"sec-arrow-function-definitions-static-semantics-containsexpression","aoid":null,"title":"Static Semantics: ContainsExpression","titleHTML":"Static Semantics: ContainsExpression","number":"14.2.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsExpression"},{"type":"clause","id":"sec-arrow-function-definitions-static-semantics-containsusestrict","aoid":null,"title":"Static Semantics: ContainsUseStrict","titleHTML":"Static Semantics: ContainsUseStrict","number":"14.2.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsUseStrict"},{"type":"clause","id":"sec-arrow-function-definitions-static-semantics-expectedargumentcount","aoid":null,"title":"Static Semantics: ExpectedArgumentCount","titleHTML":"Static Semantics: ExpectedArgumentCount","number":"14.2.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ExpectedArgumentCount"},{"type":"clause","id":"sec-arrow-function-definitions-static-semantics-hasname","aoid":null,"title":"Static Semantics: HasName","titleHTML":"Static Semantics: HasName","number":"14.2.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: HasName"},{"type":"clause","id":"sec-arrow-function-definitions-static-semantics-issimpleparameterlist","aoid":null,"title":"Static Semantics: IsSimpleParameterList","titleHTML":"Static Semantics: IsSimpleParameterList","number":"14.2.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsSimpleParameterList"},{"type":"clause","id":"sec-static-semantics-coveredformalslist","aoid":null,"title":"Static Semantics: CoveredFormalsList","titleHTML":"Static Semantics: CoveredFormalsList","number":"14.2.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: CoveredFormalsList"},{"type":"clause","id":"sec-arrow-function-definitions-static-semantics-lexicallydeclarednames","aoid":null,"title":"Static Semantics: LexicallyDeclaredNames","titleHTML":"Static Semantics: LexicallyDeclaredNames","number":"14.2.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: LexicallyDeclaredNames"},{"type":"clause","id":"sec-arrow-function-definitions-static-semantics-lexicallyscopeddeclarations","aoid":null,"title":"Static Semantics: LexicallyScopedDeclarations","titleHTML":"Static Semantics: LexicallyScopedDeclarations","number":"14.2.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: LexicallyScopedDeclarations"},{"type":"clause","id":"sec-arrow-function-definitions-static-semantics-vardeclarednames","aoid":null,"title":"Static Semantics: VarDeclaredNames","titleHTML":"Static Semantics: VarDeclaredNames","number":"14.2.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: VarDeclaredNames"},{"type":"clause","id":"sec-arrow-function-definitions-static-semantics-varscopeddeclarations","aoid":null,"title":"Static Semantics: VarScopedDeclarations","titleHTML":"Static Semantics: VarScopedDeclarations","number":"14.2.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: VarScopedDeclarations"},{"type":"clause","id":"sec-arrow-function-definitions-runtime-semantics-iteratorbindinginitialization","aoid":null,"title":"Runtime Semantics: IteratorBindingInitialization","titleHTML":"Runtime Semantics: IteratorBindingInitialization","number":"14.2.14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: IteratorBindingInitialization"},{"type":"clause","id":"sec-arrow-function-definitions-runtime-semantics-evaluatebody","aoid":null,"title":"Runtime Semantics: EvaluateBody","titleHTML":"Runtime Semantics: EvaluateBody","number":"14.2.15","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: EvaluateBody"},{"type":"clause","id":"sec-arrow-function-definitions-runtime-semantics-namedevaluation","aoid":null,"title":"Runtime Semantics: NamedEvaluation","titleHTML":"Runtime Semantics: NamedEvaluation","number":"14.2.16","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: NamedEvaluation"},{"type":"clause","id":"sec-arrow-function-definitions-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"14.2.17","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-arrow-function-definitions","aoid":null,"title":"Arrow Function Definitions","titleHTML":"Arrow Function Definitions","number":"14.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_256"],"key":"Arrow Function Definitions"},{"type":"production","id":"prod-MethodDefinition","name":"MethodDefinition","referencingIds":["_ref_9107","_ref_9122","_ref_9136","_ref_9152","_ref_9952","_ref_9963","_ref_9967","_ref_9968","_ref_9982","_ref_9983","_ref_9984","_ref_12898","_ref_12901","_ref_12905","_ref_12909","_ref_12911","_ref_12916","_ref_12919","_ref_13234","_ref_13235","_ref_13242","_ref_13243","_ref_13244","_ref_13245","_ref_13246","_ref_13247","_ref_13248","_ref_13249","_ref_13278","_ref_13279","_ref_13280","_ref_13281","_ref_13290","_ref_13291","_ref_13321","_ref_13322","_ref_14273","_ref_14297","_ref_14355"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"MethodDefinition"},{"type":"production","id":"prod-PropertySetParameterList","name":"PropertySetParameterList","referencingIds":["_ref_12827","_ref_12838","_ref_12840","_ref_12842","_ref_12843","_ref_12851","_ref_12868","_ref_12870","_ref_12880","_ref_12892","_ref_12913","_ref_12917"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"PropertySetParameterList"},{"type":"clause","id":"sec-method-definitions-static-semantics-early-errors","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"14.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: Early Errors"},{"type":"clause","id":"sec-method-definitions-static-semantics-computedpropertycontains","aoid":null,"title":"Static Semantics: ComputedPropertyContains","titleHTML":"Static Semantics: ComputedPropertyContains","number":"14.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ComputedPropertyContains"},{"type":"clause","id":"sec-method-definitions-static-semantics-expectedargumentcount","aoid":null,"title":"Static Semantics: ExpectedArgumentCount","titleHTML":"Static Semantics: ExpectedArgumentCount","number":"14.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ExpectedArgumentCount"},{"type":"clause","id":"sec-method-definitions-static-semantics-hasdirectsuper","aoid":null,"title":"Static Semantics: HasDirectSuper","titleHTML":"Static Semantics: HasDirectSuper","number":"14.3.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: HasDirectSuper"},{"type":"clause","id":"sec-method-definitions-static-semantics-propname","aoid":null,"title":"Static Semantics: PropName","titleHTML":"Static Semantics: PropName","number":"14.3.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: PropName"},{"type":"clause","id":"sec-static-semantics-specialmethod","aoid":null,"title":"Static Semantics: SpecialMethod","titleHTML":"Static Semantics: SpecialMethod","number":"14.3.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: SpecialMethod"},{"type":"clause","id":"sec-runtime-semantics-definemethod","aoid":null,"title":"Runtime Semantics: DefineMethod","titleHTML":"Runtime Semantics: DefineMethod","number":"14.3.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: DefineMethod"},{"type":"clause","id":"sec-method-definitions-runtime-semantics-propertydefinitionevaluation","aoid":null,"title":"Runtime Semantics: PropertyDefinitionEvaluation","titleHTML":"Runtime Semantics: PropertyDefinitionEvaluation","number":"14.3.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_833"],"key":"Runtime Semantics: PropertyDefinitionEvaluation"},{"type":"clause","id":"sec-method-definitions","aoid":null,"title":"Method Definitions","titleHTML":"Method Definitions","number":"14.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_257","_ref_308"],"key":"Method Definitions"},{"type":"production","id":"prod-GeneratorMethod","name":"GeneratorMethod","referencingIds":["_ref_12821","_ref_12886","_ref_12943","_ref_13037","_ref_13040","_ref_14356","_ref_14808"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"GeneratorMethod"},{"type":"production","id":"prod-GeneratorDeclaration","name":"GeneratorDeclaration","referencingIds":["_ref_9042","_ref_9047","_ref_9052","_ref_9057","_ref_9062","_ref_9068","_ref_9089","_ref_9101","_ref_9116","_ref_9130","_ref_9146","_ref_10956","_ref_10987","_ref_10988","_ref_11017","_ref_11138","_ref_11464","_ref_13022","_ref_13026","_ref_13031","_ref_13032","_ref_13062","_ref_13871","_ref_14011","_ref_14274","_ref_14310","_ref_14806"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"GeneratorDeclaration"},{"type":"production","id":"prod-GeneratorExpression","name":"GeneratorExpression","referencingIds":["_ref_9102","_ref_9117","_ref_9131","_ref_9147","_ref_9820","_ref_9856","_ref_9867","_ref_10039","_ref_13043","_ref_13046","_ref_13049","_ref_13053","_ref_13057","_ref_13059","_ref_13060","_ref_13064","_ref_13065","_ref_13388","_ref_13804","_ref_14275","_ref_14807"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"GeneratorExpression"},{"type":"production","id":"prod-GeneratorBody","name":"GeneratorBody","referencingIds":["_ref_12922","_ref_12925","_ref_12927","_ref_12930","_ref_12942","_ref_12946","_ref_12949","_ref_12952","_ref_12954","_ref_12957","_ref_12961","_ref_12964","_ref_12969","_ref_12973","_ref_12977","_ref_12980","_ref_12983","_ref_12987","_ref_12989","_ref_12992","_ref_12995","_ref_12998","_ref_13001","_ref_13004","_ref_13007","_ref_13009","_ref_13012","_ref_13015","_ref_13021","_ref_13025","_ref_13028","_ref_13030","_ref_13035","_ref_13039","_ref_13042","_ref_13045","_ref_13048","_ref_13052","_ref_13056","_ref_13621","_ref_14337"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"GeneratorBody"},{"type":"production","id":"prod-YieldExpression","name":"YieldExpression","referencingIds":["_ref_10713","_ref_10743","_ref_10749","_ref_12752","_ref_12937","_ref_12945","_ref_12966","_ref_13086","_ref_13095","_ref_13119","_ref_13390","_ref_13547","_ref_13723","_ref_14348","_ref_14812","_ref_14813"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"YieldExpression"},{"type":"clause","id":"sec-generator-function-definitions-static-semantics-early-errors","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"14.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: Early Errors"},{"type":"clause","id":"sec-generator-function-definitions-static-semantics-boundnames","aoid":null,"title":"Static Semantics: BoundNames","titleHTML":"Static Semantics: BoundNames","number":"14.4.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: BoundNames"},{"type":"clause","id":"sec-generator-function-definitions-static-semantics-computedpropertycontains","aoid":null,"title":"Static Semantics: ComputedPropertyContains","titleHTML":"Static Semantics: ComputedPropertyContains","number":"14.4.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ComputedPropertyContains"},{"type":"clause","id":"sec-generator-function-definitions-static-semantics-contains","aoid":null,"title":"Static Semantics: Contains","titleHTML":"Static Semantics: Contains","number":"14.4.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: Contains"},{"type":"clause","id":"sec-generator-function-definitions-static-semantics-hasdirectsuper","aoid":null,"title":"Static Semantics: HasDirectSuper","titleHTML":"Static Semantics: HasDirectSuper","number":"14.4.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: HasDirectSuper"},{"type":"clause","id":"sec-generator-function-definitions-static-semantics-hasname","aoid":null,"title":"Static Semantics: HasName","titleHTML":"Static Semantics: HasName","number":"14.4.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: HasName"},{"type":"clause","id":"sec-generator-function-definitions-static-semantics-isconstantdeclaration","aoid":null,"title":"Static Semantics: IsConstantDeclaration","titleHTML":"Static Semantics: IsConstantDeclaration","number":"14.4.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsConstantDeclaration"},{"type":"clause","id":"sec-generator-function-definitions-static-semantics-isfunctiondefinition","aoid":null,"title":"Static Semantics: IsFunctionDefinition","titleHTML":"Static Semantics: IsFunctionDefinition","number":"14.4.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsFunctionDefinition"},{"type":"clause","id":"sec-generator-function-definitions-static-semantics-propname","aoid":null,"title":"Static Semantics: PropName","titleHTML":"Static Semantics: PropName","number":"14.4.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: PropName"},{"type":"clause","id":"sec-generator-function-definitions-runtime-semantics-evaluatebody","aoid":null,"title":"Runtime Semantics: EvaluateBody","titleHTML":"Runtime Semantics: EvaluateBody","number":"14.4.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: EvaluateBody"},{"type":"clause","id":"sec-generator-function-definitions-runtime-semantics-instantiatefunctionobject","aoid":null,"title":"Runtime Semantics: InstantiateFunctionObject","titleHTML":"Runtime Semantics: InstantiateFunctionObject","number":"14.4.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: InstantiateFunctionObject"},{"type":"clause","id":"sec-generator-function-definitions-runtime-semantics-propertydefinitionevaluation","aoid":null,"title":"Runtime Semantics: PropertyDefinitionEvaluation","titleHTML":"Runtime Semantics: PropertyDefinitionEvaluation","number":"14.4.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: PropertyDefinitionEvaluation"},{"type":"clause","id":"sec-generator-function-definitions-runtime-semantics-namedevaluation","aoid":null,"title":"Runtime Semantics: NamedEvaluation","titleHTML":"Runtime Semantics: NamedEvaluation","number":"14.4.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: NamedEvaluation"},{"type":"clause","id":"sec-generator-function-definitions-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"14.4.14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-generator-function-definitions","aoid":null,"title":"Generator Function Definitions","titleHTML":"Generator Function Definitions","number":"14.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_258","_ref_311"],"key":"Generator Function Definitions"},{"type":"production","id":"prod-AsyncGeneratorMethod","name":"AsyncGeneratorMethod","referencingIds":["_ref_12823","_ref_12888","_ref_13093","_ref_13193","_ref_13196","_ref_14357","_ref_14811"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"AsyncGeneratorMethod"},{"type":"production","id":"prod-AsyncGeneratorDeclaration","name":"AsyncGeneratorDeclaration","referencingIds":["_ref_9044","_ref_9049","_ref_9054","_ref_9059","_ref_9064","_ref_9070","_ref_9091","_ref_9105","_ref_9120","_ref_9134","_ref_9150","_ref_10958","_ref_10991","_ref_10992","_ref_11019","_ref_11140","_ref_11468","_ref_13177","_ref_13181","_ref_13184","_ref_13187","_ref_13188","_ref_13218","_ref_13375","_ref_13384","_ref_13873","_ref_14013","_ref_14276","_ref_14312","_ref_14809"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"AsyncGeneratorDeclaration"},{"type":"production","id":"prod-AsyncGeneratorExpression","name":"AsyncGeneratorExpression","referencingIds":["_ref_9106","_ref_9121","_ref_9135","_ref_9151","_ref_9822","_ref_9858","_ref_9869","_ref_10042","_ref_13199","_ref_13202","_ref_13205","_ref_13209","_ref_13213","_ref_13215","_ref_13216","_ref_13220","_ref_13221","_ref_13376","_ref_13385","_ref_13389","_ref_13806","_ref_14277","_ref_14810"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"AsyncGeneratorExpression"},{"type":"production","id":"prod-AsyncGeneratorBody","name":"AsyncGeneratorBody","referencingIds":["_ref_13073","_ref_13077","_ref_13080","_ref_13084","_ref_13092","_ref_13098","_ref_13101","_ref_13104","_ref_13106","_ref_13109","_ref_13114","_ref_13117","_ref_13124","_ref_13128","_ref_13132","_ref_13135","_ref_13138","_ref_13142","_ref_13144","_ref_13147","_ref_13150","_ref_13153","_ref_13156","_ref_13159","_ref_13162","_ref_13164","_ref_13167","_ref_13170","_ref_13176","_ref_13180","_ref_13183","_ref_13186","_ref_13191","_ref_13195","_ref_13198","_ref_13201","_ref_13204","_ref_13208","_ref_13212","_ref_13217","_ref_13625","_ref_14341"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"AsyncGeneratorBody"},{"type":"clause","id":"sec-async-generator-function-definitions-static-semantics-early-errors","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"14.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: Early Errors"},{"type":"clause","id":"sec-async-generator-function-definitions-static-semantics-boundnames","aoid":null,"title":"Static Semantics: BoundNames","titleHTML":"Static Semantics: BoundNames","number":"14.5.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: BoundNames"},{"type":"clause","id":"sec-async-generator-function-definitions-static-semantics-computedpropertycontains","aoid":null,"title":"Static Semantics: ComputedPropertyContains","titleHTML":"Static Semantics: ComputedPropertyContains","number":"14.5.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ComputedPropertyContains"},{"type":"clause","id":"sec-async-generator-function-definitions-static-semantics-contains","aoid":null,"title":"Static Semantics: Contains","titleHTML":"Static Semantics: Contains","number":"14.5.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: Contains"},{"type":"clause","id":"sec-async-generator-function-definitions-static-semantics-hasdirectsuper","aoid":null,"title":"Static Semantics: HasDirectSuper","titleHTML":"Static Semantics: HasDirectSuper","number":"14.5.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: HasDirectSuper"},{"type":"clause","id":"sec-async-generator-function-definitions-static-semantics-hasname","aoid":null,"title":"Static Semantics: HasName","titleHTML":"Static Semantics: HasName","number":"14.5.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: HasName"},{"type":"clause","id":"sec-async-generator-function-definitions-static-semantics-isconstantdeclaration","aoid":null,"title":"Static Semantics: IsConstantDeclaration","titleHTML":"Static Semantics: IsConstantDeclaration","number":"14.5.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsConstantDeclaration"},{"type":"clause","id":"sec-async-generator-function-definitions-static-semantics-isfunctiondefinition","aoid":null,"title":"Static Semantics: IsFunctionDefinition","titleHTML":"Static Semantics: IsFunctionDefinition","number":"14.5.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsFunctionDefinition"},{"type":"clause","id":"sec-async-generator-function-definitions-static-semantics-propname","aoid":null,"title":"Static Semantics: PropName","titleHTML":"Static Semantics: PropName","number":"14.5.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: PropName"},{"type":"clause","id":"sec-asyncgenerator-definitions-evaluatebody","aoid":null,"title":"Runtime Semantics: EvaluateBody","titleHTML":"Runtime Semantics: EvaluateBody","number":"14.5.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: EvaluateBody"},{"type":"clause","id":"sec-asyncgenerator-definitions-instantiatefunctionobject","aoid":null,"title":"Runtime Semantics: InstantiateFunctionObject","titleHTML":"Runtime Semantics: InstantiateFunctionObject","number":"14.5.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: InstantiateFunctionObject"},{"type":"clause","id":"sec-asyncgenerator-definitions-propertydefinitionevaluation","aoid":null,"title":"Runtime Semantics: PropertyDefinitionEvaluation","titleHTML":"Runtime Semantics: PropertyDefinitionEvaluation","number":"14.5.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: PropertyDefinitionEvaluation"},{"type":"clause","id":"sec-asyncgenerator-definitions-namedevaluation","aoid":null,"title":"Runtime Semantics: NamedEvaluation","titleHTML":"Runtime Semantics: NamedEvaluation","number":"14.5.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: NamedEvaluation"},{"type":"clause","id":"sec-asyncgenerator-definitions-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"14.5.14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-async-generator-function-definitions","aoid":null,"title":"Async Generator Function Definitions","titleHTML":"Async Generator Function Definitions","number":"14.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_260","_ref_314"],"key":"Async Generator Function Definitions"},{"type":"production","id":"prod-ClassDeclaration","name":"ClassDeclaration","referencingIds":["_ref_9072","_ref_9076","_ref_9110","_ref_9125","_ref_9139","_ref_9142","_ref_10953","_ref_10993","_ref_10994","_ref_11465","_ref_13331","_ref_13334","_ref_13341","_ref_14109","_ref_14136","_ref_14137","_ref_14149","_ref_14171","_ref_14196","_ref_14197","_ref_14224","_ref_14225","_ref_14236","_ref_14257","_ref_14258","_ref_14259","_ref_14278","_ref_14301"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ClassDeclaration"},{"type":"production","id":"prod-ClassExpression","name":"ClassExpression","referencingIds":["_ref_9111","_ref_9126","_ref_9140","_ref_9143","_ref_9819","_ref_9855","_ref_9866","_ref_10040","_ref_13349","_ref_13803","_ref_14279","_ref_14302"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ClassExpression"},{"type":"production","id":"prod-ClassTail","name":"ClassTail","referencingIds":["_ref_13223","_ref_13224","_ref_13226","_ref_13251","_ref_13253","_ref_13282","_ref_13284","_ref_13286","_ref_13287","_ref_13289","_ref_13328","_ref_13330","_ref_13332","_ref_13333","_ref_13335","_ref_13337","_ref_13338","_ref_13340","_ref_13342","_ref_13345","_ref_13348"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ClassTail"},{"type":"production","id":"prod-ClassHeritage","name":"ClassHeritage","referencingIds":["_ref_13227","_ref_13236","_ref_13238","_ref_13266","_ref_13269","_ref_13270","_ref_13271","_ref_13314","_ref_13316","_ref_13317","_ref_13320","_ref_13323"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ClassHeritage"},{"type":"production","id":"prod-ClassBody","name":"ClassBody","referencingIds":["_ref_13228","_ref_13237","_ref_13239","_ref_13267","_ref_13268","_ref_13272","_ref_13315","_ref_13318","_ref_13319","_ref_13324","_ref_13325"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ClassBody"},{"type":"production","id":"prod-ClassElementList","name":"ClassElementList","referencingIds":["_ref_13230","_ref_13232","_ref_13240","_ref_13241","_ref_13259","_ref_13261","_ref_13274","_ref_13276","_ref_13297","_ref_13299","_ref_13308","_ref_13310"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ClassElementList"},{"type":"production","id":"prod-ClassElement","name":"ClassElement","referencingIds":["_ref_13231","_ref_13233","_ref_13254","_ref_13255","_ref_13256","_ref_13257","_ref_13258","_ref_13260","_ref_13262","_ref_13263","_ref_13264","_ref_13265","_ref_13275","_ref_13277","_ref_13292","_ref_13293","_ref_13294","_ref_13295","_ref_13296","_ref_13298","_ref_13300","_ref_13301","_ref_13302","_ref_13303","_ref_13304","_ref_13305","_ref_13306","_ref_13307","_ref_13309","_ref_13311","_ref_13312","_ref_13313","_ref_13326"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ClassElement"},{"type":"clause","id":"sec-class-definitions-static-semantics-early-errors","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"14.6.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_281"],"key":"Static Semantics: Early Errors"},{"type":"clause","id":"sec-class-definitions-static-semantics-boundnames","aoid":null,"title":"Static Semantics: BoundNames","titleHTML":"Static Semantics: BoundNames","number":"14.6.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: BoundNames"},{"type":"clause","id":"sec-static-semantics-constructormethod","aoid":null,"title":"Static Semantics: ConstructorMethod","titleHTML":"Static Semantics: ConstructorMethod","number":"14.6.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_413"],"key":"Static Semantics: ConstructorMethod"},{"type":"clause","id":"sec-class-definitions-static-semantics-contains","aoid":null,"title":"Static Semantics: Contains","titleHTML":"Static Semantics: Contains","number":"14.6.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: Contains"},{"type":"clause","id":"sec-class-definitions-static-semantics-computedpropertycontains","aoid":null,"title":"Static Semantics: ComputedPropertyContains","titleHTML":"Static Semantics: ComputedPropertyContains","number":"14.6.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ComputedPropertyContains"},{"type":"clause","id":"sec-class-definitions-static-semantics-hasname","aoid":null,"title":"Static Semantics: HasName","titleHTML":"Static Semantics: HasName","number":"14.6.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: HasName"},{"type":"clause","id":"sec-class-definitions-static-semantics-isconstantdeclaration","aoid":null,"title":"Static Semantics: IsConstantDeclaration","titleHTML":"Static Semantics: IsConstantDeclaration","number":"14.6.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsConstantDeclaration"},{"type":"clause","id":"sec-class-definitions-static-semantics-isfunctiondefinition","aoid":null,"title":"Static Semantics: IsFunctionDefinition","titleHTML":"Static Semantics: IsFunctionDefinition","number":"14.6.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsFunctionDefinition"},{"type":"clause","id":"sec-static-semantics-isstatic","aoid":null,"title":"Static Semantics: IsStatic","titleHTML":"Static Semantics: IsStatic","number":"14.6.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsStatic"},{"type":"clause","id":"sec-static-semantics-nonconstructormethoddefinitions","aoid":null,"title":"Static Semantics: NonConstructorMethodDefinitions","titleHTML":"Static Semantics: NonConstructorMethodDefinitions","number":"14.6.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: NonConstructorMethodDefinitions"},{"type":"clause","id":"sec-static-semantics-prototypepropertynamelist","aoid":null,"title":"Static Semantics: PrototypePropertyNameList","titleHTML":"Static Semantics: PrototypePropertyNameList","number":"14.6.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: PrototypePropertyNameList"},{"type":"clause","id":"sec-class-definitions-static-semantics-propname","aoid":null,"title":"Static Semantics: PropName","titleHTML":"Static Semantics: PropName","number":"14.6.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: PropName"},{"type":"clause","id":"sec-runtime-semantics-classdefinitionevaluation","aoid":null,"title":"Runtime Semantics: ClassDefinitionEvaluation","titleHTML":"Runtime Semantics: ClassDefinitionEvaluation","number":"14.6.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: ClassDefinitionEvaluation"},{"type":"clause","id":"sec-runtime-semantics-bindingclassdeclarationevaluation","aoid":null,"title":"Runtime Semantics: BindingClassDeclarationEvaluation","titleHTML":"Runtime Semantics: BindingClassDeclarationEvaluation","number":"14.6.14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: BindingClassDeclarationEvaluation"},{"type":"clause","id":"sec-class-definitions-runtime-semantics-namedevaluation","aoid":null,"title":"Runtime Semantics: NamedEvaluation","titleHTML":"Runtime Semantics: NamedEvaluation","number":"14.6.15","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: NamedEvaluation"},{"type":"clause","id":"sec-class-definitions-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"14.6.16","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-class-definitions","aoid":null,"title":"Class Definitions","titleHTML":"Class Definitions","number":"14.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_312"],"key":"Class Definitions"},{"type":"production","id":"prod-AsyncFunctionDeclaration","name":"AsyncFunctionDeclaration","referencingIds":["_ref_9043","_ref_9048","_ref_9053","_ref_9058","_ref_9063","_ref_9069","_ref_9090","_ref_9103","_ref_9118","_ref_9132","_ref_9148","_ref_10957","_ref_10989","_ref_10990","_ref_11018","_ref_11139","_ref_11467","_ref_13373","_ref_13382","_ref_13478","_ref_13482","_ref_13485","_ref_13488","_ref_13872","_ref_14012","_ref_14280","_ref_14311","_ref_14814"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"AsyncFunctionDeclaration"},{"type":"production","id":"prod-AsyncFunctionExpression","name":"AsyncFunctionExpression","referencingIds":["_ref_9104","_ref_9119","_ref_9133","_ref_9149","_ref_9821","_ref_9857","_ref_9868","_ref_10041","_ref_13374","_ref_13383","_ref_13501","_ref_13509","_ref_13512","_ref_13516","_ref_13520","_ref_13805","_ref_14281","_ref_14815"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"AsyncFunctionExpression"},{"type":"production","id":"prod-AsyncMethod","name":"AsyncMethod","referencingIds":["_ref_12822","_ref_12887","_ref_13397","_ref_13495","_ref_13498","_ref_14816"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"AsyncMethod"},{"type":"production","id":"prod-AsyncFunctionBody","name":"AsyncFunctionBody","referencingIds":["_ref_13353","_ref_13356","_ref_13359","_ref_13363","_ref_13367","_ref_13371","_ref_13380","_ref_13394","_ref_13395","_ref_13401","_ref_13404","_ref_13406","_ref_13408","_ref_13411","_ref_13412","_ref_13420","_ref_13423","_ref_13427","_ref_13431","_ref_13434","_ref_13437","_ref_13441","_ref_13443","_ref_13445","_ref_13448","_ref_13451","_ref_13454","_ref_13457","_ref_13460","_ref_13463","_ref_13465","_ref_13467","_ref_13470","_ref_13473","_ref_13477","_ref_13481","_ref_13484","_ref_13487","_ref_13493","_ref_13497","_ref_13500","_ref_13504","_ref_13506","_ref_13508","_ref_13511","_ref_13515","_ref_13519","_ref_13531","_ref_13596","_ref_13597","_ref_13623","_ref_14339"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"AsyncFunctionBody"},{"type":"production","id":"prod-AwaitExpression","name":"AwaitExpression","referencingIds":["_ref_10425","_ref_10433","_ref_10441","_ref_12754","_ref_13087","_ref_13097","_ref_13121","_ref_13370","_ref_13377","_ref_13391","_ref_13399","_ref_13415","_ref_13549","_ref_13783","_ref_14349"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"AwaitExpression"},{"type":"clause","id":"sec-async-function-definitions-static-semantics-early-errors","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"14.7.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: Early Errors"},{"type":"clause","id":"sec-async-function-definitions-static-semantics-BoundNames","aoid":null,"title":"Static Semantics: BoundNames","titleHTML":"Static Semantics: BoundNames","number":"14.7.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: BoundNames"},{"type":"clause","id":"sec-async-function-definitions-static-semantics-ComputedPropertyContains","aoid":null,"title":"Static Semantics: ComputedPropertyContains","titleHTML":"Static Semantics: ComputedPropertyContains","number":"14.7.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ComputedPropertyContains"},{"type":"clause","id":"sec-async-function-definitions-static-semantics-Contains","aoid":null,"title":"Static Semantics: Contains","titleHTML":"Static Semantics: Contains","number":"14.7.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: Contains"},{"type":"clause","id":"sec-async-function-definitions-static-semantics-HasDirectSuper","aoid":null,"title":"Static Semantics: HasDirectSuper","titleHTML":"Static Semantics: HasDirectSuper","number":"14.7.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: HasDirectSuper"},{"type":"clause","id":"sec-async-function-definitions-static-semantics-HasName","aoid":null,"title":"Static Semantics: HasName","titleHTML":"Static Semantics: HasName","number":"14.7.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: HasName"},{"type":"clause","id":"sec-async-function-definitions-static-semantics-IsConstantDeclaration","aoid":null,"title":"Static Semantics: IsConstantDeclaration","titleHTML":"Static Semantics: IsConstantDeclaration","number":"14.7.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsConstantDeclaration"},{"type":"clause","id":"sec-async-function-definitions-static-semantics-IsFunctionDefinition","aoid":null,"title":"Static Semantics: IsFunctionDefinition","titleHTML":"Static Semantics: IsFunctionDefinition","number":"14.7.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsFunctionDefinition"},{"type":"clause","id":"sec-async-function-definitions-static-semantics-PropName","aoid":null,"title":"Static Semantics: PropName","titleHTML":"Static Semantics: PropName","number":"14.7.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: PropName"},{"type":"clause","id":"sec-async-function-definitions-InstantiateFunctionObject","aoid":null,"title":"Runtime Semantics: InstantiateFunctionObject","titleHTML":"Runtime Semantics: InstantiateFunctionObject","number":"14.7.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: InstantiateFunctionObject"},{"type":"clause","id":"sec-async-function-definitions-EvaluateBody","aoid":null,"title":"Runtime Semantics: EvaluateBody","titleHTML":"Runtime Semantics: EvaluateBody","number":"14.7.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: EvaluateBody"},{"type":"clause","id":"sec-async-function-definitions-PropertyDefinitionEvaluation","aoid":null,"title":"Runtime Semantics: PropertyDefinitionEvaluation","titleHTML":"Runtime Semantics: PropertyDefinitionEvaluation","number":"14.7.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: PropertyDefinitionEvaluation"},{"type":"clause","id":"sec-async-function-definitions-runtime-semantics-namedevaluation","aoid":null,"title":"Runtime Semantics: NamedEvaluation","titleHTML":"Runtime Semantics: NamedEvaluation","number":"14.7.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: NamedEvaluation"},{"type":"clause","id":"sec-async-function-definitions-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"14.7.14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-async-function-definitions","aoid":null,"title":"Async Function Definitions","titleHTML":"Async Function Definitions","number":"14.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_259","_ref_313"],"key":"Async Function Definitions"},{"type":"production","id":"prod-AsyncArrowFunction","name":"AsyncArrowFunction","referencingIds":["_ref_9109","_ref_9124","_ref_9138","_ref_9154","_ref_10715","_ref_10742","_ref_10751","_ref_13602","_ref_13605","_ref_13610","_ref_13725","_ref_14282","_ref_14817"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"AsyncArrowFunction"},{"type":"production","id":"prod-AsyncConciseBody","name":"AsyncConciseBody","referencingIds":["_ref_13526","_ref_13529","_ref_13536","_ref_13541","_ref_13543","_ref_13545","_ref_13553","_ref_13554","_ref_13566","_ref_13570","_ref_13572","_ref_13577","_ref_13581","_ref_13583","_ref_13599","_ref_13601","_ref_13604","_ref_13607","_ref_13609","_ref_13613","_ref_13616","_ref_13619","_ref_13626"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"AsyncConciseBody"},{"type":"production","id":"prod-AsyncArrowBindingIdentifier","name":"AsyncArrowBindingIdentifier","referencingIds":["_ref_13524","_ref_13540","_ref_13542","_ref_13565","_ref_13580","_ref_13598","_ref_13603","_ref_13606"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"AsyncArrowBindingIdentifier"},{"type":"production","id":"prod-CoverCallExpressionAndAsyncArrowHead","name":"CoverCallExpressionAndAsyncArrowHead","referencingIds":["_ref_9975","_ref_10193","_ref_10214","_ref_10215","_ref_10218","_ref_10220","_ref_10287","_ref_10342","_ref_10343","_ref_13527","_ref_13535","_ref_13537","_ref_13544","_ref_13546","_ref_13548","_ref_13550","_ref_13552","_ref_13555","_ref_13557","_ref_13561","_ref_13564","_ref_13571","_ref_13576","_ref_13582","_ref_13587","_ref_13600","_ref_13608","_ref_13611","_ref_13824","_ref_14822","_ref_15064"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"CoverCallExpressionAndAsyncArrowHead"},{"type":"production","id":"prod-AsyncArrowHead","name":"AsyncArrowHead","referencingIds":["_ref_13551","_ref_13556","_ref_13560"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"AsyncArrowHead"},{"type":"clause","id":"sec-async-arrow-function-definitions-static-semantics-early-errors","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"14.8.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: Early Errors"},{"type":"clause","id":"sec-async-arrow-function-definitions-static-semantics-CoveredAsyncArrowHead","aoid":null,"title":"Static Semantics: CoveredAsyncArrowHead","titleHTML":"Static Semantics: CoveredAsyncArrowHead","number":"14.8.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: CoveredAsyncArrowHead"},{"type":"clause","id":"sec-async-arrow-function-definitions-static-semantics-BoundNames","aoid":null,"title":"Static Semantics: BoundNames","titleHTML":"Static Semantics: BoundNames","number":"14.8.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: BoundNames"},{"type":"clause","id":"sec-async-arrow-function-definitions-static-semantics-Contains","aoid":null,"title":"Static Semantics: Contains","titleHTML":"Static Semantics: Contains","number":"14.8.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: Contains"},{"type":"clause","id":"sec-async-arrow-function-definitions-static-semantics-ContainsExpression","aoid":null,"title":"Static Semantics: ContainsExpression","titleHTML":"Static Semantics: ContainsExpression","number":"14.8.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsExpression"},{"type":"clause","id":"sec-async-arrow-function-definitions-static-semantics-ExpectedArgumentCount","aoid":null,"title":"Static Semantics: ExpectedArgumentCount","titleHTML":"Static Semantics: ExpectedArgumentCount","number":"14.8.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ExpectedArgumentCount"},{"type":"clause","id":"sec-async-arrow-function-definitions-static-semantics-HasName","aoid":null,"title":"Static Semantics: HasName","titleHTML":"Static Semantics: HasName","number":"14.8.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: HasName"},{"type":"clause","id":"sec-async-arrow-function-definitions-static-semantics-IsSimpleParameterList","aoid":null,"title":"Static Semantics: IsSimpleParameterList","titleHTML":"Static Semantics: IsSimpleParameterList","number":"14.8.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsSimpleParameterList"},{"type":"clause","id":"sec-async-arrow-function-definitions-static-semantics-LexicallyDeclaredNames","aoid":null,"title":"Static Semantics: LexicallyDeclaredNames","titleHTML":"Static Semantics: LexicallyDeclaredNames","number":"14.8.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: LexicallyDeclaredNames"},{"type":"clause","id":"sec-async-arrow-function-definitions-static-semantics-LexicallyScopedDeclarations","aoid":null,"title":"Static Semantics: LexicallyScopedDeclarations","titleHTML":"Static Semantics: LexicallyScopedDeclarations","number":"14.8.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: LexicallyScopedDeclarations"},{"type":"clause","id":"sec-async-arrow-function-definitions-static-semantics-VarDeclaredNames","aoid":null,"title":"Static Semantics: VarDeclaredNames","titleHTML":"Static Semantics: VarDeclaredNames","number":"14.8.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: VarDeclaredNames"},{"type":"clause","id":"sec-async-arrow-function-definitions-static-semantics-VarScopedDeclarations","aoid":null,"title":"Static Semantics: VarScopedDeclarations","titleHTML":"Static Semantics: VarScopedDeclarations","number":"14.8.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: VarScopedDeclarations"},{"type":"clause","id":"sec-async-arrow-function-definitions-IteratorBindingInitialization","aoid":null,"title":"Runtime Semantics: IteratorBindingInitialization","titleHTML":"Runtime Semantics: IteratorBindingInitialization","number":"14.8.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: IteratorBindingInitialization"},{"type":"clause","id":"sec-async-arrow-function-definitions-EvaluateBody","aoid":null,"title":"Runtime Semantics: EvaluateBody","titleHTML":"Runtime Semantics: EvaluateBody","number":"14.8.14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: EvaluateBody"},{"type":"clause","id":"sec-async-arrow-function-definitions-runtime-semantics-namedevaluation","aoid":null,"title":"Runtime Semantics: NamedEvaluation","titleHTML":"Runtime Semantics: NamedEvaluation","number":"14.8.15","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: NamedEvaluation"},{"type":"clause","id":"sec-async-arrow-function-definitions-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"14.8.16","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-async-arrow-function-definitions","aoid":null,"title":"Async Arrow Function Definitions","titleHTML":"Async Arrow Function Definitions","number":"14.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_261"],"key":"Async Arrow Function Definitions"},{"type":"op","aoid":"IsInTailPosition","refId":"sec-isintailposition","location":"","referencingIds":[],"key":"IsInTailPosition"},{"type":"clause","id":"sec-isintailposition","aoid":"IsInTailPosition","title":"Static Semantics: IsInTailPosition ( call )","titleHTML":"Static Semantics: IsInTailPosition ( <var>call</var> )","number":"14.9.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3302","_ref_3305","_ref_3369","_ref_3372"],"key":"Static Semantics: IsInTailPosition ( call )"},{"type":"clause","id":"sec-statement-rules","aoid":null,"title":"Statement Rules","titleHTML":"Statement Rules","number":"14.9.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Statement Rules"},{"type":"clause","id":"sec-expression-rules","aoid":null,"title":"Expression Rules","titleHTML":"Expression Rules","number":"14.9.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Expression Rules"},{"type":"clause","id":"sec-static-semantics-hascallintailposition","aoid":null,"title":"Static Semantics: HasCallInTailPosition","titleHTML":"Static Semantics: HasCallInTailPosition","number":"14.9.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: HasCallInTailPosition"},{"type":"op","aoid":"PrepareForTailCall","refId":"sec-preparefortailcall","location":"","referencingIds":[],"key":"PrepareForTailCall"},{"type":"clause","id":"sec-preparefortailcall","aoid":"PrepareForTailCall","title":"Runtime Semantics: PrepareForTailCall ( )","titleHTML":"Runtime Semantics: PrepareForTailCall ( )","number":"14.9.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3319","_ref_5037","_ref_5040","_ref_5059","_ref_8345"],"key":"Runtime Semantics: PrepareForTailCall ( )"},{"type":"clause","id":"sec-tail-position-calls","aoid":null,"title":"Tail Position Calls","titleHTML":"Tail Position Calls","number":"14.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Tail Position Calls"},{"type":"clause","id":"sec-ecmascript-language-functions-and-classes","aoid":null,"title":"ECMAScript Language: Functions and Classes","titleHTML":"ECMAScript Language: Functions and Classes","number":"14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_751"],"key":"ECMAScript Language: Functions and Classes"},{"type":"production","id":"prod-Script","name":"Script","referencingIds":["_ref_8805","_ref_8807","_ref_8809","_ref_8811","_ref_8813","_ref_8926","_ref_8928","_ref_8930","_ref_8932","_ref_9033","_ref_9039","_ref_9040","_ref_9080","_ref_9083","_ref_9097","_ref_9098","_ref_9112","_ref_9113","_ref_9141","_ref_9156","_ref_13379","_ref_13856","_ref_13863","_ref_13864","_ref_13865","_ref_13877","_ref_13878","_ref_13879","_ref_13880","_ref_14264","_ref_14265","_ref_14266","_ref_14270","_ref_14289","_ref_14291","_ref_14802"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Script"},{"type":"production","id":"prod-ScriptBody","name":"ScriptBody","referencingIds":["_ref_12545","_ref_13837","_ref_13839","_ref_13840","_ref_13841","_ref_13842","_ref_13866","_ref_14292","_ref_14293"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ScriptBody"},{"type":"clause","id":"sec-scripts-static-semantics-early-errors","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"15.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_365"],"key":"Static Semantics: Early Errors"},{"type":"clause","id":"sec-static-semantics-isstrict","aoid":null,"title":"Static Semantics: IsStrict","titleHTML":"Static Semantics: IsStrict","number":"15.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsStrict"},{"type":"clause","id":"sec-scripts-static-semantics-lexicallydeclarednames","aoid":null,"title":"Static Semantics: LexicallyDeclaredNames","titleHTML":"Static Semantics: LexicallyDeclaredNames","number":"15.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: LexicallyDeclaredNames"},{"type":"clause","id":"sec-scripts-static-semantics-lexicallyscopeddeclarations","aoid":null,"title":"Static Semantics: LexicallyScopedDeclarations","titleHTML":"Static Semantics: LexicallyScopedDeclarations","number":"15.1.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: LexicallyScopedDeclarations"},{"type":"clause","id":"sec-scripts-static-semantics-vardeclarednames","aoid":null,"title":"Static Semantics: VarDeclaredNames","titleHTML":"Static Semantics: VarDeclaredNames","number":"15.1.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: VarDeclaredNames"},{"type":"clause","id":"sec-scripts-static-semantics-varscopeddeclarations","aoid":null,"title":"Static Semantics: VarScopedDeclarations","titleHTML":"Static Semantics: VarScopedDeclarations","number":"15.1.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: VarScopedDeclarations"},{"type":"clause","id":"sec-script-semantics-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"15.1.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"term","term":"Script Record","refId":"sec-script-records","referencingIds":["_ref_2115","_ref_2171","_ref_2419","_ref_4388","_ref_4395","_ref_4402"],"id":"script-record","namespace":"https://tc39.github.io/ecma262/","location":"","key":"Script Record"},{"type":"table","id":"table-script-records","number":36,"caption":"Table 36: Script Record Fields","referencingIds":["_ref_362"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 36: Script Record Fields"},{"type":"clause","id":"sec-script-records","aoid":null,"title":"Script Records","titleHTML":"Script Records","number":"15.1.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Script Records"},{"type":"op","aoid":"ParseScript","refId":"sec-parse-script","location":"","referencingIds":[],"key":"ParseScript"},{"type":"clause","id":"sec-parse-script","aoid":"ParseScript","title":"ParseScript ( sourceText, realm, hostDefined )","titleHTML":"ParseScript ( <var>sourceText</var>, <var>realm</var>, <var>hostDefined</var> )","number":"15.1.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_4438","_ref_4750"],"key":"ParseScript ( sourceText, realm, hostDefined )"},{"type":"op","aoid":"ScriptEvaluation","refId":"sec-runtime-semantics-scriptevaluation","location":"","referencingIds":[],"key":"ScriptEvaluation"},{"type":"clause","id":"sec-runtime-semantics-scriptevaluation","aoid":"ScriptEvaluation","title":"ScriptEvaluation ( scriptRecord )","titleHTML":"ScriptEvaluation ( <var>scriptRecord</var> )","number":"15.1.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_4442"],"key":"ScriptEvaluation ( scriptRecord )"},{"type":"op","aoid":"GlobalDeclarationInstantiation","refId":"sec-globaldeclarationinstantiation","location":"","referencingIds":[],"key":"GlobalDeclarationInstantiation"},{"type":"clause","id":"sec-globaldeclarationinstantiation","aoid":"GlobalDeclarationInstantiation","title":"Runtime Semantics: GlobalDeclarationInstantiation ( script, env )","titleHTML":"Runtime Semantics: GlobalDeclarationInstantiation ( <var>script</var>, <var>env</var> )","number":"15.1.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_753","_ref_4409","_ref_8744"],"key":"Runtime Semantics: GlobalDeclarationInstantiation ( script, env )"},{"type":"op","aoid":"ScriptEvaluationJob","refId":"sec-scriptevaluationjob","location":"","referencingIds":[],"key":"ScriptEvaluationJob"},{"type":"clause","id":"sec-scriptevaluationjob","aoid":"ScriptEvaluationJob","title":"Runtime Semantics: ScriptEvaluationJob ( sourceText, hostDefined )","titleHTML":"Runtime Semantics: ScriptEvaluationJob ( <var>sourceText</var>, <var>hostDefined</var> )","number":"15.1.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2206"],"key":"Runtime Semantics: ScriptEvaluationJob ( sourceText, hostDefined )"},{"type":"clause","id":"sec-scripts","aoid":null,"title":"Scripts","titleHTML":"Scripts","number":"15.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Scripts"},{"type":"production","id":"prod-Module","name":"Module","referencingIds":["_ref_8806","_ref_8808","_ref_8810","_ref_8812","_ref_8814","_ref_8927","_ref_8929","_ref_8931","_ref_8933","_ref_9027","_ref_9028","_ref_9077","_ref_9078","_ref_9081","_ref_9084","_ref_9093","_ref_9094","_ref_9157","_ref_9782","_ref_9791","_ref_13378","_ref_13905","_ref_13906","_ref_13925","_ref_13932","_ref_13960","_ref_13973","_ref_13998","_ref_13999","_ref_14008","_ref_14009","_ref_14015","_ref_14016","_ref_14267","_ref_14268","_ref_14269","_ref_14271","_ref_14288","_ref_14290","_ref_14908"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Module"},{"type":"production","id":"prod-ModuleBody","name":"ModuleBody","referencingIds":["_ref_9127","_ref_12546","_ref_13881","_ref_13904"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ModuleBody"},{"type":"production","id":"prod-ModuleItemList","name":"ModuleItemList","referencingIds":["_ref_13882","_ref_13884","_ref_13889","_ref_13890","_ref_13891","_ref_13892","_ref_13893","_ref_13894","_ref_13895","_ref_13896","_ref_13897","_ref_13898","_ref_13900","_ref_13901","_ref_13902","_ref_13907","_ref_13909","_ref_13913","_ref_13915","_ref_13919","_ref_13921","_ref_13926","_ref_13928","_ref_13933","_ref_13935","_ref_13941","_ref_13943","_ref_13947","_ref_13949","_ref_13955","_ref_13957","_ref_13961","_ref_13963","_ref_13974","_ref_13976","_ref_13979","_ref_13981","_ref_13988","_ref_13990","_ref_14017","_ref_14018","_ref_14019","_ref_14021","_ref_14023","_ref_14024"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ModuleItemList"},{"type":"production","id":"prod-ModuleItem","name":"ModuleItem","referencingIds":["_ref_12543","_ref_13883","_ref_13885","_ref_13908","_ref_13910","_ref_13914","_ref_13916","_ref_13920","_ref_13922","_ref_13927","_ref_13929","_ref_13934","_ref_13936","_ref_13942","_ref_13944","_ref_13948","_ref_13950","_ref_13953","_ref_13954","_ref_13956","_ref_13958","_ref_13962","_ref_13964","_ref_13975","_ref_13977","_ref_13980","_ref_13982","_ref_13989","_ref_13991","_ref_14020","_ref_14022"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ModuleItem"},{"type":"clause","id":"sec-module-semantics-static-semantics-early-errors","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"15.2.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: Early Errors"},{"type":"clause","id":"sec-module-semantics-static-semantics-containsduplicatelabels","aoid":null,"title":"Static Semantics: ContainsDuplicateLabels","titleHTML":"Static Semantics: ContainsDuplicateLabels","number":"15.2.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsDuplicateLabels"},{"type":"clause","id":"sec-module-semantics-static-semantics-containsundefinedbreaktarget","aoid":null,"title":"Static Semantics: ContainsUndefinedBreakTarget","titleHTML":"Static Semantics: ContainsUndefinedBreakTarget","number":"15.2.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsUndefinedBreakTarget"},{"type":"clause","id":"sec-module-semantics-static-semantics-containsundefinedcontinuetarget","aoid":null,"title":"Static Semantics: ContainsUndefinedContinueTarget","titleHTML":"Static Semantics: ContainsUndefinedContinueTarget","number":"15.2.1.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ContainsUndefinedContinueTarget"},{"type":"clause","id":"sec-module-semantics-static-semantics-exportedbindings","aoid":null,"title":"Static Semantics: ExportedBindings","titleHTML":"Static Semantics: ExportedBindings","number":"15.2.1.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ExportedBindings"},{"type":"clause","id":"sec-module-semantics-static-semantics-exportednames","aoid":null,"title":"Static Semantics: ExportedNames","titleHTML":"Static Semantics: ExportedNames","number":"15.2.1.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ExportedNames"},{"type":"clause","id":"sec-module-semantics-static-semantics-exportentries","aoid":null,"title":"Static Semantics: ExportEntries","titleHTML":"Static Semantics: ExportEntries","number":"15.2.1.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ExportEntries"},{"type":"clause","id":"sec-module-semantics-static-semantics-importentries","aoid":null,"title":"Static Semantics: ImportEntries","titleHTML":"Static Semantics: ImportEntries","number":"15.2.1.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ImportEntries"},{"type":"op","aoid":"ImportedLocalNames","refId":"sec-importedlocalnames","location":"","referencingIds":[],"key":"ImportedLocalNames"},{"type":"clause","id":"sec-importedlocalnames","aoid":"ImportedLocalNames","title":"Static Semantics: ImportedLocalNames ( importEntries )","titleHTML":"Static Semantics: ImportedLocalNames ( <var>importEntries</var> )","number":"15.2.1.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_4582"],"key":"Static Semantics: ImportedLocalNames ( importEntries )"},{"type":"clause","id":"sec-module-semantics-static-semantics-modulerequests","aoid":null,"title":"Static Semantics: ModuleRequests","titleHTML":"Static Semantics: ModuleRequests","number":"15.2.1.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ModuleRequests"},{"type":"clause","id":"sec-module-semantics-static-semantics-lexicallydeclarednames","aoid":null,"title":"Static Semantics: LexicallyDeclaredNames","titleHTML":"Static Semantics: LexicallyDeclaredNames","number":"15.2.1.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: LexicallyDeclaredNames"},{"type":"clause","id":"sec-module-semantics-static-semantics-lexicallyscopeddeclarations","aoid":null,"title":"Static Semantics: LexicallyScopedDeclarations","titleHTML":"Static Semantics: LexicallyScopedDeclarations","number":"15.2.1.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: LexicallyScopedDeclarations"},{"type":"clause","id":"sec-module-semantics-static-semantics-vardeclarednames","aoid":null,"title":"Static Semantics: VarDeclaredNames","titleHTML":"Static Semantics: VarDeclaredNames","number":"15.2.1.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: VarDeclaredNames"},{"type":"clause","id":"sec-module-semantics-static-semantics-varscopeddeclarations","aoid":null,"title":"Static Semantics: VarScopedDeclarations","titleHTML":"Static Semantics: VarScopedDeclarations","number":"15.2.1.14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: VarScopedDeclarations"},{"type":"term","term":"Module Record","refId":"sec-abstract-module-records","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Module Record"},{"type":"table","id":"table-36","number":37,"caption":"Table 37: Module Record Fields","referencingIds":["_ref_368","_ref_371"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 37: Module Record Fields"},{"type":"table","id":"table-37","number":38,"caption":"Table 38: Abstract Methods of Module Records","referencingIds":["_ref_369","_ref_373"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 38: Abstract Methods of Module Records"},{"type":"term","term":"ResolvedBinding Record","refId":"sec-abstract-module-records","referencingIds":["_ref_2919","_ref_4607","_ref_4617","_ref_4627","_ref_4636","_ref_4674"],"id":"resolvedbinding-record","namespace":"https://tc39.github.io/ecma262/","location":"","key":"ResolvedBinding Record"},{"type":"clause","id":"sec-abstract-module-records","aoid":null,"title":"Abstract Module Records","titleHTML":"Abstract Module Records","number":"15.2.1.15","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2005","_ref_2021","_ref_2026","_ref_2114","_ref_2172","_ref_2420","_ref_2892","_ref_2893","_ref_2933","_ref_4467","_ref_4472","_ref_4485","_ref_4509","_ref_4511","_ref_4536","_ref_4539","_ref_4554","_ref_4591","_ref_4604","_ref_4605","_ref_4606","_ref_4610","_ref_4629","_ref_4663","_ref_4664","_ref_4665","_ref_4666","_ref_4667","_ref_4668","_ref_4671"],"key":"Abstract Module Records"},{"type":"term","term":"Cyclic Module Record","refId":"sec-cyclic-module-records","referencingIds":["_ref_4465","_ref_4474","_ref_4475","_ref_4484","_ref_4487","_ref_4496","_ref_4497","_ref_4504","_ref_4510","_ref_4513","_ref_4524","_ref_4531","_ref_4555","_ref_4632","_ref_4647"],"id":"cyclic-module-record","namespace":"https://tc39.github.io/ecma262/","location":"","key":"Cyclic Module Record"},{"type":"table","id":"table-cyclic-module-fields","number":39,"caption":"Table 39: Additional Fields of Cyclic Module Records","referencingIds":["_ref_372","_ref_376"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 39: Additional Fields of Cyclic Module Records"},{"type":"table","id":"table-cyclic-module-methods","number":40,"caption":"Table 40: Additional Abstract Methods of Cyclic Module Records","referencingIds":["_ref_374"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 40: Additional Abstract Methods of Cyclic Module Records"},{"type":"op","aoid":"InnerModuleInstantiation","refId":"sec-innermoduleinstantiation","location":"","referencingIds":[],"key":"InnerModuleInstantiation"},{"type":"clause","id":"sec-innermoduleinstantiation","aoid":"InnerModuleInstantiation","title":"InnerModuleInstantiation ( module, stack, index )","titleHTML":"InnerModuleInstantiation ( <var>module</var>, <var>stack</var>, <var>index</var> )","number":"15.2.1.16.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_4486","_ref_4490","_ref_4500","_ref_4523","_ref_4537","_ref_4543","_ref_4544","_ref_4545","_ref_4546","_ref_4547","_ref_4548"],"key":"InnerModuleInstantiation ( module, stack, index )"},{"type":"clause","id":"sec-moduledeclarationinstantiation","aoid":null,"title":"Instantiate ( ) Concrete Method","titleHTML":"Instantiate ( ) Concrete Method","number":"15.2.1.16.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Instantiate ( ) Concrete Method"},{"type":"op","aoid":"InnerModuleEvaluation","refId":"sec-innermoduleevaluation","location":"","referencingIds":[],"key":"InnerModuleEvaluation"},{"type":"clause","id":"sec-innermoduleevaluation","aoid":"InnerModuleEvaluation","title":"InnerModuleEvaluation ( module, stack, index )","titleHTML":"InnerModuleEvaluation ( <var>module</var>, <var>stack</var>, <var>index</var> )","number":"15.2.1.16.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_4512","_ref_4516","_ref_4527","_ref_4538","_ref_4550","_ref_4551"],"key":"InnerModuleEvaluation ( module, stack, index )"},{"type":"clause","id":"sec-moduleevaluation","aoid":null,"title":"Evaluate ( ) Concrete Method","titleHTML":"Evaluate ( ) Concrete Method","number":"15.2.1.16.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Evaluate ( ) Concrete Method"},{"type":"figure","id":"figure-module-graph-simple","number":2,"caption":"Figure 2: A simple module graph","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Figure 2: A simple module graph"},{"type":"figure","id":"figure-module-graph-missing","number":3,"caption":"Figure 3: A module graph with an unresolvable module","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Figure 3: A module graph with an unresolvable module"},{"type":"figure","id":"figure-module-graph-cycle","number":4,"caption":"Figure 4: A cyclic module graph","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Figure 4: A cyclic module graph"},{"type":"clause","id":"sec-example-cyclic-module-record-graphs","aoid":null,"title":"Example Cyclic Module Record Graphs","titleHTML":"Example Cyclic Module Record Graphs","number":"15.2.1.16.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Example Cyclic Module Record Graphs"},{"type":"clause","id":"sec-cyclic-module-records","aoid":null,"title":"Cyclic Module Records","titleHTML":"Cyclic Module Records","number":"15.2.1.16","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Cyclic Module Records"},{"type":"term","term":"Source Text Module Record","refId":"sec-source-text-module-records","referencingIds":["_ref_4466","_ref_4522","_ref_4553","_ref_4575","_ref_4589","_ref_4590","_ref_4592","_ref_4603","_ref_4608","_ref_4631","_ref_4633","_ref_4646","_ref_4648"],"id":"sourctextmodule-record","namespace":"https://tc39.github.io/ecma262/","location":"","key":"Source Text Module Record"},{"type":"table","id":"table-38","number":41,"caption":"Table 41: Additional Fields of Source Text Module Records","referencingIds":["_ref_377"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 41: Additional Fields of Source Text Module Records"},{"type":"term","term":"ImportEntry Record","refId":"sec-source-text-module-records","referencingIds":["_ref_4452","_ref_4568","_ref_4569","_ref_4570","_ref_4641","_ref_4694","_ref_4696","_ref_4699","_ref_4701"],"id":"importentry-record","namespace":"https://tc39.github.io/ecma262/","location":"","key":"ImportEntry Record"},{"type":"table","id":"table-39","number":42,"caption":"Table 42: ImportEntry Record Fields","referencingIds":["_ref_367","_ref_378"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 42: ImportEntry Record Fields"},{"type":"table","id":"table-40","number":43,"caption":"Table 43 (Informative): Import Forms Mappings to ImportEntry Records","referencingIds":["_ref_379"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 43 (Informative): Import Forms Mappings to ImportEntry Records"},{"type":"term","term":"ExportEntry Record","refId":"sec-source-text-module-records","referencingIds":["_ref_4572","_ref_4573","_ref_4586","_ref_4588","_ref_4596","_ref_4598","_ref_4600","_ref_4614","_ref_4618","_ref_4624","_ref_4634","_ref_4713","_ref_4716","_ref_4718","_ref_4720","_ref_4722","_ref_4723","_ref_4727","_ref_4729"],"id":"exportentry-record","namespace":"https://tc39.github.io/ecma262/","location":"","key":"ExportEntry Record"},{"type":"table","id":"table-41","number":44,"caption":"Table 44: ExportEntry Record Fields","referencingIds":["_ref_380"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 44: ExportEntry Record Fields"},{"type":"table","id":"table-42","number":45,"caption":"Table 45 (Informative): Export Forms Mappings to ExportEntry Records","referencingIds":["_ref_381"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 45 (Informative): Export Forms Mappings to ExportEntry Records"},{"type":"op","aoid":"ParseModule","refId":"sec-parsemodule","location":"","referencingIds":[],"key":"ParseModule"},{"type":"clause","id":"sec-parsemodule","aoid":"ParseModule","title":"ParseModule ( sourceText, realm, hostDefined )","titleHTML":"ParseModule ( <var>sourceText</var>, <var>realm</var>, <var>hostDefined</var> )","number":"15.2.1.17.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_4541","_ref_4556","_ref_4679"],"key":"ParseModule ( sourceText, realm, hostDefined )"},{"type":"clause","id":"sec-getexportednames","aoid":null,"title":"GetExportedNames ( exportStarSet ) Concrete Method","titleHTML":"GetExportedNames ( <var>exportStarSet</var> ) Concrete Method","number":"15.2.1.17.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"GetExportedNames ( exportStarSet ) Concrete Method"},{"type":"clause","id":"sec-resolveexport","aoid":null,"title":"ResolveExport ( exportName, resolveSet ) Concrete Method","titleHTML":"ResolveExport ( <var>exportName</var>, <var>resolveSet</var> ) Concrete Method","number":"15.2.1.17.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"ResolveExport ( exportName, resolveSet ) Concrete Method"},{"type":"op","aoid":"InitializeEnvironment","refId":"sec-source-text-module-record-initialize-environment","location":"","referencingIds":[],"key":"InitializeEnvironment"},{"type":"clause","id":"sec-source-text-module-record-initialize-environment","aoid":"InitializeEnvironment","title":"InitializeEnvironment ( ) Concrete Method","titleHTML":"InitializeEnvironment ( ) Concrete Method","number":"15.2.1.17.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_4480","_ref_4506","_ref_4549"],"key":"InitializeEnvironment ( ) Concrete Method"},{"type":"op","aoid":"ExecuteModule","refId":"sec-source-text-module-record-execute-module","location":"","referencingIds":[],"key":"ExecuteModule"},{"type":"clause","id":"sec-source-text-module-record-execute-module","aoid":"ExecuteModule","title":"ExecuteModule ( ) Concrete Method","titleHTML":"ExecuteModule ( ) Concrete Method","number":"15.2.1.17.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_4482","_ref_4533"],"key":"ExecuteModule ( ) Concrete Method"},{"type":"clause","id":"sec-source-text-module-records","aoid":null,"title":"Source Text Module Records","titleHTML":"Source Text Module Records","number":"15.2.1.17","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Source Text Module Records"},{"type":"op","aoid":"HostResolveImportedModule","refId":"sec-hostresolveimportedmodule","location":"","referencingIds":[],"key":"HostResolveImportedModule"},{"type":"clause","id":"sec-hostresolveimportedmodule","aoid":"HostResolveImportedModule","title":"Runtime Semantics: HostResolveImportedModule ( referencingModule, specifier )","titleHTML":"Runtime Semantics: HostResolveImportedModule ( <var>referencingModule</var>, <var>specifier</var> )","number":"15.2.1.18","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_4499","_ref_4526","_ref_4540","_ref_4542","_ref_4601","_ref_4621","_ref_4625","_ref_4642","_ref_4676"],"key":"Runtime Semantics: HostResolveImportedModule ( referencingModule, specifier )"},{"type":"op","aoid":"GetModuleNamespace","refId":"sec-getmodulenamespace","location":"","referencingIds":[],"key":"GetModuleNamespace"},{"type":"clause","id":"sec-getmodulenamespace","aoid":"GetModuleNamespace","title":"Runtime Semantics: GetModuleNamespace ( module )","titleHTML":"Runtime Semantics: GetModuleNamespace ( <var>module</var> )","number":"15.2.1.19","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_4643"],"key":"Runtime Semantics: GetModuleNamespace ( module )"},{"type":"op","aoid":"TopLevelModuleEvaluationJob","refId":"sec-toplevelmoduleevaluationjob","location":"","referencingIds":[],"key":"TopLevelModuleEvaluationJob"},{"type":"clause","id":"sec-toplevelmoduleevaluationjob","aoid":"TopLevelModuleEvaluationJob","title":"Runtime Semantics: TopLevelModuleEvaluationJob ( sourceText, hostDefined )","titleHTML":"Runtime Semantics: TopLevelModuleEvaluationJob ( <var>sourceText</var>, <var>hostDefined</var> )","number":"15.2.1.20","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2208"],"key":"Runtime Semantics: TopLevelModuleEvaluationJob ( sourceText, hostDefined )"},{"type":"clause","id":"sec-module-semantics-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"15.2.1.21","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-module-semantics","aoid":null,"title":"Module Semantics","titleHTML":"Module Semantics","number":"15.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Module Semantics"},{"type":"production","id":"prod-ImportDeclaration","name":"ImportDeclaration","referencingIds":["_ref_13886","_ref_13911","_ref_13917","_ref_13923","_ref_13930","_ref_13939","_ref_13945","_ref_13965","_ref_13966","_ref_13978","_ref_13983","_ref_13992","_ref_14001","_ref_14025","_ref_14049","_ref_14050","_ref_14818"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ImportDeclaration"},{"type":"production","id":"prod-ImportClause","name":"ImportClause","referencingIds":["_ref_14026","_ref_14051","_ref_14053","_ref_14070","_ref_14073","_ref_14097"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ImportClause"},{"type":"production","id":"prod-ImportedDefaultBinding","name":"ImportedDefaultBinding","referencingIds":["_ref_14029","_ref_14032","_ref_14034","_ref_14055","_ref_14057","_ref_14059","_ref_14061","_ref_14075","_ref_14077","_ref_14079","_ref_14081"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ImportedDefaultBinding"},{"type":"production","id":"prod-NameSpaceImport","name":"NameSpaceImport","referencingIds":["_ref_14030","_ref_14033","_ref_14056","_ref_14058","_ref_14076","_ref_14078","_ref_14819"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"NameSpaceImport"},{"type":"production","id":"prod-NamedImports","name":"NamedImports","referencingIds":["_ref_14031","_ref_14035","_ref_14060","_ref_14062","_ref_14080","_ref_14082"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"NamedImports"},{"type":"production","id":"prod-FromClause","name":"FromClause","referencingIds":["_ref_14027","_ref_14052","_ref_14071","_ref_14072","_ref_14098","_ref_14099","_ref_14102","_ref_14104","_ref_14126","_ref_14128","_ref_14139","_ref_14141","_ref_14161","_ref_14163","_ref_14182","_ref_14183","_ref_14185","_ref_14186","_ref_14209","_ref_14211","_ref_14215","_ref_14217","_ref_14228","_ref_14230","_ref_14231","_ref_14247","_ref_14249"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"FromClause"},{"type":"production","id":"prod-ImportsList","name":"ImportsList","referencingIds":["_ref_14038","_ref_14039","_ref_14042","_ref_14063","_ref_14065","_ref_14087","_ref_14089"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ImportsList"},{"type":"production","id":"prod-ImportSpecifier","name":"ImportSpecifier","referencingIds":["_ref_14041","_ref_14043","_ref_14064","_ref_14066","_ref_14088","_ref_14090"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ImportSpecifier"},{"type":"production","id":"prod-ModuleSpecifier","name":"ModuleSpecifier","referencingIds":["_ref_13997","_ref_14000","_ref_14002","_ref_14005","_ref_14007","_ref_14014","_ref_14028","_ref_14040","_ref_14054","_ref_14074"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ModuleSpecifier"},{"type":"production","id":"prod-ImportedBinding","name":"ImportedBinding","referencingIds":["_ref_14036","_ref_14037","_ref_14044","_ref_14046","_ref_14068","_ref_14069","_ref_14083","_ref_14084","_ref_14085","_ref_14086","_ref_14091","_ref_14092","_ref_14094","_ref_14096"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ImportedBinding"},{"type":"clause","id":"sec-imports-static-semantics-early-errors","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"15.2.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: Early Errors"},{"type":"clause","id":"sec-imports-static-semantics-boundnames","aoid":null,"title":"Static Semantics: BoundNames","titleHTML":"Static Semantics: BoundNames","number":"15.2.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: BoundNames"},{"type":"clause","id":"sec-imports-static-semantics-importentries","aoid":null,"title":"Static Semantics: ImportEntries","titleHTML":"Static Semantics: ImportEntries","number":"15.2.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ImportEntries"},{"type":"clause","id":"sec-static-semantics-importentriesformodule","aoid":null,"title":"Static Semantics: ImportEntriesForModule","titleHTML":"Static Semantics: ImportEntriesForModule","number":"15.2.2.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ImportEntriesForModule"},{"type":"clause","id":"sec-imports-static-semantics-modulerequests","aoid":null,"title":"Static Semantics: ModuleRequests","titleHTML":"Static Semantics: ModuleRequests","number":"15.2.2.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ModuleRequests"},{"type":"clause","id":"sec-imports","aoid":null,"title":"Imports","titleHTML":"Imports","number":"15.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Imports"},{"type":"production","id":"prod-ExportDeclaration","name":"ExportDeclaration","referencingIds":["_ref_13336","_ref_13343","_ref_13887","_ref_13903","_ref_13912","_ref_13918","_ref_13924","_ref_13937","_ref_13938","_ref_13951","_ref_13967","_ref_13968","_ref_13970","_ref_13984","_ref_13985","_ref_13987","_ref_13993","_ref_13994","_ref_14003","_ref_14004","_ref_14006","_ref_14151","_ref_14227"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ExportDeclaration"},{"type":"production","id":"prod-ExportClause","name":"ExportClause","referencingIds":["_ref_14103","_ref_14105","_ref_14120","_ref_14122","_ref_14124","_ref_14127","_ref_14129","_ref_14140","_ref_14142","_ref_14143","_ref_14162","_ref_14164","_ref_14165","_ref_14184","_ref_14187","_ref_14188","_ref_14189","_ref_14210","_ref_14212","_ref_14216","_ref_14218","_ref_14229","_ref_14232","_ref_14248","_ref_14250"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ExportClause"},{"type":"production","id":"prod-ExportsList","name":"ExportsList","referencingIds":["_ref_14112","_ref_14113","_ref_14115","_ref_14152","_ref_14154","_ref_14173","_ref_14175","_ref_14199","_ref_14201","_ref_14238","_ref_14240"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ExportsList"},{"type":"production","id":"prod-ExportSpecifier","name":"ExportSpecifier","referencingIds":["_ref_14114","_ref_14116","_ref_14153","_ref_14155","_ref_14174","_ref_14176","_ref_14200","_ref_14202","_ref_14239","_ref_14241"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ExportSpecifier"},{"type":"clause","id":"sec-exports-static-semantics-early-errors","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"15.2.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: Early Errors"},{"type":"clause","id":"sec-exports-static-semantics-boundnames","aoid":null,"title":"Static Semantics: BoundNames","titleHTML":"Static Semantics: BoundNames","number":"15.2.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: BoundNames"},{"type":"clause","id":"sec-exports-static-semantics-exportedbindings","aoid":null,"title":"Static Semantics: ExportedBindings","titleHTML":"Static Semantics: ExportedBindings","number":"15.2.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ExportedBindings"},{"type":"clause","id":"sec-exports-static-semantics-exportednames","aoid":null,"title":"Static Semantics: ExportedNames","titleHTML":"Static Semantics: ExportedNames","number":"15.2.3.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ExportedNames"},{"type":"clause","id":"sec-exports-static-semantics-exportentries","aoid":null,"title":"Static Semantics: ExportEntries","titleHTML":"Static Semantics: ExportEntries","number":"15.2.3.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ExportEntries"},{"type":"clause","id":"sec-static-semantics-exportentriesformodule","aoid":null,"title":"Static Semantics: ExportEntriesForModule","titleHTML":"Static Semantics: ExportEntriesForModule","number":"15.2.3.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ExportEntriesForModule"},{"type":"clause","id":"sec-exports-static-semantics-isconstantdeclaration","aoid":null,"title":"Static Semantics: IsConstantDeclaration","titleHTML":"Static Semantics: IsConstantDeclaration","number":"15.2.3.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsConstantDeclaration"},{"type":"clause","id":"sec-exports-static-semantics-lexicallyscopeddeclarations","aoid":null,"title":"Static Semantics: LexicallyScopedDeclarations","titleHTML":"Static Semantics: LexicallyScopedDeclarations","number":"15.2.3.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: LexicallyScopedDeclarations"},{"type":"clause","id":"sec-exports-static-semantics-modulerequests","aoid":null,"title":"Static Semantics: ModuleRequests","titleHTML":"Static Semantics: ModuleRequests","number":"15.2.3.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ModuleRequests"},{"type":"clause","id":"sec-static-semantics-referencedbindings","aoid":null,"title":"Static Semantics: ReferencedBindings","titleHTML":"Static Semantics: ReferencedBindings","number":"15.2.3.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: ReferencedBindings"},{"type":"clause","id":"sec-exports-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"15.2.3.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_358"],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-exports","aoid":null,"title":"Exports","titleHTML":"Exports","number":"15.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_239"],"key":"Exports"},{"type":"clause","id":"sec-modules","aoid":null,"title":"Modules","titleHTML":"Modules","number":"15.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Modules"},{"type":"clause","id":"sec-ecmascript-language-scripts-and-modules","aoid":null,"title":"ECMAScript Language: Scripts and Modules","titleHTML":"ECMAScript Language: Scripts and Modules","number":"15","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"ECMAScript Language: Scripts and Modules"},{"type":"term","term":"early error","refId":"sec-error-handling-and-language-extensions","referencingIds":["_ref_888","_ref_890","_ref_932","_ref_933","_ref_934","_ref_935","_ref_936","_ref_2016","_ref_4063","_ref_4380","_ref_4383","_ref_4399","_ref_4400","_ref_4579","_ref_4580","_ref_4749","_ref_4751","_ref_4806","_ref_4807","_ref_4808","_ref_4809","_ref_5013","_ref_8618","_ref_8620","_ref_8622","_ref_8735","_ref_8737"],"id":"early-error","namespace":"https://tc39.github.io/ecma262/","location":"","key":"early error"},{"type":"op","aoid":"HostReportErrors","refId":"sec-host-report-errors","location":"","referencingIds":[],"key":"HostReportErrors"},{"type":"clause","id":"sec-host-report-errors","aoid":"HostReportErrors","title":"HostReportErrors ( errorList )","titleHTML":"HostReportErrors ( <var>errorList</var> )","number":"16.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2219","_ref_4440","_ref_4681"],"key":"HostReportErrors ( errorList )"},{"type":"clause","id":"sec-forbidden-extensions","aoid":null,"title":"Forbidden Extensions","titleHTML":"Forbidden Extensions","number":"16.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2","_ref_384","_ref_385"],"key":"Forbidden Extensions"},{"type":"clause","id":"sec-error-handling-and-language-extensions","aoid":null,"title":"Error Handling and Language Extensions","titleHTML":"Error Handling and Language Extensions","number":"16","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_13","_ref_412"],"key":"Error Handling and Language Extensions"},{"type":"clause","id":"sec-ecmascript-standard-built-in-objects","aoid":null,"title":"ECMAScript Standard Built-in Objects","titleHTML":"ECMAScript Standard Built-in Objects","number":"17","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_154"],"key":"ECMAScript Standard Built-in Objects"},{"type":"term","term":"global object","refId":"sec-global-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"global object"},{"type":"clause","id":"sec-value-properties-of-the-global-object-infinity","aoid":null,"title":"Infinity","titleHTML":"Infinity","number":"18.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Infinity"},{"type":"clause","id":"sec-value-properties-of-the-global-object-nan","aoid":null,"title":"NaN","titleHTML":"NaN","number":"18.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"NaN"},{"type":"clause","id":"sec-undefined","aoid":null,"title":"undefined","titleHTML":"undefined","number":"18.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"undefined"},{"type":"clause","id":"sec-value-properties-of-the-global-object","aoid":null,"title":"Value Properties of the Global Object","titleHTML":"Value Properties of the Global Object","number":"18.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Value Properties of the Global Object"},{"type":"term","term":"%eval%","refId":"sec-eval-x","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%eval%"},{"type":"clause","id":"sec-performeval-rules-outside-functions","aoid":null,"title":"Additional Early Error Rules for Eval Outside Functions","titleHTML":"Additional Early Error Rules for Eval Outside Functions","number":"18.2.1.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_409"],"key":"Additional Early Error Rules for Eval Outside Functions"},{"type":"clause","id":"sec-performeval-rules-outside-methods","aoid":null,"title":"Additional Early Error Rules for Eval Outside Methods","titleHTML":"Additional Early Error Rules for Eval Outside Methods","number":"18.2.1.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_410"],"key":"Additional Early Error Rules for Eval Outside Methods"},{"type":"clause","id":"sec-performeval-rules-outside-constructors","aoid":null,"title":"Additional Early Error Rules for Eval Outside Constructor Methods","titleHTML":"Additional Early Error Rules for Eval Outside Constructor Methods","number":"18.2.1.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_411"],"key":"Additional Early Error Rules for Eval Outside Constructor Methods"},{"type":"op","aoid":"PerformEval","refId":"sec-performeval","location":"","referencingIds":[],"key":"PerformEval"},{"type":"clause","id":"sec-performeval","aoid":"PerformEval","title":"Runtime Semantics: PerformEval ( x, evalRealm, strictCaller, direct )","titleHTML":"Runtime Semantics: PerformEval ( <var>x</var>, <var>evalRealm</var>, <var>strictCaller</var>, <var>direct</var> )","number":"18.2.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_360","_ref_361","_ref_3301","_ref_4800","_ref_4829","_ref_4832","_ref_4835"],"key":"Runtime Semantics: PerformEval ( x, evalRealm, strictCaller, direct )"},{"type":"op","aoid":"HostEnsureCanCompileStrings","refId":"sec-hostensurecancompilestrings","location":"","referencingIds":[],"key":"HostEnsureCanCompileStrings"},{"type":"clause","id":"sec-hostensurecancompilestrings","aoid":"HostEnsureCanCompileStrings","title":"HostEnsureCanCompileStrings ( callerRealm, calleeRealm )","titleHTML":"HostEnsureCanCompileStrings ( <var>callerRealm</var>, <var>calleeRealm</var> )","number":"18.2.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3300","_ref_4799","_ref_5004"],"key":"HostEnsureCanCompileStrings ( callerRealm, calleeRealm )"},{"type":"op","aoid":"EvalDeclarationInstantiation","refId":"sec-evaldeclarationinstantiation","location":"","referencingIds":[],"key":"EvalDeclarationInstantiation"},{"type":"clause","id":"sec-evaldeclarationinstantiation","aoid":"EvalDeclarationInstantiation","title":"Runtime Semantics: EvalDeclarationInstantiation ( body, varEnv, lexEnv, strict )","titleHTML":"Runtime Semantics: EvalDeclarationInstantiation ( <var>body</var>, <var>varEnv</var>, <var>lexEnv</var>, <var>strict</var> )","number":"18.2.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_760","_ref_831","_ref_4820","_ref_8751"],"key":"Runtime Semantics: EvalDeclarationInstantiation ( body, varEnv, lexEnv, strict )"},{"type":"clause","id":"sec-eval-x","aoid":null,"title":"eval ( x )","titleHTML":"eval ( <var>x</var> )","number":"18.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_73","_ref_752","_ref_790","_ref_1065","_ref_3297"],"key":"eval ( x )"},{"type":"term","term":"%isFinite%","refId":"sec-isfinite-number","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%isFinite%"},{"type":"clause","id":"sec-isfinite-number","aoid":null,"title":"isFinite ( number )","titleHTML":"isFinite ( <var>number</var> )","number":"18.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_82","_ref_1091"],"key":"isFinite ( number )"},{"type":"term","term":"%isNaN%","refId":"sec-isnan-number","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%isNaN%"},{"type":"clause","id":"sec-isnan-number","aoid":null,"title":"isNaN ( number )","titleHTML":"isNaN ( <var>number</var> )","number":"18.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_83","_ref_498","_ref_1092"],"key":"isNaN ( number )"},{"type":"term","term":"%parseFloat%","refId":"sec-parsefloat-string","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%parseFloat%"},{"type":"clause","id":"sec-parsefloat-string","aoid":null,"title":"parseFloat ( string )","titleHTML":"parseFloat ( <var>string</var> )","number":"18.2.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_93","_ref_499","_ref_1123"],"key":"parseFloat ( string )"},{"type":"term","term":"%parseInt%","refId":"sec-parseint-string-radix","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%parseInt%"},{"type":"clause","id":"sec-parseint-string-radix","aoid":null,"title":"parseInt ( string, radix )","titleHTML":"parseInt ( <var>string</var>, <var>radix</var> )","number":"18.2.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_94","_ref_500","_ref_1124"],"key":"parseInt ( string, radix )"},{"type":"production","id":"prod-uri","name":"uri","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"uri"},{"type":"production","id":"prod-uriCharacters","name":"uriCharacters","referencingIds":["_ref_14320","_ref_14322"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"uriCharacters"},{"type":"production","id":"prod-uriCharacter","name":"uriCharacter","referencingIds":["_ref_14321"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"uriCharacter"},{"type":"production","id":"prod-uriReserved","name":"uriReserved","referencingIds":["_ref_14323","_ref_14331","_ref_14332"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"uriReserved"},{"type":"production","id":"prod-uriUnescaped","name":"uriUnescaped","referencingIds":["_ref_14324","_ref_14333","_ref_14334"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"uriUnescaped"},{"type":"production","id":"prod-uriEscaped","name":"uriEscaped","referencingIds":["_ref_14325"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"uriEscaped"},{"type":"production","id":"prod-uriAlpha","name":"uriAlpha","referencingIds":["_ref_14326"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"uriAlpha"},{"type":"production","id":"prod-uriMark","name":"uriMark","referencingIds":["_ref_14328"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"uriMark"},{"type":"op","aoid":"Encode","refId":"sec-encode","location":"","referencingIds":[],"key":"Encode"},{"type":"clause","id":"sec-encode","aoid":"Encode","title":"Runtime Semantics: Encode ( string, unescapedSet )","titleHTML":"Runtime Semantics: Encode ( <var>string</var>, <var>unescapedSet</var> )","number":"18.2.6.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_4882","_ref_4884"],"key":"Runtime Semantics: Encode ( string, unescapedSet )"},{"type":"table","id":"table-43","number":46,"caption":"Table 46 (Informative): UTF-8 Encodings","referencingIds":["_ref_426"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 46 (Informative): UTF-8 Encodings"},{"type":"op","aoid":"Decode","refId":"sec-decode","location":"","referencingIds":[],"key":"Decode"},{"type":"clause","id":"sec-decode","aoid":"Decode","title":"Runtime Semantics: Decode ( string, reservedSet )","titleHTML":"Runtime Semantics: Decode ( <var>string</var>, <var>reservedSet</var> )","number":"18.2.6.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_4878","_ref_4880"],"key":"Runtime Semantics: Decode ( string, reservedSet )"},{"type":"clause","id":"sec-uri-syntax-and-semantics","aoid":null,"title":"URI Syntax and Semantics","titleHTML":"URI Syntax and Semantics","number":"18.2.6.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"URI Syntax and Semantics"},{"type":"term","term":"%decodeURI%","refId":"sec-decodeuri-encodeduri","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%decodeURI%"},{"type":"clause","id":"sec-decodeuri-encodeduri","aoid":null,"title":"decodeURI ( encodedURI )","titleHTML":"decodeURI ( <var>encodedURI</var> )","number":"18.2.6.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_68","_ref_418","_ref_1056"],"key":"decodeURI ( encodedURI )"},{"type":"term","term":"%decodeURIComponent%","refId":"sec-decodeuricomponent-encodeduricomponent","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%decodeURIComponent%"},{"type":"clause","id":"sec-decodeuricomponent-encodeduricomponent","aoid":null,"title":"decodeURIComponent ( encodedURIComponent )","titleHTML":"decodeURIComponent ( <var>encodedURIComponent</var> )","number":"18.2.6.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_69","_ref_419","_ref_1057"],"key":"decodeURIComponent ( encodedURIComponent )"},{"type":"term","term":"%encodeURI%","refId":"sec-encodeuri-uri","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%encodeURI%"},{"type":"clause","id":"sec-encodeuri-uri","aoid":null,"title":"encodeURI ( uri )","titleHTML":"encodeURI ( <var>uri</var> )","number":"18.2.6.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_70","_ref_420","_ref_1058"],"key":"encodeURI ( uri )"},{"type":"term","term":"%encodeURIComponent%","refId":"sec-encodeuricomponent-uricomponent","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%encodeURIComponent%"},{"type":"clause","id":"sec-encodeuricomponent-uricomponent","aoid":null,"title":"encodeURIComponent ( uriComponent )","titleHTML":"encodeURIComponent ( <var>uriComponent</var> )","number":"18.2.6.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_71","_ref_421","_ref_1059"],"key":"encodeURIComponent ( uriComponent )"},{"type":"clause","id":"sec-uri-handling-functions","aoid":null,"title":"URI Handling Functions","titleHTML":"URI Handling Functions","number":"18.2.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"URI Handling Functions"},{"type":"clause","id":"sec-function-properties-of-the-global-object","aoid":null,"title":"Function Properties of the Global Object","titleHTML":"Function Properties of the Global Object","number":"18.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_174"],"key":"Function Properties of the Global Object"},{"type":"clause","id":"sec-constructor-properties-of-the-global-object-array","aoid":null,"title":"Array ( . . . )","titleHTML":"Array ( . . . )","number":"18.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Array ( . . . )"},{"type":"clause","id":"sec-constructor-properties-of-the-global-object-arraybuffer","aoid":null,"title":"ArrayBuffer ( . . . )","titleHTML":"ArrayBuffer ( . . . )","number":"18.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"ArrayBuffer ( . . . )"},{"type":"clause","id":"sec-constructor-properties-of-the-global-object-boolean","aoid":null,"title":"Boolean ( . . . )","titleHTML":"Boolean ( . . . )","number":"18.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Boolean ( . . . )"},{"type":"clause","id":"sec-constructor-properties-of-the-global-object-dataview","aoid":null,"title":"DataView ( . . . )","titleHTML":"DataView ( . . . )","number":"18.3.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"DataView ( . . . )"},{"type":"clause","id":"sec-constructor-properties-of-the-global-object-date","aoid":null,"title":"Date ( . . . )","titleHTML":"Date ( . . . )","number":"18.3.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date ( . . . )"},{"type":"clause","id":"sec-constructor-properties-of-the-global-object-error","aoid":null,"title":"Error ( . . . )","titleHTML":"Error ( . . . )","number":"18.3.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Error ( . . . )"},{"type":"clause","id":"sec-constructor-properties-of-the-global-object-evalerror","aoid":null,"title":"EvalError ( . . . )","titleHTML":"EvalError ( . . . )","number":"18.3.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"EvalError ( . . . )"},{"type":"clause","id":"sec-float32array","aoid":null,"title":"Float32Array ( . . . )","titleHTML":"Float32Array ( . . . )","number":"18.3.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Float32Array ( . . . )"},{"type":"clause","id":"sec-float64array","aoid":null,"title":"Float64Array ( . . . )","titleHTML":"Float64Array ( . . . )","number":"18.3.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Float64Array ( . . . )"},{"type":"clause","id":"sec-constructor-properties-of-the-global-object-function","aoid":null,"title":"Function ( . . . )","titleHTML":"Function ( . . . )","number":"18.3.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Function ( . . . )"},{"type":"clause","id":"sec-int8array","aoid":null,"title":"Int8Array ( . . . )","titleHTML":"Int8Array ( . . . )","number":"18.3.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Int8Array ( . . . )"},{"type":"clause","id":"sec-int16array","aoid":null,"title":"Int16Array ( . . . )","titleHTML":"Int16Array ( . . . )","number":"18.3.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Int16Array ( . . . )"},{"type":"clause","id":"sec-int32array","aoid":null,"title":"Int32Array ( . . . )","titleHTML":"Int32Array ( . . . )","number":"18.3.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Int32Array ( . . . )"},{"type":"clause","id":"sec-map","aoid":null,"title":"Map ( . . . )","titleHTML":"Map ( . . . )","number":"18.3.14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Map ( . . . )"},{"type":"clause","id":"sec-constructor-properties-of-the-global-object-number","aoid":null,"title":"Number ( . . . )","titleHTML":"Number ( . . . )","number":"18.3.15","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Number ( . . . )"},{"type":"clause","id":"sec-constructor-properties-of-the-global-object-object","aoid":null,"title":"Object ( . . . )","titleHTML":"Object ( . . . )","number":"18.3.16","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Object ( . . . )"},{"type":"clause","id":"sec-constructor-properties-of-the-global-object-promise","aoid":null,"title":"Promise ( . . . )","titleHTML":"Promise ( . . . )","number":"18.3.17","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Promise ( . . . )"},{"type":"clause","id":"sec-constructor-properties-of-the-global-object-proxy","aoid":null,"title":"Proxy ( . . . )","titleHTML":"Proxy ( . . . )","number":"18.3.18","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Proxy ( . . . )"},{"type":"clause","id":"sec-constructor-properties-of-the-global-object-rangeerror","aoid":null,"title":"RangeError ( . . . )","titleHTML":"RangeError ( . . . )","number":"18.3.19","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"RangeError ( . . . )"},{"type":"clause","id":"sec-constructor-properties-of-the-global-object-referenceerror","aoid":null,"title":"ReferenceError ( . . . )","titleHTML":"ReferenceError ( . . . )","number":"18.3.20","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"ReferenceError ( . . . )"},{"type":"clause","id":"sec-constructor-properties-of-the-global-object-regexp","aoid":null,"title":"RegExp ( . . . )","titleHTML":"RegExp ( . . . )","number":"18.3.21","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"RegExp ( . . . )"},{"type":"clause","id":"sec-set","aoid":null,"title":"Set ( . . . )","titleHTML":"Set ( . . . )","number":"18.3.22","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Set ( . . . )"},{"type":"clause","id":"sec-constructor-properties-of-the-global-object-sharedarraybuffer","aoid":null,"title":"SharedArrayBuffer ( . . . )","titleHTML":"SharedArrayBuffer ( . . . )","number":"18.3.23","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"SharedArrayBuffer ( . . . )"},{"type":"clause","id":"sec-constructor-properties-of-the-global-object-string","aoid":null,"title":"String ( . . . )","titleHTML":"String ( . . . )","number":"18.3.24","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String ( . . . )"},{"type":"clause","id":"sec-constructor-properties-of-the-global-object-symbol","aoid":null,"title":"Symbol ( . . . )","titleHTML":"Symbol ( . . . )","number":"18.3.25","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Symbol ( . . . )"},{"type":"clause","id":"sec-constructor-properties-of-the-global-object-syntaxerror","aoid":null,"title":"SyntaxError ( . . . )","titleHTML":"SyntaxError ( . . . )","number":"18.3.26","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"SyntaxError ( . . . )"},{"type":"clause","id":"sec-constructor-properties-of-the-global-object-typeerror","aoid":null,"title":"TypeError ( . . . )","titleHTML":"TypeError ( . . . )","number":"18.3.27","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"TypeError ( . . . )"},{"type":"clause","id":"sec-uint8array","aoid":null,"title":"Uint8Array ( . . . )","titleHTML":"Uint8Array ( . . . )","number":"18.3.28","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Uint8Array ( . . . )"},{"type":"clause","id":"sec-uint8clampedarray","aoid":null,"title":"Uint8ClampedArray ( . . . )","titleHTML":"Uint8ClampedArray ( . . . )","number":"18.3.29","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Uint8ClampedArray ( . . . )"},{"type":"clause","id":"sec-uint16array","aoid":null,"title":"Uint16Array ( . . . )","titleHTML":"Uint16Array ( . . . )","number":"18.3.30","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Uint16Array ( . . . )"},{"type":"clause","id":"sec-uint32array","aoid":null,"title":"Uint32Array ( . . . )","titleHTML":"Uint32Array ( . . . )","number":"18.3.31","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Uint32Array ( . . . )"},{"type":"clause","id":"sec-constructor-properties-of-the-global-object-urierror","aoid":null,"title":"URIError ( . . . )","titleHTML":"URIError ( . . . )","number":"18.3.32","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"URIError ( . . . )"},{"type":"clause","id":"sec-constructor-properties-of-the-global-object-weakmap","aoid":null,"title":"WeakMap ( . . . )","titleHTML":"WeakMap ( . . . )","number":"18.3.33","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"WeakMap ( . . . )"},{"type":"clause","id":"sec-constructor-properties-of-the-global-object-weakset","aoid":null,"title":"WeakSet ( . . . )","titleHTML":"WeakSet ( . . . )","number":"18.3.34","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"WeakSet ( . . . )"},{"type":"clause","id":"sec-constructor-properties-of-the-global-object","aoid":null,"title":"Constructor Properties of the Global Object","titleHTML":"Constructor Properties of the Global Object","number":"18.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_175"],"key":"Constructor Properties of the Global Object"},{"type":"clause","id":"sec-atomics","aoid":null,"title":"Atomics","titleHTML":"Atomics","number":"18.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Atomics"},{"type":"clause","id":"sec-json","aoid":null,"title":"JSON","titleHTML":"JSON","number":"18.4.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"JSON"},{"type":"clause","id":"sec-math","aoid":null,"title":"Math","titleHTML":"Math","number":"18.4.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math"},{"type":"clause","id":"sec-reflect","aoid":null,"title":"Reflect","titleHTML":"Reflect","number":"18.4.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Reflect"},{"type":"clause","id":"sec-other-properties-of-the-global-object","aoid":null,"title":"Other Properties of the Global Object","titleHTML":"Other Properties of the Global Object","number":"18.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_176"],"key":"Other Properties of the Global Object"},{"type":"clause","id":"sec-global-object","aoid":null,"title":"The Global Object","titleHTML":"The Global Object","number":"18","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_160","_ref_163","_ref_173","_ref_857","_ref_1806","_ref_1808","_ref_1914","_ref_1919","_ref_1921","_ref_1927","_ref_1930","_ref_1933","_ref_1942","_ref_1944","_ref_1946","_ref_1971","_ref_1973","_ref_1974","_ref_1976","_ref_1999","_ref_2066","_ref_2158","_ref_2196","_ref_2197","_ref_2198","_ref_2199","_ref_2202","_ref_2421","_ref_4428","_ref_4429","_ref_4433","_ref_4435","_ref_4767","_ref_4768","_ref_4851","_ref_4886","_ref_4990","_ref_5042","_ref_5061","_ref_5079","_ref_5097","_ref_5134","_ref_5171","_ref_5188","_ref_5191","_ref_5231","_ref_5406","_ref_5753","_ref_6085","_ref_6317","_ref_6822","_ref_7149","_ref_7235","_ref_7297","_ref_7331","_ref_7435","_ref_7481","_ref_7524","_ref_7566","_ref_7714","_ref_8155","_ref_8339","_ref_8373","_ref_8593","_ref_8601","_ref_8608","_ref_8645","_ref_8650"],"key":"The Global Object"},{"type":"term","term":"%Object%","refId":"sec-object-constructor","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%Object%"},{"type":"clause","id":"sec-object-value","aoid":null,"title":"Object ( [ value ] )","titleHTML":"Object ( [ <var>value</var> ] )","number":"19.1.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Object ( [ value ] )"},{"type":"clause","id":"sec-object-constructor","aoid":null,"title":"The Object Constructor","titleHTML":"The Object Constructor","number":"19.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_89","_ref_445","_ref_1112","_ref_1116","_ref_4972"],"key":"The Object Constructor"},{"type":"clause","id":"sec-object.assign","aoid":null,"title":"Object.assign ( target, ...sources )","titleHTML":"Object.assign ( <var>target</var>, ...<var>sources</var> )","number":"19.1.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Object.assign ( target, ...sources )"},{"type":"clause","id":"sec-object.create","aoid":null,"title":"Object.create ( O, Properties )","titleHTML":"Object.create ( <var>O</var>, <var>Properties</var> )","number":"19.1.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Object.create ( O, Properties )"},{"type":"op","aoid":"ObjectDefineProperties","refId":"sec-objectdefineproperties","location":"","referencingIds":[],"key":"ObjectDefineProperties"},{"type":"clause","id":"sec-objectdefineproperties","aoid":"ObjectDefineProperties","title":"Runtime Semantics: ObjectDefineProperties ( O, Properties )","titleHTML":"Runtime Semantics: ObjectDefineProperties ( <var>O</var>, <var>Properties</var> )","number":"19.1.2.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_4904","_ref_4905"],"key":"Runtime Semantics: ObjectDefineProperties ( O, Properties )"},{"type":"clause","id":"sec-object.defineproperties","aoid":null,"title":"Object.defineProperties ( O, Properties )","titleHTML":"Object.defineProperties ( <var>O</var>, <var>Properties</var> )","number":"19.1.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Object.defineProperties ( O, Properties )"},{"type":"clause","id":"sec-object.defineproperty","aoid":null,"title":"Object.defineProperty ( O, P, Attributes )","titleHTML":"Object.defineProperty ( <var>O</var>, <var>P</var>, <var>Attributes</var> )","number":"19.1.2.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Object.defineProperty ( O, P, Attributes )"},{"type":"clause","id":"sec-object.entries","aoid":null,"title":"Object.entries ( O )","titleHTML":"Object.entries ( <var>O</var> )","number":"19.1.2.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Object.entries ( O )"},{"type":"clause","id":"sec-object.freeze","aoid":null,"title":"Object.freeze ( O )","titleHTML":"Object.freeze ( <var>O</var> )","number":"19.1.2.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_834"],"key":"Object.freeze ( O )"},{"type":"clause","id":"sec-create-data-property-on-object-functions","aoid":null,"title":"CreateDataPropertyOnObject Functions","titleHTML":"CreateDataPropertyOnObject Functions","number":"19.1.2.7.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_468"],"key":"CreateDataPropertyOnObject Functions"},{"type":"clause","id":"sec-object.fromentries","aoid":null,"title":"Object.fromEntries ( iterable )","titleHTML":"Object.fromEntries ( <var>iterable</var> )","number":"19.1.2.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Object.fromEntries ( iterable )"},{"type":"clause","id":"sec-object.getownpropertydescriptor","aoid":null,"title":"Object.getOwnPropertyDescriptor ( O, P )","titleHTML":"Object.getOwnPropertyDescriptor ( <var>O</var>, <var>P</var> )","number":"19.1.2.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_835"],"key":"Object.getOwnPropertyDescriptor ( O, P )"},{"type":"clause","id":"sec-object.getownpropertydescriptors","aoid":null,"title":"Object.getOwnPropertyDescriptors ( O )","titleHTML":"Object.getOwnPropertyDescriptors ( <var>O</var> )","number":"19.1.2.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Object.getOwnPropertyDescriptors ( O )"},{"type":"clause","id":"sec-object.getownpropertynames","aoid":null,"title":"Object.getOwnPropertyNames ( O )","titleHTML":"Object.getOwnPropertyNames ( <var>O</var> )","number":"19.1.2.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_836"],"key":"Object.getOwnPropertyNames ( O )"},{"type":"op","aoid":"GetOwnPropertyKeys","refId":"sec-getownpropertykeys","location":"","referencingIds":[],"key":"GetOwnPropertyKeys"},{"type":"clause","id":"sec-getownpropertykeys","aoid":"GetOwnPropertyKeys","title":"Runtime Semantics: GetOwnPropertyKeys ( O, type )","titleHTML":"Runtime Semantics: GetOwnPropertyKeys ( <var>O</var>, <var>type</var> )","number":"19.1.2.11.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_4943","_ref_4944"],"key":"Runtime Semantics: GetOwnPropertyKeys ( O, type )"},{"type":"clause","id":"sec-object.getownpropertysymbols","aoid":null,"title":"Object.getOwnPropertySymbols ( O )","titleHTML":"Object.getOwnPropertySymbols ( <var>O</var> )","number":"19.1.2.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Object.getOwnPropertySymbols ( O )"},{"type":"clause","id":"sec-object.getprototypeof","aoid":null,"title":"Object.getPrototypeOf ( O )","titleHTML":"Object.getPrototypeOf ( <var>O</var> )","number":"19.1.2.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_837"],"key":"Object.getPrototypeOf ( O )"},{"type":"clause","id":"sec-object.is","aoid":null,"title":"Object.is ( value1, value2 )","titleHTML":"Object.is ( <var>value1</var>, <var>value2</var> )","number":"19.1.2.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Object.is ( value1, value2 )"},{"type":"clause","id":"sec-object.isextensible","aoid":null,"title":"Object.isExtensible ( O )","titleHTML":"Object.isExtensible ( <var>O</var> )","number":"19.1.2.14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_838"],"key":"Object.isExtensible ( O )"},{"type":"clause","id":"sec-object.isfrozen","aoid":null,"title":"Object.isFrozen ( O )","titleHTML":"Object.isFrozen ( <var>O</var> )","number":"19.1.2.15","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_839"],"key":"Object.isFrozen ( O )"},{"type":"clause","id":"sec-object.issealed","aoid":null,"title":"Object.isSealed ( O )","titleHTML":"Object.isSealed ( <var>O</var> )","number":"19.1.2.16","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_840"],"key":"Object.isSealed ( O )"},{"type":"clause","id":"sec-object.keys","aoid":null,"title":"Object.keys ( O )","titleHTML":"Object.keys ( <var>O</var> )","number":"19.1.2.17","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_841"],"key":"Object.keys ( O )"},{"type":"clause","id":"sec-object.preventextensions","aoid":null,"title":"Object.preventExtensions ( O )","titleHTML":"Object.preventExtensions ( <var>O</var> )","number":"19.1.2.18","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_842"],"key":"Object.preventExtensions ( O )"},{"type":"clause","id":"sec-object.prototype","aoid":null,"title":"Object.prototype","titleHTML":"Object.prototype","number":"19.1.2.19","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Object.prototype"},{"type":"clause","id":"sec-object.seal","aoid":null,"title":"Object.seal ( O )","titleHTML":"Object.seal ( <var>O</var> )","number":"19.1.2.20","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_843"],"key":"Object.seal ( O )"},{"type":"clause","id":"sec-object.setprototypeof","aoid":null,"title":"Object.setPrototypeOf ( O, proto )","titleHTML":"Object.setPrototypeOf ( <var>O</var>, <var>proto</var> )","number":"19.1.2.21","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Object.setPrototypeOf ( O, proto )"},{"type":"clause","id":"sec-object.values","aoid":null,"title":"Object.values ( O )","titleHTML":"Object.values ( <var>O</var> )","number":"19.1.2.22","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Object.values ( O )"},{"type":"clause","id":"sec-properties-of-the-object-constructor","aoid":null,"title":"Properties of the Object Constructor","titleHTML":"Properties of the Object Constructor","number":"19.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of the Object Constructor"},{"type":"term","term":"%ObjectPrototype%","refId":"sec-properties-of-the-object-prototype-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%ObjectPrototype%"},{"type":"clause","id":"sec-object.prototype.constructor","aoid":null,"title":"Object.prototype.constructor","titleHTML":"Object.prototype.constructor","number":"19.1.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Object.prototype.constructor"},{"type":"clause","id":"sec-object.prototype.hasownproperty","aoid":null,"title":"Object.prototype.hasOwnProperty ( V )","titleHTML":"Object.prototype.hasOwnProperty ( <var>V</var> )","number":"19.1.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Object.prototype.hasOwnProperty ( V )"},{"type":"clause","id":"sec-object.prototype.isprototypeof","aoid":null,"title":"Object.prototype.isPrototypeOf ( V )","titleHTML":"Object.prototype.isPrototypeOf ( <var>V</var> )","number":"19.1.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Object.prototype.isPrototypeOf ( V )"},{"type":"clause","id":"sec-object.prototype.propertyisenumerable","aoid":null,"title":"Object.prototype.propertyIsEnumerable ( V )","titleHTML":"Object.prototype.propertyIsEnumerable ( <var>V</var> )","number":"19.1.3.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Object.prototype.propertyIsEnumerable ( V )"},{"type":"clause","id":"sec-object.prototype.tolocalestring","aoid":null,"title":"Object.prototype.toLocaleString ( [ reserved1 [ , reserved2 ] ] )","titleHTML":"Object.prototype.toLocaleString ( [ <var>reserved1</var> [ , <var>reserved2</var> ] ] )","number":"19.1.3.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Object.prototype.toLocaleString ( [ reserved1 [ , reserved2 ] ] )"},{"type":"term","term":"%ObjProto_toString%","refId":"sec-object.prototype.tostring","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%ObjProto_toString%"},{"type":"clause","id":"sec-object.prototype.tostring","aoid":null,"title":"Object.prototype.toString ( )","titleHTML":"Object.prototype.toString ( )","number":"19.1.3.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_32","_ref_91","_ref_216","_ref_497","_ref_1117","_ref_6749"],"key":"Object.prototype.toString ( )"},{"type":"term","term":"%ObjProto_valueOf%","refId":"sec-object.prototype.valueof","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%ObjProto_valueOf%"},{"type":"clause","id":"sec-object.prototype.valueof","aoid":null,"title":"Object.prototype.valueOf ( )","titleHTML":"Object.prototype.valueOf ( )","number":"19.1.3.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_92","_ref_1120"],"key":"Object.prototype.valueOf ( )"},{"type":"clause","id":"sec-properties-of-the-object-prototype-object","aoid":null,"title":"Properties of the Object Prototype Object","titleHTML":"Properties of the Object Prototype Object","number":"19.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_90","_ref_401","_ref_1114","_ref_1119","_ref_1122","_ref_1353","_ref_1789","_ref_2084","_ref_2093","_ref_2536","_ref_2786","_ref_2800","_ref_3199","_ref_3201","_ref_3577","_ref_3707","_ref_4261","_ref_4891","_ref_4925","_ref_4939","_ref_4962","_ref_5034","_ref_5088","_ref_5116","_ref_5144","_ref_5193","_ref_5232","_ref_5471","_ref_5791","_ref_6118","_ref_6394","_ref_6865","_ref_7180","_ref_7255","_ref_7307","_ref_7347","_ref_7447","_ref_7490","_ref_7536","_ref_7567","_ref_7715","_ref_7722","_ref_7764","_ref_7818","_ref_7819","_ref_8248","_ref_8340","_ref_8382"],"key":"Properties of the Object Prototype Object"},{"type":"clause","id":"sec-properties-of-object-instances","aoid":null,"title":"Properties of Object Instances","titleHTML":"Properties of Object Instances","number":"19.1.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of Object Instances"},{"type":"clause","id":"sec-object-objects","aoid":null,"title":"Object Objects","titleHTML":"Object Objects","number":"19.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Object Objects"},{"type":"term","term":"%Function%","refId":"sec-function-constructor","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%Function%"},{"type":"table","id":"table-dynamic-function-sourcetext-prefixes","number":47,"caption":"Table 47: Dynamic Function SourceText Prefixes","referencingIds":["_ref_471"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 47: Dynamic Function SourceText Prefixes"},{"type":"op","aoid":"CreateDynamicFunction","refId":"sec-createdynamicfunction","location":"","referencingIds":[],"key":"CreateDynamicFunction"},{"type":"clause","id":"sec-createdynamicfunction","aoid":"CreateDynamicFunction","title":"Runtime Semantics: CreateDynamicFunction ( constructor, newTarget, kind, args )","titleHTML":"Runtime Semantics: CreateDynamicFunction ( <var>constructor</var>, <var>newTarget</var>, <var>kind</var>, <var>args</var> )","number":"19.2.1.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_799","_ref_4995","_ref_7879","_ref_7898","_ref_8309"],"key":"Runtime Semantics: CreateDynamicFunction ( constructor, newTarget, kind, args )"},{"type":"clause","id":"sec-function-p1-p2-pn-body","aoid":null,"title":"Function ( p1, p2, … , pn, body )","titleHTML":"Function ( <var>p1</var>, <var>p2</var>, … , <var>pn</var>, <var>body</var> )","number":"19.2.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_262","_ref_690","_ref_696","_ref_716"],"key":"Function ( p1, p2, … , pn, body )"},{"type":"clause","id":"sec-function-constructor","aoid":null,"title":"The Function Constructor","titleHTML":"The Function Constructor","number":"19.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_77","_ref_439","_ref_1072","_ref_1076","_ref_5064","_ref_7883","_ref_7902","_ref_8313"],"key":"The Function Constructor"},{"type":"clause","id":"sec-function.length","aoid":null,"title":"Function.length","titleHTML":"Function.length","number":"19.2.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Function.length"},{"type":"clause","id":"sec-function.prototype","aoid":null,"title":"Function.prototype","titleHTML":"Function.prototype","number":"19.2.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Function.prototype"},{"type":"clause","id":"sec-properties-of-the-function-constructor","aoid":null,"title":"Properties of the Function Constructor","titleHTML":"Properties of the Function Constructor","number":"19.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of the Function Constructor"},{"type":"term","term":"%FunctionPrototype%","refId":"sec-properties-of-the-function-prototype-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%FunctionPrototype%"},{"type":"clause","id":"sec-function.prototype.apply","aoid":null,"title":"Function.prototype.apply ( thisArg, argArray )","titleHTML":"Function.prototype.apply ( <var>thisArg</var>, <var>argArray</var> )","number":"19.2.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_792"],"key":"Function.prototype.apply ( thisArg, argArray )"},{"type":"clause","id":"sec-function.prototype.bind","aoid":null,"title":"Function.prototype.bind ( thisArg, ...args )","titleHTML":"Function.prototype.bind ( <var>thisArg</var>, ...<var>args</var> )","number":"19.2.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_476","_ref_844"],"key":"Function.prototype.bind ( thisArg, ...args )"},{"type":"clause","id":"sec-function.prototype.call","aoid":null,"title":"Function.prototype.call ( thisArg, ...args )","titleHTML":"Function.prototype.call ( <var>thisArg</var>, ...<var>args</var> )","number":"19.2.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_793"],"key":"Function.prototype.call ( thisArg, ...args )"},{"type":"clause","id":"sec-function.prototype.constructor","aoid":null,"title":"Function.prototype.constructor","titleHTML":"Function.prototype.constructor","number":"19.2.3.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Function.prototype.constructor"},{"type":"production","id":"prod-NativeFunction","name":"NativeFunction","referencingIds":["_ref_14350","_ref_14352"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"NativeFunction"},{"type":"clause","id":"sec-function.prototype.tostring","aoid":null,"title":"Function.prototype.toString ( )","titleHTML":"Function.prototype.toString ( )","number":"19.2.3.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Function.prototype.toString ( )"},{"type":"clause","id":"sec-function.prototype-@@hasinstance","aoid":null,"title":"Function.prototype [ @@hasInstance ] ( V )","titleHTML":"Function.prototype [ @@hasInstance ] ( <var>V</var> )","number":"19.2.3.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Function.prototype [ @@hasInstance ] ( V )"},{"type":"clause","id":"sec-properties-of-the-function-prototype-object","aoid":null,"title":"Properties of the Function Prototype Object","titleHTML":"Properties of the Function Prototype Object","number":"19.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_400","_ref_1074","_ref_2089","_ref_2499","_ref_2597","_ref_2622","_ref_4091","_ref_4262","_ref_4266","_ref_4895","_ref_5029","_ref_5031","_ref_5075","_ref_5086","_ref_5100","_ref_5142","_ref_5178","_ref_5449","_ref_5763","_ref_6113","_ref_6349","_ref_6829","_ref_7174","_ref_7249","_ref_7305","_ref_7345","_ref_7441","_ref_7487","_ref_7534","_ref_7888","_ref_7907","_ref_8170","_ref_8318","_ref_8378","_ref_8629"],"key":"Properties of the Function Prototype Object"},{"type":"clause","id":"sec-function-instances-length","aoid":null,"title":"length","titleHTML":"length","number":"19.2.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_694","_ref_719","_ref_845"],"key":"length"},{"type":"clause","id":"sec-function-instances-name","aoid":null,"title":"name","titleHTML":"name","number":"19.2.4.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_695","_ref_700","_ref_720"],"key":"name"},{"type":"clause","id":"sec-function-instances-prototype","aoid":null,"title":"prototype","titleHTML":"prototype","number":"19.2.4.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"prototype"},{"type":"clause","id":"sec-function-instances","aoid":null,"title":"Function Instances","titleHTML":"Function Instances","number":"19.2.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Function Instances"},{"type":"clause","id":"sec-hosthassourcetextavailable","aoid":null,"title":"HostHasSourceTextAvailable ( func )","titleHTML":"HostHasSourceTextAvailable ( <var>func</var> )","number":"19.2.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"HostHasSourceTextAvailable ( func )"},{"type":"clause","id":"sec-function-objects","aoid":null,"title":"Function Objects","titleHTML":"Function Objects","number":"19.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Function Objects"},{"type":"term","term":"%Boolean%","refId":"sec-boolean-constructor","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%Boolean%"},{"type":"clause","id":"sec-boolean-constructor-boolean-value","aoid":null,"title":"Boolean ( value )","titleHTML":"Boolean ( <var>value</var> )","number":"19.3.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Boolean ( value )"},{"type":"clause","id":"sec-boolean-constructor","aoid":null,"title":"The Boolean Constructor","titleHTML":"The Boolean Constructor","number":"19.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_64","_ref_432","_ref_1041","_ref_1045","_ref_5093"],"key":"The Boolean Constructor"},{"type":"clause","id":"sec-boolean.prototype","aoid":null,"title":"Boolean.prototype","titleHTML":"Boolean.prototype","number":"19.3.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Boolean.prototype"},{"type":"clause","id":"sec-properties-of-the-boolean-constructor","aoid":null,"title":"Properties of the Boolean Constructor","titleHTML":"Properties of the Boolean Constructor","number":"19.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of the Boolean Constructor"},{"type":"term","term":"%BooleanPrototype%","refId":"sec-properties-of-the-boolean-prototype-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%BooleanPrototype%"},{"type":"term","term":"thisBooleanValue","refId":"sec-properties-of-the-boolean-prototype-object","referencingIds":["_ref_5094","_ref_5095"],"id":"sec-thisbooleanvalue","namespace":"https://tc39.github.io/ecma262/","location":"","key":"thisBooleanValue"},{"type":"clause","id":"sec-boolean.prototype.constructor","aoid":null,"title":"Boolean.prototype.constructor","titleHTML":"Boolean.prototype.constructor","number":"19.3.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Boolean.prototype.constructor"},{"type":"clause","id":"sec-boolean.prototype.tostring","aoid":null,"title":"Boolean.prototype.toString ( )","titleHTML":"Boolean.prototype.toString ( )","number":"19.3.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Boolean.prototype.toString ( )"},{"type":"clause","id":"sec-boolean.prototype.valueof","aoid":null,"title":"Boolean.prototype.valueOf ( )","titleHTML":"Boolean.prototype.valueOf ( )","number":"19.3.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Boolean.prototype.valueOf ( )"},{"type":"clause","id":"sec-properties-of-the-boolean-prototype-object","aoid":null,"title":"Properties of the Boolean Prototype Object","titleHTML":"Properties of the Boolean Prototype Object","number":"19.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_65","_ref_1043","_ref_5087"],"key":"Properties of the Boolean Prototype Object"},{"type":"clause","id":"sec-properties-of-boolean-instances","aoid":null,"title":"Properties of Boolean Instances","titleHTML":"Properties of Boolean Instances","number":"19.3.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of Boolean Instances"},{"type":"clause","id":"sec-boolean-objects","aoid":null,"title":"Boolean Objects","titleHTML":"Boolean Objects","number":"19.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_145"],"key":"Boolean Objects"},{"type":"term","term":"%Symbol%","refId":"sec-symbol-constructor","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%Symbol%"},{"type":"clause","id":"sec-symbol-description","aoid":null,"title":"Symbol ( [ description ] )","titleHTML":"Symbol ( [ <var>description</var> ] )","number":"19.4.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Symbol ( [ description ] )"},{"type":"clause","id":"sec-symbol-constructor","aoid":null,"title":"The Symbol Constructor","titleHTML":"The Symbol Constructor","number":"19.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_110","_ref_454","_ref_1171","_ref_1175","_ref_5121"],"key":"The Symbol Constructor"},{"type":"clause","id":"sec-symbol.asynciterator","aoid":null,"title":"Symbol.asyncIterator","titleHTML":"Symbol.asyncIterator","number":"19.4.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Symbol.asyncIterator"},{"type":"table","id":"table-44","number":48,"caption":"Table 48: GlobalSymbolRegistry Record Fields","referencingIds":["_ref_479"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 48: GlobalSymbolRegistry Record Fields"},{"type":"clause","id":"sec-symbol.for","aoid":null,"title":"Symbol.for ( key )","titleHTML":"Symbol.for ( <var>key</var> )","number":"19.4.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_483"],"key":"Symbol.for ( key )"},{"type":"clause","id":"sec-symbol.hasinstance","aoid":null,"title":"Symbol.hasInstance","titleHTML":"Symbol.hasInstance","number":"19.4.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Symbol.hasInstance"},{"type":"clause","id":"sec-symbol.isconcatspreadable","aoid":null,"title":"Symbol.isConcatSpreadable","titleHTML":"Symbol.isConcatSpreadable","number":"19.4.2.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Symbol.isConcatSpreadable"},{"type":"clause","id":"sec-symbol.iterator","aoid":null,"title":"Symbol.iterator","titleHTML":"Symbol.iterator","number":"19.4.2.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Symbol.iterator"},{"type":"clause","id":"sec-symbol.keyfor","aoid":null,"title":"Symbol.keyFor ( sym )","titleHTML":"Symbol.keyFor ( <var>sym</var> )","number":"19.4.2.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Symbol.keyFor ( sym )"},{"type":"clause","id":"sec-symbol.match","aoid":null,"title":"Symbol.match","titleHTML":"Symbol.match","number":"19.4.2.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Symbol.match"},{"type":"clause","id":"sec-symbol.prototype","aoid":null,"title":"Symbol.prototype","titleHTML":"Symbol.prototype","number":"19.4.2.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Symbol.prototype"},{"type":"clause","id":"sec-symbol.replace","aoid":null,"title":"Symbol.replace","titleHTML":"Symbol.replace","number":"19.4.2.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Symbol.replace"},{"type":"clause","id":"sec-symbol.search","aoid":null,"title":"Symbol.search","titleHTML":"Symbol.search","number":"19.4.2.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Symbol.search"},{"type":"clause","id":"sec-symbol.species","aoid":null,"title":"Symbol.species","titleHTML":"Symbol.species","number":"19.4.2.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Symbol.species"},{"type":"clause","id":"sec-symbol.split","aoid":null,"title":"Symbol.split","titleHTML":"Symbol.split","number":"19.4.2.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Symbol.split"},{"type":"clause","id":"sec-symbol.toprimitive","aoid":null,"title":"Symbol.toPrimitive","titleHTML":"Symbol.toPrimitive","number":"19.4.2.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Symbol.toPrimitive"},{"type":"clause","id":"sec-symbol.tostringtag","aoid":null,"title":"Symbol.toStringTag","titleHTML":"Symbol.toStringTag","number":"19.4.2.14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Symbol.toStringTag"},{"type":"clause","id":"sec-symbol.unscopables","aoid":null,"title":"Symbol.unscopables","titleHTML":"Symbol.unscopables","number":"19.4.2.15","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Symbol.unscopables"},{"type":"clause","id":"sec-properties-of-the-symbol-constructor","aoid":null,"title":"Properties of the Symbol Constructor","titleHTML":"Properties of the Symbol Constructor","number":"19.4.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of the Symbol Constructor"},{"type":"term","term":"%SymbolPrototype%","refId":"sec-properties-of-the-symbol-prototype-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%SymbolPrototype%"},{"type":"term","term":"thisSymbolValue","refId":"sec-properties-of-the-symbol-prototype-object","referencingIds":["_ref_5123","_ref_5124","_ref_5131","_ref_5132"],"id":"sec-thissymbolvalue","namespace":"https://tc39.github.io/ecma262/","location":"","key":"thisSymbolValue"},{"type":"clause","id":"sec-symbol.prototype.constructor","aoid":null,"title":"Symbol.prototype.constructor","titleHTML":"Symbol.prototype.constructor","number":"19.4.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Symbol.prototype.constructor"},{"type":"clause","id":"sec-symbol.prototype.description","aoid":null,"title":"get Symbol.prototype.description","titleHTML":"get Symbol.prototype.description","number":"19.4.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"get Symbol.prototype.description"},{"type":"op","aoid":"SymbolDescriptiveString","refId":"sec-symboldescriptivestring","location":"","referencingIds":[],"key":"SymbolDescriptiveString"},{"type":"clause","id":"sec-symboldescriptivestring","aoid":"SymbolDescriptiveString","title":"Runtime Semantics: SymbolDescriptiveString ( sym )","titleHTML":"Runtime Semantics: SymbolDescriptiveString ( <var>sym</var> )","number":"19.4.3.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_5125","_ref_5758"],"key":"Runtime Semantics: SymbolDescriptiveString ( sym )"},{"type":"clause","id":"sec-symbol.prototype.tostring","aoid":null,"title":"Symbol.prototype.toString ( )","titleHTML":"Symbol.prototype.toString ( )","number":"19.4.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Symbol.prototype.toString ( )"},{"type":"clause","id":"sec-symbol.prototype.valueof","aoid":null,"title":"Symbol.prototype.valueOf ( )","titleHTML":"Symbol.prototype.valueOf ( )","number":"19.4.3.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Symbol.prototype.valueOf ( )"},{"type":"clause","id":"sec-symbol.prototype-@@toprimitive","aoid":null,"title":"Symbol.prototype [ @@toPrimitive ] ( hint )","titleHTML":"Symbol.prototype [ @@toPrimitive ] ( <var>hint</var> )","number":"19.4.3.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_133"],"key":"Symbol.prototype [ @@toPrimitive ] ( hint )"},{"type":"clause","id":"sec-symbol.prototype-@@tostringtag","aoid":null,"title":"Symbol.prototype [ @@toStringTag ]","titleHTML":"Symbol.prototype [ @@toStringTag ]","number":"19.4.3.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Symbol.prototype [ @@toStringTag ]"},{"type":"clause","id":"sec-properties-of-the-symbol-prototype-object","aoid":null,"title":"Properties of the Symbol Prototype Object","titleHTML":"Properties of the Symbol Prototype Object","number":"19.4.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_111","_ref_1173","_ref_5115"],"key":"Properties of the Symbol Prototype Object"},{"type":"clause","id":"sec-properties-of-symbol-instances","aoid":null,"title":"Properties of Symbol Instances","titleHTML":"Properties of Symbol Instances","number":"19.4.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of Symbol Instances"},{"type":"clause","id":"sec-symbol-objects","aoid":null,"title":"Symbol Objects","titleHTML":"Symbol Objects","number":"19.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_148"],"key":"Symbol Objects"},{"type":"term","term":"%Error%","refId":"sec-error-constructor","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%Error%"},{"type":"clause","id":"sec-error-message","aoid":null,"title":"Error ( message )","titleHTML":"Error ( <var>message</var> )","number":"19.5.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Error ( message )"},{"type":"clause","id":"sec-error-constructor","aoid":null,"title":"The Error Constructor","titleHTML":"The Error Constructor","number":"19.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_72","_ref_435","_ref_1060","_ref_1064","_ref_5145","_ref_5163"],"key":"The Error Constructor"},{"type":"clause","id":"sec-error.prototype","aoid":null,"title":"Error.prototype","titleHTML":"Error.prototype","number":"19.5.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Error.prototype"},{"type":"clause","id":"sec-properties-of-the-error-constructor","aoid":null,"title":"Properties of the Error Constructor","titleHTML":"Properties of the Error Constructor","number":"19.5.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of the Error Constructor"},{"type":"term","term":"%ErrorPrototype%","refId":"sec-properties-of-the-error-prototype-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%ErrorPrototype%"},{"type":"clause","id":"sec-error.prototype.constructor","aoid":null,"title":"Error.prototype.constructor","titleHTML":"Error.prototype.constructor","number":"19.5.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Error.prototype.constructor"},{"type":"clause","id":"sec-error.prototype.message","aoid":null,"title":"Error.prototype.message","titleHTML":"Error.prototype.message","number":"19.5.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Error.prototype.message"},{"type":"clause","id":"sec-error.prototype.name","aoid":null,"title":"Error.prototype.name","titleHTML":"Error.prototype.name","number":"19.5.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Error.prototype.name"},{"type":"clause","id":"sec-error.prototype.tostring","aoid":null,"title":"Error.prototype.toString ( )","titleHTML":"Error.prototype.toString ( )","number":"19.5.3.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Error.prototype.toString ( )"},{"type":"clause","id":"sec-properties-of-the-error-prototype-object","aoid":null,"title":"Properties of the Error Prototype Object","titleHTML":"Properties of the Error Prototype Object","number":"19.5.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1062","_ref_5143","_ref_5165"],"key":"Properties of the Error Prototype Object"},{"type":"clause","id":"sec-properties-of-error-instances","aoid":null,"title":"Properties of Error Instances","titleHTML":"Properties of Error Instances","number":"19.5.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of Error Instances"},{"type":"clause","id":"sec-native-error-types-used-in-this-standard-evalerror","aoid":null,"title":"EvalError","titleHTML":"EvalError","number":"19.5.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_74","_ref_436"],"key":"EvalError"},{"type":"clause","id":"sec-native-error-types-used-in-this-standard-rangeerror","aoid":null,"title":"RangeError","titleHTML":"RangeError","number":"19.5.5.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_101","_ref_448"],"key":"RangeError"},{"type":"clause","id":"sec-native-error-types-used-in-this-standard-referenceerror","aoid":null,"title":"ReferenceError","titleHTML":"ReferenceError","number":"19.5.5.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_102","_ref_449"],"key":"ReferenceError"},{"type":"clause","id":"sec-native-error-types-used-in-this-standard-syntaxerror","aoid":null,"title":"SyntaxError","titleHTML":"SyntaxError","number":"19.5.5.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_112","_ref_455"],"key":"SyntaxError"},{"type":"clause","id":"sec-native-error-types-used-in-this-standard-typeerror","aoid":null,"title":"TypeError","titleHTML":"TypeError","number":"19.5.5.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_114","_ref_456"],"key":"TypeError"},{"type":"clause","id":"sec-native-error-types-used-in-this-standard-urierror","aoid":null,"title":"URIError","titleHTML":"URIError","number":"19.5.5.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_119","_ref_461"],"key":"URIError"},{"type":"clause","id":"sec-native-error-types-used-in-this-standard","aoid":null,"title":"Native Error Types Used in This Standard","titleHTML":"Native Error Types Used in This Standard","number":"19.5.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_493","_ref_494"],"key":"Native Error Types Used in This Standard"},{"type":"clause","id":"sec-nativeerror","aoid":null,"title":"NativeError ( message )","titleHTML":"NativeError ( <var>message</var> )","number":"19.5.6.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"NativeError ( message )"},{"type":"clause","id":"sec-nativeerror-constructors","aoid":null,"title":"The NativeError Constructors","titleHTML":"The <var>NativeError</var> Constructors","number":"19.5.6.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_496"],"key":"The NativeError Constructors"},{"type":"clause","id":"sec-nativeerror.prototype","aoid":null,"title":"NativeError.prototype","titleHTML":"NativeError.prototype","number":"19.5.6.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"NativeError.prototype"},{"type":"clause","id":"sec-properties-of-the-nativeerror-constructors","aoid":null,"title":"Properties of the NativeError Constructors","titleHTML":"Properties of the <var>NativeError</var> Constructors","number":"19.5.6.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_846"],"key":"Properties of the NativeError Constructors"},{"type":"clause","id":"sec-nativeerror.prototype.constructor","aoid":null,"title":"NativeError.prototype.constructor","titleHTML":"<var>NativeError</var>.prototype.constructor","number":"19.5.6.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"NativeError.prototype.constructor"},{"type":"clause","id":"sec-nativeerror.prototype.message","aoid":null,"title":"NativeError.prototype.message","titleHTML":"<var>NativeError</var>.prototype.message","number":"19.5.6.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"NativeError.prototype.message"},{"type":"clause","id":"sec-nativeerror.prototype.name","aoid":null,"title":"NativeError.prototype.name","titleHTML":"<var>NativeError</var>.prototype.name","number":"19.5.6.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"NativeError.prototype.name"},{"type":"clause","id":"sec-properties-of-the-nativeerror-prototype-objects","aoid":null,"title":"Properties of the NativeError Prototype Objects","titleHTML":"Properties of the <var>NativeError</var> Prototype Objects","number":"19.5.6.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_495"],"key":"Properties of the NativeError Prototype Objects"},{"type":"clause","id":"sec-properties-of-nativeerror-instances","aoid":null,"title":"Properties of NativeError Instances","titleHTML":"Properties of <var>NativeError</var> Instances","number":"19.5.6.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of NativeError Instances"},{"type":"clause","id":"sec-nativeerror-object-structure","aoid":null,"title":"NativeError Object Structure","titleHTML":"<var>NativeError</var> Object Structure","number":"19.5.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_492"],"key":"NativeError Object Structure"},{"type":"clause","id":"sec-error-objects","aoid":null,"title":"Error Objects","titleHTML":"Error Objects","number":"19.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Error Objects"},{"type":"clause","id":"sec-fundamental-objects","aoid":null,"title":"Fundamental Objects","titleHTML":"Fundamental Objects","number":"19","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Fundamental Objects"},{"type":"term","term":"%Number%","refId":"sec-number-constructor","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%Number%"},{"type":"clause","id":"sec-number-constructor-number-value","aoid":null,"title":"Number ( value )","titleHTML":"Number ( <var>value</var> )","number":"20.1.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_6"],"key":"Number ( value )"},{"type":"clause","id":"sec-number-constructor","aoid":null,"title":"The Number Constructor","titleHTML":"The Number Constructor","number":"20.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_88","_ref_444","_ref_1107","_ref_1111","_ref_5199"],"key":"The Number Constructor"},{"type":"clause","id":"sec-number.epsilon","aoid":null,"title":"Number.EPSILON","titleHTML":"Number.EPSILON","number":"20.1.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Number.EPSILON"},{"type":"clause","id":"sec-number.isfinite","aoid":null,"title":"Number.isFinite ( number )","titleHTML":"Number.isFinite ( <var>number</var> )","number":"20.1.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Number.isFinite ( number )"},{"type":"clause","id":"sec-number.isinteger","aoid":null,"title":"Number.isInteger ( number )","titleHTML":"Number.isInteger ( <var>number</var> )","number":"20.1.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Number.isInteger ( number )"},{"type":"clause","id":"sec-number.isnan","aoid":null,"title":"Number.isNaN ( number )","titleHTML":"Number.isNaN ( <var>number</var> )","number":"20.1.2.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Number.isNaN ( number )"},{"type":"clause","id":"sec-number.issafeinteger","aoid":null,"title":"Number.isSafeInteger ( number )","titleHTML":"Number.isSafeInteger ( <var>number</var> )","number":"20.1.2.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Number.isSafeInteger ( number )"},{"type":"clause","id":"sec-number.max_safe_integer","aoid":null,"title":"Number.MAX_SAFE_INTEGER","titleHTML":"Number.MAX_SAFE_INTEGER","number":"20.1.2.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_508"],"key":"Number.MAX_SAFE_INTEGER"},{"type":"clause","id":"sec-number.max_value","aoid":null,"title":"Number.MAX_VALUE","titleHTML":"Number.MAX_VALUE","number":"20.1.2.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Number.MAX_VALUE"},{"type":"clause","id":"sec-number.min_safe_integer","aoid":null,"title":"Number.MIN_SAFE_INTEGER","titleHTML":"Number.MIN_SAFE_INTEGER","number":"20.1.2.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_507"],"key":"Number.MIN_SAFE_INTEGER"},{"type":"clause","id":"sec-number.min_value","aoid":null,"title":"Number.MIN_VALUE","titleHTML":"Number.MIN_VALUE","number":"20.1.2.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Number.MIN_VALUE"},{"type":"clause","id":"sec-number.nan","aoid":null,"title":"Number.NaN","titleHTML":"Number.NaN","number":"20.1.2.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Number.NaN"},{"type":"clause","id":"sec-number.negative_infinity","aoid":null,"title":"Number.NEGATIVE_INFINITY","titleHTML":"Number.NEGATIVE_INFINITY","number":"20.1.2.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Number.NEGATIVE_INFINITY"},{"type":"clause","id":"sec-number.parsefloat","aoid":null,"title":"Number.parseFloat ( string )","titleHTML":"Number.parseFloat ( <var>string</var> )","number":"20.1.2.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Number.parseFloat ( string )"},{"type":"clause","id":"sec-number.parseint","aoid":null,"title":"Number.parseInt ( string, radix )","titleHTML":"Number.parseInt ( <var>string</var>, <var>radix</var> )","number":"20.1.2.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Number.parseInt ( string, radix )"},{"type":"clause","id":"sec-number.positive_infinity","aoid":null,"title":"Number.POSITIVE_INFINITY","titleHTML":"Number.POSITIVE_INFINITY","number":"20.1.2.14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Number.POSITIVE_INFINITY"},{"type":"clause","id":"sec-number.prototype","aoid":null,"title":"Number.prototype","titleHTML":"Number.prototype","number":"20.1.2.15","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Number.prototype"},{"type":"clause","id":"sec-properties-of-the-number-constructor","aoid":null,"title":"Properties of the Number Constructor","titleHTML":"Properties of the Number Constructor","number":"20.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of the Number Constructor"},{"type":"term","term":"%NumberPrototype%","refId":"sec-properties-of-the-number-prototype-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%NumberPrototype%"},{"type":"term","term":"thisNumberValue","refId":"sec-properties-of-the-number-prototype-object","referencingIds":["_ref_5198","_ref_5201","_ref_5208","_ref_5216","_ref_5227","_ref_5230"],"id":"sec-thisnumbervalue","namespace":"https://tc39.github.io/ecma262/","location":"","key":"thisNumberValue"},{"type":"clause","id":"sec-number.prototype.constructor","aoid":null,"title":"Number.prototype.constructor","titleHTML":"Number.prototype.constructor","number":"20.1.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Number.prototype.constructor"},{"type":"clause","id":"sec-number.prototype.toexponential","aoid":null,"title":"Number.prototype.toExponential ( fractionDigits )","titleHTML":"Number.prototype.toExponential ( <var>fractionDigits</var> )","number":"20.1.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Number.prototype.toExponential ( fractionDigits )"},{"type":"clause","id":"sec-number.prototype.tofixed","aoid":null,"title":"Number.prototype.toFixed ( fractionDigits )","titleHTML":"Number.prototype.toFixed ( <var>fractionDigits</var> )","number":"20.1.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Number.prototype.toFixed ( fractionDigits )"},{"type":"clause","id":"sec-number.prototype.tolocalestring","aoid":null,"title":"Number.prototype.toLocaleString ( [ reserved1 [ , reserved2 ] ] )","titleHTML":"Number.prototype.toLocaleString ( [ <var>reserved1</var> [ , <var>reserved2</var> ] ] )","number":"20.1.3.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Number.prototype.toLocaleString ( [ reserved1 [ , reserved2 ] ] )"},{"type":"clause","id":"sec-number.prototype.toprecision","aoid":null,"title":"Number.prototype.toPrecision ( precision )","titleHTML":"Number.prototype.toPrecision ( <var>precision</var> )","number":"20.1.3.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Number.prototype.toPrecision ( precision )"},{"type":"clause","id":"sec-number.prototype.tostring","aoid":null,"title":"Number.prototype.toString ( [ radix ] )","titleHTML":"Number.prototype.toString ( [ <var>radix</var> ] )","number":"20.1.3.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Number.prototype.toString ( [ radix ] )"},{"type":"clause","id":"sec-number.prototype.valueof","aoid":null,"title":"Number.prototype.valueOf ( )","titleHTML":"Number.prototype.valueOf ( )","number":"20.1.3.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Number.prototype.valueOf ( )"},{"type":"clause","id":"sec-properties-of-the-number-prototype-object","aoid":null,"title":"Properties of the Number Prototype Object","titleHTML":"Properties of the Number Prototype Object","number":"20.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1109","_ref_5192"],"key":"Properties of the Number Prototype Object"},{"type":"clause","id":"sec-properties-of-number-instances","aoid":null,"title":"Properties of Number Instances","titleHTML":"Properties of Number Instances","number":"20.1.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of Number Instances"},{"type":"clause","id":"sec-number-objects","aoid":null,"title":"Number Objects","titleHTML":"Number Objects","number":"20.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_146"],"key":"Number Objects"},{"type":"term","term":"%Math%","refId":"sec-math-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%Math%"},{"type":"clause","id":"sec-math.e","aoid":null,"title":"Math.E","titleHTML":"Math.E","number":"20.2.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.E"},{"type":"clause","id":"sec-math.ln10","aoid":null,"title":"Math.LN10","titleHTML":"Math.LN10","number":"20.2.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.LN10"},{"type":"clause","id":"sec-math.ln2","aoid":null,"title":"Math.LN2","titleHTML":"Math.LN2","number":"20.2.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.LN2"},{"type":"clause","id":"sec-math.log10e","aoid":null,"title":"Math.LOG10E","titleHTML":"Math.LOG10E","number":"20.2.1.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.LOG10E"},{"type":"clause","id":"sec-math.log2e","aoid":null,"title":"Math.LOG2E","titleHTML":"Math.LOG2E","number":"20.2.1.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.LOG2E"},{"type":"clause","id":"sec-math.pi","aoid":null,"title":"Math.PI","titleHTML":"Math.PI","number":"20.2.1.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.PI"},{"type":"clause","id":"sec-math.sqrt1_2","aoid":null,"title":"Math.SQRT1_2","titleHTML":"Math.SQRT1_2","number":"20.2.1.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.SQRT1_2"},{"type":"clause","id":"sec-math.sqrt2","aoid":null,"title":"Math.SQRT2","titleHTML":"Math.SQRT2","number":"20.2.1.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.SQRT2"},{"type":"clause","id":"sec-math-@@tostringtag","aoid":null,"title":"Math [ @@toStringTag ]","titleHTML":"Math [ @@toStringTag ]","number":"20.2.1.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math [ @@toStringTag ]"},{"type":"clause","id":"sec-value-properties-of-the-math-object","aoid":null,"title":"Value Properties of the Math Object","titleHTML":"Value Properties of the Math Object","number":"20.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Value Properties of the Math Object"},{"type":"clause","id":"sec-math.abs","aoid":null,"title":"Math.abs ( x )","titleHTML":"Math.abs ( <var>x</var> )","number":"20.2.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.abs ( x )"},{"type":"clause","id":"sec-math.acos","aoid":null,"title":"Math.acos ( x )","titleHTML":"Math.acos ( <var>x</var> )","number":"20.2.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.acos ( x )"},{"type":"clause","id":"sec-math.acosh","aoid":null,"title":"Math.acosh ( x )","titleHTML":"Math.acosh ( <var>x</var> )","number":"20.2.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.acosh ( x )"},{"type":"clause","id":"sec-math.asin","aoid":null,"title":"Math.asin ( x )","titleHTML":"Math.asin ( <var>x</var> )","number":"20.2.2.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.asin ( x )"},{"type":"clause","id":"sec-math.asinh","aoid":null,"title":"Math.asinh ( x )","titleHTML":"Math.asinh ( <var>x</var> )","number":"20.2.2.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.asinh ( x )"},{"type":"clause","id":"sec-math.atan","aoid":null,"title":"Math.atan ( x )","titleHTML":"Math.atan ( <var>x</var> )","number":"20.2.2.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.atan ( x )"},{"type":"clause","id":"sec-math.atanh","aoid":null,"title":"Math.atanh ( x )","titleHTML":"Math.atanh ( <var>x</var> )","number":"20.2.2.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.atanh ( x )"},{"type":"clause","id":"sec-math.atan2","aoid":null,"title":"Math.atan2 ( y, x )","titleHTML":"Math.atan2 ( <var>y</var>, <var>x</var> )","number":"20.2.2.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.atan2 ( y, x )"},{"type":"clause","id":"sec-math.cbrt","aoid":null,"title":"Math.cbrt ( x )","titleHTML":"Math.cbrt ( <var>x</var> )","number":"20.2.2.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.cbrt ( x )"},{"type":"clause","id":"sec-math.ceil","aoid":null,"title":"Math.ceil ( x )","titleHTML":"Math.ceil ( <var>x</var> )","number":"20.2.2.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.ceil ( x )"},{"type":"clause","id":"sec-math.clz32","aoid":null,"title":"Math.clz32 ( x )","titleHTML":"Math.clz32 ( <var>x</var> )","number":"20.2.2.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.clz32 ( x )"},{"type":"clause","id":"sec-math.cos","aoid":null,"title":"Math.cos ( x )","titleHTML":"Math.cos ( <var>x</var> )","number":"20.2.2.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.cos ( x )"},{"type":"clause","id":"sec-math.cosh","aoid":null,"title":"Math.cosh ( x )","titleHTML":"Math.cosh ( <var>x</var> )","number":"20.2.2.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.cosh ( x )"},{"type":"clause","id":"sec-math.exp","aoid":null,"title":"Math.exp ( x )","titleHTML":"Math.exp ( <var>x</var> )","number":"20.2.2.14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.exp ( x )"},{"type":"clause","id":"sec-math.expm1","aoid":null,"title":"Math.expm1 ( x )","titleHTML":"Math.expm1 ( <var>x</var> )","number":"20.2.2.15","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.expm1 ( x )"},{"type":"clause","id":"sec-math.floor","aoid":null,"title":"Math.floor ( x )","titleHTML":"Math.floor ( <var>x</var> )","number":"20.2.2.16","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.floor ( x )"},{"type":"clause","id":"sec-math.fround","aoid":null,"title":"Math.fround ( x )","titleHTML":"Math.fround ( <var>x</var> )","number":"20.2.2.17","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.fround ( x )"},{"type":"clause","id":"sec-math.hypot","aoid":null,"title":"Math.hypot ( value1, value2, ...values )","titleHTML":"Math.hypot ( <var>value1</var>, <var>value2</var>, ...<var>values</var> )","number":"20.2.2.18","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.hypot ( value1, value2, ...values )"},{"type":"clause","id":"sec-math.imul","aoid":null,"title":"Math.imul ( x, y )","titleHTML":"Math.imul ( <var>x</var>, <var>y</var> )","number":"20.2.2.19","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.imul ( x, y )"},{"type":"clause","id":"sec-math.log","aoid":null,"title":"Math.log ( x )","titleHTML":"Math.log ( <var>x</var> )","number":"20.2.2.20","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.log ( x )"},{"type":"clause","id":"sec-math.log1p","aoid":null,"title":"Math.log1p ( x )","titleHTML":"Math.log1p ( <var>x</var> )","number":"20.2.2.21","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.log1p ( x )"},{"type":"clause","id":"sec-math.log10","aoid":null,"title":"Math.log10 ( x )","titleHTML":"Math.log10 ( <var>x</var> )","number":"20.2.2.22","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.log10 ( x )"},{"type":"clause","id":"sec-math.log2","aoid":null,"title":"Math.log2 ( x )","titleHTML":"Math.log2 ( <var>x</var> )","number":"20.2.2.23","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.log2 ( x )"},{"type":"clause","id":"sec-math.max","aoid":null,"title":"Math.max ( value1, value2, ...values )","titleHTML":"Math.max ( <var>value1</var>, <var>value2</var>, ...<var>values</var> )","number":"20.2.2.24","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.max ( value1, value2, ...values )"},{"type":"clause","id":"sec-math.min","aoid":null,"title":"Math.min ( value1, value2, ...values )","titleHTML":"Math.min ( <var>value1</var>, <var>value2</var>, ...<var>values</var> )","number":"20.2.2.25","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.min ( value1, value2, ...values )"},{"type":"clause","id":"sec-math.pow","aoid":null,"title":"Math.pow ( base, exponent )","titleHTML":"Math.pow ( <var>base</var>, <var>exponent</var> )","number":"20.2.2.26","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.pow ( base, exponent )"},{"type":"clause","id":"sec-math.random","aoid":null,"title":"Math.random ( )","titleHTML":"Math.random ( )","number":"20.2.2.27","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.random ( )"},{"type":"clause","id":"sec-math.round","aoid":null,"title":"Math.round ( x )","titleHTML":"Math.round ( <var>x</var> )","number":"20.2.2.28","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.round ( x )"},{"type":"clause","id":"sec-math.sign","aoid":null,"title":"Math.sign ( x )","titleHTML":"Math.sign ( <var>x</var> )","number":"20.2.2.29","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.sign ( x )"},{"type":"clause","id":"sec-math.sin","aoid":null,"title":"Math.sin ( x )","titleHTML":"Math.sin ( <var>x</var> )","number":"20.2.2.30","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.sin ( x )"},{"type":"clause","id":"sec-math.sinh","aoid":null,"title":"Math.sinh ( x )","titleHTML":"Math.sinh ( <var>x</var> )","number":"20.2.2.31","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.sinh ( x )"},{"type":"clause","id":"sec-math.sqrt","aoid":null,"title":"Math.sqrt ( x )","titleHTML":"Math.sqrt ( <var>x</var> )","number":"20.2.2.32","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.sqrt ( x )"},{"type":"clause","id":"sec-math.tan","aoid":null,"title":"Math.tan ( x )","titleHTML":"Math.tan ( <var>x</var> )","number":"20.2.2.33","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.tan ( x )"},{"type":"clause","id":"sec-math.tanh","aoid":null,"title":"Math.tanh ( x )","titleHTML":"Math.tanh ( <var>x</var> )","number":"20.2.2.34","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.tanh ( x )"},{"type":"clause","id":"sec-math.trunc","aoid":null,"title":"Math.trunc ( x )","titleHTML":"Math.trunc ( <var>x</var> )","number":"20.2.2.35","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Math.trunc ( x )"},{"type":"clause","id":"sec-function-properties-of-the-math-object","aoid":null,"title":"Function Properties of the Math Object","titleHTML":"Function Properties of the Math Object","number":"20.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Function Properties of the Math Object"},{"type":"clause","id":"sec-math-object","aoid":null,"title":"The Math Object","titleHTML":"The Math Object","number":"20.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_87","_ref_466","_ref_1106"],"key":"The Math Object"},{"type":"term","term":"time value","refId":"sec-time-values-and-time-range","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"time value"},{"type":"clause","id":"sec-time-values-and-time-range","aoid":null,"title":"Time Values and Time Range","titleHTML":"Time Values and Time Range","number":"20.3.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_506","_ref_509","_ref_5248","_ref_5262","_ref_5265","_ref_5272","_ref_5310","_ref_5345","_ref_5348","_ref_5349","_ref_5403","_ref_5404","_ref_5412","_ref_5430","_ref_5444","_ref_5447","_ref_5450","_ref_5455","_ref_5470","_ref_5472","_ref_5750","_ref_8611","_ref_8612"],"key":"Time Values and Time Range"},{"type":"op","aoid":"Day","id":"eqn-Day","referencingIds":["_ref_5306","_ref_5346","_ref_5398","_ref_5553","_ref_5568","_ref_5578","_ref_5602","_ref_5642","_ref_5654","_ref_5663","_ref_5683"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Day"},{"type":"op","aoid":"msPerDay","id":"eqn-msPerDay","referencingIds":["_ref_5250","_ref_5252","_ref_5263","_ref_5399"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"msPerDay"},{"type":"op","aoid":"TimeWithinDay","id":"eqn-TimeWithinDay","referencingIds":["_ref_5526","_ref_5539","_ref_5592","_ref_5619","_ref_5630","_ref_5675","_ref_8715"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"TimeWithinDay"},{"type":"clause","id":"sec-day-number-and-time-within-day","aoid":null,"title":"Day Number and Time within Day","titleHTML":"Day Number and Time within Day","number":"20.3.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Day Number and Time within Day"},{"type":"op","aoid":"DaysInYear","id":"eqn-DaysInYear","referencingIds":["_ref_5267","_ref_5269"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"DaysInYear"},{"type":"op","aoid":"DayFromYear","id":"eqn-DaysFromYear","referencingIds":["_ref_5264","_ref_5307"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"DayFromYear"},{"type":"op","aoid":"TimeFromYear","id":"eqn-TimeFromYear","referencingIds":["_ref_5266"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"TimeFromYear"},{"type":"op","aoid":"YearFromTime","id":"eqn-YearFromTime","referencingIds":["_ref_5268","_ref_5270","_ref_5308","_ref_5395","_ref_5482","_ref_5508","_ref_5524","_ref_5591","_ref_5617","_ref_5674","_ref_5714","_ref_5744","_ref_8703"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"YearFromTime"},{"type":"op","aoid":"InLeapYear","id":"eqn-InLeapYear","referencingIds":["_ref_5275","_ref_5276","_ref_5278","_ref_5279","_ref_5281","_ref_5282","_ref_5284","_ref_5285","_ref_5287","_ref_5288","_ref_5290","_ref_5291","_ref_5293","_ref_5294","_ref_5296","_ref_5297","_ref_5299","_ref_5300","_ref_5302","_ref_5303","_ref_5305","_ref_5316","_ref_5319","_ref_5322","_ref_5325","_ref_5328","_ref_5331","_ref_5334","_ref_5337","_ref_5340","_ref_5343"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"InLeapYear"},{"type":"clause","id":"sec-year-number","aoid":null,"title":"Year Number","titleHTML":"Year Number","number":"20.3.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Year Number"},{"type":"op","aoid":"MonthFromTime","id":"eqn-MonthFromTime","referencingIds":["_ref_5271","_ref_5309","_ref_5312","_ref_5314","_ref_5317","_ref_5320","_ref_5323","_ref_5326","_ref_5329","_ref_5332","_ref_5335","_ref_5338","_ref_5341","_ref_5344","_ref_5396","_ref_5494","_ref_5516","_ref_5525","_ref_5533","_ref_5618","_ref_5624","_ref_5712","_ref_5742","_ref_8711"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"MonthFromTime"},{"type":"op","aoid":"DayWithinYear","id":"eqn-DayWithinYear","referencingIds":["_ref_5273","_ref_5274","_ref_5277","_ref_5280","_ref_5283","_ref_5286","_ref_5289","_ref_5292","_ref_5295","_ref_5298","_ref_5301","_ref_5304","_ref_5311","_ref_5313","_ref_5315","_ref_5318","_ref_5321","_ref_5324","_ref_5327","_ref_5330","_ref_5333","_ref_5336","_ref_5339","_ref_5342"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"DayWithinYear"},{"type":"clause","id":"sec-month-number","aoid":null,"title":"Month Number","titleHTML":"Month Number","number":"20.3.1.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Month Number"},{"type":"op","aoid":"DateFromTime","refId":"sec-date-number","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"DateFromTime"},{"type":"clause","id":"sec-date-number","aoid":null,"title":"Date Number","titleHTML":"Date Number","number":"20.3.1.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_5397","_ref_5476","_ref_5504","_ref_5535","_ref_5587","_ref_5626","_ref_5670","_ref_5713","_ref_5743","_ref_8712"],"key":"Date Number"},{"type":"op","aoid":"WeekDay","refId":"sec-week-day","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"WeekDay"},{"type":"clause","id":"sec-week-day","aoid":null,"title":"Week Day","titleHTML":"Week Day","number":"20.3.1.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_5479","_ref_5506","_ref_5711","_ref_5741"],"key":"Week Day"},{"type":"term","term":"LocalTZA( _t_, true )","refId":"sec-local-time-zone-adjustment","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"LocalTZA( _t_, true )"},{"type":"term","term":"LocalTZA( _t_, false )","refId":"sec-local-time-zone-adjustment","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"LocalTZA( _t_, false )"},{"type":"term","term":"_t_local = _t_","refId":"sec-local-time-zone-adjustment","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"_t_local = _t_"},{"type":"clause","id":"sec-local-time-zone-adjustment","aoid":null,"title":"LocalTZA ( t, isUTC )","titleHTML":"LocalTZA ( <var>t</var>, <var>isUTC</var> )","number":"20.3.1.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_5360","_ref_5361","_ref_5719"],"key":"LocalTZA ( t, isUTC )"},{"type":"op","aoid":"LocalTime","refId":"sec-localtime","location":"","referencingIds":[],"key":"LocalTime"},{"type":"clause","id":"sec-localtime","aoid":"LocalTime","title":"LocalTime ( t )","titleHTML":"LocalTime ( <var>t</var> )","number":"20.3.1.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_5362","_ref_5363","_ref_5477","_ref_5480","_ref_5483","_ref_5486","_ref_5489","_ref_5492","_ref_5495","_ref_5498","_ref_5501","_ref_5519","_ref_5531","_ref_5543","_ref_5558","_ref_5570","_ref_5584","_ref_5596","_ref_5691","_ref_5728","_ref_5735","_ref_8704","_ref_8706"],"key":"LocalTime ( t )"},{"type":"op","aoid":"UTC","refId":"sec-utc-t","location":"","referencingIds":[],"key":"UTC"},{"type":"clause","id":"sec-utc-t","aoid":"UTC","title":"UTC ( t )","titleHTML":"UTC ( <var>t</var> )","number":"20.3.1.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_5427","_ref_5528","_ref_5541","_ref_5556","_ref_5566","_ref_5582","_ref_5594","_ref_5607","_ref_8713"],"key":"UTC ( t )"},{"type":"op","aoid":"HourFromTime","id":"eqn-HourFromTime","referencingIds":["_ref_5485","_ref_5510","_ref_5562","_ref_5580","_ref_5604","_ref_5649","_ref_5665","_ref_5685","_ref_5704","_ref_5722"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"HourFromTime"},{"type":"op","aoid":"MinFromTime","id":"eqn-MinFromTime","referencingIds":["_ref_5491","_ref_5514","_ref_5546","_ref_5563","_ref_5605","_ref_5635","_ref_5650","_ref_5686","_ref_5705","_ref_5720"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"MinFromTime"},{"type":"op","aoid":"SecFromTime","id":"eqn-SecFromTime","referencingIds":["_ref_5497","_ref_5518","_ref_5548","_ref_5564","_ref_5573","_ref_5637","_ref_5651","_ref_5658","_ref_5706"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"SecFromTime"},{"type":"op","aoid":"msFromTime","id":"eqn-msFromTime","referencingIds":["_ref_5488","_ref_5512","_ref_5550","_ref_5575","_ref_5599","_ref_5639","_ref_5660","_ref_5680"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"msFromTime"},{"type":"op","aoid":"HoursPerDay","id":"eqn-HoursPerDay","referencingIds":["_ref_5368"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"HoursPerDay"},{"type":"op","aoid":"MinutesPerHour","id":"eqn-MinutesPerHour","referencingIds":["_ref_5372","_ref_5382"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"MinutesPerHour"},{"type":"op","aoid":"SecondsPerMinute","id":"eqn-SecondsPerMinute","referencingIds":["_ref_5376","_ref_5380"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"SecondsPerMinute"},{"type":"op","aoid":"msPerSecond","id":"eqn-msPerSecond","referencingIds":["_ref_5374","_ref_5378","_ref_5379","_ref_5389"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"msPerSecond"},{"type":"op","aoid":"msPerMinute","id":"eqn-msPerMinute","referencingIds":["_ref_5370","_ref_5381","_ref_5388","_ref_5502"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"msPerMinute"},{"type":"op","aoid":"msPerHour","id":"eqn-msPerHour","referencingIds":["_ref_5354","_ref_5359","_ref_5366","_ref_5387"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"msPerHour"},{"type":"clause","id":"sec-hours-minutes-second-and-milliseconds","aoid":null,"title":"Hours, Minutes, Second, and Milliseconds","titleHTML":"Hours, Minutes, Second, and Milliseconds","number":"20.3.1.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Hours, Minutes, Second, and Milliseconds"},{"type":"op","aoid":"MakeTime","refId":"sec-maketime","location":"","referencingIds":[],"key":"MakeTime"},{"type":"clause","id":"sec-maketime","aoid":"MakeTime","title":"MakeTime ( hour, min, sec, ms )","titleHTML":"MakeTime ( <var>hour</var>, <var>min</var>, <var>sec</var>, <var>ms</var> )","number":"20.3.1.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_5353","_ref_5358","_ref_5424","_ref_5468","_ref_5554","_ref_5561","_ref_5579","_ref_5603","_ref_5643","_ref_5648","_ref_5664","_ref_5684"],"key":"MakeTime ( hour, min, sec, ms )"},{"type":"op","aoid":"MakeDay","refId":"sec-makeday","location":"","referencingIds":[],"key":"MakeDay"},{"type":"clause","id":"sec-makeday","aoid":"MakeDay","title":"MakeDay ( year, month, date )","titleHTML":"MakeDay ( <var>year</var>, <var>month</var>, <var>date</var> )","number":"20.3.1.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_5352","_ref_5357","_ref_5423","_ref_5467","_ref_5523","_ref_5538","_ref_5590","_ref_5616","_ref_5629","_ref_5673","_ref_8710"],"key":"MakeDay ( year, month, date )"},{"type":"op","aoid":"MakeDate","refId":"sec-makedate","location":"","referencingIds":[],"key":"MakeDate"},{"type":"clause","id":"sec-makedate","aoid":"MakeDate","title":"MakeDate ( day, time )","titleHTML":"MakeDate ( <var>day</var>, <var>time</var> )","number":"20.3.1.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_5351","_ref_5356","_ref_5422","_ref_5466","_ref_5522","_ref_5537","_ref_5552","_ref_5567","_ref_5577","_ref_5589","_ref_5601","_ref_5615","_ref_5628","_ref_5641","_ref_5653","_ref_5662","_ref_5672","_ref_5682","_ref_8714"],"key":"MakeDate ( day, time )"},{"type":"op","aoid":"TimeClip","refId":"sec-timeclip","location":"","referencingIds":[],"key":"TimeClip"},{"type":"clause","id":"sec-timeclip","aoid":"TimeClip","title":"TimeClip ( time )","titleHTML":"TimeClip ( <var>time</var> )","number":"20.3.1.14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_803","_ref_5350","_ref_5355","_ref_5426","_ref_5441","_ref_5465","_ref_5527","_ref_5540","_ref_5555","_ref_5565","_ref_5581","_ref_5593","_ref_5606","_ref_5611","_ref_5620","_ref_5631","_ref_5644","_ref_5652","_ref_5666","_ref_5676","_ref_5687","_ref_8610","_ref_8717"],"key":"TimeClip ( time )"},{"type":"clause","id":"sec-expanded-years","aoid":null,"title":"Expanded Years","titleHTML":"Expanded Years","number":"20.3.1.15.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Expanded Years"},{"type":"clause","id":"sec-date-time-string-format","aoid":null,"title":"Date Time String Format","titleHTML":"Date Time String Format","number":"20.3.1.15","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_510","_ref_513","_ref_514","_ref_515","_ref_804","_ref_806"],"key":"Date Time String Format"},{"type":"clause","id":"sec-overview-of-date-objects-and-definitions-of-abstract-operations","aoid":null,"title":"Overview of Date Objects and Definitions of Abstract Operations","titleHTML":"Overview of Date Objects and Definitions of Abstract Operations","number":"20.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Overview of Date Objects and Definitions of Abstract Operations"},{"type":"term","term":"%Date%","refId":"sec-date-constructor","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%Date%"},{"type":"clause","id":"sec-date-year-month-date-hours-minutes-seconds-ms","aoid":null,"title":"Date ( year, month [ , date [ , hours [ , minutes [ , seconds [ , ms ] ] ] ] ] )","titleHTML":"Date ( <var>year</var>, <var>month</var> [ , <var>date</var> [ , <var>hours</var> [ , <var>minutes</var> [ , <var>seconds</var> [ , <var>ms</var> ] ] ] ] ] )","number":"20.3.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date ( year, month [ , date [ , hours [ , minutes [ , seconds [ , ms ] ] ] ] ] )"},{"type":"clause","id":"sec-date-value","aoid":null,"title":"Date ( value )","titleHTML":"Date ( <var>value</var> )","number":"20.3.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date ( value )"},{"type":"clause","id":"sec-date-constructor-date","aoid":null,"title":"Date ( )","titleHTML":"Date ( )","number":"20.3.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date ( )"},{"type":"clause","id":"sec-date-constructor","aoid":null,"title":"The Date Constructor","titleHTML":"The Date Constructor","number":"20.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_67","_ref_434","_ref_1051","_ref_1055","_ref_5474"],"key":"The Date Constructor"},{"type":"clause","id":"sec-date.now","aoid":null,"title":"Date.now ( )","titleHTML":"Date.now ( )","number":"20.3.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.now ( )"},{"type":"clause","id":"sec-date.parse","aoid":null,"title":"Date.parse ( string )","titleHTML":"Date.parse ( <var>string</var> )","number":"20.3.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_511","_ref_512","_ref_517"],"key":"Date.parse ( string )"},{"type":"clause","id":"sec-date.prototype","aoid":null,"title":"Date.prototype","titleHTML":"Date.prototype","number":"20.3.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype"},{"type":"clause","id":"sec-date.utc","aoid":null,"title":"Date.UTC ( year [ , month [ , date [ , hours [ , minutes [ , seconds [ , ms ] ] ] ] ] ] )","titleHTML":"Date.UTC ( <var>year</var> [ , <var>month</var> [ , <var>date</var> [ , <var>hours</var> [ , <var>minutes</var> [ , <var>seconds</var> [ , <var>ms</var> ] ] ] ] ] ] )","number":"20.3.3.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.UTC ( year [ , month [ , date [ , hours [ , minutes [ , seconds [ , ms ] ] ] ] ] ] )"},{"type":"clause","id":"sec-properties-of-the-date-constructor","aoid":null,"title":"Properties of the Date Constructor","titleHTML":"Properties of the Date Constructor","number":"20.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of the Date Constructor"},{"type":"term","term":"%DatePrototype%","refId":"sec-properties-of-the-date-prototype-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%DatePrototype%"},{"type":"term","term":"thisTimeValue","refId":"sec-properties-of-the-date-prototype-object","referencingIds":[],"id":"sec-thistimevalue","namespace":"https://tc39.github.io/ecma262/","location":"","key":"thisTimeValue"},{"type":"term","term":"this Date object","refId":"sec-properties-of-the-date-prototype-object","referencingIds":["_ref_5529","_ref_5542","_ref_5557","_ref_5569","_ref_5583","_ref_5595","_ref_5608","_ref_5612","_ref_5621","_ref_5632","_ref_5645","_ref_5655","_ref_5667","_ref_5677","_ref_5688","_ref_5689","_ref_5733","_ref_5739","_ref_5751","_ref_8708","_ref_8716","_ref_8718"],"id":"this-Date-object","namespace":"https://tc39.github.io/ecma262/","location":"","key":"this Date object"},{"type":"term","term":"this time value","refId":"sec-properties-of-the-date-prototype-object","referencingIds":["_ref_5693","_ref_5694","_ref_8613"],"id":"this-time-value","namespace":"https://tc39.github.io/ecma262/","location":"","key":"this time value"},{"type":"clause","id":"sec-date.prototype.constructor","aoid":null,"title":"Date.prototype.constructor","titleHTML":"Date.prototype.constructor","number":"20.3.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.constructor"},{"type":"clause","id":"sec-date.prototype.getdate","aoid":null,"title":"Date.prototype.getDate ( )","titleHTML":"Date.prototype.getDate ( )","number":"20.3.4.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.getDate ( )"},{"type":"clause","id":"sec-date.prototype.getday","aoid":null,"title":"Date.prototype.getDay ( )","titleHTML":"Date.prototype.getDay ( )","number":"20.3.4.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.getDay ( )"},{"type":"clause","id":"sec-date.prototype.getfullyear","aoid":null,"title":"Date.prototype.getFullYear ( )","titleHTML":"Date.prototype.getFullYear ( )","number":"20.3.4.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.getFullYear ( )"},{"type":"clause","id":"sec-date.prototype.gethours","aoid":null,"title":"Date.prototype.getHours ( )","titleHTML":"Date.prototype.getHours ( )","number":"20.3.4.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.getHours ( )"},{"type":"clause","id":"sec-date.prototype.getmilliseconds","aoid":null,"title":"Date.prototype.getMilliseconds ( )","titleHTML":"Date.prototype.getMilliseconds ( )","number":"20.3.4.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.getMilliseconds ( )"},{"type":"clause","id":"sec-date.prototype.getminutes","aoid":null,"title":"Date.prototype.getMinutes ( )","titleHTML":"Date.prototype.getMinutes ( )","number":"20.3.4.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.getMinutes ( )"},{"type":"clause","id":"sec-date.prototype.getmonth","aoid":null,"title":"Date.prototype.getMonth ( )","titleHTML":"Date.prototype.getMonth ( )","number":"20.3.4.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.getMonth ( )"},{"type":"clause","id":"sec-date.prototype.getseconds","aoid":null,"title":"Date.prototype.getSeconds ( )","titleHTML":"Date.prototype.getSeconds ( )","number":"20.3.4.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.getSeconds ( )"},{"type":"clause","id":"sec-date.prototype.gettime","aoid":null,"title":"Date.prototype.getTime ( )","titleHTML":"Date.prototype.getTime ( )","number":"20.3.4.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.getTime ( )"},{"type":"clause","id":"sec-date.prototype.gettimezoneoffset","aoid":null,"title":"Date.prototype.getTimezoneOffset ( )","titleHTML":"Date.prototype.getTimezoneOffset ( )","number":"20.3.4.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.getTimezoneOffset ( )"},{"type":"clause","id":"sec-date.prototype.getutcdate","aoid":null,"title":"Date.prototype.getUTCDate ( )","titleHTML":"Date.prototype.getUTCDate ( )","number":"20.3.4.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.getUTCDate ( )"},{"type":"clause","id":"sec-date.prototype.getutcday","aoid":null,"title":"Date.prototype.getUTCDay ( )","titleHTML":"Date.prototype.getUTCDay ( )","number":"20.3.4.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.getUTCDay ( )"},{"type":"clause","id":"sec-date.prototype.getutcfullyear","aoid":null,"title":"Date.prototype.getUTCFullYear ( )","titleHTML":"Date.prototype.getUTCFullYear ( )","number":"20.3.4.14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.getUTCFullYear ( )"},{"type":"clause","id":"sec-date.prototype.getutchours","aoid":null,"title":"Date.prototype.getUTCHours ( )","titleHTML":"Date.prototype.getUTCHours ( )","number":"20.3.4.15","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.getUTCHours ( )"},{"type":"clause","id":"sec-date.prototype.getutcmilliseconds","aoid":null,"title":"Date.prototype.getUTCMilliseconds ( )","titleHTML":"Date.prototype.getUTCMilliseconds ( )","number":"20.3.4.16","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.getUTCMilliseconds ( )"},{"type":"clause","id":"sec-date.prototype.getutcminutes","aoid":null,"title":"Date.prototype.getUTCMinutes ( )","titleHTML":"Date.prototype.getUTCMinutes ( )","number":"20.3.4.17","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.getUTCMinutes ( )"},{"type":"clause","id":"sec-date.prototype.getutcmonth","aoid":null,"title":"Date.prototype.getUTCMonth ( )","titleHTML":"Date.prototype.getUTCMonth ( )","number":"20.3.4.18","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.getUTCMonth ( )"},{"type":"clause","id":"sec-date.prototype.getutcseconds","aoid":null,"title":"Date.prototype.getUTCSeconds ( )","titleHTML":"Date.prototype.getUTCSeconds ( )","number":"20.3.4.19","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.getUTCSeconds ( )"},{"type":"clause","id":"sec-date.prototype.setdate","aoid":null,"title":"Date.prototype.setDate ( date )","titleHTML":"Date.prototype.setDate ( <var>date</var> )","number":"20.3.4.20","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.setDate ( date )"},{"type":"clause","id":"sec-date.prototype.setfullyear","aoid":null,"title":"Date.prototype.setFullYear ( year [ , month [ , date ] ] )","titleHTML":"Date.prototype.setFullYear ( <var>year</var> [ , <var>month</var> [ , <var>date</var> ] ] )","number":"20.3.4.21","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.setFullYear ( year [ , month [ , date ] ] )"},{"type":"clause","id":"sec-date.prototype.sethours","aoid":null,"title":"Date.prototype.setHours ( hour [ , min [ , sec [ , ms ] ] ] )","titleHTML":"Date.prototype.setHours ( <var>hour</var> [ , <var>min</var> [ , <var>sec</var> [ , <var>ms</var> ] ] ] )","number":"20.3.4.22","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.setHours ( hour [ , min [ , sec [ , ms ] ] ] )"},{"type":"clause","id":"sec-date.prototype.setmilliseconds","aoid":null,"title":"Date.prototype.setMilliseconds ( ms )","titleHTML":"Date.prototype.setMilliseconds ( <var>ms</var> )","number":"20.3.4.23","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.setMilliseconds ( ms )"},{"type":"clause","id":"sec-date.prototype.setminutes","aoid":null,"title":"Date.prototype.setMinutes ( min [ , sec [ , ms ] ] )","titleHTML":"Date.prototype.setMinutes ( <var>min</var> [ , <var>sec</var> [ , <var>ms</var> ] ] )","number":"20.3.4.24","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.setMinutes ( min [ , sec [ , ms ] ] )"},{"type":"clause","id":"sec-date.prototype.setmonth","aoid":null,"title":"Date.prototype.setMonth ( month [ , date ] )","titleHTML":"Date.prototype.setMonth ( <var>month</var> [ , <var>date</var> ] )","number":"20.3.4.25","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.setMonth ( month [ , date ] )"},{"type":"clause","id":"sec-date.prototype.setseconds","aoid":null,"title":"Date.prototype.setSeconds ( sec [ , ms ] )","titleHTML":"Date.prototype.setSeconds ( <var>sec</var> [ , <var>ms</var> ] )","number":"20.3.4.26","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.setSeconds ( sec [ , ms ] )"},{"type":"clause","id":"sec-date.prototype.settime","aoid":null,"title":"Date.prototype.setTime ( time )","titleHTML":"Date.prototype.setTime ( <var>time</var> )","number":"20.3.4.27","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.setTime ( time )"},{"type":"clause","id":"sec-date.prototype.setutcdate","aoid":null,"title":"Date.prototype.setUTCDate ( date )","titleHTML":"Date.prototype.setUTCDate ( <var>date</var> )","number":"20.3.4.28","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.setUTCDate ( date )"},{"type":"clause","id":"sec-date.prototype.setutcfullyear","aoid":null,"title":"Date.prototype.setUTCFullYear ( year [ , month [ , date ] ] )","titleHTML":"Date.prototype.setUTCFullYear ( <var>year</var> [ , <var>month</var> [ , <var>date</var> ] ] )","number":"20.3.4.29","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.setUTCFullYear ( year [ , month [ , date ] ] )"},{"type":"clause","id":"sec-date.prototype.setutchours","aoid":null,"title":"Date.prototype.setUTCHours ( hour [ , min [ , sec [ , ms ] ] ] )","titleHTML":"Date.prototype.setUTCHours ( <var>hour</var> [ , <var>min</var> [ , <var>sec</var> [ , <var>ms</var> ] ] ] )","number":"20.3.4.30","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.setUTCHours ( hour [ , min [ , sec [ , ms ] ] ] )"},{"type":"clause","id":"sec-date.prototype.setutcmilliseconds","aoid":null,"title":"Date.prototype.setUTCMilliseconds ( ms )","titleHTML":"Date.prototype.setUTCMilliseconds ( <var>ms</var> )","number":"20.3.4.31","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.setUTCMilliseconds ( ms )"},{"type":"clause","id":"sec-date.prototype.setutcminutes","aoid":null,"title":"Date.prototype.setUTCMinutes ( min [ , sec [ , ms ] ] )","titleHTML":"Date.prototype.setUTCMinutes ( <var>min</var> [ , <var>sec</var> [ , <var>ms</var> ] ] )","number":"20.3.4.32","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.setUTCMinutes ( min [ , sec [ , ms ] ] )"},{"type":"clause","id":"sec-date.prototype.setutcmonth","aoid":null,"title":"Date.prototype.setUTCMonth ( month [ , date ] )","titleHTML":"Date.prototype.setUTCMonth ( <var>month</var> [ , <var>date</var> ] )","number":"20.3.4.33","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.setUTCMonth ( month [ , date ] )"},{"type":"clause","id":"sec-date.prototype.setutcseconds","aoid":null,"title":"Date.prototype.setUTCSeconds ( sec [ , ms ] )","titleHTML":"Date.prototype.setUTCSeconds ( <var>sec</var> [ , <var>ms</var> ] )","number":"20.3.4.34","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.setUTCSeconds ( sec [ , ms ] )"},{"type":"clause","id":"sec-date.prototype.todatestring","aoid":null,"title":"Date.prototype.toDateString ( )","titleHTML":"Date.prototype.toDateString ( )","number":"20.3.4.35","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.toDateString ( )"},{"type":"clause","id":"sec-date.prototype.toisostring","aoid":null,"title":"Date.prototype.toISOString ( )","titleHTML":"Date.prototype.toISOString ( )","number":"20.3.4.36","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_805"],"key":"Date.prototype.toISOString ( )"},{"type":"clause","id":"sec-date.prototype.tojson","aoid":null,"title":"Date.prototype.toJSON ( key )","titleHTML":"Date.prototype.toJSON ( <var>key</var> )","number":"20.3.4.37","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.toJSON ( key )"},{"type":"clause","id":"sec-date.prototype.tolocaledatestring","aoid":null,"title":"Date.prototype.toLocaleDateString ( [ reserved1 [ , reserved2 ] ] )","titleHTML":"Date.prototype.toLocaleDateString ( [ <var>reserved1</var> [ , <var>reserved2</var> ] ] )","number":"20.3.4.38","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.toLocaleDateString ( [ reserved1 [ , reserved2 ] ] )"},{"type":"clause","id":"sec-date.prototype.tolocalestring","aoid":null,"title":"Date.prototype.toLocaleString ( [ reserved1 [ , reserved2 ] ] )","titleHTML":"Date.prototype.toLocaleString ( [ <var>reserved1</var> [ , <var>reserved2</var> ] ] )","number":"20.3.4.39","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.toLocaleString ( [ reserved1 [ , reserved2 ] ] )"},{"type":"clause","id":"sec-date.prototype.tolocaletimestring","aoid":null,"title":"Date.prototype.toLocaleTimeString ( [ reserved1 [ , reserved2 ] ] )","titleHTML":"Date.prototype.toLocaleTimeString ( [ <var>reserved1</var> [ , <var>reserved2</var> ] ] )","number":"20.3.4.40","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.toLocaleTimeString ( [ reserved1 [ , reserved2 ] ] )"},{"type":"op","aoid":"TimeString","refId":"sec-timestring","location":"","referencingIds":[],"key":"TimeString"},{"type":"clause","id":"sec-timestring","aoid":"TimeString","title":"Runtime Semantics: TimeString ( tv )","titleHTML":"Runtime Semantics: TimeString ( <var>tv</var> )","number":"20.3.4.41.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_5731","_ref_5737","_ref_5746"],"key":"Runtime Semantics: TimeString ( tv )"},{"type":"table","id":"sec-todatestring-day-names","number":49,"caption":"Table 49: Names of days of the week","referencingIds":["_ref_518","_ref_520"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 49: Names of days of the week"},{"type":"table","id":"sec-todatestring-month-names","number":50,"caption":"Table 50: Names of months of the year","referencingIds":["_ref_519","_ref_521"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 50: Names of months of the year"},{"type":"op","aoid":"DateString","refId":"sec-datestring","location":"","referencingIds":[],"key":"DateString"},{"type":"clause","id":"sec-datestring","aoid":"DateString","title":"Runtime Semantics: DateString ( tv )","titleHTML":"Runtime Semantics: DateString ( <var>tv</var> )","number":"20.3.4.41.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_5692","_ref_5730"],"key":"Runtime Semantics: DateString ( tv )"},{"type":"op","aoid":"TimeZoneString","refId":"sec-timezoneestring","location":"","referencingIds":[],"key":"TimeZoneString"},{"type":"clause","id":"sec-timezoneestring","aoid":"TimeZoneString","title":"Runtime Semantics: TimeZoneString ( tv )","titleHTML":"Runtime Semantics: TimeZoneString ( <var>tv</var> )","number":"20.3.4.41.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_5732","_ref_5738"],"key":"Runtime Semantics: TimeZoneString ( tv )"},{"type":"op","aoid":"ToDateString","refId":"sec-todatestring","location":"","referencingIds":[],"key":"ToDateString"},{"type":"clause","id":"sec-todatestring","aoid":"ToDateString","title":"Runtime Semantics: ToDateString ( tv )","titleHTML":"Runtime Semantics: ToDateString ( <var>tv</var> )","number":"20.3.4.41.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_5413","_ref_5431","_ref_5445","_ref_5700"],"key":"Runtime Semantics: ToDateString ( tv )"},{"type":"clause","id":"sec-date.prototype.tostring","aoid":null,"title":"Date.prototype.toString ( )","titleHTML":"Date.prototype.toString ( )","number":"20.3.4.41","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_807"],"key":"Date.prototype.toString ( )"},{"type":"clause","id":"sec-date.prototype.totimestring","aoid":null,"title":"Date.prototype.toTimeString ( )","titleHTML":"Date.prototype.toTimeString ( )","number":"20.3.4.42","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.toTimeString ( )"},{"type":"clause","id":"sec-date.prototype.toutcstring","aoid":null,"title":"Date.prototype.toUTCString ( )","titleHTML":"Date.prototype.toUTCString ( )","number":"20.3.4.43","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.toUTCString ( )"},{"type":"clause","id":"sec-date.prototype.valueof","aoid":null,"title":"Date.prototype.valueOf ( )","titleHTML":"Date.prototype.valueOf ( )","number":"20.3.4.44","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.valueOf ( )"},{"type":"clause","id":"sec-date.prototype-@@toprimitive","aoid":null,"title":"Date.prototype [ @@toPrimitive ] ( hint )","titleHTML":"Date.prototype [ @@toPrimitive ] ( <var>hint</var> )","number":"20.3.4.45","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_132"],"key":"Date.prototype [ @@toPrimitive ] ( hint )"},{"type":"clause","id":"sec-properties-of-the-date-prototype-object","aoid":null,"title":"Properties of the Date Prototype Object","titleHTML":"Properties of the Date Prototype Object","number":"20.3.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_847","_ref_1053","_ref_5433","_ref_5456","_ref_5475","_ref_5478","_ref_5481","_ref_5484","_ref_5487","_ref_5490","_ref_5493","_ref_5496","_ref_5499","_ref_5500","_ref_5503","_ref_5505","_ref_5507","_ref_5509","_ref_5511","_ref_5513","_ref_5515","_ref_5517","_ref_5520","_ref_5530","_ref_5544","_ref_5559","_ref_5571","_ref_5585","_ref_5597","_ref_5609","_ref_5613","_ref_5622","_ref_5633","_ref_5646","_ref_5656","_ref_5668","_ref_5678","_ref_5690","_ref_5699","_ref_5734","_ref_5740","_ref_5747","_ref_8702","_ref_8705"],"key":"Properties of the Date Prototype Object"},{"type":"clause","id":"sec-properties-of-date-instances","aoid":null,"title":"Properties of Date Instances","titleHTML":"Properties of Date Instances","number":"20.3.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of Date Instances"},{"type":"clause","id":"sec-date-objects","aoid":null,"title":"Date Objects","titleHTML":"Date Objects","number":"20.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date Objects"},{"type":"clause","id":"sec-numbers-and-dates","aoid":null,"title":"Numbers and Dates","titleHTML":"Numbers and Dates","number":"20","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Numbers and Dates"},{"type":"term","term":"%String%","refId":"sec-string-constructor","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%String%"},{"type":"clause","id":"sec-string-constructor-string-value","aoid":null,"title":"String ( value )","titleHTML":"String ( <var>value</var> )","number":"21.1.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_5"],"key":"String ( value )"},{"type":"clause","id":"sec-string-constructor","aoid":null,"title":"The String Constructor","titleHTML":"The String Constructor","number":"21.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_108","_ref_453","_ref_1165","_ref_1170","_ref_5811"],"key":"The String Constructor"},{"type":"clause","id":"sec-string.fromcharcode","aoid":null,"title":"String.fromCharCode ( ...codeUnits )","titleHTML":"String.fromCharCode ( ...<var>codeUnits</var> )","number":"21.1.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.fromCharCode ( ...codeUnits )"},{"type":"clause","id":"sec-string.fromcodepoint","aoid":null,"title":"String.fromCodePoint ( ...codePoints )","titleHTML":"String.fromCodePoint ( ...<var>codePoints</var> )","number":"21.1.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.fromCodePoint ( ...codePoints )"},{"type":"clause","id":"sec-string.prototype","aoid":null,"title":"String.prototype","titleHTML":"String.prototype","number":"21.1.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype"},{"type":"clause","id":"sec-string.raw","aoid":null,"title":"String.raw ( template, ...substitutions )","titleHTML":"String.raw ( <var>template</var>, ...<var>substitutions</var> )","number":"21.1.2.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.raw ( template, ...substitutions )"},{"type":"clause","id":"sec-properties-of-the-string-constructor","aoid":null,"title":"Properties of the String Constructor","titleHTML":"Properties of the String Constructor","number":"21.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of the String Constructor"},{"type":"term","term":"%StringPrototype%","refId":"sec-properties-of-the-string-prototype-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%StringPrototype%"},{"type":"term","term":"thisStringValue","refId":"sec-properties-of-the-string-prototype-object","referencingIds":["_ref_5948","_ref_5955"],"id":"sec-thisstringvalue","namespace":"https://tc39.github.io/ecma262/","location":"","key":"thisStringValue"},{"type":"clause","id":"sec-string.prototype.charat","aoid":null,"title":"String.prototype.charAt ( pos )","titleHTML":"String.prototype.charAt ( <var>pos</var> )","number":"21.1.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.charAt ( pos )"},{"type":"clause","id":"sec-string.prototype.charcodeat","aoid":null,"title":"String.prototype.charCodeAt ( pos )","titleHTML":"String.prototype.charCodeAt ( <var>pos</var> )","number":"21.1.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.charCodeAt ( pos )"},{"type":"clause","id":"sec-string.prototype.codepointat","aoid":null,"title":"String.prototype.codePointAt ( pos )","titleHTML":"String.prototype.codePointAt ( <var>pos</var> )","number":"21.1.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.codePointAt ( pos )"},{"type":"clause","id":"sec-string.prototype.concat","aoid":null,"title":"String.prototype.concat ( ...args )","titleHTML":"String.prototype.concat ( ...<var>args</var> )","number":"21.1.3.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.concat ( ...args )"},{"type":"clause","id":"sec-string.prototype.constructor","aoid":null,"title":"String.prototype.constructor","titleHTML":"String.prototype.constructor","number":"21.1.3.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.constructor"},{"type":"clause","id":"sec-string.prototype.endswith","aoid":null,"title":"String.prototype.endsWith ( searchString [ , endPosition ] )","titleHTML":"String.prototype.endsWith ( <var>searchString</var> [ , <var>endPosition</var> ] )","number":"21.1.3.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.endsWith ( searchString [ , endPosition ] )"},{"type":"clause","id":"sec-string.prototype.includes","aoid":null,"title":"String.prototype.includes ( searchString [ , position ] )","titleHTML":"String.prototype.includes ( <var>searchString</var> [ , <var>position</var> ] )","number":"21.1.3.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.includes ( searchString [ , position ] )"},{"type":"clause","id":"sec-string.prototype.indexof","aoid":null,"title":"String.prototype.indexOf ( searchString [ , position ] )","titleHTML":"String.prototype.indexOf ( <var>searchString</var> [ , <var>position</var> ] )","number":"21.1.3.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.indexOf ( searchString [ , position ] )"},{"type":"clause","id":"sec-string.prototype.lastindexof","aoid":null,"title":"String.prototype.lastIndexOf ( searchString [ , position ] )","titleHTML":"String.prototype.lastIndexOf ( <var>searchString</var> [ , <var>position</var> ] )","number":"21.1.3.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.lastIndexOf ( searchString [ , position ] )"},{"type":"clause","id":"sec-string.prototype.localecompare","aoid":null,"title":"String.prototype.localeCompare ( that [ , reserved1 [ , reserved2 ] ] )","titleHTML":"String.prototype.localeCompare ( <var>that</var> [ , <var>reserved1</var> [ , <var>reserved2</var> ] ] )","number":"21.1.3.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_23","_ref_848"],"key":"String.prototype.localeCompare ( that [ , reserved1 [ , reserved2 ] ] )"},{"type":"clause","id":"sec-string.prototype.match","aoid":null,"title":"String.prototype.match ( regexp )","titleHTML":"String.prototype.match ( <var>regexp</var> )","number":"21.1.3.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_28"],"key":"String.prototype.match ( regexp )"},{"type":"clause","id":"sec-string.prototype.normalize","aoid":null,"title":"String.prototype.normalize ( [ form ] )","titleHTML":"String.prototype.normalize ( [ <var>form</var> ] )","number":"21.1.3.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_22"],"key":"String.prototype.normalize ( [ form ] )"},{"type":"clause","id":"sec-string.prototype.padend","aoid":null,"title":"String.prototype.padEnd ( maxLength [ , fillString ] )","titleHTML":"String.prototype.padEnd ( <var>maxLength</var> [ , <var>fillString</var> ] )","number":"21.1.3.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.padEnd ( maxLength [ , fillString ] )"},{"type":"clause","id":"sec-string.prototype.padstart","aoid":null,"title":"String.prototype.padStart ( maxLength [ , fillString ] )","titleHTML":"String.prototype.padStart ( <var>maxLength</var> [ , <var>fillString</var> ] )","number":"21.1.3.14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.padStart ( maxLength [ , fillString ] )"},{"type":"clause","id":"sec-string.prototype.repeat","aoid":null,"title":"String.prototype.repeat ( count )","titleHTML":"String.prototype.repeat ( <var>count</var> )","number":"21.1.3.15","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.repeat ( count )"},{"type":"table","id":"table-45","number":51,"caption":"Table 51: Replacement Text Symbol Substitutions","referencingIds":["_ref_526"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 51: Replacement Text Symbol Substitutions"},{"type":"op","aoid":"GetSubstitution","refId":"sec-getsubstitution","location":"","referencingIds":[],"key":"GetSubstitution"},{"type":"clause","id":"sec-getsubstitution","aoid":"GetSubstitution","title":"Runtime Semantics: GetSubstitution ( matched, str, position, captures, namedCaptures, replacement )","titleHTML":"Runtime Semantics: GetSubstitution ( <var>matched</var>, <var>str</var>, <var>position</var>, <var>captures</var>, <var>namedCaptures</var>, <var>replacement</var> )","number":"21.1.3.16.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_5877","_ref_6250"],"key":"Runtime Semantics: GetSubstitution ( matched, str, position, captures, namedCaptures, replacement )"},{"type":"clause","id":"sec-string.prototype.replace","aoid":null,"title":"String.prototype.replace ( searchValue, replaceValue )","titleHTML":"String.prototype.replace ( <var>searchValue</var>, <var>replaceValue</var> )","number":"21.1.3.16","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_29"],"key":"String.prototype.replace ( searchValue, replaceValue )"},{"type":"clause","id":"sec-string.prototype.search","aoid":null,"title":"String.prototype.search ( regexp )","titleHTML":"String.prototype.search ( <var>regexp</var> )","number":"21.1.3.17","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_30"],"key":"String.prototype.search ( regexp )"},{"type":"clause","id":"sec-string.prototype.slice","aoid":null,"title":"String.prototype.slice ( start, end )","titleHTML":"String.prototype.slice ( <var>start</var>, <var>end</var> )","number":"21.1.3.18","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.slice ( start, end )"},{"type":"op","aoid":"SplitMatch","refId":"sec-splitmatch","location":"","referencingIds":[],"key":"SplitMatch"},{"type":"clause","id":"sec-splitmatch","aoid":"SplitMatch","title":"Runtime Semantics: SplitMatch ( S, q, R )","titleHTML":"Runtime Semantics: SplitMatch ( <var>S</var>, <var>q</var>, <var>R</var> )","number":"21.1.3.19.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_5915","_ref_5917"],"key":"Runtime Semantics: SplitMatch ( S, q, R )"},{"type":"clause","id":"sec-string.prototype.split","aoid":null,"title":"String.prototype.split ( separator, limit )","titleHTML":"String.prototype.split ( <var>separator</var>, <var>limit</var> )","number":"21.1.3.19","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_31"],"key":"String.prototype.split ( separator, limit )"},{"type":"clause","id":"sec-string.prototype.startswith","aoid":null,"title":"String.prototype.startsWith ( searchString [ , position ] )","titleHTML":"String.prototype.startsWith ( <var>searchString</var> [ , <var>position</var> ] )","number":"21.1.3.20","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.startsWith ( searchString [ , position ] )"},{"type":"clause","id":"sec-string.prototype.substring","aoid":null,"title":"String.prototype.substring ( start, end )","titleHTML":"String.prototype.substring ( <var>start</var>, <var>end</var> )","number":"21.1.3.21","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.substring ( start, end )"},{"type":"clause","id":"sec-string.prototype.tolocalelowercase","aoid":null,"title":"String.prototype.toLocaleLowerCase ( [ reserved1 [ , reserved2 ] ] )","titleHTML":"String.prototype.toLocaleLowerCase ( [ <var>reserved1</var> [ , <var>reserved2</var> ] ] )","number":"21.1.3.22","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.toLocaleLowerCase ( [ reserved1 [ , reserved2 ] ] )"},{"type":"clause","id":"sec-string.prototype.tolocaleuppercase","aoid":null,"title":"String.prototype.toLocaleUpperCase ( [ reserved1 [ , reserved2 ] ] )","titleHTML":"String.prototype.toLocaleUpperCase ( [ <var>reserved1</var> [ , <var>reserved2</var> ] ] )","number":"21.1.3.23","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.toLocaleUpperCase ( [ reserved1 [ , reserved2 ] ] )"},{"type":"clause","id":"sec-string.prototype.tolowercase","aoid":null,"title":"String.prototype.toLowerCase ( )","titleHTML":"String.prototype.toLowerCase ( )","number":"21.1.3.24","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_849"],"key":"String.prototype.toLowerCase ( )"},{"type":"clause","id":"sec-string.prototype.tostring","aoid":null,"title":"String.prototype.toString ( )","titleHTML":"String.prototype.toString ( )","number":"21.1.3.25","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.toString ( )"},{"type":"clause","id":"sec-string.prototype.touppercase","aoid":null,"title":"String.prototype.toUpperCase ( )","titleHTML":"String.prototype.toUpperCase ( )","number":"21.1.3.26","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_850"],"key":"String.prototype.toUpperCase ( )"},{"type":"op","aoid":"TrimString","refId":"sec-trimstring","location":"","referencingIds":[],"key":"TrimString"},{"type":"clause","id":"sec-trimstring","aoid":"TrimString","title":"Runtime Semantics: TrimString ( string, where )","titleHTML":"Runtime Semantics: TrimString ( <var>string</var>, <var>where</var> )","number":"21.1.3.27.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_5949","_ref_5953","_ref_5954"],"key":"Runtime Semantics: TrimString ( string, where )"},{"type":"clause","id":"sec-string.prototype.trim","aoid":null,"title":"String.prototype.trim ( )","titleHTML":"String.prototype.trim ( )","number":"21.1.3.27","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_851"],"key":"String.prototype.trim ( )"},{"type":"clause","id":"sec-string.prototype.trimend","aoid":null,"title":"String.prototype.trimEnd ( )","titleHTML":"String.prototype.trimEnd ( )","number":"21.1.3.28","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.trimEnd ( )"},{"type":"clause","id":"sec-string.prototype.trimstart","aoid":null,"title":"String.prototype.trimStart ( )","titleHTML":"String.prototype.trimStart ( )","number":"21.1.3.29","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.trimStart ( )"},{"type":"clause","id":"sec-string.prototype.valueof","aoid":null,"title":"String.prototype.valueOf ( )","titleHTML":"String.prototype.valueOf ( )","number":"21.1.3.30","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.valueOf ( )"},{"type":"clause","id":"sec-string.prototype-@@iterator","aoid":null,"title":"String.prototype [ @@iterator ] ( )","titleHTML":"String.prototype [ @@iterator ] ( )","number":"21.1.3.31","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype [ @@iterator ] ( )"},{"type":"clause","id":"sec-properties-of-the-string-prototype-object","aoid":null,"title":"Properties of the String Prototype Object","titleHTML":"Properties of the String Prototype Object","number":"21.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1168","_ref_5775"],"key":"Properties of the String Prototype Object"},{"type":"clause","id":"sec-properties-of-string-instances-length","aoid":null,"title":"length","titleHTML":"length","number":"21.1.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"length"},{"type":"clause","id":"sec-properties-of-string-instances","aoid":null,"title":"Properties of String Instances","titleHTML":"Properties of String Instances","number":"21.1.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of String Instances"},{"type":"op","aoid":"CreateStringIterator","refId":"sec-createstringiterator","location":"","referencingIds":[],"key":"CreateStringIterator"},{"type":"clause","id":"sec-createstringiterator","aoid":"CreateStringIterator","title":"CreateStringIterator ( string )","titleHTML":"CreateStringIterator ( <var>string</var> )","number":"21.1.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_5958"],"key":"CreateStringIterator ( string )"},{"type":"term","term":"%StringIteratorPrototype%","refId":"sec-%stringiteratorprototype%-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%StringIteratorPrototype%"},{"type":"clause","id":"sec-%stringiteratorprototype%.next","aoid":null,"title":"%StringIteratorPrototype%.next ( )","titleHTML":"%StringIteratorPrototype%.next ( )","number":"21.1.5.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%StringIteratorPrototype%.next ( )"},{"type":"clause","id":"sec-%stringiteratorprototype%-@@tostringtag","aoid":null,"title":"%StringIteratorPrototype% [ @@toStringTag ]","titleHTML":"%StringIteratorPrototype% [ @@toStringTag ]","number":"21.1.5.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%StringIteratorPrototype% [ @@toStringTag ]"},{"type":"clause","id":"sec-%stringiteratorprototype%-object","aoid":null,"title":"The %StringIteratorPrototype% Object","titleHTML":"The %StringIteratorPrototype% Object","number":"21.1.5.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1167","_ref_5963","_ref_5970"],"key":"The %StringIteratorPrototype% Object"},{"type":"table","id":"table-46","number":52,"caption":"Table 52: Internal Slots of String Iterator Instances","referencingIds":["_ref_539"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 52: Internal Slots of String Iterator Instances"},{"type":"clause","id":"sec-properties-of-string-iterator-instances","aoid":null,"title":"Properties of String Iterator Instances","titleHTML":"Properties of String Iterator Instances","number":"21.1.5.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_538"],"key":"Properties of String Iterator Instances"},{"type":"clause","id":"sec-string-iterator-objects","aoid":null,"title":"String Iterator Objects","titleHTML":"String Iterator Objects","number":"21.1.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_109"],"key":"String Iterator Objects"},{"type":"clause","id":"sec-string-objects","aoid":null,"title":"String Objects","titleHTML":"String Objects","number":"21.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_147"],"key":"String Objects"},{"type":"production","id":"prod-Pattern","name":"Pattern","referencingIds":["_ref_8803","_ref_10045","_ref_14361","_ref_14467","_ref_14475","_ref_14564","_ref_14565","_ref_14566","_ref_14693","_ref_14784","_ref_14786","_ref_14787","_ref_14789","_ref_14790","_ref_14791","_ref_14792","_ref_14801"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Pattern"},{"type":"production","id":"prod-Disjunction","name":"Disjunction","referencingIds":["_ref_14362","_ref_14365","_ref_14372","_ref_14373","_ref_14374","_ref_14375","_ref_14386","_ref_14387","_ref_14466","_ref_14571","_ref_14573","_ref_14574","_ref_14575","_ref_14579","_ref_14581","_ref_14583","_ref_14585","_ref_14588","_ref_14612","_ref_14616","_ref_14639","_ref_14640","_ref_14641","_ref_14642","_ref_14643","_ref_14644","_ref_14645","_ref_14646","_ref_14667","_ref_14668","_ref_14671","_ref_14673","_ref_14674","_ref_14675","_ref_14676","_ref_14677","_ref_14678","_ref_14679","_ref_14680","_ref_14681","_ref_14682","_ref_14683","_ref_14684","_ref_14685","_ref_14701","_ref_14954","_ref_14955","_ref_14957","_ref_14958","_ref_14959","_ref_14960","_ref_14963","_ref_14964","_ref_15011","_ref_15013","_ref_15014","_ref_15033","_ref_15034"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Disjunction"},{"type":"production","id":"prod-Alternative","name":"Alternative","referencingIds":["_ref_14363","_ref_14364","_ref_14366","_ref_14576","_ref_14577","_ref_14578","_ref_14580","_ref_14582","_ref_14584","_ref_14586","_ref_14587","_ref_14589","_ref_14590","_ref_14592","_ref_14595","_ref_14599","_ref_14600"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Alternative"},{"type":"production","id":"prod-Term","name":"Term","referencingIds":["_ref_14367","_ref_14591","_ref_14593","_ref_14594","_ref_14596","_ref_14597","_ref_14598","_ref_14601","_ref_14610","_ref_14613"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Term"},{"type":"production","id":"prod-Assertion","name":"Assertion","referencingIds":["_ref_14368","_ref_14602","_ref_14603"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Assertion"},{"type":"production","id":"prod-Quantifier","name":"Quantifier","referencingIds":["_ref_14371","_ref_14607","_ref_14609","_ref_14619","_ref_14620","_ref_14621","_ref_14947","_ref_14949","_ref_14952","_ref_15016","_ref_15018","_ref_15022","_ref_15024"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Quantifier"},{"type":"production","id":"prod-QuantifierPrefix","name":"QuantifierPrefix","referencingIds":["_ref_14376","_ref_14377","_ref_14647","_ref_14648","_ref_14649","_ref_14650"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"QuantifierPrefix"},{"type":"production","id":"prod-Atom","name":"Atom","referencingIds":["_ref_14369","_ref_14370","_ref_14604","_ref_14605","_ref_14606","_ref_14608","_ref_14614","_ref_14617","_ref_14618","_ref_14622","_ref_14623","_ref_14624","_ref_14625","_ref_14626","_ref_14627","_ref_14628","_ref_14629","_ref_14630","_ref_14631","_ref_14632","_ref_14633","_ref_14634","_ref_14635","_ref_14636","_ref_14669","_ref_14672"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Atom"},{"type":"production","id":"prod-SyntaxCharacter","name":"SyntaxCharacter","referencingIds":["_ref_14389","_ref_14426","_ref_14985"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"SyntaxCharacter"},{"type":"production","id":"prod-PatternCharacter","name":"PatternCharacter","referencingIds":["_ref_14382","_ref_14659","_ref_14660","_ref_15039"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"PatternCharacter"},{"type":"production","id":"prod-AtomEscape","name":"AtomEscape","referencingIds":["_ref_14383","_ref_14662","_ref_14663"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"AtomEscape"},{"type":"production","id":"prod-CharacterEscape","name":"CharacterEscape","referencingIds":["_ref_14392","_ref_14465","_ref_14523","_ref_14688","_ref_14689","_ref_14703","_ref_14710","_ref_14774"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"CharacterEscape"},{"type":"production","id":"prod-ControlEscape","name":"ControlEscape","referencingIds":["_ref_14394","_ref_14527","_ref_14704","_ref_14978"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ControlEscape"},{"type":"production","id":"prod-ControlLetter","name":"ControlLetter","referencingIds":["_ref_14395","_ref_14445","_ref_14528","_ref_14529","_ref_14705","_ref_14979"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ControlLetter"},{"type":"production","id":"prod-GroupSpecifier","name":"GroupSpecifier","referencingIds":["_ref_14385","_ref_14468","_ref_14476","_ref_14570","_ref_14572","_ref_14611","_ref_14615","_ref_14666","_ref_14670","_ref_14694","_ref_14698","_ref_14699","_ref_14700","_ref_14702","_ref_15010","_ref_15012"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"GroupSpecifier"},{"type":"production","id":"prod-GroupName","name":"GroupName","referencingIds":["_ref_14393","_ref_14400","_ref_14474","_ref_14479","_ref_14692","_ref_14697","_ref_14785","_ref_14797","_ref_14798","_ref_14977"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"GroupName"},{"type":"production","id":"prod-RegExpIdentifierName","name":"RegExpIdentifierName","referencingIds":["_ref_14401","_ref_14403","_ref_14469","_ref_14477","_ref_14478","_ref_14558","_ref_14560","_ref_14563","_ref_14695","_ref_14696","_ref_14799"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"RegExpIdentifierName"},{"type":"production","id":"prod-RegExpIdentifierStart","name":"RegExpIdentifierStart","referencingIds":["_ref_14402","_ref_14557"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"RegExpIdentifierStart"},{"type":"production","id":"prod-RegExpIdentifierPart","name":"RegExpIdentifierPart","referencingIds":["_ref_14404","_ref_14559"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"RegExpIdentifierPart"},{"type":"production","id":"prod-RegExpUnicodeEscapeSequence","name":"RegExpUnicodeEscapeSequence","referencingIds":["_ref_14398","_ref_14406","_ref_14408","_ref_14500","_ref_14501","_ref_14503","_ref_14504","_ref_14561","_ref_14562","_ref_14708","_ref_14982"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"RegExpUnicodeEscapeSequence"},{"type":"production","id":"prod-LeadSurrogate","name":"LeadSurrogate","referencingIds":["_ref_14409","_ref_14411","_ref_14417","_ref_14418","_ref_14533","_ref_14535","_ref_14537","_ref_14538","_ref_14828","_ref_14829"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"LeadSurrogate"},{"type":"production","id":"prod-TrailSurrogate","name":"TrailSurrogate","referencingIds":["_ref_14410","_ref_14412","_ref_14416","_ref_14419","_ref_14534","_ref_14536","_ref_14539","_ref_14540","_ref_14827","_ref_14830"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"TrailSurrogate"},{"type":"production","id":"prod-NonSurrogate","name":"NonSurrogate","referencingIds":["_ref_14413","_ref_14541","_ref_14542"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"NonSurrogate"},{"type":"production","id":"prod-IdentityEscape","name":"IdentityEscape","referencingIds":["_ref_14283","_ref_14399","_ref_14551","_ref_14552","_ref_14709"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"IdentityEscape"},{"type":"production","id":"prod-DecimalEscape","name":"DecimalEscape","referencingIds":["_ref_14390","_ref_14480","_ref_14481","_ref_14686","_ref_14687","_ref_14711","_ref_14714","_ref_14972","_ref_14973","_ref_14974"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"DecimalEscape"},{"type":"production","id":"prod-CharacterClassEscape","name":"CharacterClassEscape","referencingIds":["_ref_14391","_ref_14464","_ref_14524","_ref_14690","_ref_14691","_ref_14776","_ref_14777","_ref_14975","_ref_14992"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"CharacterClassEscape"},{"type":"production","id":"prod-UnicodePropertyValueExpression","name":"UnicodePropertyValueExpression","referencingIds":["_ref_14432","_ref_14433","_ref_14717","_ref_14718","_ref_14719","_ref_14720"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"UnicodePropertyValueExpression"},{"type":"production","id":"prod-UnicodePropertyName","name":"UnicodePropertyName","referencingIds":["_ref_14434","_ref_14506","_ref_14508","_ref_14510","_ref_14721","_ref_14723"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"UnicodePropertyName"},{"type":"production","id":"prod-UnicodePropertyNameCharacters","name":"UnicodePropertyNameCharacters","referencingIds":["_ref_14437","_ref_14439","_ref_14554"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"UnicodePropertyNameCharacters"},{"type":"production","id":"prod-UnicodePropertyValue","name":"UnicodePropertyValue","referencingIds":["_ref_14435","_ref_14507","_ref_14509","_ref_14722","_ref_14724"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"UnicodePropertyValue"},{"type":"production","id":"prod-LoneUnicodePropertyNameOrValue","name":"LoneUnicodePropertyNameOrValue","referencingIds":["_ref_14436","_ref_14511","_ref_14512","_ref_14725","_ref_14726"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"LoneUnicodePropertyNameOrValue"},{"type":"production","id":"prod-UnicodePropertyValueCharacters","name":"UnicodePropertyValueCharacters","referencingIds":["_ref_14440","_ref_14441","_ref_14443","_ref_14556"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"UnicodePropertyValueCharacters"},{"type":"production","id":"prod-UnicodePropertyValueCharacter","name":"UnicodePropertyValueCharacter","referencingIds":["_ref_14442","_ref_14555"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"UnicodePropertyValueCharacter"},{"type":"production","id":"prod-UnicodePropertyNameCharacter","name":"UnicodePropertyNameCharacter","referencingIds":["_ref_14438","_ref_14444","_ref_14553"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"UnicodePropertyNameCharacter"},{"type":"production","id":"prod-CharacterClass","name":"CharacterClass","referencingIds":["_ref_14384","_ref_14664","_ref_14665","_ref_14779","_ref_14962"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"CharacterClass"},{"type":"production","id":"prod-ClassRanges","name":"ClassRanges","referencingIds":["_ref_14446","_ref_14447","_ref_14454","_ref_14460","_ref_14484","_ref_14493","_ref_14727","_ref_14728","_ref_14729","_ref_14730","_ref_14741","_ref_14744","_ref_14753","_ref_14756","_ref_14757","_ref_14760","_ref_14766","_ref_14998","_ref_15003","_ref_15049","_ref_15052","_ref_15055","_ref_15058"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ClassRanges"},{"type":"production","id":"prod-NonemptyClassRanges","name":"NonemptyClassRanges","referencingIds":["_ref_14448","_ref_14731","_ref_14732"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"NonemptyClassRanges"},{"type":"production","id":"prod-NonemptyClassRangesNoDash","name":"NonemptyClassRangesNoDash","referencingIds":["_ref_14451","_ref_14457","_ref_14736","_ref_14738","_ref_14748","_ref_14750"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"NonemptyClassRangesNoDash"},{"type":"production","id":"prod-ClassAtom","name":"ClassAtom","referencingIds":["_ref_14449","_ref_14450","_ref_14452","_ref_14453","_ref_14455","_ref_14459","_ref_14482","_ref_14483","_ref_14485","_ref_14486","_ref_14487","_ref_14488","_ref_14489","_ref_14490","_ref_14492","_ref_14495","_ref_14497","_ref_14499","_ref_14733","_ref_14734","_ref_14735","_ref_14737","_ref_14739","_ref_14740","_ref_14742","_ref_14743","_ref_14745","_ref_14746","_ref_14752","_ref_14755","_ref_14758","_ref_14759","_ref_14761","_ref_14762","_ref_14763","_ref_14764","_ref_14765","_ref_14778","_ref_14780","_ref_14996","_ref_14997","_ref_14999","_ref_15000","_ref_15002","_ref_15005","_ref_15047","_ref_15048","_ref_15050","_ref_15051","_ref_15054","_ref_15057"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ClassAtom"},{"type":"production","id":"prod-ClassAtomNoDash","name":"ClassAtomNoDash","referencingIds":["_ref_14456","_ref_14458","_ref_14461","_ref_14491","_ref_14494","_ref_14496","_ref_14498","_ref_14747","_ref_14749","_ref_14751","_ref_14754","_ref_14767","_ref_14768"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ClassAtomNoDash"},{"type":"production","id":"prod-ClassEscape","name":"ClassEscape","referencingIds":["_ref_14463","_ref_14771","_ref_14772","_ref_14773","_ref_14775"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ClassEscape"},{"type":"clause","id":"sec-patterns-static-semantics-early-errors","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"21.2.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_728"],"key":"Static Semantics: Early Errors"},{"type":"clause","id":"sec-patterns-static-semantics-capturing-group-number","aoid":null,"title":"Static Semantics: CapturingGroupNumber","titleHTML":"Static Semantics: CapturingGroupNumber","number":"21.2.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: CapturingGroupNumber"},{"type":"clause","id":"sec-patterns-static-semantics-is-character-class","aoid":null,"title":"Static Semantics: IsCharacterClass","titleHTML":"Static Semantics: IsCharacterClass","number":"21.2.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_729"],"key":"Static Semantics: IsCharacterClass"},{"type":"table","id":"table-47","number":53,"caption":"Table 53: ControlEscape Code Point Values","referencingIds":["_ref_547"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 53: ControlEscape Code Point Values"},{"type":"clause","id":"sec-patterns-static-semantics-character-value","aoid":null,"title":"Static Semantics: CharacterValue","titleHTML":"Static Semantics: CharacterValue","number":"21.2.1.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_730"],"key":"Static Semantics: CharacterValue"},{"type":"clause","id":"sec-static-semantics-sourcetext","aoid":null,"title":"Static Semantics: SourceText","titleHTML":"Static Semantics: SourceText","number":"21.2.1.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: SourceText"},{"type":"clause","id":"sec-regexp-identifier-names-static-semantics-stringvalue","aoid":null,"title":"Static Semantics: StringValue","titleHTML":"Static Semantics: StringValue","number":"21.2.1.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: StringValue"},{"type":"clause","id":"sec-patterns","aoid":null,"title":"Patterns","titleHTML":"Patterns","number":"21.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_10","_ref_296","_ref_297","_ref_316","_ref_386","_ref_568","_ref_569","_ref_727"],"key":"Patterns"},{"type":"clause","id":"sec-notation","aoid":null,"title":"Notation","titleHTML":"Notation","number":"21.2.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_540","_ref_564","_ref_573"],"key":"Notation"},{"type":"clause","id":"sec-pattern","aoid":null,"title":"Pattern","titleHTML":"Pattern","number":"21.2.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Pattern"},{"type":"clause","id":"sec-disjunction","aoid":null,"title":"Disjunction","titleHTML":"Disjunction","number":"21.2.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Disjunction"},{"type":"clause","id":"sec-alternative","aoid":null,"title":"Alternative","titleHTML":"Alternative","number":"21.2.2.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Alternative"},{"type":"op","aoid":"RepeatMatcher","refId":"sec-runtime-semantics-repeatmatcher-abstract-operation","location":"","referencingIds":[],"key":"RepeatMatcher"},{"type":"clause","id":"sec-runtime-semantics-repeatmatcher-abstract-operation","aoid":"RepeatMatcher","title":"Runtime Semantics: RepeatMatcher ( m, min, max, greedy, x, c, parenIndex, parenCount )","titleHTML":"Runtime Semantics: RepeatMatcher ( <var>m</var>, <var>min</var>, <var>max</var>, <var>greedy</var>, <var>x</var>, <var>c</var>, <var>parenIndex</var>, <var>parenCount</var> )","number":"21.2.2.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_6005","_ref_6006"],"key":"Runtime Semantics: RepeatMatcher ( m, min, max, greedy, x, c, parenIndex, parenCount )"},{"type":"clause","id":"sec-term","aoid":null,"title":"Term","titleHTML":"Term","number":"21.2.2.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_733","_ref_734"],"key":"Term"},{"type":"op","aoid":"WordCharacters","refId":"sec-runtime-semantics-wordcharacters-abstract-operation","location":"","referencingIds":[],"key":"WordCharacters"},{"type":"clause","id":"sec-runtime-semantics-wordcharacters-abstract-operation","aoid":"WordCharacters","title":"Runtime Semantics: WordCharacters ( )","titleHTML":"Runtime Semantics: WordCharacters ( )","number":"21.2.2.6.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_6016","_ref_6069"],"key":"Runtime Semantics: WordCharacters ( )"},{"type":"op","aoid":"IsWordChar","refId":"sec-runtime-semantics-iswordchar-abstract-operation","location":"","referencingIds":[],"key":"IsWordChar"},{"type":"clause","id":"sec-runtime-semantics-iswordchar-abstract-operation","aoid":"IsWordChar","title":"Runtime Semantics: IsWordChar ( e )","titleHTML":"Runtime Semantics: IsWordChar ( <var>e</var> )","number":"21.2.2.6.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_6008","_ref_6009","_ref_6010","_ref_6011"],"key":"Runtime Semantics: IsWordChar ( e )"},{"type":"clause","id":"sec-assertion","aoid":null,"title":"Assertion","titleHTML":"Assertion","number":"21.2.2.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_735","_ref_736"],"key":"Assertion"},{"type":"clause","id":"sec-quantifier","aoid":null,"title":"Quantifier","titleHTML":"Quantifier","number":"21.2.2.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Quantifier"},{"type":"op","aoid":"CharacterSetMatcher","refId":"sec-runtime-semantics-charactersetmatcher-abstract-operation","location":"","referencingIds":[],"key":"CharacterSetMatcher"},{"type":"clause","id":"sec-runtime-semantics-charactersetmatcher-abstract-operation","aoid":"CharacterSetMatcher","title":"Runtime Semantics: CharacterSetMatcher ( A, invert, direction )","titleHTML":"Runtime Semantics: CharacterSetMatcher ( <var>A</var>, <var>invert</var>, <var>direction</var> )","number":"21.2.2.8.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_6017","_ref_6018","_ref_6019","_ref_6061","_ref_6062","_ref_8638","_ref_8639"],"key":"Runtime Semantics: CharacterSetMatcher ( A, invert, direction )"},{"type":"op","aoid":"Canonicalize","refId":"sec-runtime-semantics-canonicalize-ch","location":"","referencingIds":[],"key":"Canonicalize"},{"type":"clause","id":"sec-runtime-semantics-canonicalize-ch","aoid":"Canonicalize","title":"Runtime Semantics: Canonicalize ( ch )","titleHTML":"Runtime Semantics: Canonicalize ( <var>ch</var> )","number":"21.2.2.8.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_6014","_ref_6027","_ref_6028","_ref_6030","_ref_6067","_ref_6068"],"key":"Runtime Semantics: Canonicalize ( ch )"},{"type":"table","id":"table-nonbinary-unicode-properties","number":54,"caption":"Table 54: Non-binary Unicode property aliases and their canonical property names","referencingIds":["_ref_541","_ref_554","_ref_556","_ref_558","_ref_565"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 54: Non-binary Unicode property aliases and their canonical property names"},{"type":"table","id":"table-binary-unicode-properties","number":55,"caption":"Table 55: Binary Unicode property aliases and their canonical property names","referencingIds":["_ref_545","_ref_555","_ref_557","_ref_567"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 55: Binary Unicode property aliases and their canonical property names"},{"type":"op","aoid":"UnicodeMatchProperty","refId":"sec-runtime-semantics-unicodematchproperty-p","location":"","referencingIds":[],"key":"UnicodeMatchProperty"},{"type":"clause","id":"sec-runtime-semantics-unicodematchproperty-p","aoid":"UnicodeMatchProperty","title":"Runtime Semantics: UnicodeMatchProperty ( p )","titleHTML":"Runtime Semantics: UnicodeMatchProperty ( <var>p</var> )","number":"21.2.2.8.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_6070","_ref_6077"],"key":"Runtime Semantics: UnicodeMatchProperty ( p )"},{"type":"table","id":"table-unicode-general-category-values","number":56,"caption":"Table 56: Value aliases and canonical values for the Unicode property <a href=\"https://unicode.org/reports/tr18/#General_Category_Property\">`General_Category`</a>","referencingIds":["_ref_542","_ref_544","_ref_559","_ref_561","_ref_566"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 56: Value aliases and canonical values for the Unicode property <a href=\"https://unicode.org/reports/tr18/#General_Category_Property\">`General_Category`</a>"},{"type":"table","id":"table-unicode-script-values","number":57,"caption":"Table 57: Value aliases and canonical values for the Unicode properties <a href=\"https://unicode.org/reports/tr24/#Script\">`Script`</a> and <a href=\"https://unicode.org/reports/tr24/#Script_Extensions\">`Script_Extensions`</a>","referencingIds":["_ref_543","_ref_560","_ref_562"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 57: Value aliases and canonical values for the Unicode properties <a href=\"https://unicode.org/reports/tr24/#Script\">`Script`</a> and <a href=\"https://unicode.org/reports/tr24/#Script_Extensions\">`Script_Extensions`</a>"},{"type":"op","aoid":"UnicodeMatchPropertyValue","refId":"sec-runtime-semantics-unicodematchpropertyvalue-p-v","location":"","referencingIds":[],"key":"UnicodeMatchPropertyValue"},{"type":"clause","id":"sec-runtime-semantics-unicodematchpropertyvalue-p-v","aoid":"UnicodeMatchPropertyValue","title":"Runtime Semantics: UnicodeMatchPropertyValue ( p, v )","titleHTML":"Runtime Semantics: UnicodeMatchPropertyValue ( <var>p</var>, <var>v</var> )","number":"21.2.2.8.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_6074","_ref_6075"],"key":"Runtime Semantics: UnicodeMatchPropertyValue ( p, v )"},{"type":"clause","id":"sec-atom","aoid":null,"title":"Atom","titleHTML":"Atom","number":"21.2.2.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_737"],"key":"Atom"},{"type":"op","aoid":"BackreferenceMatcher","refId":"sec-backreference-matcher","location":"","referencingIds":[],"key":"BackreferenceMatcher"},{"type":"clause","id":"sec-backreference-matcher","aoid":"BackreferenceMatcher","title":"Runtime Semantics: BackreferenceMatcher ( n, direction )","titleHTML":"Runtime Semantics: BackreferenceMatcher ( <var>n</var>, <var>direction</var> )","number":"21.2.2.9.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_6060","_ref_6064"],"key":"Runtime Semantics: BackreferenceMatcher ( n, direction )"},{"type":"clause","id":"sec-atomescape","aoid":null,"title":"AtomEscape","titleHTML":"AtomEscape","number":"21.2.2.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"AtomEscape"},{"type":"clause","id":"sec-characterescape","aoid":null,"title":"CharacterEscape","titleHTML":"CharacterEscape","number":"21.2.2.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_738"],"key":"CharacterEscape"},{"type":"clause","id":"sec-decimalescape","aoid":null,"title":"DecimalEscape","titleHTML":"DecimalEscape","number":"21.2.2.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"DecimalEscape"},{"type":"clause","id":"sec-characterclassescape","aoid":null,"title":"CharacterClassEscape","titleHTML":"CharacterClassEscape","number":"21.2.2.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"CharacterClassEscape"},{"type":"clause","id":"sec-characterclass","aoid":null,"title":"CharacterClass","titleHTML":"CharacterClass","number":"21.2.2.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"CharacterClass"},{"type":"clause","id":"sec-classranges","aoid":null,"title":"ClassRanges","titleHTML":"ClassRanges","number":"21.2.2.14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"ClassRanges"},{"type":"op","aoid":"CharacterRange","refId":"sec-runtime-semantics-characterrange-abstract-operation","location":"","referencingIds":[],"key":"CharacterRange"},{"type":"clause","id":"sec-runtime-semantics-characterrange-abstract-operation","aoid":"CharacterRange","title":"Runtime Semantics: CharacterRange ( A, B )","titleHTML":"Runtime Semantics: CharacterRange ( <var>A</var>, <var>B</var> )","number":"21.2.2.15.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_6080","_ref_6083","_ref_8642"],"key":"Runtime Semantics: CharacterRange ( A, B )"},{"type":"clause","id":"sec-nonemptyclassranges","aoid":null,"title":"NonemptyClassRanges","titleHTML":"NonemptyClassRanges","number":"21.2.2.15","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_739"],"key":"NonemptyClassRanges"},{"type":"clause","id":"sec-nonemptyclassrangesnodash","aoid":null,"title":"NonemptyClassRangesNoDash","titleHTML":"NonemptyClassRangesNoDash","number":"21.2.2.16","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_740"],"key":"NonemptyClassRangesNoDash"},{"type":"clause","id":"sec-classatom","aoid":null,"title":"ClassAtom","titleHTML":"ClassAtom","number":"21.2.2.17","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"ClassAtom"},{"type":"clause","id":"sec-classatomnodash","aoid":null,"title":"ClassAtomNoDash","titleHTML":"ClassAtomNoDash","number":"21.2.2.18","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_742"],"key":"ClassAtomNoDash"},{"type":"clause","id":"sec-classescape","aoid":null,"title":"ClassEscape","titleHTML":"ClassEscape","number":"21.2.2.19","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_741"],"key":"ClassEscape"},{"type":"clause","id":"sec-pattern-semantics","aoid":null,"title":"Pattern Semantics","titleHTML":"Pattern Semantics","number":"21.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_550","_ref_551","_ref_552","_ref_571","_ref_732"],"key":"Pattern Semantics"},{"type":"term","term":"%RegExp%","refId":"sec-regexp-constructor","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%RegExp%"},{"type":"clause","id":"sec-regexp-pattern-flags","aoid":null,"title":"RegExp ( pattern, flags )","titleHTML":"RegExp ( <var>pattern</var>, <var>flags</var> )","number":"21.2.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_808","_ref_852"],"key":"RegExp ( pattern, flags )"},{"type":"op","aoid":"RegExpAlloc","refId":"sec-regexpalloc","location":"","referencingIds":[],"key":"RegExpAlloc"},{"type":"clause","id":"sec-regexpalloc","aoid":"RegExpAlloc","title":"Runtime Semantics: RegExpAlloc ( newTarget )","titleHTML":"Runtime Semantics: RegExpAlloc ( <var>newTarget</var> )","number":"21.2.3.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_6095","_ref_6108"],"key":"Runtime Semantics: RegExpAlloc ( newTarget )"},{"type":"op","aoid":"RegExpInitialize","refId":"sec-regexpinitialize","location":"","referencingIds":[],"key":"RegExpInitialize"},{"type":"clause","id":"sec-regexpinitialize","aoid":"RegExpInitialize","title":"Runtime Semantics: RegExpInitialize ( obj, pattern, flags )","titleHTML":"Runtime Semantics: RegExpInitialize ( <var>obj</var>, <var>pattern</var>, <var>flags</var> )","number":"21.2.3.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_6096","_ref_6110","_ref_8724"],"key":"Runtime Semantics: RegExpInitialize ( obj, pattern, flags )"},{"type":"op","aoid":"RegExpCreate","refId":"sec-regexpcreate","location":"","referencingIds":[],"key":"RegExpCreate"},{"type":"clause","id":"sec-regexpcreate","aoid":"RegExpCreate","title":"Runtime Semantics: RegExpCreate ( P, F )","titleHTML":"Runtime Semantics: RegExpCreate ( <var>P</var>, <var>F</var> )","number":"21.2.3.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3221","_ref_5849","_ref_5896"],"key":"Runtime Semantics: RegExpCreate ( P, F )"},{"type":"op","aoid":"EscapeRegExpPattern","refId":"sec-escaperegexppattern","location":"","referencingIds":[],"key":"EscapeRegExpPattern"},{"type":"clause","id":"sec-escaperegexppattern","aoid":"EscapeRegExpPattern","title":"Runtime Semantics: EscapeRegExpPattern ( P, F )","titleHTML":"Runtime Semantics: EscapeRegExpPattern ( <var>P</var>, <var>F</var> )","number":"21.2.3.2.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_809","_ref_6268"],"key":"Runtime Semantics: EscapeRegExpPattern ( P, F )"},{"type":"clause","id":"sec-abstract-operations-for-the-regexp-constructor","aoid":null,"title":"Abstract Operations for the RegExp Constructor","titleHTML":"Abstract Operations for the RegExp Constructor","number":"21.2.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Abstract Operations for the RegExp Constructor"},{"type":"clause","id":"sec-regexp-constructor","aoid":null,"title":"The RegExp Constructor","titleHTML":"The RegExp Constructor","number":"21.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_104","_ref_295","_ref_450","_ref_1149","_ref_1153","_ref_6109","_ref_6119","_ref_6272"],"key":"The RegExp Constructor"},{"type":"clause","id":"sec-regexp.prototype","aoid":null,"title":"RegExp.prototype","titleHTML":"RegExp.prototype","number":"21.2.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"RegExp.prototype"},{"type":"clause","id":"sec-get-regexp-@@species","aoid":null,"title":"get RegExp [ @@species ]","titleHTML":"get RegExp [ @@species ]","number":"21.2.4.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"get RegExp [ @@species ]"},{"type":"clause","id":"sec-properties-of-the-regexp-constructor","aoid":null,"title":"Properties of the RegExp Constructor","titleHTML":"Properties of the RegExp Constructor","number":"21.2.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of the RegExp Constructor"},{"type":"term","term":"%RegExpPrototype%","refId":"sec-properties-of-the-regexp-prototype-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%RegExpPrototype%"},{"type":"clause","id":"sec-regexp.prototype.constructor","aoid":null,"title":"RegExp.prototype.constructor","titleHTML":"RegExp.prototype.constructor","number":"21.2.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"RegExp.prototype.constructor"},{"type":"op","aoid":"RegExpExec","refId":"sec-regexpexec","location":"","referencingIds":[],"key":"RegExpExec"},{"type":"clause","id":"sec-regexpexec","aoid":"RegExpExec","title":"Runtime Semantics: RegExpExec ( R, S )","titleHTML":"Runtime Semantics: RegExpExec ( <var>R</var>, <var>S</var> )","number":"21.2.5.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_6196","_ref_6201","_ref_6226","_ref_6258","_ref_6279","_ref_6282","_ref_6305"],"key":"Runtime Semantics: RegExpExec ( R, S )"},{"type":"op","aoid":"RegExpBuiltinExec","refId":"sec-regexpbuiltinexec","location":"","referencingIds":[],"key":"RegExpBuiltinExec"},{"type":"clause","id":"sec-regexpbuiltinexec","aoid":"RegExpBuiltinExec","title":"Runtime Semantics: RegExpBuiltinExec ( R, S )","titleHTML":"Runtime Semantics: RegExpBuiltinExec ( <var>R</var>, <var>S</var> )","number":"21.2.5.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_574","_ref_6002","_ref_6123","_ref_6132"],"key":"Runtime Semantics: RegExpBuiltinExec ( R, S )"},{"type":"op","aoid":"AdvanceStringIndex","refId":"sec-advancestringindex","location":"","referencingIds":[],"key":"AdvanceStringIndex"},{"type":"clause","id":"sec-advancestringindex","aoid":"AdvanceStringIndex","title":"AdvanceStringIndex ( S, index, unicode )","titleHTML":"AdvanceStringIndex ( <var>S</var>, <var>index</var>, <var>unicode</var> )","number":"21.2.5.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_6140","_ref_6209","_ref_6231","_ref_6283","_ref_6287"],"key":"AdvanceStringIndex ( S, index, unicode )"},{"type":"clause","id":"sec-regexp.prototype.exec","aoid":null,"title":"RegExp.prototype.exec ( string )","titleHTML":"RegExp.prototype.exec ( <var>string</var> )","number":"21.2.5.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"RegExp.prototype.exec ( string )"},{"type":"clause","id":"sec-get-regexp.prototype.dotAll","aoid":null,"title":"get RegExp.prototype.dotAll","titleHTML":"get RegExp.prototype.dotAll","number":"21.2.5.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"get RegExp.prototype.dotAll"},{"type":"clause","id":"sec-get-regexp.prototype.flags","aoid":null,"title":"get RegExp.prototype.flags","titleHTML":"get RegExp.prototype.flags","number":"21.2.5.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"get RegExp.prototype.flags"},{"type":"clause","id":"sec-get-regexp.prototype.global","aoid":null,"title":"get RegExp.prototype.global","titleHTML":"get RegExp.prototype.global","number":"21.2.5.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"get RegExp.prototype.global"},{"type":"clause","id":"sec-get-regexp.prototype.ignorecase","aoid":null,"title":"get RegExp.prototype.ignoreCase","titleHTML":"get RegExp.prototype.ignoreCase","number":"21.2.5.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"get RegExp.prototype.ignoreCase"},{"type":"clause","id":"sec-regexp.prototype-@@match","aoid":null,"title":"RegExp.prototype [ @@match ] ( string )","titleHTML":"RegExp.prototype [ @@match ] ( <var>string</var> )","number":"21.2.5.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_810"],"key":"RegExp.prototype [ @@match ] ( string )"},{"type":"clause","id":"sec-get-regexp.prototype.multiline","aoid":null,"title":"get RegExp.prototype.multiline","titleHTML":"get RegExp.prototype.multiline","number":"21.2.5.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"get RegExp.prototype.multiline"},{"type":"clause","id":"sec-regexp.prototype-@@replace","aoid":null,"title":"RegExp.prototype [ @@replace ] ( string, replaceValue )","titleHTML":"RegExp.prototype [ @@replace ] ( <var>string</var>, <var>replaceValue</var> )","number":"21.2.5.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_811"],"key":"RegExp.prototype [ @@replace ] ( string, replaceValue )"},{"type":"clause","id":"sec-regexp.prototype-@@search","aoid":null,"title":"RegExp.prototype [ @@search ] ( string )","titleHTML":"RegExp.prototype [ @@search ] ( <var>string</var> )","number":"21.2.5.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"RegExp.prototype [ @@search ] ( string )"},{"type":"clause","id":"sec-get-regexp.prototype.source","aoid":null,"title":"get RegExp.prototype.source","titleHTML":"get RegExp.prototype.source","number":"21.2.5.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"get RegExp.prototype.source"},{"type":"clause","id":"sec-regexp.prototype-@@split","aoid":null,"title":"RegExp.prototype [ @@split ] ( string, limit )","titleHTML":"RegExp.prototype [ @@split ] ( <var>string</var>, <var>limit</var> )","number":"21.2.5.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"RegExp.prototype [ @@split ] ( string, limit )"},{"type":"clause","id":"sec-get-regexp.prototype.sticky","aoid":null,"title":"get RegExp.prototype.sticky","titleHTML":"get RegExp.prototype.sticky","number":"21.2.5.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"get RegExp.prototype.sticky"},{"type":"clause","id":"sec-regexp.prototype.test","aoid":null,"title":"RegExp.prototype.test ( S )","titleHTML":"RegExp.prototype.test ( <var>S</var> )","number":"21.2.5.14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"RegExp.prototype.test ( S )"},{"type":"clause","id":"sec-regexp.prototype.tostring","aoid":null,"title":"RegExp.prototype.toString ( )","titleHTML":"RegExp.prototype.toString ( )","number":"21.2.5.15","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"RegExp.prototype.toString ( )"},{"type":"clause","id":"sec-get-regexp.prototype.unicode","aoid":null,"title":"get RegExp.prototype.unicode","titleHTML":"get RegExp.prototype.unicode","number":"21.2.5.16","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"get RegExp.prototype.unicode"},{"type":"clause","id":"sec-properties-of-the-regexp-prototype-object","aoid":null,"title":"Properties of the RegExp Prototype Object","titleHTML":"Properties of the RegExp Prototype Object","number":"21.2.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_853","_ref_854","_ref_1151","_ref_6114","_ref_6169","_ref_6187","_ref_6191","_ref_6215","_ref_6266","_ref_6302","_ref_6315"],"key":"Properties of the RegExp Prototype Object"},{"type":"clause","id":"sec-lastindex","aoid":null,"title":"lastIndex","titleHTML":"lastIndex","number":"21.2.6.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"lastIndex"},{"type":"clause","id":"sec-properties-of-regexp-instances","aoid":null,"title":"Properties of RegExp Instances","titleHTML":"Properties of RegExp Instances","number":"21.2.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of RegExp Instances"},{"type":"clause","id":"sec-regexp-regular-expression-objects","aoid":null,"title":"RegExp (Regular Expression) Objects","titleHTML":"RegExp (Regular Expression) Objects","number":"21.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_294"],"key":"RegExp (Regular Expression) Objects"},{"type":"clause","id":"sec-text-processing","aoid":null,"title":"Text Processing","titleHTML":"Text Processing","number":"21","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Text Processing"},{"type":"term","term":"%Array%","refId":"sec-array-constructor","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%Array%"},{"type":"clause","id":"sec-array-constructor-array","aoid":null,"title":"Array ( )","titleHTML":"Array ( )","number":"22.1.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Array ( )"},{"type":"clause","id":"sec-array-len","aoid":null,"title":"Array ( len )","titleHTML":"Array ( <var>len</var> )","number":"22.1.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Array ( len )"},{"type":"clause","id":"sec-array-items","aoid":null,"title":"Array ( ...items )","titleHTML":"Array ( ...<var>items</var> )","number":"22.1.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Array ( ...items )"},{"type":"clause","id":"sec-array-constructor","aoid":null,"title":"The Array Constructor","titleHTML":"The Array Constructor","number":"22.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_52","_ref_430","_ref_1004","_ref_1014","_ref_2684","_ref_6414"],"key":"The Array Constructor"},{"type":"clause","id":"sec-array.from","aoid":null,"title":"Array.from ( items [ , mapfn [ , thisArg ] ] )","titleHTML":"Array.from ( <var>items</var> [ , <var>mapfn</var> [ , <var>thisArg</var> ] ] )","number":"22.1.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Array.from ( items [ , mapfn [ , thisArg ] ] )"},{"type":"clause","id":"sec-array.isarray","aoid":null,"title":"Array.isArray ( arg )","titleHTML":"Array.isArray ( <var>arg</var> )","number":"22.1.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Array.isArray ( arg )"},{"type":"clause","id":"sec-array.of","aoid":null,"title":"Array.of ( ...items )","titleHTML":"Array.of ( ...<var>items</var> )","number":"22.1.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Array.of ( ...items )"},{"type":"clause","id":"sec-array.prototype","aoid":null,"title":"Array.prototype","titleHTML":"Array.prototype","number":"22.1.2.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Array.prototype"},{"type":"clause","id":"sec-get-array-@@species","aoid":null,"title":"get Array [ @@species ]","titleHTML":"get Array [ @@species ]","number":"22.1.2.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"get Array [ @@species ]"},{"type":"clause","id":"sec-properties-of-the-array-constructor","aoid":null,"title":"Properties of the Array Constructor","titleHTML":"Properties of the Array Constructor","number":"22.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of the Array Constructor"},{"type":"term","term":"%ArrayPrototype%","refId":"sec-properties-of-the-array-prototype-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%ArrayPrototype%"},{"type":"op","aoid":"IsConcatSpreadable","refId":"sec-isconcatspreadable","location":"","referencingIds":[],"key":"IsConcatSpreadable"},{"type":"clause","id":"sec-isconcatspreadable","aoid":"IsConcatSpreadable","title":"Runtime Semantics: IsConcatSpreadable ( O )","titleHTML":"Runtime Semantics: IsConcatSpreadable ( <var>O</var> )","number":"22.1.3.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_6399"],"key":"Runtime Semantics: IsConcatSpreadable ( O )"},{"type":"clause","id":"sec-array.prototype.concat","aoid":null,"title":"Array.prototype.concat ( ...arguments )","titleHTML":"Array.prototype.concat ( ...<var>arguments</var> )","number":"22.1.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_27"],"key":"Array.prototype.concat ( ...arguments )"},{"type":"clause","id":"sec-array.prototype.constructor","aoid":null,"title":"Array.prototype.constructor","titleHTML":"Array.prototype.constructor","number":"22.1.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Array.prototype.constructor"},{"type":"clause","id":"sec-array.prototype.copywithin","aoid":null,"title":"Array.prototype.copyWithin ( target, start [ , end ] )","titleHTML":"Array.prototype.copyWithin ( <var>target</var>, <var>start</var> [ , <var>end</var> ] )","number":"22.1.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_584"],"key":"Array.prototype.copyWithin ( target, start [ , end ] )"},{"type":"term","term":"%ArrayProto_entries%","refId":"sec-array.prototype.entries","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%ArrayProto_entries%"},{"type":"clause","id":"sec-array.prototype.entries","aoid":null,"title":"Array.prototype.entries ( )","titleHTML":"Array.prototype.entries ( )","number":"22.1.3.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_56","_ref_1015"],"key":"Array.prototype.entries ( )"},{"type":"clause","id":"sec-array.prototype.every","aoid":null,"title":"Array.prototype.every ( callbackfn [ , thisArg ] )","titleHTML":"Array.prototype.every ( <var>callbackfn</var> [ , <var>thisArg</var> ] )","number":"22.1.3.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_586"],"key":"Array.prototype.every ( callbackfn [ , thisArg ] )"},{"type":"clause","id":"sec-array.prototype.fill","aoid":null,"title":"Array.prototype.fill ( value [ , start [ , end ] ] )","titleHTML":"Array.prototype.fill ( <var>value</var> [ , <var>start</var> [ , <var>end</var> ] ] )","number":"22.1.3.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_587"],"key":"Array.prototype.fill ( value [ , start [ , end ] ] )"},{"type":"clause","id":"sec-array.prototype.filter","aoid":null,"title":"Array.prototype.filter ( callbackfn [ , thisArg ] )","titleHTML":"Array.prototype.filter ( <var>callbackfn</var> [ , <var>thisArg</var> ] )","number":"22.1.3.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_588"],"key":"Array.prototype.filter ( callbackfn [ , thisArg ] )"},{"type":"clause","id":"sec-array.prototype.find","aoid":null,"title":"Array.prototype.find ( predicate [ , thisArg ] )","titleHTML":"Array.prototype.find ( <var>predicate</var> [ , <var>thisArg</var> ] )","number":"22.1.3.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_589"],"key":"Array.prototype.find ( predicate [ , thisArg ] )"},{"type":"clause","id":"sec-array.prototype.findindex","aoid":null,"title":"Array.prototype.findIndex ( predicate [ , thisArg ] )","titleHTML":"Array.prototype.findIndex ( <var>predicate</var> [ , <var>thisArg</var> ] )","number":"22.1.3.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_591"],"key":"Array.prototype.findIndex ( predicate [ , thisArg ] )"},{"type":"op","aoid":"FlattenIntoArray","refId":"sec-flattenintoarray","location":"","referencingIds":[],"key":"FlattenIntoArray"},{"type":"clause","id":"sec-flattenintoarray","aoid":"FlattenIntoArray","title":"FlattenIntoArray(target, source, sourceLen, start, depth [ , mapperFunction, thisArg ])","titleHTML":"FlattenIntoArray(<var>target</var>, <var>source</var>, <var>sourceLen</var>, <var>start</var>, <var>depth</var> [ , <var>mapperFunction</var>, <var>thisArg</var> ])","number":"22.1.3.10.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_6489","_ref_6498","_ref_6506"],"key":"FlattenIntoArray(target, source, sourceLen, start, depth [ , mapperFunction, thisArg ])"},{"type":"clause","id":"sec-array.prototype.flat","aoid":null,"title":"Array.prototype.flat( [ depth ] )","titleHTML":"Array.prototype.flat( [ <var>depth</var> ] )","number":"22.1.3.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Array.prototype.flat( [ depth ] )"},{"type":"clause","id":"sec-array.prototype.flatmap","aoid":null,"title":"Array.prototype.flatMap ( mapperFunction [ , thisArg ] )","titleHTML":"Array.prototype.flatMap ( <var>mapperFunction</var> [ , <var>thisArg</var> ] )","number":"22.1.3.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Array.prototype.flatMap ( mapperFunction [ , thisArg ] )"},{"type":"term","term":"%ArrayProto_forEach%","refId":"sec-array.prototype.foreach","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%ArrayProto_forEach%"},{"type":"clause","id":"sec-array.prototype.foreach","aoid":null,"title":"Array.prototype.forEach ( callbackfn [ , thisArg ] )","titleHTML":"Array.prototype.forEach ( <var>callbackfn</var> [ , <var>thisArg</var> ] )","number":"22.1.3.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_57","_ref_593","_ref_1018"],"key":"Array.prototype.forEach ( callbackfn [ , thisArg ] )"},{"type":"clause","id":"sec-array.prototype.includes","aoid":null,"title":"Array.prototype.includes ( searchElement [ , fromIndex ] )","titleHTML":"Array.prototype.includes ( <var>searchElement</var> [ , <var>fromIndex</var> ] )","number":"22.1.3.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_595"],"key":"Array.prototype.includes ( searchElement [ , fromIndex ] )"},{"type":"clause","id":"sec-array.prototype.indexof","aoid":null,"title":"Array.prototype.indexOf ( searchElement [ , fromIndex ] )","titleHTML":"Array.prototype.indexOf ( <var>searchElement</var> [ , <var>fromIndex</var> ] )","number":"22.1.3.14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_597"],"key":"Array.prototype.indexOf ( searchElement [ , fromIndex ] )"},{"type":"clause","id":"sec-array.prototype.join","aoid":null,"title":"Array.prototype.join ( separator )","titleHTML":"Array.prototype.join ( <var>separator</var> )","number":"22.1.3.15","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_599"],"key":"Array.prototype.join ( separator )"},{"type":"term","term":"%ArrayProto_keys%","refId":"sec-array.prototype.keys","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%ArrayProto_keys%"},{"type":"clause","id":"sec-array.prototype.keys","aoid":null,"title":"Array.prototype.keys ( )","titleHTML":"Array.prototype.keys ( )","number":"22.1.3.16","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_58","_ref_1021"],"key":"Array.prototype.keys ( )"},{"type":"clause","id":"sec-array.prototype.lastindexof","aoid":null,"title":"Array.prototype.lastIndexOf ( searchElement [ , fromIndex ] )","titleHTML":"Array.prototype.lastIndexOf ( <var>searchElement</var> [ , <var>fromIndex</var> ] )","number":"22.1.3.17","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_601"],"key":"Array.prototype.lastIndexOf ( searchElement [ , fromIndex ] )"},{"type":"clause","id":"sec-array.prototype.map","aoid":null,"title":"Array.prototype.map ( callbackfn [ , thisArg ] )","titleHTML":"Array.prototype.map ( <var>callbackfn</var> [ , <var>thisArg</var> ] )","number":"22.1.3.18","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_603"],"key":"Array.prototype.map ( callbackfn [ , thisArg ] )"},{"type":"clause","id":"sec-array.prototype.pop","aoid":null,"title":"Array.prototype.pop ( )","titleHTML":"Array.prototype.pop ( )","number":"22.1.3.19","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Array.prototype.pop ( )"},{"type":"clause","id":"sec-array.prototype.push","aoid":null,"title":"Array.prototype.push ( ...items )","titleHTML":"Array.prototype.push ( ...<var>items</var> )","number":"22.1.3.20","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Array.prototype.push ( ...items )"},{"type":"clause","id":"sec-array.prototype.reduce","aoid":null,"title":"Array.prototype.reduce ( callbackfn [ , initialValue ] )","titleHTML":"Array.prototype.reduce ( <var>callbackfn</var> [ , <var>initialValue</var> ] )","number":"22.1.3.21","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_604"],"key":"Array.prototype.reduce ( callbackfn [ , initialValue ] )"},{"type":"clause","id":"sec-array.prototype.reduceright","aoid":null,"title":"Array.prototype.reduceRight ( callbackfn [ , initialValue ] )","titleHTML":"Array.prototype.reduceRight ( <var>callbackfn</var> [ , <var>initialValue</var> ] )","number":"22.1.3.22","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_606"],"key":"Array.prototype.reduceRight ( callbackfn [ , initialValue ] )"},{"type":"clause","id":"sec-array.prototype.reverse","aoid":null,"title":"Array.prototype.reverse ( )","titleHTML":"Array.prototype.reverse ( )","number":"22.1.3.23","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_608"],"key":"Array.prototype.reverse ( )"},{"type":"clause","id":"sec-array.prototype.shift","aoid":null,"title":"Array.prototype.shift ( )","titleHTML":"Array.prototype.shift ( )","number":"22.1.3.24","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Array.prototype.shift ( )"},{"type":"clause","id":"sec-array.prototype.slice","aoid":null,"title":"Array.prototype.slice ( start, end )","titleHTML":"Array.prototype.slice ( <var>start</var>, <var>end</var> )","number":"22.1.3.25","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_618"],"key":"Array.prototype.slice ( start, end )"},{"type":"clause","id":"sec-array.prototype.some","aoid":null,"title":"Array.prototype.some ( callbackfn [ , thisArg ] )","titleHTML":"Array.prototype.some ( <var>callbackfn</var> [ , <var>thisArg</var> ] )","number":"22.1.3.26","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_622"],"key":"Array.prototype.some ( callbackfn [ , thisArg ] )"},{"type":"op","aoid":"SortCompare","refId":"sec-sortcompare","location":"","referencingIds":[],"key":"SortCompare"},{"type":"clause","id":"sec-sortcompare","aoid":"SortCompare","title":"Runtime Semantics: SortCompare ( x, y )","titleHTML":"Runtime Semantics: SortCompare ( <var>x</var>, <var>y</var> )","number":"22.1.3.27.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_813","_ref_6667","_ref_6677","_ref_6679","_ref_6682","_ref_6685","_ref_6687","_ref_6688","_ref_6691","_ref_6692","_ref_7032","_ref_7034","_ref_7035"],"key":"Runtime Semantics: SortCompare ( x, y )"},{"type":"clause","id":"sec-array.prototype.sort","aoid":null,"title":"Array.prototype.sort ( comparefn )","titleHTML":"Array.prototype.sort ( <var>comparefn</var> )","number":"22.1.3.27","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_525","_ref_624","_ref_626","_ref_627","_ref_812"],"key":"Array.prototype.sort ( comparefn )"},{"type":"clause","id":"sec-array.prototype.splice","aoid":null,"title":"Array.prototype.splice ( start, deleteCount, ...items )","titleHTML":"Array.prototype.splice ( <var>start</var>, <var>deleteCount</var>, ...<var>items</var> )","number":"22.1.3.28","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Array.prototype.splice ( start, deleteCount, ...items )"},{"type":"clause","id":"sec-array.prototype.tolocalestring","aoid":null,"title":"Array.prototype.toLocaleString ( [ reserved1 [ , reserved2 ] ] )","titleHTML":"Array.prototype.toLocaleString ( [ <var>reserved1</var> [ , <var>reserved2</var> ] ] )","number":"22.1.3.29","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_629"],"key":"Array.prototype.toLocaleString ( [ reserved1 [ , reserved2 ] ] )"},{"type":"clause","id":"sec-array.prototype.tostring","aoid":null,"title":"Array.prototype.toString ( )","titleHTML":"Array.prototype.toString ( )","number":"22.1.3.30","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_631"],"key":"Array.prototype.toString ( )"},{"type":"clause","id":"sec-array.prototype.unshift","aoid":null,"title":"Array.prototype.unshift ( ...items )","titleHTML":"Array.prototype.unshift ( ...<var>items</var> )","number":"22.1.3.31","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Array.prototype.unshift ( ...items )"},{"type":"term","term":"%ArrayProto_values%","refId":"sec-array.prototype.values","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%ArrayProto_values%"},{"type":"clause","id":"sec-array.prototype.values","aoid":null,"title":"Array.prototype.values ( )","titleHTML":"Array.prototype.values ( )","number":"22.1.3.32","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_59","_ref_1024","_ref_2791","_ref_2810"],"key":"Array.prototype.values ( )"},{"type":"clause","id":"sec-array.prototype-@@iterator","aoid":null,"title":"Array.prototype [ @@iterator ] ( )","titleHTML":"Array.prototype [ @@iterator ] ( )","number":"22.1.3.33","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Array.prototype [ @@iterator ] ( )"},{"type":"clause","id":"sec-array.prototype-@@unscopables","aoid":null,"title":"Array.prototype [ @@unscopables ]","titleHTML":"Array.prototype [ @@unscopables ]","number":"22.1.3.34","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Array.prototype [ @@unscopables ]"},{"type":"clause","id":"sec-properties-of-the-array-prototype-object","aoid":null,"title":"Properties of the Array Prototype Object","titleHTML":"Properties of the Array Prototype Object","number":"22.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_55","_ref_1012","_ref_1017","_ref_1020","_ref_1023","_ref_1026","_ref_2671","_ref_6389"],"key":"Properties of the Array Prototype Object"},{"type":"clause","id":"sec-properties-of-array-instances-length","aoid":null,"title":"length","titleHTML":"length","number":"22.1.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"length"},{"type":"clause","id":"sec-properties-of-array-instances","aoid":null,"title":"Properties of Array Instances","titleHTML":"Properties of Array Instances","number":"22.1.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of Array Instances"},{"type":"op","aoid":"CreateArrayIterator","refId":"sec-createarrayiterator","location":"","referencingIds":[],"key":"CreateArrayIterator"},{"type":"clause","id":"sec-createarrayiterator","aoid":"CreateArrayIterator","title":"CreateArrayIterator ( array, kind )","titleHTML":"CreateArrayIterator ( <var>array</var>, <var>kind</var> )","number":"22.1.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_6435","_ref_6547","_ref_6765","_ref_6901","_ref_6947","_ref_7059"],"key":"CreateArrayIterator ( array, kind )"},{"type":"term","term":"%ArrayIteratorPrototype%","refId":"sec-%arrayiteratorprototype%-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%ArrayIteratorPrototype%"},{"type":"clause","id":"sec-%arrayiteratorprototype%.next","aoid":null,"title":"%ArrayIteratorPrototype%.next ( )","titleHTML":"%ArrayIteratorPrototype%.next ( )","number":"22.1.5.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%ArrayIteratorPrototype%.next ( )"},{"type":"clause","id":"sec-%arrayiteratorprototype%-@@tostringtag","aoid":null,"title":"%ArrayIteratorPrototype% [ @@toStringTag ]","titleHTML":"%ArrayIteratorPrototype% [ @@toStringTag ]","number":"22.1.5.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%ArrayIteratorPrototype% [ @@toStringTag ]"},{"type":"clause","id":"sec-%arrayiteratorprototype%-object","aoid":null,"title":"The %ArrayIteratorPrototype% Object","titleHTML":"The %ArrayIteratorPrototype% Object","number":"22.1.5.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1011","_ref_6790","_ref_6804"],"key":"The %ArrayIteratorPrototype% Object"},{"type":"table","id":"table-48","number":58,"caption":"Table 58: Internal Slots of Array Iterator Instances","referencingIds":["_ref_580"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 58: Internal Slots of Array Iterator Instances"},{"type":"clause","id":"sec-properties-of-array-iterator-instances","aoid":null,"title":"Properties of Array Iterator Instances","titleHTML":"Properties of Array Iterator Instances","number":"22.1.5.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_579"],"key":"Properties of Array Iterator Instances"},{"type":"clause","id":"sec-array-iterator-objects","aoid":null,"title":"Array Iterator Objects","titleHTML":"Array Iterator Objects","number":"22.1.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_54"],"key":"Array Iterator Objects"},{"type":"clause","id":"sec-array-objects","aoid":null,"title":"Array Objects","titleHTML":"Array Objects","number":"22.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Array Objects"},{"type":"table","id":"table-49","number":59,"caption":"Table 59: The TypedArray Constructors","referencingIds":["_ref_235","_ref_236","_ref_237","_ref_238","_ref_582","_ref_583","_ref_585","_ref_611","_ref_612","_ref_614","_ref_615","_ref_616","_ref_617","_ref_619","_ref_620","_ref_621","_ref_628","_ref_632","_ref_633","_ref_634","_ref_635","_ref_636","_ref_637","_ref_638","_ref_639","_ref_640","_ref_641","_ref_642","_ref_643","_ref_644","_ref_645","_ref_646","_ref_647","_ref_649","_ref_656","_ref_657","_ref_658","_ref_659","_ref_660","_ref_661","_ref_662","_ref_663","_ref_664","_ref_665","_ref_666","_ref_667","_ref_668","_ref_669","_ref_670","_ref_671"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 59: The TypedArray Constructors"},{"type":"term","term":"%TypedArray%","refId":"sec-%typedarray%-intrinsic-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%TypedArray%"},{"type":"clause","id":"sec-%typedarray%","aoid":null,"title":"%TypedArray% ( )","titleHTML":"%TypedArray% ( )","number":"22.2.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%TypedArray% ( )"},{"type":"clause","id":"sec-%typedarray%-intrinsic-object","aoid":null,"title":"The %TypedArray% Intrinsic Object","titleHTML":"The %TypedArray% Intrinsic Object","number":"22.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_113","_ref_1180","_ref_1183","_ref_4763","_ref_6824","_ref_6826","_ref_6828","_ref_6858","_ref_6860","_ref_6866","_ref_6870","_ref_6875","_ref_6880","_ref_6881","_ref_6882","_ref_6902","_ref_6905","_ref_6917","_ref_6928","_ref_6931","_ref_6934","_ref_6937","_ref_6940","_ref_6943","_ref_6948","_ref_6951","_ref_6956","_ref_6964","_ref_6967","_ref_6970","_ref_6973","_ref_7006","_ref_7024","_ref_7027","_ref_7028","_ref_7031","_ref_7033","_ref_7052","_ref_7055","_ref_7061","_ref_7062","_ref_7070","_ref_7144"],"key":"The %TypedArray% Intrinsic Object"},{"type":"op","aoid":"IterableToList","refId":"sec-iterabletolist","location":"","referencingIds":[],"key":"IterableToList"},{"type":"clause","id":"sec-iterabletolist","aoid":"IterableToList","title":"Runtime Semantics: IterableToList ( items, method )","titleHTML":"Runtime Semantics: IterableToList ( <var>items</var>, <var>method</var> )","number":"22.2.2.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_6833","_ref_7113"],"key":"Runtime Semantics: IterableToList ( items, method )"},{"type":"clause","id":"sec-%typedarray%.from","aoid":null,"title":"%TypedArray%.from ( source [ , mapfn [ , thisArg ] ] )","titleHTML":"%TypedArray%.from ( <var>source</var> [ , <var>mapfn</var> [ , <var>thisArg</var> ] ] )","number":"22.2.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%TypedArray%.from ( source [ , mapfn [ , thisArg ] ] )"},{"type":"clause","id":"sec-%typedarray%.of","aoid":null,"title":"%TypedArray%.of ( ...items )","titleHTML":"%TypedArray%.of ( ...<var>items</var> )","number":"22.2.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%TypedArray%.of ( ...items )"},{"type":"clause","id":"sec-%typedarray%.prototype","aoid":null,"title":"%TypedArray%.prototype","titleHTML":"%TypedArray%.prototype","number":"22.2.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%TypedArray%.prototype"},{"type":"clause","id":"sec-get-%typedarray%-@@species","aoid":null,"title":"get %TypedArray% [ @@species ]","titleHTML":"get %TypedArray% [ @@species ]","number":"22.2.2.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"get %TypedArray% [ @@species ]"},{"type":"clause","id":"sec-properties-of-the-%typedarray%-intrinsic-object","aoid":null,"title":"Properties of the %TypedArray% Intrinsic Object","titleHTML":"Properties of the %TypedArray% Intrinsic Object","number":"22.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of the %TypedArray% Intrinsic Object"},{"type":"term","term":"%TypedArrayPrototype%","refId":"sec-properties-of-the-%typedarrayprototype%-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%TypedArrayPrototype%"},{"type":"clause","id":"sec-get-%typedarray%.prototype.buffer","aoid":null,"title":"get %TypedArray%.prototype.buffer","titleHTML":"get %TypedArray%.prototype.buffer","number":"22.2.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"get %TypedArray%.prototype.buffer"},{"type":"clause","id":"sec-get-%typedarray%.prototype.bytelength","aoid":null,"title":"get %TypedArray%.prototype.byteLength","titleHTML":"get %TypedArray%.prototype.byteLength","number":"22.2.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"get %TypedArray%.prototype.byteLength"},{"type":"clause","id":"sec-get-%typedarray%.prototype.byteoffset","aoid":null,"title":"get %TypedArray%.prototype.byteOffset","titleHTML":"get %TypedArray%.prototype.byteOffset","number":"22.2.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"get %TypedArray%.prototype.byteOffset"},{"type":"clause","id":"sec-%typedarray%.prototype.constructor","aoid":null,"title":"%TypedArray%.prototype.constructor","titleHTML":"%TypedArray%.prototype.constructor","number":"22.2.3.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%TypedArray%.prototype.constructor"},{"type":"op","aoid":"ValidateTypedArray","refId":"sec-validatetypedarray","location":"","referencingIds":[],"key":"ValidateTypedArray"},{"type":"clause","id":"sec-validatetypedarray","aoid":"ValidateTypedArray","title":"Runtime Semantics: ValidateTypedArray ( O )","titleHTML":"Runtime Semantics: ValidateTypedArray ( <var>O</var> )","number":"22.2.3.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_6883","_ref_6900","_ref_6903","_ref_6906","_ref_6918","_ref_6929","_ref_6932","_ref_6935","_ref_6938","_ref_6941","_ref_6944","_ref_6946","_ref_6949","_ref_6957","_ref_6965","_ref_6968","_ref_6971","_ref_7007","_ref_7025","_ref_7030","_ref_7053","_ref_7058","_ref_7137"],"key":"Runtime Semantics: ValidateTypedArray ( O )"},{"type":"clause","id":"sec-%typedarray%.prototype.copywithin","aoid":null,"title":"%TypedArray%.prototype.copyWithin ( target, start [ , end ] )","titleHTML":"%TypedArray%.prototype.copyWithin ( <var>target</var>, <var>start</var> [ , <var>end</var> ] )","number":"22.2.3.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%TypedArray%.prototype.copyWithin ( target, start [ , end ] )"},{"type":"clause","id":"sec-%typedarray%.prototype.entries","aoid":null,"title":"%TypedArray%.prototype.entries ( )","titleHTML":"%TypedArray%.prototype.entries ( )","number":"22.2.3.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%TypedArray%.prototype.entries ( )"},{"type":"clause","id":"sec-%typedarray%.prototype.every","aoid":null,"title":"%TypedArray%.prototype.every ( callbackfn [ , thisArg ] )","titleHTML":"%TypedArray%.prototype.every ( <var>callbackfn</var> [ , <var>thisArg</var> ] )","number":"22.2.3.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%TypedArray%.prototype.every ( callbackfn [ , thisArg ] )"},{"type":"clause","id":"sec-%typedarray%.prototype.fill","aoid":null,"title":"%TypedArray%.prototype.fill ( value [ , start [ , end ] ] )","titleHTML":"%TypedArray%.prototype.fill ( <var>value</var> [ , <var>start</var> [ , <var>end</var> ] ] )","number":"22.2.3.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%TypedArray%.prototype.fill ( value [ , start [ , end ] ] )"},{"type":"clause","id":"sec-%typedarray%.prototype.filter","aoid":null,"title":"%TypedArray%.prototype.filter ( callbackfn [ , thisArg ] )","titleHTML":"%TypedArray%.prototype.filter ( <var>callbackfn</var> [ , <var>thisArg</var> ] )","number":"22.2.3.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%TypedArray%.prototype.filter ( callbackfn [ , thisArg ] )"},{"type":"clause","id":"sec-%typedarray%.prototype.find","aoid":null,"title":"%TypedArray%.prototype.find ( predicate [ , thisArg ] )","titleHTML":"%TypedArray%.prototype.find ( <var>predicate</var> [ , <var>thisArg</var> ] )","number":"22.2.3.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%TypedArray%.prototype.find ( predicate [ , thisArg ] )"},{"type":"clause","id":"sec-%typedarray%.prototype.findindex","aoid":null,"title":"%TypedArray%.prototype.findIndex ( predicate [ , thisArg ] )","titleHTML":"%TypedArray%.prototype.findIndex ( <var>predicate</var> [ , <var>thisArg</var> ] )","number":"22.2.3.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%TypedArray%.prototype.findIndex ( predicate [ , thisArg ] )"},{"type":"clause","id":"sec-%typedarray%.prototype.foreach","aoid":null,"title":"%TypedArray%.prototype.forEach ( callbackfn [ , thisArg ] )","titleHTML":"%TypedArray%.prototype.forEach ( <var>callbackfn</var> [ , <var>thisArg</var> ] )","number":"22.2.3.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%TypedArray%.prototype.forEach ( callbackfn [ , thisArg ] )"},{"type":"clause","id":"sec-%typedarray%.prototype.includes","aoid":null,"title":"%TypedArray%.prototype.includes ( searchElement [ , fromIndex ] )","titleHTML":"%TypedArray%.prototype.includes ( <var>searchElement</var> [ , <var>fromIndex</var> ] )","number":"22.2.3.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%TypedArray%.prototype.includes ( searchElement [ , fromIndex ] )"},{"type":"clause","id":"sec-%typedarray%.prototype.indexof","aoid":null,"title":"%TypedArray%.prototype.indexOf ( searchElement [ , fromIndex ] )","titleHTML":"%TypedArray%.prototype.indexOf ( <var>searchElement</var> [ , <var>fromIndex</var> ] )","number":"22.2.3.14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%TypedArray%.prototype.indexOf ( searchElement [ , fromIndex ] )"},{"type":"clause","id":"sec-%typedarray%.prototype.join","aoid":null,"title":"%TypedArray%.prototype.join ( separator )","titleHTML":"%TypedArray%.prototype.join ( <var>separator</var> )","number":"22.2.3.15","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%TypedArray%.prototype.join ( separator )"},{"type":"clause","id":"sec-%typedarray%.prototype.keys","aoid":null,"title":"%TypedArray%.prototype.keys ( )","titleHTML":"%TypedArray%.prototype.keys ( )","number":"22.2.3.16","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%TypedArray%.prototype.keys ( )"},{"type":"clause","id":"sec-%typedarray%.prototype.lastindexof","aoid":null,"title":"%TypedArray%.prototype.lastIndexOf ( searchElement [ , fromIndex ] )","titleHTML":"%TypedArray%.prototype.lastIndexOf ( <var>searchElement</var> [ , <var>fromIndex</var> ] )","number":"22.2.3.17","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%TypedArray%.prototype.lastIndexOf ( searchElement [ , fromIndex ] )"},{"type":"clause","id":"sec-get-%typedarray%.prototype.length","aoid":null,"title":"get %TypedArray%.prototype.length","titleHTML":"get %TypedArray%.prototype.length","number":"22.2.3.18","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"get %TypedArray%.prototype.length"},{"type":"clause","id":"sec-%typedarray%.prototype.map","aoid":null,"title":"%TypedArray%.prototype.map ( callbackfn [ , thisArg ] )","titleHTML":"%TypedArray%.prototype.map ( <var>callbackfn</var> [ , <var>thisArg</var> ] )","number":"22.2.3.19","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%TypedArray%.prototype.map ( callbackfn [ , thisArg ] )"},{"type":"clause","id":"sec-%typedarray%.prototype.reduce","aoid":null,"title":"%TypedArray%.prototype.reduce ( callbackfn [ , initialValue ] )","titleHTML":"%TypedArray%.prototype.reduce ( <var>callbackfn</var> [ , <var>initialValue</var> ] )","number":"22.2.3.20","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%TypedArray%.prototype.reduce ( callbackfn [ , initialValue ] )"},{"type":"clause","id":"sec-%typedarray%.prototype.reduceright","aoid":null,"title":"%TypedArray%.prototype.reduceRight ( callbackfn [ , initialValue ] )","titleHTML":"%TypedArray%.prototype.reduceRight ( <var>callbackfn</var> [ , <var>initialValue</var> ] )","number":"22.2.3.21","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%TypedArray%.prototype.reduceRight ( callbackfn [ , initialValue ] )"},{"type":"clause","id":"sec-%typedarray%.prototype.reverse","aoid":null,"title":"%TypedArray%.prototype.reverse ( )","titleHTML":"%TypedArray%.prototype.reverse ( )","number":"22.2.3.22","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%TypedArray%.prototype.reverse ( )"},{"type":"clause","id":"sec-%typedarray%.prototype.set-array-offset","aoid":null,"title":"%TypedArray%.prototype.set ( array [ , offset ] )","titleHTML":"%TypedArray%.prototype.set ( <var>array</var> [ , <var>offset</var> ] )","number":"22.2.3.23.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_613"],"key":"%TypedArray%.prototype.set ( array [ , offset ] )"},{"type":"clause","id":"sec-%typedarray%.prototype.set-typedarray-offset","aoid":null,"title":"%TypedArray%.prototype.set ( typedArray [ , offset ] )","titleHTML":"%TypedArray%.prototype.set ( <var>typedArray</var> [ , <var>offset</var> ] )","number":"22.2.3.23.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_610"],"key":"%TypedArray%.prototype.set ( typedArray [ , offset ] )"},{"type":"clause","id":"sec-%typedarray%.prototype.set-overloaded-offset","aoid":null,"title":"%TypedArray%.prototype.set ( overloaded [ , offset ] )","titleHTML":"%TypedArray%.prototype.set ( <var>overloaded</var> [ , <var>offset</var> ] )","number":"22.2.3.23","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%TypedArray%.prototype.set ( overloaded [ , offset ] )"},{"type":"clause","id":"sec-%typedarray%.prototype.slice","aoid":null,"title":"%TypedArray%.prototype.slice ( start, end )","titleHTML":"%TypedArray%.prototype.slice ( <var>start</var>, <var>end</var> )","number":"22.2.3.24","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%TypedArray%.prototype.slice ( start, end )"},{"type":"clause","id":"sec-%typedarray%.prototype.some","aoid":null,"title":"%TypedArray%.prototype.some ( callbackfn [ , thisArg ] )","titleHTML":"%TypedArray%.prototype.some ( <var>callbackfn</var> [ , <var>thisArg</var> ] )","number":"22.2.3.25","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%TypedArray%.prototype.some ( callbackfn [ , thisArg ] )"},{"type":"clause","id":"sec-%typedarray%.prototype.sort","aoid":null,"title":"%TypedArray%.prototype.sort ( comparefn )","titleHTML":"%TypedArray%.prototype.sort ( <var>comparefn</var> )","number":"22.2.3.26","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%TypedArray%.prototype.sort ( comparefn )"},{"type":"clause","id":"sec-%typedarray%.prototype.subarray","aoid":null,"title":"%TypedArray%.prototype.subarray ( begin, end )","titleHTML":"%TypedArray%.prototype.subarray ( <var>begin</var>, <var>end</var> )","number":"22.2.3.27","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%TypedArray%.prototype.subarray ( begin, end )"},{"type":"clause","id":"sec-%typedarray%.prototype.tolocalestring","aoid":null,"title":"%TypedArray%.prototype.toLocaleString ( [ reserved1 [ , reserved2 ] ] )","titleHTML":"%TypedArray%.prototype.toLocaleString ( [ <var>reserved1</var> [ , <var>reserved2</var> ] ] )","number":"22.2.3.28","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%TypedArray%.prototype.toLocaleString ( [ reserved1 [ , reserved2 ] ] )"},{"type":"clause","id":"sec-%typedarray%.prototype.tostring","aoid":null,"title":"%TypedArray%.prototype.toString ( )","titleHTML":"%TypedArray%.prototype.toString ( )","number":"22.2.3.29","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%TypedArray%.prototype.toString ( )"},{"type":"clause","id":"sec-%typedarray%.prototype.values","aoid":null,"title":"%TypedArray%.prototype.values ( )","titleHTML":"%TypedArray%.prototype.values ( )","number":"22.2.3.30","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%TypedArray%.prototype.values ( )"},{"type":"clause","id":"sec-%typedarray%.prototype-@@iterator","aoid":null,"title":"%TypedArray%.prototype [ @@iterator ] ( )","titleHTML":"%TypedArray%.prototype [ @@iterator ] ( )","number":"22.2.3.31","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%TypedArray%.prototype [ @@iterator ] ( )"},{"type":"clause","id":"sec-get-%typedarray%.prototype-@@tostringtag","aoid":null,"title":"get %TypedArray%.prototype [ @@toStringTag ]","titleHTML":"get %TypedArray%.prototype [ @@toStringTag ]","number":"22.2.3.32","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"get %TypedArray%.prototype [ @@toStringTag ]"},{"type":"clause","id":"sec-properties-of-the-%typedarrayprototype%-object","aoid":null,"title":"Properties of the %TypedArrayPrototype% Object","titleHTML":"Properties of the %TypedArrayPrototype% Object","number":"22.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1181","_ref_6859","_ref_6862","_ref_7146"],"key":"Properties of the %TypedArrayPrototype% Object"},{"type":"clause","id":"sec-typedarray","aoid":null,"title":"TypedArray ( )","titleHTML":"<var>TypedArray</var> ( )","number":"22.2.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"TypedArray ( )"},{"type":"op","aoid":"AllocateTypedArray","refId":"sec-allocatetypedarray","location":"","referencingIds":[],"key":"AllocateTypedArray"},{"type":"clause","id":"sec-allocatetypedarray","aoid":"AllocateTypedArray","title":"Runtime Semantics: AllocateTypedArray ( constructorName, newTarget, defaultProto [ , length ] )","titleHTML":"Runtime Semantics: AllocateTypedArray ( <var>constructorName</var>, <var>newTarget</var>, <var>defaultProto</var> [ , <var>length</var> ] )","number":"22.2.4.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7073","_ref_7079","_ref_7095","_ref_7111","_ref_7129"],"key":"Runtime Semantics: AllocateTypedArray ( constructorName, newTarget, defaultProto [ , length ] )"},{"type":"op","aoid":"AllocateTypedArrayBuffer","refId":"sec-allocatetypedarraybuffer","location":"","referencingIds":[],"key":"AllocateTypedArrayBuffer"},{"type":"clause","id":"sec-allocatetypedarraybuffer","aoid":"AllocateTypedArrayBuffer","title":"Runtime Semantics: AllocateTypedArrayBuffer ( O, length )","titleHTML":"Runtime Semantics: AllocateTypedArrayBuffer ( <var>O</var>, <var>length</var> )","number":"22.2.4.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7085","_ref_7114","_ref_7121"],"key":"Runtime Semantics: AllocateTypedArrayBuffer ( O, length )"},{"type":"clause","id":"sec-typedarray-length","aoid":null,"title":"TypedArray ( length )","titleHTML":"<var>TypedArray</var> ( <var>length</var> )","number":"22.2.4.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"TypedArray ( length )"},{"type":"clause","id":"sec-typedarray-typedarray","aoid":null,"title":"TypedArray ( typedArray )","titleHTML":"<var>TypedArray</var> ( <var>typedArray</var> )","number":"22.2.4.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"TypedArray ( typedArray )"},{"type":"clause","id":"sec-typedarray-object","aoid":null,"title":"TypedArray ( object )","titleHTML":"<var>TypedArray</var> ( <var>object</var> )","number":"22.2.4.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"TypedArray ( object )"},{"type":"clause","id":"sec-typedarray-buffer-byteoffset-length","aoid":null,"title":"TypedArray ( buffer [ , byteOffset [ , length ] ] )","titleHTML":"<var>TypedArray</var> ( <var>buffer</var> [ , <var>byteOffset</var> [ , <var>length</var> ] ] )","number":"22.2.4.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"TypedArray ( buffer [ , byteOffset [ , length ] ] )"},{"type":"op","aoid":"TypedArrayCreate","refId":"typedarray-create","location":"","referencingIds":[],"key":"TypedArrayCreate"},{"type":"clause","id":"typedarray-create","aoid":"TypedArrayCreate","title":"TypedArrayCreate ( constructor, argumentList )","titleHTML":"TypedArrayCreate ( <var>constructor</var>, <var>argumentList</var> )","number":"22.2.4.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_6834","_ref_6843","_ref_6855","_ref_7142"],"key":"TypedArrayCreate ( constructor, argumentList )"},{"type":"op","aoid":"TypedArraySpeciesCreate","refId":"typedarray-species-create","location":"","referencingIds":[],"key":"TypedArraySpeciesCreate"},{"type":"clause","id":"typedarray-species-create","aoid":"TypedArraySpeciesCreate","title":"TypedArraySpeciesCreate ( exemplar, argumentList )","titleHTML":"TypedArraySpeciesCreate ( <var>exemplar</var>, <var>argumentList</var> )","number":"22.2.4.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_6925","_ref_6959","_ref_7015","_ref_7051"],"key":"TypedArraySpeciesCreate ( exemplar, argumentList )"},{"type":"clause","id":"sec-typedarray-constructors","aoid":null,"title":"The TypedArray Constructors","titleHTML":"The <var>TypedArray</var> Constructors","number":"22.2.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_437","_ref_438","_ref_440","_ref_441","_ref_442","_ref_457","_ref_458","_ref_459","_ref_460"],"key":"The TypedArray Constructors"},{"type":"clause","id":"sec-typedarray.bytes_per_element","aoid":null,"title":"TypedArray.BYTES_PER_ELEMENT","titleHTML":"<var>TypedArray</var>.BYTES_PER_ELEMENT","number":"22.2.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"TypedArray.BYTES_PER_ELEMENT"},{"type":"clause","id":"sec-typedarray.prototype","aoid":null,"title":"TypedArray.prototype","titleHTML":"<var>TypedArray</var>.prototype","number":"22.2.5.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"TypedArray.prototype"},{"type":"clause","id":"sec-properties-of-the-typedarray-constructors","aoid":null,"title":"Properties of the TypedArray Constructors","titleHTML":"Properties of the <var>TypedArray</var> Constructors","number":"22.2.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of the TypedArray Constructors"},{"type":"clause","id":"sec-typedarray.prototype.bytes_per_element","aoid":null,"title":"TypedArray.prototype.BYTES_PER_ELEMENT","titleHTML":"<var>TypedArray</var>.prototype.BYTES_PER_ELEMENT","number":"22.2.6.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"TypedArray.prototype.BYTES_PER_ELEMENT"},{"type":"clause","id":"sec-typedarray.prototype.constructor","aoid":null,"title":"TypedArray.prototype.constructor","titleHTML":"<var>TypedArray</var>.prototype.constructor","number":"22.2.6.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"TypedArray.prototype.constructor"},{"type":"clause","id":"sec-properties-of-typedarray-prototype-objects","aoid":null,"title":"Properties of the TypedArray Prototype Objects","titleHTML":"Properties of the <var>TypedArray</var> Prototype Objects","number":"22.2.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_648"],"key":"Properties of the TypedArray Prototype Objects"},{"type":"clause","id":"sec-properties-of-typedarray-instances","aoid":null,"title":"Properties of TypedArray Instances","titleHTML":"Properties of <var>TypedArray</var> Instances","number":"22.2.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of TypedArray Instances"},{"type":"clause","id":"sec-typedarray-objects","aoid":null,"title":"TypedArray Objects","titleHTML":"TypedArray Objects","number":"22.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_75","_ref_76","_ref_79","_ref_80","_ref_81","_ref_115","_ref_116","_ref_117","_ref_118"],"key":"TypedArray Objects"},{"type":"clause","id":"sec-indexed-collections","aoid":null,"title":"Indexed Collections","titleHTML":"Indexed Collections","number":"22","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Indexed Collections"},{"type":"term","term":"%Map%","refId":"sec-map-constructor","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%Map%"},{"type":"clause","id":"sec-map-iterable","aoid":null,"title":"Map ( [ iterable ] )","titleHTML":"Map ( [ <var>iterable</var> ] )","number":"23.1.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Map ( [ iterable ] )"},{"type":"op","aoid":"AddEntriesFromIterable","refId":"sec-add-entries-from-iterable","location":"","referencingIds":[],"key":"AddEntriesFromIterable"},{"type":"clause","id":"sec-add-entries-from-iterable","aoid":"AddEntriesFromIterable","title":"AddEntriesFromIterable ( target, iterable, adder )","titleHTML":"AddEntriesFromIterable ( <var>target</var>, <var>iterable</var>, <var>adder</var> )","number":"23.1.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_4928","_ref_7155","_ref_7303"],"key":"AddEntriesFromIterable ( target, iterable, adder )"},{"type":"clause","id":"sec-map-constructor","aoid":null,"title":"The Map Constructor","titleHTML":"The Map Constructor","number":"23.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_85","_ref_443","_ref_1100","_ref_1105","_ref_7186"],"key":"The Map Constructor"},{"type":"clause","id":"sec-map.prototype","aoid":null,"title":"Map.prototype","titleHTML":"Map.prototype","number":"23.1.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Map.prototype"},{"type":"clause","id":"sec-get-map-@@species","aoid":null,"title":"get Map [ @@species ]","titleHTML":"get Map [ @@species ]","number":"23.1.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"get Map [ @@species ]"},{"type":"clause","id":"sec-properties-of-the-map-constructor","aoid":null,"title":"Properties of the Map Constructor","titleHTML":"Properties of the Map Constructor","number":"23.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of the Map Constructor"},{"type":"term","term":"%MapPrototype%","refId":"sec-properties-of-the-map-prototype-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%MapPrototype%"},{"type":"clause","id":"sec-map.prototype.clear","aoid":null,"title":"Map.prototype.clear ( )","titleHTML":"Map.prototype.clear ( )","number":"23.1.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Map.prototype.clear ( )"},{"type":"clause","id":"sec-map.prototype.constructor","aoid":null,"title":"Map.prototype.constructor","titleHTML":"Map.prototype.constructor","number":"23.1.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Map.prototype.constructor"},{"type":"clause","id":"sec-map.prototype.delete","aoid":null,"title":"Map.prototype.delete ( key )","titleHTML":"Map.prototype.delete ( <var>key</var> )","number":"23.1.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Map.prototype.delete ( key )"},{"type":"clause","id":"sec-map.prototype.entries","aoid":null,"title":"Map.prototype.entries ( )","titleHTML":"Map.prototype.entries ( )","number":"23.1.3.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Map.prototype.entries ( )"},{"type":"clause","id":"sec-map.prototype.foreach","aoid":null,"title":"Map.prototype.forEach ( callbackfn [ , thisArg ] )","titleHTML":"Map.prototype.forEach ( <var>callbackfn</var> [ , <var>thisArg</var> ] )","number":"23.1.3.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Map.prototype.forEach ( callbackfn [ , thisArg ] )"},{"type":"clause","id":"sec-map.prototype.get","aoid":null,"title":"Map.prototype.get ( key )","titleHTML":"Map.prototype.get ( <var>key</var> )","number":"23.1.3.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Map.prototype.get ( key )"},{"type":"clause","id":"sec-map.prototype.has","aoid":null,"title":"Map.prototype.has ( key )","titleHTML":"Map.prototype.has ( <var>key</var> )","number":"23.1.3.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Map.prototype.has ( key )"},{"type":"clause","id":"sec-map.prototype.keys","aoid":null,"title":"Map.prototype.keys ( )","titleHTML":"Map.prototype.keys ( )","number":"23.1.3.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Map.prototype.keys ( )"},{"type":"clause","id":"sec-map.prototype.set","aoid":null,"title":"Map.prototype.set ( key, value )","titleHTML":"Map.prototype.set ( <var>key</var>, <var>value</var> )","number":"23.1.3.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Map.prototype.set ( key, value )"},{"type":"clause","id":"sec-get-map.prototype.size","aoid":null,"title":"get Map.prototype.size","titleHTML":"get Map.prototype.size","number":"23.1.3.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"get Map.prototype.size"},{"type":"clause","id":"sec-map.prototype.values","aoid":null,"title":"Map.prototype.values ( )","titleHTML":"Map.prototype.values ( )","number":"23.1.3.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Map.prototype.values ( )"},{"type":"clause","id":"sec-map.prototype-@@iterator","aoid":null,"title":"Map.prototype [ @@iterator ] ( )","titleHTML":"Map.prototype [ @@iterator ] ( )","number":"23.1.3.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Map.prototype [ @@iterator ] ( )"},{"type":"clause","id":"sec-map.prototype-@@tostringtag","aoid":null,"title":"Map.prototype [ @@toStringTag ]","titleHTML":"Map.prototype [ @@toStringTag ]","number":"23.1.3.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Map.prototype [ @@toStringTag ]"},{"type":"clause","id":"sec-properties-of-the-map-prototype-object","aoid":null,"title":"Properties of the Map Prototype Object","titleHTML":"Properties of the Map Prototype Object","number":"23.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1103","_ref_7175"],"key":"Properties of the Map Prototype Object"},{"type":"clause","id":"sec-properties-of-map-instances","aoid":null,"title":"Properties of Map Instances","titleHTML":"Properties of Map Instances","number":"23.1.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of Map Instances"},{"type":"op","aoid":"CreateMapIterator","refId":"sec-createmapiterator","location":"","referencingIds":[],"key":"CreateMapIterator"},{"type":"clause","id":"sec-createmapiterator","aoid":"CreateMapIterator","title":"CreateMapIterator ( map, kind )","titleHTML":"CreateMapIterator ( <var>map</var>, <var>kind</var> )","number":"23.1.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7191","_ref_7205","_ref_7215"],"key":"CreateMapIterator ( map, kind )"},{"type":"term","term":"%MapIteratorPrototype%","refId":"sec-%mapiteratorprototype%-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%MapIteratorPrototype%"},{"type":"clause","id":"sec-%mapiteratorprototype%.next","aoid":null,"title":"%MapIteratorPrototype%.next ( )","titleHTML":"%MapIteratorPrototype%.next ( )","number":"23.1.5.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%MapIteratorPrototype%.next ( )"},{"type":"clause","id":"sec-%mapiteratorprototype%-@@tostringtag","aoid":null,"title":"%MapIteratorPrototype% [ @@toStringTag ]","titleHTML":"%MapIteratorPrototype% [ @@toStringTag ]","number":"23.1.5.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%MapIteratorPrototype% [ @@toStringTag ]"},{"type":"clause","id":"sec-%mapiteratorprototype%-object","aoid":null,"title":"The %MapIteratorPrototype% Object","titleHTML":"The %MapIteratorPrototype% Object","number":"23.1.5.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1102","_ref_7220","_ref_7231"],"key":"The %MapIteratorPrototype% Object"},{"type":"table","id":"table-50","number":60,"caption":"Table 60: Internal Slots of Map Iterator Instances","referencingIds":["_ref_652"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 60: Internal Slots of Map Iterator Instances"},{"type":"clause","id":"sec-properties-of-map-iterator-instances","aoid":null,"title":"Properties of Map Iterator Instances","titleHTML":"Properties of Map Iterator Instances","number":"23.1.5.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_651"],"key":"Properties of Map Iterator Instances"},{"type":"clause","id":"sec-map-iterator-objects","aoid":null,"title":"Map Iterator Objects","titleHTML":"Map Iterator Objects","number":"23.1.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_86"],"key":"Map Iterator Objects"},{"type":"clause","id":"sec-map-objects","aoid":null,"title":"Map Objects","titleHTML":"Map Objects","number":"23.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Map Objects"},{"type":"term","term":"%Set%","refId":"sec-set-constructor","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%Set%"},{"type":"clause","id":"sec-set-iterable","aoid":null,"title":"Set ( [ iterable ] )","titleHTML":"Set ( [ <var>iterable</var> ] )","number":"23.2.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Set ( [ iterable ] )"},{"type":"clause","id":"sec-set-constructor","aoid":null,"title":"The Set Constructor","titleHTML":"The Set Constructor","number":"23.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_105","_ref_451","_ref_1154","_ref_1159","_ref_7263"],"key":"The Set Constructor"},{"type":"clause","id":"sec-set.prototype","aoid":null,"title":"Set.prototype","titleHTML":"Set.prototype","number":"23.2.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Set.prototype"},{"type":"clause","id":"sec-get-set-@@species","aoid":null,"title":"get Set [ @@species ]","titleHTML":"get Set [ @@species ]","number":"23.2.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"get Set [ @@species ]"},{"type":"clause","id":"sec-properties-of-the-set-constructor","aoid":null,"title":"Properties of the Set Constructor","titleHTML":"Properties of the Set Constructor","number":"23.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of the Set Constructor"},{"type":"term","term":"%SetPrototype%","refId":"sec-properties-of-the-set-prototype-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%SetPrototype%"},{"type":"clause","id":"sec-set.prototype.add","aoid":null,"title":"Set.prototype.add ( value )","titleHTML":"Set.prototype.add ( <var>value</var> )","number":"23.2.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Set.prototype.add ( value )"},{"type":"clause","id":"sec-set.prototype.clear","aoid":null,"title":"Set.prototype.clear ( )","titleHTML":"Set.prototype.clear ( )","number":"23.2.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Set.prototype.clear ( )"},{"type":"clause","id":"sec-set.prototype.constructor","aoid":null,"title":"Set.prototype.constructor","titleHTML":"Set.prototype.constructor","number":"23.2.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Set.prototype.constructor"},{"type":"clause","id":"sec-set.prototype.delete","aoid":null,"title":"Set.prototype.delete ( value )","titleHTML":"Set.prototype.delete ( <var>value</var> )","number":"23.2.3.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Set.prototype.delete ( value )"},{"type":"clause","id":"sec-set.prototype.entries","aoid":null,"title":"Set.prototype.entries ( )","titleHTML":"Set.prototype.entries ( )","number":"23.2.3.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Set.prototype.entries ( )"},{"type":"clause","id":"sec-set.prototype.foreach","aoid":null,"title":"Set.prototype.forEach ( callbackfn [ , thisArg ] )","titleHTML":"Set.prototype.forEach ( <var>callbackfn</var> [ , <var>thisArg</var> ] )","number":"23.2.3.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Set.prototype.forEach ( callbackfn [ , thisArg ] )"},{"type":"clause","id":"sec-set.prototype.has","aoid":null,"title":"Set.prototype.has ( value )","titleHTML":"Set.prototype.has ( <var>value</var> )","number":"23.2.3.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Set.prototype.has ( value )"},{"type":"clause","id":"sec-set.prototype.keys","aoid":null,"title":"Set.prototype.keys ( )","titleHTML":"Set.prototype.keys ( )","number":"23.2.3.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Set.prototype.keys ( )"},{"type":"clause","id":"sec-get-set.prototype.size","aoid":null,"title":"get Set.prototype.size","titleHTML":"get Set.prototype.size","number":"23.2.3.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"get Set.prototype.size"},{"type":"clause","id":"sec-set.prototype.values","aoid":null,"title":"Set.prototype.values ( )","titleHTML":"Set.prototype.values ( )","number":"23.2.3.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Set.prototype.values ( )"},{"type":"clause","id":"sec-set.prototype-@@iterator","aoid":null,"title":"Set.prototype [ @@iterator ] ( )","titleHTML":"Set.prototype [ @@iterator ] ( )","number":"23.2.3.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Set.prototype [ @@iterator ] ( )"},{"type":"clause","id":"sec-set.prototype-@@tostringtag","aoid":null,"title":"Set.prototype [ @@toStringTag ]","titleHTML":"Set.prototype [ @@toStringTag ]","number":"23.2.3.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Set.prototype [ @@toStringTag ]"},{"type":"clause","id":"sec-properties-of-the-set-prototype-object","aoid":null,"title":"Properties of the Set Prototype Object","titleHTML":"Properties of the Set Prototype Object","number":"23.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1157","_ref_7250"],"key":"Properties of the Set Prototype Object"},{"type":"clause","id":"sec-properties-of-set-instances","aoid":null,"title":"Properties of Set Instances","titleHTML":"Properties of Set Instances","number":"23.2.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of Set Instances"},{"type":"op","aoid":"CreateSetIterator","refId":"sec-createsetiterator","location":"","referencingIds":[],"key":"CreateSetIterator"},{"type":"clause","id":"sec-createsetiterator","aoid":"CreateSetIterator","title":"CreateSetIterator ( set, kind )","titleHTML":"CreateSetIterator ( <var>set</var>, <var>kind</var> )","number":"23.2.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7267","_ref_7279"],"key":"CreateSetIterator ( set, kind )"},{"type":"term","term":"%SetIteratorPrototype%","refId":"sec-%setiteratorprototype%-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%SetIteratorPrototype%"},{"type":"clause","id":"sec-%setiteratorprototype%.next","aoid":null,"title":"%SetIteratorPrototype%.next ( )","titleHTML":"%SetIteratorPrototype%.next ( )","number":"23.2.5.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%SetIteratorPrototype%.next ( )"},{"type":"clause","id":"sec-%setiteratorprototype%-@@tostringtag","aoid":null,"title":"%SetIteratorPrototype% [ @@toStringTag ]","titleHTML":"%SetIteratorPrototype% [ @@toStringTag ]","number":"23.2.5.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%SetIteratorPrototype% [ @@toStringTag ]"},{"type":"clause","id":"sec-%setiteratorprototype%-object","aoid":null,"title":"The %SetIteratorPrototype% Object","titleHTML":"The %SetIteratorPrototype% Object","number":"23.2.5.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1156","_ref_7284","_ref_7294"],"key":"The %SetIteratorPrototype% Object"},{"type":"table","id":"table-51","number":61,"caption":"Table 61: Internal Slots of Set Iterator Instances","referencingIds":["_ref_654"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 61: Internal Slots of Set Iterator Instances"},{"type":"clause","id":"sec-properties-of-set-iterator-instances","aoid":null,"title":"Properties of Set Iterator Instances","titleHTML":"Properties of Set Iterator Instances","number":"23.2.5.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_653"],"key":"Properties of Set Iterator Instances"},{"type":"clause","id":"sec-set-iterator-objects","aoid":null,"title":"Set Iterator Objects","titleHTML":"Set Iterator Objects","number":"23.2.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_106"],"key":"Set Iterator Objects"},{"type":"clause","id":"sec-set-objects","aoid":null,"title":"Set Objects","titleHTML":"Set Objects","number":"23.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Set Objects"},{"type":"term","term":"%WeakMap%","refId":"sec-weakmap-constructor","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%WeakMap%"},{"type":"clause","id":"sec-weakmap-iterable","aoid":null,"title":"WeakMap ( [ iterable ] )","titleHTML":"WeakMap ( [ <var>iterable</var> ] )","number":"23.3.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"WeakMap ( [ iterable ] )"},{"type":"clause","id":"sec-weakmap-constructor","aoid":null,"title":"The WeakMap Constructor","titleHTML":"The WeakMap Constructor","number":"23.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_120","_ref_462","_ref_1196","_ref_1200","_ref_7308"],"key":"The WeakMap Constructor"},{"type":"clause","id":"sec-weakmap.prototype","aoid":null,"title":"WeakMap.prototype","titleHTML":"WeakMap.prototype","number":"23.3.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"WeakMap.prototype"},{"type":"clause","id":"sec-properties-of-the-weakmap-constructor","aoid":null,"title":"Properties of the WeakMap Constructor","titleHTML":"Properties of the WeakMap Constructor","number":"23.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of the WeakMap Constructor"},{"type":"term","term":"%WeakMapPrototype%","refId":"sec-properties-of-the-weakmap-prototype-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%WeakMapPrototype%"},{"type":"clause","id":"sec-weakmap.prototype.constructor","aoid":null,"title":"WeakMap.prototype.constructor","titleHTML":"WeakMap.prototype.constructor","number":"23.3.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"WeakMap.prototype.constructor"},{"type":"clause","id":"sec-weakmap.prototype.delete","aoid":null,"title":"WeakMap.prototype.delete ( key )","titleHTML":"WeakMap.prototype.delete ( <var>key</var> )","number":"23.3.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"WeakMap.prototype.delete ( key )"},{"type":"clause","id":"sec-weakmap.prototype.get","aoid":null,"title":"WeakMap.prototype.get ( key )","titleHTML":"WeakMap.prototype.get ( <var>key</var> )","number":"23.3.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"WeakMap.prototype.get ( key )"},{"type":"clause","id":"sec-weakmap.prototype.has","aoid":null,"title":"WeakMap.prototype.has ( key )","titleHTML":"WeakMap.prototype.has ( <var>key</var> )","number":"23.3.3.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"WeakMap.prototype.has ( key )"},{"type":"clause","id":"sec-weakmap.prototype.set","aoid":null,"title":"WeakMap.prototype.set ( key, value )","titleHTML":"WeakMap.prototype.set ( <var>key</var>, <var>value</var> )","number":"23.3.3.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"WeakMap.prototype.set ( key, value )"},{"type":"clause","id":"sec-weakmap.prototype-@@tostringtag","aoid":null,"title":"WeakMap.prototype [ @@toStringTag ]","titleHTML":"WeakMap.prototype [ @@toStringTag ]","number":"23.3.3.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"WeakMap.prototype [ @@toStringTag ]"},{"type":"clause","id":"sec-properties-of-the-weakmap-prototype-object","aoid":null,"title":"Properties of the WeakMap Prototype Object","titleHTML":"Properties of the WeakMap Prototype Object","number":"23.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1198","_ref_7306"],"key":"Properties of the WeakMap Prototype Object"},{"type":"clause","id":"sec-properties-of-weakmap-instances","aoid":null,"title":"Properties of WeakMap Instances","titleHTML":"Properties of WeakMap Instances","number":"23.3.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of WeakMap Instances"},{"type":"clause","id":"sec-weakmap-objects","aoid":null,"title":"WeakMap Objects","titleHTML":"WeakMap Objects","number":"23.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_655"],"key":"WeakMap Objects"},{"type":"term","term":"%WeakSet%","refId":"sec-weakset-constructor","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%WeakSet%"},{"type":"clause","id":"sec-weakset-iterable","aoid":null,"title":"WeakSet ( [ iterable ] )","titleHTML":"WeakSet ( [ <var>iterable</var> ] )","number":"23.4.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"WeakSet ( [ iterable ] )"},{"type":"clause","id":"sec-weakset-constructor","aoid":null,"title":"The WeakSet Constructor","titleHTML":"The WeakSet Constructor","number":"23.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_121","_ref_1201","_ref_1205","_ref_7352"],"key":"The WeakSet Constructor"},{"type":"clause","id":"sec-weakset.prototype","aoid":null,"title":"WeakSet.prototype","titleHTML":"WeakSet.prototype","number":"23.4.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"WeakSet.prototype"},{"type":"clause","id":"sec-properties-of-the-weakset-constructor","aoid":null,"title":"Properties of the WeakSet Constructor","titleHTML":"Properties of the WeakSet Constructor","number":"23.4.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of the WeakSet Constructor"},{"type":"term","term":"%WeakSetPrototype%","refId":"sec-properties-of-the-weakset-prototype-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%WeakSetPrototype%"},{"type":"clause","id":"sec-weakset.prototype.add","aoid":null,"title":"WeakSet.prototype.add ( value )","titleHTML":"WeakSet.prototype.add ( <var>value</var> )","number":"23.4.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"WeakSet.prototype.add ( value )"},{"type":"clause","id":"sec-weakset.prototype.constructor","aoid":null,"title":"WeakSet.prototype.constructor","titleHTML":"WeakSet.prototype.constructor","number":"23.4.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"WeakSet.prototype.constructor"},{"type":"clause","id":"sec-weakset.prototype.delete","aoid":null,"title":"WeakSet.prototype.delete ( value )","titleHTML":"WeakSet.prototype.delete ( <var>value</var> )","number":"23.4.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"WeakSet.prototype.delete ( value )"},{"type":"clause","id":"sec-weakset.prototype.has","aoid":null,"title":"WeakSet.prototype.has ( value )","titleHTML":"WeakSet.prototype.has ( <var>value</var> )","number":"23.4.3.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"WeakSet.prototype.has ( value )"},{"type":"clause","id":"sec-weakset.prototype-@@tostringtag","aoid":null,"title":"WeakSet.prototype [ @@toStringTag ]","titleHTML":"WeakSet.prototype [ @@toStringTag ]","number":"23.4.3.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"WeakSet.prototype [ @@toStringTag ]"},{"type":"clause","id":"sec-properties-of-the-weakset-prototype-object","aoid":null,"title":"Properties of the WeakSet Prototype Object","titleHTML":"Properties of the WeakSet Prototype Object","number":"23.4.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1203","_ref_7346"],"key":"Properties of the WeakSet Prototype Object"},{"type":"clause","id":"sec-properties-of-weakset-instances","aoid":null,"title":"Properties of WeakSet Instances","titleHTML":"Properties of WeakSet Instances","number":"23.4.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of WeakSet Instances"},{"type":"clause","id":"sec-weakset-objects","aoid":null,"title":"WeakSet Objects","titleHTML":"WeakSet Objects","number":"23.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_463"],"key":"WeakSet Objects"},{"type":"clause","id":"sec-keyed-collections","aoid":null,"title":"Keyed Collections","titleHTML":"Keyed Collections","number":"23","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Keyed Collections"},{"type":"op","aoid":"AllocateArrayBuffer","refId":"sec-allocatearraybuffer","location":"","referencingIds":[],"key":"AllocateArrayBuffer"},{"type":"clause","id":"sec-allocatearraybuffer","aoid":"AllocateArrayBuffer","title":"AllocateArrayBuffer ( constructor, byteLength )","titleHTML":"AllocateArrayBuffer ( <var>constructor</var>, <var>byteLength</var> )","number":"24.1.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7089","_ref_7103","_ref_7378","_ref_7439"],"key":"AllocateArrayBuffer ( constructor, byteLength )"},{"type":"op","aoid":"IsDetachedBuffer","refId":"sec-isdetachedbuffer","location":"","referencingIds":[],"key":"IsDetachedBuffer"},{"type":"clause","id":"sec-isdetachedbuffer","aoid":"IsDetachedBuffer","title":"IsDetachedBuffer ( arrayBuffer )","titleHTML":"IsDetachedBuffer ( <var>arrayBuffer</var> )","number":"24.1.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2837","_ref_2879","_ref_2886","_ref_6794","_ref_6874","_ref_6879","_ref_6894","_ref_6899","_ref_6914","_ref_6955","_ref_6979","_ref_6986","_ref_6992","_ref_6993","_ref_7021","_ref_7041","_ref_7096","_ref_7104","_ref_7133","_ref_7379","_ref_7383","_ref_7403","_ref_7451","_ref_7455","_ref_7467","_ref_7469","_ref_7514","_ref_7521","_ref_7529","_ref_7532","_ref_7543","_ref_7547"],"key":"IsDetachedBuffer ( arrayBuffer )"},{"type":"op","aoid":"DetachArrayBuffer","refId":"sec-detacharraybuffer","location":"","referencingIds":[],"key":"DetachArrayBuffer"},{"type":"clause","id":"sec-detacharraybuffer","aoid":"DetachArrayBuffer","title":"DetachArrayBuffer ( arrayBuffer [ , key ] )","titleHTML":"DetachArrayBuffer ( <var>arrayBuffer</var> [ , <var>key</var> ] )","number":"24.1.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7471"],"key":"DetachArrayBuffer ( arrayBuffer [ , key ] )"},{"type":"op","aoid":"CloneArrayBuffer","refId":"sec-clonearraybuffer","location":"","referencingIds":[],"key":"CloneArrayBuffer"},{"type":"clause","id":"sec-clonearraybuffer","aoid":"CloneArrayBuffer","title":"CloneArrayBuffer ( srcBuffer, srcByteOffset, srcLength, cloneConstructor )","titleHTML":"CloneArrayBuffer ( <var>srcBuffer</var>, <var>srcByteOffset</var>, <var>srcLength</var>, <var>cloneConstructor</var> )","number":"24.1.1.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_6998","_ref_7102"],"key":"CloneArrayBuffer ( srcBuffer, srcByteOffset, srcLength, cloneConstructor )"},{"type":"op","aoid":"RawBytesToNumber","refId":"sec-rawbytestonumber","location":"","referencingIds":[],"key":"RawBytesToNumber"},{"type":"clause","id":"sec-rawbytestonumber","aoid":"RawBytesToNumber","title":"RawBytesToNumber ( type, rawBytes, isLittleEndian )","titleHTML":"RawBytesToNumber ( <var>type</var>, <var>rawBytes</var>, <var>isLittleEndian</var> )","number":"24.1.1.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7397","_ref_7433"],"key":"RawBytesToNumber ( type, rawBytes, isLittleEndian )"},{"type":"op","aoid":"GetValueFromBuffer","refId":"sec-getvaluefrombuffer","location":"","referencingIds":[],"key":"GetValueFromBuffer"},{"type":"clause","id":"sec-getvaluefrombuffer","aoid":"GetValueFromBuffer","title":"GetValueFromBuffer ( arrayBuffer, byteIndex, type, isTypedArray, order [ , isLittleEndian ] )","titleHTML":"GetValueFromBuffer ( <var>arrayBuffer</var>, <var>byteIndex</var>, <var>type</var>, <var>isTypedArray</var>, <var>order</var> [ , <var>isLittleEndian</var> ] )","number":"24.1.1.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2243","_ref_2881","_ref_6895","_ref_7002","_ref_7004","_ref_7022","_ref_7105","_ref_7515","_ref_7648"],"key":"GetValueFromBuffer ( arrayBuffer, byteIndex, type, isTypedArray, order [ , isLittleEndian ] )"},{"type":"op","aoid":"NumberToRawBytes","refId":"sec-numbertorawbytes","location":"","referencingIds":[],"key":"NumberToRawBytes"},{"type":"clause","id":"sec-numbertorawbytes","aoid":"NumberToRawBytes","title":"NumberToRawBytes ( type, value, isLittleEndian )","titleHTML":"NumberToRawBytes ( <var>type</var>, <var>value</var>, <var>isLittleEndian</var> )","number":"24.1.1.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7410","_ref_7425","_ref_7662"],"key":"NumberToRawBytes ( type, value, isLittleEndian )"},{"type":"op","aoid":"SetValueInBuffer","refId":"sec-setvalueinbuffer","location":"","referencingIds":[],"key":"SetValueInBuffer"},{"type":"clause","id":"sec-setvalueinbuffer","aoid":"SetValueInBuffer","title":"SetValueInBuffer ( arrayBuffer, byteIndex, type, value, isTypedArray, order [ , isLittleEndian ] )","titleHTML":"SetValueInBuffer ( <var>arrayBuffer</var>, <var>byteIndex</var>, <var>type</var>, <var>value</var>, <var>isTypedArray</var>, <var>order</var> [ , <var>isLittleEndian</var> ] )","number":"24.1.1.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2244","_ref_2888","_ref_6896","_ref_6987","_ref_7003","_ref_7005","_ref_7023","_ref_7106","_ref_7522","_ref_7678"],"key":"SetValueInBuffer ( arrayBuffer, byteIndex, type, value, isTypedArray, order [ , isLittleEndian ] )"},{"type":"op","aoid":"GetModifySetValueInBuffer","refId":"sec-getmodifysetvalueinbuffer","location":"","referencingIds":[],"key":"GetModifySetValueInBuffer"},{"type":"clause","id":"sec-getmodifysetvalueinbuffer","aoid":"GetModifySetValueInBuffer","title":"GetModifySetValueInBuffer ( arrayBuffer, byteIndex, type, value, op [ , isLittleEndian ] )","titleHTML":"GetModifySetValueInBuffer ( <var>arrayBuffer</var>, <var>byteIndex</var>, <var>type</var>, <var>value</var>, <var>op</var> [ , <var>isLittleEndian</var> ] )","number":"24.1.1.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7645","_ref_7664"],"key":"GetModifySetValueInBuffer ( arrayBuffer, byteIndex, type, value, op [ , isLittleEndian ] )"},{"type":"clause","id":"sec-abstract-operations-for-arraybuffer-objects","aoid":null,"title":"Abstract Operations For ArrayBuffer Objects","titleHTML":"Abstract Operations For ArrayBuffer Objects","number":"24.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Abstract Operations For ArrayBuffer Objects"},{"type":"term","term":"%ArrayBuffer%","refId":"sec-arraybuffer-constructor","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%ArrayBuffer%"},{"type":"clause","id":"sec-arraybuffer-length","aoid":null,"title":"ArrayBuffer ( length )","titleHTML":"ArrayBuffer ( <var>length</var> )","number":"24.1.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"ArrayBuffer ( length )"},{"type":"clause","id":"sec-arraybuffer-constructor","aoid":null,"title":"The ArrayBuffer Constructor","titleHTML":"The ArrayBuffer Constructor","number":"24.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_53","_ref_431","_ref_1006","_ref_1010","_ref_6999","_ref_7000","_ref_7090","_ref_7099","_ref_7100","_ref_7452","_ref_7464"],"key":"The ArrayBuffer Constructor"},{"type":"clause","id":"sec-arraybuffer.isview","aoid":null,"title":"ArrayBuffer.isView ( arg )","titleHTML":"ArrayBuffer.isView ( <var>arg</var> )","number":"24.1.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"ArrayBuffer.isView ( arg )"},{"type":"clause","id":"sec-arraybuffer.prototype","aoid":null,"title":"ArrayBuffer.prototype","titleHTML":"ArrayBuffer.prototype","number":"24.1.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"ArrayBuffer.prototype"},{"type":"clause","id":"sec-get-arraybuffer-@@species","aoid":null,"title":"get ArrayBuffer [ @@species ]","titleHTML":"get ArrayBuffer [ @@species ]","number":"24.1.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"get ArrayBuffer [ @@species ]"},{"type":"clause","id":"sec-properties-of-the-arraybuffer-constructor","aoid":null,"title":"Properties of the ArrayBuffer Constructor","titleHTML":"Properties of the ArrayBuffer Constructor","number":"24.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of the ArrayBuffer Constructor"},{"type":"term","term":"%ArrayBufferPrototype%","refId":"sec-properties-of-the-arraybuffer-prototype-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%ArrayBufferPrototype%"},{"type":"clause","id":"sec-get-arraybuffer.prototype.bytelength","aoid":null,"title":"get ArrayBuffer.prototype.byteLength","titleHTML":"get ArrayBuffer.prototype.byteLength","number":"24.1.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"get ArrayBuffer.prototype.byteLength"},{"type":"clause","id":"sec-arraybuffer.prototype.constructor","aoid":null,"title":"ArrayBuffer.prototype.constructor","titleHTML":"ArrayBuffer.prototype.constructor","number":"24.1.4.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"ArrayBuffer.prototype.constructor"},{"type":"clause","id":"sec-arraybuffer.prototype.slice","aoid":null,"title":"ArrayBuffer.prototype.slice ( start, end )","titleHTML":"ArrayBuffer.prototype.slice ( <var>start</var>, <var>end</var> )","number":"24.1.4.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"ArrayBuffer.prototype.slice ( start, end )"},{"type":"clause","id":"sec-arraybuffer.prototype-@@tostringtag","aoid":null,"title":"ArrayBuffer.prototype [ @@toStringTag ]","titleHTML":"ArrayBuffer.prototype [ @@toStringTag ]","number":"24.1.4.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"ArrayBuffer.prototype [ @@toStringTag ]"},{"type":"clause","id":"sec-properties-of-the-arraybuffer-prototype-object","aoid":null,"title":"Properties of the ArrayBuffer Prototype Object","titleHTML":"Properties of the ArrayBuffer Prototype Object","number":"24.1.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1008","_ref_7443"],"key":"Properties of the ArrayBuffer Prototype Object"},{"type":"clause","id":"sec-properties-of-the-arraybuffer-instances","aoid":null,"title":"Properties of ArrayBuffer Instances","titleHTML":"Properties of ArrayBuffer Instances","number":"24.1.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of ArrayBuffer Instances"},{"type":"clause","id":"sec-arraybuffer-objects","aoid":null,"title":"ArrayBuffer Objects","titleHTML":"ArrayBuffer Objects","number":"24.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_33","_ref_581"],"key":"ArrayBuffer Objects"},{"type":"op","aoid":"AllocateSharedArrayBuffer","refId":"sec-allocatesharedarraybuffer","location":"","referencingIds":[],"key":"AllocateSharedArrayBuffer"},{"type":"clause","id":"sec-allocatesharedarraybuffer","aoid":"AllocateSharedArrayBuffer","title":"AllocateSharedArrayBuffer ( constructor, byteLength )","titleHTML":"AllocateSharedArrayBuffer ( <var>constructor</var>, <var>byteLength</var> )","number":"24.2.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7485"],"key":"AllocateSharedArrayBuffer ( constructor, byteLength )"},{"type":"op","aoid":"IsSharedArrayBuffer","refId":"sec-issharedarraybuffer","location":"","referencingIds":[],"key":"IsSharedArrayBuffer"},{"type":"clause","id":"sec-issharedarraybuffer","aoid":"IsSharedArrayBuffer","title":"IsSharedArrayBuffer ( obj )","titleHTML":"IsSharedArrayBuffer ( <var>obj</var> )","number":"24.2.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_6994","_ref_6995","_ref_7097","_ref_7369","_ref_7386","_ref_7411","_ref_7418","_ref_7450","_ref_7454","_ref_7466","_ref_7493","_ref_7496","_ref_7507","_ref_7574"],"key":"IsSharedArrayBuffer ( obj )"},{"type":"clause","id":"sec-abstract-operations-for-sharedarraybuffer-objects","aoid":null,"title":"Abstract Operations for SharedArrayBuffer Objects","titleHTML":"Abstract Operations for SharedArrayBuffer Objects","number":"24.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Abstract Operations for SharedArrayBuffer Objects"},{"type":"term","term":"%SharedArrayBuffer%","refId":"sec-sharedarraybuffer-constructor","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%SharedArrayBuffer%"},{"type":"clause","id":"sec-sharedarraybuffer-length","aoid":null,"title":"SharedArrayBuffer ( [ length ] )","titleHTML":"SharedArrayBuffer ( [ <var>length</var> ] )","number":"24.2.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"SharedArrayBuffer ( [ length ] )"},{"type":"clause","id":"sec-sharedarraybuffer-constructor","aoid":null,"title":"The SharedArrayBuffer Constructor","titleHTML":"The SharedArrayBuffer Constructor","number":"24.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_107","_ref_452","_ref_1160","_ref_1164","_ref_7494","_ref_7505"],"key":"The SharedArrayBuffer Constructor"},{"type":"clause","id":"sec-sharedarraybuffer.prototype","aoid":null,"title":"SharedArrayBuffer.prototype","titleHTML":"SharedArrayBuffer.prototype","number":"24.2.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"SharedArrayBuffer.prototype"},{"type":"clause","id":"sec-sharedarraybuffer-@@species","aoid":null,"title":"get SharedArrayBuffer [ @@species ]","titleHTML":"get SharedArrayBuffer [ @@species ]","number":"24.2.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"get SharedArrayBuffer [ @@species ]"},{"type":"clause","id":"sec-properties-of-the-sharedarraybuffer-constructor","aoid":null,"title":"Properties of the SharedArrayBuffer Constructor","titleHTML":"Properties of the SharedArrayBuffer Constructor","number":"24.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of the SharedArrayBuffer Constructor"},{"type":"term","term":"%SharedArrayBufferPrototype%","refId":"sec-properties-of-the-sharedarraybuffer-prototype-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%SharedArrayBufferPrototype%"},{"type":"clause","id":"sec-get-sharedarraybuffer.prototype.bytelength","aoid":null,"title":"get SharedArrayBuffer.prototype.byteLength","titleHTML":"get SharedArrayBuffer.prototype.byteLength","number":"24.2.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"get SharedArrayBuffer.prototype.byteLength"},{"type":"clause","id":"sec-sharedarraybuffer.prototype.constructor","aoid":null,"title":"SharedArrayBuffer.prototype.constructor","titleHTML":"SharedArrayBuffer.prototype.constructor","number":"24.2.4.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"SharedArrayBuffer.prototype.constructor"},{"type":"clause","id":"sec-sharedarraybuffer.prototype.slice","aoid":null,"title":"SharedArrayBuffer.prototype.slice ( start, end )","titleHTML":"SharedArrayBuffer.prototype.slice ( <var>start</var>, <var>end</var> )","number":"24.2.4.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"SharedArrayBuffer.prototype.slice ( start, end )"},{"type":"clause","id":"sec-sharedarraybuffer.prototype.toString","aoid":null,"title":"SharedArrayBuffer.prototype [ @@toStringTag ]","titleHTML":"SharedArrayBuffer.prototype [ @@toStringTag ]","number":"24.2.4.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"SharedArrayBuffer.prototype [ @@toStringTag ]"},{"type":"clause","id":"sec-properties-of-the-sharedarraybuffer-prototype-object","aoid":null,"title":"Properties of the SharedArrayBuffer Prototype Object","titleHTML":"Properties of the SharedArrayBuffer Prototype Object","number":"24.2.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1162","_ref_7488"],"key":"Properties of the SharedArrayBuffer Prototype Object"},{"type":"clause","id":"sec-properties-of-the-sharedarraybuffer-instances","aoid":null,"title":"Properties of SharedArrayBuffer Instances","titleHTML":"Properties of SharedArrayBuffer Instances","number":"24.2.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of SharedArrayBuffer Instances"},{"type":"clause","id":"sec-sharedarraybuffer-objects","aoid":null,"title":"SharedArrayBuffer Objects","titleHTML":"SharedArrayBuffer Objects","number":"24.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_34"],"key":"SharedArrayBuffer Objects"},{"type":"op","aoid":"GetViewValue","refId":"sec-getviewvalue","location":"","referencingIds":[],"key":"GetViewValue"},{"type":"clause","id":"sec-getviewvalue","aoid":"GetViewValue","title":"GetViewValue ( view, requestIndex, isLittleEndian, type )","titleHTML":"GetViewValue ( <var>view</var>, <var>requestIndex</var>, <var>isLittleEndian</var>, <var>type</var> )","number":"24.3.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7549","_ref_7550","_ref_7551","_ref_7552","_ref_7553","_ref_7554","_ref_7555","_ref_7556"],"key":"GetViewValue ( view, requestIndex, isLittleEndian, type )"},{"type":"op","aoid":"SetViewValue","refId":"sec-setviewvalue","location":"","referencingIds":[],"key":"SetViewValue"},{"type":"clause","id":"sec-setviewvalue","aoid":"SetViewValue","title":"SetViewValue ( view, requestIndex, isLittleEndian, type, value )","titleHTML":"SetViewValue ( <var>view</var>, <var>requestIndex</var>, <var>isLittleEndian</var>, <var>type</var>, <var>value</var> )","number":"24.3.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7557","_ref_7558","_ref_7559","_ref_7560","_ref_7561","_ref_7562","_ref_7563","_ref_7564"],"key":"SetViewValue ( view, requestIndex, isLittleEndian, type, value )"},{"type":"clause","id":"sec-abstract-operations-for-dataview-objects","aoid":null,"title":"Abstract Operations For DataView Objects","titleHTML":"Abstract Operations For DataView Objects","number":"24.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Abstract Operations For DataView Objects"},{"type":"term","term":"%DataView%","refId":"sec-dataview-constructor","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%DataView%"},{"type":"clause","id":"sec-dataview-buffer-byteoffset-bytelength","aoid":null,"title":"DataView ( buffer [ , byteOffset [ , byteLength ] ] )","titleHTML":"DataView ( <var>buffer</var> [ , <var>byteOffset</var> [ , <var>byteLength</var> ] ] )","number":"24.3.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"DataView ( buffer [ , byteOffset [ , byteLength ] ] )"},{"type":"clause","id":"sec-dataview-constructor","aoid":null,"title":"The DataView Constructor","titleHTML":"The DataView Constructor","number":"24.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_66","_ref_433","_ref_1046","_ref_1050","_ref_7548"],"key":"The DataView Constructor"},{"type":"clause","id":"sec-dataview.prototype","aoid":null,"title":"DataView.prototype","titleHTML":"DataView.prototype","number":"24.3.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"DataView.prototype"},{"type":"clause","id":"sec-properties-of-the-dataview-constructor","aoid":null,"title":"Properties of the DataView Constructor","titleHTML":"Properties of the DataView Constructor","number":"24.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of the DataView Constructor"},{"type":"term","term":"%DataViewPrototype%","refId":"sec-properties-of-the-dataview-prototype-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%DataViewPrototype%"},{"type":"clause","id":"sec-get-dataview.prototype.buffer","aoid":null,"title":"get DataView.prototype.buffer","titleHTML":"get DataView.prototype.buffer","number":"24.3.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"get DataView.prototype.buffer"},{"type":"clause","id":"sec-get-dataview.prototype.bytelength","aoid":null,"title":"get DataView.prototype.byteLength","titleHTML":"get DataView.prototype.byteLength","number":"24.3.4.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"get DataView.prototype.byteLength"},{"type":"clause","id":"sec-get-dataview.prototype.byteoffset","aoid":null,"title":"get DataView.prototype.byteOffset","titleHTML":"get DataView.prototype.byteOffset","number":"24.3.4.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"get DataView.prototype.byteOffset"},{"type":"clause","id":"sec-dataview.prototype.constructor","aoid":null,"title":"DataView.prototype.constructor","titleHTML":"DataView.prototype.constructor","number":"24.3.4.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"DataView.prototype.constructor"},{"type":"clause","id":"sec-dataview.prototype.getfloat32","aoid":null,"title":"DataView.prototype.getFloat32 ( byteOffset [ , littleEndian ] )","titleHTML":"DataView.prototype.getFloat32 ( <var>byteOffset</var> [ , <var>littleEndian</var> ] )","number":"24.3.4.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"DataView.prototype.getFloat32 ( byteOffset [ , littleEndian ] )"},{"type":"clause","id":"sec-dataview.prototype.getfloat64","aoid":null,"title":"DataView.prototype.getFloat64 ( byteOffset [ , littleEndian ] )","titleHTML":"DataView.prototype.getFloat64 ( <var>byteOffset</var> [ , <var>littleEndian</var> ] )","number":"24.3.4.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"DataView.prototype.getFloat64 ( byteOffset [ , littleEndian ] )"},{"type":"clause","id":"sec-dataview.prototype.getint8","aoid":null,"title":"DataView.prototype.getInt8 ( byteOffset )","titleHTML":"DataView.prototype.getInt8 ( <var>byteOffset</var> )","number":"24.3.4.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"DataView.prototype.getInt8 ( byteOffset )"},{"type":"clause","id":"sec-dataview.prototype.getint16","aoid":null,"title":"DataView.prototype.getInt16 ( byteOffset [ , littleEndian ] )","titleHTML":"DataView.prototype.getInt16 ( <var>byteOffset</var> [ , <var>littleEndian</var> ] )","number":"24.3.4.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"DataView.prototype.getInt16 ( byteOffset [ , littleEndian ] )"},{"type":"clause","id":"sec-dataview.prototype.getint32","aoid":null,"title":"DataView.prototype.getInt32 ( byteOffset [ , littleEndian ] )","titleHTML":"DataView.prototype.getInt32 ( <var>byteOffset</var> [ , <var>littleEndian</var> ] )","number":"24.3.4.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"DataView.prototype.getInt32 ( byteOffset [ , littleEndian ] )"},{"type":"clause","id":"sec-dataview.prototype.getuint8","aoid":null,"title":"DataView.prototype.getUint8 ( byteOffset )","titleHTML":"DataView.prototype.getUint8 ( <var>byteOffset</var> )","number":"24.3.4.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"DataView.prototype.getUint8 ( byteOffset )"},{"type":"clause","id":"sec-dataview.prototype.getuint16","aoid":null,"title":"DataView.prototype.getUint16 ( byteOffset [ , littleEndian ] )","titleHTML":"DataView.prototype.getUint16 ( <var>byteOffset</var> [ , <var>littleEndian</var> ] )","number":"24.3.4.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"DataView.prototype.getUint16 ( byteOffset [ , littleEndian ] )"},{"type":"clause","id":"sec-dataview.prototype.getuint32","aoid":null,"title":"DataView.prototype.getUint32 ( byteOffset [ , littleEndian ] )","titleHTML":"DataView.prototype.getUint32 ( <var>byteOffset</var> [ , <var>littleEndian</var> ] )","number":"24.3.4.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"DataView.prototype.getUint32 ( byteOffset [ , littleEndian ] )"},{"type":"clause","id":"sec-dataview.prototype.setfloat32","aoid":null,"title":"DataView.prototype.setFloat32 ( byteOffset, value [ , littleEndian ] )","titleHTML":"DataView.prototype.setFloat32 ( <var>byteOffset</var>, <var>value</var> [ , <var>littleEndian</var> ] )","number":"24.3.4.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"DataView.prototype.setFloat32 ( byteOffset, value [ , littleEndian ] )"},{"type":"clause","id":"sec-dataview.prototype.setfloat64","aoid":null,"title":"DataView.prototype.setFloat64 ( byteOffset, value [ , littleEndian ] )","titleHTML":"DataView.prototype.setFloat64 ( <var>byteOffset</var>, <var>value</var> [ , <var>littleEndian</var> ] )","number":"24.3.4.14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"DataView.prototype.setFloat64 ( byteOffset, value [ , littleEndian ] )"},{"type":"clause","id":"sec-dataview.prototype.setint8","aoid":null,"title":"DataView.prototype.setInt8 ( byteOffset, value )","titleHTML":"DataView.prototype.setInt8 ( <var>byteOffset</var>, <var>value</var> )","number":"24.3.4.15","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"DataView.prototype.setInt8 ( byteOffset, value )"},{"type":"clause","id":"sec-dataview.prototype.setint16","aoid":null,"title":"DataView.prototype.setInt16 ( byteOffset, value [ , littleEndian ] )","titleHTML":"DataView.prototype.setInt16 ( <var>byteOffset</var>, <var>value</var> [ , <var>littleEndian</var> ] )","number":"24.3.4.16","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"DataView.prototype.setInt16 ( byteOffset, value [ , littleEndian ] )"},{"type":"clause","id":"sec-dataview.prototype.setint32","aoid":null,"title":"DataView.prototype.setInt32 ( byteOffset, value [ , littleEndian ] )","titleHTML":"DataView.prototype.setInt32 ( <var>byteOffset</var>, <var>value</var> [ , <var>littleEndian</var> ] )","number":"24.3.4.17","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"DataView.prototype.setInt32 ( byteOffset, value [ , littleEndian ] )"},{"type":"clause","id":"sec-dataview.prototype.setuint8","aoid":null,"title":"DataView.prototype.setUint8 ( byteOffset, value )","titleHTML":"DataView.prototype.setUint8 ( <var>byteOffset</var>, <var>value</var> )","number":"24.3.4.18","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"DataView.prototype.setUint8 ( byteOffset, value )"},{"type":"clause","id":"sec-dataview.prototype.setuint16","aoid":null,"title":"DataView.prototype.setUint16 ( byteOffset, value [ , littleEndian ] )","titleHTML":"DataView.prototype.setUint16 ( <var>byteOffset</var>, <var>value</var> [ , <var>littleEndian</var> ] )","number":"24.3.4.19","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"DataView.prototype.setUint16 ( byteOffset, value [ , littleEndian ] )"},{"type":"clause","id":"sec-dataview.prototype.setuint32","aoid":null,"title":"DataView.prototype.setUint32 ( byteOffset, value [ , littleEndian ] )","titleHTML":"DataView.prototype.setUint32 ( <var>byteOffset</var>, <var>value</var> [ , <var>littleEndian</var> ] )","number":"24.3.4.20","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"DataView.prototype.setUint32 ( byteOffset, value [ , littleEndian ] )"},{"type":"clause","id":"sec-dataview.prototype-@@tostringtag","aoid":null,"title":"DataView.prototype [ @@toStringTag ]","titleHTML":"DataView.prototype [ @@toStringTag ]","number":"24.3.4.21","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"DataView.prototype [ @@toStringTag ]"},{"type":"clause","id":"sec-properties-of-the-dataview-prototype-object","aoid":null,"title":"Properties of the DataView Prototype Object","titleHTML":"Properties of the DataView Prototype Object","number":"24.3.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1048","_ref_7535"],"key":"Properties of the DataView Prototype Object"},{"type":"clause","id":"sec-properties-of-dataview-instances","aoid":null,"title":"Properties of DataView Instances","titleHTML":"Properties of DataView Instances","number":"24.3.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of DataView Instances"},{"type":"clause","id":"sec-dataview-objects","aoid":null,"title":"DataView Objects","titleHTML":"DataView Objects","number":"24.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"DataView Objects"},{"type":"term","term":"%Atomics%","refId":"sec-atomics-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%Atomics%"},{"type":"op","aoid":"ValidateSharedIntegerTypedArray","refId":"sec-validatesharedintegertypedarray","location":"","referencingIds":[],"key":"ValidateSharedIntegerTypedArray"},{"type":"clause","id":"sec-validatesharedintegertypedarray","aoid":"ValidateSharedIntegerTypedArray","title":"ValidateSharedIntegerTypedArray ( typedArray [ , onlyInt32 ] )","titleHTML":"ValidateSharedIntegerTypedArray ( <var>typedArray</var> [ , <var>onlyInt32</var> ] )","number":"24.4.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7642","_ref_7646","_ref_7656","_ref_7675","_ref_7684","_ref_7700"],"key":"ValidateSharedIntegerTypedArray ( typedArray [ , onlyInt32 ] )"},{"type":"op","aoid":"ValidateAtomicAccess","refId":"sec-validateatomicaccess","location":"","referencingIds":[],"key":"ValidateAtomicAccess"},{"type":"clause","id":"sec-validateatomicaccess","aoid":"ValidateAtomicAccess","title":"ValidateAtomicAccess ( typedArray, requestIndex )","titleHTML":"ValidateAtomicAccess ( <var>typedArray</var>, <var>requestIndex</var> )","number":"24.4.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7643","_ref_7647","_ref_7657","_ref_7676","_ref_7685","_ref_7701"],"key":"ValidateAtomicAccess ( typedArray, requestIndex )"},{"type":"term","term":"WaiterList","refId":"sec-getwaiterlist","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"WaiterList"},{"type":"op","aoid":"GetWaiterList","refId":"sec-getwaiterlist","location":"","referencingIds":[],"key":"GetWaiterList"},{"type":"clause","id":"sec-getwaiterlist","aoid":"GetWaiterList","title":"GetWaiterList ( block, i )","titleHTML":"GetWaiterList ( <var>block</var>, <var>i</var> )","number":"24.4.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7588","_ref_7589","_ref_7592","_ref_7595","_ref_7598","_ref_7603","_ref_7604","_ref_7609","_ref_7614","_ref_7629","_ref_7690","_ref_7704"],"key":"GetWaiterList ( block, i )"},{"type":"op","aoid":"EnterCriticalSection","refId":"sec-entercriticalsection","location":"","referencingIds":[],"key":"EnterCriticalSection"},{"type":"clause","id":"sec-entercriticalsection","aoid":"EnterCriticalSection","title":"EnterCriticalSection ( WL )","titleHTML":"EnterCriticalSection ( <var>WL</var> )","number":"24.4.1.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7626","_ref_7691","_ref_7705"],"key":"EnterCriticalSection ( WL )"},{"type":"op","aoid":"LeaveCriticalSection","refId":"sec-leavecriticalsection","location":"","referencingIds":[],"key":"LeaveCriticalSection"},{"type":"clause","id":"sec-leavecriticalsection","aoid":"LeaveCriticalSection","title":"LeaveCriticalSection ( WL )","titleHTML":"LeaveCriticalSection ( <var>WL</var> )","number":"24.4.1.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7623","_ref_7693","_ref_7699","_ref_7710"],"key":"LeaveCriticalSection ( WL )"},{"type":"op","aoid":"AddWaiter","refId":"sec-addwaiter","location":"","referencingIds":[],"key":"AddWaiter"},{"type":"clause","id":"sec-addwaiter","aoid":"AddWaiter","title":"AddWaiter ( WL, W )","titleHTML":"AddWaiter ( <var>WL</var>, <var>W</var> )","number":"24.4.1.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7695"],"key":"AddWaiter ( WL, W )"},{"type":"op","aoid":"RemoveWaiter","refId":"sec-removewaiter","location":"","referencingIds":[],"key":"RemoveWaiter"},{"type":"clause","id":"sec-removewaiter","aoid":"RemoveWaiter","title":"RemoveWaiter ( WL, W )","titleHTML":"RemoveWaiter ( <var>WL</var>, <var>W</var> )","number":"24.4.1.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7698"],"key":"RemoveWaiter ( WL, W )"},{"type":"op","aoid":"RemoveWaiters","refId":"sec-removewaiters","location":"","referencingIds":[],"key":"RemoveWaiters"},{"type":"clause","id":"sec-removewaiters","aoid":"RemoveWaiters","title":"RemoveWaiters ( WL, c )","titleHTML":"RemoveWaiters ( <var>WL</var>, <var>c</var> )","number":"24.4.1.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7706"],"key":"RemoveWaiters ( WL, c )"},{"type":"op","aoid":"Suspend","refId":"sec-suspend","location":"","referencingIds":[],"key":"Suspend"},{"type":"clause","id":"sec-suspend","aoid":"Suspend","title":"Suspend ( WL, W, timeout )","titleHTML":"Suspend ( <var>WL</var>, <var>W</var>, <var>timeout</var> )","number":"24.4.1.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1240","_ref_1254","_ref_2209","_ref_4372","_ref_4405","_ref_4411","_ref_4654","_ref_4658","_ref_4822","_ref_7696","_ref_7941","_ref_7955","_ref_8028"],"key":"Suspend ( WL, W, timeout )"},{"type":"op","aoid":"NotifyWaiter","refId":"sec-notifywaiter","location":"","referencingIds":[],"key":"NotifyWaiter"},{"type":"clause","id":"sec-notifywaiter","aoid":"NotifyWaiter","title":"NotifyWaiter ( WL, W )","titleHTML":"NotifyWaiter ( <var>WL</var>, <var>W</var> )","number":"24.4.1.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7625","_ref_7628","_ref_7709"],"key":"NotifyWaiter ( WL, W )"},{"type":"op","aoid":"AtomicReadModifyWrite","refId":"sec-atomicreadmodifywrite","location":"","referencingIds":[],"key":"AtomicReadModifyWrite"},{"type":"clause","id":"sec-atomicreadmodifywrite","aoid":"AtomicReadModifyWrite","title":"AtomicReadModifyWrite ( typedArray, index, value, op )","titleHTML":"AtomicReadModifyWrite ( <var>typedArray</var>, <var>index</var>, <var>value</var>, <var>op</var> )","number":"24.4.1.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7652","_ref_7655","_ref_7666","_ref_7674","_ref_7682","_ref_7713"],"key":"AtomicReadModifyWrite ( typedArray, index, value, op )"},{"type":"op","aoid":"AtomicLoad","refId":"sec-atomicload","location":"","referencingIds":[],"key":"AtomicLoad"},{"type":"clause","id":"sec-atomicload","aoid":"AtomicLoad","title":"AtomicLoad ( typedArray, index )","titleHTML":"AtomicLoad ( <var>typedArray</var>, <var>index</var> )","number":"24.4.1.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7671","_ref_7692"],"key":"AtomicLoad ( typedArray, index )"},{"type":"clause","id":"sec-abstract-operations-for-atomics","aoid":null,"title":"Abstract Operations for Atomics","titleHTML":"Abstract Operations for Atomics","number":"24.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Abstract Operations for Atomics"},{"type":"clause","id":"sec-atomics.add","aoid":null,"title":"Atomics.add ( typedArray, index, value )","titleHTML":"Atomics.add ( <var>typedArray</var>, <var>index</var>, <var>value</var> )","number":"24.4.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Atomics.add ( typedArray, index, value )"},{"type":"clause","id":"sec-atomics.and","aoid":null,"title":"Atomics.and ( typedArray, index, value )","titleHTML":"Atomics.and ( <var>typedArray</var>, <var>index</var>, <var>value</var> )","number":"24.4.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Atomics.and ( typedArray, index, value )"},{"type":"clause","id":"sec-atomics.compareexchange","aoid":null,"title":"Atomics.compareExchange ( typedArray, index, expectedValue, replacementValue )","titleHTML":"Atomics.compareExchange ( <var>typedArray</var>, <var>index</var>, <var>expectedValue</var>, <var>replacementValue</var> )","number":"24.4.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Atomics.compareExchange ( typedArray, index, expectedValue, replacementValue )"},{"type":"clause","id":"sec-atomics.exchange","aoid":null,"title":"Atomics.exchange ( typedArray, index, value )","titleHTML":"Atomics.exchange ( <var>typedArray</var>, <var>index</var>, <var>value</var> )","number":"24.4.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Atomics.exchange ( typedArray, index, value )"},{"type":"clause","id":"sec-atomics.islockfree","aoid":null,"title":"Atomics.isLockFree ( size )","titleHTML":"Atomics.isLockFree ( <var>size</var> )","number":"24.4.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Atomics.isLockFree ( size )"},{"type":"clause","id":"sec-atomics.load","aoid":null,"title":"Atomics.load ( typedArray, index )","titleHTML":"Atomics.load ( <var>typedArray</var>, <var>index</var> )","number":"24.4.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Atomics.load ( typedArray, index )"},{"type":"clause","id":"sec-atomics.or","aoid":null,"title":"Atomics.or ( typedArray, index, value )","titleHTML":"Atomics.or ( <var>typedArray</var>, <var>index</var>, <var>value</var> )","number":"24.4.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Atomics.or ( typedArray, index, value )"},{"type":"clause","id":"sec-atomics.store","aoid":null,"title":"Atomics.store ( typedArray, index, value )","titleHTML":"Atomics.store ( <var>typedArray</var>, <var>index</var>, <var>value</var> )","number":"24.4.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Atomics.store ( typedArray, index, value )"},{"type":"clause","id":"sec-atomics.sub","aoid":null,"title":"Atomics.sub ( typedArray, index, value )","titleHTML":"Atomics.sub ( <var>typedArray</var>, <var>index</var>, <var>value</var> )","number":"24.4.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Atomics.sub ( typedArray, index, value )"},{"type":"clause","id":"sec-atomics.wait","aoid":null,"title":"Atomics.wait ( typedArray, index, value, timeout )","titleHTML":"Atomics.wait ( <var>typedArray</var>, <var>index</var>, <var>value</var>, <var>timeout</var> )","number":"24.4.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Atomics.wait ( typedArray, index, value, timeout )"},{"type":"clause","id":"sec-atomics.notify","aoid":null,"title":"Atomics.notify ( typedArray, index, count )","titleHTML":"Atomics.notify ( <var>typedArray</var>, <var>index</var>, <var>count</var> )","number":"24.4.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Atomics.notify ( typedArray, index, count )"},{"type":"clause","id":"sec-atomics.xor","aoid":null,"title":"Atomics.xor ( typedArray, index, value )","titleHTML":"Atomics.xor ( <var>typedArray</var>, <var>index</var>, <var>value</var> )","number":"24.4.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Atomics.xor ( typedArray, index, value )"},{"type":"clause","id":"sec-atomics-@@tostringtag","aoid":null,"title":"Atomics [ @@toStringTag ]","titleHTML":"Atomics [ @@toStringTag ]","number":"24.4.14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Atomics [ @@toStringTag ]"},{"type":"clause","id":"sec-atomics-object","aoid":null,"title":"The Atomics Object","titleHTML":"The Atomics Object","number":"24.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_63","_ref_464","_ref_1040"],"key":"The Atomics Object"},{"type":"term","term":"%JSON%","refId":"sec-json-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%JSON%"},{"type":"term","term":"%JSONParse%","refId":"sec-json.parse","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%JSONParse%"},{"type":"op","aoid":"InternalizeJSONProperty","refId":"sec-internalizejsonproperty","location":"","referencingIds":[],"key":"InternalizeJSONProperty"},{"type":"clause","id":"sec-internalizejsonproperty","aoid":"InternalizeJSONProperty","title":"Runtime Semantics: InternalizeJSONProperty ( holder, name )","titleHTML":"Runtime Semantics: InternalizeJSONProperty ( <var>holder</var>, <var>name</var> )","number":"24.5.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7725","_ref_7731","_ref_7738"],"key":"Runtime Semantics: InternalizeJSONProperty ( holder, name )"},{"type":"clause","id":"sec-json.parse","aoid":null,"title":"JSON.parse ( text [ , reviver ] )","titleHTML":"JSON.parse ( <var>text</var> [ , <var>reviver</var> ] )","number":"24.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1095"],"key":"JSON.parse ( text [ , reviver ] )"},{"type":"op","aoid":"SerializeJSONProperty","refId":"sec-serializejsonproperty","location":"","referencingIds":[],"key":"SerializeJSONProperty"},{"type":"clause","id":"sec-serializejsonproperty","aoid":"SerializeJSONProperty","title":"Runtime Semantics: SerializeJSONProperty ( key, holder )","titleHTML":"Runtime Semantics: SerializeJSONProperty ( <var>key</var>, <var>holder</var> )","number":"24.5.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7767","_ref_7800","_ref_7812"],"key":"Runtime Semantics: SerializeJSONProperty ( key, holder )"},{"type":"table","id":"table-json-single-character-escapes","number":62,"caption":"Table 62: JSON Single Character Escape Sequences","referencingIds":["_ref_676","_ref_677"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 62: JSON Single Character Escape Sequences"},{"type":"op","aoid":"QuoteJSONString","refId":"sec-quotejsonstring","location":"","referencingIds":[],"key":"QuoteJSONString"},{"type":"clause","id":"sec-quotejsonstring","aoid":"QuoteJSONString","title":"Runtime Semantics: QuoteJSONString ( value )","titleHTML":"Runtime Semantics: QuoteJSONString ( <var>value</var> )","number":"24.5.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7780","_ref_7801"],"key":"Runtime Semantics: QuoteJSONString ( value )"},{"type":"op","aoid":"UnicodeEscape","refId":"sec-unicodeescape","location":"","referencingIds":[],"key":"UnicodeEscape"},{"type":"clause","id":"sec-unicodeescape","aoid":"UnicodeEscape","title":"Runtime Semantics: UnicodeEscape ( C )","titleHTML":"Runtime Semantics: UnicodeEscape ( <var>C</var> )","number":"24.5.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7791"],"key":"Runtime Semantics: UnicodeEscape ( C )"},{"type":"op","aoid":"SerializeJSONObject","refId":"sec-serializejsonobject","location":"","referencingIds":[],"key":"SerializeJSONObject"},{"type":"clause","id":"sec-serializejsonobject","aoid":"SerializeJSONObject","title":"Runtime Semantics: SerializeJSONObject ( value )","titleHTML":"Runtime Semantics: SerializeJSONObject ( <var>value</var> )","number":"24.5.2.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7787"],"key":"Runtime Semantics: SerializeJSONObject ( value )"},{"type":"op","aoid":"SerializeJSONArray","refId":"sec-serializejsonarray","location":"","referencingIds":[],"key":"SerializeJSONArray"},{"type":"clause","id":"sec-serializejsonarray","aoid":"SerializeJSONArray","title":"Runtime Semantics: SerializeJSONArray ( value )","titleHTML":"Runtime Semantics: SerializeJSONArray ( <var>value</var> )","number":"24.5.2.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7786"],"key":"Runtime Semantics: SerializeJSONArray ( value )"},{"type":"clause","id":"sec-json.stringify","aoid":null,"title":"JSON.stringify ( value [ , replacer [ , space ] ] )","titleHTML":"JSON.stringify ( <var>value</var> [ , <var>replacer</var> [ , <var>space</var> ] ] )","number":"24.5.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_516"],"key":"JSON.stringify ( value [ , replacer [ , space ] ] )"},{"type":"clause","id":"sec-json-@@tostringtag","aoid":null,"title":"JSON [ @@toStringTag ]","titleHTML":"JSON [ @@toStringTag ]","number":"24.5.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"JSON [ @@toStringTag ]"},{"type":"clause","id":"sec-json-object","aoid":null,"title":"The JSON Object","titleHTML":"The JSON Object","number":"24.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_84","_ref_465","_ref_1094","_ref_1097","_ref_1099"],"key":"The JSON Object"},{"type":"clause","id":"sec-structured-data","aoid":null,"title":"Structured Data","titleHTML":"Structured Data","number":"24","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Structured Data"},{"type":"table","id":"table-52","number":63,"caption":"Table 63: <i>Iterable</i> Interface Required Properties","referencingIds":["_ref_681"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 63: <i>Iterable</i> Interface Required Properties"},{"type":"clause","id":"sec-iterable-interface","aoid":null,"title":"The Iterable Interface","titleHTML":"The <i>Iterable</i> Interface","number":"25.1.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"The Iterable Interface"},{"type":"table","id":"table-53","number":64,"caption":"Table 64: <i>Iterator</i> Interface Required Properties","referencingIds":["_ref_682"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 64: <i>Iterator</i> Interface Required Properties"},{"type":"table","id":"table-54","number":65,"caption":"Table 65: <i>Iterator</i> Interface Optional Properties","referencingIds":["_ref_683"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 65: <i>Iterator</i> Interface Optional Properties"},{"type":"clause","id":"sec-iterator-interface","aoid":null,"title":"The Iterator Interface","titleHTML":"The <i>Iterator</i> Interface","number":"25.1.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_152","_ref_349","_ref_537"],"key":"The Iterator Interface"},{"type":"table","id":"table-async-iterable","number":66,"caption":"Table 66: <i>AsyncIterable</i> Interface Required Properties","referencingIds":["_ref_684"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 66: <i>AsyncIterable</i> Interface Required Properties"},{"type":"clause","id":"sec-asynciterable-interface","aoid":null,"title":"The AsyncIterable Interface","titleHTML":"The <i>AsyncIterable</i> Interface","number":"25.1.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"The AsyncIterable Interface"},{"type":"table","id":"table-async-iterator-required","number":67,"caption":"Table 67: <i>AsyncIterator</i> Interface Required Properties","referencingIds":["_ref_685"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 67: <i>AsyncIterator</i> Interface Required Properties"},{"type":"table","id":"table-async-iterator-optional","number":68,"caption":"Table 68: <i>AsyncIterator</i> Interface Optional Properties","referencingIds":["_ref_686"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 68: <i>AsyncIterator</i> Interface Optional Properties"},{"type":"clause","id":"sec-asynciterator-interface","aoid":null,"title":"The AsyncIterator Interface","titleHTML":"The <i>AsyncIterator</i> Interface","number":"25.1.1.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"The AsyncIterator Interface"},{"type":"table","id":"table-55","number":69,"caption":"Table 69: <i>IteratorResult</i> Interface Properties","referencingIds":["_ref_687"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 69: <i>IteratorResult</i> Interface Properties"},{"type":"clause","id":"sec-iteratorresult-interface","aoid":null,"title":"The IteratorResult Interface","titleHTML":"The IteratorResult Interface","number":"25.1.1.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"The IteratorResult Interface"},{"type":"clause","id":"sec-common-iteration-interfaces","aoid":null,"title":"Common Iteration Interfaces","titleHTML":"Common Iteration Interfaces","number":"25.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Common Iteration Interfaces"},{"type":"term","term":"%IteratorPrototype%","refId":"sec-%iteratorprototype%-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%IteratorPrototype%"},{"type":"clause","id":"sec-%iteratorprototype%-@@iterator","aoid":null,"title":"%IteratorPrototype% [ @@iterator ] ( )","titleHTML":"%IteratorPrototype% [ @@iterator ] ( )","number":"25.1.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%IteratorPrototype% [ @@iterator ] ( )"},{"type":"clause","id":"sec-%iteratorprototype%-object","aoid":null,"title":"The %IteratorPrototype% Object","titleHTML":"The %IteratorPrototype% Object","number":"25.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1093","_ref_1793","_ref_5964","_ref_6791","_ref_7221","_ref_7285","_ref_7914"],"key":"The %IteratorPrototype% Object"},{"type":"term","term":"%AsyncIteratorPrototype%","refId":"sec-asynciteratorprototype","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%AsyncIteratorPrototype%"},{"type":"clause","id":"sec-asynciteratorprototype-asynciterator","aoid":null,"title":"%AsyncIteratorPrototype% [ @@asyncIterator ] ( )","titleHTML":"%AsyncIteratorPrototype% [ @@asyncIterator ] ( )","number":"25.1.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%AsyncIteratorPrototype% [ @@asyncIterator ] ( )"},{"type":"clause","id":"sec-asynciteratorprototype","aoid":null,"title":"The %AsyncIteratorPrototype% Object","titleHTML":"The %AsyncIteratorPrototype% Object","number":"25.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1039","_ref_7827","_ref_7977"],"key":"The %AsyncIteratorPrototype% Object"},{"type":"op","aoid":"CreateAsyncFromSyncIterator","refId":"sec-createasyncfromsynciterator","location":"","referencingIds":[],"key":"CreateAsyncFromSyncIterator"},{"type":"clause","id":"sec-createasyncfromsynciterator","aoid":"CreateAsyncFromSyncIterator","title":"CreateAsyncFromSyncIterator ( syncIteratorRecord )","titleHTML":"CreateAsyncFromSyncIterator ( <var>syncIteratorRecord</var> )","number":"25.1.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1745","_ref_7821"],"key":"CreateAsyncFromSyncIterator ( syncIteratorRecord )"},{"type":"term","term":"%AsyncFromSyncIteratorPrototype%","refId":"sec-%asyncfromsynciteratorprototype%-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%AsyncFromSyncIteratorPrototype%"},{"type":"clause","id":"sec-%asyncfromsynciteratorprototype%.next","aoid":null,"title":"%AsyncFromSyncIteratorPrototype%.next ( value )","titleHTML":"%AsyncFromSyncIteratorPrototype%.next ( <var>value</var> )","number":"25.1.4.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%AsyncFromSyncIteratorPrototype%.next ( value )"},{"type":"clause","id":"sec-%asyncfromsynciteratorprototype%.return","aoid":null,"title":"%AsyncFromSyncIteratorPrototype%.return ( value )","titleHTML":"%AsyncFromSyncIteratorPrototype%.return ( <var>value</var> )","number":"25.1.4.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%AsyncFromSyncIteratorPrototype%.return ( value )"},{"type":"clause","id":"sec-%asyncfromsynciteratorprototype%.throw","aoid":null,"title":"%AsyncFromSyncIteratorPrototype%.throw ( value )","titleHTML":"%AsyncFromSyncIteratorPrototype%.throw ( <var>value</var> )","number":"25.1.4.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%AsyncFromSyncIteratorPrototype%.throw ( value )"},{"type":"clause","id":"sec-%asyncfromsynciteratorprototype%-@@tostringtag","aoid":null,"title":"%AsyncFromSyncIteratorPrototype% [ @@toStringTag ]","titleHTML":"%AsyncFromSyncIteratorPrototype% [ @@toStringTag ]","number":"25.1.4.2.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"%AsyncFromSyncIteratorPrototype% [ @@toStringTag ]"},{"type":"clause","id":"sec-async-from-sync-iterator-value-unwrap-functions","aoid":null,"title":"Async-from-Sync Iterator Value Unwrap Functions","titleHTML":"Async-from-Sync Iterator Value Unwrap Functions","number":"25.1.4.2.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_689"],"key":"Async-from-Sync Iterator Value Unwrap Functions"},{"type":"clause","id":"sec-%asyncfromsynciteratorprototype%-object","aoid":null,"title":"The %AsyncFromSyncIteratorPrototype% Object","titleHTML":"The %AsyncFromSyncIteratorPrototype% Object","number":"25.1.4.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1027","_ref_7825","_ref_7860","_ref_7863"],"key":"The %AsyncFromSyncIteratorPrototype% Object"},{"type":"table","id":"table-async-from-sync-iterator-internal-slots","number":70,"caption":"Table 70: Internal Slots of Async-from-Sync Iterator Instances","referencingIds":["_ref_688"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 70: Internal Slots of Async-from-Sync Iterator Instances"},{"type":"clause","id":"sec-properties-of-async-from-sync-iterator-instances","aoid":null,"title":"Properties of Async-from-Sync Iterator Instances","titleHTML":"Properties of Async-from-Sync Iterator Instances","number":"25.1.4.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of Async-from-Sync Iterator Instances"},{"type":"op","aoid":"AsyncFromSyncIteratorContinuation","refId":"sec-asyncfromsynciteratorcontinuation","location":"","referencingIds":[],"key":"AsyncFromSyncIteratorContinuation"},{"type":"clause","id":"sec-asyncfromsynciteratorcontinuation","aoid":"AsyncFromSyncIteratorContinuation","title":"AsyncFromSyncIteratorContinuation ( result, promiseCapability )","titleHTML":"AsyncFromSyncIteratorContinuation ( <var>result</var>, <var>promiseCapability</var> )","number":"25.1.4.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7834","_ref_7847","_ref_7859"],"key":"AsyncFromSyncIteratorContinuation ( result, promiseCapability )"},{"type":"clause","id":"sec-async-from-sync-iterator-objects","aoid":null,"title":"Async-from-Sync Iterator Objects","titleHTML":"Async-from-Sync Iterator Objects","number":"25.1.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_60"],"key":"Async-from-Sync Iterator Objects"},{"type":"clause","id":"sec-iteration","aoid":null,"title":"Iteration","titleHTML":"Iteration","number":"25.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_151"],"key":"Iteration"},{"type":"figure","id":"figure-2","number":5,"caption":"Figure 5 (Informative): Generator Objects Relationships","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Figure 5 (Informative): Generator Objects Relationships"},{"type":"term","term":"%GeneratorFunction%","refId":"sec-generatorfunction-constructor","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%GeneratorFunction%"},{"type":"clause","id":"sec-generatorfunction","aoid":null,"title":"GeneratorFunction ( p1, p2, … , pn, body )","titleHTML":"GeneratorFunction ( <var>p1</var>, <var>p2</var>, … , <var>pn</var>, <var>body</var> )","number":"25.2.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_263"],"key":"GeneratorFunction ( p1, p2, … , pn, body )"},{"type":"clause","id":"sec-generatorfunction-constructor","aoid":null,"title":"The GeneratorFunction Constructor","titleHTML":"The GeneratorFunction Constructor","number":"25.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_78","_ref_1079","_ref_1080","_ref_7874","_ref_7887","_ref_7889"],"key":"The GeneratorFunction Constructor"},{"type":"clause","id":"sec-generatorfunction.length","aoid":null,"title":"GeneratorFunction.length","titleHTML":"GeneratorFunction.length","number":"25.2.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"GeneratorFunction.length"},{"type":"clause","id":"sec-generatorfunction.prototype","aoid":null,"title":"GeneratorFunction.prototype","titleHTML":"GeneratorFunction.prototype","number":"25.2.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"GeneratorFunction.prototype"},{"type":"clause","id":"sec-properties-of-the-generatorfunction-constructor","aoid":null,"title":"Properties of the GeneratorFunction Constructor","titleHTML":"Properties of the GeneratorFunction Constructor","number":"25.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of the GeneratorFunction Constructor"},{"type":"term","term":"%Generator%","refId":"sec-properties-of-the-generatorfunction-prototype-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%Generator%"},{"type":"clause","id":"sec-generatorfunction.prototype.constructor","aoid":null,"title":"GeneratorFunction.prototype.constructor","titleHTML":"GeneratorFunction.prototype.constructor","number":"25.2.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"GeneratorFunction.prototype.constructor"},{"type":"clause","id":"sec-generatorfunction.prototype.prototype","aoid":null,"title":"GeneratorFunction.prototype.prototype","titleHTML":"GeneratorFunction.prototype.prototype","number":"25.2.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"GeneratorFunction.prototype.prototype"},{"type":"clause","id":"sec-generatorfunction.prototype-@@tostringtag","aoid":null,"title":"GeneratorFunction.prototype [ @@toStringTag ]","titleHTML":"GeneratorFunction.prototype [ @@toStringTag ]","number":"25.2.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"GeneratorFunction.prototype [ @@toStringTag ]"},{"type":"clause","id":"sec-properties-of-the-generatorfunction-prototype-object","aoid":null,"title":"Properties of the GeneratorFunction Prototype Object","titleHTML":"Properties of the GeneratorFunction Prototype Object","number":"25.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1077","_ref_1084","_ref_2505","_ref_7885","_ref_7913","_ref_7915"],"key":"Properties of the GeneratorFunction Prototype Object"},{"type":"clause","id":"sec-generatorfunction-instances-length","aoid":null,"title":"length","titleHTML":"length","number":"25.2.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"length"},{"type":"clause","id":"sec-generatorfunction-instances-name","aoid":null,"title":"name","titleHTML":"name","number":"25.2.4.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"name"},{"type":"clause","id":"sec-generatorfunction-instances-prototype","aoid":null,"title":"prototype","titleHTML":"prototype","number":"25.2.4.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"prototype"},{"type":"clause","id":"sec-generatorfunction-instances","aoid":null,"title":"GeneratorFunction Instances","titleHTML":"GeneratorFunction Instances","number":"25.2.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"GeneratorFunction Instances"},{"type":"clause","id":"sec-generatorfunction-objects","aoid":null,"title":"GeneratorFunction Objects","titleHTML":"GeneratorFunction Objects","number":"25.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"GeneratorFunction Objects"},{"type":"term","term":"%AsyncGeneratorFunction%","refId":"sec-asyncgeneratorfunction-constructor","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%AsyncGeneratorFunction%"},{"type":"clause","id":"sec-asyncgeneratorfunction","aoid":null,"title":"AsyncGeneratorFunction ( p1, p2, ..., pn, body )","titleHTML":"AsyncGeneratorFunction ( <var>p1</var>, <var>p2</var>, ..., <var>pn</var>, <var>body</var> )","number":"25.3.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"AsyncGeneratorFunction ( p1, p2, ..., pn, body )"},{"type":"clause","id":"sec-asyncgeneratorfunction-constructor","aoid":null,"title":"The AsyncGeneratorFunction Constructor","titleHTML":"The AsyncGeneratorFunction Constructor","number":"25.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_62","_ref_1034","_ref_1035","_ref_7893","_ref_7905","_ref_7908"],"key":"The AsyncGeneratorFunction Constructor"},{"type":"clause","id":"sec-asyncgeneratorfunction-length","aoid":null,"title":"AsyncGeneratorFunction.length","titleHTML":"AsyncGeneratorFunction.length","number":"25.3.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"AsyncGeneratorFunction.length"},{"type":"term","term":"%AsyncGenerator%","refId":"sec-asyncgeneratorfunction-prototype","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%AsyncGenerator%"},{"type":"clause","id":"sec-asyncgeneratorfunction-prototype","aoid":null,"title":"AsyncGeneratorFunction.prototype","titleHTML":"AsyncGeneratorFunction.prototype","number":"25.3.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1033","_ref_1038","_ref_2511","_ref_7906","_ref_7976","_ref_7978"],"key":"AsyncGeneratorFunction.prototype"},{"type":"clause","id":"sec-properties-of-asyncgeneratorfunction","aoid":null,"title":"Properties of the AsyncGeneratorFunction Constructor","titleHTML":"Properties of the AsyncGeneratorFunction Constructor","number":"25.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of the AsyncGeneratorFunction Constructor"},{"type":"clause","id":"sec-asyncgeneratorfunction-prototype-constructor","aoid":null,"title":"AsyncGeneratorFunction.prototype.constructor","titleHTML":"AsyncGeneratorFunction.prototype.constructor","number":"25.3.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"AsyncGeneratorFunction.prototype.constructor"},{"type":"clause","id":"sec-asyncgeneratorfunction-prototype-prototype","aoid":null,"title":"AsyncGeneratorFunction.prototype.prototype","titleHTML":"AsyncGeneratorFunction.prototype.prototype","number":"25.3.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"AsyncGeneratorFunction.prototype.prototype"},{"type":"clause","id":"sec-asyncgeneratorfunction-prototype-tostringtag","aoid":null,"title":"AsyncGeneratorFunction.prototype [ @@toStringTag ]","titleHTML":"AsyncGeneratorFunction.prototype [ @@toStringTag ]","number":"25.3.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"AsyncGeneratorFunction.prototype [ @@toStringTag ]"},{"type":"clause","id":"sec-properties-of-asyncgeneratorfunction-prototype","aoid":null,"title":"Properties of the AsyncGeneratorFunction Prototype Object","titleHTML":"Properties of the AsyncGeneratorFunction Prototype Object","number":"25.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of the AsyncGeneratorFunction Prototype Object"},{"type":"clause","id":"sec-asyncgeneratorfunction-instance-length","aoid":null,"title":"length","titleHTML":"length","number":"25.3.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"length"},{"type":"clause","id":"sec-asyncgeneratorfunction-instance-name","aoid":null,"title":"name","titleHTML":"name","number":"25.3.4.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"name"},{"type":"clause","id":"sec-asyncgeneratorfunction-instance-prototype","aoid":null,"title":"prototype","titleHTML":"prototype","number":"25.3.4.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"prototype"},{"type":"clause","id":"sec-asyncgeneratorfunction-instances","aoid":null,"title":"AsyncGeneratorFunction Instances","titleHTML":"AsyncGeneratorFunction Instances","number":"25.3.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"AsyncGeneratorFunction Instances"},{"type":"clause","id":"sec-asyncgeneratorfunction-objects","aoid":null,"title":"AsyncGeneratorFunction Objects","titleHTML":"AsyncGeneratorFunction Objects","number":"25.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"AsyncGeneratorFunction Objects"},{"type":"term","term":"%GeneratorPrototype%","refId":"sec-properties-of-generator-prototype","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%GeneratorPrototype%"},{"type":"clause","id":"sec-generator.prototype.constructor","aoid":null,"title":"Generator.prototype.constructor","titleHTML":"Generator.prototype.constructor","number":"25.4.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Generator.prototype.constructor"},{"type":"clause","id":"sec-generator.prototype.next","aoid":null,"title":"Generator.prototype.next ( value )","titleHTML":"Generator.prototype.next ( <var>value</var> )","number":"25.4.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Generator.prototype.next ( value )"},{"type":"clause","id":"sec-generator.prototype.return","aoid":null,"title":"Generator.prototype.return ( value )","titleHTML":"Generator.prototype.return ( <var>value</var> )","number":"25.4.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Generator.prototype.return ( value )"},{"type":"clause","id":"sec-generator.prototype.throw","aoid":null,"title":"Generator.prototype.throw ( exception )","titleHTML":"Generator.prototype.throw ( <var>exception</var> )","number":"25.4.1.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Generator.prototype.throw ( exception )"},{"type":"clause","id":"sec-generator.prototype-@@tostringtag","aoid":null,"title":"Generator.prototype [ @@toStringTag ]","titleHTML":"Generator.prototype [ @@toStringTag ]","number":"25.4.1.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Generator.prototype [ @@toStringTag ]"},{"type":"clause","id":"sec-properties-of-generator-prototype","aoid":null,"title":"Properties of the Generator Prototype Object","titleHTML":"Properties of the Generator Prototype Object","number":"25.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1082","_ref_4123","_ref_4128","_ref_4138","_ref_4147","_ref_4155","_ref_5018","_ref_7890","_ref_7912"],"key":"Properties of the Generator Prototype Object"},{"type":"table","id":"table-56","number":71,"caption":"Table 71: Internal Slots of Generator Instances","referencingIds":["_ref_692","_ref_701"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 71: Internal Slots of Generator Instances"},{"type":"clause","id":"sec-properties-of-generator-instances","aoid":null,"title":"Properties of Generator Instances","titleHTML":"Properties of Generator Instances","number":"25.4.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of Generator Instances"},{"type":"op","aoid":"GeneratorStart","refId":"sec-generatorstart","location":"","referencingIds":[],"key":"GeneratorStart"},{"type":"clause","id":"sec-generatorstart","aoid":"GeneratorStart","title":"GeneratorStart ( generator, generatorBody )","titleHTML":"GeneratorStart ( <var>generator</var>, <var>generatorBody</var> )","number":"25.4.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_4118"],"key":"GeneratorStart ( generator, generatorBody )"},{"type":"op","aoid":"GeneratorValidate","refId":"sec-generatorvalidate","location":"","referencingIds":[],"key":"GeneratorValidate"},{"type":"clause","id":"sec-generatorvalidate","aoid":"GeneratorValidate","title":"GeneratorValidate ( generator )","titleHTML":"GeneratorValidate ( <var>generator</var> )","number":"25.4.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7937","_ref_7949"],"key":"GeneratorValidate ( generator )"},{"type":"op","aoid":"GeneratorResume","refId":"sec-generatorresume","location":"","referencingIds":[],"key":"GeneratorResume"},{"type":"clause","id":"sec-generatorresume","aoid":"GeneratorResume","title":"GeneratorResume ( generator, value )","titleHTML":"GeneratorResume ( <var>generator</var>, <var>value</var> )","number":"25.4.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7916"],"key":"GeneratorResume ( generator, value )"},{"type":"op","aoid":"GeneratorResumeAbrupt","refId":"sec-generatorresumeabrupt","location":"","referencingIds":[],"key":"GeneratorResumeAbrupt"},{"type":"clause","id":"sec-generatorresumeabrupt","aoid":"GeneratorResumeAbrupt","title":"GeneratorResumeAbrupt ( generator, abruptCompletion )","titleHTML":"GeneratorResumeAbrupt ( <var>generator</var>, <var>abruptCompletion</var> )","number":"25.4.3.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7918","_ref_7920"],"key":"GeneratorResumeAbrupt ( generator, abruptCompletion )"},{"type":"op","aoid":"GetGeneratorKind","refId":"sec-getgeneratorkind","location":"","referencingIds":[],"key":"GetGeneratorKind"},{"type":"clause","id":"sec-getgeneratorkind","aoid":"GetGeneratorKind","title":"GetGeneratorKind ( )","titleHTML":"GetGeneratorKind ( )","number":"25.4.3.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_3900","_ref_4158","_ref_4162","_ref_4167","_ref_7968","_ref_8061"],"key":"GetGeneratorKind ( )"},{"type":"op","aoid":"GeneratorYield","refId":"sec-generatoryield","location":"","referencingIds":[],"key":"GeneratorYield"},{"type":"clause","id":"sec-generatoryield","aoid":"GeneratorYield","title":"GeneratorYield ( iterNextObj )","titleHTML":"GeneratorYield ( <var>iterNextObj</var> )","number":"25.4.3.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_4160","_ref_4165","_ref_4178","_ref_4187","_ref_4203"],"key":"GeneratorYield ( iterNextObj )"},{"type":"clause","id":"sec-generator-abstract-operations","aoid":null,"title":"Generator Abstract Operations","titleHTML":"Generator Abstract Operations","number":"25.4.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_356"],"key":"Generator Abstract Operations"},{"type":"clause","id":"sec-generator-objects","aoid":null,"title":"Generator Objects","titleHTML":"Generator Objects","number":"25.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Generator Objects"},{"type":"term","term":"%AsyncGeneratorPrototype%","refId":"sec-properties-of-asyncgenerator-prototype","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%AsyncGeneratorPrototype%"},{"type":"clause","id":"sec-asyncgenerator-prototype-constructor","aoid":null,"title":"AsyncGenerator.prototype.constructor","titleHTML":"AsyncGenerator.prototype.constructor","number":"25.5.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"AsyncGenerator.prototype.constructor"},{"type":"clause","id":"sec-asyncgenerator-prototype-next","aoid":null,"title":"AsyncGenerator.prototype.next ( value )","titleHTML":"AsyncGenerator.prototype.next ( <var>value</var> )","number":"25.5.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"AsyncGenerator.prototype.next ( value )"},{"type":"clause","id":"sec-asyncgenerator-prototype-return","aoid":null,"title":"AsyncGenerator.prototype.return ( value )","titleHTML":"AsyncGenerator.prototype.return ( <var>value</var> )","number":"25.5.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_704","_ref_705"],"key":"AsyncGenerator.prototype.return ( value )"},{"type":"clause","id":"sec-asyncgenerator-prototype-throw","aoid":null,"title":"AsyncGenerator.prototype.throw ( exception )","titleHTML":"AsyncGenerator.prototype.throw ( <var>exception</var> )","number":"25.5.1.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"AsyncGenerator.prototype.throw ( exception )"},{"type":"clause","id":"sec-asyncgenerator-prototype-tostringtag","aoid":null,"title":"AsyncGenerator.prototype [ @@toStringTag ]","titleHTML":"AsyncGenerator.prototype [ @@toStringTag ]","number":"25.5.1.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"AsyncGenerator.prototype [ @@toStringTag ]"},{"type":"clause","id":"sec-properties-of-asyncgenerator-prototype","aoid":null,"title":"Properties of the AsyncGenerator Prototype Object","titleHTML":"Properties of the AsyncGenerator Prototype Object","number":"25.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1037","_ref_4215","_ref_4221","_ref_4230","_ref_4239","_ref_4247","_ref_5021","_ref_7909","_ref_7975"],"key":"Properties of the AsyncGenerator Prototype Object"},{"type":"table","id":"table-internal-slots-of-asyncgenerator-instances","number":72,"caption":"Table 72: Internal Slots of AsyncGenerator Instances","referencingIds":["_ref_698"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 72: Internal Slots of AsyncGenerator Instances"},{"type":"clause","id":"sec-properties-of-asyncgenerator-intances","aoid":null,"title":"Properties of AsyncGenerator Instances","titleHTML":"Properties of AsyncGenerator Instances","number":"25.5.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of AsyncGenerator Instances"},{"type":"clause","id":"sec-asyncgeneratorrequest-records","aoid":null,"title":"AsyncGeneratorRequest Records","titleHTML":"AsyncGeneratorRequest Records","number":"25.5.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"AsyncGeneratorRequest Records"},{"type":"op","aoid":"AsyncGeneratorStart","refId":"sec-asyncgeneratorstart","location":"","referencingIds":[],"key":"AsyncGeneratorStart"},{"type":"clause","id":"sec-asyncgeneratorstart","aoid":"AsyncGeneratorStart","title":"AsyncGeneratorStart ( generator, generatorBody )","titleHTML":"AsyncGeneratorStart ( <var>generator</var>, <var>generatorBody</var> )","number":"25.5.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_4210"],"key":"AsyncGeneratorStart ( generator, generatorBody )"},{"type":"op","aoid":"AsyncGeneratorResolve","refId":"sec-asyncgeneratorresolve","location":"","referencingIds":[],"key":"AsyncGeneratorResolve"},{"type":"clause","id":"sec-asyncgeneratorresolve","aoid":"AsyncGeneratorResolve","title":"AsyncGeneratorResolve ( generator, value, done )","titleHTML":"AsyncGeneratorResolve ( <var>generator</var>, <var>value</var>, <var>done</var> )","number":"25.5.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_8000","_ref_8025","_ref_8041","_ref_8073"],"key":"AsyncGeneratorResolve ( generator, value, done )"},{"type":"op","aoid":"AsyncGeneratorReject","refId":"sec-asyncgeneratorreject","location":"","referencingIds":[],"key":"AsyncGeneratorReject"},{"type":"clause","id":"sec-asyncgeneratorreject","aoid":"AsyncGeneratorReject","title":"AsyncGeneratorReject ( generator, exception )","titleHTML":"AsyncGeneratorReject ( <var>generator</var>, <var>exception</var> )","number":"25.5.3.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7999","_ref_8024","_ref_8048"],"key":"AsyncGeneratorReject ( generator, exception )"},{"type":"clause","id":"async-generator-resume-next-return-processor-fulfilled","aoid":null,"title":"AsyncGeneratorResumeNext Return Processor Fulfilled Functions","titleHTML":"AsyncGeneratorResumeNext Return Processor Fulfilled Functions","number":"25.5.3.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_702"],"key":"AsyncGeneratorResumeNext Return Processor Fulfilled Functions"},{"type":"clause","id":"async-generator-resume-next-return-processor-rejected","aoid":null,"title":"AsyncGeneratorResumeNext Return Processor Rejected Functions","titleHTML":"AsyncGeneratorResumeNext Return Processor Rejected Functions","number":"25.5.3.5.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_703"],"key":"AsyncGeneratorResumeNext Return Processor Rejected Functions"},{"type":"op","aoid":"AsyncGeneratorResumeNext","refId":"sec-asyncgeneratorresumenext","location":"","referencingIds":[],"key":"AsyncGeneratorResumeNext"},{"type":"clause","id":"sec-asyncgeneratorresumenext","aoid":"AsyncGeneratorResumeNext","title":"AsyncGeneratorResumeNext ( generator )","titleHTML":"AsyncGeneratorResumeNext ( <var>generator</var> )","number":"25.5.3.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_8007","_ref_8012","_ref_8036","_ref_8037","_ref_8038","_ref_8039","_ref_8042","_ref_8043","_ref_8044","_ref_8045","_ref_8046","_ref_8049","_ref_8056"],"key":"AsyncGeneratorResumeNext ( generator )"},{"type":"op","aoid":"AsyncGeneratorEnqueue","refId":"sec-asyncgeneratorenqueue","location":"","referencingIds":[],"key":"AsyncGeneratorEnqueue"},{"type":"clause","id":"sec-asyncgeneratorenqueue","aoid":"AsyncGeneratorEnqueue","title":"AsyncGeneratorEnqueue ( generator, completion )","titleHTML":"AsyncGeneratorEnqueue ( <var>generator</var>, <var>completion</var> )","number":"25.5.3.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7980","_ref_7982","_ref_7984"],"key":"AsyncGeneratorEnqueue ( generator, completion )"},{"type":"op","aoid":"AsyncGeneratorYield","refId":"sec-asyncgeneratoryield","location":"","referencingIds":[],"key":"AsyncGeneratorYield"},{"type":"clause","id":"sec-asyncgeneratoryield","aoid":"AsyncGeneratorYield","title":"AsyncGeneratorYield ( value )","titleHTML":"AsyncGeneratorYield ( <var>value</var> )","number":"25.5.3.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_4159","_ref_4164","_ref_4176","_ref_4185","_ref_4201"],"key":"AsyncGeneratorYield ( value )"},{"type":"clause","id":"sec-asyncgenerator-abstract-operations","aoid":null,"title":"AsyncGenerator Abstract Operations","titleHTML":"AsyncGenerator Abstract Operations","number":"25.5.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_357"],"key":"AsyncGenerator Abstract Operations"},{"type":"clause","id":"sec-asyncgenerator-objects","aoid":null,"title":"AsyncGenerator Objects","titleHTML":"AsyncGenerator Objects","number":"25.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"AsyncGenerator Objects"},{"type":"table","id":"table-57","number":74,"caption":"Table 74: PromiseCapability Record Fields","referencingIds":["_ref_706"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 74: PromiseCapability Record Fields"},{"type":"op","aoid":"IfAbruptRejectPromise","refId":"sec-ifabruptrejectpromise","location":"","referencingIds":[],"key":"IfAbruptRejectPromise"},{"type":"clause","id":"sec-ifabruptrejectpromise","aoid":"IfAbruptRejectPromise","title":"IfAbruptRejectPromise ( value, capability )","titleHTML":"IfAbruptRejectPromise ( <var>value</var>, <var>capability</var> )","number":"25.6.1.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_7833","_ref_7840","_ref_7844","_ref_7853","_ref_7856","_ref_7867","_ref_7869","_ref_8080","_ref_8174","_ref_8178","_ref_8207","_ref_8211"],"key":"IfAbruptRejectPromise ( value, capability )"},{"type":"clause","id":"sec-promisecapability-records","aoid":null,"title":"PromiseCapability Records","titleHTML":"PromiseCapability Records","number":"25.6.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"PromiseCapability Records"},{"type":"table","id":"table-58","number":75,"caption":"Table 75: PromiseReaction Record Fields","referencingIds":["_ref_707"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 75: PromiseReaction Record Fields"},{"type":"clause","id":"sec-promisereaction-records","aoid":null,"title":"PromiseReaction Records","titleHTML":"PromiseReaction Records","number":"25.6.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"PromiseReaction Records"},{"type":"clause","id":"sec-promise-reject-functions","aoid":null,"title":"Promise Reject Functions","titleHTML":"Promise Reject Functions","number":"25.6.1.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_709"],"key":"Promise Reject Functions"},{"type":"clause","id":"sec-promise-resolve-functions","aoid":null,"title":"Promise Resolve Functions","titleHTML":"Promise Resolve Functions","number":"25.6.1.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_708"],"key":"Promise Resolve Functions"},{"type":"op","aoid":"CreateResolvingFunctions","refId":"sec-createresolvingfunctions","location":"","referencingIds":[],"key":"CreateResolvingFunctions"},{"type":"clause","id":"sec-createresolvingfunctions","aoid":"CreateResolvingFunctions","title":"CreateResolvingFunctions ( promise )","titleHTML":"CreateResolvingFunctions ( <var>promise</var> )","number":"25.6.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_8148","_ref_8162"],"key":"CreateResolvingFunctions ( promise )"},{"type":"op","aoid":"FulfillPromise","refId":"sec-fulfillpromise","location":"","referencingIds":[],"key":"FulfillPromise"},{"type":"clause","id":"sec-fulfillpromise","aoid":"FulfillPromise","title":"FulfillPromise ( promise, value )","titleHTML":"FulfillPromise ( <var>promise</var>, <var>value</var> )","number":"25.6.1.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_8102","_ref_8107"],"key":"FulfillPromise ( promise, value )"},{"type":"clause","id":"sec-getcapabilitiesexecutor-functions","aoid":null,"title":"GetCapabilitiesExecutor Functions","titleHTML":"GetCapabilitiesExecutor Functions","number":"25.6.1.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_711"],"key":"GetCapabilitiesExecutor Functions"},{"type":"op","aoid":"NewPromiseCapability","refId":"sec-newpromisecapability","location":"","referencingIds":[],"key":"NewPromiseCapability"},{"type":"clause","id":"sec-newpromisecapability","aoid":"NewPromiseCapability","title":"NewPromiseCapability ( C )","titleHTML":"NewPromiseCapability ( <var>C</var> )","number":"25.6.1.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_4305","_ref_4348","_ref_7828","_ref_7835","_ref_7848","_ref_8052","_ref_8075","_ref_8172","_ref_8205","_ref_8228","_ref_8243","_ref_8285"],"key":"NewPromiseCapability ( C )"},{"type":"op","aoid":"IsPromise","refId":"sec-ispromise","location":"","referencingIds":[],"key":"IsPromise"},{"type":"clause","id":"sec-ispromise","aoid":"IsPromise","title":"IsPromise ( x )","titleHTML":"IsPromise ( <var>x</var> )","number":"25.6.1.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_8240","_ref_8282","_ref_8288"],"key":"IsPromise ( x )"},{"type":"op","aoid":"RejectPromise","refId":"sec-rejectpromise","location":"","referencingIds":[],"key":"RejectPromise"},{"type":"clause","id":"sec-rejectpromise","aoid":"RejectPromise","title":"RejectPromise ( promise, reason )","titleHTML":"RejectPromise ( <var>promise</var>, <var>reason</var> )","number":"25.6.1.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_8096","_ref_8100","_ref_8105"],"key":"RejectPromise ( promise, reason )"},{"type":"op","aoid":"TriggerPromiseReactions","refId":"sec-triggerpromisereactions","location":"","referencingIds":[],"key":"TriggerPromiseReactions"},{"type":"clause","id":"sec-triggerpromisereactions","aoid":"TriggerPromiseReactions","title":"TriggerPromiseReactions ( reactions, argument )","titleHTML":"TriggerPromiseReactions ( <var>reactions</var>, <var>argument</var> )","number":"25.6.1.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_8111","_ref_8132"],"key":"TriggerPromiseReactions ( reactions, argument )"},{"type":"op","aoid":"HostPromiseRejectionTracker","refId":"sec-host-promise-rejection-tracker","location":"","referencingIds":[],"key":"HostPromiseRejectionTracker"},{"type":"clause","id":"sec-host-promise-rejection-tracker","aoid":"HostPromiseRejectionTracker","title":"HostPromiseRejectionTracker ( promise, operation )","titleHTML":"HostPromiseRejectionTracker ( <var>promise</var>, <var>operation</var> )","number":"25.6.1.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_8131","_ref_8298"],"key":"HostPromiseRejectionTracker ( promise, operation )"},{"type":"clause","id":"sec-promise-abstract-operations","aoid":null,"title":"Promise Abstract Operations","titleHTML":"Promise Abstract Operations","number":"25.6.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Promise Abstract Operations"},{"type":"op","aoid":"PromiseReactionJob","refId":"sec-promisereactionjob","location":"","referencingIds":[],"key":"PromiseReactionJob"},{"type":"clause","id":"sec-promisereactionjob","aoid":"PromiseReactionJob","title":"PromiseReactionJob ( reaction, argument )","titleHTML":"PromiseReactionJob ( <var>reaction</var>, <var>argument</var> )","number":"25.6.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_8086","_ref_8134","_ref_8296","_ref_8300"],"key":"PromiseReactionJob ( reaction, argument )"},{"type":"op","aoid":"PromiseResolveThenableJob","refId":"sec-promiseresolvethenablejob","location":"","referencingIds":[],"key":"PromiseResolveThenableJob"},{"type":"clause","id":"sec-promiseresolvethenablejob","aoid":"PromiseResolveThenableJob","title":"PromiseResolveThenableJob ( promiseToResolve, thenable, then )","titleHTML":"PromiseResolveThenableJob ( <var>promiseToResolve</var>, <var>thenable</var>, <var>then</var> )","number":"25.6.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_8109"],"key":"PromiseResolveThenableJob ( promiseToResolve, thenable, then )"},{"type":"clause","id":"sec-promise-jobs","aoid":null,"title":"Promise Jobs","titleHTML":"Promise Jobs","number":"25.6.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Promise Jobs"},{"type":"term","term":"%Promise%","refId":"sec-promise-constructor","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%Promise%"},{"type":"clause","id":"sec-promise-executor","aoid":null,"title":"Promise ( executor )","titleHTML":"Promise ( <var>executor</var> )","number":"25.6.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_710"],"key":"Promise ( executor )"},{"type":"clause","id":"sec-promise-constructor","aoid":null,"title":"The Promise Constructor","titleHTML":"The Promise Constructor","number":"25.6.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_95","_ref_446","_ref_1125","_ref_1129","_ref_1135","_ref_1138","_ref_1141","_ref_1221","_ref_4306","_ref_4349","_ref_7829","_ref_7836","_ref_7849","_ref_7871","_ref_8019","_ref_8053","_ref_8250","_ref_8253","_ref_8284"],"key":"The Promise Constructor"},{"type":"term","term":"%Promise_all%","refId":"sec-promise.all","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%Promise_all%"},{"type":"op","aoid":"PerformPromiseAll","refId":"sec-performpromiseall","location":"","referencingIds":[],"key":"PerformPromiseAll"},{"type":"clause","id":"sec-performpromiseall","aoid":"PerformPromiseAll","title":"Runtime Semantics: PerformPromiseAll ( iteratorRecord, constructor, resultCapability )","titleHTML":"Runtime Semantics: PerformPromiseAll ( <var>iteratorRecord</var>, <var>constructor</var>, <var>resultCapability</var> )","number":"25.6.4.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_8175"],"key":"Runtime Semantics: PerformPromiseAll ( iteratorRecord, constructor, resultCapability )"},{"type":"clause","id":"sec-promise.all-resolve-element-functions","aoid":null,"title":"Promise.all Resolve Element Functions","titleHTML":"<code>Promise.all</code> Resolve Element Functions","number":"25.6.4.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_712"],"key":"Promise.all Resolve Element Functions"},{"type":"clause","id":"sec-promise.all","aoid":null,"title":"Promise.all ( iterable )","titleHTML":"Promise.all ( <var>iterable</var> )","number":"25.6.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_97","_ref_1133"],"key":"Promise.all ( iterable )"},{"type":"clause","id":"sec-promise.prototype","aoid":null,"title":"Promise.prototype","titleHTML":"Promise.prototype","number":"25.6.4.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Promise.prototype"},{"type":"op","aoid":"PerformPromiseRace","refId":"sec-performpromiserace","location":"","referencingIds":[],"key":"PerformPromiseRace"},{"type":"clause","id":"sec-performpromiserace","aoid":"PerformPromiseRace","title":"Runtime Semantics: PerformPromiseRace ( iteratorRecord, constructor, resultCapability )","titleHTML":"Runtime Semantics: PerformPromiseRace ( <var>iteratorRecord</var>, <var>constructor</var>, <var>resultCapability</var> )","number":"25.6.4.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_8208"],"key":"Runtime Semantics: PerformPromiseRace ( iteratorRecord, constructor, resultCapability )"},{"type":"clause","id":"sec-promise.race","aoid":null,"title":"Promise.race ( iterable )","titleHTML":"Promise.race ( <var>iterable</var> )","number":"25.6.4.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Promise.race ( iterable )"},{"type":"term","term":"%Promise_reject%","refId":"sec-promise.reject","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%Promise_reject%"},{"type":"clause","id":"sec-promise.reject","aoid":null,"title":"Promise.reject ( r )","titleHTML":"Promise.reject ( <var>r</var> )","number":"25.6.4.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_98","_ref_1136"],"key":"Promise.reject ( r )"},{"type":"term","term":"%Promise_resolve%","refId":"sec-promise.resolve","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%Promise_resolve%"},{"type":"op","aoid":"PromiseResolve","refId":"sec-promise-resolve","location":"","referencingIds":[],"key":"PromiseResolve"},{"type":"clause","id":"sec-promise-resolve","aoid":"PromiseResolve","title":"PromiseResolve ( C, x )","titleHTML":"PromiseResolve ( <var>C</var>, <var>x</var> )","number":"25.6.4.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1220","_ref_7870","_ref_8018","_ref_8234","_ref_8269","_ref_8280"],"key":"PromiseResolve ( C, x )"},{"type":"clause","id":"sec-promise.resolve","aoid":null,"title":"Promise.resolve ( x )","titleHTML":"Promise.resolve ( <var>x</var> )","number":"25.6.4.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_99","_ref_1139"],"key":"Promise.resolve ( x )"},{"type":"clause","id":"sec-get-promise-@@species","aoid":null,"title":"get Promise [ @@species ]","titleHTML":"get Promise [ @@species ]","number":"25.6.4.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"get Promise [ @@species ]"},{"type":"clause","id":"sec-properties-of-the-promise-constructor","aoid":null,"title":"Properties of the Promise Constructor","titleHTML":"Properties of the Promise Constructor","number":"25.6.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of the Promise Constructor"},{"type":"term","term":"%PromisePrototype%","refId":"sec-properties-of-the-promise-prototype-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%PromisePrototype%"},{"type":"clause","id":"sec-promise.prototype.catch","aoid":null,"title":"Promise.prototype.catch ( onRejected )","titleHTML":"Promise.prototype.catch ( <var>onRejected</var> )","number":"25.6.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Promise.prototype.catch ( onRejected )"},{"type":"clause","id":"sec-promise.prototype.constructor","aoid":null,"title":"Promise.prototype.constructor","titleHTML":"Promise.prototype.constructor","number":"25.6.5.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Promise.prototype.constructor"},{"type":"clause","id":"sec-thenfinallyfunctions","aoid":null,"title":"Then Finally Functions","titleHTML":"Then Finally Functions","number":"25.6.5.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_713"],"key":"Then Finally Functions"},{"type":"clause","id":"sec-catchfinallyfunctions","aoid":null,"title":"Catch Finally Functions","titleHTML":"Catch Finally Functions","number":"25.6.5.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_714"],"key":"Catch Finally Functions"},{"type":"clause","id":"sec-promise.prototype.finally","aoid":null,"title":"Promise.prototype.finally ( onFinally )","titleHTML":"Promise.prototype.finally ( <var>onFinally</var> )","number":"25.6.5.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Promise.prototype.finally ( onFinally )"},{"type":"term","term":"%PromiseProto_then%","refId":"sec-promise.prototype.then","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%PromiseProto_then%"},{"type":"op","aoid":"PerformPromiseThen","refId":"sec-performpromisethen","location":"","referencingIds":[],"key":"PerformPromiseThen"},{"type":"clause","id":"sec-performpromisethen","aoid":"PerformPromiseThen","title":"PerformPromiseThen ( promise, onFulfilled, onRejected [ , resultCapability ] )","titleHTML":"PerformPromiseThen ( <var>promise</var>, <var>onFulfilled</var>, <var>onRejected</var> [ , <var>resultCapability</var> ] )","number":"25.6.5.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1224","_ref_7873","_ref_8022","_ref_8085","_ref_8286"],"key":"PerformPromiseThen ( promise, onFulfilled, onRejected [ , resultCapability ] )"},{"type":"clause","id":"sec-promise.prototype.then","aoid":null,"title":"Promise.prototype.then ( onFulfilled, onRejected )","titleHTML":"Promise.prototype.then ( <var>onFulfilled</var>, <var>onRejected</var> )","number":"25.6.5.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_96","_ref_1130"],"key":"Promise.prototype.then ( onFulfilled, onRejected )"},{"type":"clause","id":"sec-promise.prototype-@@tostringtag","aoid":null,"title":"Promise.prototype [ @@toStringTag ]","titleHTML":"Promise.prototype [ @@toStringTag ]","number":"25.6.5.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Promise.prototype [ @@toStringTag ]"},{"type":"clause","id":"sec-properties-of-the-promise-prototype-object","aoid":null,"title":"Properties of the Promise Prototype Object","titleHTML":"Properties of the Promise Prototype Object","number":"25.6.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1127","_ref_1132","_ref_8203","_ref_8301"],"key":"Properties of the Promise Prototype Object"},{"type":"table","id":"table-59","number":76,"caption":"Table 76: Internal Slots of Promise Instances","referencingIds":["_ref_715"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 76: Internal Slots of Promise Instances"},{"type":"clause","id":"sec-properties-of-promise-instances","aoid":null,"title":"Properties of Promise Instances","titleHTML":"Properties of Promise Instances","number":"25.6.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of Promise Instances"},{"type":"clause","id":"sec-promise-objects","aoid":null,"title":"Promise Objects","titleHTML":"Promise Objects","number":"25.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_182"],"key":"Promise Objects"},{"type":"term","term":"%AsyncFunction%","refId":"sec-async-function-constructor","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%AsyncFunction%"},{"type":"clause","id":"sec-async-function-constructor-arguments","aoid":null,"title":"AsyncFunction ( p1, p2, … , pn, body )","titleHTML":"AsyncFunction ( <var>p1</var>, <var>p2</var>, … , <var>pn</var>, <var>body</var> )","number":"25.7.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_264"],"key":"AsyncFunction ( p1, p2, … , pn, body )"},{"type":"clause","id":"sec-async-function-constructor","aoid":null,"title":"The AsyncFunction Constructor","titleHTML":"The AsyncFunction Constructor","number":"25.7.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_61","_ref_1028","_ref_1032","_ref_8304","_ref_8317","_ref_8319"],"key":"The AsyncFunction Constructor"},{"type":"clause","id":"sec-async-function-constructor-length","aoid":null,"title":"AsyncFunction.length","titleHTML":"AsyncFunction.length","number":"25.7.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"AsyncFunction.length"},{"type":"clause","id":"sec-async-function-constructor-prototype","aoid":null,"title":"AsyncFunction.prototype","titleHTML":"AsyncFunction.prototype","number":"25.7.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"AsyncFunction.prototype"},{"type":"clause","id":"sec-async-function-constructor-properties","aoid":null,"title":"Properties of the AsyncFunction Constructor","titleHTML":"Properties of the AsyncFunction Constructor","number":"25.7.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of the AsyncFunction Constructor"},{"type":"term","term":"%AsyncFunctionPrototype%","refId":"sec-async-function-prototype-properties","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%AsyncFunctionPrototype%"},{"type":"clause","id":"sec-async-function-prototype-properties-constructor","aoid":null,"title":"AsyncFunction.prototype.constructor","titleHTML":"AsyncFunction.prototype.constructor","number":"25.7.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"AsyncFunction.prototype.constructor"},{"type":"clause","id":"sec-async-function-prototype-properties-toStringTag","aoid":null,"title":"AsyncFunction.prototype [ @@toStringTag ]","titleHTML":"AsyncFunction.prototype [ @@toStringTag ]","number":"25.7.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"AsyncFunction.prototype [ @@toStringTag ]"},{"type":"clause","id":"sec-async-function-prototype-properties","aoid":null,"title":"Properties of the AsyncFunction Prototype Object","titleHTML":"Properties of the AsyncFunction Prototype Object","number":"25.7.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1030","_ref_2517","_ref_8315"],"key":"Properties of the AsyncFunction Prototype Object"},{"type":"clause","id":"sec-async-function-instances-length","aoid":null,"title":"length","titleHTML":"length","number":"25.7.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"length"},{"type":"clause","id":"sec-async-function-instances-name","aoid":null,"title":"name","titleHTML":"name","number":"25.7.4.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"name"},{"type":"clause","id":"sec-async-function-instances","aoid":null,"title":"AsyncFunction Instances","titleHTML":"AsyncFunction Instances","number":"25.7.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"AsyncFunction Instances"},{"type":"op","aoid":"AsyncFunctionStart","refId":"sec-async-functions-abstract-operations-async-function-start","location":"","referencingIds":[],"key":"AsyncFunctionStart"},{"type":"clause","id":"sec-async-functions-abstract-operations-async-function-start","aoid":"AsyncFunctionStart","title":"AsyncFunctionStart ( promiseCapability, asyncFunctionBody )","titleHTML":"AsyncFunctionStart ( <var>promiseCapability</var>, <var>asyncFunctionBody</var> )","number":"25.7.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_4309","_ref_4352"],"key":"AsyncFunctionStart ( promiseCapability, asyncFunctionBody )"},{"type":"clause","id":"sec-async-functions-abstract-operations","aoid":null,"title":"Async Functions Abstract Operations","titleHTML":"Async Functions Abstract Operations","number":"25.7.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Async Functions Abstract Operations"},{"type":"clause","id":"sec-async-function-objects","aoid":null,"title":"AsyncFunction Objects","titleHTML":"AsyncFunction Objects","number":"25.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"AsyncFunction Objects"},{"type":"clause","id":"sec-control-abstraction-objects","aoid":null,"title":"Control Abstraction Objects","titleHTML":"Control Abstraction Objects","number":"25","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Control Abstraction Objects"},{"type":"term","term":"%Reflect%","refId":"sec-reflect-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%Reflect%"},{"type":"clause","id":"sec-reflect.apply","aoid":null,"title":"Reflect.apply ( target, thisArgument, argumentsList )","titleHTML":"Reflect.apply ( <var>target</var>, <var>thisArgument</var>, <var>argumentsList</var> )","number":"26.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Reflect.apply ( target, thisArgument, argumentsList )"},{"type":"clause","id":"sec-reflect.construct","aoid":null,"title":"Reflect.construct ( target, argumentsList [ , newTarget ] )","titleHTML":"Reflect.construct ( <var>target</var>, <var>argumentsList</var> [ , <var>newTarget</var> ] )","number":"26.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Reflect.construct ( target, argumentsList [ , newTarget ] )"},{"type":"clause","id":"sec-reflect.defineproperty","aoid":null,"title":"Reflect.defineProperty ( target, propertyKey, attributes )","titleHTML":"Reflect.defineProperty ( <var>target</var>, <var>propertyKey</var>, <var>attributes</var> )","number":"26.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Reflect.defineProperty ( target, propertyKey, attributes )"},{"type":"clause","id":"sec-reflect.deleteproperty","aoid":null,"title":"Reflect.deleteProperty ( target, propertyKey )","titleHTML":"Reflect.deleteProperty ( <var>target</var>, <var>propertyKey</var> )","number":"26.1.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Reflect.deleteProperty ( target, propertyKey )"},{"type":"clause","id":"sec-reflect.get","aoid":null,"title":"Reflect.get ( target, propertyKey [ , receiver ] )","titleHTML":"Reflect.get ( <var>target</var>, <var>propertyKey</var> [ , <var>receiver</var> ] )","number":"26.1.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Reflect.get ( target, propertyKey [ , receiver ] )"},{"type":"clause","id":"sec-reflect.getownpropertydescriptor","aoid":null,"title":"Reflect.getOwnPropertyDescriptor ( target, propertyKey )","titleHTML":"Reflect.getOwnPropertyDescriptor ( <var>target</var>, <var>propertyKey</var> )","number":"26.1.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Reflect.getOwnPropertyDescriptor ( target, propertyKey )"},{"type":"clause","id":"sec-reflect.getprototypeof","aoid":null,"title":"Reflect.getPrototypeOf ( target )","titleHTML":"Reflect.getPrototypeOf ( <var>target</var> )","number":"26.1.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Reflect.getPrototypeOf ( target )"},{"type":"clause","id":"sec-reflect.has","aoid":null,"title":"Reflect.has ( target, propertyKey )","titleHTML":"Reflect.has ( <var>target</var>, <var>propertyKey</var> )","number":"26.1.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Reflect.has ( target, propertyKey )"},{"type":"clause","id":"sec-reflect.isextensible","aoid":null,"title":"Reflect.isExtensible ( target )","titleHTML":"Reflect.isExtensible ( <var>target</var> )","number":"26.1.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Reflect.isExtensible ( target )"},{"type":"clause","id":"sec-reflect.ownkeys","aoid":null,"title":"Reflect.ownKeys ( target )","titleHTML":"Reflect.ownKeys ( <var>target</var> )","number":"26.1.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Reflect.ownKeys ( target )"},{"type":"clause","id":"sec-reflect.preventextensions","aoid":null,"title":"Reflect.preventExtensions ( target )","titleHTML":"Reflect.preventExtensions ( <var>target</var> )","number":"26.1.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Reflect.preventExtensions ( target )"},{"type":"clause","id":"sec-reflect.set","aoid":null,"title":"Reflect.set ( target, propertyKey, V [ , receiver ] )","titleHTML":"Reflect.set ( <var>target</var>, <var>propertyKey</var>, <var>V</var> [ , <var>receiver</var> ] )","number":"26.1.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Reflect.set ( target, propertyKey, V [ , receiver ] )"},{"type":"clause","id":"sec-reflect.setprototypeof","aoid":null,"title":"Reflect.setPrototypeOf ( target, proto )","titleHTML":"Reflect.setPrototypeOf ( <var>target</var>, <var>proto</var> )","number":"26.1.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Reflect.setPrototypeOf ( target, proto )"},{"type":"clause","id":"sec-reflect-object","aoid":null,"title":"The Reflect Object","titleHTML":"The Reflect Object","number":"26.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_103","_ref_467","_ref_1148"],"key":"The Reflect Object"},{"type":"term","term":"%Proxy%","refId":"sec-proxy-constructor","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"%Proxy%"},{"type":"clause","id":"sec-proxy-target-handler","aoid":null,"title":"Proxy ( target, handler )","titleHTML":"Proxy ( <var>target</var>, <var>handler</var> )","number":"26.2.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Proxy ( target, handler )"},{"type":"clause","id":"sec-proxy-constructor","aoid":null,"title":"The Proxy Constructor","titleHTML":"The Proxy Constructor","number":"26.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_100","_ref_447","_ref_1142"],"key":"The Proxy Constructor"},{"type":"clause","id":"sec-proxy-revocation-functions","aoid":null,"title":"Proxy Revocation Functions","titleHTML":"Proxy Revocation Functions","number":"26.2.2.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_721"],"key":"Proxy Revocation Functions"},{"type":"clause","id":"sec-proxy.revocable","aoid":null,"title":"Proxy.revocable ( target, handler )","titleHTML":"Proxy.revocable ( <var>target</var>, <var>handler</var> )","number":"26.2.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Proxy.revocable ( target, handler )"},{"type":"clause","id":"sec-properties-of-the-proxy-constructor","aoid":null,"title":"Properties of the Proxy Constructor","titleHTML":"Properties of the Proxy Constructor","number":"26.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of the Proxy Constructor"},{"type":"clause","id":"sec-proxy-objects","aoid":null,"title":"Proxy Objects","titleHTML":"Proxy Objects","number":"26.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Proxy Objects"},{"type":"clause","id":"sec-@@tostringtag","aoid":null,"title":"@@toStringTag","titleHTML":"@@toStringTag","number":"26.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"@@toStringTag"},{"type":"clause","id":"sec-module-namespace-objects","aoid":null,"title":"Module Namespace Objects","titleHTML":"Module Namespace Objects","number":"26.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_244","_ref_370"],"key":"Module Namespace Objects"},{"type":"clause","id":"sec-reflection","aoid":null,"title":"Reflection","titleHTML":"Reflection","number":"26","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Reflection"},{"type":"term","term":"memory model","refId":"sec-memory-model","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"memory model"},{"type":"term","term":"Shared Data Block event","refId":"sec-memory-model-fundamentals","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Shared Data Block event"},{"type":"term","term":"ReadSharedMemory","refId":"sec-memory-model-fundamentals","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ReadSharedMemory"},{"type":"term","term":"WriteSharedMemory","refId":"sec-memory-model-fundamentals","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"WriteSharedMemory"},{"type":"term","term":"ReadModifyWriteSharedMemory","refId":"sec-memory-model-fundamentals","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"ReadModifyWriteSharedMemory"},{"type":"table","id":"table-readsharedmemory-fields","number":77,"caption":"Table 77: ReadSharedMemory Event Fields","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 77: ReadSharedMemory Event Fields"},{"type":"table","id":"table-writesharedmemory-fields","number":78,"caption":"Table 78: WriteSharedMemory Event Fields","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 78: WriteSharedMemory Event Fields"},{"type":"table","id":"table-rmwsharedmemory-fields","number":79,"caption":"Table 79: ReadModifyWriteSharedMemory Event Fields","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 79: ReadModifyWriteSharedMemory Event Fields"},{"type":"term","term":"Synchronize","refId":"sec-memory-model-fundamentals","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Synchronize"},{"type":"term","term":"Synchronize event","refId":"sec-memory-model-fundamentals","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Synchronize event"},{"type":"clause","id":"sec-memory-model-fundamentals","aoid":null,"title":"Memory Model Fundamentals","titleHTML":"Memory Model Fundamentals","number":"27.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1407","_ref_1420","_ref_1423","_ref_2253","_ref_2254","_ref_7392","_ref_7415","_ref_7431","_ref_7638","_ref_8396","_ref_8399","_ref_8404","_ref_8420","_ref_8421","_ref_8424","_ref_8425","_ref_8426","_ref_8435","_ref_8436","_ref_8454","_ref_8455","_ref_8456","_ref_8459","_ref_8465","_ref_8466","_ref_8470","_ref_8472","_ref_8474","_ref_8477","_ref_8478","_ref_8480","_ref_8481","_ref_8483","_ref_8484","_ref_8487","_ref_8488","_ref_8501","_ref_8502","_ref_8505","_ref_8506","_ref_8525","_ref_8526","_ref_8530","_ref_8531","_ref_8534","_ref_8535","_ref_8537","_ref_8538","_ref_8544","_ref_8545","_ref_8547","_ref_8548","_ref_8550","_ref_8551","_ref_8562","_ref_8563"],"key":"Memory Model Fundamentals"},{"type":"term","term":"Agent Events Record","refId":"sec-agent-event-records","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Agent Events Record"},{"type":"table","id":"table-agent-events-records","number":80,"caption":"Table 80: Agent Events Record Fields","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 80: Agent Events Record Fields"},{"type":"clause","id":"sec-agent-event-records","aoid":null,"title":"Agent Events Records","titleHTML":"Agent Events Records","number":"27.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_2287","_ref_7636","_ref_8416","_ref_8451","_ref_8493"],"key":"Agent Events Records"},{"type":"term","term":"Chosen Value Record","refId":"sec-chosen-value-records","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Chosen Value Record"},{"type":"table","id":"table-chosen-value-records","number":81,"caption":"Table 81: Chosen Value Record Fields","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 81: Chosen Value Record Fields"},{"type":"clause","id":"sec-chosen-value-records","aoid":null,"title":"Chosen Value Records","titleHTML":"Chosen Value Records","number":"27.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1421","_ref_7393","_ref_7432","_ref_8423"],"key":"Chosen Value Records"},{"type":"term","term":"candidate execution","refId":"sec-candidate-executions","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"candidate execution"},{"type":"table","id":"table-candidate-execution-records","number":82,"caption":"Table 82: Candidate Execution Record Fields","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 82: Candidate Execution Record Fields"},{"type":"term","term":"empty candidate execution","refId":"sec-candidate-executions","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"empty candidate execution"},{"type":"clause","id":"sec-candidate-executions","aoid":null,"title":"Candidate Executions","titleHTML":"Candidate Executions","number":"27.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_1393","_ref_2248","_ref_2282","_ref_2283","_ref_2284","_ref_2289","_ref_2291","_ref_8450","_ref_8452","_ref_8457","_ref_8460","_ref_8463","_ref_8479","_ref_8490","_ref_8498","_ref_8507","_ref_8510","_ref_8514","_ref_8519","_ref_8524","_ref_8529","_ref_8536","_ref_8541","_ref_8553","_ref_8557"],"key":"Candidate Executions"},{"type":"op","aoid":"EventSet","refId":"sec-event-set","location":"","referencingIds":[],"key":"EventSet"},{"type":"clause","id":"sec-event-set","aoid":"EventSet","title":"EventSet ( execution )","titleHTML":"EventSet ( <var>execution</var> )","number":"27.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_8453","_ref_8458","_ref_8461","_ref_8492","_ref_8522","_ref_8543","_ref_8554"],"key":"EventSet ( execution )"},{"type":"op","aoid":"SharedDataBlockEventSet","refId":"sec-sharedatablockeventset","location":"","referencingIds":[],"key":"SharedDataBlockEventSet"},{"type":"clause","id":"sec-sharedatablockeventset","aoid":"SharedDataBlockEventSet","title":"SharedDataBlockEventSet ( execution )","titleHTML":"SharedDataBlockEventSet ( <var>execution</var> )","number":"27.5.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_8462","_ref_8499","_ref_8500","_ref_8503","_ref_8509","_ref_8521","_ref_8527","_ref_8532","_ref_8539","_ref_8546","_ref_8549","_ref_8552","_ref_8561","_ref_8564","_ref_8565"],"key":"SharedDataBlockEventSet ( execution )"},{"type":"op","aoid":"SynchronizeEventSet","refId":"sec-synchronizeeventset","location":"","referencingIds":[],"key":"SynchronizeEventSet"},{"type":"clause","id":"sec-synchronizeeventset","aoid":"SynchronizeEventSet","title":"SynchronizeEventSet ( execution )","titleHTML":"SynchronizeEventSet ( <var>execution</var> )","number":"27.5.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"SynchronizeEventSet ( execution )"},{"type":"op","aoid":"HostEventSet","refId":"sec-hosteventset","location":"","referencingIds":[],"key":"HostEventSet"},{"type":"clause","id":"sec-hosteventset","aoid":"HostEventSet","title":"HostEventSet ( execution )","titleHTML":"HostEventSet ( <var>execution</var> )","number":"27.5.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_8512"],"key":"HostEventSet ( execution )"},{"type":"op","aoid":"ComposeWriteEventBytes","refId":"sec-composewriteeventbytes","location":"","referencingIds":[],"key":"ComposeWriteEventBytes"},{"type":"clause","id":"sec-composewriteeventbytes","aoid":"ComposeWriteEventBytes","title":"ComposeWriteEventBytes ( execution, byteIndex, Ws )","titleHTML":"ComposeWriteEventBytes ( <var>execution</var>, <var>byteIndex</var>, <var>Ws</var> )","number":"27.5.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_8489"],"key":"ComposeWriteEventBytes ( execution, byteIndex, Ws )"},{"type":"op","aoid":"ValueOfReadEvent","refId":"sec-valueofreadevent","location":"","referencingIds":[],"key":"ValueOfReadEvent"},{"type":"clause","id":"sec-valueofreadevent","aoid":"ValueOfReadEvent","title":"ValueOfReadEvent ( execution, R )","titleHTML":"ValueOfReadEvent ( <var>execution</var>, <var>R</var> )","number":"27.5.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_8473","_ref_8528","_ref_8579"],"key":"ValueOfReadEvent ( execution, R )"},{"type":"clause","id":"sec-abstract-operations-for-the-memory-model","aoid":null,"title":"Abstract Operations for the Memory Model","titleHTML":"Abstract Operations for the Memory Model","number":"27.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Abstract Operations for the Memory Model"},{"type":"op","aoid":"agent-order","refId":"sec-agent-order","location":"","referencingIds":[],"key":"agent-order"},{"type":"clause","id":"sec-agent-order","aoid":"agent-order","title":"agent-order","titleHTML":"agent-order","number":"27.6.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_8414","_ref_8438","_ref_8523","_ref_8576","_ref_8577","_ref_8580"],"key":"agent-order"},{"type":"op","aoid":"reads-bytes-from","refId":"sec-reads-bytes-from","location":"","referencingIds":[],"key":"reads-bytes-from"},{"type":"clause","id":"sec-reads-bytes-from","aoid":"reads-bytes-from","title":"reads-bytes-from","titleHTML":"reads-bytes-from","number":"27.6.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_8440"],"key":"reads-bytes-from"},{"type":"op","aoid":"reads-from","refId":"sec-reads-from","location":"","referencingIds":[],"key":"reads-from"},{"type":"clause","id":"sec-reads-from","aoid":"reads-from","title":"reads-from","titleHTML":"reads-from","number":"27.6.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_8441","_ref_8516","_ref_8518"],"key":"reads-from"},{"type":"op","aoid":"host-synchronizes-with","refId":"sec-host-synchronizes-with","location":"","referencingIds":[],"key":"host-synchronizes-with"},{"type":"clause","id":"sec-host-synchronizes-with","aoid":"host-synchronizes-with","title":"host-synchronizes-with","titleHTML":"host-synchronizes-with","number":"27.6.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_8443","_ref_8558"],"key":"host-synchronizes-with"},{"type":"op","aoid":"synchronizes-with","refId":"sec-synchronizes-with","location":"","referencingIds":[],"key":"synchronizes-with"},{"type":"clause","id":"sec-synchronizes-with","aoid":"synchronizes-with","title":"synchronizes-with","titleHTML":"synchronizes-with","number":"27.6.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_8445","_ref_8556"],"key":"synchronizes-with"},{"type":"op","aoid":"happens-before","refId":"sec-happens-before","location":"","referencingIds":[],"key":"happens-before"},{"type":"clause","id":"sec-happens-before","aoid":"happens-before","title":"happens-before","titleHTML":"happens-before","number":"27.6.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_8447","_ref_8513","_ref_8555"],"key":"happens-before"},{"type":"clause","id":"sec-relations-of-candidate-executions","aoid":null,"title":"Relations of Candidate Executions","titleHTML":"Relations of Candidate Executions","number":"27.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Relations of Candidate Executions"},{"type":"clause","id":"sec-valid-chosen-reads","aoid":null,"title":"Valid Chosen Reads","titleHTML":"Valid Chosen Reads","number":"27.7.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Valid Chosen Reads"},{"type":"clause","id":"sec-coherent-reads","aoid":null,"title":"Coherent Reads","titleHTML":"Coherent Reads","number":"27.7.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Coherent Reads"},{"type":"clause","id":"sec-tear-free-aligned-reads","aoid":null,"title":"Tear Free Reads","titleHTML":"Tear Free Reads","number":"27.7.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Tear Free Reads"},{"type":"op","aoid":"memory-order","refId":"sec-memory-order","location":"","referencingIds":[],"key":"memory-order"},{"type":"clause","id":"sec-memory-order","aoid":"memory-order","title":"Sequentially Consistent Atomics","titleHTML":"Sequentially Consistent Atomics","number":"27.7.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_8581","_ref_8583"],"key":"Sequentially Consistent Atomics"},{"type":"clause","id":"sec-valid-executions","aoid":null,"title":"Valid Executions","titleHTML":"Valid Executions","number":"27.7.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Valid Executions"},{"type":"clause","id":"sec-properties-of-valid-executions","aoid":null,"title":"Properties of Valid Executions","titleHTML":"Properties of Valid Executions","number":"27.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Properties of Valid Executions"},{"type":"clause","id":"sec-races","aoid":null,"title":"Races","titleHTML":"Races","number":"27.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Races"},{"type":"clause","id":"sec-data-races","aoid":null,"title":"Data Races","titleHTML":"Data Races","number":"27.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Data Races"},{"type":"clause","id":"sec-data-race-freedom","aoid":null,"title":"Data Race Freedom","titleHTML":"Data Race Freedom","number":"27.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Data Race Freedom"},{"type":"term","term":"agent-order slice","refId":"sec-shared-memory-guidelines","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"agent-order slice"},{"type":"term","term":"possible read values","refId":"sec-shared-memory-guidelines","referencingIds":[],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"possible read values"},{"type":"clause","id":"sec-shared-memory-guidelines","aoid":null,"title":"Shared Memory Guidelines","titleHTML":"Shared Memory Guidelines","number":"27.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Shared Memory Guidelines"},{"type":"clause","id":"sec-memory-model","aoid":null,"title":"Memory Model","titleHTML":"Memory Model","number":"27","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_855","_ref_1213","_ref_1390","_ref_1392","_ref_1394","_ref_1395","_ref_1396","_ref_1419","_ref_2250","_ref_2292","_ref_2304","_ref_7391","_ref_7430","_ref_7570","_ref_7571","_ref_8397","_ref_8400","_ref_8566","_ref_8568","_ref_8574","_ref_8575","_ref_8585","_ref_8586","_ref_8587","_ref_8588"],"key":"Memory Model"},{"type":"clause","id":"sec-lexical-grammar","aoid":null,"title":"Lexical Grammar","titleHTML":"Lexical Grammar","number":"A.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Lexical Grammar"},{"type":"clause","id":"sec-expressions","aoid":null,"title":"Expressions","titleHTML":"Expressions","number":"A.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Expressions"},{"type":"clause","id":"sec-statements","aoid":null,"title":"Statements","titleHTML":"Statements","number":"A.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Statements"},{"type":"clause","id":"sec-functions-and-classes","aoid":null,"title":"Functions and Classes","titleHTML":"Functions and Classes","number":"A.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Functions and Classes"},{"type":"clause","id":"sec-scripts-and-modules","aoid":null,"title":"Scripts and Modules","titleHTML":"Scripts and Modules","number":"A.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Scripts and Modules"},{"type":"clause","id":"sec-number-conversions","aoid":null,"title":"Number Conversions","titleHTML":"Number Conversions","number":"A.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Number Conversions"},{"type":"clause","id":"sec-universal-resource-identifier-character-classes","aoid":null,"title":"Universal Resource Identifier Character Classes","titleHTML":"Universal Resource Identifier Character Classes","number":"A.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Universal Resource Identifier Character Classes"},{"type":"clause","id":"sec-regular-expressions","aoid":null,"title":"Regular Expressions","titleHTML":"Regular Expressions","number":"A.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Regular Expressions"},{"type":"clause","id":"sec-grammar-summary","aoid":null,"title":"Grammar Summary","titleHTML":"Grammar Summary","number":"A","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Grammar Summary"},{"type":"clause","id":"sec-additional-syntax-numeric-literals-status-semantics","aoid":null,"title":"Static Semantics","titleHTML":"Static Semantics","number":"B.1.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics"},{"type":"clause","id":"sec-additional-syntax-numeric-literals","aoid":null,"title":"Numeric Literals","titleHTML":"Numeric Literals","number":"B.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_283","_ref_390","_ref_777"],"key":"Numeric Literals"},{"type":"clause","id":"sec-additional-syntax-string-literals-static-semantics","aoid":null,"title":"Static Semantics","titleHTML":"Static Semantics","number":"B.1.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics"},{"type":"clause","id":"sec-additional-syntax-string-literals","aoid":null,"title":"String Literals","titleHTML":"String Literals","number":"B.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_289","_ref_298","_ref_392","_ref_731","_ref_778"],"key":"String Literals"},{"type":"clause","id":"sec-html-like-comments","aoid":null,"title":"HTML-like Comments","titleHTML":"HTML-like Comments","number":"B.1.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_397"],"key":"HTML-like Comments"},{"type":"clause","id":"sec-patterns-static-semantics-early-errors-annexb","aoid":null,"title":"Static Semantics: Early Errors","titleHTML":"Static Semantics: Early Errors","number":"B.1.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: Early Errors"},{"type":"clause","id":"sec-patterns-static-semantics-is-character-class-annexb","aoid":null,"title":"Static Semantics: IsCharacterClass","titleHTML":"Static Semantics: IsCharacterClass","number":"B.1.4.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: IsCharacterClass"},{"type":"clause","id":"sec-patterns-static-semantics-character-value-annexb","aoid":null,"title":"Static Semantics: CharacterValue","titleHTML":"Static Semantics: CharacterValue","number":"B.1.4.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Static Semantics: CharacterValue"},{"type":"op","aoid":"CharacterRangeOrUnion","refId":"sec-runtime-semantics-characterrangeorunion-abstract-operation","location":"","referencingIds":[],"key":"CharacterRangeOrUnion"},{"type":"clause","id":"sec-runtime-semantics-characterrangeorunion-abstract-operation","aoid":"CharacterRangeOrUnion","title":"Runtime Semantics: CharacterRangeOrUnion ( A, B )","titleHTML":"Runtime Semantics: CharacterRangeOrUnion ( <var>A</var>, <var>B</var> )","number":"B.1.4.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_8640","_ref_8641"],"key":"Runtime Semantics: CharacterRangeOrUnion ( A, B )"},{"type":"clause","id":"sec-regular-expression-patterns-semantics","aoid":null,"title":"Pattern Semantics","titleHTML":"Pattern Semantics","number":"B.1.4.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Pattern Semantics"},{"type":"clause","id":"sec-regular-expressions-patterns","aoid":null,"title":"Regular Expressions Patterns","titleHTML":"Regular Expressions Patterns","number":"B.1.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_387"],"key":"Regular Expressions Patterns"},{"type":"clause","id":"sec-additional-syntax","aoid":null,"title":"Additional Syntax","titleHTML":"Additional Syntax","number":"B.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Additional Syntax"},{"type":"table","id":"table-60","number":83,"caption":"Table 83: Additional Well-known Intrinsic Objects","referencingIds":["_ref_743"],"namespace":"https://tc39.github.io/ecma262/","location":"","key":"Table 83: Additional Well-known Intrinsic Objects"},{"type":"clause","id":"sec-escape-string","aoid":null,"title":"escape ( string )","titleHTML":"escape ( <var>string</var> )","number":"B.2.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_745","_ref_8643"],"key":"escape ( string )"},{"type":"clause","id":"sec-unescape-string","aoid":null,"title":"unescape ( string )","titleHTML":"unescape ( <var>string</var> )","number":"B.2.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_746","_ref_8644"],"key":"unescape ( string )"},{"type":"clause","id":"sec-additional-properties-of-the-global-object","aoid":null,"title":"Additional Properties of the Global Object","titleHTML":"Additional Properties of the Global Object","number":"B.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Additional Properties of the Global Object"},{"type":"clause","id":"sec-get-object.prototype.__proto__","aoid":null,"title":"get Object.prototype.__proto__","titleHTML":"get Object.prototype.__proto__","number":"B.2.2.1.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"get Object.prototype.__proto__"},{"type":"clause","id":"sec-set-object.prototype.__proto__","aoid":null,"title":"set Object.prototype.__proto__","titleHTML":"set Object.prototype.__proto__","number":"B.2.2.1.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"set Object.prototype.__proto__"},{"type":"clause","id":"sec-object.prototype.__proto__","aoid":null,"title":"Object.prototype.__proto__","titleHTML":"Object.prototype.__proto__","number":"B.2.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Object.prototype.__proto__"},{"type":"clause","id":"sec-object.prototype.__defineGetter__","aoid":null,"title":"Object.prototype.__defineGetter__ ( P, getter )","titleHTML":"Object.prototype.__defineGetter__ ( <var>P</var>, <var>getter</var> )","number":"B.2.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Object.prototype.__defineGetter__ ( P, getter )"},{"type":"clause","id":"sec-object.prototype.__defineSetter__","aoid":null,"title":"Object.prototype.__defineSetter__ ( P, setter )","titleHTML":"Object.prototype.__defineSetter__ ( <var>P</var>, <var>setter</var> )","number":"B.2.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Object.prototype.__defineSetter__ ( P, setter )"},{"type":"clause","id":"sec-object.prototype.__lookupGetter__","aoid":null,"title":"Object.prototype.__lookupGetter__ ( P )","titleHTML":"Object.prototype.__lookupGetter__ ( <var>P</var> )","number":"B.2.2.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Object.prototype.__lookupGetter__ ( P )"},{"type":"clause","id":"sec-object.prototype.__lookupSetter__","aoid":null,"title":"Object.prototype.__lookupSetter__ ( P )","titleHTML":"Object.prototype.__lookupSetter__ ( <var>P</var> )","number":"B.2.2.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Object.prototype.__lookupSetter__ ( P )"},{"type":"clause","id":"sec-additional-properties-of-the-object.prototype-object","aoid":null,"title":"Additional Properties of the Object.prototype Object","titleHTML":"Additional Properties of the Object.prototype Object","number":"B.2.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Additional Properties of the Object.prototype Object"},{"type":"clause","id":"sec-string.prototype.substr","aoid":null,"title":"String.prototype.substr ( start, length )","titleHTML":"String.prototype.substr ( <var>start</var>, <var>length</var> )","number":"B.2.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.substr ( start, length )"},{"type":"op","aoid":"CreateHTML","refId":"sec-createhtml","location":"","referencingIds":[],"key":"CreateHTML"},{"type":"clause","id":"sec-createhtml","aoid":"CreateHTML","title":"Runtime Semantics: CreateHTML ( string, tag, attribute, value )","titleHTML":"Runtime Semantics: CreateHTML ( <var>string</var>, <var>tag</var>, <var>attribute</var>, <var>value</var> )","number":"B.2.3.2.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_8679","_ref_8688","_ref_8689","_ref_8690","_ref_8691","_ref_8692","_ref_8693","_ref_8694","_ref_8695","_ref_8696","_ref_8697","_ref_8698","_ref_8699"],"key":"Runtime Semantics: CreateHTML ( string, tag, attribute, value )"},{"type":"clause","id":"sec-string.prototype.anchor","aoid":null,"title":"String.prototype.anchor ( name )","titleHTML":"String.prototype.anchor ( <var>name</var> )","number":"B.2.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.anchor ( name )"},{"type":"clause","id":"sec-string.prototype.big","aoid":null,"title":"String.prototype.big ( )","titleHTML":"String.prototype.big ( )","number":"B.2.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.big ( )"},{"type":"clause","id":"sec-string.prototype.blink","aoid":null,"title":"String.prototype.blink ( )","titleHTML":"String.prototype.blink ( )","number":"B.2.3.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.blink ( )"},{"type":"clause","id":"sec-string.prototype.bold","aoid":null,"title":"String.prototype.bold ( )","titleHTML":"String.prototype.bold ( )","number":"B.2.3.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.bold ( )"},{"type":"clause","id":"sec-string.prototype.fixed","aoid":null,"title":"String.prototype.fixed ( )","titleHTML":"String.prototype.fixed ( )","number":"B.2.3.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.fixed ( )"},{"type":"clause","id":"sec-string.prototype.fontcolor","aoid":null,"title":"String.prototype.fontcolor ( color )","titleHTML":"String.prototype.fontcolor ( <var>color</var> )","number":"B.2.3.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.fontcolor ( color )"},{"type":"clause","id":"sec-string.prototype.fontsize","aoid":null,"title":"String.prototype.fontsize ( size )","titleHTML":"String.prototype.fontsize ( <var>size</var> )","number":"B.2.3.8","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.fontsize ( size )"},{"type":"clause","id":"sec-string.prototype.italics","aoid":null,"title":"String.prototype.italics ( )","titleHTML":"String.prototype.italics ( )","number":"B.2.3.9","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.italics ( )"},{"type":"clause","id":"sec-string.prototype.link","aoid":null,"title":"String.prototype.link ( url )","titleHTML":"String.prototype.link ( <var>url</var> )","number":"B.2.3.10","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.link ( url )"},{"type":"clause","id":"sec-string.prototype.small","aoid":null,"title":"String.prototype.small ( )","titleHTML":"String.prototype.small ( )","number":"B.2.3.11","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.small ( )"},{"type":"clause","id":"sec-string.prototype.strike","aoid":null,"title":"String.prototype.strike ( )","titleHTML":"String.prototype.strike ( )","number":"B.2.3.12","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.strike ( )"},{"type":"clause","id":"sec-string.prototype.sub","aoid":null,"title":"String.prototype.sub ( )","titleHTML":"String.prototype.sub ( )","number":"B.2.3.13","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.sub ( )"},{"type":"clause","id":"sec-string.prototype.sup","aoid":null,"title":"String.prototype.sup ( )","titleHTML":"String.prototype.sup ( )","number":"B.2.3.14","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.sup ( )"},{"type":"clause","id":"String.prototype.trimleft","aoid":null,"title":"String.prototype.trimLeft ( )","titleHTML":"String.prototype.trimLeft ( )","number":"B.2.3.15","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.trimLeft ( )"},{"type":"clause","id":"String.prototype.trimright","aoid":null,"title":"String.prototype.trimRight ( )","titleHTML":"String.prototype.trimRight ( )","number":"B.2.3.16","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"String.prototype.trimRight ( )"},{"type":"clause","id":"sec-additional-properties-of-the-string.prototype-object","aoid":null,"title":"Additional Properties of the String.prototype Object","titleHTML":"Additional Properties of the String.prototype Object","number":"B.2.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Additional Properties of the String.prototype Object"},{"type":"clause","id":"sec-date.prototype.getyear","aoid":null,"title":"Date.prototype.getYear ( )","titleHTML":"Date.prototype.getYear ( )","number":"B.2.4.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.getYear ( )"},{"type":"clause","id":"sec-date.prototype.setyear","aoid":null,"title":"Date.prototype.setYear ( year )","titleHTML":"Date.prototype.setYear ( <var>year</var> )","number":"B.2.4.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.setYear ( year )"},{"type":"clause","id":"sec-date.prototype.togmtstring","aoid":null,"title":"Date.prototype.toGMTString ( )","titleHTML":"Date.prototype.toGMTString ( )","number":"B.2.4.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Date.prototype.toGMTString ( )"},{"type":"clause","id":"sec-additional-properties-of-the-date.prototype-object","aoid":null,"title":"Additional Properties of the Date.prototype Object","titleHTML":"Additional Properties of the Date.prototype Object","number":"B.2.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Additional Properties of the Date.prototype Object"},{"type":"clause","id":"sec-regexp.prototype.compile","aoid":null,"title":"RegExp.prototype.compile ( pattern, flags )","titleHTML":"RegExp.prototype.compile ( <var>pattern</var>, <var>flags</var> )","number":"B.2.5.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"RegExp.prototype.compile ( pattern, flags )"},{"type":"clause","id":"sec-additional-properties-of-the-regexp.prototype-object","aoid":null,"title":"Additional Properties of the RegExp.prototype Object","titleHTML":"Additional Properties of the RegExp.prototype Object","number":"B.2.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Additional Properties of the RegExp.prototype Object"},{"type":"clause","id":"sec-additional-built-in-properties","aoid":null,"title":"Additional Built-in Properties","titleHTML":"Additional Built-in Properties","number":"B.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_403","_ref_404"],"key":"Additional Built-in Properties"},{"type":"clause","id":"sec-__proto__-property-names-in-object-initializers","aoid":null,"title":"__proto__ Property Names in Object Initializers","titleHTML":"__proto__ Property Names in Object Initializers","number":"B.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_309","_ref_673"],"key":"__proto__ Property Names in Object Initializers"},{"type":"clause","id":"sec-labelled-function-declarations","aoid":null,"title":"Labelled Function Declarations","titleHTML":"Labelled Function Declarations","number":"B.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_338","_ref_340","_ref_350","_ref_351","_ref_393"],"key":"Labelled Function Declarations"},{"type":"clause","id":"sec-web-compat-functiondeclarationinstantiation","aoid":null,"title":"Changes to FunctionDeclarationInstantiation","titleHTML":"Changes to FunctionDeclarationInstantiation","number":"B.3.3.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_194"],"key":"Changes to FunctionDeclarationInstantiation"},{"type":"clause","id":"sec-web-compat-globaldeclarationinstantiation","aoid":null,"title":"Changes to GlobalDeclarationInstantiation","titleHTML":"Changes to GlobalDeclarationInstantiation","number":"B.3.3.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_364"],"key":"Changes to GlobalDeclarationInstantiation"},{"type":"clause","id":"sec-web-compat-evaldeclarationinstantiation","aoid":null,"title":"Changes to EvalDeclarationInstantiation","titleHTML":"Changes to EvalDeclarationInstantiation","number":"B.3.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_415"],"key":"Changes to EvalDeclarationInstantiation"},{"type":"clause","id":"sec-block-duplicates-allowed-static-semantics","aoid":null,"title":"Changes to Block Static Semantics: Early Errors","titleHTML":"Changes to Block Static Semantics: Early Errors","number":"B.3.3.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Changes to Block Static Semantics: Early Errors"},{"type":"clause","id":"sec-switch-duplicates-allowed-static-semantics","aoid":null,"title":"Changes to switch Statement Static Semantics: Early Errors","titleHTML":"Changes to <code>switch</code> Statement Static Semantics: Early Errors","number":"B.3.3.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Changes to switch Statement Static Semantics: Early Errors"},{"type":"clause","id":"sec-web-compat-blockdeclarationinstantiation","aoid":null,"title":"Changes to BlockDeclarationInstantiation","titleHTML":"Changes to BlockDeclarationInstantiation","number":"B.3.3.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Changes to BlockDeclarationInstantiation"},{"type":"clause","id":"sec-block-level-function-declarations-web-legacy-compatibility-semantics","aoid":null,"title":"Block-Level Function Declarations Web Legacy Compatibility Semantics","titleHTML":"Block-Level Function Declarations Web Legacy Compatibility Semantics","number":"B.3.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_195","_ref_355","_ref_394","_ref_758"],"key":"Block-Level Function Declarations Web Legacy Compatibility Semantics"},{"type":"clause","id":"sec-functiondeclarations-in-ifstatement-statement-clauses","aoid":null,"title":"FunctionDeclarations in IfStatement Statement Clauses","titleHTML":"FunctionDeclarations in IfStatement Statement Clauses","number":"B.3.4","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_395"],"key":"FunctionDeclarations in IfStatement Statement Clauses"},{"type":"clause","id":"sec-variablestatements-in-catch-blocks","aoid":null,"title":"VariableStatements in Catch Blocks","titleHTML":"VariableStatements in Catch Blocks","number":"B.3.5","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_352","_ref_414","_ref_416"],"key":"VariableStatements in Catch Blocks"},{"type":"clause","id":"sec-initializers-in-forin-statement-heads","aoid":null,"title":"Initializers in ForIn Statement Heads","titleHTML":"Initializers in ForIn Statement Heads","number":"B.3.6","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_339","_ref_341","_ref_342","_ref_343","_ref_344","_ref_345","_ref_346","_ref_348","_ref_396"],"key":"Initializers in ForIn Statement Heads"},{"type":"clause","id":"sec-IsHTMLDDA-internal-slot-to-boolean","aoid":null,"title":"Changes to ToBoolean","titleHTML":"Changes to ToBoolean","number":"B.3.7.1","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Changes to ToBoolean"},{"type":"clause","id":"sec-IsHTMLDDA-internal-slot-aec","aoid":null,"title":"Changes to Abstract Equality Comparison","titleHTML":"Changes to Abstract Equality Comparison","number":"B.3.7.2","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Changes to Abstract Equality Comparison"},{"type":"clause","id":"sec-IsHTMLDDA-internal-slot-typeof","aoid":null,"title":"Changes to the typeof Operator","titleHTML":"Changes to the <code>typeof</code> Operator","number":"B.3.7.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Changes to the typeof Operator"},{"type":"clause","id":"sec-IsHTMLDDA-internal-slot","aoid":null,"title":"The [[IsHTMLDDA]] Internal Slot","titleHTML":"The [[IsHTMLDDA]] Internal Slot","number":"B.3.7","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_8789","_ref_8791","_ref_8793","_ref_8794"],"key":"The [[IsHTMLDDA]] Internal Slot"},{"type":"clause","id":"sec-other-additional-features","aoid":null,"title":"Other Additional Features","titleHTML":"Other Additional Features","number":"B.3","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Other Additional Features"},{"type":"clause","id":"sec-additional-ecmascript-features-for-web-browsers","aoid":null,"title":"Additional ECMAScript Features for Web Browsers","titleHTML":"Additional ECMAScript Features for Web Browsers","number":"B","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Additional ECMAScript Features for Web Browsers"},{"type":"clause","id":"sec-strict-mode-of-ecmascript","aoid":null,"title":"The Strict Mode of ECMAScript","titleHTML":"The Strict Mode of ECMAScript","number":"C","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"The Strict Mode of ECMAScript"},{"type":"clause","id":"sec-corrections-and-clarifications-in-ecmascript-2015-with-possible-compatibility-impact","aoid":null,"title":"Corrections and Clarifications in ECMAScript 2015 with Possible Compatibility Impact","titleHTML":"Corrections and Clarifications in ECMAScript 2015 with Possible Compatibility Impact","number":"D","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Corrections and Clarifications in ECMAScript 2015 with Possible Compatibility Impact"},{"type":"clause","id":"sec-additions-and-changes-that-introduce-incompatibilities-with-prior-editions","aoid":null,"title":"Additions and Changes That Introduce Incompatibilities with Prior Editions","titleHTML":"Additions and Changes That Introduce Incompatibilities with Prior Editions","number":"E","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Additions and Changes That Introduce Incompatibilities with Prior Editions"},{"type":"clause","id":"sec-colophon","aoid":null,"title":"Colophon","titleHTML":"Colophon","number":"F","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":["_ref_0"],"key":"Colophon"},{"type":"clause","id":"sec-bibliography","aoid":null,"title":"Bibliography","titleHTML":"Bibliography","number":"G","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Bibliography"},{"type":"clause","id":"sec-copyright-and-software-license","aoid":null,"title":"Copyright & Software License","titleHTML":"Copyright &amp; Software License","number":"H","namespace":"https://tc39.github.io/ecma262/","location":"","referencingIds":[],"key":"Copyright & Software License"},{"type":"production","id":"prod-grammar-notation-WhileStatement","name":"WhileStatement","referencingIds":["_ref_8817"],"namespace":"grammar-notation","location":"","key":"WhileStatement"},{"type":"production","id":"prod-grammar-notation-ArgumentList","name":"ArgumentList","referencingIds":["_ref_8823","_ref_8825","_ref_8827","_ref_8829","_ref_8830"],"namespace":"grammar-notation","location":"","key":"ArgumentList"},{"type":"production","id":"prod-grammar-notation-VariableDeclaration","name":"VariableDeclaration","referencingIds":[],"namespace":"grammar-notation","location":"","key":"VariableDeclaration"},{"type":"production","id":"prod-grammar-notation-IterationStatement","name":"IterationStatement","referencingIds":["_ref_8860"],"namespace":"grammar-notation","location":"","key":"IterationStatement"},{"type":"production","id":"prod-grammar-notation-StatementList","name":"StatementList","referencingIds":[],"namespace":"grammar-notation","location":"","key":"StatementList"},{"type":"production","id":"prod-grammar-notation-StatementList_Return","name":"StatementList_Return","referencingIds":[],"namespace":"grammar-notation","location":"","key":"StatementList_Return"},{"type":"production","id":"prod-grammar-notation-StatementList_In","name":"StatementList_In","referencingIds":[],"namespace":"grammar-notation","location":"","key":"StatementList_In"},{"type":"production","id":"prod-grammar-notation-StatementList_Return_In","name":"StatementList_Return_In","referencingIds":[],"namespace":"grammar-notation","location":"","key":"StatementList_Return_In"},{"type":"production","id":"prod-grammar-notation-VariableDeclaration_In","name":"VariableDeclaration_In","referencingIds":[],"namespace":"grammar-notation","location":"","key":"VariableDeclaration_In"},{"type":"production","id":"prod-grammar-notation-NonZeroDigit","name":"NonZeroDigit","referencingIds":[],"namespace":"grammar-notation","location":"","key":"NonZeroDigit"},{"type":"production","id":"prod-grammar-notation-DecimalDigit","name":"DecimalDigit","referencingIds":["_ref_8903","_ref_8905","_ref_8907","_ref_8908"],"namespace":"grammar-notation","location":"","key":"DecimalDigit"},{"type":"production","id":"prod-grammar-notation-DecimalDigits","name":"DecimalDigits","referencingIds":["_ref_8904","_ref_8906"],"namespace":"grammar-notation","location":"","key":"DecimalDigits"},{"type":"production","id":"prod-grammar-notation-LookaheadExample","name":"LookaheadExample","referencingIds":[],"namespace":"grammar-notation","location":"","key":"LookaheadExample"},{"type":"production","id":"prod-grammar-notation-ThrowStatement","name":"ThrowStatement","referencingIds":[],"namespace":"grammar-notation","location":"","key":"ThrowStatement"},{"type":"production","id":"prod-grammar-notation-Identifier","name":"Identifier","referencingIds":["_ref_8919"],"namespace":"grammar-notation","location":"","key":"Identifier"},{"type":"production","id":"prod-grammar-notation-SourceCharacter","name":"SourceCharacter","referencingIds":[],"namespace":"grammar-notation","location":"","key":"SourceCharacter"},{"type":"term","term":"syntax-directed operation","refId":"sec-algorithm-conventions-syntax-directed-operations","referencingIds":[],"namespace":"algorithm-conventions","location":"","key":"syntax-directed operation"},{"type":"term","term":"source text matched by","refId":"sec-algorithm-conventions-syntax-directed-operations","referencingIds":[],"namespace":"algorithm-conventions","location":"","key":"source text matched by"},{"type":"production","id":"prod-algorithm-conventions-Block","name":"Block","referencingIds":["_ref_8922"],"namespace":"algorithm-conventions","location":"","key":"Block"},{"type":"production","id":"prod-asi-rules-UpdateExpression","name":"UpdateExpression","referencingIds":[],"namespace":"asi-rules","location":"","key":"UpdateExpression"},{"type":"production","id":"prod-asi-rules-ContinueStatement","name":"ContinueStatement","referencingIds":[],"namespace":"asi-rules","location":"","key":"ContinueStatement"},{"type":"production","id":"prod-asi-rules-BreakStatement","name":"BreakStatement","referencingIds":[],"namespace":"asi-rules","location":"","key":"BreakStatement"},{"type":"production","id":"prod-asi-rules-ReturnStatement","name":"ReturnStatement","referencingIds":[],"namespace":"asi-rules","location":"","key":"ReturnStatement"},{"type":"production","id":"prod-asi-rules-ThrowStatement","name":"ThrowStatement","referencingIds":[],"namespace":"asi-rules","location":"","key":"ThrowStatement"},{"type":"production","id":"prod-asi-rules-ArrowFunction","name":"ArrowFunction","referencingIds":[],"namespace":"asi-rules","location":"","key":"ArrowFunction"},{"type":"production","id":"prod-asi-rules-YieldExpression","name":"YieldExpression","referencingIds":[],"namespace":"asi-rules","location":"","key":"YieldExpression"},{"type":"production","id":"prod-annexB-NumericLiteral","name":"NumericLiteral","referencingIds":[],"namespace":"annexB","location":"","key":"NumericLiteral"},{"type":"production","id":"prod-annexB-LegacyOctalIntegerLiteral","name":"LegacyOctalIntegerLiteral","referencingIds":["_ref_284","_ref_388","_ref_14835","_ref_14837","_ref_14852","_ref_14854"],"namespace":"annexB","location":"","key":"LegacyOctalIntegerLiteral"},{"type":"production","id":"prod-annexB-DecimalIntegerLiteral","name":"DecimalIntegerLiteral","referencingIds":[],"namespace":"annexB","location":"","key":"DecimalIntegerLiteral"},{"type":"production","id":"prod-annexB-NonOctalDecimalIntegerLiteral","name":"NonOctalDecimalIntegerLiteral","referencingIds":["_ref_285","_ref_389","_ref_14841","_ref_14845","_ref_14856","_ref_14857","_ref_14864","_ref_14866"],"namespace":"annexB","location":"","key":"NonOctalDecimalIntegerLiteral"},{"type":"production","id":"prod-annexB-LegacyOctalLikeDecimalIntegerLiteral","name":"LegacyOctalLikeDecimalIntegerLiteral","referencingIds":["_ref_14843","_ref_14848","_ref_14860","_ref_14862","_ref_14870","_ref_14872"],"namespace":"annexB","location":"","key":"LegacyOctalLikeDecimalIntegerLiteral"},{"type":"production","id":"prod-annexB-NonOctalDigit","name":"NonOctalDigit","referencingIds":["_ref_14842","_ref_14844","_ref_14858","_ref_14859","_ref_14861","_ref_14863"],"namespace":"annexB","location":"","key":"NonOctalDigit"},{"type":"production","id":"prod-annexB-EscapeSequence","name":"EscapeSequence","referencingIds":["_ref_14888"],"namespace":"annexB","location":"","key":"EscapeSequence"},{"type":"production","id":"prod-annexB-LegacyOctalEscapeSequence","name":"LegacyOctalEscapeSequence","referencingIds":["_ref_288","_ref_391","_ref_14875","_ref_14890","_ref_14891","_ref_14983","_ref_15008","_ref_15009","_ref_15045"],"namespace":"annexB","location":"","key":"LegacyOctalEscapeSequence"},{"type":"production","id":"prod-annexB-ZeroToThree","name":"ZeroToThree","referencingIds":["_ref_14880","_ref_14885","_ref_14894","_ref_14896","_ref_14902","_ref_14905"],"namespace":"annexB","location":"","key":"ZeroToThree"},{"type":"production","id":"prod-annexB-FourToSeven","name":"FourToSeven","referencingIds":["_ref_14883","_ref_14898","_ref_14900"],"namespace":"annexB","location":"","key":"FourToSeven"},{"type":"production","id":"prod-annexB-Comment","name":"Comment","referencingIds":[],"namespace":"annexB","location":"","key":"Comment"},{"type":"production","id":"prod-annexB-MultiLineComment","name":"MultiLineComment","referencingIds":["_ref_14909","_ref_14941"],"namespace":"annexB","location":"","key":"MultiLineComment"},{"type":"production","id":"prod-annexB-FirstCommentLine","name":"FirstCommentLine","referencingIds":["_ref_14914"],"namespace":"annexB","location":"","key":"FirstCommentLine"},{"type":"production","id":"prod-annexB-SingleLineHTMLOpenComment","name":"SingleLineHTMLOpenComment","referencingIds":["_ref_14911"],"namespace":"annexB","location":"","key":"SingleLineHTMLOpenComment"},{"type":"production","id":"prod-annexB-SingleLineHTMLCloseComment","name":"SingleLineHTMLCloseComment","referencingIds":["_ref_14912","_ref_14942"],"namespace":"annexB","location":"","key":"SingleLineHTMLCloseComment"},{"type":"production","id":"prod-annexB-SingleLineDelimitedComment","name":"SingleLineDelimitedComment","referencingIds":["_ref_14913","_ref_14938"],"namespace":"annexB","location":"","key":"SingleLineDelimitedComment"},{"type":"production","id":"prod-annexB-HTMLCloseComment","name":"HTMLCloseComment","referencingIds":["_ref_14917","_ref_14921"],"namespace":"annexB","location":"","key":"HTMLCloseComment"},{"type":"production","id":"prod-annexB-SingleLineDelimitedCommentChars","name":"SingleLineDelimitedCommentChars","referencingIds":["_ref_14918","_ref_14922","_ref_14927","_ref_14932"],"namespace":"annexB","location":"","key":"SingleLineDelimitedCommentChars"},{"type":"production","id":"prod-annexB-SingleLineNotAsteriskChar","name":"SingleLineNotAsteriskChar","referencingIds":["_ref_14926"],"namespace":"annexB","location":"","key":"SingleLineNotAsteriskChar"},{"type":"production","id":"prod-annexB-SingleLinePostAsteriskCommentChars","name":"SingleLinePostAsteriskCommentChars","referencingIds":["_ref_14928","_ref_14933"],"namespace":"annexB","location":"","key":"SingleLinePostAsteriskCommentChars"},{"type":"production","id":"prod-annexB-SingleLineNotForwardSlashOrAsteriskChar","name":"SingleLineNotForwardSlashOrAsteriskChar","referencingIds":["_ref_14931"],"namespace":"annexB","location":"","key":"SingleLineNotForwardSlashOrAsteriskChar"},{"type":"production","id":"prod-annexB-WhiteSpaceSequence","name":"WhiteSpaceSequence","referencingIds":["_ref_14923","_ref_14937","_ref_14939"],"namespace":"annexB","location":"","key":"WhiteSpaceSequence"},{"type":"production","id":"prod-annexB-SingleLineDelimitedCommentSequence","name":"SingleLineDelimitedCommentSequence","referencingIds":["_ref_14924","_ref_14940"],"namespace":"annexB","location":"","key":"SingleLineDelimitedCommentSequence"},{"type":"production","id":"prod-annexB-Term","name":"Term","referencingIds":[],"namespace":"annexB","location":"","key":"Term"},{"type":"production","id":"prod-annexB-Assertion","name":"Assertion","referencingIds":["_ref_14944","_ref_14950","_ref_15037"],"namespace":"annexB","location":"","key":"Assertion"},{"type":"production","id":"prod-annexB-QuantifiableAssertion","name":"QuantifiableAssertion","referencingIds":["_ref_14948","_ref_14956","_ref_15015","_ref_15019","_ref_15031","_ref_15032","_ref_15035","_ref_15036"],"namespace":"annexB","location":"","key":"QuantifiableAssertion"},{"type":"production","id":"prod-annexB-ExtendedAtom","name":"ExtendedAtom","referencingIds":["_ref_14951","_ref_14953","_ref_15021","_ref_15025","_ref_15027","_ref_15029","_ref_15040","_ref_15041"],"namespace":"annexB","location":"","key":"ExtendedAtom"},{"type":"production","id":"prod-annexB-InvalidBracedQuantifier","name":"InvalidBracedQuantifier","referencingIds":["_ref_14965","_ref_14995"],"namespace":"annexB","location":"","key":"InvalidBracedQuantifier"},{"type":"production","id":"prod-annexB-ExtendedPatternCharacter","name":"ExtendedPatternCharacter","referencingIds":["_ref_14966","_ref_15043","_ref_15044"],"namespace":"annexB","location":"","key":"ExtendedPatternCharacter"},{"type":"production","id":"prod-annexB-AtomEscape","name":"AtomEscape","referencingIds":["_ref_14961"],"namespace":"annexB","location":"","key":"AtomEscape"},{"type":"production","id":"prod-annexB-CharacterEscape","name":"CharacterEscape","referencingIds":["_ref_14976","_ref_14993","_ref_15046"],"namespace":"annexB","location":"","key":"CharacterEscape"},{"type":"production","id":"prod-annexB-IdentityEscape","name":"IdentityEscape","referencingIds":["_ref_14984"],"namespace":"annexB","location":"","key":"IdentityEscape"},{"type":"production","id":"prod-annexB-SourceCharacterIdentityEscape","name":"SourceCharacterIdentityEscape","referencingIds":["_ref_14986"],"namespace":"annexB","location":"","key":"SourceCharacterIdentityEscape"},{"type":"production","id":"prod-annexB-ClassAtomNoDash","name":"ClassAtomNoDash","referencingIds":["_ref_15001","_ref_15004","_ref_15053","_ref_15056"],"namespace":"annexB","location":"","key":"ClassAtomNoDash"},{"type":"production","id":"prod-annexB-ClassEscape","name":"ClassEscape","referencingIds":["_ref_14990","_ref_15060"],"namespace":"annexB","location":"","key":"ClassEscape"},{"type":"production","id":"prod-annexB-ClassControlLetter","name":"ClassControlLetter","referencingIds":["_ref_14991","_ref_15006","_ref_15007","_ref_15059"],"namespace":"annexB","location":"","key":"ClassControlLetter"},{"type":"production","id":"prod-annexB-NonemptyClassRanges","name":"NonemptyClassRanges","referencingIds":[],"namespace":"annexB","location":"","key":"NonemptyClassRanges"},{"type":"production","id":"prod-annexB-NonemptyClassRangesNoDash","name":"NonemptyClassRangesNoDash","referencingIds":[],"namespace":"annexB","location":"","key":"NonemptyClassRangesNoDash"},{"type":"production","id":"prod-annexB-Atom","name":"Atom","referencingIds":["_ref_14945","_ref_14946","_ref_15017","_ref_15020","_ref_15023","_ref_15026","_ref_15028","_ref_15030","_ref_15038","_ref_15042"],"namespace":"annexB","location":"","key":"Atom"},{"type":"term","term":"%escape%","refId":"sec-escape-string","referencingIds":[],"namespace":"annexB","location":"","key":"%escape%"},{"type":"term","term":"%unescape%","refId":"sec-unescape-string","referencingIds":[],"namespace":"annexB","location":"","key":"%unescape%"},{"type":"production","id":"prod-annexB-ObjectLiteral","name":"ObjectLiteral","referencingIds":["_ref_15061"],"namespace":"annexB","location":"","key":"ObjectLiteral"},{"type":"production","id":"prod-annexB-PropertyDefinition","name":"PropertyDefinition","referencingIds":[],"namespace":"annexB","location":"","key":"PropertyDefinition"},{"type":"production","id":"prod-annexB-LabelledItem","name":"LabelledItem","referencingIds":["_ref_15085"],"namespace":"annexB","location":"","key":"LabelledItem"},{"type":"production","id":"prod-annexB-Block","name":"Block","referencingIds":["_ref_15092","_ref_15095","_ref_15098","_ref_15101","_ref_15102","_ref_15103","_ref_15106","_ref_15109","_ref_15113","_ref_15116","_ref_15118","_ref_15119","_ref_15123","_ref_15136","_ref_15149","_ref_15182","_ref_15185","_ref_15187","_ref_15190","_ref_15195"],"namespace":"annexB","location":"","key":"Block"},{"type":"production","id":"prod-annexB-SwitchStatement","name":"SwitchStatement","referencingIds":[],"namespace":"annexB","location":"","key":"SwitchStatement"},{"type":"production","id":"prod-annexB-IfStatement","name":"IfStatement","referencingIds":["_ref_15088","_ref_15165"],"namespace":"annexB","location":"","key":"IfStatement"},{"type":"production","id":"prod-annexB-Catch","name":"Catch","referencingIds":["_ref_15191","_ref_15196","_ref_15197","_ref_15198"],"namespace":"annexB","location":"","key":"Catch"},{"type":"production","id":"prod-annexB-CatchParameter","name":"CatchParameter","referencingIds":["_ref_15181","_ref_15183","_ref_15184","_ref_15186","_ref_15188","_ref_15192","_ref_15193"],"namespace":"annexB","location":"","key":"CatchParameter"},{"type":"production","id":"prod-annexB-IterationStatement","name":"IterationStatement","referencingIds":["_ref_15089","_ref_15199"],"namespace":"annexB","location":"","key":"IterationStatement"},{"type":"production","id":"prod-annexB-BindingIdentifier","name":"BindingIdentifier","referencingIds":["_ref_15097","_ref_15105","_ref_15112","_ref_15126","_ref_15130","_ref_15139","_ref_15143","_ref_15152","_ref_15156","_ref_15189","_ref_15200","_ref_15204","_ref_15209","_ref_15214","_ref_15220","_ref_15224","_ref_15226","_ref_15230","_ref_15232","_ref_15236","_ref_15241"],"namespace":"annexB","location":"","key":"BindingIdentifier"},{"type":"term","term":"[[IsHTMLDDA]] internal slot","refId":"sec-IsHTMLDDA-internal-slot","referencingIds":[],"namespace":"annexB","location":"","key":"[[IsHTMLDDA]] internal slot"}]</script></head><body><div id="menu-toggle">☰</div><div id="menu-spacer"></div><div id="menu"><div id="menu-search"><input type="text" id="menu-search-box" placeholder="Search..."><div id="menu-search-results" class="inactive"></div></div><div id="menu-pins"><div class="menu-pane-header">Pins</div><ul id="menu-pins-list"></ul></div><div class="menu-pane-header">Table of Contents</div><div id="menu-toc"><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-intro" title="Introduction">Introduction</a></li><li><span class="item-toggle-none"></span><a href="#sec-scope" title="Scope"><span class="secnum">1</span> Scope</a></li><li><span class="item-toggle-none"></span><a href="#sec-conformance" title="Conformance"><span class="secnum">2</span> Conformance</a></li><li><span class="item-toggle-none"></span><a href="#sec-normative-references" title="Normative References"><span class="secnum">3</span> Normative References</a></li><li><span class="item-toggle">◢</span><a href="#sec-overview" title="Overview"><span class="secnum">4</span> Overview</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-web-scripting" title="Web Scripting"><span class="secnum">4.1</span> Web Scripting</a></li><li><span class="item-toggle">◢</span><a href="#sec-ecmascript-overview" title="ECMAScript Overview"><span class="secnum">4.2</span> ECMAScript Overview</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-objects" title="Objects"><span class="secnum">4.2.1</span> Objects</a></li><li><span class="item-toggle-none"></span><a href="#sec-strict-variant-of-ecmascript" title="The Strict Variant of ECMAScript"><span class="secnum">4.2.2</span> The Strict Variant of ECMAScript</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-terms-and-definitions" title="Terms and Definitions"><span class="secnum">4.3</span> Terms and Definitions</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-type" title="type"><span class="secnum">4.3.1</span> type</a></li><li><span class="item-toggle-none"></span><a href="#sec-primitive-value" title="primitive value"><span class="secnum">4.3.2</span> primitive value</a></li><li><span class="item-toggle-none"></span><a href="#sec-terms-and-definitions-object" title="object"><span class="secnum">4.3.3</span> object</a></li><li><span class="item-toggle-none"></span><a href="#sec-constructor" title="constructor"><span class="secnum">4.3.4</span> constructor</a></li><li><span class="item-toggle-none"></span><a href="#sec-terms-and-definitions-prototype" title="prototype"><span class="secnum">4.3.5</span> prototype</a></li><li><span class="item-toggle-none"></span><a href="#sec-ordinary-object" title="ordinary object"><span class="secnum">4.3.6</span> ordinary object</a></li><li><span class="item-toggle-none"></span><a href="#sec-exotic-object" title="exotic object"><span class="secnum">4.3.7</span> exotic object</a></li><li><span class="item-toggle-none"></span><a href="#sec-standard-object" title="standard object"><span class="secnum">4.3.8</span> standard object</a></li><li><span class="item-toggle-none"></span><a href="#sec-built-in-object" title="built-in object"><span class="secnum">4.3.9</span> built-in object</a></li><li><span class="item-toggle-none"></span><a href="#sec-undefined-value" title="undefined value"><span class="secnum">4.3.10</span> undefined value</a></li><li><span class="item-toggle-none"></span><a href="#sec-terms-and-definitions-undefined-type" title="Undefined type"><span class="secnum">4.3.11</span> Undefined type</a></li><li><span class="item-toggle-none"></span><a href="#sec-null-value" title="null value"><span class="secnum">4.3.12</span> null value</a></li><li><span class="item-toggle-none"></span><a href="#sec-terms-and-definitions-null-type" title="Null type"><span class="secnum">4.3.13</span> Null type</a></li><li><span class="item-toggle-none"></span><a href="#sec-terms-and-definitions-boolean-value" title="Boolean value"><span class="secnum">4.3.14</span> Boolean value</a></li><li><span class="item-toggle-none"></span><a href="#sec-terms-and-definitions-boolean-type" title="Boolean type"><span class="secnum">4.3.15</span> Boolean type</a></li><li><span class="item-toggle-none"></span><a href="#sec-boolean-object" title="Boolean object"><span class="secnum">4.3.16</span> Boolean object</a></li><li><span class="item-toggle-none"></span><a href="#sec-terms-and-definitions-string-value" title="String value"><span class="secnum">4.3.17</span> String value</a></li><li><span class="item-toggle-none"></span><a href="#sec-terms-and-definitions-string-type" title="String type"><span class="secnum">4.3.18</span> String type</a></li><li><span class="item-toggle-none"></span><a href="#sec-string-object" title="String object"><span class="secnum">4.3.19</span> String object</a></li><li><span class="item-toggle-none"></span><a href="#sec-terms-and-definitions-number-value" title="Number value"><span class="secnum">4.3.20</span> Number value</a></li><li><span class="item-toggle-none"></span><a href="#sec-terms-and-definitions-number-type" title="Number type"><span class="secnum">4.3.21</span> Number type</a></li><li><span class="item-toggle-none"></span><a href="#sec-number-object" title="Number object"><span class="secnum">4.3.22</span> Number object</a></li><li><span class="item-toggle-none"></span><a href="#sec-terms-and-definitions-infinity" title="Infinity"><span class="secnum">4.3.23</span> Infinity</a></li><li><span class="item-toggle-none"></span><a href="#sec-terms-and-definitions-nan" title="NaN"><span class="secnum">4.3.24</span> NaN</a></li><li><span class="item-toggle-none"></span><a href="#sec-symbol-value" title="Symbol value"><span class="secnum">4.3.25</span> Symbol value</a></li><li><span class="item-toggle-none"></span><a href="#sec-terms-and-definitions-symbol-type" title="Symbol type"><span class="secnum">4.3.26</span> Symbol type</a></li><li><span class="item-toggle-none"></span><a href="#sec-symbol-object" title="Symbol object"><span class="secnum">4.3.27</span> Symbol object</a></li><li><span class="item-toggle-none"></span><a href="#sec-terms-and-definitions-function" title="function"><span class="secnum">4.3.28</span> function</a></li><li><span class="item-toggle-none"></span><a href="#sec-built-in-function" title="built-in function"><span class="secnum">4.3.29</span> built-in function</a></li><li><span class="item-toggle-none"></span><a href="#sec-property" title="property"><span class="secnum">4.3.30</span> property</a></li><li><span class="item-toggle-none"></span><a href="#sec-method" title="method"><span class="secnum">4.3.31</span> method</a></li><li><span class="item-toggle-none"></span><a href="#sec-built-in-method" title="built-in method"><span class="secnum">4.3.32</span> built-in method</a></li><li><span class="item-toggle-none"></span><a href="#sec-attribute" title="attribute"><span class="secnum">4.3.33</span> attribute</a></li><li><span class="item-toggle-none"></span><a href="#sec-own-property" title="own property"><span class="secnum">4.3.34</span> own property</a></li><li><span class="item-toggle-none"></span><a href="#sec-inherited-property" title="inherited property"><span class="secnum">4.3.35</span> inherited property</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-organization-of-this-specification" title="Organization of This Specification"><span class="secnum">4.4</span> Organization of This Specification</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-notational-conventions" title="Notational Conventions"><span class="secnum">5</span> Notational Conventions</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-syntactic-and-lexical-grammars" title="Syntactic and Lexical Grammars"><span class="secnum">5.1</span> Syntactic and Lexical Grammars</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-context-free-grammars" title="Context-Free Grammars"><span class="secnum">5.1.1</span> Context-Free Grammars</a></li><li><span class="item-toggle-none"></span><a href="#sec-lexical-and-regexp-grammars" title="The Lexical and RegExp Grammars"><span class="secnum">5.1.2</span> The Lexical and RegExp Grammars</a></li><li><span class="item-toggle-none"></span><a href="#sec-numeric-string-grammar" title="The Numeric String Grammar"><span class="secnum">5.1.3</span> The Numeric String Grammar</a></li><li><span class="item-toggle-none"></span><a href="#sec-syntactic-grammar" title="The Syntactic Grammar"><span class="secnum">5.1.4</span> The Syntactic Grammar</a></li><li><span class="item-toggle-none"></span><a href="#sec-grammar-notation" title="Grammar Notation"><span class="secnum">5.1.5</span> Grammar Notation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-algorithm-conventions" title="Algorithm Conventions"><span class="secnum">5.2</span> Algorithm Conventions</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-algorithm-conventions-abstract-operations" title="Abstract Operations"><span class="secnum">5.2.1</span> Abstract Operations</a></li><li><span class="item-toggle-none"></span><a href="#sec-algorithm-conventions-syntax-directed-operations" title="Syntax-Directed Operations"><span class="secnum">5.2.2</span> Syntax-Directed Operations</a></li><li><span class="item-toggle">◢</span><a href="#sec-runtime-semantics" title="Runtime Semantics"><span class="secnum">5.2.3</span> Runtime Semantics</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-implicit-completion-values" title="Implicit Completion Values"><span class="secnum">5.2.3.1</span> Implicit Completion Values</a></li><li><span class="item-toggle-none"></span><a href="#sec-throw-an-exception" title="Throw an Exception"><span class="secnum">5.2.3.2</span> Throw an Exception</a></li><li><span class="item-toggle-none"></span><a href="#sec-returnifabrupt" title="ReturnIfAbrupt"><span class="secnum">5.2.3.3</span> ReturnIfAbrupt</a></li><li><span class="item-toggle-none"></span><a href="#sec-returnifabrupt-shorthands" title="ReturnIfAbrupt Shorthands"><span class="secnum">5.2.3.4</span> ReturnIfAbrupt Shorthands</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-static-semantic-rules" title="Static Semantics"><span class="secnum">5.2.4</span> Static Semantics</a></li><li><span class="item-toggle-none"></span><a href="#sec-mathematical-operations" title="Mathematical Operations"><span class="secnum">5.2.5</span> Mathematical Operations</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-ecmascript-data-types-and-values" title="ECMAScript Data Types and Values"><span class="secnum">6</span> ECMAScript Data Types and Values</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-ecmascript-language-types" title="ECMAScript Language Types"><span class="secnum">6.1</span> ECMAScript Language Types</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-ecmascript-language-types-undefined-type" title="The Undefined Type"><span class="secnum">6.1.1</span> The Undefined Type</a></li><li><span class="item-toggle-none"></span><a href="#sec-ecmascript-language-types-null-type" title="The Null Type"><span class="secnum">6.1.2</span> The Null Type</a></li><li><span class="item-toggle-none"></span><a href="#sec-ecmascript-language-types-boolean-type" title="The Boolean Type"><span class="secnum">6.1.3</span> The Boolean Type</a></li><li><span class="item-toggle-none"></span><a href="#sec-ecmascript-language-types-string-type" title="The String Type"><span class="secnum">6.1.4</span> The String Type</a></li><li><span class="item-toggle">◢</span><a href="#sec-ecmascript-language-types-symbol-type" title="The Symbol Type"><span class="secnum">6.1.5</span> The Symbol Type</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-well-known-symbols" title="Well-Known Symbols"><span class="secnum">6.1.5.1</span> Well-Known Symbols</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-ecmascript-language-types-number-type" title="The Number Type"><span class="secnum">6.1.6</span> The Number Type</a></li><li><span class="item-toggle">◢</span><a href="#sec-object-type" title="The Object Type"><span class="secnum">6.1.7</span> The Object Type</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-property-attributes" title="Property Attributes"><span class="secnum">6.1.7.1</span> Property Attributes</a></li><li><span class="item-toggle-none"></span><a href="#sec-object-internal-methods-and-internal-slots" title="Object Internal Methods and Internal Slots"><span class="secnum">6.1.7.2</span> Object Internal Methods and Internal Slots</a></li><li><span class="item-toggle-none"></span><a href="#sec-invariants-of-the-essential-internal-methods" title="Invariants of the Essential Internal Methods"><span class="secnum">6.1.7.3</span> Invariants of the Essential Internal Methods</a></li><li><span class="item-toggle-none"></span><a href="#sec-well-known-intrinsic-objects" title="Well-Known Intrinsic Objects"><span class="secnum">6.1.7.4</span> Well-Known Intrinsic Objects</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-ecmascript-specification-types" title="ECMAScript Specification Types"><span class="secnum">6.2</span> ECMAScript Specification Types</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-list-and-record-specification-type" title="The List and Record Specification Types"><span class="secnum">6.2.1</span> The List and Record Specification Types</a></li><li><span class="item-toggle-none"></span><a href="#sec-set-and-relation-specification-type" title="The Set and Relation Specification Types"><span class="secnum">6.2.2</span> The Set and Relation Specification Types</a></li><li><span class="item-toggle">◢</span><a href="#sec-completion-record-specification-type" title="The Completion Record Specification Type"><span class="secnum">6.2.3</span> The Completion Record Specification Type</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#await" title="Await"><span class="secnum">6.2.3.1</span> Await</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#await-fulfilled" title="Await Fulfilled Functions"><span class="secnum">6.2.3.1.1</span> Await Fulfilled Functions</a></li><li><span class="item-toggle-none"></span><a href="#await-rejected" title="Await Rejected Functions"><span class="secnum">6.2.3.1.2</span> Await Rejected Functions</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-normalcompletion" title="NormalCompletion"><span class="secnum">6.2.3.2</span> NormalCompletion</a></li><li><span class="item-toggle-none"></span><a href="#sec-throwcompletion" title="ThrowCompletion"><span class="secnum">6.2.3.3</span> ThrowCompletion</a></li><li><span class="item-toggle-none"></span><a href="#sec-updateempty" title="UpdateEmpty ( completionRecord, value )"><span class="secnum">6.2.3.4</span> UpdateEmpty ( <var>completionRecord</var>, <var>value</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-reference-specification-type" title="The Reference Specification Type"><span class="secnum">6.2.4</span> The Reference Specification Type</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-getbase" title="GetBase ( V )"><span class="secnum">6.2.4.1</span> GetBase ( <var>V</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-getreferencedname" title="GetReferencedName ( V )"><span class="secnum">6.2.4.2</span> GetReferencedName ( <var>V</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-isstrictreference" title="IsStrictReference ( V )"><span class="secnum">6.2.4.3</span> IsStrictReference ( <var>V</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-hasprimitivebase" title="HasPrimitiveBase ( V )"><span class="secnum">6.2.4.4</span> HasPrimitiveBase ( <var>V</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-ispropertyreference" title="IsPropertyReference ( V )"><span class="secnum">6.2.4.5</span> IsPropertyReference ( <var>V</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-isunresolvablereference" title="IsUnresolvableReference ( V )"><span class="secnum">6.2.4.6</span> IsUnresolvableReference ( <var>V</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-issuperreference" title="IsSuperReference ( V )"><span class="secnum">6.2.4.7</span> IsSuperReference ( <var>V</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-getvalue" title="GetValue ( V )"><span class="secnum">6.2.4.8</span> GetValue ( <var>V</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-putvalue" title="PutValue ( V, W )"><span class="secnum">6.2.4.9</span> PutValue ( <var>V</var>, <var>W</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-getthisvalue" title="GetThisValue ( V )"><span class="secnum">6.2.4.10</span> GetThisValue ( <var>V</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-initializereferencedbinding" title="InitializeReferencedBinding ( V, W )"><span class="secnum">6.2.4.11</span> InitializeReferencedBinding ( <var>V</var>, <var>W</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-property-descriptor-specification-type" title="The Property Descriptor Specification Type"><span class="secnum">6.2.5</span> The Property Descriptor Specification Type</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-isaccessordescriptor" title="IsAccessorDescriptor ( Desc )"><span class="secnum">6.2.5.1</span> IsAccessorDescriptor ( <var>Desc</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-isdatadescriptor" title="IsDataDescriptor ( Desc )"><span class="secnum">6.2.5.2</span> IsDataDescriptor ( <var>Desc</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-isgenericdescriptor" title="IsGenericDescriptor ( Desc )"><span class="secnum">6.2.5.3</span> IsGenericDescriptor ( <var>Desc</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-frompropertydescriptor" title="FromPropertyDescriptor ( Desc )"><span class="secnum">6.2.5.4</span> FromPropertyDescriptor ( <var>Desc</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-topropertydescriptor" title="ToPropertyDescriptor ( Obj )"><span class="secnum">6.2.5.5</span> ToPropertyDescriptor ( <var>Obj</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-completepropertydescriptor" title="CompletePropertyDescriptor ( Desc )"><span class="secnum">6.2.5.6</span> CompletePropertyDescriptor ( <var>Desc</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-lexical-environment-and-environment-record-specification-types" title="The Lexical Environment and Environment Record Specification Types"><span class="secnum">6.2.6</span> The Lexical Environment and Environment Record Specification Types</a></li><li><span class="item-toggle">◢</span><a href="#sec-data-blocks" title="Data Blocks"><span class="secnum">6.2.7</span> Data Blocks</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-createbytedatablock" title="CreateByteDataBlock ( size )"><span class="secnum">6.2.7.1</span> CreateByteDataBlock ( <var>size</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-createsharedbytedatablock" title="CreateSharedByteDataBlock ( size )"><span class="secnum">6.2.7.2</span> CreateSharedByteDataBlock ( <var>size</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-copydatablockbytes" title="CopyDataBlockBytes ( toBlock, toIndex, fromBlock, fromIndex, count )"><span class="secnum">6.2.7.3</span> CopyDataBlockBytes ( <var>toBlock</var>, <var>toIndex</var>, <var>fromBlock</var>, <var>fromIndex</var>, <var>count</var> )</a></li></ol></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-abstract-operations" title="Abstract Operations"><span class="secnum">7</span> Abstract Operations</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-type-conversion" title="Type Conversion"><span class="secnum">7.1</span> Type Conversion</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-toprimitive" title="ToPrimitive ( input [ , PreferredType ] )"><span class="secnum">7.1.1</span> ToPrimitive ( <var>input</var> [ , <var>PreferredType</var> ] )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-ordinarytoprimitive" title="OrdinaryToPrimitive ( O, hint )"><span class="secnum">7.1.1.1</span> OrdinaryToPrimitive ( <var>O</var>, <var>hint</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-toboolean" title="ToBoolean ( argument )"><span class="secnum">7.1.2</span> ToBoolean ( <var>argument</var> )</a></li><li><span class="item-toggle">◢</span><a href="#sec-tonumber" title="ToNumber ( argument )"><span class="secnum">7.1.3</span> ToNumber ( <var>argument</var> )</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-tonumber-applied-to-the-string-type" title="ToNumber Applied to the String Type"><span class="secnum">7.1.3.1</span> ToNumber Applied to the String Type</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-runtime-semantics-mv-s" title="Runtime Semantics: MV"><span class="secnum">7.1.3.1.1</span> RS: MV</a></li></ol></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-tointeger" title="ToInteger ( argument )"><span class="secnum">7.1.4</span> ToInteger ( <var>argument</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-toint32" title="ToInt32 ( argument )"><span class="secnum">7.1.5</span> ToInt32 ( <var>argument</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-touint32" title="ToUint32 ( argument )"><span class="secnum">7.1.6</span> ToUint32 ( <var>argument</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-toint16" title="ToInt16 ( argument )"><span class="secnum">7.1.7</span> ToInt16 ( <var>argument</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-touint16" title="ToUint16 ( argument )"><span class="secnum">7.1.8</span> ToUint16 ( <var>argument</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-toint8" title="ToInt8 ( argument )"><span class="secnum">7.1.9</span> ToInt8 ( <var>argument</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-touint8" title="ToUint8 ( argument )"><span class="secnum">7.1.10</span> ToUint8 ( <var>argument</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-touint8clamp" title="ToUint8Clamp ( argument )"><span class="secnum">7.1.11</span> ToUint8Clamp ( <var>argument</var> )</a></li><li><span class="item-toggle">◢</span><a href="#sec-tostring" title="ToString ( argument )"><span class="secnum">7.1.12</span> ToString ( <var>argument</var> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-tostring-applied-to-the-number-type" title="NumberToString ( m )"><span class="secnum">7.1.12.1</span> NumberToString ( <var>m</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-toobject" title="ToObject ( argument )"><span class="secnum">7.1.13</span> ToObject ( <var>argument</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-topropertykey" title="ToPropertyKey ( argument )"><span class="secnum">7.1.14</span> ToPropertyKey ( <var>argument</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-tolength" title="ToLength ( argument )"><span class="secnum">7.1.15</span> ToLength ( <var>argument</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-canonicalnumericindexstring" title="CanonicalNumericIndexString ( argument )"><span class="secnum">7.1.16</span> CanonicalNumericIndexString ( <var>argument</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-toindex" title="ToIndex ( value )"><span class="secnum">7.1.17</span> ToIndex ( <var>value</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-testing-and-comparison-operations" title="Testing and Comparison Operations"><span class="secnum">7.2</span> Testing and Comparison Operations</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-requireobjectcoercible" title="RequireObjectCoercible ( argument )"><span class="secnum">7.2.1</span> RequireObjectCoercible ( <var>argument</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-isarray" title="IsArray ( argument )"><span class="secnum">7.2.2</span> IsArray ( <var>argument</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-iscallable" title="IsCallable ( argument )"><span class="secnum">7.2.3</span> IsCallable ( <var>argument</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-isconstructor" title="IsConstructor ( argument )"><span class="secnum">7.2.4</span> IsConstructor ( <var>argument</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-isextensible-o" title="IsExtensible ( O )"><span class="secnum">7.2.5</span> IsExtensible ( <var>O</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-isinteger" title="IsInteger ( argument )"><span class="secnum">7.2.6</span> IsInteger ( <var>argument</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-ispropertykey" title="IsPropertyKey ( argument )"><span class="secnum">7.2.7</span> IsPropertyKey ( <var>argument</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-isregexp" title="IsRegExp ( argument )"><span class="secnum">7.2.8</span> IsRegExp ( <var>argument</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-isstringprefix" title="IsStringPrefix ( p, q )"><span class="secnum">7.2.9</span> IsStringPrefix ( <var>p</var>, <var>q</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-samevalue" title="SameValue ( x, y )"><span class="secnum">7.2.10</span> SameValue ( <var>x</var>, <var>y</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-samevaluezero" title="SameValueZero ( x, y )"><span class="secnum">7.2.11</span> SameValueZero ( <var>x</var>, <var>y</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-samevaluenonnumber" title="SameValueNonNumber ( x, y )"><span class="secnum">7.2.12</span> SameValueNonNumber ( <var>x</var>, <var>y</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-abstract-relational-comparison" title="Abstract Relational Comparison"><span class="secnum">7.2.13</span> Abstract Relational Comparison</a></li><li><span class="item-toggle-none"></span><a href="#sec-abstract-equality-comparison" title="Abstract Equality Comparison"><span class="secnum">7.2.14</span> Abstract Equality Comparison</a></li><li><span class="item-toggle-none"></span><a href="#sec-strict-equality-comparison" title="Strict Equality Comparison"><span class="secnum">7.2.15</span> Strict Equality Comparison</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-operations-on-objects" title="Operations on Objects"><span class="secnum">7.3</span> Operations on Objects</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-get-o-p" title="Get ( O, P )"><span class="secnum">7.3.1</span> Get ( <var>O</var>, <var>P</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-getv" title="GetV ( V, P )"><span class="secnum">7.3.2</span> GetV ( <var>V</var>, <var>P</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-set-o-p-v-throw" title="Set ( O, P, V, Throw )"><span class="secnum">7.3.3</span> Set ( <var>O</var>, <var>P</var>, <var>V</var>, <var>Throw</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-createdataproperty" title="CreateDataProperty ( O, P, V )"><span class="secnum">7.3.4</span> CreateDataProperty ( <var>O</var>, <var>P</var>, <var>V</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-createmethodproperty" title="CreateMethodProperty ( O, P, V )"><span class="secnum">7.3.5</span> CreateMethodProperty ( <var>O</var>, <var>P</var>, <var>V</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-createdatapropertyorthrow" title="CreateDataPropertyOrThrow ( O, P, V )"><span class="secnum">7.3.6</span> CreateDataPropertyOrThrow ( <var>O</var>, <var>P</var>, <var>V</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-definepropertyorthrow" title="DefinePropertyOrThrow ( O, P, desc )"><span class="secnum">7.3.7</span> DefinePropertyOrThrow ( <var>O</var>, <var>P</var>, <var>desc</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-deletepropertyorthrow" title="DeletePropertyOrThrow ( O, P )"><span class="secnum">7.3.8</span> DeletePropertyOrThrow ( <var>O</var>, <var>P</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-getmethod" title="GetMethod ( V, P )"><span class="secnum">7.3.9</span> GetMethod ( <var>V</var>, <var>P</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-hasproperty" title="HasProperty ( O, P )"><span class="secnum">7.3.10</span> HasProperty ( <var>O</var>, <var>P</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-hasownproperty" title="HasOwnProperty ( O, P )"><span class="secnum">7.3.11</span> HasOwnProperty ( <var>O</var>, <var>P</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-call" title="Call ( F, V [ , argumentsList ] )"><span class="secnum">7.3.12</span> Call ( <var>F</var>, <var>V</var> [ , <var>argumentsList</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-construct" title="Construct ( F [ , argumentsList [ , newTarget ] ] )"><span class="secnum">7.3.13</span> Construct ( <var>F</var> [ , <var>argumentsList</var> [ , <var>newTarget</var> ] ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-setintegritylevel" title="SetIntegrityLevel ( O, level )"><span class="secnum">7.3.14</span> SetIntegrityLevel ( <var>O</var>, <var>level</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-testintegritylevel" title="TestIntegrityLevel ( O, level )"><span class="secnum">7.3.15</span> TestIntegrityLevel ( <var>O</var>, <var>level</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-createarrayfromlist" title="CreateArrayFromList ( elements )"><span class="secnum">7.3.16</span> CreateArrayFromList ( <var>elements</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-createlistfromarraylike" title="CreateListFromArrayLike ( obj [ , elementTypes ] )"><span class="secnum">7.3.17</span> CreateListFromArrayLike ( <var>obj</var> [ , <var>elementTypes</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-invoke" title="Invoke ( V, P [ , argumentsList ] )"><span class="secnum">7.3.18</span> Invoke ( <var>V</var>, <var>P</var> [ , <var>argumentsList</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-ordinaryhasinstance" title="OrdinaryHasInstance ( C, O )"><span class="secnum">7.3.19</span> OrdinaryHasInstance ( <var>C</var>, <var>O</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-speciesconstructor" title="SpeciesConstructor ( O, defaultConstructor )"><span class="secnum">7.3.20</span> SpeciesConstructor ( <var>O</var>, <var>defaultConstructor</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-enumerableownpropertynames" title="EnumerableOwnPropertyNames ( O, kind )"><span class="secnum">7.3.21</span> EnumerableOwnPropertyNames ( <var>O</var>, <var>kind</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-getfunctionrealm" title="GetFunctionRealm ( obj )"><span class="secnum">7.3.22</span> GetFunctionRealm ( <var>obj</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-copydataproperties" title="CopyDataProperties ( target, source, excludedItems )"><span class="secnum">7.3.23</span> CopyDataProperties ( <var>target</var>, <var>source</var>, <var>excludedItems</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-operations-on-iterator-objects" title="Operations on Iterator Objects"><span class="secnum">7.4</span> Operations on Iterator Objects</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-getiterator" title="GetIterator ( obj [ , hint [ , method ] ] )"><span class="secnum">7.4.1</span> GetIterator ( <var>obj</var> [ , <var>hint</var> [ , <var>method</var> ] ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-iteratornext" title="IteratorNext ( iteratorRecord [ , value ] )"><span class="secnum">7.4.2</span> IteratorNext ( <var>iteratorRecord</var> [ , <var>value</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-iteratorcomplete" title="IteratorComplete ( iterResult )"><span class="secnum">7.4.3</span> IteratorComplete ( <var>iterResult</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-iteratorvalue" title="IteratorValue ( iterResult )"><span class="secnum">7.4.4</span> IteratorValue ( <var>iterResult</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-iteratorstep" title="IteratorStep ( iteratorRecord )"><span class="secnum">7.4.5</span> IteratorStep ( <var>iteratorRecord</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-iteratorclose" title="IteratorClose ( iteratorRecord, completion )"><span class="secnum">7.4.6</span> IteratorClose ( <var>iteratorRecord</var>, <var>completion</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-asynciteratorclose" title="AsyncIteratorClose ( iteratorRecord, completion )"><span class="secnum">7.4.7</span> AsyncIteratorClose ( <var>iteratorRecord</var>, <var>completion</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-createiterresultobject" title="CreateIterResultObject ( value, done )"><span class="secnum">7.4.8</span> CreateIterResultObject ( <var>value</var>, <var>done</var> )</a></li><li><span class="item-toggle">◢</span><a href="#sec-createlistiteratorRecord" title="CreateListIteratorRecord ( list )"><span class="secnum">7.4.9</span> CreateListIteratorRecord ( <var>list</var> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-listiterator-next" title="ListIterator next ( )"><span class="secnum">7.4.9.1</span> ListIterator next ( )</a></li></ol></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-executable-code-and-execution-contexts" title="Executable Code and Execution Contexts"><span class="secnum">8</span> Executable Code and Execution Contexts</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-lexical-environments" title="Lexical Environments"><span class="secnum">8.1</span> Lexical Environments</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-environment-records" title="Environment Records"><span class="secnum">8.1.1</span> Environment Records</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-declarative-environment-records" title="Declarative Environment Records"><span class="secnum">8.1.1.1</span> Declarative Environment Records</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-declarative-environment-records-hasbinding-n" title="HasBinding ( N )"><span class="secnum">8.1.1.1.1</span> HasBinding ( <var>N</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-declarative-environment-records-createmutablebinding-n-d" title="CreateMutableBinding ( N, D )"><span class="secnum">8.1.1.1.2</span> CreateMutableBinding ( <var>N</var>, <var>D</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-declarative-environment-records-createimmutablebinding-n-s" title="CreateImmutableBinding ( N, S )"><span class="secnum">8.1.1.1.3</span> CreateImmutableBinding ( <var>N</var>, <var>S</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-declarative-environment-records-initializebinding-n-v" title="InitializeBinding ( N, V )"><span class="secnum">8.1.1.1.4</span> InitializeBinding ( <var>N</var>, <var>V</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-declarative-environment-records-setmutablebinding-n-v-s" title="SetMutableBinding ( N, V, S )"><span class="secnum">8.1.1.1.5</span> SetMutableBinding ( <var>N</var>, <var>V</var>, <var>S</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-declarative-environment-records-getbindingvalue-n-s" title="GetBindingValue ( N, S )"><span class="secnum">8.1.1.1.6</span> GetBindingValue ( <var>N</var>, <var>S</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-declarative-environment-records-deletebinding-n" title="DeleteBinding ( N )"><span class="secnum">8.1.1.1.7</span> DeleteBinding ( <var>N</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-declarative-environment-records-hasthisbinding" title="HasThisBinding ( )"><span class="secnum">8.1.1.1.8</span> HasThisBinding ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-declarative-environment-records-hassuperbinding" title="HasSuperBinding ( )"><span class="secnum">8.1.1.1.9</span> HasSuperBinding ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-declarative-environment-records-withbaseobject" title="WithBaseObject ( )"><span class="secnum">8.1.1.1.10</span> WithBaseObject ( )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-object-environment-records" title="Object Environment Records"><span class="secnum">8.1.1.2</span> Object Environment Records</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-object-environment-records-hasbinding-n" title="HasBinding ( N )"><span class="secnum">8.1.1.2.1</span> HasBinding ( <var>N</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-object-environment-records-createmutablebinding-n-d" title="CreateMutableBinding ( N, D )"><span class="secnum">8.1.1.2.2</span> CreateMutableBinding ( <var>N</var>, <var>D</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-object-environment-records-createimmutablebinding-n-s" title="CreateImmutableBinding ( N, S )"><span class="secnum">8.1.1.2.3</span> CreateImmutableBinding ( <var>N</var>, <var>S</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-object-environment-records-initializebinding-n-v" title="InitializeBinding ( N, V )"><span class="secnum">8.1.1.2.4</span> InitializeBinding ( <var>N</var>, <var>V</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-object-environment-records-setmutablebinding-n-v-s" title="SetMutableBinding ( N, V, S )"><span class="secnum">8.1.1.2.5</span> SetMutableBinding ( <var>N</var>, <var>V</var>, <var>S</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-object-environment-records-getbindingvalue-n-s" title="GetBindingValue ( N, S )"><span class="secnum">8.1.1.2.6</span> GetBindingValue ( <var>N</var>, <var>S</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-object-environment-records-deletebinding-n" title="DeleteBinding ( N )"><span class="secnum">8.1.1.2.7</span> DeleteBinding ( <var>N</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-object-environment-records-hasthisbinding" title="HasThisBinding ( )"><span class="secnum">8.1.1.2.8</span> HasThisBinding ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-object-environment-records-hassuperbinding" title="HasSuperBinding ( )"><span class="secnum">8.1.1.2.9</span> HasSuperBinding ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-object-environment-records-withbaseobject" title="WithBaseObject ( )"><span class="secnum">8.1.1.2.10</span> WithBaseObject ( )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-function-environment-records" title="Function Environment Records"><span class="secnum">8.1.1.3</span> Function Environment Records</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-bindthisvalue" title="BindThisValue ( V )"><span class="secnum">8.1.1.3.1</span> BindThisValue ( <var>V</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-function-environment-records-hasthisbinding" title="HasThisBinding ( )"><span class="secnum">8.1.1.3.2</span> HasThisBinding ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-function-environment-records-hassuperbinding" title="HasSuperBinding ( )"><span class="secnum">8.1.1.3.3</span> HasSuperBinding ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-function-environment-records-getthisbinding" title="GetThisBinding ( )"><span class="secnum">8.1.1.3.4</span> GetThisBinding ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-getsuperbase" title="GetSuperBase ( )"><span class="secnum">8.1.1.3.5</span> GetSuperBase ( )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-global-environment-records" title="Global Environment Records"><span class="secnum">8.1.1.4</span> Global Environment Records</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-global-environment-records-hasbinding-n" title="HasBinding ( N )"><span class="secnum">8.1.1.4.1</span> HasBinding ( <var>N</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-global-environment-records-createmutablebinding-n-d" title="CreateMutableBinding ( N, D )"><span class="secnum">8.1.1.4.2</span> CreateMutableBinding ( <var>N</var>, <var>D</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-global-environment-records-createimmutablebinding-n-s" title="CreateImmutableBinding ( N, S )"><span class="secnum">8.1.1.4.3</span> CreateImmutableBinding ( <var>N</var>, <var>S</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-global-environment-records-initializebinding-n-v" title="InitializeBinding ( N, V )"><span class="secnum">8.1.1.4.4</span> InitializeBinding ( <var>N</var>, <var>V</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-global-environment-records-setmutablebinding-n-v-s" title="SetMutableBinding ( N, V, S )"><span class="secnum">8.1.1.4.5</span> SetMutableBinding ( <var>N</var>, <var>V</var>, <var>S</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-global-environment-records-getbindingvalue-n-s" title="GetBindingValue ( N, S )"><span class="secnum">8.1.1.4.6</span> GetBindingValue ( <var>N</var>, <var>S</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-global-environment-records-deletebinding-n" title="DeleteBinding ( N )"><span class="secnum">8.1.1.4.7</span> DeleteBinding ( <var>N</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-global-environment-records-hasthisbinding" title="HasThisBinding ( )"><span class="secnum">8.1.1.4.8</span> HasThisBinding ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-global-environment-records-hassuperbinding" title="HasSuperBinding ( )"><span class="secnum">8.1.1.4.9</span> HasSuperBinding ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-global-environment-records-withbaseobject" title="WithBaseObject ( )"><span class="secnum">8.1.1.4.10</span> WithBaseObject ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-global-environment-records-getthisbinding" title="GetThisBinding ( )"><span class="secnum">8.1.1.4.11</span> GetThisBinding ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-hasvardeclaration" title="HasVarDeclaration ( N )"><span class="secnum">8.1.1.4.12</span> HasVarDeclaration ( <var>N</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-haslexicaldeclaration" title="HasLexicalDeclaration ( N )"><span class="secnum">8.1.1.4.13</span> HasLexicalDeclaration ( <var>N</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-hasrestrictedglobalproperty" title="HasRestrictedGlobalProperty ( N )"><span class="secnum">8.1.1.4.14</span> HasRestrictedGlobalProperty ( <var>N</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-candeclareglobalvar" title="CanDeclareGlobalVar ( N )"><span class="secnum">8.1.1.4.15</span> CanDeclareGlobalVar ( <var>N</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-candeclareglobalfunction" title="CanDeclareGlobalFunction ( N )"><span class="secnum">8.1.1.4.16</span> CanDeclareGlobalFunction ( <var>N</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-createglobalvarbinding" title="CreateGlobalVarBinding ( N, D )"><span class="secnum">8.1.1.4.17</span> CreateGlobalVarBinding ( <var>N</var>, <var>D</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-createglobalfunctionbinding" title="CreateGlobalFunctionBinding ( N, V, D )"><span class="secnum">8.1.1.4.18</span> CreateGlobalFunctionBinding ( <var>N</var>, <var>V</var>, <var>D</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-module-environment-records" title="Module Environment Records"><span class="secnum">8.1.1.5</span> Module Environment Records</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-module-environment-records-getbindingvalue-n-s" title="GetBindingValue ( N, S )"><span class="secnum">8.1.1.5.1</span> GetBindingValue ( <var>N</var>, <var>S</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-module-environment-records-deletebinding-n" title="DeleteBinding ( N )"><span class="secnum">8.1.1.5.2</span> DeleteBinding ( <var>N</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-module-environment-records-hasthisbinding" title="HasThisBinding ( )"><span class="secnum">8.1.1.5.3</span> HasThisBinding ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-module-environment-records-getthisbinding" title="GetThisBinding ( )"><span class="secnum">8.1.1.5.4</span> GetThisBinding ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-createimportbinding" title="CreateImportBinding ( N, M, N2 )"><span class="secnum">8.1.1.5.5</span> CreateImportBinding ( <var>N</var>, <var>M</var>, <var>N2</var> )</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-lexical-environment-operations" title="Lexical Environment Operations"><span class="secnum">8.1.2</span> Lexical Environment Operations</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-getidentifierreference" title="GetIdentifierReference ( lex, name, strict )"><span class="secnum">8.1.2.1</span> GetIdentifierReference ( <var>lex</var>, <var>name</var>, <var>strict</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-newdeclarativeenvironment" title="NewDeclarativeEnvironment ( E )"><span class="secnum">8.1.2.2</span> NewDeclarativeEnvironment ( <var>E</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-newobjectenvironment" title="NewObjectEnvironment ( O, E )"><span class="secnum">8.1.2.3</span> NewObjectEnvironment ( <var>O</var>, <var>E</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-newfunctionenvironment" title="NewFunctionEnvironment ( F, newTarget )"><span class="secnum">8.1.2.4</span> NewFunctionEnvironment ( <var>F</var>, <var>newTarget</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-newglobalenvironment" title="NewGlobalEnvironment ( G, thisValue )"><span class="secnum">8.1.2.5</span> NewGlobalEnvironment ( <var>G</var>, <var>thisValue</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-newmoduleenvironment" title="NewModuleEnvironment ( E )"><span class="secnum">8.1.2.6</span> NewModuleEnvironment ( <var>E</var> )</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-code-realms" title="Realms"><span class="secnum">8.2</span> Realms</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-createrealm" title="CreateRealm ( )"><span class="secnum">8.2.1</span> CreateRealm ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-createintrinsics" title="CreateIntrinsics ( realmRec )"><span class="secnum">8.2.2</span> CreateIntrinsics ( <var>realmRec</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-setrealmglobalobject" title="SetRealmGlobalObject ( realmRec, globalObj, thisValue )"><span class="secnum">8.2.3</span> SetRealmGlobalObject ( <var>realmRec</var>, <var>globalObj</var>, <var>thisValue</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-setdefaultglobalbindings" title="SetDefaultGlobalBindings ( realmRec )"><span class="secnum">8.2.4</span> SetDefaultGlobalBindings ( <var>realmRec</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-execution-contexts" title="Execution Contexts"><span class="secnum">8.3</span> Execution Contexts</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-getactivescriptormodule" title="GetActiveScriptOrModule ( )"><span class="secnum">8.3.1</span> GetActiveScriptOrModule ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-resolvebinding" title="ResolveBinding ( name [ , env ] )"><span class="secnum">8.3.2</span> ResolveBinding ( <var>name</var> [ , <var>env</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-getthisenvironment" title="GetThisEnvironment ( )"><span class="secnum">8.3.3</span> GetThisEnvironment ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-resolvethisbinding" title="ResolveThisBinding ( )"><span class="secnum">8.3.4</span> ResolveThisBinding ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-getnewtarget" title="GetNewTarget ( )"><span class="secnum">8.3.5</span> GetNewTarget ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-getglobalobject" title="GetGlobalObject ( )"><span class="secnum">8.3.6</span> GetGlobalObject ( )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-jobs-and-job-queues" title="Jobs and Job Queues"><span class="secnum">8.4</span> Jobs and Job Queues</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-enqueuejob" title="EnqueueJob ( queueName, job, arguments )"><span class="secnum">8.4.1</span> EnqueueJob ( <var>queueName</var>, <var>job</var>, <var>arguments</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-initializehostdefinedrealm" title="InitializeHostDefinedRealm ( )"><span class="secnum">8.5</span> InitializeHostDefinedRealm ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-runjobs" title="RunJobs ( )"><span class="secnum">8.6</span> RunJobs ( )</a></li><li><span class="item-toggle">◢</span><a href="#sec-agents" title="Agents"><span class="secnum">8.7</span> Agents</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-agentsignifier" title="AgentSignifier ( )"><span class="secnum">8.7.1</span> AgentSignifier ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-agentcansuspend" title="AgentCanSuspend ( )"><span class="secnum">8.7.2</span> AgentCanSuspend ( )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-agent-clusters" title="Agent Clusters"><span class="secnum">8.8</span> Agent Clusters</a></li><li><span class="item-toggle-none"></span><a href="#sec-forward-progress" title="Forward Progress"><span class="secnum">8.9</span> Forward Progress</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-ordinary-and-exotic-objects-behaviours" title="Ordinary and Exotic Objects Behaviours"><span class="secnum">9</span> Ordinary and Exotic Objects Behaviours</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-ordinary-object-internal-methods-and-internal-slots" title="Ordinary Object Internal Methods and Internal Slots"><span class="secnum">9.1</span> Ordinary Object Internal Methods and Internal Slots</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-ordinary-object-internal-methods-and-internal-slots-getprototypeof" title="[[GetPrototypeOf]] ( )"><span class="secnum">9.1.1</span> [[GetPrototypeOf]] ( )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-ordinarygetprototypeof" title="OrdinaryGetPrototypeOf ( O )"><span class="secnum">9.1.1.1</span> OrdinaryGetPrototypeOf ( <var>O</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-ordinary-object-internal-methods-and-internal-slots-setprototypeof-v" title="[[SetPrototypeOf]] ( V )"><span class="secnum">9.1.2</span> [[SetPrototypeOf]] ( <var>V</var> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-ordinarysetprototypeof" title="OrdinarySetPrototypeOf ( O, V )"><span class="secnum">9.1.2.1</span> OrdinarySetPrototypeOf ( <var>O</var>, <var>V</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-ordinary-object-internal-methods-and-internal-slots-isextensible" title="[[IsExtensible]] ( )"><span class="secnum">9.1.3</span> [[IsExtensible]] ( )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-ordinaryisextensible" title="OrdinaryIsExtensible ( O )"><span class="secnum">9.1.3.1</span> OrdinaryIsExtensible ( <var>O</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-ordinary-object-internal-methods-and-internal-slots-preventextensions" title="[[PreventExtensions]] ( )"><span class="secnum">9.1.4</span> [[PreventExtensions]] ( )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-ordinarypreventextensions" title="OrdinaryPreventExtensions ( O )"><span class="secnum">9.1.4.1</span> OrdinaryPreventExtensions ( <var>O</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-ordinary-object-internal-methods-and-internal-slots-getownproperty-p" title="[[GetOwnProperty]] ( P )"><span class="secnum">9.1.5</span> [[GetOwnProperty]] ( <var>P</var> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-ordinarygetownproperty" title="OrdinaryGetOwnProperty ( O, P )"><span class="secnum">9.1.5.1</span> OrdinaryGetOwnProperty ( <var>O</var>, <var>P</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-ordinary-object-internal-methods-and-internal-slots-defineownproperty-p-desc" title="[[DefineOwnProperty]] ( P, Desc )"><span class="secnum">9.1.6</span> [[DefineOwnProperty]] ( <var>P</var>, <var>Desc</var> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-ordinarydefineownproperty" title="OrdinaryDefineOwnProperty ( O, P, Desc )"><span class="secnum">9.1.6.1</span> OrdinaryDefineOwnProperty ( <var>O</var>, <var>P</var>, <var>Desc</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-iscompatiblepropertydescriptor" title="IsCompatiblePropertyDescriptor ( Extensible, Desc, Current )"><span class="secnum">9.1.6.2</span> IsCompatiblePropertyDescriptor ( <var>Extensible</var>, <var>Desc</var>, <var>Current</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-validateandapplypropertydescriptor" title="ValidateAndApplyPropertyDescriptor ( O, P, extensible, Desc, current )"><span class="secnum">9.1.6.3</span> ValidateAndApplyPropertyDescriptor ( <var>O</var>, <var>P</var>, <var>extensible</var>, <var>Desc</var>, <var>current</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-ordinary-object-internal-methods-and-internal-slots-hasproperty-p" title="[[HasProperty]] ( P )"><span class="secnum">9.1.7</span> [[HasProperty]] ( <var>P</var> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-ordinaryhasproperty" title="OrdinaryHasProperty ( O, P )"><span class="secnum">9.1.7.1</span> OrdinaryHasProperty ( <var>O</var>, <var>P</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-ordinary-object-internal-methods-and-internal-slots-get-p-receiver" title="[[Get]] ( P, Receiver )"><span class="secnum">9.1.8</span> [[Get]] ( <var>P</var>, <var>Receiver</var> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-ordinaryget" title="OrdinaryGet ( O, P, Receiver )"><span class="secnum">9.1.8.1</span> OrdinaryGet ( <var>O</var>, <var>P</var>, <var>Receiver</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-ordinary-object-internal-methods-and-internal-slots-set-p-v-receiver" title="[[Set]] ( P, V, Receiver )"><span class="secnum">9.1.9</span> [[Set]] ( <var>P</var>, <var>V</var>, <var>Receiver</var> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-ordinaryset" title="OrdinarySet ( O, P, V, Receiver )"><span class="secnum">9.1.9.1</span> OrdinarySet ( <var>O</var>, <var>P</var>, <var>V</var>, <var>Receiver</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-ordinarysetwithowndescriptor" title="OrdinarySetWithOwnDescriptor ( O, P, V, Receiver, ownDesc )"><span class="secnum">9.1.9.2</span> OrdinarySetWithOwnDescriptor ( <var>O</var>, <var>P</var>, <var>V</var>, <var>Receiver</var>, <var>ownDesc</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-ordinary-object-internal-methods-and-internal-slots-delete-p" title="[[Delete]] ( P )"><span class="secnum">9.1.10</span> [[Delete]] ( <var>P</var> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-ordinarydelete" title="OrdinaryDelete ( O, P )"><span class="secnum">9.1.10.1</span> OrdinaryDelete ( <var>O</var>, <var>P</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-ordinary-object-internal-methods-and-internal-slots-ownpropertykeys" title="[[OwnPropertyKeys]] ( )"><span class="secnum">9.1.11</span> [[OwnPropertyKeys]] ( )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-ordinaryownpropertykeys" title="OrdinaryOwnPropertyKeys ( O )"><span class="secnum">9.1.11.1</span> OrdinaryOwnPropertyKeys ( <var>O</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-objectcreate" title="ObjectCreate ( proto [ , internalSlotsList ] )"><span class="secnum">9.1.12</span> ObjectCreate ( <var>proto</var> [ , <var>internalSlotsList</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-ordinarycreatefromconstructor" title="OrdinaryCreateFromConstructor ( constructor, intrinsicDefaultProto [ , internalSlotsList ] )"><span class="secnum">9.1.13</span> OrdinaryCreateFromConstructor ( <var>constructor</var>, <var>intrinsicDefaultProto</var> [ , <var>internalSlotsList</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-getprototypefromconstructor" title="GetPrototypeFromConstructor ( constructor, intrinsicDefaultProto )"><span class="secnum">9.1.14</span> GetPrototypeFromConstructor ( <var>constructor</var>, <var>intrinsicDefaultProto</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-ecmascript-function-objects" title="ECMAScript Function Objects"><span class="secnum">9.2</span> ECMAScript Function Objects</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-ecmascript-function-objects-call-thisargument-argumentslist" title="[[Call]] ( thisArgument, argumentsList )"><span class="secnum">9.2.1</span> [[Call]] ( <var>thisArgument</var>, <var>argumentsList</var> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-prepareforordinarycall" title="PrepareForOrdinaryCall ( F, newTarget )"><span class="secnum">9.2.1.1</span> PrepareForOrdinaryCall ( <var>F</var>, <var>newTarget</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-ordinarycallbindthis" title="OrdinaryCallBindThis ( F, calleeContext, thisArgument )"><span class="secnum">9.2.1.2</span> OrdinaryCallBindThis ( <var>F</var>, <var>calleeContext</var>, <var>thisArgument</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-ordinarycallevaluatebody" title="OrdinaryCallEvaluateBody ( F, argumentsList )"><span class="secnum">9.2.1.3</span> OrdinaryCallEvaluateBody ( <var>F</var>, <var>argumentsList</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-ecmascript-function-objects-construct-argumentslist-newtarget" title="[[Construct]] ( argumentsList, newTarget )"><span class="secnum">9.2.2</span> [[Construct]] ( <var>argumentsList</var>, <var>newTarget</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-functionallocate" title="FunctionAllocate ( functionPrototype, strict, functionKind )"><span class="secnum">9.2.3</span> FunctionAllocate ( <var>functionPrototype</var>, <var>strict</var>, <var>functionKind</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-functioninitialize" title="FunctionInitialize ( F, kind, ParameterList, Body, Scope )"><span class="secnum">9.2.4</span> FunctionInitialize ( <var>F</var>, <var>kind</var>, <var>ParameterList</var>, <var>Body</var>, <var>Scope</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-functioncreate" title="FunctionCreate ( kind, ParameterList, Body, Scope, Strict [ , prototype ] )"><span class="secnum">9.2.5</span> FunctionCreate ( <var>kind</var>, <var>ParameterList</var>, <var>Body</var>, <var>Scope</var>, <var>Strict</var> [ , <var>prototype</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-generatorfunctioncreate" title="GeneratorFunctionCreate ( kind, ParameterList, Body, Scope, Strict )"><span class="secnum">9.2.6</span> GeneratorFunctionCreate ( <var>kind</var>, <var>ParameterList</var>, <var>Body</var>, <var>Scope</var>, <var>Strict</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-asyncgeneratorfunctioncreate" title="AsyncGeneratorFunctionCreate ( kind, ParameterList, Body, Scope, Strict )"><span class="secnum">9.2.7</span> AsyncGeneratorFunctionCreate ( <var>kind</var>, <var>ParameterList</var>, <var>Body</var>, <var>Scope</var>, <var>Strict</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-functions-abstract-operations-async-function-create" title="AsyncFunctionCreate ( kind, parameters, body, Scope, Strict )"><span class="secnum">9.2.8</span> AsyncFunctionCreate ( <var>kind</var>, <var>parameters</var>, <var>body</var>, <var>Scope</var>, <var>Strict</var> )</a></li><li><span class="item-toggle">◢</span><a href="#sec-addrestrictedfunctionproperties" title="AddRestrictedFunctionProperties ( F, realm )"><span class="secnum">9.2.9</span> AddRestrictedFunctionProperties ( <var>F</var>, <var>realm</var> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-%throwtypeerror%" title="%ThrowTypeError% ( )"><span class="secnum">9.2.9.1</span> %ThrowTypeError% ( )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-makeconstructor" title="MakeConstructor ( F [ , writablePrototype [ , prototype ] ] )"><span class="secnum">9.2.10</span> MakeConstructor ( <var>F</var> [ , <var>writablePrototype</var> [ , <var>prototype</var> ] ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-makeclassconstructor" title="MakeClassConstructor ( F )"><span class="secnum">9.2.11</span> MakeClassConstructor ( <var>F</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-makemethod" title="MakeMethod ( F, homeObject )"><span class="secnum">9.2.12</span> MakeMethod ( <var>F</var>, <var>homeObject</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-setfunctionname" title="SetFunctionName ( F, name [ , prefix ] )"><span class="secnum">9.2.13</span> SetFunctionName ( <var>F</var>, <var>name</var> [ , <var>prefix</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-setfunctionlength" title="SetFunctionLength ( F, length )"><span class="secnum">9.2.14</span> SetFunctionLength ( <var>F</var>, <var>length</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-functiondeclarationinstantiation" title="FunctionDeclarationInstantiation ( func, argumentsList )"><span class="secnum">9.2.15</span> FunctionDeclarationInstantiation ( <var>func</var>, <var>argumentsList</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-built-in-function-objects" title="Built-in Function Objects"><span class="secnum">9.3</span> Built-in Function Objects</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-built-in-function-objects-call-thisargument-argumentslist" title="[[Call]] ( thisArgument, argumentsList )"><span class="secnum">9.3.1</span> [[Call]] ( <var>thisArgument</var>, <var>argumentsList</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-built-in-function-objects-construct-argumentslist-newtarget" title="[[Construct]] ( argumentsList, newTarget )"><span class="secnum">9.3.2</span> [[Construct]] ( <var>argumentsList</var>, <var>newTarget</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-createbuiltinfunction" title="CreateBuiltinFunction ( steps, internalSlotsList [ , realm [ , prototype ] ] )"><span class="secnum">9.3.3</span> CreateBuiltinFunction ( <var>steps</var>, <var>internalSlotsList</var> [ , <var>realm</var> [ , <var>prototype</var> ] ] )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-built-in-exotic-object-internal-methods-and-slots" title="Built-in Exotic Object Internal Methods and Slots"><span class="secnum">9.4</span> Built-in Exotic Object Internal Methods and Slots</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-bound-function-exotic-objects" title="Bound Function Exotic Objects"><span class="secnum">9.4.1</span> Bound Function Exotic Objects</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-bound-function-exotic-objects-call-thisargument-argumentslist" title="[[Call]] ( thisArgument, argumentsList )"><span class="secnum">9.4.1.1</span> [[Call]] ( <var>thisArgument</var>, <var>argumentsList</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-bound-function-exotic-objects-construct-argumentslist-newtarget" title="[[Construct]] ( argumentsList, newTarget )"><span class="secnum">9.4.1.2</span> [[Construct]] ( <var>argumentsList</var>, <var>newTarget</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-boundfunctioncreate" title="BoundFunctionCreate ( targetFunction, boundThis, boundArgs )"><span class="secnum">9.4.1.3</span> BoundFunctionCreate ( <var>targetFunction</var>, <var>boundThis</var>, <var>boundArgs</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-array-exotic-objects" title="Array Exotic Objects"><span class="secnum">9.4.2</span> Array Exotic Objects</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-array-exotic-objects-defineownproperty-p-desc" title="[[DefineOwnProperty]] ( P, Desc )"><span class="secnum">9.4.2.1</span> [[DefineOwnProperty]] ( <var>P</var>, <var>Desc</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-arraycreate" title="ArrayCreate ( length [ , proto ] )"><span class="secnum">9.4.2.2</span> ArrayCreate ( <var>length</var> [ , <var>proto</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-arrayspeciescreate" title="ArraySpeciesCreate ( originalArray, length )"><span class="secnum">9.4.2.3</span> ArraySpeciesCreate ( <var>originalArray</var>, <var>length</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-arraysetlength" title="ArraySetLength ( A, Desc )"><span class="secnum">9.4.2.4</span> ArraySetLength ( <var>A</var>, <var>Desc</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-string-exotic-objects" title="String Exotic Objects"><span class="secnum">9.4.3</span> String Exotic Objects</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-string-exotic-objects-getownproperty-p" title="[[GetOwnProperty]] ( P )"><span class="secnum">9.4.3.1</span> [[GetOwnProperty]] ( <var>P</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string-exotic-objects-defineownproperty-p-desc" title="[[DefineOwnProperty]] ( P, Desc )"><span class="secnum">9.4.3.2</span> [[DefineOwnProperty]] ( <var>P</var>, <var>Desc</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string-exotic-objects-ownpropertykeys" title="[[OwnPropertyKeys]] ( )"><span class="secnum">9.4.3.3</span> [[OwnPropertyKeys]] ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-stringcreate" title="StringCreate ( value, prototype )"><span class="secnum">9.4.3.4</span> StringCreate ( <var>value</var>, <var>prototype</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-stringgetownproperty" title="StringGetOwnProperty ( S, P )"><span class="secnum">9.4.3.5</span> StringGetOwnProperty ( <var>S</var>, <var>P</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-arguments-exotic-objects" title="Arguments Exotic Objects"><span class="secnum">9.4.4</span> Arguments Exotic Objects</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-arguments-exotic-objects-getownproperty-p" title="[[GetOwnProperty]] ( P )"><span class="secnum">9.4.4.1</span> [[GetOwnProperty]] ( <var>P</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-arguments-exotic-objects-defineownproperty-p-desc" title="[[DefineOwnProperty]] ( P, Desc )"><span class="secnum">9.4.4.2</span> [[DefineOwnProperty]] ( <var>P</var>, <var>Desc</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-arguments-exotic-objects-get-p-receiver" title="[[Get]] ( P, Receiver )"><span class="secnum">9.4.4.3</span> [[Get]] ( <var>P</var>, <var>Receiver</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-arguments-exotic-objects-set-p-v-receiver" title="[[Set]] ( P, V, Receiver )"><span class="secnum">9.4.4.4</span> [[Set]] ( <var>P</var>, <var>V</var>, <var>Receiver</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-arguments-exotic-objects-delete-p" title="[[Delete]] ( P )"><span class="secnum">9.4.4.5</span> [[Delete]] ( <var>P</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-createunmappedargumentsobject" title="CreateUnmappedArgumentsObject ( argumentsList )"><span class="secnum">9.4.4.6</span> CreateUnmappedArgumentsObject ( <var>argumentsList</var> )</a></li><li><span class="item-toggle">◢</span><a href="#sec-createmappedargumentsobject" title="CreateMappedArgumentsObject ( func, formals, argumentsList, env )"><span class="secnum">9.4.4.7</span> CreateMappedArgumentsObject ( <var>func</var>, <var>formals</var>, <var>argumentsList</var>, <var>env</var> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-makearggetter" title="MakeArgGetter ( name, env )"><span class="secnum">9.4.4.7.1</span> MakeArgGetter ( <var>name</var>, <var>env</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-makeargsetter" title="MakeArgSetter ( name, env )"><span class="secnum">9.4.4.7.2</span> MakeArgSetter ( <var>name</var>, <var>env</var> )</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-integer-indexed-exotic-objects" title="Integer-Indexed Exotic Objects"><span class="secnum">9.4.5</span> Integer-Indexed Exotic Objects</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-integer-indexed-exotic-objects-getownproperty-p" title="[[GetOwnProperty]] ( P )"><span class="secnum">9.4.5.1</span> [[GetOwnProperty]] ( <var>P</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-integer-indexed-exotic-objects-hasproperty-p" title="[[HasProperty]] ( P )"><span class="secnum">9.4.5.2</span> [[HasProperty]] ( <var>P</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-integer-indexed-exotic-objects-defineownproperty-p-desc" title="[[DefineOwnProperty]] ( P, Desc )"><span class="secnum">9.4.5.3</span> [[DefineOwnProperty]] ( <var>P</var>, <var>Desc</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-integer-indexed-exotic-objects-get-p-receiver" title="[[Get]] ( P, Receiver )"><span class="secnum">9.4.5.4</span> [[Get]] ( <var>P</var>, <var>Receiver</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-integer-indexed-exotic-objects-set-p-v-receiver" title="[[Set]] ( P, V, Receiver )"><span class="secnum">9.4.5.5</span> [[Set]] ( <var>P</var>, <var>V</var>, <var>Receiver</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-integer-indexed-exotic-objects-ownpropertykeys" title="[[OwnPropertyKeys]] ( )"><span class="secnum">9.4.5.6</span> [[OwnPropertyKeys]] ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-integerindexedobjectcreate" title="IntegerIndexedObjectCreate ( prototype, internalSlotsList )"><span class="secnum">9.4.5.7</span> IntegerIndexedObjectCreate ( <var>prototype</var>, <var>internalSlotsList</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-integerindexedelementget" title="IntegerIndexedElementGet ( O, index )"><span class="secnum">9.4.5.8</span> IntegerIndexedElementGet ( <var>O</var>, <var>index</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-integerindexedelementset" title="IntegerIndexedElementSet ( O, index, value )"><span class="secnum">9.4.5.9</span> IntegerIndexedElementSet ( <var>O</var>, <var>index</var>, <var>value</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-module-namespace-exotic-objects" title="Module Namespace Exotic Objects"><span class="secnum">9.4.6</span> Module Namespace Exotic Objects</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-module-namespace-exotic-objects-setprototypeof-v" title="[[SetPrototypeOf]] ( V )"><span class="secnum">9.4.6.1</span> [[SetPrototypeOf]] ( <var>V</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-module-namespace-exotic-objects-isextensible" title="[[IsExtensible]] ( )"><span class="secnum">9.4.6.2</span> [[IsExtensible]] ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-module-namespace-exotic-objects-preventextensions" title="[[PreventExtensions]] ( )"><span class="secnum">9.4.6.3</span> [[PreventExtensions]] ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-module-namespace-exotic-objects-getownproperty-p" title="[[GetOwnProperty]] ( P )"><span class="secnum">9.4.6.4</span> [[GetOwnProperty]] ( <var>P</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-module-namespace-exotic-objects-defineownproperty-p-desc" title="[[DefineOwnProperty]] ( P, Desc )"><span class="secnum">9.4.6.5</span> [[DefineOwnProperty]] ( <var>P</var>, <var>Desc</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-module-namespace-exotic-objects-hasproperty-p" title="[[HasProperty]] ( P )"><span class="secnum">9.4.6.6</span> [[HasProperty]] ( <var>P</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-module-namespace-exotic-objects-get-p-receiver" title="[[Get]] ( P, Receiver )"><span class="secnum">9.4.6.7</span> [[Get]] ( <var>P</var>, <var>Receiver</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-module-namespace-exotic-objects-set-p-v-receiver" title="[[Set]] ( P, V, Receiver )"><span class="secnum">9.4.6.8</span> [[Set]] ( <var>P</var>, <var>V</var>, <var>Receiver</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-module-namespace-exotic-objects-delete-p" title="[[Delete]] ( P )"><span class="secnum">9.4.6.9</span> [[Delete]] ( <var>P</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-module-namespace-exotic-objects-ownpropertykeys" title="[[OwnPropertyKeys]] ( )"><span class="secnum">9.4.6.10</span> [[OwnPropertyKeys]] ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-modulenamespacecreate" title="ModuleNamespaceCreate ( module, exports )"><span class="secnum">9.4.6.11</span> ModuleNamespaceCreate ( <var>module</var>, <var>exports</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-immutable-prototype-exotic-objects" title="Immutable Prototype Exotic Objects"><span class="secnum">9.4.7</span> Immutable Prototype Exotic Objects</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-immutable-prototype-exotic-objects-setprototypeof-v" title="[[SetPrototypeOf]] ( V )"><span class="secnum">9.4.7.1</span> [[SetPrototypeOf]] ( <var>V</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-set-immutable-prototype" title="SetImmutablePrototype ( O, V )"><span class="secnum">9.4.7.2</span> SetImmutablePrototype ( <var>O</var>, <var>V</var> )</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-proxy-object-internal-methods-and-internal-slots" title="Proxy Object Internal Methods and Internal Slots"><span class="secnum">9.5</span> Proxy Object Internal Methods and Internal Slots</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-proxy-object-internal-methods-and-internal-slots-getprototypeof" title="[[GetPrototypeOf]] ( )"><span class="secnum">9.5.1</span> [[GetPrototypeOf]] ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-proxy-object-internal-methods-and-internal-slots-setprototypeof-v" title="[[SetPrototypeOf]] ( V )"><span class="secnum">9.5.2</span> [[SetPrototypeOf]] ( <var>V</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-proxy-object-internal-methods-and-internal-slots-isextensible" title="[[IsExtensible]] ( )"><span class="secnum">9.5.3</span> [[IsExtensible]] ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-proxy-object-internal-methods-and-internal-slots-preventextensions" title="[[PreventExtensions]] ( )"><span class="secnum">9.5.4</span> [[PreventExtensions]] ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-proxy-object-internal-methods-and-internal-slots-getownproperty-p" title="[[GetOwnProperty]] ( P )"><span class="secnum">9.5.5</span> [[GetOwnProperty]] ( <var>P</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-proxy-object-internal-methods-and-internal-slots-defineownproperty-p-desc" title="[[DefineOwnProperty]] ( P, Desc )"><span class="secnum">9.5.6</span> [[DefineOwnProperty]] ( <var>P</var>, <var>Desc</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-proxy-object-internal-methods-and-internal-slots-hasproperty-p" title="[[HasProperty]] ( P )"><span class="secnum">9.5.7</span> [[HasProperty]] ( <var>P</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-proxy-object-internal-methods-and-internal-slots-get-p-receiver" title="[[Get]] ( P, Receiver )"><span class="secnum">9.5.8</span> [[Get]] ( <var>P</var>, <var>Receiver</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-proxy-object-internal-methods-and-internal-slots-set-p-v-receiver" title="[[Set]] ( P, V, Receiver )"><span class="secnum">9.5.9</span> [[Set]] ( <var>P</var>, <var>V</var>, <var>Receiver</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-proxy-object-internal-methods-and-internal-slots-delete-p" title="[[Delete]] ( P )"><span class="secnum">9.5.10</span> [[Delete]] ( <var>P</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-proxy-object-internal-methods-and-internal-slots-ownpropertykeys" title="[[OwnPropertyKeys]] ( )"><span class="secnum">9.5.11</span> [[OwnPropertyKeys]] ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-proxy-object-internal-methods-and-internal-slots-call-thisargument-argumentslist" title="[[Call]] ( thisArgument, argumentsList )"><span class="secnum">9.5.12</span> [[Call]] ( <var>thisArgument</var>, <var>argumentsList</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-proxy-object-internal-methods-and-internal-slots-construct-argumentslist-newtarget" title="[[Construct]] ( argumentsList, newTarget )"><span class="secnum">9.5.13</span> [[Construct]] ( <var>argumentsList</var>, <var>newTarget</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-proxycreate" title="ProxyCreate ( target, handler )"><span class="secnum">9.5.14</span> ProxyCreate ( <var>target</var>, <var>handler</var> )</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-ecmascript-language-source-code" title="ECMAScript Language: Source Code"><span class="secnum">10</span> ECMAScript Language: Source Code</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-source-text" title="Source Text"><span class="secnum">10.1</span> Source Text</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-utf16encoding" title="Static Semantics: UTF16Encoding ( cp )"><span class="secnum">10.1.1</span> SS: UTF16Encoding ( <var>cp</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-utf16decode" title="Static Semantics: UTF16Decode ( lead, trail )"><span class="secnum">10.1.2</span> SS: UTF16Decode ( <var>lead</var>, <var>trail</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-types-of-source-code" title="Types of Source Code"><span class="secnum">10.2</span> Types of Source Code</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-strict-mode-code" title="Strict Mode Code"><span class="secnum">10.2.1</span> Strict Mode Code</a></li><li><span class="item-toggle-none"></span><a href="#sec-non-ecmascript-functions" title="Non-ECMAScript Functions"><span class="secnum">10.2.2</span> Non-ECMAScript Functions</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-ecmascript-language-lexical-grammar" title="ECMAScript Language: Lexical Grammar"><span class="secnum">11</span> ECMAScript Language: Lexical Grammar</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-unicode-format-control-characters" title="Unicode Format-Control Characters"><span class="secnum">11.1</span> Unicode Format-Control Characters</a></li><li><span class="item-toggle-none"></span><a href="#sec-white-space" title="White Space"><span class="secnum">11.2</span> White Space</a></li><li><span class="item-toggle-none"></span><a href="#sec-line-terminators" title="Line Terminators"><span class="secnum">11.3</span> Line Terminators</a></li><li><span class="item-toggle-none"></span><a href="#sec-comments" title="Comments"><span class="secnum">11.4</span> Comments</a></li><li><span class="item-toggle-none"></span><a href="#sec-tokens" title="Tokens"><span class="secnum">11.5</span> Tokens</a></li><li><span class="item-toggle">◢</span><a href="#sec-names-and-keywords" title="Names and Keywords"><span class="secnum">11.6</span> Names and Keywords</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-identifier-names" title="Identifier Names"><span class="secnum">11.6.1</span> Identifier Names</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-identifier-names-static-semantics-early-errors" title="Static Semantics: Early Errors"><span class="secnum">11.6.1.1</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-identifier-names-static-semantics-stringvalue" title="Static Semantics: StringValue"><span class="secnum">11.6.1.2</span> SS: StringValue</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-reserved-words" title="Reserved Words"><span class="secnum">11.6.2</span> Reserved Words</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-keywords" title="Keywords"><span class="secnum">11.6.2.1</span> Keywords</a></li><li><span class="item-toggle-none"></span><a href="#sec-future-reserved-words" title="Future Reserved Words"><span class="secnum">11.6.2.2</span> Future Reserved Words</a></li></ol></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-punctuators" title="Punctuators"><span class="secnum">11.7</span> Punctuators</a></li><li><span class="item-toggle">◢</span><a href="#sec-ecmascript-language-lexical-grammar-literals" title="Literals"><span class="secnum">11.8</span> Literals</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-null-literals" title="Null Literals"><span class="secnum">11.8.1</span> Null Literals</a></li><li><span class="item-toggle-none"></span><a href="#sec-boolean-literals" title="Boolean Literals"><span class="secnum">11.8.2</span> Boolean Literals</a></li><li><span class="item-toggle">◢</span><a href="#sec-literals-numeric-literals" title="Numeric Literals"><span class="secnum">11.8.3</span> Numeric Literals</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-static-semantics-mv" title="Static Semantics: MV"><span class="secnum">11.8.3.1</span> SS: MV</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-literals-string-literals" title="String Literals"><span class="secnum">11.8.4</span> String Literals</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-string-literals-static-semantics-stringvalue" title="Static Semantics: StringValue"><span class="secnum">11.8.4.1</span> SS: StringValue</a></li><li><span class="item-toggle-none"></span><a href="#sec-static-semantics-sv" title="Static Semantics: SV"><span class="secnum">11.8.4.2</span> SS: SV</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-literals-regular-expression-literals" title="Regular Expression Literals"><span class="secnum">11.8.5</span> Regular Expression Literals</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-literals-regular-expression-literals-static-semantics-early-errors" title="Static Semantics: Early Errors"><span class="secnum">11.8.5.1</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-static-semantics-bodytext" title="Static Semantics: BodyText"><span class="secnum">11.8.5.2</span> SS: BodyText</a></li><li><span class="item-toggle-none"></span><a href="#sec-static-semantics-flagtext" title="Static Semantics: FlagText"><span class="secnum">11.8.5.3</span> SS: FlagText</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-template-literal-lexical-components" title="Template Literal Lexical Components"><span class="secnum">11.8.6</span> Template Literal Lexical Components</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-static-semantics-tv-and-trv" title="Static Semantics: TV and TRV"><span class="secnum">11.8.6.1</span> SS: TV and TRV</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-automatic-semicolon-insertion" title="Automatic Semicolon Insertion"><span class="secnum">11.9</span> Automatic Semicolon Insertion</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-rules-of-automatic-semicolon-insertion" title="Rules of Automatic Semicolon Insertion"><span class="secnum">11.9.1</span> Rules of Automatic Semicolon Insertion</a></li><li><span class="item-toggle-none"></span><a href="#sec-examples-of-automatic-semicolon-insertion" title="Examples of Automatic Semicolon Insertion"><span class="secnum">11.9.2</span> Examples of Automatic Semicolon Insertion</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-ecmascript-language-expressions" title="ECMAScript Language: Expressions"><span class="secnum">12</span> ECMAScript Language: Expressions</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-identifiers" title="Identifiers"><span class="secnum">12.1</span> Identifiers</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-identifiers-static-semantics-early-errors" title="Static Semantics: Early Errors"><span class="secnum">12.1.1</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-identifiers-static-semantics-boundnames" title="Static Semantics: BoundNames"><span class="secnum">12.1.2</span> SS: BoundNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-identifiers-static-semantics-assignmenttargettype" title="Static Semantics: AssignmentTargetType"><span class="secnum">12.1.3</span> SS: AssignmentTargetType</a></li><li><span class="item-toggle-none"></span><a href="#sec-identifiers-static-semantics-stringvalue" title="Static Semantics: StringValue"><span class="secnum">12.1.4</span> SS: StringValue</a></li><li><span class="item-toggle">◢</span><a href="#sec-identifiers-runtime-semantics-bindinginitialization" title="Runtime Semantics: BindingInitialization"><span class="secnum">12.1.5</span> RS: BindingInitialization</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-initializeboundname" title="Runtime Semantics: InitializeBoundName ( name, value, environment )"><span class="secnum">12.1.5.1</span> RS: InitializeBoundName ( <var>name</var>, <var>value</var>, <var>environment</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-identifiers-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.1.6</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-primary-expression" title="Primary Expression"><span class="secnum">12.2</span> Primary Expression</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-primary-expression-semantics" title="Semantics"><span class="secnum">12.2.1</span> Semantics</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-static-semantics-coveredparenthesizedexpression" title="Static Semantics: CoveredParenthesizedExpression"><span class="secnum">12.2.1.1</span> SS: CoveredParenthesizedExpression</a></li><li><span class="item-toggle-none"></span><a href="#sec-semantics-static-semantics-hasname" title="Static Semantics: HasName"><span class="secnum">12.2.1.2</span> SS: HasName</a></li><li><span class="item-toggle-none"></span><a href="#sec-semantics-static-semantics-isfunctiondefinition" title="Static Semantics: IsFunctionDefinition"><span class="secnum">12.2.1.3</span> SS: IsFunctionDefinition</a></li><li><span class="item-toggle-none"></span><a href="#sec-semantics-static-semantics-isidentifierref" title="Static Semantics: IsIdentifierRef"><span class="secnum">12.2.1.4</span> SS: IsIdentifierRef</a></li><li><span class="item-toggle-none"></span><a href="#sec-semantics-static-semantics-assignmenttargettype" title="Static Semantics: AssignmentTargetType"><span class="secnum">12.2.1.5</span> SS: AssignmentTargetType</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-this-keyword" title="The this Keyword"><span class="secnum">12.2.2</span> The <code>this</code> Keyword</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-this-keyword-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.2.2.1</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-identifier-reference" title="Identifier Reference"><span class="secnum">12.2.3</span> Identifier Reference</a></li><li><span class="item-toggle">◢</span><a href="#sec-primary-expression-literals" title="Literals"><span class="secnum">12.2.4</span> Literals</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-literals-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.2.4.1</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-array-initializer" title="Array Initializer"><span class="secnum">12.2.5</span> Array Initializer</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-static-semantics-elisionwidth" title="Static Semantics: ElisionWidth"><span class="secnum">12.2.5.1</span> SS: ElisionWidth</a></li><li><span class="item-toggle-none"></span><a href="#sec-runtime-semantics-arrayaccumulation" title="Runtime Semantics: ArrayAccumulation"><span class="secnum">12.2.5.2</span> RS: ArrayAccumulation</a></li><li><span class="item-toggle-none"></span><a href="#sec-array-initializer-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.2.5.3</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-object-initializer" title="Object Initializer"><span class="secnum">12.2.6</span> Object Initializer</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-object-initializer-static-semantics-early-errors" title="Static Semantics: Early Errors"><span class="secnum">12.2.6.1</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-object-initializer-static-semantics-computedpropertycontains" title="Static Semantics: ComputedPropertyContains"><span class="secnum">12.2.6.2</span> SS: ComputedPropertyContains</a></li><li><span class="item-toggle-none"></span><a href="#sec-object-initializer-static-semantics-contains" title="Static Semantics: Contains"><span class="secnum">12.2.6.3</span> SS: Contains</a></li><li><span class="item-toggle-none"></span><a href="#sec-static-semantics-iscomputedpropertykey" title="Static Semantics: IsComputedPropertyKey"><span class="secnum">12.2.6.4</span> SS: IsComputedPropertyKey</a></li><li><span class="item-toggle-none"></span><a href="#sec-object-initializer-static-semantics-propname" title="Static Semantics: PropName"><span class="secnum">12.2.6.5</span> SS: PropName</a></li><li><span class="item-toggle-none"></span><a href="#sec-static-semantics-propertynamelist" title="Static Semantics: PropertyNameList"><span class="secnum">12.2.6.6</span> SS: PropertyNameList</a></li><li><span class="item-toggle-none"></span><a href="#sec-object-initializer-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.2.6.7</span> RS: Evaluation</a></li><li><span class="item-toggle-none"></span><a href="#sec-object-initializer-runtime-semantics-propertydefinitionevaluation" title="Runtime Semantics: PropertyDefinitionEvaluation"><span class="secnum">12.2.6.8</span> RS: PropertyDefinitionEvaluation</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-function-defining-expressions" title="Function Defining Expressions"><span class="secnum">12.2.7</span> Function Defining Expressions</a></li><li><span class="item-toggle">◢</span><a href="#sec-primary-expression-regular-expression-literals" title="Regular Expression Literals"><span class="secnum">12.2.8</span> Regular Expression Literals</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-primary-expression-regular-expression-literals-static-semantics-early-errors" title="Static Semantics: Early Errors"><span class="secnum">12.2.8.1</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-regular-expression-literals-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.2.8.2</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-template-literals" title="Template Literals"><span class="secnum">12.2.9</span> Template Literals</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-static-semantics-template-early-errors" title="Static Semantics: Early Errors"><span class="secnum">12.2.9.1</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-static-semantics-templatestrings" title="Static Semantics: TemplateStrings"><span class="secnum">12.2.9.2</span> SS: TemplateStrings</a></li><li><span class="item-toggle-none"></span><a href="#sec-template-literals-runtime-semantics-argumentlistevaluation" title="Runtime Semantics: ArgumentListEvaluation"><span class="secnum">12.2.9.3</span> RS: ArgumentListEvaluation</a></li><li><span class="item-toggle-none"></span><a href="#sec-gettemplateobject" title="Runtime Semantics: GetTemplateObject ( templateLiteral )"><span class="secnum">12.2.9.4</span> RS: GetTemplateObject ( <var>templateLiteral</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-runtime-semantics-substitutionevaluation" title="Runtime Semantics: SubstitutionEvaluation"><span class="secnum">12.2.9.5</span> RS: SubstitutionEvaluation</a></li><li><span class="item-toggle-none"></span><a href="#sec-template-literals-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.2.9.6</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-grouping-operator" title="The Grouping Operator"><span class="secnum">12.2.10</span> The Grouping Operator</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-grouping-operator-static-semantics-early-errors" title="Static Semantics: Early Errors"><span class="secnum">12.2.10.1</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-grouping-operator-static-semantics-isfunctiondefinition" title="Static Semantics: IsFunctionDefinition"><span class="secnum">12.2.10.2</span> SS: IsFunctionDefinition</a></li><li><span class="item-toggle-none"></span><a href="#sec-grouping-operator-static-semantics-assignmenttargettype" title="Static Semantics: AssignmentTargetType"><span class="secnum">12.2.10.3</span> SS: AssignmentTargetType</a></li><li><span class="item-toggle-none"></span><a href="#sec-grouping-operator-runtime-semantics-namedevaluation" title="Runtime Semantics: NamedEvaluation"><span class="secnum">12.2.10.4</span> RS: NamedEvaluation</a></li><li><span class="item-toggle-none"></span><a href="#sec-grouping-operator-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.2.10.5</span> RS: Evaluation</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-left-hand-side-expressions" title="Left-Hand-Side Expressions"><span class="secnum">12.3</span> Left-Hand-Side Expressions</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-static-semantics" title="Static Semantics"><span class="secnum">12.3.1</span> Static Semantics</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-left-hand-side-expressions-static-semantics-coveredcallexpression" title="Static Semantics: CoveredCallExpression"><span class="secnum">12.3.1.1</span> SS: CoveredCallExpression</a></li><li><span class="item-toggle-none"></span><a href="#sec-static-semantics-static-semantics-contains" title="Static Semantics: Contains"><span class="secnum">12.3.1.2</span> SS: Contains</a></li><li><span class="item-toggle-none"></span><a href="#sec-static-semantics-static-semantics-isfunctiondefinition" title="Static Semantics: IsFunctionDefinition"><span class="secnum">12.3.1.3</span> SS: IsFunctionDefinition</a></li><li><span class="item-toggle-none"></span><a href="#sec-static-semantics-static-semantics-isdestructuring" title="Static Semantics: IsDestructuring"><span class="secnum">12.3.1.4</span> SS: IsDestructuring</a></li><li><span class="item-toggle-none"></span><a href="#sec-static-semantics-static-semantics-isidentifierref" title="Static Semantics: IsIdentifierRef"><span class="secnum">12.3.1.5</span> SS: IsIdentifierRef</a></li><li><span class="item-toggle-none"></span><a href="#sec-static-semantics-static-semantics-assignmenttargettype" title="Static Semantics: AssignmentTargetType"><span class="secnum">12.3.1.6</span> SS: AssignmentTargetType</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-property-accessors" title="Property Accessors"><span class="secnum">12.3.2</span> Property Accessors</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-property-accessors-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.3.2.1</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-new-operator" title="The new Operator"><span class="secnum">12.3.3</span> The <code>new</code> Operator</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-new-operator-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.3.3.1</span> RS: Evaluation</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-evaluatenew" title="Runtime Semantics: EvaluateNew ( constructExpr, arguments )"><span class="secnum">12.3.3.1.1</span> RS: EvaluateNew ( <var>constructExpr</var>, <var>arguments</var> )</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-function-calls" title="Function Calls"><span class="secnum">12.3.4</span> Function Calls</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-function-calls-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.3.4.1</span> RS: Evaluation</a></li><li><span class="item-toggle-none"></span><a href="#sec-evaluatecall" title="Runtime Semantics: EvaluateCall ( func, ref, arguments, tailPosition )"><span class="secnum">12.3.4.2</span> RS: EvaluateCall ( <var>func</var>, <var>ref</var>, <var>arguments</var>, <var>tailPosition</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-super-keyword" title="The super Keyword"><span class="secnum">12.3.5</span> The <code>super</code> Keyword</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-super-keyword-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.3.5.1</span> RS: Evaluation</a></li><li><span class="item-toggle-none"></span><a href="#sec-getsuperconstructor" title="Runtime Semantics: GetSuperConstructor ( )"><span class="secnum">12.3.5.2</span> RS: GetSuperConstructor ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-makesuperpropertyreference" title="Runtime Semantics: MakeSuperPropertyReference ( actualThis, propertyKey, strict )"><span class="secnum">12.3.5.3</span> RS: MakeSuperPropertyReference ( <var>actualThis</var>, <var>propertyKey</var>, <var>strict</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-argument-lists" title="Argument Lists"><span class="secnum">12.3.6</span> Argument Lists</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-argument-lists-runtime-semantics-argumentlistevaluation" title="Runtime Semantics: ArgumentListEvaluation"><span class="secnum">12.3.6.1</span> RS: ArgumentListEvaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-tagged-templates" title="Tagged Templates"><span class="secnum">12.3.7</span> Tagged Templates</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-tagged-templates-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.3.7.1</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-meta-properties" title="Meta Properties"><span class="secnum">12.3.8</span> Meta Properties</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-meta-properties-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.3.8.1</span> RS: Evaluation</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-update-expressions" title="Update Expressions"><span class="secnum">12.4</span> Update Expressions</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-update-expressions-static-semantics-early-errors" title="Static Semantics: Early Errors"><span class="secnum">12.4.1</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-update-expressions-static-semantics-isfunctiondefinition" title="Static Semantics: IsFunctionDefinition"><span class="secnum">12.4.2</span> SS: IsFunctionDefinition</a></li><li><span class="item-toggle-none"></span><a href="#sec-update-expressions-static-semantics-assignmenttargettype" title="Static Semantics: AssignmentTargetType"><span class="secnum">12.4.3</span> SS: AssignmentTargetType</a></li><li><span class="item-toggle">◢</span><a href="#sec-postfix-increment-operator" title="Postfix Increment Operator"><span class="secnum">12.4.4</span> Postfix Increment Operator</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-postfix-increment-operator-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.4.4.1</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-postfix-decrement-operator" title="Postfix Decrement Operator"><span class="secnum">12.4.5</span> Postfix Decrement Operator</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-postfix-decrement-operator-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.4.5.1</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-prefix-increment-operator" title="Prefix Increment Operator"><span class="secnum">12.4.6</span> Prefix Increment Operator</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-prefix-increment-operator-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.4.6.1</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-prefix-decrement-operator" title="Prefix Decrement Operator"><span class="secnum">12.4.7</span> Prefix Decrement Operator</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-prefix-decrement-operator-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.4.7.1</span> RS: Evaluation</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-unary-operators" title="Unary Operators"><span class="secnum">12.5</span> Unary Operators</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-unary-operators-static-semantics-isfunctiondefinition" title="Static Semantics: IsFunctionDefinition"><span class="secnum">12.5.1</span> SS: IsFunctionDefinition</a></li><li><span class="item-toggle-none"></span><a href="#sec-unary-operators-static-semantics-assignmenttargettype" title="Static Semantics: AssignmentTargetType"><span class="secnum">12.5.2</span> SS: AssignmentTargetType</a></li><li><span class="item-toggle">◢</span><a href="#sec-delete-operator" title="The delete Operator"><span class="secnum">12.5.3</span> The <code>delete</code> Operator</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-delete-operator-static-semantics-early-errors" title="Static Semantics: Early Errors"><span class="secnum">12.5.3.1</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-delete-operator-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.5.3.2</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-void-operator" title="The void Operator"><span class="secnum">12.5.4</span> The <code>void</code> Operator</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-void-operator-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.5.4.1</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-typeof-operator" title="The typeof Operator"><span class="secnum">12.5.5</span> The <code>typeof</code> Operator</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-typeof-operator-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.5.5.1</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-unary-plus-operator" title="Unary + Operator"><span class="secnum">12.5.6</span> Unary <code>+</code> Operator</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-unary-plus-operator-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.5.6.1</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-unary-minus-operator" title="Unary - Operator"><span class="secnum">12.5.7</span> Unary <code>-</code> Operator</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-unary-minus-operator-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.5.7.1</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-bitwise-not-operator" title="Bitwise NOT Operator ( ~ )"><span class="secnum">12.5.8</span> Bitwise NOT Operator ( <code>~</code> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-bitwise-not-operator-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.5.8.1</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-logical-not-operator" title="Logical NOT Operator ( ! )"><span class="secnum">12.5.9</span> Logical NOT Operator ( <code>!</code> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-logical-not-operator-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.5.9.1</span> RS: Evaluation</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-exp-operator" title="Exponentiation Operator"><span class="secnum">12.6</span> Exponentiation Operator</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-exp-operator-static-semantics-isfunctiondefinition" title="Static Semantics: IsFunctionDefinition"><span class="secnum">12.6.1</span> SS: IsFunctionDefinition</a></li><li><span class="item-toggle-none"></span><a href="#sec-exp-operator-static-semantics-assignmenttargettype" title="Static Semantics: AssignmentTargetType"><span class="secnum">12.6.2</span> SS: AssignmentTargetType</a></li><li><span class="item-toggle-none"></span><a href="#sec-exp-operator-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.6.3</span> RS: Evaluation</a></li><li><span class="item-toggle-none"></span><a href="#sec-applying-the-exp-operator" title="Applying the ** Operator"><span class="secnum">12.6.4</span> Applying the <code>**</code> Operator</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-multiplicative-operators" title="Multiplicative Operators"><span class="secnum">12.7</span> Multiplicative Operators</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-multiplicative-operators-static-semantics-isfunctiondefinition" title="Static Semantics: IsFunctionDefinition"><span class="secnum">12.7.1</span> SS: IsFunctionDefinition</a></li><li><span class="item-toggle-none"></span><a href="#sec-multiplicative-operators-static-semantics-assignmenttargettype" title="Static Semantics: AssignmentTargetType"><span class="secnum">12.7.2</span> SS: AssignmentTargetType</a></li><li><span class="item-toggle">◢</span><a href="#sec-multiplicative-operators-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.7.3</span> RS: Evaluation</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-applying-the-mul-operator" title="Applying the * Operator"><span class="secnum">12.7.3.1</span> Applying the <code>*</code> Operator</a></li><li><span class="item-toggle-none"></span><a href="#sec-applying-the-div-operator" title="Applying the / Operator"><span class="secnum">12.7.3.2</span> Applying the <code>/</code> Operator</a></li><li><span class="item-toggle-none"></span><a href="#sec-applying-the-mod-operator" title="Applying the % Operator"><span class="secnum">12.7.3.3</span> Applying the <code>%</code> Operator</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-additive-operators" title="Additive Operators"><span class="secnum">12.8</span> Additive Operators</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-additive-operators-static-semantics-isfunctiondefinition" title="Static Semantics: IsFunctionDefinition"><span class="secnum">12.8.1</span> SS: IsFunctionDefinition</a></li><li><span class="item-toggle-none"></span><a href="#sec-additive-operators-static-semantics-assignmenttargettype" title="Static Semantics: AssignmentTargetType"><span class="secnum">12.8.2</span> SS: AssignmentTargetType</a></li><li><span class="item-toggle">◢</span><a href="#sec-addition-operator-plus" title="The Addition Operator ( + )"><span class="secnum">12.8.3</span> The Addition Operator ( <code>+</code> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-addition-operator-plus-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.8.3.1</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-subtraction-operator-minus" title="The Subtraction Operator ( - )"><span class="secnum">12.8.4</span> The Subtraction Operator ( <code>-</code> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-subtraction-operator-minus-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.8.4.1</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-applying-the-additive-operators-to-numbers" title="Applying the Additive Operators to Numbers"><span class="secnum">12.8.5</span> Applying the Additive Operators to Numbers</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-bitwise-shift-operators" title="Bitwise Shift Operators"><span class="secnum">12.9</span> Bitwise Shift Operators</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-bitwise-shift-operators-static-semantics-isfunctiondefinition" title="Static Semantics: IsFunctionDefinition"><span class="secnum">12.9.1</span> SS: IsFunctionDefinition</a></li><li><span class="item-toggle-none"></span><a href="#sec-bitwise-shift-operators-static-semantics-assignmenttargettype" title="Static Semantics: AssignmentTargetType"><span class="secnum">12.9.2</span> SS: AssignmentTargetType</a></li><li><span class="item-toggle">◢</span><a href="#sec-left-shift-operator" title="The Left Shift Operator ( &lt;&lt; )"><span class="secnum">12.9.3</span> The Left Shift Operator ( <code>&lt;&lt;</code> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-left-shift-operator-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.9.3.1</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-signed-right-shift-operator" title="The Signed Right Shift Operator ( &gt;&gt; )"><span class="secnum">12.9.4</span> The Signed Right Shift Operator ( <code>&gt;&gt;</code> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-signed-right-shift-operator-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.9.4.1</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-unsigned-right-shift-operator" title="The Unsigned Right Shift Operator ( &gt;&gt;&gt; )"><span class="secnum">12.9.5</span> The Unsigned Right Shift Operator ( <code>&gt;&gt;&gt;</code> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-unsigned-right-shift-operator-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.9.5.1</span> RS: Evaluation</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-relational-operators" title="Relational Operators"><span class="secnum">12.10</span> Relational Operators</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-relational-operators-static-semantics-isfunctiondefinition" title="Static Semantics: IsFunctionDefinition"><span class="secnum">12.10.1</span> SS: IsFunctionDefinition</a></li><li><span class="item-toggle-none"></span><a href="#sec-relational-operators-static-semantics-assignmenttargettype" title="Static Semantics: AssignmentTargetType"><span class="secnum">12.10.2</span> SS: AssignmentTargetType</a></li><li><span class="item-toggle-none"></span><a href="#sec-relational-operators-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.10.3</span> RS: Evaluation</a></li><li><span class="item-toggle-none"></span><a href="#sec-instanceofoperator" title="Runtime Semantics: InstanceofOperator ( V, target )"><span class="secnum">12.10.4</span> RS: InstanceofOperator ( <var>V</var>, <var>target</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-equality-operators" title="Equality Operators"><span class="secnum">12.11</span> Equality Operators</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-equality-operators-static-semantics-isfunctiondefinition" title="Static Semantics: IsFunctionDefinition"><span class="secnum">12.11.1</span> SS: IsFunctionDefinition</a></li><li><span class="item-toggle-none"></span><a href="#sec-equality-operators-static-semantics-assignmenttargettype" title="Static Semantics: AssignmentTargetType"><span class="secnum">12.11.2</span> SS: AssignmentTargetType</a></li><li><span class="item-toggle-none"></span><a href="#sec-equality-operators-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.11.3</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-binary-bitwise-operators" title="Binary Bitwise Operators"><span class="secnum">12.12</span> Binary Bitwise Operators</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-binary-bitwise-operators-static-semantics-isfunctiondefinition" title="Static Semantics: IsFunctionDefinition"><span class="secnum">12.12.1</span> SS: IsFunctionDefinition</a></li><li><span class="item-toggle-none"></span><a href="#sec-binary-bitwise-operators-static-semantics-assignmenttargettype" title="Static Semantics: AssignmentTargetType"><span class="secnum">12.12.2</span> SS: AssignmentTargetType</a></li><li><span class="item-toggle-none"></span><a href="#sec-binary-bitwise-operators-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.12.3</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-binary-logical-operators" title="Binary Logical Operators"><span class="secnum">12.13</span> Binary Logical Operators</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-binary-logical-operators-static-semantics-isfunctiondefinition" title="Static Semantics: IsFunctionDefinition"><span class="secnum">12.13.1</span> SS: IsFunctionDefinition</a></li><li><span class="item-toggle-none"></span><a href="#sec-binary-logical-operators-static-semantics-assignmenttargettype" title="Static Semantics: AssignmentTargetType"><span class="secnum">12.13.2</span> SS: AssignmentTargetType</a></li><li><span class="item-toggle-none"></span><a href="#sec-binary-logical-operators-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.13.3</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-conditional-operator" title="Conditional Operator ( ? : )"><span class="secnum">12.14</span> Conditional Operator ( <code>? :</code> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-conditional-operator-static-semantics-isfunctiondefinition" title="Static Semantics: IsFunctionDefinition"><span class="secnum">12.14.1</span> SS: IsFunctionDefinition</a></li><li><span class="item-toggle-none"></span><a href="#sec-conditional-operator-static-semantics-assignmenttargettype" title="Static Semantics: AssignmentTargetType"><span class="secnum">12.14.2</span> SS: AssignmentTargetType</a></li><li><span class="item-toggle-none"></span><a href="#sec-conditional-operator-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.14.3</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-assignment-operators" title="Assignment Operators"><span class="secnum">12.15</span> Assignment Operators</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-assignment-operators-static-semantics-early-errors" title="Static Semantics: Early Errors"><span class="secnum">12.15.1</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-assignment-operators-static-semantics-isfunctiondefinition" title="Static Semantics: IsFunctionDefinition"><span class="secnum">12.15.2</span> SS: IsFunctionDefinition</a></li><li><span class="item-toggle-none"></span><a href="#sec-assignment-operators-static-semantics-assignmenttargettype" title="Static Semantics: AssignmentTargetType"><span class="secnum">12.15.3</span> SS: AssignmentTargetType</a></li><li><span class="item-toggle-none"></span><a href="#sec-assignment-operators-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.15.4</span> RS: Evaluation</a></li><li><span class="item-toggle">◢</span><a href="#sec-destructuring-assignment" title="Destructuring Assignment"><span class="secnum">12.15.5</span> Destructuring Assignment</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-destructuring-assignment-static-semantics-early-errors" title="Static Semantics: Early Errors"><span class="secnum">12.15.5.1</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-runtime-semantics-destructuringassignmentevaluation" title="Runtime Semantics: DestructuringAssignmentEvaluation"><span class="secnum">12.15.5.2</span> RS: DestructuringAssignmentEvaluation</a></li><li><span class="item-toggle-none"></span><a href="#sec-runtime-semantics-propertydestructuringassignmentevaluation" title="Runtime Semantics: PropertyDestructuringAssignmentEvaluation"><span class="secnum">12.15.5.3</span> RS: PropertyDestructuringAssignmentEvaluation</a></li><li><span class="item-toggle-none"></span><a href="#sec-runtime-semantics-restdestructuringassignmentevaluation" title="Runtime Semantics: RestDestructuringAssignmentEvaluation"><span class="secnum">12.15.5.4</span> RS: RestDestructuringAssignmentEvaluation</a></li><li><span class="item-toggle-none"></span><a href="#sec-runtime-semantics-iteratordestructuringassignmentevaluation" title="Runtime Semantics: IteratorDestructuringAssignmentEvaluation"><span class="secnum">12.15.5.5</span> RS: IteratorDestructuringAssignmentEvaluation</a></li><li><span class="item-toggle-none"></span><a href="#sec-runtime-semantics-keyeddestructuringassignmentevaluation" title="Runtime Semantics: KeyedDestructuringAssignmentEvaluation"><span class="secnum">12.15.5.6</span> RS: KeyedDestructuringAssignmentEvaluation</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-comma-operator" title="Comma Operator ( , )"><span class="secnum">12.16</span> Comma Operator ( <code>,</code> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-comma-operator-static-semantics-isfunctiondefinition" title="Static Semantics: IsFunctionDefinition"><span class="secnum">12.16.1</span> SS: IsFunctionDefinition</a></li><li><span class="item-toggle-none"></span><a href="#sec-comma-operator-static-semantics-assignmenttargettype" title="Static Semantics: AssignmentTargetType"><span class="secnum">12.16.2</span> SS: AssignmentTargetType</a></li><li><span class="item-toggle-none"></span><a href="#sec-comma-operator-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">12.16.3</span> RS: Evaluation</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-ecmascript-language-statements-and-declarations" title="ECMAScript Language: Statements and Declarations"><span class="secnum">13</span> ECMAScript Language: Statements and Declarations</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-statement-semantics" title="Statement Semantics"><span class="secnum">13.1</span> Statement Semantics</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-statement-semantics-static-semantics-containsduplicatelabels" title="Static Semantics: ContainsDuplicateLabels"><span class="secnum">13.1.1</span> SS: ContainsDuplicateLabels</a></li><li><span class="item-toggle-none"></span><a href="#sec-statement-semantics-static-semantics-containsundefinedbreaktarget" title="Static Semantics: ContainsUndefinedBreakTarget"><span class="secnum">13.1.2</span> SS: ContainsUndefinedBreakTarget</a></li><li><span class="item-toggle-none"></span><a href="#sec-statement-semantics-static-semantics-containsundefinedcontinuetarget" title="Static Semantics: ContainsUndefinedContinueTarget"><span class="secnum">13.1.3</span> SS: ContainsUndefinedContinueTarget</a></li><li><span class="item-toggle-none"></span><a href="#sec-static-semantics-declarationpart" title="Static Semantics: DeclarationPart"><span class="secnum">13.1.4</span> SS: DeclarationPart</a></li><li><span class="item-toggle-none"></span><a href="#sec-statement-semantics-static-semantics-vardeclarednames" title="Static Semantics: VarDeclaredNames"><span class="secnum">13.1.5</span> SS: VarDeclaredNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-statement-semantics-static-semantics-varscopeddeclarations" title="Static Semantics: VarScopedDeclarations"><span class="secnum">13.1.6</span> SS: VarScopedDeclarations</a></li><li><span class="item-toggle-none"></span><a href="#sec-statement-semantics-runtime-semantics-labelledevaluation" title="Runtime Semantics: LabelledEvaluation"><span class="secnum">13.1.7</span> RS: LabelledEvaluation</a></li><li><span class="item-toggle-none"></span><a href="#sec-statement-semantics-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">13.1.8</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-block" title="Block"><span class="secnum">13.2</span> Block</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-block-static-semantics-early-errors" title="Static Semantics: Early Errors"><span class="secnum">13.2.1</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-block-static-semantics-containsduplicatelabels" title="Static Semantics: ContainsDuplicateLabels"><span class="secnum">13.2.2</span> SS: ContainsDuplicateLabels</a></li><li><span class="item-toggle-none"></span><a href="#sec-block-static-semantics-containsundefinedbreaktarget" title="Static Semantics: ContainsUndefinedBreakTarget"><span class="secnum">13.2.3</span> SS: ContainsUndefinedBreakTarget</a></li><li><span class="item-toggle-none"></span><a href="#sec-block-static-semantics-containsundefinedcontinuetarget" title="Static Semantics: ContainsUndefinedContinueTarget"><span class="secnum">13.2.4</span> SS: ContainsUndefinedContinueTarget</a></li><li><span class="item-toggle-none"></span><a href="#sec-block-static-semantics-lexicallydeclarednames" title="Static Semantics: LexicallyDeclaredNames"><span class="secnum">13.2.5</span> SS: LexicallyDeclaredNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-block-static-semantics-lexicallyscopeddeclarations" title="Static Semantics: LexicallyScopedDeclarations"><span class="secnum">13.2.6</span> SS: LexicallyScopedDeclarations</a></li><li><span class="item-toggle-none"></span><a href="#sec-block-static-semantics-toplevellexicallydeclarednames" title="Static Semantics: TopLevelLexicallyDeclaredNames"><span class="secnum">13.2.7</span> SS: TopLevelLexicallyDeclaredNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-block-static-semantics-toplevellexicallyscopeddeclarations" title="Static Semantics: TopLevelLexicallyScopedDeclarations"><span class="secnum">13.2.8</span> SS: TopLevelLexicallyScopedDeclarations</a></li><li><span class="item-toggle-none"></span><a href="#sec-block-static-semantics-toplevelvardeclarednames" title="Static Semantics: TopLevelVarDeclaredNames"><span class="secnum">13.2.9</span> SS: TopLevelVarDeclaredNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-block-static-semantics-toplevelvarscopeddeclarations" title="Static Semantics: TopLevelVarScopedDeclarations"><span class="secnum">13.2.10</span> SS: TopLevelVarScopedDeclarations</a></li><li><span class="item-toggle-none"></span><a href="#sec-block-static-semantics-vardeclarednames" title="Static Semantics: VarDeclaredNames"><span class="secnum">13.2.11</span> SS: VarDeclaredNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-block-static-semantics-varscopeddeclarations" title="Static Semantics: VarScopedDeclarations"><span class="secnum">13.2.12</span> SS: VarScopedDeclarations</a></li><li><span class="item-toggle-none"></span><a href="#sec-block-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">13.2.13</span> RS: Evaluation</a></li><li><span class="item-toggle-none"></span><a href="#sec-blockdeclarationinstantiation" title="Runtime Semantics: BlockDeclarationInstantiation ( code, env )"><span class="secnum">13.2.14</span> RS: BlockDeclarationInstantiation ( <var>code</var>, <var>env</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-declarations-and-the-variable-statement" title="Declarations and the Variable Statement"><span class="secnum">13.3</span> Declarations and the Variable Statement</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-let-and-const-declarations" title="Let and Const Declarations"><span class="secnum">13.3.1</span> Let and Const Declarations</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-let-and-const-declarations-static-semantics-early-errors" title="Static Semantics: Early Errors"><span class="secnum">13.3.1.1</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-let-and-const-declarations-static-semantics-boundnames" title="Static Semantics: BoundNames"><span class="secnum">13.3.1.2</span> SS: BoundNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-let-and-const-declarations-static-semantics-isconstantdeclaration" title="Static Semantics: IsConstantDeclaration"><span class="secnum">13.3.1.3</span> SS: IsConstantDeclaration</a></li><li><span class="item-toggle-none"></span><a href="#sec-let-and-const-declarations-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">13.3.1.4</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-variable-statement" title="Variable Statement"><span class="secnum">13.3.2</span> Variable Statement</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-variable-statement-static-semantics-boundnames" title="Static Semantics: BoundNames"><span class="secnum">13.3.2.1</span> SS: BoundNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-variable-statement-static-semantics-vardeclarednames" title="Static Semantics: VarDeclaredNames"><span class="secnum">13.3.2.2</span> SS: VarDeclaredNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-variable-statement-static-semantics-varscopeddeclarations" title="Static Semantics: VarScopedDeclarations"><span class="secnum">13.3.2.3</span> SS: VarScopedDeclarations</a></li><li><span class="item-toggle-none"></span><a href="#sec-variable-statement-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">13.3.2.4</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-destructuring-binding-patterns" title="Destructuring Binding Patterns"><span class="secnum">13.3.3</span> Destructuring Binding Patterns</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-destructuring-binding-patterns-static-semantics-boundnames" title="Static Semantics: BoundNames"><span class="secnum">13.3.3.1</span> SS: BoundNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-destructuring-binding-patterns-static-semantics-containsexpression" title="Static Semantics: ContainsExpression"><span class="secnum">13.3.3.2</span> SS: ContainsExpression</a></li><li><span class="item-toggle-none"></span><a href="#sec-destructuring-binding-patterns-static-semantics-hasinitializer" title="Static Semantics: HasInitializer"><span class="secnum">13.3.3.3</span> SS: HasInitializer</a></li><li><span class="item-toggle-none"></span><a href="#sec-destructuring-binding-patterns-static-semantics-issimpleparameterlist" title="Static Semantics: IsSimpleParameterList"><span class="secnum">13.3.3.4</span> SS: IsSimpleParameterList</a></li><li><span class="item-toggle-none"></span><a href="#sec-destructuring-binding-patterns-runtime-semantics-bindinginitialization" title="Runtime Semantics: BindingInitialization"><span class="secnum">13.3.3.5</span> RS: BindingInitialization</a></li><li><span class="item-toggle-none"></span><a href="#sec-destructuring-binding-patterns-runtime-semantics-propertybindinginitialization" title="Runtime Semantics: PropertyBindingInitialization"><span class="secnum">13.3.3.6</span> RS: PropertyBindingInitialization</a></li><li><span class="item-toggle-none"></span><a href="#sec-destructuring-binding-patterns-runtime-semantics-restbindinginitialization" title="Runtime Semantics: RestBindingInitialization"><span class="secnum">13.3.3.7</span> RS: RestBindingInitialization</a></li><li><span class="item-toggle-none"></span><a href="#sec-destructuring-binding-patterns-runtime-semantics-iteratorbindinginitialization" title="Runtime Semantics: IteratorBindingInitialization"><span class="secnum">13.3.3.8</span> RS: IteratorBindingInitialization</a></li><li><span class="item-toggle-none"></span><a href="#sec-runtime-semantics-keyedbindinginitialization" title="Runtime Semantics: KeyedBindingInitialization"><span class="secnum">13.3.3.9</span> RS: KeyedBindingInitialization</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-empty-statement" title="Empty Statement"><span class="secnum">13.4</span> Empty Statement</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-empty-statement-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">13.4.1</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-expression-statement" title="Expression Statement"><span class="secnum">13.5</span> Expression Statement</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-expression-statement-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">13.5.1</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-if-statement" title="The if Statement"><span class="secnum">13.6</span> The <code>if</code> Statement</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-if-statement-static-semantics-early-errors" title="Static Semantics: Early Errors"><span class="secnum">13.6.1</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-if-statement-static-semantics-containsduplicatelabels" title="Static Semantics: ContainsDuplicateLabels"><span class="secnum">13.6.2</span> SS: ContainsDuplicateLabels</a></li><li><span class="item-toggle-none"></span><a href="#sec-if-statement-static-semantics-containsundefinedbreaktarget" title="Static Semantics: ContainsUndefinedBreakTarget"><span class="secnum">13.6.3</span> SS: ContainsUndefinedBreakTarget</a></li><li><span class="item-toggle-none"></span><a href="#sec-if-statement-static-semantics-containsundefinedcontinuetarget" title="Static Semantics: ContainsUndefinedContinueTarget"><span class="secnum">13.6.4</span> SS: ContainsUndefinedContinueTarget</a></li><li><span class="item-toggle-none"></span><a href="#sec-if-statement-static-semantics-vardeclarednames" title="Static Semantics: VarDeclaredNames"><span class="secnum">13.6.5</span> SS: VarDeclaredNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-if-statement-static-semantics-varscopeddeclarations" title="Static Semantics: VarScopedDeclarations"><span class="secnum">13.6.6</span> SS: VarScopedDeclarations</a></li><li><span class="item-toggle-none"></span><a href="#sec-if-statement-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">13.6.7</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-iteration-statements" title="Iteration Statements"><span class="secnum">13.7</span> Iteration Statements</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-iteration-statements-semantics" title="Semantics"><span class="secnum">13.7.1</span> Semantics</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-semantics-static-semantics-early-errors" title="Static Semantics: Early Errors"><span class="secnum">13.7.1.1</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-loopcontinues" title="Runtime Semantics: LoopContinues ( completion, labelSet )"><span class="secnum">13.7.1.2</span> RS: LoopContinues ( <var>completion</var>, <var>labelSet</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-do-while-statement" title="The do-while Statement"><span class="secnum">13.7.2</span> The <code>do</code>-<code>while</code> Statement</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-do-while-statement-static-semantics-containsduplicatelabels" title="Static Semantics: ContainsDuplicateLabels"><span class="secnum">13.7.2.1</span> SS: ContainsDuplicateLabels</a></li><li><span class="item-toggle-none"></span><a href="#sec-do-while-statement-static-semantics-containsundefinedbreaktarget" title="Static Semantics: ContainsUndefinedBreakTarget"><span class="secnum">13.7.2.2</span> SS: ContainsUndefinedBreakTarget</a></li><li><span class="item-toggle-none"></span><a href="#sec-do-while-statement-static-semantics-containsundefinedcontinuetarget" title="Static Semantics: ContainsUndefinedContinueTarget"><span class="secnum">13.7.2.3</span> SS: ContainsUndefinedContinueTarget</a></li><li><span class="item-toggle-none"></span><a href="#sec-do-while-statement-static-semantics-vardeclarednames" title="Static Semantics: VarDeclaredNames"><span class="secnum">13.7.2.4</span> SS: VarDeclaredNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-do-while-statement-static-semantics-varscopeddeclarations" title="Static Semantics: VarScopedDeclarations"><span class="secnum">13.7.2.5</span> SS: VarScopedDeclarations</a></li><li><span class="item-toggle-none"></span><a href="#sec-do-while-statement-runtime-semantics-labelledevaluation" title="Runtime Semantics: LabelledEvaluation"><span class="secnum">13.7.2.6</span> RS: LabelledEvaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-while-statement" title="The while Statement"><span class="secnum">13.7.3</span> The <code>while</code> Statement</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-while-statement-static-semantics-containsduplicatelabels" title="Static Semantics: ContainsDuplicateLabels"><span class="secnum">13.7.3.1</span> SS: ContainsDuplicateLabels</a></li><li><span class="item-toggle-none"></span><a href="#sec-while-statement-static-semantics-containsundefinedbreaktarget" title="Static Semantics: ContainsUndefinedBreakTarget"><span class="secnum">13.7.3.2</span> SS: ContainsUndefinedBreakTarget</a></li><li><span class="item-toggle-none"></span><a href="#sec-while-statement-static-semantics-containsundefinedcontinuetarget" title="Static Semantics: ContainsUndefinedContinueTarget"><span class="secnum">13.7.3.3</span> SS: ContainsUndefinedContinueTarget</a></li><li><span class="item-toggle-none"></span><a href="#sec-while-statement-static-semantics-vardeclarednames" title="Static Semantics: VarDeclaredNames"><span class="secnum">13.7.3.4</span> SS: VarDeclaredNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-while-statement-static-semantics-varscopeddeclarations" title="Static Semantics: VarScopedDeclarations"><span class="secnum">13.7.3.5</span> SS: VarScopedDeclarations</a></li><li><span class="item-toggle-none"></span><a href="#sec-while-statement-runtime-semantics-labelledevaluation" title="Runtime Semantics: LabelledEvaluation"><span class="secnum">13.7.3.6</span> RS: LabelledEvaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-for-statement" title="The for Statement"><span class="secnum">13.7.4</span> The <code>for</code> Statement</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-for-statement-static-semantics-early-errors" title="Static Semantics: Early Errors"><span class="secnum">13.7.4.1</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-for-statement-static-semantics-containsduplicatelabels" title="Static Semantics: ContainsDuplicateLabels"><span class="secnum">13.7.4.2</span> SS: ContainsDuplicateLabels</a></li><li><span class="item-toggle-none"></span><a href="#sec-for-statement-static-semantics-containsundefinedbreaktarget" title="Static Semantics: ContainsUndefinedBreakTarget"><span class="secnum">13.7.4.3</span> SS: ContainsUndefinedBreakTarget</a></li><li><span class="item-toggle-none"></span><a href="#sec-for-statement-static-semantics-containsundefinedcontinuetarget" title="Static Semantics: ContainsUndefinedContinueTarget"><span class="secnum">13.7.4.4</span> SS: ContainsUndefinedContinueTarget</a></li><li><span class="item-toggle-none"></span><a href="#sec-for-statement-static-semantics-vardeclarednames" title="Static Semantics: VarDeclaredNames"><span class="secnum">13.7.4.5</span> SS: VarDeclaredNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-for-statement-static-semantics-varscopeddeclarations" title="Static Semantics: VarScopedDeclarations"><span class="secnum">13.7.4.6</span> SS: VarScopedDeclarations</a></li><li><span class="item-toggle-none"></span><a href="#sec-for-statement-runtime-semantics-labelledevaluation" title="Runtime Semantics: LabelledEvaluation"><span class="secnum">13.7.4.7</span> RS: LabelledEvaluation</a></li><li><span class="item-toggle-none"></span><a href="#sec-forbodyevaluation" title="Runtime Semantics: ForBodyEvaluation ( test, increment, stmt, perIterationBindings, labelSet )"><span class="secnum">13.7.4.8</span> RS: ForBodyEvaluation ( <var>test</var>, <var>increment</var>, <var>stmt</var>, <var>perIterationBindings</var>, <var>labelSet</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-createperiterationenvironment" title="Runtime Semantics: CreatePerIterationEnvironment ( perIterationBindings )"><span class="secnum">13.7.4.9</span> RS: CreatePerIterationEnvironment ( <var>perIterationBindings</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-for-in-and-for-of-statements" title="The for-in, for-of, and for-await-of Statements"><span class="secnum">13.7.5</span> The <code>for</code>-<code>in</code>, <code>for</code>-<code>of</code>, and <code>for</code>-<code>await</code>-<code>of</code> Statements</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-for-in-and-for-of-statements-static-semantics-early-errors" title="Static Semantics: Early Errors"><span class="secnum">13.7.5.1</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-for-in-and-for-of-statements-static-semantics-boundnames" title="Static Semantics: BoundNames"><span class="secnum">13.7.5.2</span> SS: BoundNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-for-in-and-for-of-statements-static-semantics-containsduplicatelabels" title="Static Semantics: ContainsDuplicateLabels"><span class="secnum">13.7.5.3</span> SS: ContainsDuplicateLabels</a></li><li><span class="item-toggle-none"></span><a href="#sec-for-in-and-for-of-statements-static-semantics-containsundefinedbreaktarget" title="Static Semantics: ContainsUndefinedBreakTarget"><span class="secnum">13.7.5.4</span> SS: ContainsUndefinedBreakTarget</a></li><li><span class="item-toggle-none"></span><a href="#sec-for-in-and-for-of-statements-static-semantics-containsundefinedcontinuetarget" title="Static Semantics: ContainsUndefinedContinueTarget"><span class="secnum">13.7.5.5</span> SS: ContainsUndefinedContinueTarget</a></li><li><span class="item-toggle-none"></span><a href="#sec-for-in-and-for-of-statements-static-semantics-isdestructuring" title="Static Semantics: IsDestructuring"><span class="secnum">13.7.5.6</span> SS: IsDestructuring</a></li><li><span class="item-toggle-none"></span><a href="#sec-for-in-and-for-of-statements-static-semantics-vardeclarednames" title="Static Semantics: VarDeclaredNames"><span class="secnum">13.7.5.7</span> SS: VarDeclaredNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-for-in-and-for-of-statements-static-semantics-varscopeddeclarations" title="Static Semantics: VarScopedDeclarations"><span class="secnum">13.7.5.8</span> SS: VarScopedDeclarations</a></li><li><span class="item-toggle-none"></span><a href="#sec-for-in-and-for-of-statements-runtime-semantics-bindinginitialization" title="Runtime Semantics: BindingInitialization"><span class="secnum">13.7.5.9</span> RS: BindingInitialization</a></li><li><span class="item-toggle-none"></span><a href="#sec-runtime-semantics-bindinginstantiation" title="Runtime Semantics: BindingInstantiation"><span class="secnum">13.7.5.10</span> RS: BindingInstantiation</a></li><li><span class="item-toggle-none"></span><a href="#sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation" title="Runtime Semantics: LabelledEvaluation"><span class="secnum">13.7.5.11</span> RS: LabelledEvaluation</a></li><li><span class="item-toggle-none"></span><a href="#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind" title="Runtime Semantics: ForIn/OfHeadEvaluation ( TDZnames, expr, iterationKind )"><span class="secnum">13.7.5.12</span> RS: ForIn/OfHeadEvaluation ( <var>TDZnames</var>, <var>expr</var>, <var>iterationKind</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset" title="Runtime Semantics: ForIn/OfBodyEvaluation ( lhs, stmt, iteratorRecord, iterationKind, lhsKind, labelSet [ , iteratorKind ] )"><span class="secnum">13.7.5.13</span> RS: ForIn/OfBodyEvaluation ( <var>lhs</var>, <var>stmt</var>, <var>iteratorRecord</var>, <var>iterationKind</var>, <var>lhsKind</var>, <var>labelSet</var> [ , <var>iteratorKind</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-for-in-and-for-of-statements-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">13.7.5.14</span> RS: Evaluation</a></li><li><span class="item-toggle-none"></span><a href="#sec-enumerate-object-properties" title="EnumerateObjectProperties ( O )"><span class="secnum">13.7.5.15</span> EnumerateObjectProperties ( <var>O</var> )</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-continue-statement" title="The continue Statement"><span class="secnum">13.8</span> The <code>continue</code> Statement</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-continue-statement-static-semantics-early-errors" title="Static Semantics: Early Errors"><span class="secnum">13.8.1</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-continue-statement-static-semantics-containsundefinedcontinuetarget" title="Static Semantics: ContainsUndefinedContinueTarget"><span class="secnum">13.8.2</span> SS: ContainsUndefinedContinueTarget</a></li><li><span class="item-toggle-none"></span><a href="#sec-continue-statement-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">13.8.3</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-break-statement" title="The break Statement"><span class="secnum">13.9</span> The <code>break</code> Statement</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-break-statement-static-semantics-early-errors" title="Static Semantics: Early Errors"><span class="secnum">13.9.1</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-break-statement-static-semantics-containsundefinedbreaktarget" title="Static Semantics: ContainsUndefinedBreakTarget"><span class="secnum">13.9.2</span> SS: ContainsUndefinedBreakTarget</a></li><li><span class="item-toggle-none"></span><a href="#sec-break-statement-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">13.9.3</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-return-statement" title="The return Statement"><span class="secnum">13.10</span> The <code>return</code> Statement</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-return-statement-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">13.10.1</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-with-statement" title="The with Statement"><span class="secnum">13.11</span> The <code>with</code> Statement</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-with-statement-static-semantics-early-errors" title="Static Semantics: Early Errors"><span class="secnum">13.11.1</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-with-statement-static-semantics-containsduplicatelabels" title="Static Semantics: ContainsDuplicateLabels"><span class="secnum">13.11.2</span> SS: ContainsDuplicateLabels</a></li><li><span class="item-toggle-none"></span><a href="#sec-with-statement-static-semantics-containsundefinedbreaktarget" title="Static Semantics: ContainsUndefinedBreakTarget"><span class="secnum">13.11.3</span> SS: ContainsUndefinedBreakTarget</a></li><li><span class="item-toggle-none"></span><a href="#sec-with-statement-static-semantics-containsundefinedcontinuetarget" title="Static Semantics: ContainsUndefinedContinueTarget"><span class="secnum">13.11.4</span> SS: ContainsUndefinedContinueTarget</a></li><li><span class="item-toggle-none"></span><a href="#sec-with-statement-static-semantics-vardeclarednames" title="Static Semantics: VarDeclaredNames"><span class="secnum">13.11.5</span> SS: VarDeclaredNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-with-statement-static-semantics-varscopeddeclarations" title="Static Semantics: VarScopedDeclarations"><span class="secnum">13.11.6</span> SS: VarScopedDeclarations</a></li><li><span class="item-toggle-none"></span><a href="#sec-with-statement-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">13.11.7</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-switch-statement" title="The switch Statement"><span class="secnum">13.12</span> The <code>switch</code> Statement</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-switch-statement-static-semantics-early-errors" title="Static Semantics: Early Errors"><span class="secnum">13.12.1</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-switch-statement-static-semantics-containsduplicatelabels" title="Static Semantics: ContainsDuplicateLabels"><span class="secnum">13.12.2</span> SS: ContainsDuplicateLabels</a></li><li><span class="item-toggle-none"></span><a href="#sec-switch-statement-static-semantics-containsundefinedbreaktarget" title="Static Semantics: ContainsUndefinedBreakTarget"><span class="secnum">13.12.3</span> SS: ContainsUndefinedBreakTarget</a></li><li><span class="item-toggle-none"></span><a href="#sec-switch-statement-static-semantics-containsundefinedcontinuetarget" title="Static Semantics: ContainsUndefinedContinueTarget"><span class="secnum">13.12.4</span> SS: ContainsUndefinedContinueTarget</a></li><li><span class="item-toggle-none"></span><a href="#sec-switch-statement-static-semantics-lexicallydeclarednames" title="Static Semantics: LexicallyDeclaredNames"><span class="secnum">13.12.5</span> SS: LexicallyDeclaredNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-switch-statement-static-semantics-lexicallyscopeddeclarations" title="Static Semantics: LexicallyScopedDeclarations"><span class="secnum">13.12.6</span> SS: LexicallyScopedDeclarations</a></li><li><span class="item-toggle-none"></span><a href="#sec-switch-statement-static-semantics-vardeclarednames" title="Static Semantics: VarDeclaredNames"><span class="secnum">13.12.7</span> SS: VarDeclaredNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-switch-statement-static-semantics-varscopeddeclarations" title="Static Semantics: VarScopedDeclarations"><span class="secnum">13.12.8</span> SS: VarScopedDeclarations</a></li><li><span class="item-toggle-none"></span><a href="#sec-runtime-semantics-caseblockevaluation" title="Runtime Semantics: CaseBlockEvaluation"><span class="secnum">13.12.9</span> RS: CaseBlockEvaluation</a></li><li><span class="item-toggle-none"></span><a href="#sec-runtime-semantics-caseclauseisselected" title="Runtime Semantics: CaseClauseIsSelected ( C, input )"><span class="secnum">13.12.10</span> RS: CaseClauseIsSelected ( <var>C</var>, <var>input</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-switch-statement-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">13.12.11</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-labelled-statements" title="Labelled Statements"><span class="secnum">13.13</span> Labelled Statements</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-labelled-statements-static-semantics-early-errors" title="Static Semantics: Early Errors"><span class="secnum">13.13.1</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-labelled-statements-static-semantics-containsduplicatelabels" title="Static Semantics: ContainsDuplicateLabels"><span class="secnum">13.13.2</span> SS: ContainsDuplicateLabels</a></li><li><span class="item-toggle-none"></span><a href="#sec-labelled-statements-static-semantics-containsundefinedbreaktarget" title="Static Semantics: ContainsUndefinedBreakTarget"><span class="secnum">13.13.3</span> SS: ContainsUndefinedBreakTarget</a></li><li><span class="item-toggle-none"></span><a href="#sec-labelled-statements-static-semantics-containsundefinedcontinuetarget" title="Static Semantics: ContainsUndefinedContinueTarget"><span class="secnum">13.13.4</span> SS: ContainsUndefinedContinueTarget</a></li><li><span class="item-toggle-none"></span><a href="#sec-islabelledfunction" title="Static Semantics: IsLabelledFunction ( stmt )"><span class="secnum">13.13.5</span> SS: IsLabelledFunction ( <var>stmt</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-labelled-statements-static-semantics-lexicallydeclarednames" title="Static Semantics: LexicallyDeclaredNames"><span class="secnum">13.13.6</span> SS: LexicallyDeclaredNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-labelled-statements-static-semantics-lexicallyscopeddeclarations" title="Static Semantics: LexicallyScopedDeclarations"><span class="secnum">13.13.7</span> SS: LexicallyScopedDeclarations</a></li><li><span class="item-toggle-none"></span><a href="#sec-labelled-statements-static-semantics-toplevellexicallydeclarednames" title="Static Semantics: TopLevelLexicallyDeclaredNames"><span class="secnum">13.13.8</span> SS: TopLevelLexicallyDeclaredNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-labelled-statements-static-semantics-toplevellexicallyscopeddeclarations" title="Static Semantics: TopLevelLexicallyScopedDeclarations"><span class="secnum">13.13.9</span> SS: TopLevelLexicallyScopedDeclarations</a></li><li><span class="item-toggle-none"></span><a href="#sec-labelled-statements-static-semantics-toplevelvardeclarednames" title="Static Semantics: TopLevelVarDeclaredNames"><span class="secnum">13.13.10</span> SS: TopLevelVarDeclaredNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-labelled-statements-static-semantics-toplevelvarscopeddeclarations" title="Static Semantics: TopLevelVarScopedDeclarations"><span class="secnum">13.13.11</span> SS: TopLevelVarScopedDeclarations</a></li><li><span class="item-toggle-none"></span><a href="#sec-labelled-statements-static-semantics-vardeclarednames" title="Static Semantics: VarDeclaredNames"><span class="secnum">13.13.12</span> SS: VarDeclaredNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-labelled-statements-static-semantics-varscopeddeclarations" title="Static Semantics: VarScopedDeclarations"><span class="secnum">13.13.13</span> SS: VarScopedDeclarations</a></li><li><span class="item-toggle-none"></span><a href="#sec-labelled-statements-runtime-semantics-labelledevaluation" title="Runtime Semantics: LabelledEvaluation"><span class="secnum">13.13.14</span> RS: LabelledEvaluation</a></li><li><span class="item-toggle-none"></span><a href="#sec-labelled-statements-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">13.13.15</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-throw-statement" title="The throw Statement"><span class="secnum">13.14</span> The <code>throw</code> Statement</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-throw-statement-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">13.14.1</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-try-statement" title="The try Statement"><span class="secnum">13.15</span> The <code>try</code> Statement</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-try-statement-static-semantics-early-errors" title="Static Semantics: Early Errors"><span class="secnum">13.15.1</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-try-statement-static-semantics-containsduplicatelabels" title="Static Semantics: ContainsDuplicateLabels"><span class="secnum">13.15.2</span> SS: ContainsDuplicateLabels</a></li><li><span class="item-toggle-none"></span><a href="#sec-try-statement-static-semantics-containsundefinedbreaktarget" title="Static Semantics: ContainsUndefinedBreakTarget"><span class="secnum">13.15.3</span> SS: ContainsUndefinedBreakTarget</a></li><li><span class="item-toggle-none"></span><a href="#sec-try-statement-static-semantics-containsundefinedcontinuetarget" title="Static Semantics: ContainsUndefinedContinueTarget"><span class="secnum">13.15.4</span> SS: ContainsUndefinedContinueTarget</a></li><li><span class="item-toggle-none"></span><a href="#sec-try-statement-static-semantics-vardeclarednames" title="Static Semantics: VarDeclaredNames"><span class="secnum">13.15.5</span> SS: VarDeclaredNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-try-statement-static-semantics-varscopeddeclarations" title="Static Semantics: VarScopedDeclarations"><span class="secnum">13.15.6</span> SS: VarScopedDeclarations</a></li><li><span class="item-toggle-none"></span><a href="#sec-runtime-semantics-catchclauseevaluation" title="Runtime Semantics: CatchClauseEvaluation"><span class="secnum">13.15.7</span> RS: CatchClauseEvaluation</a></li><li><span class="item-toggle-none"></span><a href="#sec-try-statement-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">13.15.8</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-debugger-statement" title="The debugger Statement"><span class="secnum">13.16</span> The <code>debugger</code> Statement</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-debugger-statement-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">13.16.1</span> RS: Evaluation</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-ecmascript-language-functions-and-classes" title="ECMAScript Language: Functions and Classes"><span class="secnum">14</span> ECMAScript Language: Functions and Classes</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-function-definitions" title="Function Definitions"><span class="secnum">14.1</span> Function Definitions</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-directive-prologues-and-the-use-strict-directive" title="Directive Prologues and the Use Strict Directive"><span class="secnum">14.1.1</span> Directive Prologues and the Use Strict Directive</a></li><li><span class="item-toggle-none"></span><a href="#sec-function-definitions-static-semantics-early-errors" title="Static Semantics: Early Errors"><span class="secnum">14.1.2</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-function-definitions-static-semantics-boundnames" title="Static Semantics: BoundNames"><span class="secnum">14.1.3</span> SS: BoundNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-function-definitions-static-semantics-contains" title="Static Semantics: Contains"><span class="secnum">14.1.4</span> SS: Contains</a></li><li><span class="item-toggle-none"></span><a href="#sec-function-definitions-static-semantics-containsexpression" title="Static Semantics: ContainsExpression"><span class="secnum">14.1.5</span> SS: ContainsExpression</a></li><li><span class="item-toggle-none"></span><a href="#sec-function-definitions-static-semantics-containsusestrict" title="Static Semantics: ContainsUseStrict"><span class="secnum">14.1.6</span> SS: ContainsUseStrict</a></li><li><span class="item-toggle-none"></span><a href="#sec-function-definitions-static-semantics-expectedargumentcount" title="Static Semantics: ExpectedArgumentCount"><span class="secnum">14.1.7</span> SS: ExpectedArgumentCount</a></li><li><span class="item-toggle-none"></span><a href="#sec-function-definitions-static-semantics-hasinitializer" title="Static Semantics: HasInitializer"><span class="secnum">14.1.8</span> SS: HasInitializer</a></li><li><span class="item-toggle-none"></span><a href="#sec-function-definitions-static-semantics-hasname" title="Static Semantics: HasName"><span class="secnum">14.1.9</span> SS: HasName</a></li><li><span class="item-toggle-none"></span><a href="#sec-isanonymousfunctiondefinition" title="Static Semantics: IsAnonymousFunctionDefinition ( expr )"><span class="secnum">14.1.10</span> SS: IsAnonymousFunctionDefinition ( <var>expr</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-function-definitions-static-semantics-isconstantdeclaration" title="Static Semantics: IsConstantDeclaration"><span class="secnum">14.1.11</span> SS: IsConstantDeclaration</a></li><li><span class="item-toggle-none"></span><a href="#sec-function-definitions-static-semantics-isfunctiondefinition" title="Static Semantics: IsFunctionDefinition"><span class="secnum">14.1.12</span> SS: IsFunctionDefinition</a></li><li><span class="item-toggle-none"></span><a href="#sec-function-definitions-static-semantics-issimpleparameterlist" title="Static Semantics: IsSimpleParameterList"><span class="secnum">14.1.13</span> SS: IsSimpleParameterList</a></li><li><span class="item-toggle-none"></span><a href="#sec-function-definitions-static-semantics-lexicallydeclarednames" title="Static Semantics: LexicallyDeclaredNames"><span class="secnum">14.1.14</span> SS: LexicallyDeclaredNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-function-definitions-static-semantics-lexicallyscopeddeclarations" title="Static Semantics: LexicallyScopedDeclarations"><span class="secnum">14.1.15</span> SS: LexicallyScopedDeclarations</a></li><li><span class="item-toggle-none"></span><a href="#sec-function-definitions-static-semantics-vardeclarednames" title="Static Semantics: VarDeclaredNames"><span class="secnum">14.1.16</span> SS: VarDeclaredNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-function-definitions-static-semantics-varscopeddeclarations" title="Static Semantics: VarScopedDeclarations"><span class="secnum">14.1.17</span> SS: VarScopedDeclarations</a></li><li><span class="item-toggle-none"></span><a href="#sec-function-definitions-runtime-semantics-evaluatebody" title="Runtime Semantics: EvaluateBody"><span class="secnum">14.1.18</span> RS: EvaluateBody</a></li><li><span class="item-toggle-none"></span><a href="#sec-function-definitions-runtime-semantics-iteratorbindinginitialization" title="Runtime Semantics: IteratorBindingInitialization"><span class="secnum">14.1.19</span> RS: IteratorBindingInitialization</a></li><li><span class="item-toggle-none"></span><a href="#sec-function-definitions-runtime-semantics-instantiatefunctionobject" title="Runtime Semantics: InstantiateFunctionObject"><span class="secnum">14.1.20</span> RS: InstantiateFunctionObject</a></li><li><span class="item-toggle-none"></span><a href="#sec-function-definitions-runtime-semantics-namedevaluation" title="Runtime Semantics: NamedEvaluation"><span class="secnum">14.1.21</span> RS: NamedEvaluation</a></li><li><span class="item-toggle-none"></span><a href="#sec-function-definitions-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">14.1.22</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-arrow-function-definitions" title="Arrow Function Definitions"><span class="secnum">14.2</span> Arrow Function Definitions</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-arrow-function-definitions-static-semantics-early-errors" title="Static Semantics: Early Errors"><span class="secnum">14.2.1</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-arrow-function-definitions-static-semantics-boundnames" title="Static Semantics: BoundNames"><span class="secnum">14.2.2</span> SS: BoundNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-arrow-function-definitions-static-semantics-contains" title="Static Semantics: Contains"><span class="secnum">14.2.3</span> SS: Contains</a></li><li><span class="item-toggle-none"></span><a href="#sec-arrow-function-definitions-static-semantics-containsexpression" title="Static Semantics: ContainsExpression"><span class="secnum">14.2.4</span> SS: ContainsExpression</a></li><li><span class="item-toggle-none"></span><a href="#sec-arrow-function-definitions-static-semantics-containsusestrict" title="Static Semantics: ContainsUseStrict"><span class="secnum">14.2.5</span> SS: ContainsUseStrict</a></li><li><span class="item-toggle-none"></span><a href="#sec-arrow-function-definitions-static-semantics-expectedargumentcount" title="Static Semantics: ExpectedArgumentCount"><span class="secnum">14.2.6</span> SS: ExpectedArgumentCount</a></li><li><span class="item-toggle-none"></span><a href="#sec-arrow-function-definitions-static-semantics-hasname" title="Static Semantics: HasName"><span class="secnum">14.2.7</span> SS: HasName</a></li><li><span class="item-toggle-none"></span><a href="#sec-arrow-function-definitions-static-semantics-issimpleparameterlist" title="Static Semantics: IsSimpleParameterList"><span class="secnum">14.2.8</span> SS: IsSimpleParameterList</a></li><li><span class="item-toggle-none"></span><a href="#sec-static-semantics-coveredformalslist" title="Static Semantics: CoveredFormalsList"><span class="secnum">14.2.9</span> SS: CoveredFormalsList</a></li><li><span class="item-toggle-none"></span><a href="#sec-arrow-function-definitions-static-semantics-lexicallydeclarednames" title="Static Semantics: LexicallyDeclaredNames"><span class="secnum">14.2.10</span> SS: LexicallyDeclaredNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-arrow-function-definitions-static-semantics-lexicallyscopeddeclarations" title="Static Semantics: LexicallyScopedDeclarations"><span class="secnum">14.2.11</span> SS: LexicallyScopedDeclarations</a></li><li><span class="item-toggle-none"></span><a href="#sec-arrow-function-definitions-static-semantics-vardeclarednames" title="Static Semantics: VarDeclaredNames"><span class="secnum">14.2.12</span> SS: VarDeclaredNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-arrow-function-definitions-static-semantics-varscopeddeclarations" title="Static Semantics: VarScopedDeclarations"><span class="secnum">14.2.13</span> SS: VarScopedDeclarations</a></li><li><span class="item-toggle-none"></span><a href="#sec-arrow-function-definitions-runtime-semantics-iteratorbindinginitialization" title="Runtime Semantics: IteratorBindingInitialization"><span class="secnum">14.2.14</span> RS: IteratorBindingInitialization</a></li><li><span class="item-toggle-none"></span><a href="#sec-arrow-function-definitions-runtime-semantics-evaluatebody" title="Runtime Semantics: EvaluateBody"><span class="secnum">14.2.15</span> RS: EvaluateBody</a></li><li><span class="item-toggle-none"></span><a href="#sec-arrow-function-definitions-runtime-semantics-namedevaluation" title="Runtime Semantics: NamedEvaluation"><span class="secnum">14.2.16</span> RS: NamedEvaluation</a></li><li><span class="item-toggle-none"></span><a href="#sec-arrow-function-definitions-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">14.2.17</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-method-definitions" title="Method Definitions"><span class="secnum">14.3</span> Method Definitions</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-method-definitions-static-semantics-early-errors" title="Static Semantics: Early Errors"><span class="secnum">14.3.1</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-method-definitions-static-semantics-computedpropertycontains" title="Static Semantics: ComputedPropertyContains"><span class="secnum">14.3.2</span> SS: ComputedPropertyContains</a></li><li><span class="item-toggle-none"></span><a href="#sec-method-definitions-static-semantics-expectedargumentcount" title="Static Semantics: ExpectedArgumentCount"><span class="secnum">14.3.3</span> SS: ExpectedArgumentCount</a></li><li><span class="item-toggle-none"></span><a href="#sec-method-definitions-static-semantics-hasdirectsuper" title="Static Semantics: HasDirectSuper"><span class="secnum">14.3.4</span> SS: HasDirectSuper</a></li><li><span class="item-toggle-none"></span><a href="#sec-method-definitions-static-semantics-propname" title="Static Semantics: PropName"><span class="secnum">14.3.5</span> SS: PropName</a></li><li><span class="item-toggle-none"></span><a href="#sec-static-semantics-specialmethod" title="Static Semantics: SpecialMethod"><span class="secnum">14.3.6</span> SS: SpecialMethod</a></li><li><span class="item-toggle-none"></span><a href="#sec-runtime-semantics-definemethod" title="Runtime Semantics: DefineMethod"><span class="secnum">14.3.7</span> RS: DefineMethod</a></li><li><span class="item-toggle-none"></span><a href="#sec-method-definitions-runtime-semantics-propertydefinitionevaluation" title="Runtime Semantics: PropertyDefinitionEvaluation"><span class="secnum">14.3.8</span> RS: PropertyDefinitionEvaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-generator-function-definitions" title="Generator Function Definitions"><span class="secnum">14.4</span> Generator Function Definitions</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-generator-function-definitions-static-semantics-early-errors" title="Static Semantics: Early Errors"><span class="secnum">14.4.1</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-generator-function-definitions-static-semantics-boundnames" title="Static Semantics: BoundNames"><span class="secnum">14.4.2</span> SS: BoundNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-generator-function-definitions-static-semantics-computedpropertycontains" title="Static Semantics: ComputedPropertyContains"><span class="secnum">14.4.3</span> SS: ComputedPropertyContains</a></li><li><span class="item-toggle-none"></span><a href="#sec-generator-function-definitions-static-semantics-contains" title="Static Semantics: Contains"><span class="secnum">14.4.4</span> SS: Contains</a></li><li><span class="item-toggle-none"></span><a href="#sec-generator-function-definitions-static-semantics-hasdirectsuper" title="Static Semantics: HasDirectSuper"><span class="secnum">14.4.5</span> SS: HasDirectSuper</a></li><li><span class="item-toggle-none"></span><a href="#sec-generator-function-definitions-static-semantics-hasname" title="Static Semantics: HasName"><span class="secnum">14.4.6</span> SS: HasName</a></li><li><span class="item-toggle-none"></span><a href="#sec-generator-function-definitions-static-semantics-isconstantdeclaration" title="Static Semantics: IsConstantDeclaration"><span class="secnum">14.4.7</span> SS: IsConstantDeclaration</a></li><li><span class="item-toggle-none"></span><a href="#sec-generator-function-definitions-static-semantics-isfunctiondefinition" title="Static Semantics: IsFunctionDefinition"><span class="secnum">14.4.8</span> SS: IsFunctionDefinition</a></li><li><span class="item-toggle-none"></span><a href="#sec-generator-function-definitions-static-semantics-propname" title="Static Semantics: PropName"><span class="secnum">14.4.9</span> SS: PropName</a></li><li><span class="item-toggle-none"></span><a href="#sec-generator-function-definitions-runtime-semantics-evaluatebody" title="Runtime Semantics: EvaluateBody"><span class="secnum">14.4.10</span> RS: EvaluateBody</a></li><li><span class="item-toggle-none"></span><a href="#sec-generator-function-definitions-runtime-semantics-instantiatefunctionobject" title="Runtime Semantics: InstantiateFunctionObject"><span class="secnum">14.4.11</span> RS: InstantiateFunctionObject</a></li><li><span class="item-toggle-none"></span><a href="#sec-generator-function-definitions-runtime-semantics-propertydefinitionevaluation" title="Runtime Semantics: PropertyDefinitionEvaluation"><span class="secnum">14.4.12</span> RS: PropertyDefinitionEvaluation</a></li><li><span class="item-toggle-none"></span><a href="#sec-generator-function-definitions-runtime-semantics-namedevaluation" title="Runtime Semantics: NamedEvaluation"><span class="secnum">14.4.13</span> RS: NamedEvaluation</a></li><li><span class="item-toggle-none"></span><a href="#sec-generator-function-definitions-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">14.4.14</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-async-generator-function-definitions" title="Async Generator Function Definitions"><span class="secnum">14.5</span> Async Generator Function Definitions</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-async-generator-function-definitions-static-semantics-early-errors" title="Static Semantics: Early Errors"><span class="secnum">14.5.1</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-generator-function-definitions-static-semantics-boundnames" title="Static Semantics: BoundNames"><span class="secnum">14.5.2</span> SS: BoundNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-generator-function-definitions-static-semantics-computedpropertycontains" title="Static Semantics: ComputedPropertyContains"><span class="secnum">14.5.3</span> SS: ComputedPropertyContains</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-generator-function-definitions-static-semantics-contains" title="Static Semantics: Contains"><span class="secnum">14.5.4</span> SS: Contains</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-generator-function-definitions-static-semantics-hasdirectsuper" title="Static Semantics: HasDirectSuper"><span class="secnum">14.5.5</span> SS: HasDirectSuper</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-generator-function-definitions-static-semantics-hasname" title="Static Semantics: HasName"><span class="secnum">14.5.6</span> SS: HasName</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-generator-function-definitions-static-semantics-isconstantdeclaration" title="Static Semantics: IsConstantDeclaration"><span class="secnum">14.5.7</span> SS: IsConstantDeclaration</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-generator-function-definitions-static-semantics-isfunctiondefinition" title="Static Semantics: IsFunctionDefinition"><span class="secnum">14.5.8</span> SS: IsFunctionDefinition</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-generator-function-definitions-static-semantics-propname" title="Static Semantics: PropName"><span class="secnum">14.5.9</span> SS: PropName</a></li><li><span class="item-toggle-none"></span><a href="#sec-asyncgenerator-definitions-evaluatebody" title="Runtime Semantics: EvaluateBody"><span class="secnum">14.5.10</span> RS: EvaluateBody</a></li><li><span class="item-toggle-none"></span><a href="#sec-asyncgenerator-definitions-instantiatefunctionobject" title="Runtime Semantics: InstantiateFunctionObject"><span class="secnum">14.5.11</span> RS: InstantiateFunctionObject</a></li><li><span class="item-toggle-none"></span><a href="#sec-asyncgenerator-definitions-propertydefinitionevaluation" title="Runtime Semantics: PropertyDefinitionEvaluation"><span class="secnum">14.5.12</span> RS: PropertyDefinitionEvaluation</a></li><li><span class="item-toggle-none"></span><a href="#sec-asyncgenerator-definitions-namedevaluation" title="Runtime Semantics: NamedEvaluation"><span class="secnum">14.5.13</span> RS: NamedEvaluation</a></li><li><span class="item-toggle-none"></span><a href="#sec-asyncgenerator-definitions-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">14.5.14</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-class-definitions" title="Class Definitions"><span class="secnum">14.6</span> Class Definitions</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-class-definitions-static-semantics-early-errors" title="Static Semantics: Early Errors"><span class="secnum">14.6.1</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-class-definitions-static-semantics-boundnames" title="Static Semantics: BoundNames"><span class="secnum">14.6.2</span> SS: BoundNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-static-semantics-constructormethod" title="Static Semantics: ConstructorMethod"><span class="secnum">14.6.3</span> SS: ConstructorMethod</a></li><li><span class="item-toggle-none"></span><a href="#sec-class-definitions-static-semantics-contains" title="Static Semantics: Contains"><span class="secnum">14.6.4</span> SS: Contains</a></li><li><span class="item-toggle-none"></span><a href="#sec-class-definitions-static-semantics-computedpropertycontains" title="Static Semantics: ComputedPropertyContains"><span class="secnum">14.6.5</span> SS: ComputedPropertyContains</a></li><li><span class="item-toggle-none"></span><a href="#sec-class-definitions-static-semantics-hasname" title="Static Semantics: HasName"><span class="secnum">14.6.6</span> SS: HasName</a></li><li><span class="item-toggle-none"></span><a href="#sec-class-definitions-static-semantics-isconstantdeclaration" title="Static Semantics: IsConstantDeclaration"><span class="secnum">14.6.7</span> SS: IsConstantDeclaration</a></li><li><span class="item-toggle-none"></span><a href="#sec-class-definitions-static-semantics-isfunctiondefinition" title="Static Semantics: IsFunctionDefinition"><span class="secnum">14.6.8</span> SS: IsFunctionDefinition</a></li><li><span class="item-toggle-none"></span><a href="#sec-static-semantics-isstatic" title="Static Semantics: IsStatic"><span class="secnum">14.6.9</span> SS: IsStatic</a></li><li><span class="item-toggle-none"></span><a href="#sec-static-semantics-nonconstructormethoddefinitions" title="Static Semantics: NonConstructorMethodDefinitions"><span class="secnum">14.6.10</span> SS: NonConstructorMethodDefinitions</a></li><li><span class="item-toggle-none"></span><a href="#sec-static-semantics-prototypepropertynamelist" title="Static Semantics: PrototypePropertyNameList"><span class="secnum">14.6.11</span> SS: PrototypePropertyNameList</a></li><li><span class="item-toggle-none"></span><a href="#sec-class-definitions-static-semantics-propname" title="Static Semantics: PropName"><span class="secnum">14.6.12</span> SS: PropName</a></li><li><span class="item-toggle-none"></span><a href="#sec-runtime-semantics-classdefinitionevaluation" title="Runtime Semantics: ClassDefinitionEvaluation"><span class="secnum">14.6.13</span> RS: ClassDefinitionEvaluation</a></li><li><span class="item-toggle-none"></span><a href="#sec-runtime-semantics-bindingclassdeclarationevaluation" title="Runtime Semantics: BindingClassDeclarationEvaluation"><span class="secnum">14.6.14</span> RS: BindingClassDeclarationEvaluation</a></li><li><span class="item-toggle-none"></span><a href="#sec-class-definitions-runtime-semantics-namedevaluation" title="Runtime Semantics: NamedEvaluation"><span class="secnum">14.6.15</span> RS: NamedEvaluation</a></li><li><span class="item-toggle-none"></span><a href="#sec-class-definitions-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">14.6.16</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-async-function-definitions" title="Async Function Definitions"><span class="secnum">14.7</span> Async Function Definitions</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-async-function-definitions-static-semantics-early-errors" title="Static Semantics: Early Errors"><span class="secnum">14.7.1</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-function-definitions-static-semantics-BoundNames" title="Static Semantics: BoundNames"><span class="secnum">14.7.2</span> SS: BoundNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-function-definitions-static-semantics-ComputedPropertyContains" title="Static Semantics: ComputedPropertyContains"><span class="secnum">14.7.3</span> SS: ComputedPropertyContains</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-function-definitions-static-semantics-Contains" title="Static Semantics: Contains"><span class="secnum">14.7.4</span> SS: Contains</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-function-definitions-static-semantics-HasDirectSuper" title="Static Semantics: HasDirectSuper"><span class="secnum">14.7.5</span> SS: HasDirectSuper</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-function-definitions-static-semantics-HasName" title="Static Semantics: HasName"><span class="secnum">14.7.6</span> SS: HasName</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-function-definitions-static-semantics-IsConstantDeclaration" title="Static Semantics: IsConstantDeclaration"><span class="secnum">14.7.7</span> SS: IsConstantDeclaration</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-function-definitions-static-semantics-IsFunctionDefinition" title="Static Semantics: IsFunctionDefinition"><span class="secnum">14.7.8</span> SS: IsFunctionDefinition</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-function-definitions-static-semantics-PropName" title="Static Semantics: PropName"><span class="secnum">14.7.9</span> SS: PropName</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-function-definitions-InstantiateFunctionObject" title="Runtime Semantics: InstantiateFunctionObject"><span class="secnum">14.7.10</span> RS: InstantiateFunctionObject</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-function-definitions-EvaluateBody" title="Runtime Semantics: EvaluateBody"><span class="secnum">14.7.11</span> RS: EvaluateBody</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-function-definitions-PropertyDefinitionEvaluation" title="Runtime Semantics: PropertyDefinitionEvaluation"><span class="secnum">14.7.12</span> RS: PropertyDefinitionEvaluation</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-function-definitions-runtime-semantics-namedevaluation" title="Runtime Semantics: NamedEvaluation"><span class="secnum">14.7.13</span> RS: NamedEvaluation</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-function-definitions-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">14.7.14</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-async-arrow-function-definitions" title="Async Arrow Function Definitions"><span class="secnum">14.8</span> Async Arrow Function Definitions</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-async-arrow-function-definitions-static-semantics-early-errors" title="Static Semantics: Early Errors"><span class="secnum">14.8.1</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-arrow-function-definitions-static-semantics-CoveredAsyncArrowHead" title="Static Semantics: CoveredAsyncArrowHead"><span class="secnum">14.8.2</span> SS: CoveredAsyncArrowHead</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-arrow-function-definitions-static-semantics-BoundNames" title="Static Semantics: BoundNames"><span class="secnum">14.8.3</span> SS: BoundNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-arrow-function-definitions-static-semantics-Contains" title="Static Semantics: Contains"><span class="secnum">14.8.4</span> SS: Contains</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-arrow-function-definitions-static-semantics-ContainsExpression" title="Static Semantics: ContainsExpression"><span class="secnum">14.8.5</span> SS: ContainsExpression</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-arrow-function-definitions-static-semantics-ExpectedArgumentCount" title="Static Semantics: ExpectedArgumentCount"><span class="secnum">14.8.6</span> SS: ExpectedArgumentCount</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-arrow-function-definitions-static-semantics-HasName" title="Static Semantics: HasName"><span class="secnum">14.8.7</span> SS: HasName</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-arrow-function-definitions-static-semantics-IsSimpleParameterList" title="Static Semantics: IsSimpleParameterList"><span class="secnum">14.8.8</span> SS: IsSimpleParameterList</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-arrow-function-definitions-static-semantics-LexicallyDeclaredNames" title="Static Semantics: LexicallyDeclaredNames"><span class="secnum">14.8.9</span> SS: LexicallyDeclaredNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-arrow-function-definitions-static-semantics-LexicallyScopedDeclarations" title="Static Semantics: LexicallyScopedDeclarations"><span class="secnum">14.8.10</span> SS: LexicallyScopedDeclarations</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-arrow-function-definitions-static-semantics-VarDeclaredNames" title="Static Semantics: VarDeclaredNames"><span class="secnum">14.8.11</span> SS: VarDeclaredNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-arrow-function-definitions-static-semantics-VarScopedDeclarations" title="Static Semantics: VarScopedDeclarations"><span class="secnum">14.8.12</span> SS: VarScopedDeclarations</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-arrow-function-definitions-IteratorBindingInitialization" title="Runtime Semantics: IteratorBindingInitialization"><span class="secnum">14.8.13</span> RS: IteratorBindingInitialization</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-arrow-function-definitions-EvaluateBody" title="Runtime Semantics: EvaluateBody"><span class="secnum">14.8.14</span> RS: EvaluateBody</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-arrow-function-definitions-runtime-semantics-namedevaluation" title="Runtime Semantics: NamedEvaluation"><span class="secnum">14.8.15</span> RS: NamedEvaluation</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-arrow-function-definitions-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">14.8.16</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-tail-position-calls" title="Tail Position Calls"><span class="secnum">14.9</span> Tail Position Calls</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-isintailposition" title="Static Semantics: IsInTailPosition ( call )"><span class="secnum">14.9.1</span> SS: IsInTailPosition ( <var>call</var> )</a></li><li><span class="item-toggle">◢</span><a href="#sec-static-semantics-hascallintailposition" title="Static Semantics: HasCallInTailPosition"><span class="secnum">14.9.2</span> SS: HasCallInTailPosition</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-statement-rules" title="Statement Rules"><span class="secnum">14.9.2.1</span> Statement Rules</a></li><li><span class="item-toggle-none"></span><a href="#sec-expression-rules" title="Expression Rules"><span class="secnum">14.9.2.2</span> Expression Rules</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-preparefortailcall" title="Runtime Semantics: PrepareForTailCall ( )"><span class="secnum">14.9.3</span> RS: PrepareForTailCall ( )</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-ecmascript-language-scripts-and-modules" title="ECMAScript Language: Scripts and Modules"><span class="secnum">15</span> ECMAScript Language: Scripts and Modules</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-scripts" title="Scripts"><span class="secnum">15.1</span> Scripts</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-scripts-static-semantics-early-errors" title="Static Semantics: Early Errors"><span class="secnum">15.1.1</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-static-semantics-isstrict" title="Static Semantics: IsStrict"><span class="secnum">15.1.2</span> SS: IsStrict</a></li><li><span class="item-toggle-none"></span><a href="#sec-scripts-static-semantics-lexicallydeclarednames" title="Static Semantics: LexicallyDeclaredNames"><span class="secnum">15.1.3</span> SS: LexicallyDeclaredNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-scripts-static-semantics-lexicallyscopeddeclarations" title="Static Semantics: LexicallyScopedDeclarations"><span class="secnum">15.1.4</span> SS: LexicallyScopedDeclarations</a></li><li><span class="item-toggle-none"></span><a href="#sec-scripts-static-semantics-vardeclarednames" title="Static Semantics: VarDeclaredNames"><span class="secnum">15.1.5</span> SS: VarDeclaredNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-scripts-static-semantics-varscopeddeclarations" title="Static Semantics: VarScopedDeclarations"><span class="secnum">15.1.6</span> SS: VarScopedDeclarations</a></li><li><span class="item-toggle-none"></span><a href="#sec-script-semantics-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">15.1.7</span> RS: Evaluation</a></li><li><span class="item-toggle-none"></span><a href="#sec-script-records" title="Script Records"><span class="secnum">15.1.8</span> Script Records</a></li><li><span class="item-toggle-none"></span><a href="#sec-parse-script" title="ParseScript ( sourceText, realm, hostDefined )"><span class="secnum">15.1.9</span> ParseScript ( <var>sourceText</var>, <var>realm</var>, <var>hostDefined</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-runtime-semantics-scriptevaluation" title="ScriptEvaluation ( scriptRecord )"><span class="secnum">15.1.10</span> ScriptEvaluation ( <var>scriptRecord</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-globaldeclarationinstantiation" title="Runtime Semantics: GlobalDeclarationInstantiation ( script, env )"><span class="secnum">15.1.11</span> RS: GlobalDeclarationInstantiation ( <var>script</var>, <var>env</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-scriptevaluationjob" title="Runtime Semantics: ScriptEvaluationJob ( sourceText, hostDefined )"><span class="secnum">15.1.12</span> RS: ScriptEvaluationJob ( <var>sourceText</var>, <var>hostDefined</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-modules" title="Modules"><span class="secnum">15.2</span> Modules</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-module-semantics" title="Module Semantics"><span class="secnum">15.2.1</span> Module Semantics</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-module-semantics-static-semantics-early-errors" title="Static Semantics: Early Errors"><span class="secnum">15.2.1.1</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-module-semantics-static-semantics-containsduplicatelabels" title="Static Semantics: ContainsDuplicateLabels"><span class="secnum">15.2.1.2</span> SS: ContainsDuplicateLabels</a></li><li><span class="item-toggle-none"></span><a href="#sec-module-semantics-static-semantics-containsundefinedbreaktarget" title="Static Semantics: ContainsUndefinedBreakTarget"><span class="secnum">15.2.1.3</span> SS: ContainsUndefinedBreakTarget</a></li><li><span class="item-toggle-none"></span><a href="#sec-module-semantics-static-semantics-containsundefinedcontinuetarget" title="Static Semantics: ContainsUndefinedContinueTarget"><span class="secnum">15.2.1.4</span> SS: ContainsUndefinedContinueTarget</a></li><li><span class="item-toggle-none"></span><a href="#sec-module-semantics-static-semantics-exportedbindings" title="Static Semantics: ExportedBindings"><span class="secnum">15.2.1.5</span> SS: ExportedBindings</a></li><li><span class="item-toggle-none"></span><a href="#sec-module-semantics-static-semantics-exportednames" title="Static Semantics: ExportedNames"><span class="secnum">15.2.1.6</span> SS: ExportedNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-module-semantics-static-semantics-exportentries" title="Static Semantics: ExportEntries"><span class="secnum">15.2.1.7</span> SS: ExportEntries</a></li><li><span class="item-toggle-none"></span><a href="#sec-module-semantics-static-semantics-importentries" title="Static Semantics: ImportEntries"><span class="secnum">15.2.1.8</span> SS: ImportEntries</a></li><li><span class="item-toggle-none"></span><a href="#sec-importedlocalnames" title="Static Semantics: ImportedLocalNames ( importEntries )"><span class="secnum">15.2.1.9</span> SS: ImportedLocalNames ( <var>importEntries</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-module-semantics-static-semantics-modulerequests" title="Static Semantics: ModuleRequests"><span class="secnum">15.2.1.10</span> SS: ModuleRequests</a></li><li><span class="item-toggle-none"></span><a href="#sec-module-semantics-static-semantics-lexicallydeclarednames" title="Static Semantics: LexicallyDeclaredNames"><span class="secnum">15.2.1.11</span> SS: LexicallyDeclaredNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-module-semantics-static-semantics-lexicallyscopeddeclarations" title="Static Semantics: LexicallyScopedDeclarations"><span class="secnum">15.2.1.12</span> SS: LexicallyScopedDeclarations</a></li><li><span class="item-toggle-none"></span><a href="#sec-module-semantics-static-semantics-vardeclarednames" title="Static Semantics: VarDeclaredNames"><span class="secnum">15.2.1.13</span> SS: VarDeclaredNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-module-semantics-static-semantics-varscopeddeclarations" title="Static Semantics: VarScopedDeclarations"><span class="secnum">15.2.1.14</span> SS: VarScopedDeclarations</a></li><li><span class="item-toggle-none"></span><a href="#sec-abstract-module-records" title="Abstract Module Records"><span class="secnum">15.2.1.15</span> Abstract Module Records</a></li><li><span class="item-toggle">◢</span><a href="#sec-cyclic-module-records" title="Cyclic Module Records"><span class="secnum">15.2.1.16</span> Cyclic Module Records</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-moduledeclarationinstantiation" title="Instantiate ( ) Concrete Method"><span class="secnum">15.2.1.16.1</span> Instantiate ( ) Concrete Method</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-innermoduleinstantiation" title="InnerModuleInstantiation ( module, stack, index )"><span class="secnum">15.2.1.16.1.1</span> InnerModuleInstantiation ( <var>module</var>, <var>stack</var>, <var>index</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-moduleevaluation" title="Evaluate ( ) Concrete Method"><span class="secnum">15.2.1.16.2</span> Evaluate ( ) Concrete Method</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-innermoduleevaluation" title="InnerModuleEvaluation ( module, stack, index )"><span class="secnum">15.2.1.16.2.1</span> InnerModuleEvaluation ( <var>module</var>, <var>stack</var>, <var>index</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-example-cyclic-module-record-graphs" title="Example Cyclic Module Record Graphs"><span class="secnum">15.2.1.16.3</span> Example Cyclic Module Record Graphs</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-source-text-module-records" title="Source Text Module Records"><span class="secnum">15.2.1.17</span> Source Text Module Records</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-parsemodule" title="ParseModule ( sourceText, realm, hostDefined )"><span class="secnum">15.2.1.17.1</span> ParseModule ( <var>sourceText</var>, <var>realm</var>, <var>hostDefined</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-getexportednames" title="GetExportedNames ( exportStarSet ) Concrete Method"><span class="secnum">15.2.1.17.2</span> GetExportedNames ( <var>exportStarSet</var> ) Concrete Method</a></li><li><span class="item-toggle-none"></span><a href="#sec-resolveexport" title="ResolveExport ( exportName, resolveSet ) Concrete Method"><span class="secnum">15.2.1.17.3</span> ResolveExport ( <var>exportName</var>, <var>resolveSet</var> ) Concrete Method</a></li><li><span class="item-toggle-none"></span><a href="#sec-source-text-module-record-initialize-environment" title="InitializeEnvironment ( ) Concrete Method"><span class="secnum">15.2.1.17.4</span> InitializeEnvironment ( ) Concrete Method</a></li><li><span class="item-toggle-none"></span><a href="#sec-source-text-module-record-execute-module" title="ExecuteModule ( ) Concrete Method"><span class="secnum">15.2.1.17.5</span> ExecuteModule ( ) Concrete Method</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-hostresolveimportedmodule" title="Runtime Semantics: HostResolveImportedModule ( referencingModule, specifier )"><span class="secnum">15.2.1.18</span> RS: HostResolveImportedModule ( <var>referencingModule</var>, <var>specifier</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-getmodulenamespace" title="Runtime Semantics: GetModuleNamespace ( module )"><span class="secnum">15.2.1.19</span> RS: GetModuleNamespace ( <var>module</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-toplevelmoduleevaluationjob" title="Runtime Semantics: TopLevelModuleEvaluationJob ( sourceText, hostDefined )"><span class="secnum">15.2.1.20</span> RS: TopLevelModuleEvaluationJob ( <var>sourceText</var>, <var>hostDefined</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-module-semantics-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">15.2.1.21</span> RS: Evaluation</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-imports" title="Imports"><span class="secnum">15.2.2</span> Imports</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-imports-static-semantics-early-errors" title="Static Semantics: Early Errors"><span class="secnum">15.2.2.1</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-imports-static-semantics-boundnames" title="Static Semantics: BoundNames"><span class="secnum">15.2.2.2</span> SS: BoundNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-imports-static-semantics-importentries" title="Static Semantics: ImportEntries"><span class="secnum">15.2.2.3</span> SS: ImportEntries</a></li><li><span class="item-toggle-none"></span><a href="#sec-static-semantics-importentriesformodule" title="Static Semantics: ImportEntriesForModule"><span class="secnum">15.2.2.4</span> SS: ImportEntriesForModule</a></li><li><span class="item-toggle-none"></span><a href="#sec-imports-static-semantics-modulerequests" title="Static Semantics: ModuleRequests"><span class="secnum">15.2.2.5</span> SS: ModuleRequests</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-exports" title="Exports"><span class="secnum">15.2.3</span> Exports</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-exports-static-semantics-early-errors" title="Static Semantics: Early Errors"><span class="secnum">15.2.3.1</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-exports-static-semantics-boundnames" title="Static Semantics: BoundNames"><span class="secnum">15.2.3.2</span> SS: BoundNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-exports-static-semantics-exportedbindings" title="Static Semantics: ExportedBindings"><span class="secnum">15.2.3.3</span> SS: ExportedBindings</a></li><li><span class="item-toggle-none"></span><a href="#sec-exports-static-semantics-exportednames" title="Static Semantics: ExportedNames"><span class="secnum">15.2.3.4</span> SS: ExportedNames</a></li><li><span class="item-toggle-none"></span><a href="#sec-exports-static-semantics-exportentries" title="Static Semantics: ExportEntries"><span class="secnum">15.2.3.5</span> SS: ExportEntries</a></li><li><span class="item-toggle-none"></span><a href="#sec-static-semantics-exportentriesformodule" title="Static Semantics: ExportEntriesForModule"><span class="secnum">15.2.3.6</span> SS: ExportEntriesForModule</a></li><li><span class="item-toggle-none"></span><a href="#sec-exports-static-semantics-isconstantdeclaration" title="Static Semantics: IsConstantDeclaration"><span class="secnum">15.2.3.7</span> SS: IsConstantDeclaration</a></li><li><span class="item-toggle-none"></span><a href="#sec-exports-static-semantics-lexicallyscopeddeclarations" title="Static Semantics: LexicallyScopedDeclarations"><span class="secnum">15.2.3.8</span> SS: LexicallyScopedDeclarations</a></li><li><span class="item-toggle-none"></span><a href="#sec-exports-static-semantics-modulerequests" title="Static Semantics: ModuleRequests"><span class="secnum">15.2.3.9</span> SS: ModuleRequests</a></li><li><span class="item-toggle-none"></span><a href="#sec-static-semantics-referencedbindings" title="Static Semantics: ReferencedBindings"><span class="secnum">15.2.3.10</span> SS: ReferencedBindings</a></li><li><span class="item-toggle-none"></span><a href="#sec-exports-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">15.2.3.11</span> RS: Evaluation</a></li></ol></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-error-handling-and-language-extensions" title="Error Handling and Language Extensions"><span class="secnum">16</span> Error Handling and Language Extensions</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-host-report-errors" title="HostReportErrors ( errorList )"><span class="secnum">16.1</span> HostReportErrors ( <var>errorList</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-forbidden-extensions" title="Forbidden Extensions"><span class="secnum">16.2</span> Forbidden Extensions</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-ecmascript-standard-built-in-objects" title="ECMAScript Standard Built-in Objects"><span class="secnum">17</span> ECMAScript Standard Built-in Objects</a></li><li><span class="item-toggle">◢</span><a href="#sec-global-object" title="The Global Object"><span class="secnum">18</span> The Global Object</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-value-properties-of-the-global-object" title="Value Properties of the Global Object"><span class="secnum">18.1</span> Value Properties of the Global Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-value-properties-of-the-global-object-infinity" title="Infinity"><span class="secnum">18.1.1</span> Infinity</a></li><li><span class="item-toggle-none"></span><a href="#sec-value-properties-of-the-global-object-nan" title="NaN"><span class="secnum">18.1.2</span> NaN</a></li><li><span class="item-toggle-none"></span><a href="#sec-undefined" title="undefined"><span class="secnum">18.1.3</span> undefined</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-function-properties-of-the-global-object" title="Function Properties of the Global Object"><span class="secnum">18.2</span> Function Properties of the Global Object</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-eval-x" title="eval ( x )"><span class="secnum">18.2.1</span> eval ( <var>x</var> )</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-performeval" title="Runtime Semantics: PerformEval ( x, evalRealm, strictCaller, direct )"><span class="secnum">18.2.1.1</span> RS: PerformEval ( <var>x</var>, <var>evalRealm</var>, <var>strictCaller</var>, <var>direct</var> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-performeval-rules-outside-functions" title="Additional Early Error Rules for Eval Outside Functions"><span class="secnum">18.2.1.1.1</span> Additional Early Error Rules for Eval Outside Functions</a></li><li><span class="item-toggle-none"></span><a href="#sec-performeval-rules-outside-methods" title="Additional Early Error Rules for Eval Outside Methods"><span class="secnum">18.2.1.1.2</span> Additional Early Error Rules for Eval Outside Methods</a></li><li><span class="item-toggle-none"></span><a href="#sec-performeval-rules-outside-constructors" title="Additional Early Error Rules for Eval Outside Constructor Methods"><span class="secnum">18.2.1.1.3</span> Additional Early Error Rules for Eval Outside Constructor Methods</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-hostensurecancompilestrings" title="HostEnsureCanCompileStrings ( callerRealm, calleeRealm )"><span class="secnum">18.2.1.2</span> HostEnsureCanCompileStrings ( <var>callerRealm</var>, <var>calleeRealm</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-evaldeclarationinstantiation" title="Runtime Semantics: EvalDeclarationInstantiation ( body, varEnv, lexEnv, strict )"><span class="secnum">18.2.1.3</span> RS: EvalDeclarationInstantiation ( <var>body</var>, <var>varEnv</var>, <var>lexEnv</var>, <var>strict</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-isfinite-number" title="isFinite ( number )"><span class="secnum">18.2.2</span> isFinite ( <var>number</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-isnan-number" title="isNaN ( number )"><span class="secnum">18.2.3</span> isNaN ( <var>number</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-parsefloat-string" title="parseFloat ( string )"><span class="secnum">18.2.4</span> parseFloat ( <var>string</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-parseint-string-radix" title="parseInt ( string, radix )"><span class="secnum">18.2.5</span> parseInt ( <var>string</var>, <var>radix</var> )</a></li><li><span class="item-toggle">◢</span><a href="#sec-uri-handling-functions" title="URI Handling Functions"><span class="secnum">18.2.6</span> URI Handling Functions</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-uri-syntax-and-semantics" title="URI Syntax and Semantics"><span class="secnum">18.2.6.1</span> URI Syntax and Semantics</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-encode" title="Runtime Semantics: Encode ( string, unescapedSet )"><span class="secnum">18.2.6.1.1</span> RS: Encode ( <var>string</var>, <var>unescapedSet</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-decode" title="Runtime Semantics: Decode ( string, reservedSet )"><span class="secnum">18.2.6.1.2</span> RS: Decode ( <var>string</var>, <var>reservedSet</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-decodeuri-encodeduri" title="decodeURI ( encodedURI )"><span class="secnum">18.2.6.2</span> decodeURI ( <var>encodedURI</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-decodeuricomponent-encodeduricomponent" title="decodeURIComponent ( encodedURIComponent )"><span class="secnum">18.2.6.3</span> decodeURIComponent ( <var>encodedURIComponent</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-encodeuri-uri" title="encodeURI ( uri )"><span class="secnum">18.2.6.4</span> encodeURI ( <var>uri</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-encodeuricomponent-uricomponent" title="encodeURIComponent ( uriComponent )"><span class="secnum">18.2.6.5</span> encodeURIComponent ( <var>uriComponent</var> )</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-constructor-properties-of-the-global-object" title="Constructor Properties of the Global Object"><span class="secnum">18.3</span> Constructor Properties of the Global Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-constructor-properties-of-the-global-object-array" title="Array ( . . . )"><span class="secnum">18.3.1</span> Array ( . . . )</a></li><li><span class="item-toggle-none"></span><a href="#sec-constructor-properties-of-the-global-object-arraybuffer" title="ArrayBuffer ( . . . )"><span class="secnum">18.3.2</span> ArrayBuffer ( . . . )</a></li><li><span class="item-toggle-none"></span><a href="#sec-constructor-properties-of-the-global-object-boolean" title="Boolean ( . . . )"><span class="secnum">18.3.3</span> Boolean ( . . . )</a></li><li><span class="item-toggle-none"></span><a href="#sec-constructor-properties-of-the-global-object-dataview" title="DataView ( . . . )"><span class="secnum">18.3.4</span> DataView ( . . . )</a></li><li><span class="item-toggle-none"></span><a href="#sec-constructor-properties-of-the-global-object-date" title="Date ( . . . )"><span class="secnum">18.3.5</span> Date ( . . . )</a></li><li><span class="item-toggle-none"></span><a href="#sec-constructor-properties-of-the-global-object-error" title="Error ( . . . )"><span class="secnum">18.3.6</span> Error ( . . . )</a></li><li><span class="item-toggle-none"></span><a href="#sec-constructor-properties-of-the-global-object-evalerror" title="EvalError ( . . . )"><span class="secnum">18.3.7</span> EvalError ( . . . )</a></li><li><span class="item-toggle-none"></span><a href="#sec-float32array" title="Float32Array ( . . . )"><span class="secnum">18.3.8</span> Float32Array ( . . . )</a></li><li><span class="item-toggle-none"></span><a href="#sec-float64array" title="Float64Array ( . . . )"><span class="secnum">18.3.9</span> Float64Array ( . . . )</a></li><li><span class="item-toggle-none"></span><a href="#sec-constructor-properties-of-the-global-object-function" title="Function ( . . . )"><span class="secnum">18.3.10</span> Function ( . . . )</a></li><li><span class="item-toggle-none"></span><a href="#sec-int8array" title="Int8Array ( . . . )"><span class="secnum">18.3.11</span> Int8Array ( . . . )</a></li><li><span class="item-toggle-none"></span><a href="#sec-int16array" title="Int16Array ( . . . )"><span class="secnum">18.3.12</span> Int16Array ( . . . )</a></li><li><span class="item-toggle-none"></span><a href="#sec-int32array" title="Int32Array ( . . . )"><span class="secnum">18.3.13</span> Int32Array ( . . . )</a></li><li><span class="item-toggle-none"></span><a href="#sec-map" title="Map ( . . . )"><span class="secnum">18.3.14</span> Map ( . . . )</a></li><li><span class="item-toggle-none"></span><a href="#sec-constructor-properties-of-the-global-object-number" title="Number ( . . . )"><span class="secnum">18.3.15</span> Number ( . . . )</a></li><li><span class="item-toggle-none"></span><a href="#sec-constructor-properties-of-the-global-object-object" title="Object ( . . . )"><span class="secnum">18.3.16</span> Object ( . . . )</a></li><li><span class="item-toggle-none"></span><a href="#sec-constructor-properties-of-the-global-object-promise" title="Promise ( . . . )"><span class="secnum">18.3.17</span> Promise ( . . . )</a></li><li><span class="item-toggle-none"></span><a href="#sec-constructor-properties-of-the-global-object-proxy" title="Proxy ( . . . )"><span class="secnum">18.3.18</span> Proxy ( . . . )</a></li><li><span class="item-toggle-none"></span><a href="#sec-constructor-properties-of-the-global-object-rangeerror" title="RangeError ( . . . )"><span class="secnum">18.3.19</span> RangeError ( . . . )</a></li><li><span class="item-toggle-none"></span><a href="#sec-constructor-properties-of-the-global-object-referenceerror" title="ReferenceError ( . . . )"><span class="secnum">18.3.20</span> ReferenceError ( . . . )</a></li><li><span class="item-toggle-none"></span><a href="#sec-constructor-properties-of-the-global-object-regexp" title="RegExp ( . . . )"><span class="secnum">18.3.21</span> RegExp ( . . . )</a></li><li><span class="item-toggle-none"></span><a href="#sec-set" title="Set ( . . . )"><span class="secnum">18.3.22</span> Set ( . . . )</a></li><li><span class="item-toggle-none"></span><a href="#sec-constructor-properties-of-the-global-object-sharedarraybuffer" title="SharedArrayBuffer ( . . . )"><span class="secnum">18.3.23</span> SharedArrayBuffer ( . . . )</a></li><li><span class="item-toggle-none"></span><a href="#sec-constructor-properties-of-the-global-object-string" title="String ( . . . )"><span class="secnum">18.3.24</span> String ( . . . )</a></li><li><span class="item-toggle-none"></span><a href="#sec-constructor-properties-of-the-global-object-symbol" title="Symbol ( . . . )"><span class="secnum">18.3.25</span> Symbol ( . . . )</a></li><li><span class="item-toggle-none"></span><a href="#sec-constructor-properties-of-the-global-object-syntaxerror" title="SyntaxError ( . . . )"><span class="secnum">18.3.26</span> SyntaxError ( . . . )</a></li><li><span class="item-toggle-none"></span><a href="#sec-constructor-properties-of-the-global-object-typeerror" title="TypeError ( . . . )"><span class="secnum">18.3.27</span> TypeError ( . . . )</a></li><li><span class="item-toggle-none"></span><a href="#sec-uint8array" title="Uint8Array ( . . . )"><span class="secnum">18.3.28</span> Uint8Array ( . . . )</a></li><li><span class="item-toggle-none"></span><a href="#sec-uint8clampedarray" title="Uint8ClampedArray ( . . . )"><span class="secnum">18.3.29</span> Uint8ClampedArray ( . . . )</a></li><li><span class="item-toggle-none"></span><a href="#sec-uint16array" title="Uint16Array ( . . . )"><span class="secnum">18.3.30</span> Uint16Array ( . . . )</a></li><li><span class="item-toggle-none"></span><a href="#sec-uint32array" title="Uint32Array ( . . . )"><span class="secnum">18.3.31</span> Uint32Array ( . . . )</a></li><li><span class="item-toggle-none"></span><a href="#sec-constructor-properties-of-the-global-object-urierror" title="URIError ( . . . )"><span class="secnum">18.3.32</span> URIError ( . . . )</a></li><li><span class="item-toggle-none"></span><a href="#sec-constructor-properties-of-the-global-object-weakmap" title="WeakMap ( . . . )"><span class="secnum">18.3.33</span> WeakMap ( . . . )</a></li><li><span class="item-toggle-none"></span><a href="#sec-constructor-properties-of-the-global-object-weakset" title="WeakSet ( . . . )"><span class="secnum">18.3.34</span> WeakSet ( . . . )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-other-properties-of-the-global-object" title="Other Properties of the Global Object"><span class="secnum">18.4</span> Other Properties of the Global Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-atomics" title="Atomics"><span class="secnum">18.4.1</span> Atomics</a></li><li><span class="item-toggle-none"></span><a href="#sec-json" title="JSON"><span class="secnum">18.4.2</span> JSON</a></li><li><span class="item-toggle-none"></span><a href="#sec-math" title="Math"><span class="secnum">18.4.3</span> Math</a></li><li><span class="item-toggle-none"></span><a href="#sec-reflect" title="Reflect"><span class="secnum">18.4.4</span> Reflect</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-fundamental-objects" title="Fundamental Objects"><span class="secnum">19</span> Fundamental Objects</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-object-objects" title="Object Objects"><span class="secnum">19.1</span> Object Objects</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-object-constructor" title="The Object Constructor"><span class="secnum">19.1.1</span> The Object Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-object-value" title="Object ( [ value ] )"><span class="secnum">19.1.1.1</span> Object ( [ <var>value</var> ] )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-object-constructor" title="Properties of the Object Constructor"><span class="secnum">19.1.2</span> Properties of the Object Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-object.assign" title="Object.assign ( target, ...sources )"><span class="secnum">19.1.2.1</span> Object.assign ( <var>target</var>, ...<var>sources</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-object.create" title="Object.create ( O, Properties )"><span class="secnum">19.1.2.2</span> Object.create ( <var>O</var>, <var>Properties</var> )</a></li><li><span class="item-toggle">◢</span><a href="#sec-object.defineproperties" title="Object.defineProperties ( O, Properties )"><span class="secnum">19.1.2.3</span> Object.defineProperties ( <var>O</var>, <var>Properties</var> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-objectdefineproperties" title="Runtime Semantics: ObjectDefineProperties ( O, Properties )"><span class="secnum">19.1.2.3.1</span> RS: ObjectDefineProperties ( <var>O</var>, <var>Properties</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-object.defineproperty" title="Object.defineProperty ( O, P, Attributes )"><span class="secnum">19.1.2.4</span> Object.defineProperty ( <var>O</var>, <var>P</var>, <var>Attributes</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-object.entries" title="Object.entries ( O )"><span class="secnum">19.1.2.5</span> Object.entries ( <var>O</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-object.freeze" title="Object.freeze ( O )"><span class="secnum">19.1.2.6</span> Object.freeze ( <var>O</var> )</a></li><li><span class="item-toggle">◢</span><a href="#sec-object.fromentries" title="Object.fromEntries ( iterable )"><span class="secnum">19.1.2.7</span> Object.fromEntries ( <var>iterable</var> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-create-data-property-on-object-functions" title="CreateDataPropertyOnObject Functions"><span class="secnum">19.1.2.7.1</span> CreateDataPropertyOnObject Functions</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-object.getownpropertydescriptor" title="Object.getOwnPropertyDescriptor ( O, P )"><span class="secnum">19.1.2.8</span> Object.getOwnPropertyDescriptor ( <var>O</var>, <var>P</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-object.getownpropertydescriptors" title="Object.getOwnPropertyDescriptors ( O )"><span class="secnum">19.1.2.9</span> Object.getOwnPropertyDescriptors ( <var>O</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-object.getownpropertynames" title="Object.getOwnPropertyNames ( O )"><span class="secnum">19.1.2.10</span> Object.getOwnPropertyNames ( <var>O</var> )</a></li><li><span class="item-toggle">◢</span><a href="#sec-object.getownpropertysymbols" title="Object.getOwnPropertySymbols ( O )"><span class="secnum">19.1.2.11</span> Object.getOwnPropertySymbols ( <var>O</var> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-getownpropertykeys" title="Runtime Semantics: GetOwnPropertyKeys ( O, type )"><span class="secnum">19.1.2.11.1</span> RS: GetOwnPropertyKeys ( <var>O</var>, <var>type</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-object.getprototypeof" title="Object.getPrototypeOf ( O )"><span class="secnum">19.1.2.12</span> Object.getPrototypeOf ( <var>O</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-object.is" title="Object.is ( value1, value2 )"><span class="secnum">19.1.2.13</span> Object.is ( <var>value1</var>, <var>value2</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-object.isextensible" title="Object.isExtensible ( O )"><span class="secnum">19.1.2.14</span> Object.isExtensible ( <var>O</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-object.isfrozen" title="Object.isFrozen ( O )"><span class="secnum">19.1.2.15</span> Object.isFrozen ( <var>O</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-object.issealed" title="Object.isSealed ( O )"><span class="secnum">19.1.2.16</span> Object.isSealed ( <var>O</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-object.keys" title="Object.keys ( O )"><span class="secnum">19.1.2.17</span> Object.keys ( <var>O</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-object.preventextensions" title="Object.preventExtensions ( O )"><span class="secnum">19.1.2.18</span> Object.preventExtensions ( <var>O</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-object.prototype" title="Object.prototype"><span class="secnum">19.1.2.19</span> Object.prototype</a></li><li><span class="item-toggle-none"></span><a href="#sec-object.seal" title="Object.seal ( O )"><span class="secnum">19.1.2.20</span> Object.seal ( <var>O</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-object.setprototypeof" title="Object.setPrototypeOf ( O, proto )"><span class="secnum">19.1.2.21</span> Object.setPrototypeOf ( <var>O</var>, <var>proto</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-object.values" title="Object.values ( O )"><span class="secnum">19.1.2.22</span> Object.values ( <var>O</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-object-prototype-object" title="Properties of the Object Prototype Object"><span class="secnum">19.1.3</span> Properties of the Object Prototype Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-object.prototype.constructor" title="Object.prototype.constructor"><span class="secnum">19.1.3.1</span> Object.prototype.constructor</a></li><li><span class="item-toggle-none"></span><a href="#sec-object.prototype.hasownproperty" title="Object.prototype.hasOwnProperty ( V )"><span class="secnum">19.1.3.2</span> Object.prototype.hasOwnProperty ( <var>V</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-object.prototype.isprototypeof" title="Object.prototype.isPrototypeOf ( V )"><span class="secnum">19.1.3.3</span> Object.prototype.isPrototypeOf ( <var>V</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-object.prototype.propertyisenumerable" title="Object.prototype.propertyIsEnumerable ( V )"><span class="secnum">19.1.3.4</span> Object.prototype.propertyIsEnumerable ( <var>V</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-object.prototype.tolocalestring" title="Object.prototype.toLocaleString ( [ reserved1 [ , reserved2 ] ] )"><span class="secnum">19.1.3.5</span> Object.prototype.toLocaleString ( [ <var>reserved1</var> [ , <var>reserved2</var> ] ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-object.prototype.tostring" title="Object.prototype.toString ( )"><span class="secnum">19.1.3.6</span> Object.prototype.toString ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-object.prototype.valueof" title="Object.prototype.valueOf ( )"><span class="secnum">19.1.3.7</span> Object.prototype.valueOf ( )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-properties-of-object-instances" title="Properties of Object Instances"><span class="secnum">19.1.4</span> Properties of Object Instances</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-function-objects" title="Function Objects"><span class="secnum">19.2</span> Function Objects</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-function-constructor" title="The Function Constructor"><span class="secnum">19.2.1</span> The Function Constructor</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-function-p1-p2-pn-body" title="Function ( p1, p2, … , pn, body )"><span class="secnum">19.2.1.1</span> Function ( <var>p1</var>, <var>p2</var>, … , <var>pn</var>, <var>body</var> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-createdynamicfunction" title="Runtime Semantics: CreateDynamicFunction ( constructor, newTarget, kind, args )"><span class="secnum">19.2.1.1.1</span> RS: CreateDynamicFunction ( <var>constructor</var>, <var>newTarget</var>, <var>kind</var>, <var>args</var> )</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-function-constructor" title="Properties of the Function Constructor"><span class="secnum">19.2.2</span> Properties of the Function Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-function.length" title="Function.length"><span class="secnum">19.2.2.1</span> Function.length</a></li><li><span class="item-toggle-none"></span><a href="#sec-function.prototype" title="Function.prototype"><span class="secnum">19.2.2.2</span> Function.prototype</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-function-prototype-object" title="Properties of the Function Prototype Object"><span class="secnum">19.2.3</span> Properties of the Function Prototype Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-function.prototype.apply" title="Function.prototype.apply ( thisArg, argArray )"><span class="secnum">19.2.3.1</span> Function.prototype.apply ( <var>thisArg</var>, <var>argArray</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-function.prototype.bind" title="Function.prototype.bind ( thisArg, ...args )"><span class="secnum">19.2.3.2</span> Function.prototype.bind ( <var>thisArg</var>, ...<var>args</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-function.prototype.call" title="Function.prototype.call ( thisArg, ...args )"><span class="secnum">19.2.3.3</span> Function.prototype.call ( <var>thisArg</var>, ...<var>args</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-function.prototype.constructor" title="Function.prototype.constructor"><span class="secnum">19.2.3.4</span> Function.prototype.constructor</a></li><li><span class="item-toggle-none"></span><a href="#sec-function.prototype.tostring" title="Function.prototype.toString ( )"><span class="secnum">19.2.3.5</span> Function.prototype.toString ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-function.prototype-@@hasinstance" title="Function.prototype [ @@hasInstance ] ( V )"><span class="secnum">19.2.3.6</span> Function.prototype [ @@hasInstance ] ( <var>V</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-function-instances" title="Function Instances"><span class="secnum">19.2.4</span> Function Instances</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-function-instances-length" title="length"><span class="secnum">19.2.4.1</span> length</a></li><li><span class="item-toggle-none"></span><a href="#sec-function-instances-name" title="name"><span class="secnum">19.2.4.2</span> name</a></li><li><span class="item-toggle-none"></span><a href="#sec-function-instances-prototype" title="prototype"><span class="secnum">19.2.4.3</span> prototype</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-hosthassourcetextavailable" title="HostHasSourceTextAvailable ( func )"><span class="secnum">19.2.5</span> HostHasSourceTextAvailable ( <var>func</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-boolean-objects" title="Boolean Objects"><span class="secnum">19.3</span> Boolean Objects</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-boolean-constructor" title="The Boolean Constructor"><span class="secnum">19.3.1</span> The Boolean Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-boolean-constructor-boolean-value" title="Boolean ( value )"><span class="secnum">19.3.1.1</span> Boolean ( <var>value</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-boolean-constructor" title="Properties of the Boolean Constructor"><span class="secnum">19.3.2</span> Properties of the Boolean Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-boolean.prototype" title="Boolean.prototype"><span class="secnum">19.3.2.1</span> Boolean.prototype</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-boolean-prototype-object" title="Properties of the Boolean Prototype Object"><span class="secnum">19.3.3</span> Properties of the Boolean Prototype Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-boolean.prototype.constructor" title="Boolean.prototype.constructor"><span class="secnum">19.3.3.1</span> Boolean.prototype.constructor</a></li><li><span class="item-toggle-none"></span><a href="#sec-boolean.prototype.tostring" title="Boolean.prototype.toString ( )"><span class="secnum">19.3.3.2</span> Boolean.prototype.toString ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-boolean.prototype.valueof" title="Boolean.prototype.valueOf ( )"><span class="secnum">19.3.3.3</span> Boolean.prototype.valueOf ( )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-properties-of-boolean-instances" title="Properties of Boolean Instances"><span class="secnum">19.3.4</span> Properties of Boolean Instances</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-symbol-objects" title="Symbol Objects"><span class="secnum">19.4</span> Symbol Objects</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-symbol-constructor" title="The Symbol Constructor"><span class="secnum">19.4.1</span> The Symbol Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-symbol-description" title="Symbol ( [ description ] )"><span class="secnum">19.4.1.1</span> Symbol ( [ <var>description</var> ] )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-symbol-constructor" title="Properties of the Symbol Constructor"><span class="secnum">19.4.2</span> Properties of the Symbol Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-symbol.asynciterator" title="Symbol.asyncIterator"><span class="secnum">19.4.2.1</span> Symbol.asyncIterator</a></li><li><span class="item-toggle-none"></span><a href="#sec-symbol.for" title="Symbol.for ( key )"><span class="secnum">19.4.2.2</span> Symbol.for ( <var>key</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-symbol.hasinstance" title="Symbol.hasInstance"><span class="secnum">19.4.2.3</span> Symbol.hasInstance</a></li><li><span class="item-toggle-none"></span><a href="#sec-symbol.isconcatspreadable" title="Symbol.isConcatSpreadable"><span class="secnum">19.4.2.4</span> Symbol.isConcatSpreadable</a></li><li><span class="item-toggle-none"></span><a href="#sec-symbol.iterator" title="Symbol.iterator"><span class="secnum">19.4.2.5</span> Symbol.iterator</a></li><li><span class="item-toggle-none"></span><a href="#sec-symbol.keyfor" title="Symbol.keyFor ( sym )"><span class="secnum">19.4.2.6</span> Symbol.keyFor ( <var>sym</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-symbol.match" title="Symbol.match"><span class="secnum">19.4.2.7</span> Symbol.match</a></li><li><span class="item-toggle-none"></span><a href="#sec-symbol.prototype" title="Symbol.prototype"><span class="secnum">19.4.2.8</span> Symbol.prototype</a></li><li><span class="item-toggle-none"></span><a href="#sec-symbol.replace" title="Symbol.replace"><span class="secnum">19.4.2.9</span> Symbol.replace</a></li><li><span class="item-toggle-none"></span><a href="#sec-symbol.search" title="Symbol.search"><span class="secnum">19.4.2.10</span> Symbol.search</a></li><li><span class="item-toggle-none"></span><a href="#sec-symbol.species" title="Symbol.species"><span class="secnum">19.4.2.11</span> Symbol.species</a></li><li><span class="item-toggle-none"></span><a href="#sec-symbol.split" title="Symbol.split"><span class="secnum">19.4.2.12</span> Symbol.split</a></li><li><span class="item-toggle-none"></span><a href="#sec-symbol.toprimitive" title="Symbol.toPrimitive"><span class="secnum">19.4.2.13</span> Symbol.toPrimitive</a></li><li><span class="item-toggle-none"></span><a href="#sec-symbol.tostringtag" title="Symbol.toStringTag"><span class="secnum">19.4.2.14</span> Symbol.toStringTag</a></li><li><span class="item-toggle-none"></span><a href="#sec-symbol.unscopables" title="Symbol.unscopables"><span class="secnum">19.4.2.15</span> Symbol.unscopables</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-symbol-prototype-object" title="Properties of the Symbol Prototype Object"><span class="secnum">19.4.3</span> Properties of the Symbol Prototype Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-symbol.prototype.constructor" title="Symbol.prototype.constructor"><span class="secnum">19.4.3.1</span> Symbol.prototype.constructor</a></li><li><span class="item-toggle-none"></span><a href="#sec-symbol.prototype.description" title="get Symbol.prototype.description"><span class="secnum">19.4.3.2</span> get Symbol.prototype.description</a></li><li><span class="item-toggle">◢</span><a href="#sec-symbol.prototype.tostring" title="Symbol.prototype.toString ( )"><span class="secnum">19.4.3.3</span> Symbol.prototype.toString ( )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-symboldescriptivestring" title="Runtime Semantics: SymbolDescriptiveString ( sym )"><span class="secnum">19.4.3.3.1</span> RS: SymbolDescriptiveString ( <var>sym</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-symbol.prototype.valueof" title="Symbol.prototype.valueOf ( )"><span class="secnum">19.4.3.4</span> Symbol.prototype.valueOf ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-symbol.prototype-@@toprimitive" title="Symbol.prototype [ @@toPrimitive ] ( hint )"><span class="secnum">19.4.3.5</span> Symbol.prototype [ @@toPrimitive ] ( <var>hint</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-symbol.prototype-@@tostringtag" title="Symbol.prototype [ @@toStringTag ]"><span class="secnum">19.4.3.6</span> Symbol.prototype [ @@toStringTag ]</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-properties-of-symbol-instances" title="Properties of Symbol Instances"><span class="secnum">19.4.4</span> Properties of Symbol Instances</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-error-objects" title="Error Objects"><span class="secnum">19.5</span> Error Objects</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-error-constructor" title="The Error Constructor"><span class="secnum">19.5.1</span> The Error Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-error-message" title="Error ( message )"><span class="secnum">19.5.1.1</span> Error ( <var>message</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-error-constructor" title="Properties of the Error Constructor"><span class="secnum">19.5.2</span> Properties of the Error Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-error.prototype" title="Error.prototype"><span class="secnum">19.5.2.1</span> Error.prototype</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-error-prototype-object" title="Properties of the Error Prototype Object"><span class="secnum">19.5.3</span> Properties of the Error Prototype Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-error.prototype.constructor" title="Error.prototype.constructor"><span class="secnum">19.5.3.1</span> Error.prototype.constructor</a></li><li><span class="item-toggle-none"></span><a href="#sec-error.prototype.message" title="Error.prototype.message"><span class="secnum">19.5.3.2</span> Error.prototype.message</a></li><li><span class="item-toggle-none"></span><a href="#sec-error.prototype.name" title="Error.prototype.name"><span class="secnum">19.5.3.3</span> Error.prototype.name</a></li><li><span class="item-toggle-none"></span><a href="#sec-error.prototype.tostring" title="Error.prototype.toString ( )"><span class="secnum">19.5.3.4</span> Error.prototype.toString ( )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-properties-of-error-instances" title="Properties of Error Instances"><span class="secnum">19.5.4</span> Properties of Error Instances</a></li><li><span class="item-toggle">◢</span><a href="#sec-native-error-types-used-in-this-standard" title="Native Error Types Used in This Standard"><span class="secnum">19.5.5</span> Native Error Types Used in This Standard</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-native-error-types-used-in-this-standard-evalerror" title="EvalError"><span class="secnum">19.5.5.1</span> EvalError</a></li><li><span class="item-toggle-none"></span><a href="#sec-native-error-types-used-in-this-standard-rangeerror" title="RangeError"><span class="secnum">19.5.5.2</span> RangeError</a></li><li><span class="item-toggle-none"></span><a href="#sec-native-error-types-used-in-this-standard-referenceerror" title="ReferenceError"><span class="secnum">19.5.5.3</span> ReferenceError</a></li><li><span class="item-toggle-none"></span><a href="#sec-native-error-types-used-in-this-standard-syntaxerror" title="SyntaxError"><span class="secnum">19.5.5.4</span> SyntaxError</a></li><li><span class="item-toggle-none"></span><a href="#sec-native-error-types-used-in-this-standard-typeerror" title="TypeError"><span class="secnum">19.5.5.5</span> TypeError</a></li><li><span class="item-toggle-none"></span><a href="#sec-native-error-types-used-in-this-standard-urierror" title="URIError"><span class="secnum">19.5.5.6</span> URIError</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-nativeerror-object-structure" title="NativeError Object Structure"><span class="secnum">19.5.6</span> <var>NativeError</var> Object Structure</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-nativeerror-constructors" title="The NativeError Constructors"><span class="secnum">19.5.6.1</span> The <var>NativeError</var> Constructors</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-nativeerror" title="NativeError ( message )"><span class="secnum">19.5.6.1.1</span> NativeError ( <var>message</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-nativeerror-constructors" title="Properties of the NativeError Constructors"><span class="secnum">19.5.6.2</span> Properties of the <var>NativeError</var> Constructors</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-nativeerror.prototype" title="NativeError.prototype"><span class="secnum">19.5.6.2.1</span> NativeError.prototype</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-nativeerror-prototype-objects" title="Properties of the NativeError Prototype Objects"><span class="secnum">19.5.6.3</span> Properties of the <var>NativeError</var> Prototype Objects</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-nativeerror.prototype.constructor" title="NativeError.prototype.constructor"><span class="secnum">19.5.6.3.1</span> <var>NativeError</var>.prototype.constructor</a></li><li><span class="item-toggle-none"></span><a href="#sec-nativeerror.prototype.message" title="NativeError.prototype.message"><span class="secnum">19.5.6.3.2</span> <var>NativeError</var>.prototype.message</a></li><li><span class="item-toggle-none"></span><a href="#sec-nativeerror.prototype.name" title="NativeError.prototype.name"><span class="secnum">19.5.6.3.3</span> <var>NativeError</var>.prototype.name</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-properties-of-nativeerror-instances" title="Properties of NativeError Instances"><span class="secnum">19.5.6.4</span> Properties of <var>NativeError</var> Instances</a></li></ol></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-numbers-and-dates" title="Numbers and Dates"><span class="secnum">20</span> Numbers and Dates</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-number-objects" title="Number Objects"><span class="secnum">20.1</span> Number Objects</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-number-constructor" title="The Number Constructor"><span class="secnum">20.1.1</span> The Number Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-number-constructor-number-value" title="Number ( value )"><span class="secnum">20.1.1.1</span> Number ( <var>value</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-number-constructor" title="Properties of the Number Constructor"><span class="secnum">20.1.2</span> Properties of the Number Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-number.epsilon" title="Number.EPSILON"><span class="secnum">20.1.2.1</span> Number.EPSILON</a></li><li><span class="item-toggle-none"></span><a href="#sec-number.isfinite" title="Number.isFinite ( number )"><span class="secnum">20.1.2.2</span> Number.isFinite ( <var>number</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-number.isinteger" title="Number.isInteger ( number )"><span class="secnum">20.1.2.3</span> Number.isInteger ( <var>number</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-number.isnan" title="Number.isNaN ( number )"><span class="secnum">20.1.2.4</span> Number.isNaN ( <var>number</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-number.issafeinteger" title="Number.isSafeInteger ( number )"><span class="secnum">20.1.2.5</span> Number.isSafeInteger ( <var>number</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-number.max_safe_integer" title="Number.MAX_SAFE_INTEGER"><span class="secnum">20.1.2.6</span> Number.MAX_SAFE_INTEGER</a></li><li><span class="item-toggle-none"></span><a href="#sec-number.max_value" title="Number.MAX_VALUE"><span class="secnum">20.1.2.7</span> Number.MAX_VALUE</a></li><li><span class="item-toggle-none"></span><a href="#sec-number.min_safe_integer" title="Number.MIN_SAFE_INTEGER"><span class="secnum">20.1.2.8</span> Number.MIN_SAFE_INTEGER</a></li><li><span class="item-toggle-none"></span><a href="#sec-number.min_value" title="Number.MIN_VALUE"><span class="secnum">20.1.2.9</span> Number.MIN_VALUE</a></li><li><span class="item-toggle-none"></span><a href="#sec-number.nan" title="Number.NaN"><span class="secnum">20.1.2.10</span> Number.NaN</a></li><li><span class="item-toggle-none"></span><a href="#sec-number.negative_infinity" title="Number.NEGATIVE_INFINITY"><span class="secnum">20.1.2.11</span> Number.NEGATIVE_INFINITY</a></li><li><span class="item-toggle-none"></span><a href="#sec-number.parsefloat" title="Number.parseFloat ( string )"><span class="secnum">20.1.2.12</span> Number.parseFloat ( <var>string</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-number.parseint" title="Number.parseInt ( string, radix )"><span class="secnum">20.1.2.13</span> Number.parseInt ( <var>string</var>, <var>radix</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-number.positive_infinity" title="Number.POSITIVE_INFINITY"><span class="secnum">20.1.2.14</span> Number.POSITIVE_INFINITY</a></li><li><span class="item-toggle-none"></span><a href="#sec-number.prototype" title="Number.prototype"><span class="secnum">20.1.2.15</span> Number.prototype</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-number-prototype-object" title="Properties of the Number Prototype Object"><span class="secnum">20.1.3</span> Properties of the Number Prototype Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-number.prototype.constructor" title="Number.prototype.constructor"><span class="secnum">20.1.3.1</span> Number.prototype.constructor</a></li><li><span class="item-toggle-none"></span><a href="#sec-number.prototype.toexponential" title="Number.prototype.toExponential ( fractionDigits )"><span class="secnum">20.1.3.2</span> Number.prototype.toExponential ( <var>fractionDigits</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-number.prototype.tofixed" title="Number.prototype.toFixed ( fractionDigits )"><span class="secnum">20.1.3.3</span> Number.prototype.toFixed ( <var>fractionDigits</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-number.prototype.tolocalestring" title="Number.prototype.toLocaleString ( [ reserved1 [ , reserved2 ] ] )"><span class="secnum">20.1.3.4</span> Number.prototype.toLocaleString ( [ <var>reserved1</var> [ , <var>reserved2</var> ] ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-number.prototype.toprecision" title="Number.prototype.toPrecision ( precision )"><span class="secnum">20.1.3.5</span> Number.prototype.toPrecision ( <var>precision</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-number.prototype.tostring" title="Number.prototype.toString ( [ radix ] )"><span class="secnum">20.1.3.6</span> Number.prototype.toString ( [ <var>radix</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-number.prototype.valueof" title="Number.prototype.valueOf ( )"><span class="secnum">20.1.3.7</span> Number.prototype.valueOf ( )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-properties-of-number-instances" title="Properties of Number Instances"><span class="secnum">20.1.4</span> Properties of Number Instances</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-math-object" title="The Math Object"><span class="secnum">20.2</span> The Math Object</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-value-properties-of-the-math-object" title="Value Properties of the Math Object"><span class="secnum">20.2.1</span> Value Properties of the Math Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-math.e" title="Math.E"><span class="secnum">20.2.1.1</span> Math.E</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.ln10" title="Math.LN10"><span class="secnum">20.2.1.2</span> Math.LN10</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.ln2" title="Math.LN2"><span class="secnum">20.2.1.3</span> Math.LN2</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.log10e" title="Math.LOG10E"><span class="secnum">20.2.1.4</span> Math.LOG10E</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.log2e" title="Math.LOG2E"><span class="secnum">20.2.1.5</span> Math.LOG2E</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.pi" title="Math.PI"><span class="secnum">20.2.1.6</span> Math.PI</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.sqrt1_2" title="Math.SQRT1_2"><span class="secnum">20.2.1.7</span> Math.SQRT1_2</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.sqrt2" title="Math.SQRT2"><span class="secnum">20.2.1.8</span> Math.SQRT2</a></li><li><span class="item-toggle-none"></span><a href="#sec-math-@@tostringtag" title="Math [ @@toStringTag ]"><span class="secnum">20.2.1.9</span> Math [ @@toStringTag ]</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-function-properties-of-the-math-object" title="Function Properties of the Math Object"><span class="secnum">20.2.2</span> Function Properties of the Math Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-math.abs" title="Math.abs ( x )"><span class="secnum">20.2.2.1</span> Math.abs ( <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.acos" title="Math.acos ( x )"><span class="secnum">20.2.2.2</span> Math.acos ( <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.acosh" title="Math.acosh ( x )"><span class="secnum">20.2.2.3</span> Math.acosh ( <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.asin" title="Math.asin ( x )"><span class="secnum">20.2.2.4</span> Math.asin ( <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.asinh" title="Math.asinh ( x )"><span class="secnum">20.2.2.5</span> Math.asinh ( <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.atan" title="Math.atan ( x )"><span class="secnum">20.2.2.6</span> Math.atan ( <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.atanh" title="Math.atanh ( x )"><span class="secnum">20.2.2.7</span> Math.atanh ( <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.atan2" title="Math.atan2 ( y, x )"><span class="secnum">20.2.2.8</span> Math.atan2 ( <var>y</var>, <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.cbrt" title="Math.cbrt ( x )"><span class="secnum">20.2.2.9</span> Math.cbrt ( <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.ceil" title="Math.ceil ( x )"><span class="secnum">20.2.2.10</span> Math.ceil ( <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.clz32" title="Math.clz32 ( x )"><span class="secnum">20.2.2.11</span> Math.clz32 ( <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.cos" title="Math.cos ( x )"><span class="secnum">20.2.2.12</span> Math.cos ( <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.cosh" title="Math.cosh ( x )"><span class="secnum">20.2.2.13</span> Math.cosh ( <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.exp" title="Math.exp ( x )"><span class="secnum">20.2.2.14</span> Math.exp ( <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.expm1" title="Math.expm1 ( x )"><span class="secnum">20.2.2.15</span> Math.expm1 ( <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.floor" title="Math.floor ( x )"><span class="secnum">20.2.2.16</span> Math.floor ( <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.fround" title="Math.fround ( x )"><span class="secnum">20.2.2.17</span> Math.fround ( <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.hypot" title="Math.hypot ( value1, value2, ...values )"><span class="secnum">20.2.2.18</span> Math.hypot ( <var>value1</var>, <var>value2</var>, ...<var>values</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.imul" title="Math.imul ( x, y )"><span class="secnum">20.2.2.19</span> Math.imul ( <var>x</var>, <var>y</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.log" title="Math.log ( x )"><span class="secnum">20.2.2.20</span> Math.log ( <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.log1p" title="Math.log1p ( x )"><span class="secnum">20.2.2.21</span> Math.log1p ( <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.log10" title="Math.log10 ( x )"><span class="secnum">20.2.2.22</span> Math.log10 ( <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.log2" title="Math.log2 ( x )"><span class="secnum">20.2.2.23</span> Math.log2 ( <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.max" title="Math.max ( value1, value2, ...values )"><span class="secnum">20.2.2.24</span> Math.max ( <var>value1</var>, <var>value2</var>, ...<var>values</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.min" title="Math.min ( value1, value2, ...values )"><span class="secnum">20.2.2.25</span> Math.min ( <var>value1</var>, <var>value2</var>, ...<var>values</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.pow" title="Math.pow ( base, exponent )"><span class="secnum">20.2.2.26</span> Math.pow ( <var>base</var>, <var>exponent</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.random" title="Math.random ( )"><span class="secnum">20.2.2.27</span> Math.random ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.round" title="Math.round ( x )"><span class="secnum">20.2.2.28</span> Math.round ( <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.sign" title="Math.sign ( x )"><span class="secnum">20.2.2.29</span> Math.sign ( <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.sin" title="Math.sin ( x )"><span class="secnum">20.2.2.30</span> Math.sin ( <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.sinh" title="Math.sinh ( x )"><span class="secnum">20.2.2.31</span> Math.sinh ( <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.sqrt" title="Math.sqrt ( x )"><span class="secnum">20.2.2.32</span> Math.sqrt ( <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.tan" title="Math.tan ( x )"><span class="secnum">20.2.2.33</span> Math.tan ( <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.tanh" title="Math.tanh ( x )"><span class="secnum">20.2.2.34</span> Math.tanh ( <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-math.trunc" title="Math.trunc ( x )"><span class="secnum">20.2.2.35</span> Math.trunc ( <var>x</var> )</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-date-objects" title="Date Objects"><span class="secnum">20.3</span> Date Objects</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-overview-of-date-objects-and-definitions-of-abstract-operations" title="Overview of Date Objects and Definitions of Abstract Operations"><span class="secnum">20.3.1</span> Overview of Date Objects and Definitions of Abstract Operations</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-time-values-and-time-range" title="Time Values and Time Range"><span class="secnum">20.3.1.1</span> Time Values and Time Range</a></li><li><span class="item-toggle-none"></span><a href="#sec-day-number-and-time-within-day" title="Day Number and Time within Day"><span class="secnum">20.3.1.2</span> Day Number and Time within Day</a></li><li><span class="item-toggle-none"></span><a href="#sec-year-number" title="Year Number"><span class="secnum">20.3.1.3</span> Year Number</a></li><li><span class="item-toggle-none"></span><a href="#sec-month-number" title="Month Number"><span class="secnum">20.3.1.4</span> Month Number</a></li><li><span class="item-toggle-none"></span><a href="#sec-date-number" title="Date Number"><span class="secnum">20.3.1.5</span> Date Number</a></li><li><span class="item-toggle-none"></span><a href="#sec-week-day" title="Week Day"><span class="secnum">20.3.1.6</span> Week Day</a></li><li><span class="item-toggle-none"></span><a href="#sec-local-time-zone-adjustment" title="LocalTZA ( t, isUTC )"><span class="secnum">20.3.1.7</span> LocalTZA ( <var>t</var>, <var>isUTC</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-localtime" title="LocalTime ( t )"><span class="secnum">20.3.1.8</span> LocalTime ( <var>t</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-utc-t" title="UTC ( t )"><span class="secnum">20.3.1.9</span> UTC ( <var>t</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-hours-minutes-second-and-milliseconds" title="Hours, Minutes, Second, and Milliseconds"><span class="secnum">20.3.1.10</span> Hours, Minutes, Second, and Milliseconds</a></li><li><span class="item-toggle-none"></span><a href="#sec-maketime" title="MakeTime ( hour, min, sec, ms )"><span class="secnum">20.3.1.11</span> MakeTime ( <var>hour</var>, <var>min</var>, <var>sec</var>, <var>ms</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-makeday" title="MakeDay ( year, month, date )"><span class="secnum">20.3.1.12</span> MakeDay ( <var>year</var>, <var>month</var>, <var>date</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-makedate" title="MakeDate ( day, time )"><span class="secnum">20.3.1.13</span> MakeDate ( <var>day</var>, <var>time</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-timeclip" title="TimeClip ( time )"><span class="secnum">20.3.1.14</span> TimeClip ( <var>time</var> )</a></li><li><span class="item-toggle">◢</span><a href="#sec-date-time-string-format" title="Date Time String Format"><span class="secnum">20.3.1.15</span> Date Time String Format</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-expanded-years" title="Expanded Years"><span class="secnum">20.3.1.15.1</span> Expanded Years</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-date-constructor" title="The Date Constructor"><span class="secnum">20.3.2</span> The Date Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-date-year-month-date-hours-minutes-seconds-ms" title="Date ( year, month [ , date [ , hours [ , minutes [ , seconds [ , ms ] ] ] ] ] )"><span class="secnum">20.3.2.1</span> Date ( <var>year</var>, <var>month</var> [ , <var>date</var> [ , <var>hours</var> [ , <var>minutes</var> [ , <var>seconds</var> [ , <var>ms</var> ] ] ] ] ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date-value" title="Date ( value )"><span class="secnum">20.3.2.2</span> Date ( <var>value</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date-constructor-date" title="Date ( )"><span class="secnum">20.3.2.3</span> Date ( )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-date-constructor" title="Properties of the Date Constructor"><span class="secnum">20.3.3</span> Properties of the Date Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-date.now" title="Date.now ( )"><span class="secnum">20.3.3.1</span> Date.now ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.parse" title="Date.parse ( string )"><span class="secnum">20.3.3.2</span> Date.parse ( <var>string</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype" title="Date.prototype"><span class="secnum">20.3.3.3</span> Date.prototype</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.utc" title="Date.UTC ( year [ , month [ , date [ , hours [ , minutes [ , seconds [ , ms ] ] ] ] ] ] )"><span class="secnum">20.3.3.4</span> Date.UTC ( <var>year</var> [ , <var>month</var> [ , <var>date</var> [ , <var>hours</var> [ , <var>minutes</var> [ , <var>seconds</var> [ , <var>ms</var> ] ] ] ] ] ] )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-date-prototype-object" title="Properties of the Date Prototype Object"><span class="secnum">20.3.4</span> Properties of the Date Prototype Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.constructor" title="Date.prototype.constructor"><span class="secnum">20.3.4.1</span> Date.prototype.constructor</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.getdate" title="Date.prototype.getDate ( )"><span class="secnum">20.3.4.2</span> Date.prototype.getDate ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.getday" title="Date.prototype.getDay ( )"><span class="secnum">20.3.4.3</span> Date.prototype.getDay ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.getfullyear" title="Date.prototype.getFullYear ( )"><span class="secnum">20.3.4.4</span> Date.prototype.getFullYear ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.gethours" title="Date.prototype.getHours ( )"><span class="secnum">20.3.4.5</span> Date.prototype.getHours ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.getmilliseconds" title="Date.prototype.getMilliseconds ( )"><span class="secnum">20.3.4.6</span> Date.prototype.getMilliseconds ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.getminutes" title="Date.prototype.getMinutes ( )"><span class="secnum">20.3.4.7</span> Date.prototype.getMinutes ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.getmonth" title="Date.prototype.getMonth ( )"><span class="secnum">20.3.4.8</span> Date.prototype.getMonth ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.getseconds" title="Date.prototype.getSeconds ( )"><span class="secnum">20.3.4.9</span> Date.prototype.getSeconds ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.gettime" title="Date.prototype.getTime ( )"><span class="secnum">20.3.4.10</span> Date.prototype.getTime ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.gettimezoneoffset" title="Date.prototype.getTimezoneOffset ( )"><span class="secnum">20.3.4.11</span> Date.prototype.getTimezoneOffset ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.getutcdate" title="Date.prototype.getUTCDate ( )"><span class="secnum">20.3.4.12</span> Date.prototype.getUTCDate ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.getutcday" title="Date.prototype.getUTCDay ( )"><span class="secnum">20.3.4.13</span> Date.prototype.getUTCDay ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.getutcfullyear" title="Date.prototype.getUTCFullYear ( )"><span class="secnum">20.3.4.14</span> Date.prototype.getUTCFullYear ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.getutchours" title="Date.prototype.getUTCHours ( )"><span class="secnum">20.3.4.15</span> Date.prototype.getUTCHours ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.getutcmilliseconds" title="Date.prototype.getUTCMilliseconds ( )"><span class="secnum">20.3.4.16</span> Date.prototype.getUTCMilliseconds ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.getutcminutes" title="Date.prototype.getUTCMinutes ( )"><span class="secnum">20.3.4.17</span> Date.prototype.getUTCMinutes ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.getutcmonth" title="Date.prototype.getUTCMonth ( )"><span class="secnum">20.3.4.18</span> Date.prototype.getUTCMonth ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.getutcseconds" title="Date.prototype.getUTCSeconds ( )"><span class="secnum">20.3.4.19</span> Date.prototype.getUTCSeconds ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.setdate" title="Date.prototype.setDate ( date )"><span class="secnum">20.3.4.20</span> Date.prototype.setDate ( <var>date</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.setfullyear" title="Date.prototype.setFullYear ( year [ , month [ , date ] ] )"><span class="secnum">20.3.4.21</span> Date.prototype.setFullYear ( <var>year</var> [ , <var>month</var> [ , <var>date</var> ] ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.sethours" title="Date.prototype.setHours ( hour [ , min [ , sec [ , ms ] ] ] )"><span class="secnum">20.3.4.22</span> Date.prototype.setHours ( <var>hour</var> [ , <var>min</var> [ , <var>sec</var> [ , <var>ms</var> ] ] ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.setmilliseconds" title="Date.prototype.setMilliseconds ( ms )"><span class="secnum">20.3.4.23</span> Date.prototype.setMilliseconds ( <var>ms</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.setminutes" title="Date.prototype.setMinutes ( min [ , sec [ , ms ] ] )"><span class="secnum">20.3.4.24</span> Date.prototype.setMinutes ( <var>min</var> [ , <var>sec</var> [ , <var>ms</var> ] ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.setmonth" title="Date.prototype.setMonth ( month [ , date ] )"><span class="secnum">20.3.4.25</span> Date.prototype.setMonth ( <var>month</var> [ , <var>date</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.setseconds" title="Date.prototype.setSeconds ( sec [ , ms ] )"><span class="secnum">20.3.4.26</span> Date.prototype.setSeconds ( <var>sec</var> [ , <var>ms</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.settime" title="Date.prototype.setTime ( time )"><span class="secnum">20.3.4.27</span> Date.prototype.setTime ( <var>time</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.setutcdate" title="Date.prototype.setUTCDate ( date )"><span class="secnum">20.3.4.28</span> Date.prototype.setUTCDate ( <var>date</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.setutcfullyear" title="Date.prototype.setUTCFullYear ( year [ , month [ , date ] ] )"><span class="secnum">20.3.4.29</span> Date.prototype.setUTCFullYear ( <var>year</var> [ , <var>month</var> [ , <var>date</var> ] ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.setutchours" title="Date.prototype.setUTCHours ( hour [ , min [ , sec [ , ms ] ] ] )"><span class="secnum">20.3.4.30</span> Date.prototype.setUTCHours ( <var>hour</var> [ , <var>min</var> [ , <var>sec</var> [ , <var>ms</var> ] ] ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.setutcmilliseconds" title="Date.prototype.setUTCMilliseconds ( ms )"><span class="secnum">20.3.4.31</span> Date.prototype.setUTCMilliseconds ( <var>ms</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.setutcminutes" title="Date.prototype.setUTCMinutes ( min [ , sec [ , ms ] ] )"><span class="secnum">20.3.4.32</span> Date.prototype.setUTCMinutes ( <var>min</var> [ , <var>sec</var> [ , <var>ms</var> ] ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.setutcmonth" title="Date.prototype.setUTCMonth ( month [ , date ] )"><span class="secnum">20.3.4.33</span> Date.prototype.setUTCMonth ( <var>month</var> [ , <var>date</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.setutcseconds" title="Date.prototype.setUTCSeconds ( sec [ , ms ] )"><span class="secnum">20.3.4.34</span> Date.prototype.setUTCSeconds ( <var>sec</var> [ , <var>ms</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.todatestring" title="Date.prototype.toDateString ( )"><span class="secnum">20.3.4.35</span> Date.prototype.toDateString ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.toisostring" title="Date.prototype.toISOString ( )"><span class="secnum">20.3.4.36</span> Date.prototype.toISOString ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.tojson" title="Date.prototype.toJSON ( key )"><span class="secnum">20.3.4.37</span> Date.prototype.toJSON ( <var>key</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.tolocaledatestring" title="Date.prototype.toLocaleDateString ( [ reserved1 [ , reserved2 ] ] )"><span class="secnum">20.3.4.38</span> Date.prototype.toLocaleDateString ( [ <var>reserved1</var> [ , <var>reserved2</var> ] ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.tolocalestring" title="Date.prototype.toLocaleString ( [ reserved1 [ , reserved2 ] ] )"><span class="secnum">20.3.4.39</span> Date.prototype.toLocaleString ( [ <var>reserved1</var> [ , <var>reserved2</var> ] ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.tolocaletimestring" title="Date.prototype.toLocaleTimeString ( [ reserved1 [ , reserved2 ] ] )"><span class="secnum">20.3.4.40</span> Date.prototype.toLocaleTimeString ( [ <var>reserved1</var> [ , <var>reserved2</var> ] ] )</a></li><li><span class="item-toggle">◢</span><a href="#sec-date.prototype.tostring" title="Date.prototype.toString ( )"><span class="secnum">20.3.4.41</span> Date.prototype.toString ( )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-timestring" title="Runtime Semantics: TimeString ( tv )"><span class="secnum">20.3.4.41.1</span> RS: TimeString ( <var>tv</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-datestring" title="Runtime Semantics: DateString ( tv )"><span class="secnum">20.3.4.41.2</span> RS: DateString ( <var>tv</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-timezoneestring" title="Runtime Semantics: TimeZoneString ( tv )"><span class="secnum">20.3.4.41.3</span> RS: TimeZoneString ( <var>tv</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-todatestring" title="Runtime Semantics: ToDateString ( tv )"><span class="secnum">20.3.4.41.4</span> RS: ToDateString ( <var>tv</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.totimestring" title="Date.prototype.toTimeString ( )"><span class="secnum">20.3.4.42</span> Date.prototype.toTimeString ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.toutcstring" title="Date.prototype.toUTCString ( )"><span class="secnum">20.3.4.43</span> Date.prototype.toUTCString ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.valueof" title="Date.prototype.valueOf ( )"><span class="secnum">20.3.4.44</span> Date.prototype.valueOf ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype-@@toprimitive" title="Date.prototype [ @@toPrimitive ] ( hint )"><span class="secnum">20.3.4.45</span> Date.prototype [ @@toPrimitive ] ( <var>hint</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-properties-of-date-instances" title="Properties of Date Instances"><span class="secnum">20.3.5</span> Properties of Date Instances</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-text-processing" title="Text Processing"><span class="secnum">21</span> Text Processing</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-string-objects" title="String Objects"><span class="secnum">21.1</span> String Objects</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-string-constructor" title="The String Constructor"><span class="secnum">21.1.1</span> The String Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-string-constructor-string-value" title="String ( value )"><span class="secnum">21.1.1.1</span> String ( <var>value</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-string-constructor" title="Properties of the String Constructor"><span class="secnum">21.1.2</span> Properties of the String Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-string.fromcharcode" title="String.fromCharCode ( ...codeUnits )"><span class="secnum">21.1.2.1</span> String.fromCharCode ( ...<var>codeUnits</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.fromcodepoint" title="String.fromCodePoint ( ...codePoints )"><span class="secnum">21.1.2.2</span> String.fromCodePoint ( ...<var>codePoints</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype" title="String.prototype"><span class="secnum">21.1.2.3</span> String.prototype</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.raw" title="String.raw ( template, ...substitutions )"><span class="secnum">21.1.2.4</span> String.raw ( <var>template</var>, ...<var>substitutions</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-string-prototype-object" title="Properties of the String Prototype Object"><span class="secnum">21.1.3</span> Properties of the String Prototype Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.charat" title="String.prototype.charAt ( pos )"><span class="secnum">21.1.3.1</span> String.prototype.charAt ( <var>pos</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.charcodeat" title="String.prototype.charCodeAt ( pos )"><span class="secnum">21.1.3.2</span> String.prototype.charCodeAt ( <var>pos</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.codepointat" title="String.prototype.codePointAt ( pos )"><span class="secnum">21.1.3.3</span> String.prototype.codePointAt ( <var>pos</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.concat" title="String.prototype.concat ( ...args )"><span class="secnum">21.1.3.4</span> String.prototype.concat ( ...<var>args</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.constructor" title="String.prototype.constructor"><span class="secnum">21.1.3.5</span> String.prototype.constructor</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.endswith" title="String.prototype.endsWith ( searchString [ , endPosition ] )"><span class="secnum">21.1.3.6</span> String.prototype.endsWith ( <var>searchString</var> [ , <var>endPosition</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.includes" title="String.prototype.includes ( searchString [ , position ] )"><span class="secnum">21.1.3.7</span> String.prototype.includes ( <var>searchString</var> [ , <var>position</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.indexof" title="String.prototype.indexOf ( searchString [ , position ] )"><span class="secnum">21.1.3.8</span> String.prototype.indexOf ( <var>searchString</var> [ , <var>position</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.lastindexof" title="String.prototype.lastIndexOf ( searchString [ , position ] )"><span class="secnum">21.1.3.9</span> String.prototype.lastIndexOf ( <var>searchString</var> [ , <var>position</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.localecompare" title="String.prototype.localeCompare ( that [ , reserved1 [ , reserved2 ] ] )"><span class="secnum">21.1.3.10</span> String.prototype.localeCompare ( <var>that</var> [ , <var>reserved1</var> [ , <var>reserved2</var> ] ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.match" title="String.prototype.match ( regexp )"><span class="secnum">21.1.3.11</span> String.prototype.match ( <var>regexp</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.normalize" title="String.prototype.normalize ( [ form ] )"><span class="secnum">21.1.3.12</span> String.prototype.normalize ( [ <var>form</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.padend" title="String.prototype.padEnd ( maxLength [ , fillString ] )"><span class="secnum">21.1.3.13</span> String.prototype.padEnd ( <var>maxLength</var> [ , <var>fillString</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.padstart" title="String.prototype.padStart ( maxLength [ , fillString ] )"><span class="secnum">21.1.3.14</span> String.prototype.padStart ( <var>maxLength</var> [ , <var>fillString</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.repeat" title="String.prototype.repeat ( count )"><span class="secnum">21.1.3.15</span> String.prototype.repeat ( <var>count</var> )</a></li><li><span class="item-toggle">◢</span><a href="#sec-string.prototype.replace" title="String.prototype.replace ( searchValue, replaceValue )"><span class="secnum">21.1.3.16</span> String.prototype.replace ( <var>searchValue</var>, <var>replaceValue</var> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-getsubstitution" title="Runtime Semantics: GetSubstitution ( matched, str, position, captures, namedCaptures, replacement )"><span class="secnum">21.1.3.16.1</span> RS: GetSubstitution ( <var>matched</var>, <var>str</var>, <var>position</var>, <var>captures</var>, <var>namedCaptures</var>, <var>replacement</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.search" title="String.prototype.search ( regexp )"><span class="secnum">21.1.3.17</span> String.prototype.search ( <var>regexp</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.slice" title="String.prototype.slice ( start, end )"><span class="secnum">21.1.3.18</span> String.prototype.slice ( <var>start</var>, <var>end</var> )</a></li><li><span class="item-toggle">◢</span><a href="#sec-string.prototype.split" title="String.prototype.split ( separator, limit )"><span class="secnum">21.1.3.19</span> String.prototype.split ( <var>separator</var>, <var>limit</var> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-splitmatch" title="Runtime Semantics: SplitMatch ( S, q, R )"><span class="secnum">21.1.3.19.1</span> RS: SplitMatch ( <var>S</var>, <var>q</var>, <var>R</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.startswith" title="String.prototype.startsWith ( searchString [ , position ] )"><span class="secnum">21.1.3.20</span> String.prototype.startsWith ( <var>searchString</var> [ , <var>position</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.substring" title="String.prototype.substring ( start, end )"><span class="secnum">21.1.3.21</span> String.prototype.substring ( <var>start</var>, <var>end</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.tolocalelowercase" title="String.prototype.toLocaleLowerCase ( [ reserved1 [ , reserved2 ] ] )"><span class="secnum">21.1.3.22</span> String.prototype.toLocaleLowerCase ( [ <var>reserved1</var> [ , <var>reserved2</var> ] ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.tolocaleuppercase" title="String.prototype.toLocaleUpperCase ( [ reserved1 [ , reserved2 ] ] )"><span class="secnum">21.1.3.23</span> String.prototype.toLocaleUpperCase ( [ <var>reserved1</var> [ , <var>reserved2</var> ] ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.tolowercase" title="String.prototype.toLowerCase ( )"><span class="secnum">21.1.3.24</span> String.prototype.toLowerCase ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.tostring" title="String.prototype.toString ( )"><span class="secnum">21.1.3.25</span> String.prototype.toString ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.touppercase" title="String.prototype.toUpperCase ( )"><span class="secnum">21.1.3.26</span> String.prototype.toUpperCase ( )</a></li><li><span class="item-toggle">◢</span><a href="#sec-string.prototype.trim" title="String.prototype.trim ( )"><span class="secnum">21.1.3.27</span> String.prototype.trim ( )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-trimstring" title="Runtime Semantics: TrimString ( string, where )"><span class="secnum">21.1.3.27.1</span> RS: TrimString ( <var>string</var>, <var>where</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.trimend" title="String.prototype.trimEnd ( )"><span class="secnum">21.1.3.28</span> String.prototype.trimEnd ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.trimstart" title="String.prototype.trimStart ( )"><span class="secnum">21.1.3.29</span> String.prototype.trimStart ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.valueof" title="String.prototype.valueOf ( )"><span class="secnum">21.1.3.30</span> String.prototype.valueOf ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype-@@iterator" title="String.prototype [ @@iterator ] ( )"><span class="secnum">21.1.3.31</span> String.prototype [ @@iterator ] ( )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-string-instances" title="Properties of String Instances"><span class="secnum">21.1.4</span> Properties of String Instances</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-properties-of-string-instances-length" title="length"><span class="secnum">21.1.4.1</span> length</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-string-iterator-objects" title="String Iterator Objects"><span class="secnum">21.1.5</span> String Iterator Objects</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-createstringiterator" title="CreateStringIterator ( string )"><span class="secnum">21.1.5.1</span> CreateStringIterator ( <var>string</var> )</a></li><li><span class="item-toggle">◢</span><a href="#sec-%stringiteratorprototype%-object" title="The %StringIteratorPrototype% Object"><span class="secnum">21.1.5.2</span> The %StringIteratorPrototype% Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-%stringiteratorprototype%.next" title="%StringIteratorPrototype%.next ( )"><span class="secnum">21.1.5.2.1</span> %StringIteratorPrototype%.next ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-%stringiteratorprototype%-@@tostringtag" title="%StringIteratorPrototype% [ @@toStringTag ]"><span class="secnum">21.1.5.2.2</span> %StringIteratorPrototype% [ @@toStringTag ]</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-properties-of-string-iterator-instances" title="Properties of String Iterator Instances"><span class="secnum">21.1.5.3</span> Properties of String Iterator Instances</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-regexp-regular-expression-objects" title="RegExp (Regular Expression) Objects"><span class="secnum">21.2</span> RegExp (Regular Expression) Objects</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-patterns" title="Patterns"><span class="secnum">21.2.1</span> Patterns</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-patterns-static-semantics-early-errors" title="Static Semantics: Early Errors"><span class="secnum">21.2.1.1</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-patterns-static-semantics-capturing-group-number" title="Static Semantics: CapturingGroupNumber"><span class="secnum">21.2.1.2</span> SS: CapturingGroupNumber</a></li><li><span class="item-toggle-none"></span><a href="#sec-patterns-static-semantics-is-character-class" title="Static Semantics: IsCharacterClass"><span class="secnum">21.2.1.3</span> SS: IsCharacterClass</a></li><li><span class="item-toggle-none"></span><a href="#sec-patterns-static-semantics-character-value" title="Static Semantics: CharacterValue"><span class="secnum">21.2.1.4</span> SS: CharacterValue</a></li><li><span class="item-toggle-none"></span><a href="#sec-static-semantics-sourcetext" title="Static Semantics: SourceText"><span class="secnum">21.2.1.5</span> SS: SourceText</a></li><li><span class="item-toggle-none"></span><a href="#sec-regexp-identifier-names-static-semantics-stringvalue" title="Static Semantics: StringValue"><span class="secnum">21.2.1.6</span> SS: StringValue</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-pattern-semantics" title="Pattern Semantics"><span class="secnum">21.2.2</span> Pattern Semantics</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-notation" title="Notation"><span class="secnum">21.2.2.1</span> Notation</a></li><li><span class="item-toggle-none"></span><a href="#sec-pattern" title="Pattern"><span class="secnum">21.2.2.2</span> Pattern</a></li><li><span class="item-toggle-none"></span><a href="#sec-disjunction" title="Disjunction"><span class="secnum">21.2.2.3</span> Disjunction</a></li><li><span class="item-toggle-none"></span><a href="#sec-alternative" title="Alternative"><span class="secnum">21.2.2.4</span> Alternative</a></li><li><span class="item-toggle">◢</span><a href="#sec-term" title="Term"><span class="secnum">21.2.2.5</span> Term</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-runtime-semantics-repeatmatcher-abstract-operation" title="Runtime Semantics: RepeatMatcher ( m, min, max, greedy, x, c, parenIndex, parenCount )"><span class="secnum">21.2.2.5.1</span> RS: RepeatMatcher ( <var>m</var>, <var>min</var>, <var>max</var>, <var>greedy</var>, <var>x</var>, <var>c</var>, <var>parenIndex</var>, <var>parenCount</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-assertion" title="Assertion"><span class="secnum">21.2.2.6</span> Assertion</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-runtime-semantics-wordcharacters-abstract-operation" title="Runtime Semantics: WordCharacters ( )"><span class="secnum">21.2.2.6.1</span> RS: WordCharacters ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-runtime-semantics-iswordchar-abstract-operation" title="Runtime Semantics: IsWordChar ( e )"><span class="secnum">21.2.2.6.2</span> RS: IsWordChar ( <var>e</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-quantifier" title="Quantifier"><span class="secnum">21.2.2.7</span> Quantifier</a></li><li><span class="item-toggle">◢</span><a href="#sec-atom" title="Atom"><span class="secnum">21.2.2.8</span> Atom</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-runtime-semantics-charactersetmatcher-abstract-operation" title="Runtime Semantics: CharacterSetMatcher ( A, invert, direction )"><span class="secnum">21.2.2.8.1</span> RS: CharacterSetMatcher ( <var>A</var>, <var>invert</var>, <var>direction</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-runtime-semantics-canonicalize-ch" title="Runtime Semantics: Canonicalize ( ch )"><span class="secnum">21.2.2.8.2</span> RS: Canonicalize ( <var>ch</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-runtime-semantics-unicodematchproperty-p" title="Runtime Semantics: UnicodeMatchProperty ( p )"><span class="secnum">21.2.2.8.3</span> RS: UnicodeMatchProperty ( <var>p</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-runtime-semantics-unicodematchpropertyvalue-p-v" title="Runtime Semantics: UnicodeMatchPropertyValue ( p, v )"><span class="secnum">21.2.2.8.4</span> RS: UnicodeMatchPropertyValue ( <var>p</var>, <var>v</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-atomescape" title="AtomEscape"><span class="secnum">21.2.2.9</span> AtomEscape</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-backreference-matcher" title="Runtime Semantics: BackreferenceMatcher ( n, direction )"><span class="secnum">21.2.2.9.1</span> RS: BackreferenceMatcher ( <var>n</var>, <var>direction</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-characterescape" title="CharacterEscape"><span class="secnum">21.2.2.10</span> CharacterEscape</a></li><li><span class="item-toggle-none"></span><a href="#sec-decimalescape" title="DecimalEscape"><span class="secnum">21.2.2.11</span> DecimalEscape</a></li><li><span class="item-toggle-none"></span><a href="#sec-characterclassescape" title="CharacterClassEscape"><span class="secnum">21.2.2.12</span> CharacterClassEscape</a></li><li><span class="item-toggle-none"></span><a href="#sec-characterclass" title="CharacterClass"><span class="secnum">21.2.2.13</span> CharacterClass</a></li><li><span class="item-toggle-none"></span><a href="#sec-classranges" title="ClassRanges"><span class="secnum">21.2.2.14</span> ClassRanges</a></li><li><span class="item-toggle">◢</span><a href="#sec-nonemptyclassranges" title="NonemptyClassRanges"><span class="secnum">21.2.2.15</span> NonemptyClassRanges</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-runtime-semantics-characterrange-abstract-operation" title="Runtime Semantics: CharacterRange ( A, B )"><span class="secnum">21.2.2.15.1</span> RS: CharacterRange ( <var>A</var>, <var>B</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-nonemptyclassrangesnodash" title="NonemptyClassRangesNoDash"><span class="secnum">21.2.2.16</span> NonemptyClassRangesNoDash</a></li><li><span class="item-toggle-none"></span><a href="#sec-classatom" title="ClassAtom"><span class="secnum">21.2.2.17</span> ClassAtom</a></li><li><span class="item-toggle-none"></span><a href="#sec-classatomnodash" title="ClassAtomNoDash"><span class="secnum">21.2.2.18</span> ClassAtomNoDash</a></li><li><span class="item-toggle-none"></span><a href="#sec-classescape" title="ClassEscape"><span class="secnum">21.2.2.19</span> ClassEscape</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-regexp-constructor" title="The RegExp Constructor"><span class="secnum">21.2.3</span> The RegExp Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-regexp-pattern-flags" title="RegExp ( pattern, flags )"><span class="secnum">21.2.3.1</span> RegExp ( <var>pattern</var>, <var>flags</var> )</a></li><li><span class="item-toggle">◢</span><a href="#sec-abstract-operations-for-the-regexp-constructor" title="Abstract Operations for the RegExp Constructor"><span class="secnum">21.2.3.2</span> Abstract Operations for the RegExp Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-regexpalloc" title="Runtime Semantics: RegExpAlloc ( newTarget )"><span class="secnum">21.2.3.2.1</span> RS: RegExpAlloc ( <var>newTarget</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-regexpinitialize" title="Runtime Semantics: RegExpInitialize ( obj, pattern, flags )"><span class="secnum">21.2.3.2.2</span> RS: RegExpInitialize ( <var>obj</var>, <var>pattern</var>, <var>flags</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-regexpcreate" title="Runtime Semantics: RegExpCreate ( P, F )"><span class="secnum">21.2.3.2.3</span> RS: RegExpCreate ( <var>P</var>, <var>F</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-escaperegexppattern" title="Runtime Semantics: EscapeRegExpPattern ( P, F )"><span class="secnum">21.2.3.2.4</span> RS: EscapeRegExpPattern ( <var>P</var>, <var>F</var> )</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-regexp-constructor" title="Properties of the RegExp Constructor"><span class="secnum">21.2.4</span> Properties of the RegExp Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-regexp.prototype" title="RegExp.prototype"><span class="secnum">21.2.4.1</span> RegExp.prototype</a></li><li><span class="item-toggle-none"></span><a href="#sec-get-regexp-@@species" title="get RegExp [ @@species ]"><span class="secnum">21.2.4.2</span> get RegExp [ @@species ]</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-regexp-prototype-object" title="Properties of the RegExp Prototype Object"><span class="secnum">21.2.5</span> Properties of the RegExp Prototype Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-regexp.prototype.constructor" title="RegExp.prototype.constructor"><span class="secnum">21.2.5.1</span> RegExp.prototype.constructor</a></li><li><span class="item-toggle">◢</span><a href="#sec-regexp.prototype.exec" title="RegExp.prototype.exec ( string )"><span class="secnum">21.2.5.2</span> RegExp.prototype.exec ( <var>string</var> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-regexpexec" title="Runtime Semantics: RegExpExec ( R, S )"><span class="secnum">21.2.5.2.1</span> RS: RegExpExec ( <var>R</var>, <var>S</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-regexpbuiltinexec" title="Runtime Semantics: RegExpBuiltinExec ( R, S )"><span class="secnum">21.2.5.2.2</span> RS: RegExpBuiltinExec ( <var>R</var>, <var>S</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-advancestringindex" title="AdvanceStringIndex ( S, index, unicode )"><span class="secnum">21.2.5.2.3</span> AdvanceStringIndex ( <var>S</var>, <var>index</var>, <var>unicode</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-get-regexp.prototype.dotAll" title="get RegExp.prototype.dotAll"><span class="secnum">21.2.5.3</span> get RegExp.prototype.dotAll</a></li><li><span class="item-toggle-none"></span><a href="#sec-get-regexp.prototype.flags" title="get RegExp.prototype.flags"><span class="secnum">21.2.5.4</span> get RegExp.prototype.flags</a></li><li><span class="item-toggle-none"></span><a href="#sec-get-regexp.prototype.global" title="get RegExp.prototype.global"><span class="secnum">21.2.5.5</span> get RegExp.prototype.global</a></li><li><span class="item-toggle-none"></span><a href="#sec-get-regexp.prototype.ignorecase" title="get RegExp.prototype.ignoreCase"><span class="secnum">21.2.5.6</span> get RegExp.prototype.ignoreCase</a></li><li><span class="item-toggle-none"></span><a href="#sec-regexp.prototype-@@match" title="RegExp.prototype [ @@match ] ( string )"><span class="secnum">21.2.5.7</span> RegExp.prototype [ @@match ] ( <var>string</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-get-regexp.prototype.multiline" title="get RegExp.prototype.multiline"><span class="secnum">21.2.5.8</span> get RegExp.prototype.multiline</a></li><li><span class="item-toggle-none"></span><a href="#sec-regexp.prototype-@@replace" title="RegExp.prototype [ @@replace ] ( string, replaceValue )"><span class="secnum">21.2.5.9</span> RegExp.prototype [ @@replace ] ( <var>string</var>, <var>replaceValue</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-regexp.prototype-@@search" title="RegExp.prototype [ @@search ] ( string )"><span class="secnum">21.2.5.10</span> RegExp.prototype [ @@search ] ( <var>string</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-get-regexp.prototype.source" title="get RegExp.prototype.source"><span class="secnum">21.2.5.11</span> get RegExp.prototype.source</a></li><li><span class="item-toggle-none"></span><a href="#sec-regexp.prototype-@@split" title="RegExp.prototype [ @@split ] ( string, limit )"><span class="secnum">21.2.5.12</span> RegExp.prototype [ @@split ] ( <var>string</var>, <var>limit</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-get-regexp.prototype.sticky" title="get RegExp.prototype.sticky"><span class="secnum">21.2.5.13</span> get RegExp.prototype.sticky</a></li><li><span class="item-toggle-none"></span><a href="#sec-regexp.prototype.test" title="RegExp.prototype.test ( S )"><span class="secnum">21.2.5.14</span> RegExp.prototype.test ( <var>S</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-regexp.prototype.tostring" title="RegExp.prototype.toString ( )"><span class="secnum">21.2.5.15</span> RegExp.prototype.toString ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-get-regexp.prototype.unicode" title="get RegExp.prototype.unicode"><span class="secnum">21.2.5.16</span> get RegExp.prototype.unicode</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-regexp-instances" title="Properties of RegExp Instances"><span class="secnum">21.2.6</span> Properties of RegExp Instances</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-lastindex" title="lastIndex"><span class="secnum">21.2.6.1</span> lastIndex</a></li></ol></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-indexed-collections" title="Indexed Collections"><span class="secnum">22</span> Indexed Collections</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-array-objects" title="Array Objects"><span class="secnum">22.1</span> Array Objects</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-array-constructor" title="The Array Constructor"><span class="secnum">22.1.1</span> The Array Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-array-constructor-array" title="Array ( )"><span class="secnum">22.1.1.1</span> Array ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-array-len" title="Array ( len )"><span class="secnum">22.1.1.2</span> Array ( <var>len</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-array-items" title="Array ( ...items )"><span class="secnum">22.1.1.3</span> Array ( ...<var>items</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-array-constructor" title="Properties of the Array Constructor"><span class="secnum">22.1.2</span> Properties of the Array Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-array.from" title="Array.from ( items [ , mapfn [ , thisArg ] ] )"><span class="secnum">22.1.2.1</span> Array.from ( <var>items</var> [ , <var>mapfn</var> [ , <var>thisArg</var> ] ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-array.isarray" title="Array.isArray ( arg )"><span class="secnum">22.1.2.2</span> Array.isArray ( <var>arg</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-array.of" title="Array.of ( ...items )"><span class="secnum">22.1.2.3</span> Array.of ( ...<var>items</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-array.prototype" title="Array.prototype"><span class="secnum">22.1.2.4</span> Array.prototype</a></li><li><span class="item-toggle-none"></span><a href="#sec-get-array-@@species" title="get Array [ @@species ]"><span class="secnum">22.1.2.5</span> get Array [ @@species ]</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-array-prototype-object" title="Properties of the Array Prototype Object"><span class="secnum">22.1.3</span> Properties of the Array Prototype Object</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-array.prototype.concat" title="Array.prototype.concat ( ...arguments )"><span class="secnum">22.1.3.1</span> Array.prototype.concat ( ...<var>arguments</var> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-isconcatspreadable" title="Runtime Semantics: IsConcatSpreadable ( O )"><span class="secnum">22.1.3.1.1</span> RS: IsConcatSpreadable ( <var>O</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-array.prototype.constructor" title="Array.prototype.constructor"><span class="secnum">22.1.3.2</span> Array.prototype.constructor</a></li><li><span class="item-toggle-none"></span><a href="#sec-array.prototype.copywithin" title="Array.prototype.copyWithin ( target, start [ , end ] )"><span class="secnum">22.1.3.3</span> Array.prototype.copyWithin ( <var>target</var>, <var>start</var> [ , <var>end</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-array.prototype.entries" title="Array.prototype.entries ( )"><span class="secnum">22.1.3.4</span> Array.prototype.entries ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-array.prototype.every" title="Array.prototype.every ( callbackfn [ , thisArg ] )"><span class="secnum">22.1.3.5</span> Array.prototype.every ( <var>callbackfn</var> [ , <var>thisArg</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-array.prototype.fill" title="Array.prototype.fill ( value [ , start [ , end ] ] )"><span class="secnum">22.1.3.6</span> Array.prototype.fill ( <var>value</var> [ , <var>start</var> [ , <var>end</var> ] ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-array.prototype.filter" title="Array.prototype.filter ( callbackfn [ , thisArg ] )"><span class="secnum">22.1.3.7</span> Array.prototype.filter ( <var>callbackfn</var> [ , <var>thisArg</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-array.prototype.find" title="Array.prototype.find ( predicate [ , thisArg ] )"><span class="secnum">22.1.3.8</span> Array.prototype.find ( <var>predicate</var> [ , <var>thisArg</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-array.prototype.findindex" title="Array.prototype.findIndex ( predicate [ , thisArg ] )"><span class="secnum">22.1.3.9</span> Array.prototype.findIndex ( <var>predicate</var> [ , <var>thisArg</var> ] )</a></li><li><span class="item-toggle">◢</span><a href="#sec-array.prototype.flat" title="Array.prototype.flat( [ depth ] )"><span class="secnum">22.1.3.10</span> Array.prototype.flat( [ <var>depth</var> ] )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-flattenintoarray" title="FlattenIntoArray(target, source, sourceLen, start, depth [ , mapperFunction, thisArg ])"><span class="secnum">22.1.3.10.1</span> FlattenIntoArray(<var>target</var>, <var>source</var>, <var>sourceLen</var>, <var>start</var>, <var>depth</var> [ , <var>mapperFunction</var>, <var>thisArg</var> ])</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-array.prototype.flatmap" title="Array.prototype.flatMap ( mapperFunction [ , thisArg ] )"><span class="secnum">22.1.3.11</span> Array.prototype.flatMap ( <var>mapperFunction</var> [ , <var>thisArg</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-array.prototype.foreach" title="Array.prototype.forEach ( callbackfn [ , thisArg ] )"><span class="secnum">22.1.3.12</span> Array.prototype.forEach ( <var>callbackfn</var> [ , <var>thisArg</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-array.prototype.includes" title="Array.prototype.includes ( searchElement [ , fromIndex ] )"><span class="secnum">22.1.3.13</span> Array.prototype.includes ( <var>searchElement</var> [ , <var>fromIndex</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-array.prototype.indexof" title="Array.prototype.indexOf ( searchElement [ , fromIndex ] )"><span class="secnum">22.1.3.14</span> Array.prototype.indexOf ( <var>searchElement</var> [ , <var>fromIndex</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-array.prototype.join" title="Array.prototype.join ( separator )"><span class="secnum">22.1.3.15</span> Array.prototype.join ( <var>separator</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-array.prototype.keys" title="Array.prototype.keys ( )"><span class="secnum">22.1.3.16</span> Array.prototype.keys ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-array.prototype.lastindexof" title="Array.prototype.lastIndexOf ( searchElement [ , fromIndex ] )"><span class="secnum">22.1.3.17</span> Array.prototype.lastIndexOf ( <var>searchElement</var> [ , <var>fromIndex</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-array.prototype.map" title="Array.prototype.map ( callbackfn [ , thisArg ] )"><span class="secnum">22.1.3.18</span> Array.prototype.map ( <var>callbackfn</var> [ , <var>thisArg</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-array.prototype.pop" title="Array.prototype.pop ( )"><span class="secnum">22.1.3.19</span> Array.prototype.pop ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-array.prototype.push" title="Array.prototype.push ( ...items )"><span class="secnum">22.1.3.20</span> Array.prototype.push ( ...<var>items</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-array.prototype.reduce" title="Array.prototype.reduce ( callbackfn [ , initialValue ] )"><span class="secnum">22.1.3.21</span> Array.prototype.reduce ( <var>callbackfn</var> [ , <var>initialValue</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-array.prototype.reduceright" title="Array.prototype.reduceRight ( callbackfn [ , initialValue ] )"><span class="secnum">22.1.3.22</span> Array.prototype.reduceRight ( <var>callbackfn</var> [ , <var>initialValue</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-array.prototype.reverse" title="Array.prototype.reverse ( )"><span class="secnum">22.1.3.23</span> Array.prototype.reverse ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-array.prototype.shift" title="Array.prototype.shift ( )"><span class="secnum">22.1.3.24</span> Array.prototype.shift ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-array.prototype.slice" title="Array.prototype.slice ( start, end )"><span class="secnum">22.1.3.25</span> Array.prototype.slice ( <var>start</var>, <var>end</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-array.prototype.some" title="Array.prototype.some ( callbackfn [ , thisArg ] )"><span class="secnum">22.1.3.26</span> Array.prototype.some ( <var>callbackfn</var> [ , <var>thisArg</var> ] )</a></li><li><span class="item-toggle">◢</span><a href="#sec-array.prototype.sort" title="Array.prototype.sort ( comparefn )"><span class="secnum">22.1.3.27</span> Array.prototype.sort ( <var>comparefn</var> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-sortcompare" title="Runtime Semantics: SortCompare ( x, y )"><span class="secnum">22.1.3.27.1</span> RS: SortCompare ( <var>x</var>, <var>y</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-array.prototype.splice" title="Array.prototype.splice ( start, deleteCount, ...items )"><span class="secnum">22.1.3.28</span> Array.prototype.splice ( <var>start</var>, <var>deleteCount</var>, ...<var>items</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-array.prototype.tolocalestring" title="Array.prototype.toLocaleString ( [ reserved1 [ , reserved2 ] ] )"><span class="secnum">22.1.3.29</span> Array.prototype.toLocaleString ( [ <var>reserved1</var> [ , <var>reserved2</var> ] ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-array.prototype.tostring" title="Array.prototype.toString ( )"><span class="secnum">22.1.3.30</span> Array.prototype.toString ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-array.prototype.unshift" title="Array.prototype.unshift ( ...items )"><span class="secnum">22.1.3.31</span> Array.prototype.unshift ( ...<var>items</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-array.prototype.values" title="Array.prototype.values ( )"><span class="secnum">22.1.3.32</span> Array.prototype.values ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-array.prototype-@@iterator" title="Array.prototype [ @@iterator ] ( )"><span class="secnum">22.1.3.33</span> Array.prototype [ @@iterator ] ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-array.prototype-@@unscopables" title="Array.prototype [ @@unscopables ]"><span class="secnum">22.1.3.34</span> Array.prototype [ @@unscopables ]</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-array-instances" title="Properties of Array Instances"><span class="secnum">22.1.4</span> Properties of Array Instances</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-properties-of-array-instances-length" title="length"><span class="secnum">22.1.4.1</span> length</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-array-iterator-objects" title="Array Iterator Objects"><span class="secnum">22.1.5</span> Array Iterator Objects</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-createarrayiterator" title="CreateArrayIterator ( array, kind )"><span class="secnum">22.1.5.1</span> CreateArrayIterator ( <var>array</var>, <var>kind</var> )</a></li><li><span class="item-toggle">◢</span><a href="#sec-%arrayiteratorprototype%-object" title="The %ArrayIteratorPrototype% Object"><span class="secnum">22.1.5.2</span> The %ArrayIteratorPrototype% Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-%arrayiteratorprototype%.next" title="%ArrayIteratorPrototype%.next ( )"><span class="secnum">22.1.5.2.1</span> %ArrayIteratorPrototype%.next ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-%arrayiteratorprototype%-@@tostringtag" title="%ArrayIteratorPrototype% [ @@toStringTag ]"><span class="secnum">22.1.5.2.2</span> %ArrayIteratorPrototype% [ @@toStringTag ]</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-properties-of-array-iterator-instances" title="Properties of Array Iterator Instances"><span class="secnum">22.1.5.3</span> Properties of Array Iterator Instances</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-typedarray-objects" title="TypedArray Objects"><span class="secnum">22.2</span> TypedArray Objects</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-%typedarray%-intrinsic-object" title="The %TypedArray% Intrinsic Object"><span class="secnum">22.2.1</span> The %TypedArray% Intrinsic Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-%typedarray%" title="%TypedArray% ( )"><span class="secnum">22.2.1.1</span> %TypedArray% ( )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-%typedarray%-intrinsic-object" title="Properties of the %TypedArray% Intrinsic Object"><span class="secnum">22.2.2</span> Properties of the %TypedArray% Intrinsic Object</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-%typedarray%.from" title="%TypedArray%.from ( source [ , mapfn [ , thisArg ] ] )"><span class="secnum">22.2.2.1</span> %TypedArray%.from ( <var>source</var> [ , <var>mapfn</var> [ , <var>thisArg</var> ] ] )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-iterabletolist" title="Runtime Semantics: IterableToList ( items, method )"><span class="secnum">22.2.2.1.1</span> RS: IterableToList ( <var>items</var>, <var>method</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-%typedarray%.of" title="%TypedArray%.of ( ...items )"><span class="secnum">22.2.2.2</span> %TypedArray%.of ( ...<var>items</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-%typedarray%.prototype" title="%TypedArray%.prototype"><span class="secnum">22.2.2.3</span> %TypedArray%.prototype</a></li><li><span class="item-toggle-none"></span><a href="#sec-get-%typedarray%-@@species" title="get %TypedArray% [ @@species ]"><span class="secnum">22.2.2.4</span> get %TypedArray% [ @@species ]</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-%typedarrayprototype%-object" title="Properties of the %TypedArrayPrototype% Object"><span class="secnum">22.2.3</span> Properties of the %TypedArrayPrototype% Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-get-%typedarray%.prototype.buffer" title="get %TypedArray%.prototype.buffer"><span class="secnum">22.2.3.1</span> get %TypedArray%.prototype.buffer</a></li><li><span class="item-toggle-none"></span><a href="#sec-get-%typedarray%.prototype.bytelength" title="get %TypedArray%.prototype.byteLength"><span class="secnum">22.2.3.2</span> get %TypedArray%.prototype.byteLength</a></li><li><span class="item-toggle-none"></span><a href="#sec-get-%typedarray%.prototype.byteoffset" title="get %TypedArray%.prototype.byteOffset"><span class="secnum">22.2.3.3</span> get %TypedArray%.prototype.byteOffset</a></li><li><span class="item-toggle-none"></span><a href="#sec-%typedarray%.prototype.constructor" title="%TypedArray%.prototype.constructor"><span class="secnum">22.2.3.4</span> %TypedArray%.prototype.constructor</a></li><li><span class="item-toggle">◢</span><a href="#sec-%typedarray%.prototype.copywithin" title="%TypedArray%.prototype.copyWithin ( target, start [ , end ] )"><span class="secnum">22.2.3.5</span> %TypedArray%.prototype.copyWithin ( <var>target</var>, <var>start</var> [ , <var>end</var> ] )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-validatetypedarray" title="Runtime Semantics: ValidateTypedArray ( O )"><span class="secnum">22.2.3.5.1</span> RS: ValidateTypedArray ( <var>O</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-%typedarray%.prototype.entries" title="%TypedArray%.prototype.entries ( )"><span class="secnum">22.2.3.6</span> %TypedArray%.prototype.entries ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-%typedarray%.prototype.every" title="%TypedArray%.prototype.every ( callbackfn [ , thisArg ] )"><span class="secnum">22.2.3.7</span> %TypedArray%.prototype.every ( <var>callbackfn</var> [ , <var>thisArg</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-%typedarray%.prototype.fill" title="%TypedArray%.prototype.fill ( value [ , start [ , end ] ] )"><span class="secnum">22.2.3.8</span> %TypedArray%.prototype.fill ( <var>value</var> [ , <var>start</var> [ , <var>end</var> ] ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-%typedarray%.prototype.filter" title="%TypedArray%.prototype.filter ( callbackfn [ , thisArg ] )"><span class="secnum">22.2.3.9</span> %TypedArray%.prototype.filter ( <var>callbackfn</var> [ , <var>thisArg</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-%typedarray%.prototype.find" title="%TypedArray%.prototype.find ( predicate [ , thisArg ] )"><span class="secnum">22.2.3.10</span> %TypedArray%.prototype.find ( <var>predicate</var> [ , <var>thisArg</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-%typedarray%.prototype.findindex" title="%TypedArray%.prototype.findIndex ( predicate [ , thisArg ] )"><span class="secnum">22.2.3.11</span> %TypedArray%.prototype.findIndex ( <var>predicate</var> [ , <var>thisArg</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-%typedarray%.prototype.foreach" title="%TypedArray%.prototype.forEach ( callbackfn [ , thisArg ] )"><span class="secnum">22.2.3.12</span> %TypedArray%.prototype.forEach ( <var>callbackfn</var> [ , <var>thisArg</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-%typedarray%.prototype.includes" title="%TypedArray%.prototype.includes ( searchElement [ , fromIndex ] )"><span class="secnum">22.2.3.13</span> %TypedArray%.prototype.includes ( <var>searchElement</var> [ , <var>fromIndex</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-%typedarray%.prototype.indexof" title="%TypedArray%.prototype.indexOf ( searchElement [ , fromIndex ] )"><span class="secnum">22.2.3.14</span> %TypedArray%.prototype.indexOf ( <var>searchElement</var> [ , <var>fromIndex</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-%typedarray%.prototype.join" title="%TypedArray%.prototype.join ( separator )"><span class="secnum">22.2.3.15</span> %TypedArray%.prototype.join ( <var>separator</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-%typedarray%.prototype.keys" title="%TypedArray%.prototype.keys ( )"><span class="secnum">22.2.3.16</span> %TypedArray%.prototype.keys ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-%typedarray%.prototype.lastindexof" title="%TypedArray%.prototype.lastIndexOf ( searchElement [ , fromIndex ] )"><span class="secnum">22.2.3.17</span> %TypedArray%.prototype.lastIndexOf ( <var>searchElement</var> [ , <var>fromIndex</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-get-%typedarray%.prototype.length" title="get %TypedArray%.prototype.length"><span class="secnum">22.2.3.18</span> get %TypedArray%.prototype.length</a></li><li><span class="item-toggle-none"></span><a href="#sec-%typedarray%.prototype.map" title="%TypedArray%.prototype.map ( callbackfn [ , thisArg ] )"><span class="secnum">22.2.3.19</span> %TypedArray%.prototype.map ( <var>callbackfn</var> [ , <var>thisArg</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-%typedarray%.prototype.reduce" title="%TypedArray%.prototype.reduce ( callbackfn [ , initialValue ] )"><span class="secnum">22.2.3.20</span> %TypedArray%.prototype.reduce ( <var>callbackfn</var> [ , <var>initialValue</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-%typedarray%.prototype.reduceright" title="%TypedArray%.prototype.reduceRight ( callbackfn [ , initialValue ] )"><span class="secnum">22.2.3.21</span> %TypedArray%.prototype.reduceRight ( <var>callbackfn</var> [ , <var>initialValue</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-%typedarray%.prototype.reverse" title="%TypedArray%.prototype.reverse ( )"><span class="secnum">22.2.3.22</span> %TypedArray%.prototype.reverse ( )</a></li><li><span class="item-toggle">◢</span><a href="#sec-%typedarray%.prototype.set-overloaded-offset" title="%TypedArray%.prototype.set ( overloaded [ , offset ] )"><span class="secnum">22.2.3.23</span> %TypedArray%.prototype.set ( <var>overloaded</var> [ , <var>offset</var> ] )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-%typedarray%.prototype.set-array-offset" title="%TypedArray%.prototype.set ( array [ , offset ] )"><span class="secnum">22.2.3.23.1</span> %TypedArray%.prototype.set ( <var>array</var> [ , <var>offset</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-%typedarray%.prototype.set-typedarray-offset" title="%TypedArray%.prototype.set ( typedArray [ , offset ] )"><span class="secnum">22.2.3.23.2</span> %TypedArray%.prototype.set ( <var>typedArray</var> [ , <var>offset</var> ] )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-%typedarray%.prototype.slice" title="%TypedArray%.prototype.slice ( start, end )"><span class="secnum">22.2.3.24</span> %TypedArray%.prototype.slice ( <var>start</var>, <var>end</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-%typedarray%.prototype.some" title="%TypedArray%.prototype.some ( callbackfn [ , thisArg ] )"><span class="secnum">22.2.3.25</span> %TypedArray%.prototype.some ( <var>callbackfn</var> [ , <var>thisArg</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-%typedarray%.prototype.sort" title="%TypedArray%.prototype.sort ( comparefn )"><span class="secnum">22.2.3.26</span> %TypedArray%.prototype.sort ( <var>comparefn</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-%typedarray%.prototype.subarray" title="%TypedArray%.prototype.subarray ( begin, end )"><span class="secnum">22.2.3.27</span> %TypedArray%.prototype.subarray ( <var>begin</var>, <var>end</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-%typedarray%.prototype.tolocalestring" title="%TypedArray%.prototype.toLocaleString ( [ reserved1 [ , reserved2 ] ] )"><span class="secnum">22.2.3.28</span> %TypedArray%.prototype.toLocaleString ( [ <var>reserved1</var> [ , <var>reserved2</var> ] ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-%typedarray%.prototype.tostring" title="%TypedArray%.prototype.toString ( )"><span class="secnum">22.2.3.29</span> %TypedArray%.prototype.toString ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-%typedarray%.prototype.values" title="%TypedArray%.prototype.values ( )"><span class="secnum">22.2.3.30</span> %TypedArray%.prototype.values ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-%typedarray%.prototype-@@iterator" title="%TypedArray%.prototype [ @@iterator ] ( )"><span class="secnum">22.2.3.31</span> %TypedArray%.prototype [ @@iterator ] ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-get-%typedarray%.prototype-@@tostringtag" title="get %TypedArray%.prototype [ @@toStringTag ]"><span class="secnum">22.2.3.32</span> get %TypedArray%.prototype [ @@toStringTag ]</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-typedarray-constructors" title="The TypedArray Constructors"><span class="secnum">22.2.4</span> The <var>TypedArray</var> Constructors</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-typedarray" title="TypedArray ( )"><span class="secnum">22.2.4.1</span> <var>TypedArray</var> ( )</a></li><li><span class="item-toggle">◢</span><a href="#sec-typedarray-length" title="TypedArray ( length )"><span class="secnum">22.2.4.2</span> <var>TypedArray</var> ( <var>length</var> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-allocatetypedarray" title="Runtime Semantics: AllocateTypedArray ( constructorName, newTarget, defaultProto [ , length ] )"><span class="secnum">22.2.4.2.1</span> RS: AllocateTypedArray ( <var>constructorName</var>, <var>newTarget</var>, <var>defaultProto</var> [ , <var>length</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-allocatetypedarraybuffer" title="Runtime Semantics: AllocateTypedArrayBuffer ( O, length )"><span class="secnum">22.2.4.2.2</span> RS: AllocateTypedArrayBuffer ( <var>O</var>, <var>length</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-typedarray-typedarray" title="TypedArray ( typedArray )"><span class="secnum">22.2.4.3</span> <var>TypedArray</var> ( <var>typedArray</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-typedarray-object" title="TypedArray ( object )"><span class="secnum">22.2.4.4</span> <var>TypedArray</var> ( <var>object</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-typedarray-buffer-byteoffset-length" title="TypedArray ( buffer [ , byteOffset [ , length ] ] )"><span class="secnum">22.2.4.5</span> <var>TypedArray</var> ( <var>buffer</var> [ , <var>byteOffset</var> [ , <var>length</var> ] ] )</a></li><li><span class="item-toggle-none"></span><a href="#typedarray-create" title="TypedArrayCreate ( constructor, argumentList )"><span class="secnum">22.2.4.6</span> TypedArrayCreate ( <var>constructor</var>, <var>argumentList</var> )</a></li><li><span class="item-toggle-none"></span><a href="#typedarray-species-create" title="TypedArraySpeciesCreate ( exemplar, argumentList )"><span class="secnum">22.2.4.7</span> TypedArraySpeciesCreate ( <var>exemplar</var>, <var>argumentList</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-typedarray-constructors" title="Properties of the TypedArray Constructors"><span class="secnum">22.2.5</span> Properties of the <var>TypedArray</var> Constructors</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-typedarray.bytes_per_element" title="TypedArray.BYTES_PER_ELEMENT"><span class="secnum">22.2.5.1</span> <var>TypedArray</var>.BYTES_PER_ELEMENT</a></li><li><span class="item-toggle-none"></span><a href="#sec-typedarray.prototype" title="TypedArray.prototype"><span class="secnum">22.2.5.2</span> <var>TypedArray</var>.prototype</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-typedarray-prototype-objects" title="Properties of the TypedArray Prototype Objects"><span class="secnum">22.2.6</span> Properties of the <var>TypedArray</var> Prototype Objects</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-typedarray.prototype.bytes_per_element" title="TypedArray.prototype.BYTES_PER_ELEMENT"><span class="secnum">22.2.6.1</span> <var>TypedArray</var>.prototype.BYTES_PER_ELEMENT</a></li><li><span class="item-toggle-none"></span><a href="#sec-typedarray.prototype.constructor" title="TypedArray.prototype.constructor"><span class="secnum">22.2.6.2</span> <var>TypedArray</var>.prototype.constructor</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-properties-of-typedarray-instances" title="Properties of TypedArray Instances"><span class="secnum">22.2.7</span> Properties of <var>TypedArray</var> Instances</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-keyed-collections" title="Keyed Collections"><span class="secnum">23</span> Keyed Collections</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-map-objects" title="Map Objects"><span class="secnum">23.1</span> Map Objects</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-map-constructor" title="The Map Constructor"><span class="secnum">23.1.1</span> The Map Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-map-iterable" title="Map ( [ iterable ] )"><span class="secnum">23.1.1.1</span> Map ( [ <var>iterable</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-add-entries-from-iterable" title="AddEntriesFromIterable ( target, iterable, adder )"><span class="secnum">23.1.1.2</span> AddEntriesFromIterable ( <var>target</var>, <var>iterable</var>, <var>adder</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-map-constructor" title="Properties of the Map Constructor"><span class="secnum">23.1.2</span> Properties of the Map Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-map.prototype" title="Map.prototype"><span class="secnum">23.1.2.1</span> Map.prototype</a></li><li><span class="item-toggle-none"></span><a href="#sec-get-map-@@species" title="get Map [ @@species ]"><span class="secnum">23.1.2.2</span> get Map [ @@species ]</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-map-prototype-object" title="Properties of the Map Prototype Object"><span class="secnum">23.1.3</span> Properties of the Map Prototype Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-map.prototype.clear" title="Map.prototype.clear ( )"><span class="secnum">23.1.3.1</span> Map.prototype.clear ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-map.prototype.constructor" title="Map.prototype.constructor"><span class="secnum">23.1.3.2</span> Map.prototype.constructor</a></li><li><span class="item-toggle-none"></span><a href="#sec-map.prototype.delete" title="Map.prototype.delete ( key )"><span class="secnum">23.1.3.3</span> Map.prototype.delete ( <var>key</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-map.prototype.entries" title="Map.prototype.entries ( )"><span class="secnum">23.1.3.4</span> Map.prototype.entries ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-map.prototype.foreach" title="Map.prototype.forEach ( callbackfn [ , thisArg ] )"><span class="secnum">23.1.3.5</span> Map.prototype.forEach ( <var>callbackfn</var> [ , <var>thisArg</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-map.prototype.get" title="Map.prototype.get ( key )"><span class="secnum">23.1.3.6</span> Map.prototype.get ( <var>key</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-map.prototype.has" title="Map.prototype.has ( key )"><span class="secnum">23.1.3.7</span> Map.prototype.has ( <var>key</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-map.prototype.keys" title="Map.prototype.keys ( )"><span class="secnum">23.1.3.8</span> Map.prototype.keys ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-map.prototype.set" title="Map.prototype.set ( key, value )"><span class="secnum">23.1.3.9</span> Map.prototype.set ( <var>key</var>, <var>value</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-get-map.prototype.size" title="get Map.prototype.size"><span class="secnum">23.1.3.10</span> get Map.prototype.size</a></li><li><span class="item-toggle-none"></span><a href="#sec-map.prototype.values" title="Map.prototype.values ( )"><span class="secnum">23.1.3.11</span> Map.prototype.values ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-map.prototype-@@iterator" title="Map.prototype [ @@iterator ] ( )"><span class="secnum">23.1.3.12</span> Map.prototype [ @@iterator ] ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-map.prototype-@@tostringtag" title="Map.prototype [ @@toStringTag ]"><span class="secnum">23.1.3.13</span> Map.prototype [ @@toStringTag ]</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-properties-of-map-instances" title="Properties of Map Instances"><span class="secnum">23.1.4</span> Properties of Map Instances</a></li><li><span class="item-toggle">◢</span><a href="#sec-map-iterator-objects" title="Map Iterator Objects"><span class="secnum">23.1.5</span> Map Iterator Objects</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-createmapiterator" title="CreateMapIterator ( map, kind )"><span class="secnum">23.1.5.1</span> CreateMapIterator ( <var>map</var>, <var>kind</var> )</a></li><li><span class="item-toggle">◢</span><a href="#sec-%mapiteratorprototype%-object" title="The %MapIteratorPrototype% Object"><span class="secnum">23.1.5.2</span> The %MapIteratorPrototype% Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-%mapiteratorprototype%.next" title="%MapIteratorPrototype%.next ( )"><span class="secnum">23.1.5.2.1</span> %MapIteratorPrototype%.next ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-%mapiteratorprototype%-@@tostringtag" title="%MapIteratorPrototype% [ @@toStringTag ]"><span class="secnum">23.1.5.2.2</span> %MapIteratorPrototype% [ @@toStringTag ]</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-properties-of-map-iterator-instances" title="Properties of Map Iterator Instances"><span class="secnum">23.1.5.3</span> Properties of Map Iterator Instances</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-set-objects" title="Set Objects"><span class="secnum">23.2</span> Set Objects</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-set-constructor" title="The Set Constructor"><span class="secnum">23.2.1</span> The Set Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-set-iterable" title="Set ( [ iterable ] )"><span class="secnum">23.2.1.1</span> Set ( [ <var>iterable</var> ] )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-set-constructor" title="Properties of the Set Constructor"><span class="secnum">23.2.2</span> Properties of the Set Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-set.prototype" title="Set.prototype"><span class="secnum">23.2.2.1</span> Set.prototype</a></li><li><span class="item-toggle-none"></span><a href="#sec-get-set-@@species" title="get Set [ @@species ]"><span class="secnum">23.2.2.2</span> get Set [ @@species ]</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-set-prototype-object" title="Properties of the Set Prototype Object"><span class="secnum">23.2.3</span> Properties of the Set Prototype Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-set.prototype.add" title="Set.prototype.add ( value )"><span class="secnum">23.2.3.1</span> Set.prototype.add ( <var>value</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-set.prototype.clear" title="Set.prototype.clear ( )"><span class="secnum">23.2.3.2</span> Set.prototype.clear ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-set.prototype.constructor" title="Set.prototype.constructor"><span class="secnum">23.2.3.3</span> Set.prototype.constructor</a></li><li><span class="item-toggle-none"></span><a href="#sec-set.prototype.delete" title="Set.prototype.delete ( value )"><span class="secnum">23.2.3.4</span> Set.prototype.delete ( <var>value</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-set.prototype.entries" title="Set.prototype.entries ( )"><span class="secnum">23.2.3.5</span> Set.prototype.entries ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-set.prototype.foreach" title="Set.prototype.forEach ( callbackfn [ , thisArg ] )"><span class="secnum">23.2.3.6</span> Set.prototype.forEach ( <var>callbackfn</var> [ , <var>thisArg</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-set.prototype.has" title="Set.prototype.has ( value )"><span class="secnum">23.2.3.7</span> Set.prototype.has ( <var>value</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-set.prototype.keys" title="Set.prototype.keys ( )"><span class="secnum">23.2.3.8</span> Set.prototype.keys ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-get-set.prototype.size" title="get Set.prototype.size"><span class="secnum">23.2.3.9</span> get Set.prototype.size</a></li><li><span class="item-toggle-none"></span><a href="#sec-set.prototype.values" title="Set.prototype.values ( )"><span class="secnum">23.2.3.10</span> Set.prototype.values ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-set.prototype-@@iterator" title="Set.prototype [ @@iterator ] ( )"><span class="secnum">23.2.3.11</span> Set.prototype [ @@iterator ] ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-set.prototype-@@tostringtag" title="Set.prototype [ @@toStringTag ]"><span class="secnum">23.2.3.12</span> Set.prototype [ @@toStringTag ]</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-properties-of-set-instances" title="Properties of Set Instances"><span class="secnum">23.2.4</span> Properties of Set Instances</a></li><li><span class="item-toggle">◢</span><a href="#sec-set-iterator-objects" title="Set Iterator Objects"><span class="secnum">23.2.5</span> Set Iterator Objects</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-createsetiterator" title="CreateSetIterator ( set, kind )"><span class="secnum">23.2.5.1</span> CreateSetIterator ( <var>set</var>, <var>kind</var> )</a></li><li><span class="item-toggle">◢</span><a href="#sec-%setiteratorprototype%-object" title="The %SetIteratorPrototype% Object"><span class="secnum">23.2.5.2</span> The %SetIteratorPrototype% Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-%setiteratorprototype%.next" title="%SetIteratorPrototype%.next ( )"><span class="secnum">23.2.5.2.1</span> %SetIteratorPrototype%.next ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-%setiteratorprototype%-@@tostringtag" title="%SetIteratorPrototype% [ @@toStringTag ]"><span class="secnum">23.2.5.2.2</span> %SetIteratorPrototype% [ @@toStringTag ]</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-properties-of-set-iterator-instances" title="Properties of Set Iterator Instances"><span class="secnum">23.2.5.3</span> Properties of Set Iterator Instances</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-weakmap-objects" title="WeakMap Objects"><span class="secnum">23.3</span> WeakMap Objects</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-weakmap-constructor" title="The WeakMap Constructor"><span class="secnum">23.3.1</span> The WeakMap Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-weakmap-iterable" title="WeakMap ( [ iterable ] )"><span class="secnum">23.3.1.1</span> WeakMap ( [ <var>iterable</var> ] )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-weakmap-constructor" title="Properties of the WeakMap Constructor"><span class="secnum">23.3.2</span> Properties of the WeakMap Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-weakmap.prototype" title="WeakMap.prototype"><span class="secnum">23.3.2.1</span> WeakMap.prototype</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-weakmap-prototype-object" title="Properties of the WeakMap Prototype Object"><span class="secnum">23.3.3</span> Properties of the WeakMap Prototype Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-weakmap.prototype.constructor" title="WeakMap.prototype.constructor"><span class="secnum">23.3.3.1</span> WeakMap.prototype.constructor</a></li><li><span class="item-toggle-none"></span><a href="#sec-weakmap.prototype.delete" title="WeakMap.prototype.delete ( key )"><span class="secnum">23.3.3.2</span> WeakMap.prototype.delete ( <var>key</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-weakmap.prototype.get" title="WeakMap.prototype.get ( key )"><span class="secnum">23.3.3.3</span> WeakMap.prototype.get ( <var>key</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-weakmap.prototype.has" title="WeakMap.prototype.has ( key )"><span class="secnum">23.3.3.4</span> WeakMap.prototype.has ( <var>key</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-weakmap.prototype.set" title="WeakMap.prototype.set ( key, value )"><span class="secnum">23.3.3.5</span> WeakMap.prototype.set ( <var>key</var>, <var>value</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-weakmap.prototype-@@tostringtag" title="WeakMap.prototype [ @@toStringTag ]"><span class="secnum">23.3.3.6</span> WeakMap.prototype [ @@toStringTag ]</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-properties-of-weakmap-instances" title="Properties of WeakMap Instances"><span class="secnum">23.3.4</span> Properties of WeakMap Instances</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-weakset-objects" title="WeakSet Objects"><span class="secnum">23.4</span> WeakSet Objects</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-weakset-constructor" title="The WeakSet Constructor"><span class="secnum">23.4.1</span> The WeakSet Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-weakset-iterable" title="WeakSet ( [ iterable ] )"><span class="secnum">23.4.1.1</span> WeakSet ( [ <var>iterable</var> ] )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-weakset-constructor" title="Properties of the WeakSet Constructor"><span class="secnum">23.4.2</span> Properties of the WeakSet Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-weakset.prototype" title="WeakSet.prototype"><span class="secnum">23.4.2.1</span> WeakSet.prototype</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-weakset-prototype-object" title="Properties of the WeakSet Prototype Object"><span class="secnum">23.4.3</span> Properties of the WeakSet Prototype Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-weakset.prototype.add" title="WeakSet.prototype.add ( value )"><span class="secnum">23.4.3.1</span> WeakSet.prototype.add ( <var>value</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-weakset.prototype.constructor" title="WeakSet.prototype.constructor"><span class="secnum">23.4.3.2</span> WeakSet.prototype.constructor</a></li><li><span class="item-toggle-none"></span><a href="#sec-weakset.prototype.delete" title="WeakSet.prototype.delete ( value )"><span class="secnum">23.4.3.3</span> WeakSet.prototype.delete ( <var>value</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-weakset.prototype.has" title="WeakSet.prototype.has ( value )"><span class="secnum">23.4.3.4</span> WeakSet.prototype.has ( <var>value</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-weakset.prototype-@@tostringtag" title="WeakSet.prototype [ @@toStringTag ]"><span class="secnum">23.4.3.5</span> WeakSet.prototype [ @@toStringTag ]</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-properties-of-weakset-instances" title="Properties of WeakSet Instances"><span class="secnum">23.4.4</span> Properties of WeakSet Instances</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-structured-data" title="Structured Data"><span class="secnum">24</span> Structured Data</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-arraybuffer-objects" title="ArrayBuffer Objects"><span class="secnum">24.1</span> ArrayBuffer Objects</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-abstract-operations-for-arraybuffer-objects" title="Abstract Operations For ArrayBuffer Objects"><span class="secnum">24.1.1</span> Abstract Operations For ArrayBuffer Objects</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-allocatearraybuffer" title="AllocateArrayBuffer ( constructor, byteLength )"><span class="secnum">24.1.1.1</span> AllocateArrayBuffer ( <var>constructor</var>, <var>byteLength</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-isdetachedbuffer" title="IsDetachedBuffer ( arrayBuffer )"><span class="secnum">24.1.1.2</span> IsDetachedBuffer ( <var>arrayBuffer</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-detacharraybuffer" title="DetachArrayBuffer ( arrayBuffer [ , key ] )"><span class="secnum">24.1.1.3</span> DetachArrayBuffer ( <var>arrayBuffer</var> [ , <var>key</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-clonearraybuffer" title="CloneArrayBuffer ( srcBuffer, srcByteOffset, srcLength, cloneConstructor )"><span class="secnum">24.1.1.4</span> CloneArrayBuffer ( <var>srcBuffer</var>, <var>srcByteOffset</var>, <var>srcLength</var>, <var>cloneConstructor</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-rawbytestonumber" title="RawBytesToNumber ( type, rawBytes, isLittleEndian )"><span class="secnum">24.1.1.5</span> RawBytesToNumber ( <var>type</var>, <var>rawBytes</var>, <var>isLittleEndian</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-getvaluefrombuffer" title="GetValueFromBuffer ( arrayBuffer, byteIndex, type, isTypedArray, order [ , isLittleEndian ] )"><span class="secnum">24.1.1.6</span> GetValueFromBuffer ( <var>arrayBuffer</var>, <var>byteIndex</var>, <var>type</var>, <var>isTypedArray</var>, <var>order</var> [ , <var>isLittleEndian</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-numbertorawbytes" title="NumberToRawBytes ( type, value, isLittleEndian )"><span class="secnum">24.1.1.7</span> NumberToRawBytes ( <var>type</var>, <var>value</var>, <var>isLittleEndian</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-setvalueinbuffer" title="SetValueInBuffer ( arrayBuffer, byteIndex, type, value, isTypedArray, order [ , isLittleEndian ] )"><span class="secnum">24.1.1.8</span> SetValueInBuffer ( <var>arrayBuffer</var>, <var>byteIndex</var>, <var>type</var>, <var>value</var>, <var>isTypedArray</var>, <var>order</var> [ , <var>isLittleEndian</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-getmodifysetvalueinbuffer" title="GetModifySetValueInBuffer ( arrayBuffer, byteIndex, type, value, op [ , isLittleEndian ] )"><span class="secnum">24.1.1.9</span> GetModifySetValueInBuffer ( <var>arrayBuffer</var>, <var>byteIndex</var>, <var>type</var>, <var>value</var>, <var>op</var> [ , <var>isLittleEndian</var> ] )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-arraybuffer-constructor" title="The ArrayBuffer Constructor"><span class="secnum">24.1.2</span> The ArrayBuffer Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-arraybuffer-length" title="ArrayBuffer ( length )"><span class="secnum">24.1.2.1</span> ArrayBuffer ( <var>length</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-arraybuffer-constructor" title="Properties of the ArrayBuffer Constructor"><span class="secnum">24.1.3</span> Properties of the ArrayBuffer Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-arraybuffer.isview" title="ArrayBuffer.isView ( arg )"><span class="secnum">24.1.3.1</span> ArrayBuffer.isView ( <var>arg</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-arraybuffer.prototype" title="ArrayBuffer.prototype"><span class="secnum">24.1.3.2</span> ArrayBuffer.prototype</a></li><li><span class="item-toggle-none"></span><a href="#sec-get-arraybuffer-@@species" title="get ArrayBuffer [ @@species ]"><span class="secnum">24.1.3.3</span> get ArrayBuffer [ @@species ]</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-arraybuffer-prototype-object" title="Properties of the ArrayBuffer Prototype Object"><span class="secnum">24.1.4</span> Properties of the ArrayBuffer Prototype Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-get-arraybuffer.prototype.bytelength" title="get ArrayBuffer.prototype.byteLength"><span class="secnum">24.1.4.1</span> get ArrayBuffer.prototype.byteLength</a></li><li><span class="item-toggle-none"></span><a href="#sec-arraybuffer.prototype.constructor" title="ArrayBuffer.prototype.constructor"><span class="secnum">24.1.4.2</span> ArrayBuffer.prototype.constructor</a></li><li><span class="item-toggle-none"></span><a href="#sec-arraybuffer.prototype.slice" title="ArrayBuffer.prototype.slice ( start, end )"><span class="secnum">24.1.4.3</span> ArrayBuffer.prototype.slice ( <var>start</var>, <var>end</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-arraybuffer.prototype-@@tostringtag" title="ArrayBuffer.prototype [ @@toStringTag ]"><span class="secnum">24.1.4.4</span> ArrayBuffer.prototype [ @@toStringTag ]</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-properties-of-the-arraybuffer-instances" title="Properties of ArrayBuffer Instances"><span class="secnum">24.1.5</span> Properties of ArrayBuffer Instances</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-sharedarraybuffer-objects" title="SharedArrayBuffer Objects"><span class="secnum">24.2</span> SharedArrayBuffer Objects</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-abstract-operations-for-sharedarraybuffer-objects" title="Abstract Operations for SharedArrayBuffer Objects"><span class="secnum">24.2.1</span> Abstract Operations for SharedArrayBuffer Objects</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-allocatesharedarraybuffer" title="AllocateSharedArrayBuffer ( constructor, byteLength )"><span class="secnum">24.2.1.1</span> AllocateSharedArrayBuffer ( <var>constructor</var>, <var>byteLength</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-issharedarraybuffer" title="IsSharedArrayBuffer ( obj )"><span class="secnum">24.2.1.2</span> IsSharedArrayBuffer ( <var>obj</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-sharedarraybuffer-constructor" title="The SharedArrayBuffer Constructor"><span class="secnum">24.2.2</span> The SharedArrayBuffer Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-sharedarraybuffer-length" title="SharedArrayBuffer ( [ length ] )"><span class="secnum">24.2.2.1</span> SharedArrayBuffer ( [ <var>length</var> ] )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-sharedarraybuffer-constructor" title="Properties of the SharedArrayBuffer Constructor"><span class="secnum">24.2.3</span> Properties of the SharedArrayBuffer Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-sharedarraybuffer.prototype" title="SharedArrayBuffer.prototype"><span class="secnum">24.2.3.1</span> SharedArrayBuffer.prototype</a></li><li><span class="item-toggle-none"></span><a href="#sec-sharedarraybuffer-@@species" title="get SharedArrayBuffer [ @@species ]"><span class="secnum">24.2.3.2</span> get SharedArrayBuffer [ @@species ]</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-sharedarraybuffer-prototype-object" title="Properties of the SharedArrayBuffer Prototype Object"><span class="secnum">24.2.4</span> Properties of the SharedArrayBuffer Prototype Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-get-sharedarraybuffer.prototype.bytelength" title="get SharedArrayBuffer.prototype.byteLength"><span class="secnum">24.2.4.1</span> get SharedArrayBuffer.prototype.byteLength</a></li><li><span class="item-toggle-none"></span><a href="#sec-sharedarraybuffer.prototype.constructor" title="SharedArrayBuffer.prototype.constructor"><span class="secnum">24.2.4.2</span> SharedArrayBuffer.prototype.constructor</a></li><li><span class="item-toggle-none"></span><a href="#sec-sharedarraybuffer.prototype.slice" title="SharedArrayBuffer.prototype.slice ( start, end )"><span class="secnum">24.2.4.3</span> SharedArrayBuffer.prototype.slice ( <var>start</var>, <var>end</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-sharedarraybuffer.prototype.toString" title="SharedArrayBuffer.prototype [ @@toStringTag ]"><span class="secnum">24.2.4.4</span> SharedArrayBuffer.prototype [ @@toStringTag ]</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-properties-of-the-sharedarraybuffer-instances" title="Properties of SharedArrayBuffer Instances"><span class="secnum">24.2.5</span> Properties of SharedArrayBuffer Instances</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-dataview-objects" title="DataView Objects"><span class="secnum">24.3</span> DataView Objects</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-abstract-operations-for-dataview-objects" title="Abstract Operations For DataView Objects"><span class="secnum">24.3.1</span> Abstract Operations For DataView Objects</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-getviewvalue" title="GetViewValue ( view, requestIndex, isLittleEndian, type )"><span class="secnum">24.3.1.1</span> GetViewValue ( <var>view</var>, <var>requestIndex</var>, <var>isLittleEndian</var>, <var>type</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-setviewvalue" title="SetViewValue ( view, requestIndex, isLittleEndian, type, value )"><span class="secnum">24.3.1.2</span> SetViewValue ( <var>view</var>, <var>requestIndex</var>, <var>isLittleEndian</var>, <var>type</var>, <var>value</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-dataview-constructor" title="The DataView Constructor"><span class="secnum">24.3.2</span> The DataView Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-dataview-buffer-byteoffset-bytelength" title="DataView ( buffer [ , byteOffset [ , byteLength ] ] )"><span class="secnum">24.3.2.1</span> DataView ( <var>buffer</var> [ , <var>byteOffset</var> [ , <var>byteLength</var> ] ] )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-dataview-constructor" title="Properties of the DataView Constructor"><span class="secnum">24.3.3</span> Properties of the DataView Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-dataview.prototype" title="DataView.prototype"><span class="secnum">24.3.3.1</span> DataView.prototype</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-dataview-prototype-object" title="Properties of the DataView Prototype Object"><span class="secnum">24.3.4</span> Properties of the DataView Prototype Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-get-dataview.prototype.buffer" title="get DataView.prototype.buffer"><span class="secnum">24.3.4.1</span> get DataView.prototype.buffer</a></li><li><span class="item-toggle-none"></span><a href="#sec-get-dataview.prototype.bytelength" title="get DataView.prototype.byteLength"><span class="secnum">24.3.4.2</span> get DataView.prototype.byteLength</a></li><li><span class="item-toggle-none"></span><a href="#sec-get-dataview.prototype.byteoffset" title="get DataView.prototype.byteOffset"><span class="secnum">24.3.4.3</span> get DataView.prototype.byteOffset</a></li><li><span class="item-toggle-none"></span><a href="#sec-dataview.prototype.constructor" title="DataView.prototype.constructor"><span class="secnum">24.3.4.4</span> DataView.prototype.constructor</a></li><li><span class="item-toggle-none"></span><a href="#sec-dataview.prototype.getfloat32" title="DataView.prototype.getFloat32 ( byteOffset [ , littleEndian ] )"><span class="secnum">24.3.4.5</span> DataView.prototype.getFloat32 ( <var>byteOffset</var> [ , <var>littleEndian</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-dataview.prototype.getfloat64" title="DataView.prototype.getFloat64 ( byteOffset [ , littleEndian ] )"><span class="secnum">24.3.4.6</span> DataView.prototype.getFloat64 ( <var>byteOffset</var> [ , <var>littleEndian</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-dataview.prototype.getint8" title="DataView.prototype.getInt8 ( byteOffset )"><span class="secnum">24.3.4.7</span> DataView.prototype.getInt8 ( <var>byteOffset</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-dataview.prototype.getint16" title="DataView.prototype.getInt16 ( byteOffset [ , littleEndian ] )"><span class="secnum">24.3.4.8</span> DataView.prototype.getInt16 ( <var>byteOffset</var> [ , <var>littleEndian</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-dataview.prototype.getint32" title="DataView.prototype.getInt32 ( byteOffset [ , littleEndian ] )"><span class="secnum">24.3.4.9</span> DataView.prototype.getInt32 ( <var>byteOffset</var> [ , <var>littleEndian</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-dataview.prototype.getuint8" title="DataView.prototype.getUint8 ( byteOffset )"><span class="secnum">24.3.4.10</span> DataView.prototype.getUint8 ( <var>byteOffset</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-dataview.prototype.getuint16" title="DataView.prototype.getUint16 ( byteOffset [ , littleEndian ] )"><span class="secnum">24.3.4.11</span> DataView.prototype.getUint16 ( <var>byteOffset</var> [ , <var>littleEndian</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-dataview.prototype.getuint32" title="DataView.prototype.getUint32 ( byteOffset [ , littleEndian ] )"><span class="secnum">24.3.4.12</span> DataView.prototype.getUint32 ( <var>byteOffset</var> [ , <var>littleEndian</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-dataview.prototype.setfloat32" title="DataView.prototype.setFloat32 ( byteOffset, value [ , littleEndian ] )"><span class="secnum">24.3.4.13</span> DataView.prototype.setFloat32 ( <var>byteOffset</var>, <var>value</var> [ , <var>littleEndian</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-dataview.prototype.setfloat64" title="DataView.prototype.setFloat64 ( byteOffset, value [ , littleEndian ] )"><span class="secnum">24.3.4.14</span> DataView.prototype.setFloat64 ( <var>byteOffset</var>, <var>value</var> [ , <var>littleEndian</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-dataview.prototype.setint8" title="DataView.prototype.setInt8 ( byteOffset, value )"><span class="secnum">24.3.4.15</span> DataView.prototype.setInt8 ( <var>byteOffset</var>, <var>value</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-dataview.prototype.setint16" title="DataView.prototype.setInt16 ( byteOffset, value [ , littleEndian ] )"><span class="secnum">24.3.4.16</span> DataView.prototype.setInt16 ( <var>byteOffset</var>, <var>value</var> [ , <var>littleEndian</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-dataview.prototype.setint32" title="DataView.prototype.setInt32 ( byteOffset, value [ , littleEndian ] )"><span class="secnum">24.3.4.17</span> DataView.prototype.setInt32 ( <var>byteOffset</var>, <var>value</var> [ , <var>littleEndian</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-dataview.prototype.setuint8" title="DataView.prototype.setUint8 ( byteOffset, value )"><span class="secnum">24.3.4.18</span> DataView.prototype.setUint8 ( <var>byteOffset</var>, <var>value</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-dataview.prototype.setuint16" title="DataView.prototype.setUint16 ( byteOffset, value [ , littleEndian ] )"><span class="secnum">24.3.4.19</span> DataView.prototype.setUint16 ( <var>byteOffset</var>, <var>value</var> [ , <var>littleEndian</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-dataview.prototype.setuint32" title="DataView.prototype.setUint32 ( byteOffset, value [ , littleEndian ] )"><span class="secnum">24.3.4.20</span> DataView.prototype.setUint32 ( <var>byteOffset</var>, <var>value</var> [ , <var>littleEndian</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-dataview.prototype-@@tostringtag" title="DataView.prototype [ @@toStringTag ]"><span class="secnum">24.3.4.21</span> DataView.prototype [ @@toStringTag ]</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-properties-of-dataview-instances" title="Properties of DataView Instances"><span class="secnum">24.3.5</span> Properties of DataView Instances</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-atomics-object" title="The Atomics Object"><span class="secnum">24.4</span> The Atomics Object</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-abstract-operations-for-atomics" title="Abstract Operations for Atomics"><span class="secnum">24.4.1</span> Abstract Operations for Atomics</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-validatesharedintegertypedarray" title="ValidateSharedIntegerTypedArray ( typedArray [ , onlyInt32 ] )"><span class="secnum">24.4.1.1</span> ValidateSharedIntegerTypedArray ( <var>typedArray</var> [ , <var>onlyInt32</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-validateatomicaccess" title="ValidateAtomicAccess ( typedArray, requestIndex )"><span class="secnum">24.4.1.2</span> ValidateAtomicAccess ( <var>typedArray</var>, <var>requestIndex</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-getwaiterlist" title="GetWaiterList ( block, i )"><span class="secnum">24.4.1.3</span> GetWaiterList ( <var>block</var>, <var>i</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-entercriticalsection" title="EnterCriticalSection ( WL )"><span class="secnum">24.4.1.4</span> EnterCriticalSection ( <var>WL</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-leavecriticalsection" title="LeaveCriticalSection ( WL )"><span class="secnum">24.4.1.5</span> LeaveCriticalSection ( <var>WL</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-addwaiter" title="AddWaiter ( WL, W )"><span class="secnum">24.4.1.6</span> AddWaiter ( <var>WL</var>, <var>W</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-removewaiter" title="RemoveWaiter ( WL, W )"><span class="secnum">24.4.1.7</span> RemoveWaiter ( <var>WL</var>, <var>W</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-removewaiters" title="RemoveWaiters ( WL, c )"><span class="secnum">24.4.1.8</span> RemoveWaiters ( <var>WL</var>, <var>c</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-suspend" title="Suspend ( WL, W, timeout )"><span class="secnum">24.4.1.9</span> Suspend ( <var>WL</var>, <var>W</var>, <var>timeout</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-notifywaiter" title="NotifyWaiter ( WL, W )"><span class="secnum">24.4.1.10</span> NotifyWaiter ( <var>WL</var>, <var>W</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-atomicreadmodifywrite" title="AtomicReadModifyWrite ( typedArray, index, value, op )"><span class="secnum">24.4.1.11</span> AtomicReadModifyWrite ( <var>typedArray</var>, <var>index</var>, <var>value</var>, <var>op</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-atomicload" title="AtomicLoad ( typedArray, index )"><span class="secnum">24.4.1.12</span> AtomicLoad ( <var>typedArray</var>, <var>index</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-atomics.add" title="Atomics.add ( typedArray, index, value )"><span class="secnum">24.4.2</span> Atomics.add ( <var>typedArray</var>, <var>index</var>, <var>value</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-atomics.and" title="Atomics.and ( typedArray, index, value )"><span class="secnum">24.4.3</span> Atomics.and ( <var>typedArray</var>, <var>index</var>, <var>value</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-atomics.compareexchange" title="Atomics.compareExchange ( typedArray, index, expectedValue, replacementValue )"><span class="secnum">24.4.4</span> Atomics.compareExchange ( <var>typedArray</var>, <var>index</var>, <var>expectedValue</var>, <var>replacementValue</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-atomics.exchange" title="Atomics.exchange ( typedArray, index, value )"><span class="secnum">24.4.5</span> Atomics.exchange ( <var>typedArray</var>, <var>index</var>, <var>value</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-atomics.islockfree" title="Atomics.isLockFree ( size )"><span class="secnum">24.4.6</span> Atomics.isLockFree ( <var>size</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-atomics.load" title="Atomics.load ( typedArray, index )"><span class="secnum">24.4.7</span> Atomics.load ( <var>typedArray</var>, <var>index</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-atomics.or" title="Atomics.or ( typedArray, index, value )"><span class="secnum">24.4.8</span> Atomics.or ( <var>typedArray</var>, <var>index</var>, <var>value</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-atomics.store" title="Atomics.store ( typedArray, index, value )"><span class="secnum">24.4.9</span> Atomics.store ( <var>typedArray</var>, <var>index</var>, <var>value</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-atomics.sub" title="Atomics.sub ( typedArray, index, value )"><span class="secnum">24.4.10</span> Atomics.sub ( <var>typedArray</var>, <var>index</var>, <var>value</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-atomics.wait" title="Atomics.wait ( typedArray, index, value, timeout )"><span class="secnum">24.4.11</span> Atomics.wait ( <var>typedArray</var>, <var>index</var>, <var>value</var>, <var>timeout</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-atomics.notify" title="Atomics.notify ( typedArray, index, count )"><span class="secnum">24.4.12</span> Atomics.notify ( <var>typedArray</var>, <var>index</var>, <var>count</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-atomics.xor" title="Atomics.xor ( typedArray, index, value )"><span class="secnum">24.4.13</span> Atomics.xor ( <var>typedArray</var>, <var>index</var>, <var>value</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-atomics-@@tostringtag" title="Atomics [ @@toStringTag ]"><span class="secnum">24.4.14</span> Atomics [ @@toStringTag ]</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-json-object" title="The JSON Object"><span class="secnum">24.5</span> The JSON Object</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-json.parse" title="JSON.parse ( text [ , reviver ] )"><span class="secnum">24.5.1</span> JSON.parse ( <var>text</var> [ , <var>reviver</var> ] )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-internalizejsonproperty" title="Runtime Semantics: InternalizeJSONProperty ( holder, name )"><span class="secnum">24.5.1.1</span> RS: InternalizeJSONProperty ( <var>holder</var>, <var>name</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-json.stringify" title="JSON.stringify ( value [ , replacer [ , space ] ] )"><span class="secnum">24.5.2</span> JSON.stringify ( <var>value</var> [ , <var>replacer</var> [ , <var>space</var> ] ] )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-serializejsonproperty" title="Runtime Semantics: SerializeJSONProperty ( key, holder )"><span class="secnum">24.5.2.1</span> RS: SerializeJSONProperty ( <var>key</var>, <var>holder</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-quotejsonstring" title="Runtime Semantics: QuoteJSONString ( value )"><span class="secnum">24.5.2.2</span> RS: QuoteJSONString ( <var>value</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-unicodeescape" title="Runtime Semantics: UnicodeEscape ( C )"><span class="secnum">24.5.2.3</span> RS: UnicodeEscape ( <var>C</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-serializejsonobject" title="Runtime Semantics: SerializeJSONObject ( value )"><span class="secnum">24.5.2.4</span> RS: SerializeJSONObject ( <var>value</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-serializejsonarray" title="Runtime Semantics: SerializeJSONArray ( value )"><span class="secnum">24.5.2.5</span> RS: SerializeJSONArray ( <var>value</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-json-@@tostringtag" title="JSON [ @@toStringTag ]"><span class="secnum">24.5.3</span> JSON [ @@toStringTag ]</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-control-abstraction-objects" title="Control Abstraction Objects"><span class="secnum">25</span> Control Abstraction Objects</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-iteration" title="Iteration"><span class="secnum">25.1</span> Iteration</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-common-iteration-interfaces" title="Common Iteration Interfaces"><span class="secnum">25.1.1</span> Common Iteration Interfaces</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-iterable-interface" title="The Iterable Interface"><span class="secnum">25.1.1.1</span> The <i>Iterable</i> Interface</a></li><li><span class="item-toggle-none"></span><a href="#sec-iterator-interface" title="The Iterator Interface"><span class="secnum">25.1.1.2</span> The <i>Iterator</i> Interface</a></li><li><span class="item-toggle-none"></span><a href="#sec-asynciterable-interface" title="The AsyncIterable Interface"><span class="secnum">25.1.1.3</span> The <i>AsyncIterable</i> Interface</a></li><li><span class="item-toggle-none"></span><a href="#sec-asynciterator-interface" title="The AsyncIterator Interface"><span class="secnum">25.1.1.4</span> The <i>AsyncIterator</i> Interface</a></li><li><span class="item-toggle-none"></span><a href="#sec-iteratorresult-interface" title="The IteratorResult Interface"><span class="secnum">25.1.1.5</span> The IteratorResult Interface</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-%iteratorprototype%-object" title="The %IteratorPrototype% Object"><span class="secnum">25.1.2</span> The %IteratorPrototype% Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-%iteratorprototype%-@@iterator" title="%IteratorPrototype% [ @@iterator ] ( )"><span class="secnum">25.1.2.1</span> %IteratorPrototype% [ @@iterator ] ( )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-asynciteratorprototype" title="The %AsyncIteratorPrototype% Object"><span class="secnum">25.1.3</span> The %AsyncIteratorPrototype% Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-asynciteratorprototype-asynciterator" title="%AsyncIteratorPrototype% [ @@asyncIterator ] ( )"><span class="secnum">25.1.3.1</span> %AsyncIteratorPrototype% [ @@asyncIterator ] ( )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-async-from-sync-iterator-objects" title="Async-from-Sync Iterator Objects"><span class="secnum">25.1.4</span> Async-from-Sync Iterator Objects</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-createasyncfromsynciterator" title="CreateAsyncFromSyncIterator ( syncIteratorRecord )"><span class="secnum">25.1.4.1</span> CreateAsyncFromSyncIterator ( <var>syncIteratorRecord</var> )</a></li><li><span class="item-toggle">◢</span><a href="#sec-%asyncfromsynciteratorprototype%-object" title="The %AsyncFromSyncIteratorPrototype% Object"><span class="secnum">25.1.4.2</span> The %AsyncFromSyncIteratorPrototype% Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-%asyncfromsynciteratorprototype%.next" title="%AsyncFromSyncIteratorPrototype%.next ( value )"><span class="secnum">25.1.4.2.1</span> %AsyncFromSyncIteratorPrototype%.next ( <var>value</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-%asyncfromsynciteratorprototype%.return" title="%AsyncFromSyncIteratorPrototype%.return ( value )"><span class="secnum">25.1.4.2.2</span> %AsyncFromSyncIteratorPrototype%.return ( <var>value</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-%asyncfromsynciteratorprototype%.throw" title="%AsyncFromSyncIteratorPrototype%.throw ( value )"><span class="secnum">25.1.4.2.3</span> %AsyncFromSyncIteratorPrototype%.throw ( <var>value</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-%asyncfromsynciteratorprototype%-@@tostringtag" title="%AsyncFromSyncIteratorPrototype% [ @@toStringTag ]"><span class="secnum">25.1.4.2.4</span> %AsyncFromSyncIteratorPrototype% [ @@toStringTag ]</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-from-sync-iterator-value-unwrap-functions" title="Async-from-Sync Iterator Value Unwrap Functions"><span class="secnum">25.1.4.2.5</span> Async-from-Sync Iterator Value Unwrap Functions</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-properties-of-async-from-sync-iterator-instances" title="Properties of Async-from-Sync Iterator Instances"><span class="secnum">25.1.4.3</span> Properties of Async-from-Sync Iterator Instances</a></li><li><span class="item-toggle-none"></span><a href="#sec-asyncfromsynciteratorcontinuation" title="AsyncFromSyncIteratorContinuation ( result, promiseCapability )"><span class="secnum">25.1.4.4</span> AsyncFromSyncIteratorContinuation ( <var>result</var>, <var>promiseCapability</var> )</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-generatorfunction-objects" title="GeneratorFunction Objects"><span class="secnum">25.2</span> GeneratorFunction Objects</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-generatorfunction-constructor" title="The GeneratorFunction Constructor"><span class="secnum">25.2.1</span> The GeneratorFunction Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-generatorfunction" title="GeneratorFunction ( p1, p2, … , pn, body )"><span class="secnum">25.2.1.1</span> GeneratorFunction ( <var>p1</var>, <var>p2</var>, … , <var>pn</var>, <var>body</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-generatorfunction-constructor" title="Properties of the GeneratorFunction Constructor"><span class="secnum">25.2.2</span> Properties of the GeneratorFunction Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-generatorfunction.length" title="GeneratorFunction.length"><span class="secnum">25.2.2.1</span> GeneratorFunction.length</a></li><li><span class="item-toggle-none"></span><a href="#sec-generatorfunction.prototype" title="GeneratorFunction.prototype"><span class="secnum">25.2.2.2</span> GeneratorFunction.prototype</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-generatorfunction-prototype-object" title="Properties of the GeneratorFunction Prototype Object"><span class="secnum">25.2.3</span> Properties of the GeneratorFunction Prototype Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-generatorfunction.prototype.constructor" title="GeneratorFunction.prototype.constructor"><span class="secnum">25.2.3.1</span> GeneratorFunction.prototype.constructor</a></li><li><span class="item-toggle-none"></span><a href="#sec-generatorfunction.prototype.prototype" title="GeneratorFunction.prototype.prototype"><span class="secnum">25.2.3.2</span> GeneratorFunction.prototype.prototype</a></li><li><span class="item-toggle-none"></span><a href="#sec-generatorfunction.prototype-@@tostringtag" title="GeneratorFunction.prototype [ @@toStringTag ]"><span class="secnum">25.2.3.3</span> GeneratorFunction.prototype [ @@toStringTag ]</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-generatorfunction-instances" title="GeneratorFunction Instances"><span class="secnum">25.2.4</span> GeneratorFunction Instances</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-generatorfunction-instances-length" title="length"><span class="secnum">25.2.4.1</span> length</a></li><li><span class="item-toggle-none"></span><a href="#sec-generatorfunction-instances-name" title="name"><span class="secnum">25.2.4.2</span> name</a></li><li><span class="item-toggle-none"></span><a href="#sec-generatorfunction-instances-prototype" title="prototype"><span class="secnum">25.2.4.3</span> prototype</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-asyncgeneratorfunction-objects" title="AsyncGeneratorFunction Objects"><span class="secnum">25.3</span> AsyncGeneratorFunction Objects</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-asyncgeneratorfunction-constructor" title="The AsyncGeneratorFunction Constructor"><span class="secnum">25.3.1</span> The AsyncGeneratorFunction Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-asyncgeneratorfunction" title="AsyncGeneratorFunction ( p1, p2, ..., pn, body )"><span class="secnum">25.3.1.1</span> AsyncGeneratorFunction ( <var>p1</var>, <var>p2</var>, ..., <var>pn</var>, <var>body</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-asyncgeneratorfunction" title="Properties of the AsyncGeneratorFunction Constructor"><span class="secnum">25.3.2</span> Properties of the AsyncGeneratorFunction Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-asyncgeneratorfunction-length" title="AsyncGeneratorFunction.length"><span class="secnum">25.3.2.1</span> AsyncGeneratorFunction.length</a></li><li><span class="item-toggle-none"></span><a href="#sec-asyncgeneratorfunction-prototype" title="AsyncGeneratorFunction.prototype"><span class="secnum">25.3.2.2</span> AsyncGeneratorFunction.prototype</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-asyncgeneratorfunction-prototype" title="Properties of the AsyncGeneratorFunction Prototype Object"><span class="secnum">25.3.3</span> Properties of the AsyncGeneratorFunction Prototype Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-asyncgeneratorfunction-prototype-constructor" title="AsyncGeneratorFunction.prototype.constructor"><span class="secnum">25.3.3.1</span> AsyncGeneratorFunction.prototype.constructor</a></li><li><span class="item-toggle-none"></span><a href="#sec-asyncgeneratorfunction-prototype-prototype" title="AsyncGeneratorFunction.prototype.prototype"><span class="secnum">25.3.3.2</span> AsyncGeneratorFunction.prototype.prototype</a></li><li><span class="item-toggle-none"></span><a href="#sec-asyncgeneratorfunction-prototype-tostringtag" title="AsyncGeneratorFunction.prototype [ @@toStringTag ]"><span class="secnum">25.3.3.3</span> AsyncGeneratorFunction.prototype [ @@toStringTag ]</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-asyncgeneratorfunction-instances" title="AsyncGeneratorFunction Instances"><span class="secnum">25.3.4</span> AsyncGeneratorFunction Instances</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-asyncgeneratorfunction-instance-length" title="length"><span class="secnum">25.3.4.1</span> length</a></li><li><span class="item-toggle-none"></span><a href="#sec-asyncgeneratorfunction-instance-name" title="name"><span class="secnum">25.3.4.2</span> name</a></li><li><span class="item-toggle-none"></span><a href="#sec-asyncgeneratorfunction-instance-prototype" title="prototype"><span class="secnum">25.3.4.3</span> prototype</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-generator-objects" title="Generator Objects"><span class="secnum">25.4</span> Generator Objects</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-properties-of-generator-prototype" title="Properties of the Generator Prototype Object"><span class="secnum">25.4.1</span> Properties of the Generator Prototype Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-generator.prototype.constructor" title="Generator.prototype.constructor"><span class="secnum">25.4.1.1</span> Generator.prototype.constructor</a></li><li><span class="item-toggle-none"></span><a href="#sec-generator.prototype.next" title="Generator.prototype.next ( value )"><span class="secnum">25.4.1.2</span> Generator.prototype.next ( <var>value</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-generator.prototype.return" title="Generator.prototype.return ( value )"><span class="secnum">25.4.1.3</span> Generator.prototype.return ( <var>value</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-generator.prototype.throw" title="Generator.prototype.throw ( exception )"><span class="secnum">25.4.1.4</span> Generator.prototype.throw ( <var>exception</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-generator.prototype-@@tostringtag" title="Generator.prototype [ @@toStringTag ]"><span class="secnum">25.4.1.5</span> Generator.prototype [ @@toStringTag ]</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-properties-of-generator-instances" title="Properties of Generator Instances"><span class="secnum">25.4.2</span> Properties of Generator Instances</a></li><li><span class="item-toggle">◢</span><a href="#sec-generator-abstract-operations" title="Generator Abstract Operations"><span class="secnum">25.4.3</span> Generator Abstract Operations</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-generatorstart" title="GeneratorStart ( generator, generatorBody )"><span class="secnum">25.4.3.1</span> GeneratorStart ( <var>generator</var>, <var>generatorBody</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-generatorvalidate" title="GeneratorValidate ( generator )"><span class="secnum">25.4.3.2</span> GeneratorValidate ( <var>generator</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-generatorresume" title="GeneratorResume ( generator, value )"><span class="secnum">25.4.3.3</span> GeneratorResume ( <var>generator</var>, <var>value</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-generatorresumeabrupt" title="GeneratorResumeAbrupt ( generator, abruptCompletion )"><span class="secnum">25.4.3.4</span> GeneratorResumeAbrupt ( <var>generator</var>, <var>abruptCompletion</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-getgeneratorkind" title="GetGeneratorKind ( )"><span class="secnum">25.4.3.5</span> GetGeneratorKind ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-generatoryield" title="GeneratorYield ( iterNextObj )"><span class="secnum">25.4.3.6</span> GeneratorYield ( <var>iterNextObj</var> )</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-asyncgenerator-objects" title="AsyncGenerator Objects"><span class="secnum">25.5</span> AsyncGenerator Objects</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-properties-of-asyncgenerator-prototype" title="Properties of the AsyncGenerator Prototype Object"><span class="secnum">25.5.1</span> Properties of the AsyncGenerator Prototype Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-asyncgenerator-prototype-constructor" title="AsyncGenerator.prototype.constructor"><span class="secnum">25.5.1.1</span> AsyncGenerator.prototype.constructor</a></li><li><span class="item-toggle-none"></span><a href="#sec-asyncgenerator-prototype-next" title="AsyncGenerator.prototype.next ( value )"><span class="secnum">25.5.1.2</span> AsyncGenerator.prototype.next ( <var>value</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-asyncgenerator-prototype-return" title="AsyncGenerator.prototype.return ( value )"><span class="secnum">25.5.1.3</span> AsyncGenerator.prototype.return ( <var>value</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-asyncgenerator-prototype-throw" title="AsyncGenerator.prototype.throw ( exception )"><span class="secnum">25.5.1.4</span> AsyncGenerator.prototype.throw ( <var>exception</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-asyncgenerator-prototype-tostringtag" title="AsyncGenerator.prototype [ @@toStringTag ]"><span class="secnum">25.5.1.5</span> AsyncGenerator.prototype [ @@toStringTag ]</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-properties-of-asyncgenerator-intances" title="Properties of AsyncGenerator Instances"><span class="secnum">25.5.2</span> Properties of AsyncGenerator Instances</a></li><li><span class="item-toggle">◢</span><a href="#sec-asyncgenerator-abstract-operations" title="AsyncGenerator Abstract Operations"><span class="secnum">25.5.3</span> AsyncGenerator Abstract Operations</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-asyncgeneratorrequest-records" title="AsyncGeneratorRequest Records"><span class="secnum">25.5.3.1</span> AsyncGeneratorRequest Records</a></li><li><span class="item-toggle-none"></span><a href="#sec-asyncgeneratorstart" title="AsyncGeneratorStart ( generator, generatorBody )"><span class="secnum">25.5.3.2</span> AsyncGeneratorStart ( <var>generator</var>, <var>generatorBody</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-asyncgeneratorresolve" title="AsyncGeneratorResolve ( generator, value, done )"><span class="secnum">25.5.3.3</span> AsyncGeneratorResolve ( <var>generator</var>, <var>value</var>, <var>done</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-asyncgeneratorreject" title="AsyncGeneratorReject ( generator, exception )"><span class="secnum">25.5.3.4</span> AsyncGeneratorReject ( <var>generator</var>, <var>exception</var> )</a></li><li><span class="item-toggle">◢</span><a href="#sec-asyncgeneratorresumenext" title="AsyncGeneratorResumeNext ( generator )"><span class="secnum">25.5.3.5</span> AsyncGeneratorResumeNext ( <var>generator</var> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#async-generator-resume-next-return-processor-fulfilled" title="AsyncGeneratorResumeNext Return Processor Fulfilled Functions"><span class="secnum">25.5.3.5.1</span> AsyncGeneratorResumeNext Return Processor Fulfilled Functions</a></li><li><span class="item-toggle-none"></span><a href="#async-generator-resume-next-return-processor-rejected" title="AsyncGeneratorResumeNext Return Processor Rejected Functions"><span class="secnum">25.5.3.5.2</span> AsyncGeneratorResumeNext Return Processor Rejected Functions</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-asyncgeneratorenqueue" title="AsyncGeneratorEnqueue ( generator, completion )"><span class="secnum">25.5.3.6</span> AsyncGeneratorEnqueue ( <var>generator</var>, <var>completion</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-asyncgeneratoryield" title="AsyncGeneratorYield ( value )"><span class="secnum">25.5.3.7</span> AsyncGeneratorYield ( <var>value</var> )</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-promise-objects" title="Promise Objects"><span class="secnum">25.6</span> Promise Objects</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-promise-abstract-operations" title="Promise Abstract Operations"><span class="secnum">25.6.1</span> Promise Abstract Operations</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-promisecapability-records" title="PromiseCapability Records"><span class="secnum">25.6.1.1</span> PromiseCapability Records</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-ifabruptrejectpromise" title="IfAbruptRejectPromise ( value, capability )"><span class="secnum">25.6.1.1.1</span> IfAbruptRejectPromise ( <var>value</var>, <var>capability</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-promisereaction-records" title="PromiseReaction Records"><span class="secnum">25.6.1.2</span> PromiseReaction Records</a></li><li><span class="item-toggle">◢</span><a href="#sec-createresolvingfunctions" title="CreateResolvingFunctions ( promise )"><span class="secnum">25.6.1.3</span> CreateResolvingFunctions ( <var>promise</var> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-promise-reject-functions" title="Promise Reject Functions"><span class="secnum">25.6.1.3.1</span> Promise Reject Functions</a></li><li><span class="item-toggle-none"></span><a href="#sec-promise-resolve-functions" title="Promise Resolve Functions"><span class="secnum">25.6.1.3.2</span> Promise Resolve Functions</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-fulfillpromise" title="FulfillPromise ( promise, value )"><span class="secnum">25.6.1.4</span> FulfillPromise ( <var>promise</var>, <var>value</var> )</a></li><li><span class="item-toggle">◢</span><a href="#sec-newpromisecapability" title="NewPromiseCapability ( C )"><span class="secnum">25.6.1.5</span> NewPromiseCapability ( <var>C</var> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-getcapabilitiesexecutor-functions" title="GetCapabilitiesExecutor Functions"><span class="secnum">25.6.1.5.1</span> GetCapabilitiesExecutor Functions</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-ispromise" title="IsPromise ( x )"><span class="secnum">25.6.1.6</span> IsPromise ( <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-rejectpromise" title="RejectPromise ( promise, reason )"><span class="secnum">25.6.1.7</span> RejectPromise ( <var>promise</var>, <var>reason</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-triggerpromisereactions" title="TriggerPromiseReactions ( reactions, argument )"><span class="secnum">25.6.1.8</span> TriggerPromiseReactions ( <var>reactions</var>, <var>argument</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-host-promise-rejection-tracker" title="HostPromiseRejectionTracker ( promise, operation )"><span class="secnum">25.6.1.9</span> HostPromiseRejectionTracker ( <var>promise</var>, <var>operation</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-promise-jobs" title="Promise Jobs"><span class="secnum">25.6.2</span> Promise Jobs</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-promisereactionjob" title="PromiseReactionJob ( reaction, argument )"><span class="secnum">25.6.2.1</span> PromiseReactionJob ( <var>reaction</var>, <var>argument</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-promiseresolvethenablejob" title="PromiseResolveThenableJob ( promiseToResolve, thenable, then )"><span class="secnum">25.6.2.2</span> PromiseResolveThenableJob ( <var>promiseToResolve</var>, <var>thenable</var>, <var>then</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-promise-constructor" title="The Promise Constructor"><span class="secnum">25.6.3</span> The Promise Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-promise-executor" title="Promise ( executor )"><span class="secnum">25.6.3.1</span> Promise ( <var>executor</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-promise-constructor" title="Properties of the Promise Constructor"><span class="secnum">25.6.4</span> Properties of the Promise Constructor</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-promise.all" title="Promise.all ( iterable )"><span class="secnum">25.6.4.1</span> Promise.all ( <var>iterable</var> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-performpromiseall" title="Runtime Semantics: PerformPromiseAll ( iteratorRecord, constructor, resultCapability )"><span class="secnum">25.6.4.1.1</span> RS: PerformPromiseAll ( <var>iteratorRecord</var>, <var>constructor</var>, <var>resultCapability</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-promise.all-resolve-element-functions" title="Promise.all Resolve Element Functions"><span class="secnum">25.6.4.1.2</span> <code>Promise.all</code> Resolve Element Functions</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-promise.prototype" title="Promise.prototype"><span class="secnum">25.6.4.2</span> Promise.prototype</a></li><li><span class="item-toggle">◢</span><a href="#sec-promise.race" title="Promise.race ( iterable )"><span class="secnum">25.6.4.3</span> Promise.race ( <var>iterable</var> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-performpromiserace" title="Runtime Semantics: PerformPromiseRace ( iteratorRecord, constructor, resultCapability )"><span class="secnum">25.6.4.3.1</span> RS: PerformPromiseRace ( <var>iteratorRecord</var>, <var>constructor</var>, <var>resultCapability</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-promise.reject" title="Promise.reject ( r )"><span class="secnum">25.6.4.4</span> Promise.reject ( <var>r</var> )</a></li><li><span class="item-toggle">◢</span><a href="#sec-promise.resolve" title="Promise.resolve ( x )"><span class="secnum">25.6.4.5</span> Promise.resolve ( <var>x</var> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-promise-resolve" title="PromiseResolve ( C, x )"><span class="secnum">25.6.4.5.1</span> PromiseResolve ( <var>C</var>, <var>x</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-get-promise-@@species" title="get Promise [ @@species ]"><span class="secnum">25.6.4.6</span> get Promise [ @@species ]</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-promise-prototype-object" title="Properties of the Promise Prototype Object"><span class="secnum">25.6.5</span> Properties of the Promise Prototype Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-promise.prototype.catch" title="Promise.prototype.catch ( onRejected )"><span class="secnum">25.6.5.1</span> Promise.prototype.catch ( <var>onRejected</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-promise.prototype.constructor" title="Promise.prototype.constructor"><span class="secnum">25.6.5.2</span> Promise.prototype.constructor</a></li><li><span class="item-toggle">◢</span><a href="#sec-promise.prototype.finally" title="Promise.prototype.finally ( onFinally )"><span class="secnum">25.6.5.3</span> Promise.prototype.finally ( <var>onFinally</var> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-thenfinallyfunctions" title="Then Finally Functions"><span class="secnum">25.6.5.3.1</span> Then Finally Functions</a></li><li><span class="item-toggle-none"></span><a href="#sec-catchfinallyfunctions" title="Catch Finally Functions"><span class="secnum">25.6.5.3.2</span> Catch Finally Functions</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-promise.prototype.then" title="Promise.prototype.then ( onFulfilled, onRejected )"><span class="secnum">25.6.5.4</span> Promise.prototype.then ( <var>onFulfilled</var>, <var>onRejected</var> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-performpromisethen" title="PerformPromiseThen ( promise, onFulfilled, onRejected [ , resultCapability ] )"><span class="secnum">25.6.5.4.1</span> PerformPromiseThen ( <var>promise</var>, <var>onFulfilled</var>, <var>onRejected</var> [ , <var>resultCapability</var> ] )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-promise.prototype-@@tostringtag" title="Promise.prototype [ @@toStringTag ]"><span class="secnum">25.6.5.5</span> Promise.prototype [ @@toStringTag ]</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-properties-of-promise-instances" title="Properties of Promise Instances"><span class="secnum">25.6.6</span> Properties of Promise Instances</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-async-function-objects" title="AsyncFunction Objects"><span class="secnum">25.7</span> AsyncFunction Objects</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-async-function-constructor" title="The AsyncFunction Constructor"><span class="secnum">25.7.1</span> The AsyncFunction Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-async-function-constructor-arguments" title="AsyncFunction ( p1, p2, … , pn, body )"><span class="secnum">25.7.1.1</span> AsyncFunction ( <var>p1</var>, <var>p2</var>, … , <var>pn</var>, <var>body</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-async-function-constructor-properties" title="Properties of the AsyncFunction Constructor"><span class="secnum">25.7.2</span> Properties of the AsyncFunction Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-async-function-constructor-length" title="AsyncFunction.length"><span class="secnum">25.7.2.1</span> AsyncFunction.length</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-function-constructor-prototype" title="AsyncFunction.prototype"><span class="secnum">25.7.2.2</span> AsyncFunction.prototype</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-async-function-prototype-properties" title="Properties of the AsyncFunction Prototype Object"><span class="secnum">25.7.3</span> Properties of the AsyncFunction Prototype Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-async-function-prototype-properties-constructor" title="AsyncFunction.prototype.constructor"><span class="secnum">25.7.3.1</span> AsyncFunction.prototype.constructor</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-function-prototype-properties-toStringTag" title="AsyncFunction.prototype [ @@toStringTag ]"><span class="secnum">25.7.3.2</span> AsyncFunction.prototype [ @@toStringTag ]</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-async-function-instances" title="AsyncFunction Instances"><span class="secnum">25.7.4</span> AsyncFunction Instances</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-async-function-instances-length" title="length"><span class="secnum">25.7.4.1</span> length</a></li><li><span class="item-toggle-none"></span><a href="#sec-async-function-instances-name" title="name"><span class="secnum">25.7.4.2</span> name</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-async-functions-abstract-operations" title="Async Functions Abstract Operations"><span class="secnum">25.7.5</span> Async Functions Abstract Operations</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-async-functions-abstract-operations-async-function-start" title="AsyncFunctionStart ( promiseCapability, asyncFunctionBody )"><span class="secnum">25.7.5.1</span> AsyncFunctionStart ( <var>promiseCapability</var>, <var>asyncFunctionBody</var> )</a></li></ol></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-reflection" title="Reflection"><span class="secnum">26</span> Reflection</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-reflect-object" title="The Reflect Object"><span class="secnum">26.1</span> The Reflect Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-reflect.apply" title="Reflect.apply ( target, thisArgument, argumentsList )"><span class="secnum">26.1.1</span> Reflect.apply ( <var>target</var>, <var>thisArgument</var>, <var>argumentsList</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-reflect.construct" title="Reflect.construct ( target, argumentsList [ , newTarget ] )"><span class="secnum">26.1.2</span> Reflect.construct ( <var>target</var>, <var>argumentsList</var> [ , <var>newTarget</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-reflect.defineproperty" title="Reflect.defineProperty ( target, propertyKey, attributes )"><span class="secnum">26.1.3</span> Reflect.defineProperty ( <var>target</var>, <var>propertyKey</var>, <var>attributes</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-reflect.deleteproperty" title="Reflect.deleteProperty ( target, propertyKey )"><span class="secnum">26.1.4</span> Reflect.deleteProperty ( <var>target</var>, <var>propertyKey</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-reflect.get" title="Reflect.get ( target, propertyKey [ , receiver ] )"><span class="secnum">26.1.5</span> Reflect.get ( <var>target</var>, <var>propertyKey</var> [ , <var>receiver</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-reflect.getownpropertydescriptor" title="Reflect.getOwnPropertyDescriptor ( target, propertyKey )"><span class="secnum">26.1.6</span> Reflect.getOwnPropertyDescriptor ( <var>target</var>, <var>propertyKey</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-reflect.getprototypeof" title="Reflect.getPrototypeOf ( target )"><span class="secnum">26.1.7</span> Reflect.getPrototypeOf ( <var>target</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-reflect.has" title="Reflect.has ( target, propertyKey )"><span class="secnum">26.1.8</span> Reflect.has ( <var>target</var>, <var>propertyKey</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-reflect.isextensible" title="Reflect.isExtensible ( target )"><span class="secnum">26.1.9</span> Reflect.isExtensible ( <var>target</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-reflect.ownkeys" title="Reflect.ownKeys ( target )"><span class="secnum">26.1.10</span> Reflect.ownKeys ( <var>target</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-reflect.preventextensions" title="Reflect.preventExtensions ( target )"><span class="secnum">26.1.11</span> Reflect.preventExtensions ( <var>target</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-reflect.set" title="Reflect.set ( target, propertyKey, V [ , receiver ] )"><span class="secnum">26.1.12</span> Reflect.set ( <var>target</var>, <var>propertyKey</var>, <var>V</var> [ , <var>receiver</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-reflect.setprototypeof" title="Reflect.setPrototypeOf ( target, proto )"><span class="secnum">26.1.13</span> Reflect.setPrototypeOf ( <var>target</var>, <var>proto</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-proxy-objects" title="Proxy Objects"><span class="secnum">26.2</span> Proxy Objects</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-proxy-constructor" title="The Proxy Constructor"><span class="secnum">26.2.1</span> The Proxy Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-proxy-target-handler" title="Proxy ( target, handler )"><span class="secnum">26.2.1.1</span> Proxy ( <var>target</var>, <var>handler</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-proxy-constructor" title="Properties of the Proxy Constructor"><span class="secnum">26.2.2</span> Properties of the Proxy Constructor</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-proxy.revocable" title="Proxy.revocable ( target, handler )"><span class="secnum">26.2.2.1</span> Proxy.revocable ( <var>target</var>, <var>handler</var> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-proxy-revocation-functions" title="Proxy Revocation Functions"><span class="secnum">26.2.2.1.1</span> Proxy Revocation Functions</a></li></ol></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-module-namespace-objects" title="Module Namespace Objects"><span class="secnum">26.3</span> Module Namespace Objects</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-@@tostringtag" title="@@toStringTag"><span class="secnum">26.3.1</span> @@toStringTag</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-memory-model" title="Memory Model"><span class="secnum">27</span> Memory Model</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-memory-model-fundamentals" title="Memory Model Fundamentals"><span class="secnum">27.1</span> Memory Model Fundamentals</a></li><li><span class="item-toggle-none"></span><a href="#sec-agent-event-records" title="Agent Events Records"><span class="secnum">27.2</span> Agent Events Records</a></li><li><span class="item-toggle-none"></span><a href="#sec-chosen-value-records" title="Chosen Value Records"><span class="secnum">27.3</span> Chosen Value Records</a></li><li><span class="item-toggle-none"></span><a href="#sec-candidate-executions" title="Candidate Executions"><span class="secnum">27.4</span> Candidate Executions</a></li><li><span class="item-toggle">◢</span><a href="#sec-abstract-operations-for-the-memory-model" title="Abstract Operations for the Memory Model"><span class="secnum">27.5</span> Abstract Operations for the Memory Model</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-event-set" title="EventSet ( execution )"><span class="secnum">27.5.1</span> EventSet ( <var>execution</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-sharedatablockeventset" title="SharedDataBlockEventSet ( execution )"><span class="secnum">27.5.2</span> SharedDataBlockEventSet ( <var>execution</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-synchronizeeventset" title="SynchronizeEventSet ( execution )"><span class="secnum">27.5.3</span> SynchronizeEventSet ( <var>execution</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-hosteventset" title="HostEventSet ( execution )"><span class="secnum">27.5.4</span> HostEventSet ( <var>execution</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-composewriteeventbytes" title="ComposeWriteEventBytes ( execution, byteIndex, Ws )"><span class="secnum">27.5.5</span> ComposeWriteEventBytes ( <var>execution</var>, <var>byteIndex</var>, <var>Ws</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-valueofreadevent" title="ValueOfReadEvent ( execution, R )"><span class="secnum">27.5.6</span> ValueOfReadEvent ( <var>execution</var>, <var>R</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-relations-of-candidate-executions" title="Relations of Candidate Executions"><span class="secnum">27.6</span> Relations of Candidate Executions</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-agent-order" title="agent-order"><span class="secnum">27.6.1</span> agent-order</a></li><li><span class="item-toggle-none"></span><a href="#sec-reads-bytes-from" title="reads-bytes-from"><span class="secnum">27.6.2</span> reads-bytes-from</a></li><li><span class="item-toggle-none"></span><a href="#sec-reads-from" title="reads-from"><span class="secnum">27.6.3</span> reads-from</a></li><li><span class="item-toggle-none"></span><a href="#sec-host-synchronizes-with" title="host-synchronizes-with"><span class="secnum">27.6.4</span> host-synchronizes-with</a></li><li><span class="item-toggle-none"></span><a href="#sec-synchronizes-with" title="synchronizes-with"><span class="secnum">27.6.5</span> synchronizes-with</a></li><li><span class="item-toggle-none"></span><a href="#sec-happens-before" title="happens-before"><span class="secnum">27.6.6</span> happens-before</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-valid-executions" title="Properties of Valid Executions"><span class="secnum">27.7</span> Properties of Valid Executions</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-valid-chosen-reads" title="Valid Chosen Reads"><span class="secnum">27.7.1</span> Valid Chosen Reads</a></li><li><span class="item-toggle-none"></span><a href="#sec-coherent-reads" title="Coherent Reads"><span class="secnum">27.7.2</span> Coherent Reads</a></li><li><span class="item-toggle-none"></span><a href="#sec-tear-free-aligned-reads" title="Tear Free Reads"><span class="secnum">27.7.3</span> Tear Free Reads</a></li><li><span class="item-toggle-none"></span><a href="#sec-memory-order" title="Sequentially Consistent Atomics"><span class="secnum">27.7.4</span> Sequentially Consistent Atomics</a></li><li><span class="item-toggle-none"></span><a href="#sec-valid-executions" title="Valid Executions"><span class="secnum">27.7.5</span> Valid Executions</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-races" title="Races"><span class="secnum">27.8</span> Races</a></li><li><span class="item-toggle-none"></span><a href="#sec-data-races" title="Data Races"><span class="secnum">27.9</span> Data Races</a></li><li><span class="item-toggle-none"></span><a href="#sec-data-race-freedom" title="Data Race Freedom"><span class="secnum">27.10</span> Data Race Freedom</a></li><li><span class="item-toggle-none"></span><a href="#sec-shared-memory-guidelines" title="Shared Memory Guidelines"><span class="secnum">27.11</span> Shared Memory Guidelines</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-grammar-summary" title="Grammar Summary"><span class="secnum">A</span> Grammar Summary</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-lexical-grammar" title="Lexical Grammar"><span class="secnum">A.1</span> Lexical Grammar</a></li><li><span class="item-toggle-none"></span><a href="#sec-expressions" title="Expressions"><span class="secnum">A.2</span> Expressions</a></li><li><span class="item-toggle-none"></span><a href="#sec-statements" title="Statements"><span class="secnum">A.3</span> Statements</a></li><li><span class="item-toggle-none"></span><a href="#sec-functions-and-classes" title="Functions and Classes"><span class="secnum">A.4</span> Functions and Classes</a></li><li><span class="item-toggle-none"></span><a href="#sec-scripts-and-modules" title="Scripts and Modules"><span class="secnum">A.5</span> Scripts and Modules</a></li><li><span class="item-toggle-none"></span><a href="#sec-number-conversions" title="Number Conversions"><span class="secnum">A.6</span> Number Conversions</a></li><li><span class="item-toggle-none"></span><a href="#sec-universal-resource-identifier-character-classes" title="Universal Resource Identifier Character Classes"><span class="secnum">A.7</span> Universal Resource Identifier Character Classes</a></li><li><span class="item-toggle-none"></span><a href="#sec-regular-expressions" title="Regular Expressions"><span class="secnum">A.8</span> Regular Expressions</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-additional-ecmascript-features-for-web-browsers" title="Additional ECMAScript Features for Web Browsers"><span class="secnum">B</span> Additional ECMAScript Features for Web Browsers</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-additional-syntax" title="Additional Syntax"><span class="secnum">B.1</span> Additional Syntax</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-additional-syntax-numeric-literals" title="Numeric Literals"><span class="secnum">B.1.1</span> Numeric Literals</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-additional-syntax-numeric-literals-status-semantics" title="Static Semantics"><span class="secnum">B.1.1.1</span> Static Semantics</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-additional-syntax-string-literals" title="String Literals"><span class="secnum">B.1.2</span> String Literals</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-additional-syntax-string-literals-static-semantics" title="Static Semantics"><span class="secnum">B.1.2.1</span> Static Semantics</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-html-like-comments" title="HTML-like Comments"><span class="secnum">B.1.3</span> HTML-like Comments</a></li><li><span class="item-toggle">◢</span><a href="#sec-regular-expressions-patterns" title="Regular Expressions Patterns"><span class="secnum">B.1.4</span> Regular Expressions Patterns</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-patterns-static-semantics-early-errors-annexb" title="Static Semantics: Early Errors"><span class="secnum">B.1.4.1</span> SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-patterns-static-semantics-is-character-class-annexb" title="Static Semantics: IsCharacterClass"><span class="secnum">B.1.4.2</span> SS: IsCharacterClass</a></li><li><span class="item-toggle-none"></span><a href="#sec-patterns-static-semantics-character-value-annexb" title="Static Semantics: CharacterValue"><span class="secnum">B.1.4.3</span> SS: CharacterValue</a></li><li><span class="item-toggle">◢</span><a href="#sec-regular-expression-patterns-semantics" title="Pattern Semantics"><span class="secnum">B.1.4.4</span> Pattern Semantics</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-runtime-semantics-characterrangeorunion-abstract-operation" title="Runtime Semantics: CharacterRangeOrUnion ( A, B )"><span class="secnum">B.1.4.4.1</span> RS: CharacterRangeOrUnion ( <var>A</var>, <var>B</var> )</a></li></ol></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-additional-built-in-properties" title="Additional Built-in Properties"><span class="secnum">B.2</span> Additional Built-in Properties</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-additional-properties-of-the-global-object" title="Additional Properties of the Global Object"><span class="secnum">B.2.1</span> Additional Properties of the Global Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-escape-string" title="escape ( string )"><span class="secnum">B.2.1.1</span> escape ( <var>string</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-unescape-string" title="unescape ( string )"><span class="secnum">B.2.1.2</span> unescape ( <var>string</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-additional-properties-of-the-object.prototype-object" title="Additional Properties of the Object.prototype Object"><span class="secnum">B.2.2</span> Additional Properties of the Object.prototype Object</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-object.prototype.__proto__" title="Object.prototype.__proto__"><span class="secnum">B.2.2.1</span> Object.prototype.__proto__</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-get-object.prototype.__proto__" title="get Object.prototype.__proto__"><span class="secnum">B.2.2.1.1</span> get Object.prototype.__proto__</a></li><li><span class="item-toggle-none"></span><a href="#sec-set-object.prototype.__proto__" title="set Object.prototype.__proto__"><span class="secnum">B.2.2.1.2</span> set Object.prototype.__proto__</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-object.prototype.__defineGetter__" title="Object.prototype.__defineGetter__ ( P, getter )"><span class="secnum">B.2.2.2</span> Object.prototype.__defineGetter__ ( <var>P</var>, <var>getter</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-object.prototype.__defineSetter__" title="Object.prototype.__defineSetter__ ( P, setter )"><span class="secnum">B.2.2.3</span> Object.prototype.__defineSetter__ ( <var>P</var>, <var>setter</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-object.prototype.__lookupGetter__" title="Object.prototype.__lookupGetter__ ( P )"><span class="secnum">B.2.2.4</span> Object.prototype.__lookupGetter__ ( <var>P</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-object.prototype.__lookupSetter__" title="Object.prototype.__lookupSetter__ ( P )"><span class="secnum">B.2.2.5</span> Object.prototype.__lookupSetter__ ( <var>P</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-additional-properties-of-the-string.prototype-object" title="Additional Properties of the String.prototype Object"><span class="secnum">B.2.3</span> Additional Properties of the String.prototype Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.substr" title="String.prototype.substr ( start, length )"><span class="secnum">B.2.3.1</span> String.prototype.substr ( <var>start</var>, <var>length</var> )</a></li><li><span class="item-toggle">◢</span><a href="#sec-string.prototype.anchor" title="String.prototype.anchor ( name )"><span class="secnum">B.2.3.2</span> String.prototype.anchor ( <var>name</var> )</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-createhtml" title="Runtime Semantics: CreateHTML ( string, tag, attribute, value )"><span class="secnum">B.2.3.2.1</span> RS: CreateHTML ( <var>string</var>, <var>tag</var>, <var>attribute</var>, <var>value</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.big" title="String.prototype.big ( )"><span class="secnum">B.2.3.3</span> String.prototype.big ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.blink" title="String.prototype.blink ( )"><span class="secnum">B.2.3.4</span> String.prototype.blink ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.bold" title="String.prototype.bold ( )"><span class="secnum">B.2.3.5</span> String.prototype.bold ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.fixed" title="String.prototype.fixed ( )"><span class="secnum">B.2.3.6</span> String.prototype.fixed ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.fontcolor" title="String.prototype.fontcolor ( color )"><span class="secnum">B.2.3.7</span> String.prototype.fontcolor ( <var>color</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.fontsize" title="String.prototype.fontsize ( size )"><span class="secnum">B.2.3.8</span> String.prototype.fontsize ( <var>size</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.italics" title="String.prototype.italics ( )"><span class="secnum">B.2.3.9</span> String.prototype.italics ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.link" title="String.prototype.link ( url )"><span class="secnum">B.2.3.10</span> String.prototype.link ( <var>url</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.small" title="String.prototype.small ( )"><span class="secnum">B.2.3.11</span> String.prototype.small ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.strike" title="String.prototype.strike ( )"><span class="secnum">B.2.3.12</span> String.prototype.strike ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.sub" title="String.prototype.sub ( )"><span class="secnum">B.2.3.13</span> String.prototype.sub ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-string.prototype.sup" title="String.prototype.sup ( )"><span class="secnum">B.2.3.14</span> String.prototype.sup ( )</a></li><li><span class="item-toggle-none"></span><a href="#String.prototype.trimleft" title="String.prototype.trimLeft ( )"><span class="secnum">B.2.3.15</span> String.prototype.trimLeft ( )</a></li><li><span class="item-toggle-none"></span><a href="#String.prototype.trimright" title="String.prototype.trimRight ( )"><span class="secnum">B.2.3.16</span> String.prototype.trimRight ( )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-additional-properties-of-the-date.prototype-object" title="Additional Properties of the Date.prototype Object"><span class="secnum">B.2.4</span> Additional Properties of the Date.prototype Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.getyear" title="Date.prototype.getYear ( )"><span class="secnum">B.2.4.1</span> Date.prototype.getYear ( )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.setyear" title="Date.prototype.setYear ( year )"><span class="secnum">B.2.4.2</span> Date.prototype.setYear ( <var>year</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-date.prototype.togmtstring" title="Date.prototype.toGMTString ( )"><span class="secnum">B.2.4.3</span> Date.prototype.toGMTString ( )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-additional-properties-of-the-regexp.prototype-object" title="Additional Properties of the RegExp.prototype Object"><span class="secnum">B.2.5</span> Additional Properties of the RegExp.prototype Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-regexp.prototype.compile" title="RegExp.prototype.compile ( pattern, flags )"><span class="secnum">B.2.5.1</span> RegExp.prototype.compile ( <var>pattern</var>, <var>flags</var> )</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-other-additional-features" title="Other Additional Features"><span class="secnum">B.3</span> Other Additional Features</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-__proto__-property-names-in-object-initializers" title="__proto__ Property Names in Object Initializers"><span class="secnum">B.3.1</span> __proto__ Property Names in Object Initializers</a></li><li><span class="item-toggle-none"></span><a href="#sec-labelled-function-declarations" title="Labelled Function Declarations"><span class="secnum">B.3.2</span> Labelled Function Declarations</a></li><li><span class="item-toggle">◢</span><a href="#sec-block-level-function-declarations-web-legacy-compatibility-semantics" title="Block-Level Function Declarations Web Legacy Compatibility Semantics"><span class="secnum">B.3.3</span> Block-Level Function Declarations Web Legacy Compatibility Semantics</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-web-compat-functiondeclarationinstantiation" title="Changes to FunctionDeclarationInstantiation"><span class="secnum">B.3.3.1</span> Changes to FunctionDeclarationInstantiation</a></li><li><span class="item-toggle-none"></span><a href="#sec-web-compat-globaldeclarationinstantiation" title="Changes to GlobalDeclarationInstantiation"><span class="secnum">B.3.3.2</span> Changes to GlobalDeclarationInstantiation</a></li><li><span class="item-toggle-none"></span><a href="#sec-web-compat-evaldeclarationinstantiation" title="Changes to EvalDeclarationInstantiation"><span class="secnum">B.3.3.3</span> Changes to EvalDeclarationInstantiation</a></li><li><span class="item-toggle-none"></span><a href="#sec-block-duplicates-allowed-static-semantics" title="Changes to Block Static Semantics: Early Errors"><span class="secnum">B.3.3.4</span> Changes to Block SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-switch-duplicates-allowed-static-semantics" title="Changes to switch Statement Static Semantics: Early Errors"><span class="secnum">B.3.3.5</span> Changes to <code>switch</code> Statement SS: Early Errors</a></li><li><span class="item-toggle-none"></span><a href="#sec-web-compat-blockdeclarationinstantiation" title="Changes to BlockDeclarationInstantiation"><span class="secnum">B.3.3.6</span> Changes to BlockDeclarationInstantiation</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-functiondeclarations-in-ifstatement-statement-clauses" title="FunctionDeclarations in IfStatement Statement Clauses"><span class="secnum">B.3.4</span> FunctionDeclarations in IfStatement Statement Clauses</a></li><li><span class="item-toggle-none"></span><a href="#sec-variablestatements-in-catch-blocks" title="VariableStatements in Catch Blocks"><span class="secnum">B.3.5</span> VariableStatements in Catch Blocks</a></li><li><span class="item-toggle-none"></span><a href="#sec-initializers-in-forin-statement-heads" title="Initializers in ForIn Statement Heads"><span class="secnum">B.3.6</span> Initializers in ForIn Statement Heads</a></li><li><span class="item-toggle">◢</span><a href="#sec-IsHTMLDDA-internal-slot" title="The [[IsHTMLDDA]] Internal Slot"><span class="secnum">B.3.7</span> The [[IsHTMLDDA]] Internal Slot</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-IsHTMLDDA-internal-slot-to-boolean" title="Changes to ToBoolean"><span class="secnum">B.3.7.1</span> Changes to ToBoolean</a></li><li><span class="item-toggle-none"></span><a href="#sec-IsHTMLDDA-internal-slot-aec" title="Changes to Abstract Equality Comparison"><span class="secnum">B.3.7.2</span> Changes to Abstract Equality Comparison</a></li><li><span class="item-toggle-none"></span><a href="#sec-IsHTMLDDA-internal-slot-typeof" title="Changes to the typeof Operator"><span class="secnum">B.3.7.3</span> Changes to the <code>typeof</code> Operator</a></li></ol></li></ol></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-strict-mode-of-ecmascript" title="The Strict Mode of ECMAScript"><span class="secnum">C</span> The Strict Mode of ECMAScript</a></li><li><span class="item-toggle-none"></span><a href="#sec-corrections-and-clarifications-in-ecmascript-2015-with-possible-compatibility-impact" title="Corrections and Clarifications in ECMAScript 2015 with Possible Compatibility Impact"><span class="secnum">D</span> Corrections and Clarifications in ECMAScript 2015 with Possible Compatibility Impact</a></li><li><span class="item-toggle-none"></span><a href="#sec-additions-and-changes-that-introduce-incompatibilities-with-prior-editions" title="Additions and Changes That Introduce Incompatibilities with Prior Editions"><span class="secnum">E</span> Additions and Changes That Introduce Incompatibilities with Prior Editions</a></li><li><span class="item-toggle-none"></span><a href="#sec-colophon" title="Colophon"><span class="secnum">F</span> Colophon</a></li><li><span class="item-toggle-none"></span><a href="#sec-bibliography" title="Bibliography"><span class="secnum">G</span> Bibliography</a></li><li><span class="item-toggle-none"></span><a href="#sec-copyright-and-software-license" title="Copyright &amp; Software License"><span class="secnum">H</span> Copyright &amp; Software License</a></li></ol></div></div><div id="spec-container">
<h1 class="version first"><a name="Title"></a></h1>
<p class="version first"><img src="/ecma-262/9.0/img/ecma-logo.svg" alt="Ecma logo" id="ecma-logo"></p>
<h1 class="version first">ECMA-262, 10<sup>th</sup> edition, June 2019</h1>
<h1 class="title">ECMAScript® 2019 Language&nbsp;Specification</h1>
<p>&nbsp;</p>
<div id="metadata-block">
<h1>Contributing to this Specification</h1>
<p>This specification is developed on GitHub with the help of the
ECMAScript community. There are a number of ways to contribute to the
development of this specification:</p>
<ul>
<li>GitHub Repository: <a href="https://github.com/tc39/ecma262">https://github.com/tc39/ecma262</a></li>
<li>Issues: <a href="https://github.com/tc39/ecma262/issues">All Issues</a>, <a href="https://github.com/tc39/ecma262/issues/new">File a New Issue</a></li>
<li>Pull Requests: <a href="https://github.com/tc39/ecma262/pulls">All Pull Requests</a>, <a href="https://github.com/tc39/ecma262/pulls/new">Create a New Pull Request</a></li>
<li>Test Suite: <a href="https://github.com/tc39/test262">Test262</a></li>
<li>Editors:
<ul>
<li><a href="mailto:brian.terlson at microsoft dot com">Brian Terlson</a> (<a href="https://twitter.com/bterlson">@bterlson</a>)</li>
<li><a href="mailto:bradley.meck at gmail dot com">Bradley Farias</a> (<a href="https://twitter.com/bradleymeck">@bradleymeck</a>)</li>
<li><a href="mailto:ljharb at gmail dot com">Jordan Harband</a> (<a href="https://twitter.com/ljharb">@ljharb</a>)</li>
</ul>
</li>
<li>
<p>Community:</p>
<ul>
<li>Mailing list: <a href="https://esdiscuss.org/">es-discuss</a></li>
<li>IRC: <a href="ircs://irc.freenode.net:6667">#tc39</a> on <a href="https://freenode.net/kb/answer/chat">freenode</a></li>
</ul>
</li>
</ul>
<p>Refer to the <emu-xref href="#sec-colophon" id="_ref_0"><a href="#sec-colophon">colophon</a></emu-xref> for more information on how this document is created.</p>
</div>
<emu-intro id="sec-intro">
<h1>Introduction</h1>
<p>This Ecma Standard defines the ECMAScript 2019 Language. It is the
tenth edition of the ECMAScript Language Specification. Since
publication of the first edition in 1997, ECMAScript has grown to be one
of the world's most widely used general-purpose programming languages.
It is best known as the language embedded in web browsers but has also
been widely adopted for server and embedded applications.</p>
<p>ECMAScript is based on several originating technologies, the most
well-known being JavaScript (Netscape) and JScript (Microsoft). The
language was invented by Brendan Eich at Netscape and first appeared in
that company's Navigator 2.0 browser. It has appeared in all subsequent
browsers from Netscape and in all browsers from Microsoft starting with
Internet Explorer 3.0.</p>
<p>The development of the ECMAScript Language Specification started in
November 1996. The first edition of this Ecma Standard was adopted by
the Ecma General Assembly of June 1997.</p>
<p>That Ecma Standard was submitted to ISO/IEC JTC 1 for adoption
under the fast-track procedure, and approved as international standard
ISO/IEC 16262, in April 1998. The Ecma General Assembly of June 1998
approved the second edition of ECMA-262 to keep it fully aligned with
ISO/IEC 16262. Changes between the first and the second edition are
editorial in nature.</p>
<p>The third edition of the Standard introduced powerful regular
expressions, better string handling, new control statements, try/catch
exception handling, tighter definition of errors, formatting for numeric
output and minor changes in anticipation of future language growth. The
third edition of the ECMAScript standard was adopted by the Ecma
General Assembly of December 1999 and published as ISO/IEC 16262:2002 in
June 2002.</p>
<p>After publication of the third edition, ECMAScript achieved massive
adoption in conjunction with the World Wide Web where it has become the
programming language that is supported by essentially all web browsers.
Significant work was done to develop a fourth edition of ECMAScript.
However, that work was not completed and not published as the fourth
edition of ECMAScript but some of it was incorporated into the
development of the sixth edition.</p>
<p>The fifth edition of ECMAScript (published as ECMA-262 5<sup>th</sup>
edition) codified de facto interpretations of the language
specification that have become common among browser implementations and
added support for new features that had emerged since the publication of
the third edition. Such features include accessor properties,
reflective creation and inspection of objects, program control of
property attributes, additional array manipulation functions, support
for the JSON object encoding format, and a strict mode that provides
enhanced error checking and program security. The fifth edition was
adopted by the Ecma General Assembly of December 2009.</p>
<p>The fifth edition was submitted to ISO/IEC JTC 1 for adoption under
the fast-track procedure, and approved as international standard
ISO/IEC 16262:2011. Edition 5.1 of the ECMAScript Standard incorporated
minor corrections and is the same text as ISO/IEC 16262:2011. The 5.1
Edition was adopted by the Ecma General Assembly of June 2011.</p>
<p>Focused development of the sixth edition started in 2009, as the
fifth edition was being prepared for publication. However, this was
preceded by significant experimentation and language enhancement design
efforts dating to the publication of the third edition in 1999. In a
very real sense, the completion of the sixth edition is the culmination
of a fifteen year effort. The goals for this addition included providing
better support for large applications, library creation, and for use of
ECMAScript as a compilation target for other languages. Some of its
major enhancements included modules, class declarations, lexical block
scoping, iterators and generators, promises for asynchronous
programming, destructuring patterns, and proper tail calls. The
ECMAScript library of built-ins was expanded to support additional data
abstractions including maps, sets, and arrays of binary numeric values
as well as additional support for Unicode supplemental characters in
strings and regular expressions. The built-ins were also made extensible
via subclassing. The sixth edition provides the foundation for regular,
incremental language and library enhancements. The sixth edition was
adopted by the General Assembly of June 2015.</p>
<p>ECMAScript 2016 was the first ECMAScript edition released under
Ecma TC39's new yearly release cadence and open development process. A
plain-text source document was built from the ECMAScript 2015 source
document to serve as the base for further development entirely on
GitHub. Over the year of this standard's development, hundreds of pull
requests and issues were filed representing thousands of bug fixes,
editorial fixes and other improvements. Additionally, numerous software
tools were developed to aid in this effort including Ecmarkup,
Ecmarkdown, and Grammarkdown. ES2016 also included support for a new
exponentiation operator and adds a new method to Array.prototype called <code>includes</code>.</p>
<p>ECMAScript 2017 introduced Async Functions, Shared Memory, and
Atomics along with smaller language and library enhancements, bug fixes,
and editorial updates. Async functions improve the asynchronous
programming experience by providing syntax for promise-returning
functions. Shared Memory and Atomics introduce a new <emu-xref href="#sec-memory-model" id="_ref_855"><a href="#sec-memory-model">memory model</a></emu-xref> that allows multi-<emu-xref href="#agent" id="_ref_856"><a href="#agent">agent</a></emu-xref>
programs to communicate using atomic operations that ensure a
well-defined execution order even on parallel CPUs. This specification
also includes new static methods on Object: <code>Object.values</code>, <code>Object.entries</code>, and <code>Object.getOwnPropertyDescriptors</code>.</p>
<p>ECMAScript 2018 introduced support for asynchronous iteration via
the AsyncIterator protocol and async generators. It also included four
new regular expression features: the dotAll flag, named capture groups,
Unicode property escapes, and look-behind assertions. Lastly it included
rest parameter and spread operator support for object properties.</p>
<p>This specification, the 10<sup>th</sup> edition, introduces a few new built-in functions: <code>flat</code> and <code>flatMap</code> on <code>Array.prototype</code> for flattening arrays, <code>Object.fromEntries</code> for directly turning the return value of <code>Object.entries</code> into a new Object, and <code>trimStart</code> and <code>trimEnd</code> on <code>String.prototype</code> as better-named alternatives to the widely implemented but non-standard <code>String.prototype.trimLeft</code> and <code>trimRight</code>
built-ins. In addition, this specification includes a few minor updates
to syntax and semantics. Updated syntax includes optional catch binding
parameters and allowing U+2028 (LINE SEPARATOR) and U+2029 (PARAGRAPH
SEPARATOR) in string literals to align with JSON. Other updates include
requiring that <code>Array.prototype.sort</code> be a stable sort, requiring that JSON.stringify return well-formed UTF-8 regardless of input, and clarifying <code>Function.prototype.toString</code> by requiring that it either return the corresponding original source text or a standard placeholder.</p>
<p>Dozens of individuals representing many organizations have made
very significant contributions within Ecma TC39 to the development of
this edition and to the prior editions. In addition, a vibrant community
has emerged supporting TC39's ECMAScript efforts. This community has
reviewed numerous drafts, filed thousands of bug reports, performed
implementation experiments, contributed test suites, and educated the
world-wide developer community about ECMAScript. Unfortunately, it is
impossible to identify and acknowledge every person and organization who
has contributed to this effort.</p>
<p>
Allen Wirfs-Brock<br>
ECMA-262, Project Editor, 6<sup>th</sup> Edition
</p>
<p>
Brian Terlson<br>
ECMA-262, Project Editor, 7<sup>th</sup> through 10<sup>th</sup> Editions
</p>
</emu-intro>
<emu-clause id="sec-scope">
<h1><span class="secnum">1</span>Scope</h1>
<p>This Standard defines the ECMAScript 2019 general-purpose programming language.</p>
</emu-clause>
<emu-clause id="sec-conformance">
<h1><span class="secnum">2</span>Conformance</h1>
<p>A conforming implementation of ECMAScript must provide and support
all the types, values, objects, properties, functions, and program
syntax and semantics described in this specification.</p>
<p>A conforming implementation of ECMAScript must interpret source
text input in conformance with the latest version of the Unicode
Standard and ISO/IEC 10646.</p>
<p>A conforming implementation of ECMAScript that provides an
application programming interface (API) that supports programs that need
to adapt to the linguistic and cultural conventions used by different
human languages and countries must implement the interface defined by
the most recent edition of ECMA-402 that is compatible with this
specification.</p>
<p>A conforming implementation of ECMAScript may provide additional
types, values, objects, properties, and functions beyond those described
in this specification. In particular, a conforming implementation of
ECMAScript may provide properties not described in this specification,
and values for those properties, for objects that are described in this
specification.</p>
<p>A conforming implementation of ECMAScript may support program and
regular expression syntax not described in this specification. In
particular, a conforming implementation of ECMAScript may support
program syntax that makes use of the “future reserved words” listed in
subclause <emu-xref href="#sec-future-reserved-words" id="_ref_1"><a href="#sec-future-reserved-words">11.6.2.2</a></emu-xref> of this specification.</p>
<p>A conforming implementation of ECMAScript must not implement any
extension that is listed as a Forbidden Extension in subclause <emu-xref href="#sec-forbidden-extensions" id="_ref_2"><a href="#sec-forbidden-extensions">16.2</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-normative-references">
<h1><span class="secnum">3</span>Normative References</h1>
<p>The following referenced documents are indispensable for the
application of this document. For dated references, only the edition
cited applies. For undated references, the latest edition of the
referenced document (including any amendments) applies.</p>
<p>ISO/IEC 10646 <i>Information Technology Universal Multiple-Octet
Coded Character Set (UCS) plus Amendment 1:2005, Amendment 2:2006,
Amendment 3:2008, and Amendment 4:2008</i>, plus additional amendments and corrigenda, or successor</p>
<p>ECMA-402, <i>ECMAScript 2015 Internationalization API Specification</i>.
<br>
<a href="https://ecma-international.org/publications/standards/Ecma-402.htm">https://ecma-international.org/publications/standards/Ecma-402.htm</a></p>
<p>ECMA-404, <i>The JSON Data Interchange Format</i>.
<br>
<a href="https://ecma-international.org/publications/standards/Ecma-404.htm">https://ecma-international.org/publications/standards/Ecma-404.htm</a></p>
</emu-clause>
<emu-clause id="sec-overview">
<h1><span class="secnum">4</span>Overview</h1>
<p>This section contains a non-normative overview of the ECMAScript language.</p>
<p>ECMAScript is an object-oriented programming language for
performing computations and manipulating computational objects within a
host environment. ECMAScript as defined here is not intended to be
computationally self-sufficient; indeed, there are no provisions in this
specification for input of external data or output of computed results.
Instead, it is expected that the computational environment of an
ECMAScript program will provide not only the objects and other
facilities described in this specification but also certain
environment-specific objects, whose description and behaviour are beyond
the scope of this specification except to indicate that they may
provide certain properties that can be accessed and certain functions
that can be called from an ECMAScript program.</p>
<p>ECMAScript was originally designed to be used as a scripting
language, but has become widely used as a general-purpose programming
language. A <em>scripting language</em> is a programming language that
is used to manipulate, customize, and automate the facilities of an
existing system. In such systems, useful functionality is already
available through a user interface, and the scripting language is a
mechanism for exposing that functionality to program control. In this
way, the existing system is said to provide a host environment of
objects and facilities, which completes the capabilities of the
scripting language. A scripting language is intended for use by both
professional and non-professional programmers.</p>
<p>ECMAScript was originally designed to be a <em>Web scripting language</em>,
providing a mechanism to enliven Web pages in browsers and to perform
server computation as part of a Web-based client-server architecture.
ECMAScript is now used to provide core scripting capabilities for a
variety of host environments. Therefore the core language is specified
in this document apart from any particular host environment.</p>
<p>ECMAScript usage has moved beyond simple scripting and it is now
used for the full spectrum of programming tasks in many different
environments and scales. As the usage of ECMAScript has expanded, so has
the features and facilities it provides. ECMAScript is now a fully
featured general-purpose programming language.</p>
<p>Some of the facilities of ECMAScript are similar to those used in
other programming languages; in particular C, Java™, Self, and Scheme as
described in:</p>
<p>ISO/IEC 9899:1996, <i>Programming Languages C</i>.</p>
<p>Gosling, James, Bill Joy and Guy Steele. <i>The Java<sup>™</sup> Language Specification</i>. Addison Wesley Publishing Co., 1996.</p>
<p>Ungar, David, and Smith, Randall B. Self: The Power of Simplicity. <i>OOPSLA '87 Conference Proceedings</i>, pp. 227-241, Orlando, FL, October 1987.</p>
<p><i>IEEE Standard for the Scheme Programming Language</i>. IEEE Std 1178-1990.</p>
<emu-clause id="sec-web-scripting">
<h1><span class="secnum">4.1</span>Web Scripting</h1>
<p>A web browser provides an ECMAScript host environment for
client-side computation including, for instance, objects that represent
windows, menus, pop-ups, dialog boxes, text areas, anchors, frames,
history, cookies, and input/output. Further, the host environment
provides a means to attach scripting code to events such as change of
focus, page and image loading, unloading, error and abort, selection,
form submission, and mouse actions. Scripting code appears within the
HTML and the displayed page is a combination of user interface elements
and fixed and computed text and images. The scripting code is reactive
to user interaction, and there is no need for a main program.</p>
<p>A web server provides a different host environment for
server-side computation including objects representing requests,
clients, and files; and mechanisms to lock and share data. By using
browser-side and server-side scripting together, it is possible to
distribute computation between the client and server while providing a
customized user interface for a Web-based application.</p>
<p>Each Web browser and server that supports ECMAScript supplies its
own host environment, completing the ECMAScript execution environment.</p>
</emu-clause>
<emu-clause id="sec-ecmascript-overview">
<h1><span class="secnum">4.2</span>ECMAScript Overview</h1>
<p>The following is an informal overview of ECMAScript—not all parts
of the language are described. This overview is not part of the
standard proper.</p>
<p>ECMAScript is object-based: basic language and host facilities
are provided by objects, and an ECMAScript program is a cluster of
communicating objects. In ECMAScript, an <em>object</em> is a collection of zero or more <em>properties</em> each with <em>attributes</em> that determine how each property can be used—for example, when the Writable attribute for a property is set to <emu-val>false</emu-val>,
any attempt by executed ECMAScript code to assign a different value to
the property fails. Properties are containers that hold other objects, <em>primitive values</em>, or <em>functions</em>. A primitive value is a member of one of the following built-in types: <b>Undefined</b>, <b>Null</b>, <b>Boolean</b>, <b>Number</b>, <b>String</b>, and <b>Symbol;</b> an object is a member of the built-in type <b>Object</b>; and a function is a callable object. A function that is associated with an object via a property is called a <em>method</em>.</p>
<p>ECMAScript defines a collection of <em>built-in objects</em> that round out the definition of ECMAScript entities. These built-in objects include the <emu-xref href="#sec-global-object" id="_ref_857"><a href="#sec-global-object">global object</a></emu-xref>; objects that are fundamental to the <emu-xref href="#sec-runtime-semantics" id="_ref_858"><a href="#sec-runtime-semantics">runtime semantics</a></emu-xref> of the language including <code>Object</code>, <code>Function</code>, <code>Boolean</code>, <code>Symbol</code>, and various <code>Error</code> objects; objects that represent and manipulate numeric values including <code>Math</code>, <code>Number</code>, and <code>Date</code>; the text processing objects <code>String</code> and <code>RegExp</code>; objects that are indexed collections of values including <code>Array</code>
and nine different kinds of Typed Arrays whose elements all have a
specific numeric data representation; keyed collections including <code>Map</code> and <code>Set</code> objects; objects supporting structured data including the <code>JSON</code> object, <code>ArrayBuffer</code>, <code>SharedArrayBuffer</code>, and <code>DataView</code>; objects supporting control abstractions including generator functions and <code>Promise</code> objects; and reflection objects including <code>Proxy</code> and <code>Reflect</code>.</p>
<p>ECMAScript also defines a set of built-in <em>operators</em>.
ECMAScript operators include various unary operations, multiplicative
operators, additive operators, bitwise shift operators, relational
operators, equality operators, binary bitwise operators, binary logical
operators, assignment operators, and the comma operator.</p>
<p>Large ECMAScript programs are supported by <em>modules</em>
which allow a program to be divided into multiple sequences of
statements and declarations. Each module explicitly identifies
declarations it uses that need to be provided by other modules and which
of its declarations are available for use by other modules.</p>
<p>ECMAScript syntax intentionally resembles Java syntax. ECMAScript
syntax is relaxed to enable it to serve as an easy-to-use scripting
language. For example, a variable is not required to have its type
declared nor are types associated with properties, and defined functions
are not required to have their declarations appear textually before
calls to them.</p>
<emu-clause id="sec-objects">
<h1><span class="secnum">4.2.1</span>Objects</h1>
<p>Even though ECMAScript includes syntax for class definitions,
ECMAScript objects are not fundamentally class-based such as those in
C++, Smalltalk, or Java. Instead objects may be created in various ways
including via a literal notation or via <em>constructors</em> which
create objects and then execute code that initializes all or part of
them by assigning initial values to their properties. Each <emu-xref href="#constructor" id="_ref_859"><a href="#constructor">constructor</a></emu-xref> is a function that has a property named <code>"prototype"</code> that is used to implement <em>prototype-based inheritance</em> and <em>shared properties</em>. Objects are created by using constructors in <b>new</b> expressions; for example, <code>new Date(2009, 11)</code> creates a new Date object. Invoking a <emu-xref href="#constructor" id="_ref_860"><a href="#constructor">constructor</a></emu-xref> without using <b>new</b> has consequences that depend on the <emu-xref href="#constructor" id="_ref_861"><a href="#constructor">constructor</a></emu-xref>. For example, <code>Date()</code> produces a string representation of the current date and time rather than an object.</p>
<p>Every object created by a <emu-xref href="#constructor" id="_ref_862"><a href="#constructor">constructor</a></emu-xref> has an implicit reference (called the object's <em>prototype</em>) to the value of its <emu-xref href="#constructor" id="_ref_863"><a href="#constructor">constructor</a></emu-xref>'s <code>"prototype"</code> property. Furthermore, a prototype may have a non-null implicit reference to its prototype, and so on; this is called the <em>prototype chain</em>.
When a reference is made to a property in an object, that reference is
to the property of that name in the first object in the prototype chain
that contains a property of that name. In other words, first the object
mentioned directly is examined for such a property; if that object
contains the named property, that is the property to which the reference
refers; if that object does not contain the named property, the
prototype for that object is examined next; and so on.</p>
<emu-figure id="figure-1" caption="Object/Prototype Relationships"><figure><figcaption>Figure 1: Object/Prototype Relationships</figcaption>
<object data="ECMAScript%C2%AE%202019%20Language%C2%A0Specification_files/figure-1.svg" type="image/svg+xml" width="719" height="354"> <img alt="An image of lots of boxes and arrows." src="img/figure-1.png" width="719" height="354"> </object>
</figure></emu-figure>
<p>In a class-based object-oriented language, in general, state is
carried by instances, methods are carried by classes, and inheritance
is only of structure and behaviour. In ECMAScript, the state and methods
are carried by objects, while structure, behaviour, and state are all
inherited.</p>
<p>All objects that do not directly contain a particular property
that their prototype contains share that property and its value. Figure 1
illustrates this:</p>
<p><b>CF</b> is a <emu-xref href="#constructor" id="_ref_864"><a href="#constructor">constructor</a></emu-xref> (and also an object). Five objects have been created by using <code>new</code> expressions: <b>cf<sub>1</sub></b>, <b>cf<sub>2</sub></b>, <b>cf<sub>3</sub></b>, <b>cf<sub>4</sub></b>, and <b>cf<sub>5</sub></b>. Each of these objects contains properties named <code>q1</code> and <code>q2</code>. The dashed lines represent the implicit prototype relationship; so, for example, <b>cf<sub>3</sub></b>'s prototype is <b>CF<sub>p</sub></b>. The <emu-xref href="#constructor" id="_ref_865"><a href="#constructor">constructor</a></emu-xref>, <b>CF</b>, has two properties itself, named <code>P1</code> and <code>P2</code>, which are not visible to <b>CF<sub>p</sub></b>, <b>cf<sub>1</sub></b>, <b>cf<sub>2</sub></b>, <b>cf<sub>3</sub></b>, <b>cf<sub>4</sub></b>, or <b>cf<sub>5</sub></b>. The property named <code>CFP1</code> in <b>CF<sub>p</sub></b> is shared by <b>cf<sub>1</sub></b>, <b>cf<sub>2</sub></b>, <b>cf<sub>3</sub></b>, <b>cf<sub>4</sub></b>, and <b>cf<sub>5</sub></b> (but not by <b>CF</b>), as are any properties found in <b>CF<sub>p</sub></b>'s implicit prototype chain that are not named <code>q1</code>, <code>q2</code>, or <code>CFP1</code>. Notice that there is no implicit prototype link between <b>CF</b> and <b>CF<sub>p</sub></b>.</p>
<p>Unlike most class-based object languages, properties can be
added to objects dynamically by assigning values to them. That is,
constructors are not required to name or assign values to all or any of
the constructed object's properties. In the above diagram, one could add
a new shared property for <b>cf<sub>1</sub></b>, <b>cf<sub>2</sub></b>, <b>cf<sub>3</sub></b>, <b>cf<sub>4</sub></b>, and <b>cf<sub>5</sub></b> by assigning a new value to the property in <b>CF<sub>p</sub></b>.</p>
<p>Although ECMAScript objects are not inherently class-based, it
is often convenient to define class-like abstractions based upon a
common pattern of <emu-xref href="#constructor" id="_ref_866"><a href="#constructor">constructor</a></emu-xref>
functions, prototype objects, and methods. The ECMAScript built-in
objects themselves follow such a class-like pattern. Beginning with
ECMAScript 2015, the ECMAScript language includes syntactic class
definitions that permit programmers to concisely define objects that
conform to the same class-like abstraction pattern used by the built-in
objects.</p>
</emu-clause>
<emu-clause id="sec-strict-variant-of-ecmascript">
<h1><span class="secnum">4.2.2</span>The Strict Variant of ECMAScript</h1>
<p>The ECMAScript Language recognizes the possibility that some
users of the language may wish to restrict their usage of some features
available in the language. They might do so in the interests of
security, to avoid what they consider to be error-prone features, to get
enhanced error checking, or for other reasons of their choosing. In
support of this possibility, ECMAScript defines a strict variant of the
language. The strict variant of the language excludes some specific
syntactic and semantic features of the regular ECMAScript language and
modifies the detailed semantics of some features. The strict variant
also specifies additional error conditions that must be reported by
throwing error exceptions in situations that are not specified as errors
by the non-strict form of the language.</p>
<p>The strict variant of ECMAScript is commonly referred to as the <em>strict mode</em>
of the language. Strict mode selection and use of the strict mode
syntax and semantics of ECMAScript is explicitly made at the level of
individual ECMAScript source text units. Because strict mode is selected
at the level of a syntactic source text unit, strict mode only imposes
restrictions that have local effect within such a source text unit.
Strict mode does not restrict or modify any aspect of the ECMAScript
semantics that must operate consistently across multiple source text
units. A complete ECMAScript program may be composed of both strict mode
and non-strict mode ECMAScript source text units. In this case, strict
mode only applies when actually executing code that is defined within a
strict mode source text unit.</p>
<p>In order to conform to this specification, an ECMAScript
implementation must implement both the full unrestricted ECMAScript
language and the strict variant of the ECMAScript language as defined by
this specification. In addition, an implementation must support the
combination of unrestricted and strict mode source text units into a
single composite program.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-terms-and-definitions">
<h1><span class="secnum">4.3</span>Terms and Definitions</h1>
<p>For the purposes of this document, the following terms and definitions apply.</p>
<emu-clause id="sec-type">
<h1><span class="secnum">4.3.1</span>type</h1>
<p>set of data values as defined in clause <emu-xref href="#sec-ecmascript-data-types-and-values" id="_ref_3"><a href="#sec-ecmascript-data-types-and-values">6</a></emu-xref> of this specification</p>
</emu-clause>
<emu-clause id="sec-primitive-value">
<h1><span class="secnum">4.3.2</span>primitive value</h1>
<p>member of one of the types Undefined, Null, Boolean, Number, Symbol, or String as defined in clause <emu-xref href="#sec-ecmascript-data-types-and-values" id="_ref_4"><a href="#sec-ecmascript-data-types-and-values">6</a></emu-xref></p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>A primitive value is a datum that is represented directly at the lowest level of the language implementation.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-terms-and-definitions-object">
<h1><span class="secnum">4.3.3</span>object</h1>
<p>member of the type Object</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>An object is a collection of properties and has a single prototype object. The prototype may be the null value.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-constructor">
<h1><span class="secnum">4.3.4</span>constructor</h1>
<p><emu-xref href="#function-object" id="_ref_867"><a href="#function-object">function object</a></emu-xref> that creates and initializes objects</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The value of a <emu-xref href="#constructor" id="_ref_868"><a href="#constructor">constructor</a></emu-xref>'s <code>prototype</code> property is a prototype object that is used to implement inheritance and shared properties.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-terms-and-definitions-prototype">
<h1><span class="secnum">4.3.5</span>prototype</h1>
<p>object that provides shared properties for other objects</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>When a <emu-xref href="#constructor" id="_ref_869"><a href="#constructor">constructor</a></emu-xref> creates an object, that object implicitly references the <emu-xref href="#constructor" id="_ref_870"><a href="#constructor">constructor</a></emu-xref>'s <code>prototype</code> property for the purpose of resolving property references. The <emu-xref href="#constructor" id="_ref_871"><a href="#constructor">constructor</a></emu-xref>'s <code>prototype</code> property can be referenced by the program expression <code><var>constructor</var>.prototype</code>,
and properties added to an object's prototype are shared, through
inheritance, by all objects sharing the prototype. Alternatively, a new
object may be created with an explicitly specified prototype by using
the <code>Object.create</code> built-in function.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-ordinary-object">
<h1><span class="secnum">4.3.6</span>ordinary object</h1>
<p>object that has the default behaviour for the essential internal methods that must be supported by all objects</p>
</emu-clause>
<emu-clause id="sec-exotic-object">
<h1><span class="secnum">4.3.7</span>exotic object</h1>
<p>object that does not have the default behaviour for one or more of the essential internal methods</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Any object that is not an ordinary object is an <emu-xref href="#exotic-object" id="_ref_872"><a href="#exotic-object">exotic object</a></emu-xref>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-standard-object">
<h1><span class="secnum">4.3.8</span>standard object</h1>
<p>object whose semantics are defined by this specification</p>
</emu-clause>
<emu-clause id="sec-built-in-object">
<h1><span class="secnum">4.3.9</span>built-in object</h1>
<p>object specified and supplied by an ECMAScript implementation</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Standard built-in objects are defined in this specification.
An ECMAScript implementation may specify and supply additional kinds of
built-in objects. A <em>built-in <emu-xref href="#constructor" id="_ref_873"><a href="#constructor">constructor</a></emu-xref></em> is a built-in object that is also a <emu-xref href="#constructor" id="_ref_874"><a href="#constructor">constructor</a></emu-xref>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-undefined-value">
<h1><span class="secnum">4.3.10</span>undefined value</h1>
<p>primitive value used when a variable has not been assigned a value</p>
</emu-clause>
<emu-clause id="sec-terms-and-definitions-undefined-type">
<h1><span class="secnum">4.3.11</span>Undefined type</h1>
<p>type whose sole value is the <emu-val>undefined</emu-val> value</p>
</emu-clause>
<emu-clause id="sec-null-value">
<h1><span class="secnum">4.3.12</span>null value</h1>
<p>primitive value that represents the intentional absence of any object value</p>
</emu-clause>
<emu-clause id="sec-terms-and-definitions-null-type">
<h1><span class="secnum">4.3.13</span>Null type</h1>
<p>type whose sole value is the <emu-val>null</emu-val> value</p>
</emu-clause>
<emu-clause id="sec-terms-and-definitions-boolean-value">
<h1><span class="secnum">4.3.14</span>Boolean value</h1>
<p>member of the Boolean type</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>There are only two Boolean values, <emu-val>true</emu-val> and <emu-val>false</emu-val>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-terms-and-definitions-boolean-type">
<h1><span class="secnum">4.3.15</span>Boolean type</h1>
<p>type consisting of the primitive values <emu-val>true</emu-val> and <emu-val>false</emu-val></p>
</emu-clause>
<emu-clause id="sec-boolean-object">
<h1><span class="secnum">4.3.16</span>Boolean object</h1>
<p>member of the Object type that is an instance of the standard built-in <code>Boolean</code> <emu-xref href="#constructor" id="_ref_875"><a href="#constructor">constructor</a></emu-xref></p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>A Boolean object is created by using the <code>Boolean</code> <emu-xref href="#constructor" id="_ref_876"><a href="#constructor">constructor</a></emu-xref> in a <code>new</code>
expression, supplying a Boolean value as an argument. The resulting
object has an internal slot whose value is the Boolean value. A Boolean
object can be coerced to a Boolean value.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-terms-and-definitions-string-value">
<h1><span class="secnum">4.3.17</span>String value</h1>
<p>primitive value that is a finite ordered sequence of zero or more 16-bit unsigned integer values</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>A String value is a member of the String type. Each integer
value in the sequence usually represents a single 16-bit unit of UTF-16
text. However, ECMAScript does not place any restrictions or
requirements on the values except that they must be 16-bit unsigned
integers.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-terms-and-definitions-string-type">
<h1><span class="secnum">4.3.18</span>String type</h1>
<p>set of all possible String values</p>
</emu-clause>
<emu-clause id="sec-string-object">
<h1><span class="secnum">4.3.19</span>String object</h1>
<p>member of the Object type that is an instance of the standard built-in <code>String</code> <emu-xref href="#constructor" id="_ref_877"><a href="#constructor">constructor</a></emu-xref></p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>A String object is created by using the <code>String</code> <emu-xref href="#constructor" id="_ref_878"><a href="#constructor">constructor</a></emu-xref> in a <code>new</code>
expression, supplying a String value as an argument. The resulting
object has an internal slot whose value is the String value. A String
object can be coerced to a String value by calling the <code>String</code> <emu-xref href="#constructor" id="_ref_879"><a href="#constructor">constructor</a></emu-xref> as a function (<emu-xref href="#sec-string-constructor-string-value" id="_ref_5"><a href="#sec-string-constructor-string-value">21.1.1.1</a></emu-xref>).</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-terms-and-definitions-number-value">
<h1><span class="secnum">4.3.20</span>Number value</h1>
<p>primitive value corresponding to a double-precision 64-bit binary format IEEE 754-2008 value</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>A Number value is a member of the Number type and is a direct representation of a number.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-terms-and-definitions-number-type">
<h1><span class="secnum">4.3.21</span>Number type</h1>
<p>set of all possible Number values including the special “Not-a-Number” (NaN) value, positive infinity, and negative infinity</p>
</emu-clause>
<emu-clause id="sec-number-object">
<h1><span class="secnum">4.3.22</span>Number object</h1>
<p>member of the Object type that is an instance of the standard built-in <code>Number</code> <emu-xref href="#constructor" id="_ref_880"><a href="#constructor">constructor</a></emu-xref></p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>A Number object is created by using the <code>Number</code> <emu-xref href="#constructor" id="_ref_881"><a href="#constructor">constructor</a></emu-xref> in a <code>new</code>
expression, supplying a number value as an argument. The resulting
object has an internal slot whose value is the number value. A Number
object can be coerced to a number value by calling the <code>Number</code> <emu-xref href="#constructor" id="_ref_882"><a href="#constructor">constructor</a></emu-xref> as a function (<emu-xref href="#sec-number-constructor-number-value" id="_ref_6"><a href="#sec-number-constructor-number-value">20.1.1.1</a></emu-xref>).</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-terms-and-definitions-infinity">
<h1><span class="secnum">4.3.23</span>Infinity</h1>
<p>number value that is the positive infinite number value</p>
</emu-clause>
<emu-clause id="sec-terms-and-definitions-nan">
<h1><span class="secnum">4.3.24</span>NaN</h1>
<p>number value that is an IEEE 754-2008 “Not-a-Number” value</p>
</emu-clause>
<emu-clause id="sec-symbol-value">
<h1><span class="secnum">4.3.25</span>Symbol value</h1>
<p>primitive value that represents a unique, non-String Object property key</p>
</emu-clause>
<emu-clause id="sec-terms-and-definitions-symbol-type">
<h1><span class="secnum">4.3.26</span>Symbol type</h1>
<p>set of all possible Symbol values</p>
</emu-clause>
<emu-clause id="sec-symbol-object">
<h1><span class="secnum">4.3.27</span>Symbol object</h1>
<p>member of the Object type that is an instance of the standard built-in <code>Symbol</code> <emu-xref href="#constructor" id="_ref_883"><a href="#constructor">constructor</a></emu-xref></p>
</emu-clause>
<emu-clause id="sec-terms-and-definitions-function">
<h1><span class="secnum">4.3.28</span>function</h1>
<p>member of the Object type that may be invoked as a subroutine</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>In addition to its properties, a function contains executable
code and state that determine how it behaves when invoked. A function's
code may or may not be written in ECMAScript.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-built-in-function">
<h1><span class="secnum">4.3.29</span>built-in function</h1>
<p>built-in object that is a function</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Examples of built-in functions include <code>parseInt</code> and <code>Math.exp</code>. An implementation may provide implementation-dependent built-in functions that are not described in this specification.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-property">
<h1><span class="secnum">4.3.30</span>property</h1>
<p>part of an object that associates a key (either a String value or a Symbol value) and a value</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Depending upon the form of the property the value may be
represented either directly as a data value (a primitive value, an
object, or a <emu-xref href="#function-object" id="_ref_884"><a href="#function-object">function object</a></emu-xref>) or indirectly by a pair of accessor functions.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-method">
<h1><span class="secnum">4.3.31</span>method</h1>
<p>function that is the value of a property</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>When a function is called as a method of an object, the object is passed to the function as its <emu-val>this</emu-val> value.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-built-in-method">
<h1><span class="secnum">4.3.32</span>built-in method</h1>
<p>method that is a built-in function</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Standard built-in methods are defined in this specification,
and an ECMAScript implementation may specify and provide other
additional built-in methods.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-attribute">
<h1><span class="secnum">4.3.33</span>attribute</h1>
<p>internal value that defines some characteristic of a property</p>
</emu-clause>
<emu-clause id="sec-own-property">
<h1><span class="secnum">4.3.34</span>own property</h1>
<p>property that is directly contained by its object</p>
</emu-clause>
<emu-clause id="sec-inherited-property">
<h1><span class="secnum">4.3.35</span>inherited property</h1>
<p>property of an object that is not an own property but is a property (either own or inherited) of the object's prototype</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-organization-of-this-specification">
<h1><span class="secnum">4.4</span>Organization of This Specification</h1>
<p>The remainder of this specification is organized as follows:</p>
<p>Clause 5 defines the notational conventions used throughout the specification.</p>
<p>Clauses 6-9 define the execution environment within which ECMAScript programs operate.</p>
<p>Clauses 10-16 define the actual ECMAScript programming language
including its syntactic encoding and the execution semantics of all
language features.</p>
<p>Clauses 17-26 define the ECMAScript standard library. They
include the definitions of all of the standard objects that are
available for use by ECMAScript programs as they execute.</p>
<p>Clause 27 describes the memory consistency model of accesses on
SharedArrayBuffer-backed memory and methods of the Atomics object.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-notational-conventions">
<h1><span class="secnum">5</span>Notational Conventions</h1>
<emu-clause id="sec-syntactic-and-lexical-grammars">
<h1><span class="secnum">5.1</span>Syntactic and Lexical Grammars</h1>
<emu-clause id="sec-context-free-grammars">
<h1><span class="secnum">5.1.1</span>Context-Free Grammars</h1>
<p>A <em>context-free grammar</em> consists of a number of <em>productions</em>. Each production has an abstract symbol called a <em>nonterminal</em> as its <em>left-hand side</em>, and a sequence of zero or more nonterminal and <em>terminal</em> symbols as its <em>right-hand side</em>. For each grammar, the terminal symbols are drawn from a specified alphabet.</p>
<p>A <dfn>chain production</dfn> is a production that has exactly one nonterminal symbol on its right-hand side along with zero or more terminal symbols.</p>
<p>Starting from a sentence consisting of a single distinguished nonterminal, called the <dfn>goal symbol</dfn>, a given context-free grammar specifies a <em>language</em>,
namely, the (perhaps infinite) set of possible sequences of terminal
symbols that can result from repeatedly replacing any nonterminal in the
sequence with a right-hand side of a production for which the
nonterminal is the left-hand side.</p>
</emu-clause>
<emu-clause id="sec-lexical-and-regexp-grammars">
<h1><span class="secnum">5.1.2</span>The Lexical and RegExp Grammars</h1>
<p>A <em>lexical grammar</em> for ECMAScript is given in clause <emu-xref href="#sec-ecmascript-language-lexical-grammar" id="_ref_7"><a href="#sec-ecmascript-language-lexical-grammar">11</a></emu-xref>. This grammar has as its terminal symbols Unicode code points that conform to the rules for <emu-nt id="_ref_8795"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt> defined in <emu-xref href="#sec-source-text" id="_ref_8"><a href="#sec-source-text">10.1</a></emu-xref>. It defines a set of productions, starting from the <emu-xref href="#sec-context-free-grammars" id="_ref_885"><a href="#sec-context-free-grammars">goal symbol</a></emu-xref> <emu-nt id="_ref_8796"><a href="#prod-InputElementDiv">InputElementDiv</a></emu-nt>, <emu-nt id="_ref_8797"><a href="#prod-InputElementTemplateTail">InputElementTemplateTail</a></emu-nt>, or <emu-nt id="_ref_8798"><a href="#prod-InputElementRegExp">InputElementRegExp</a></emu-nt>, or <emu-nt id="_ref_8799"><a href="#prod-InputElementRegExpOrTemplateTail">InputElementRegExpOrTemplateTail</a></emu-nt>, that describe how sequences of such code points are translated into a sequence of input elements.</p>
<p>Input elements other than white space and comments form the
terminal symbols for the syntactic grammar for ECMAScript and are called
ECMAScript <em>tokens</em>. These tokens are the reserved words,
identifiers, literals, and punctuators of the ECMAScript language.
Moreover, line terminators, although not considered to be tokens, also
become part of the stream of input elements and guide the process of
automatic semicolon insertion (<emu-xref href="#sec-automatic-semicolon-insertion" id="_ref_9"><a href="#sec-automatic-semicolon-insertion">11.9</a></emu-xref>).
Simple white space and single-line comments are discarded and do not
appear in the stream of input elements for the syntactic grammar. A <emu-nt id="_ref_8800"><a href="#prod-MultiLineComment">MultiLineComment</a></emu-nt> (that is, a comment of the form <code>/*</code>…<code>*/</code> regardless of whether it spans more than one line) is likewise simply discarded if it contains no line terminator; but if a <emu-nt id="_ref_8801"><a href="#prod-MultiLineComment">MultiLineComment</a></emu-nt>
contains one or more line terminators, then it is replaced by a single
line terminator, which becomes part of the stream of input elements for
the syntactic grammar.</p>
<p>A <em>RegExp grammar</em> for ECMAScript is given in <emu-xref href="#sec-patterns" id="_ref_10"><a href="#sec-patterns">21.2.1</a></emu-xref>. This grammar also has as its terminal symbols the code points as defined by <emu-nt id="_ref_8802"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt>. It defines a set of productions, starting from the <emu-xref href="#sec-context-free-grammars" id="_ref_886"><a href="#sec-context-free-grammars">goal symbol</a></emu-xref> <emu-nt id="_ref_8803"><a href="#prod-Pattern">Pattern</a></emu-nt>, that describe how sequences of code points are translated into regular expression patterns.</p>
<p>Productions of the lexical and RegExp grammars are distinguished by having two colons “<b>::</b>” as separating punctuation. The lexical and RegExp grammars share some productions.</p>
</emu-clause>
<emu-clause id="sec-numeric-string-grammar">
<h1><span class="secnum">5.1.3</span>The Numeric String Grammar</h1>
<p>Another grammar is used for translating Strings into numeric
values. This grammar is similar to the part of the lexical grammar
having to do with numeric literals and has as its terminal symbols <emu-nt id="_ref_8804"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt>. This grammar appears in <emu-xref href="#sec-tonumber-applied-to-the-string-type" id="_ref_11"><a href="#sec-tonumber-applied-to-the-string-type">7.1.3.1</a></emu-xref>.</p>
<p>Productions of the numeric string grammar are distinguished by having three colons “<b>:::</b>” as punctuation.</p>
</emu-clause>
<emu-clause id="sec-syntactic-grammar">
<h1><span class="secnum">5.1.4</span>The Syntactic Grammar</h1>
<p>The <em>syntactic grammar</em> for ECMAScript is given in
clauses 11, 12, 13, 14, and 15. This grammar has ECMAScript tokens
defined by the lexical grammar as its terminal symbols (<emu-xref href="#sec-lexical-and-regexp-grammars" id="_ref_12"><a href="#sec-lexical-and-regexp-grammars">5.1.2</a></emu-xref>). It defines a set of productions, starting from two alternative goal symbols <emu-nt id="_ref_8805"><a href="#prod-Script">Script</a></emu-nt> and <emu-nt id="_ref_8806"><a href="#prod-Module">Module</a></emu-nt>, that describe how sequences of tokens form syntactically correct independent components of ECMAScript programs.</p>
<p>When a stream of code points is to be parsed as an ECMAScript <emu-nt id="_ref_8807"><a href="#prod-Script">Script</a></emu-nt> or <emu-nt id="_ref_8808"><a href="#prod-Module">Module</a></emu-nt>,
it is first converted to a stream of input elements by repeated
application of the lexical grammar; this stream of input elements is
then parsed by a single application of the syntactic grammar. The input
stream is syntactically in error if the tokens in the stream of input
elements cannot be parsed as a single instance of the goal nonterminal (<emu-nt id="_ref_8809"><a href="#prod-Script">Script</a></emu-nt> or <emu-nt id="_ref_8810"><a href="#prod-Module">Module</a></emu-nt>), with no tokens left over.</p>
<p>When a parse is successful, it constructs a <em>parse tree</em>, a rooted tree structure in which each node is a <dfn>Parse Node</dfn>. Each Parse Node is an <em>instance</em>
of a symbol in the grammar; it represents a span of the source text
that can be derived from that symbol. The root node of the parse tree,
representing the whole of the source text, is an instance of the parse's
<emu-xref href="#sec-context-free-grammars" id="_ref_887"><a href="#sec-context-free-grammars">goal symbol</a></emu-xref>.
When a Parse Node is an instance of a nonterminal, it is also an
instance of some production that has that nonterminal as its left-hand
side. Moreover, it has zero or more <em>children</em>, one for each
symbol on the production's right-hand side: each child is a Parse Node
that is an instance of the corresponding symbol.</p>
<p>New Parse Nodes are instantiated for each invocation of the
parser and never reused between parses even of identical source text.
Parse Nodes are considered <dfn>the same Parse Node</dfn> if and only
if they represent the same span of source text, are instances of the
same grammar symbol, and resulted from the same parser invocation.</p>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>Parsing the same String multiple times will lead to different Parse Nodes, e.g., as occurs in:</p>
<pre><code language="javascript">eval(str); eval(str);</code></pre>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">Parse Nodes are specification artefacts, and implementations are not required to use an analogous data structure.</div></emu-note>
<p>Productions of the syntactic grammar are distinguished by having just one colon “<b>:</b>” as punctuation.</p>
<p>The syntactic grammar as presented in clauses 12, 13, 14 and 15
is not a complete account of which token sequences are accepted as a
correct ECMAScript <emu-nt id="_ref_8811"><a href="#prod-Script">Script</a></emu-nt> or <emu-nt id="_ref_8812"><a href="#prod-Module">Module</a></emu-nt>.
Certain additional token sequences are also accepted, namely, those
that would be described by the grammar if only semicolons were added to
the sequence in certain places (such as before line terminator
characters). Furthermore, certain token sequences that are described by
the grammar are not considered acceptable if a line terminator character
appears in certain “awkward” places.</p>
<p>In certain cases, in order to avoid ambiguities, the syntactic
grammar uses generalized productions that permit token sequences that do
not form a valid ECMAScript <emu-nt id="_ref_8813"><a href="#prod-Script">Script</a></emu-nt> or <emu-nt id="_ref_8814"><a href="#prod-Module">Module</a></emu-nt>. For example, this technique is used for object literals and object destructuring patterns. In such cases a more restrictive <em>supplemental grammar</em> is provided that further restricts the acceptable token sequences. Typically, an <emu-xref href="#early-error" id="_ref_888"><a href="#early-error">early error</a></emu-xref> rule will then define an error condition if "<var>P</var> is not <dfn>covering</dfn> an <var>N</var>", where <var>P</var> is a Parse Node (an instance of the generalized production) and <var>N</var> is a nonterminal from the supplemental grammar. Here, the sequence of tokens originally matched by <var>P</var> is parsed again using <var>N</var> as the <emu-xref href="#sec-context-free-grammars" id="_ref_889"><a href="#sec-context-free-grammars">goal symbol</a></emu-xref>. (If <var>N</var> takes grammatical parameters, then they are set to the same values used when <var>P</var> was originally parsed.) An error occurs if the sequence of tokens cannot be parsed as a single instance of <var>N</var>, with no tokens left over. Subsequently, algorithms access the result of the parse using a phrase of the form "the <var>N</var> that is <dfn>covered</dfn> by <var>P</var>". This will always be a Parse Node (an instance of <var>N</var>, unique for a given <var>P</var>), since any parsing failure would have been detected by an <emu-xref href="#early-error" id="_ref_890"><a href="#early-error">early error</a></emu-xref> rule.</p>
</emu-clause>
<emu-clause id="sec-grammar-notation" namespace="grammar-notation">
<h1><span class="secnum">5.1.5</span>Grammar Notation</h1>
<p>Terminal symbols of the lexical, RegExp, and numeric string grammars are shown in <code>fixed width</code>
font, both in the productions of the grammars and throughout this
specification whenever the text directly refers to such a terminal
symbol. These are to appear in a script exactly as written. All terminal
symbol code points specified in this way are to be understood as the
appropriate Unicode code points from the Basic Latin range, as opposed
to any similar-looking code points from other Unicode ranges.</p>
<p>Nonterminal symbols are shown in <i>italic</i> type. The
definition of a nonterminal (also called a “production”) is introduced
by the name of the nonterminal being defined followed by one or more
colons. (The number of colons indicates to which grammar the production
belongs.) One or more alternative right-hand sides for the nonterminal
then follow on succeeding lines. For example, the syntactic definition:</p>
<emu-grammar type="example"><emu-production name="WhileStatement" id="prod-grammar-notation-WhileStatement">
<emu-nt><a href="#prod-grammar-notation-WhileStatement">WhileStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f7627bf3"><emu-t>while</emu-t><emu-t>(</emu-t><emu-nt id="_ref_8815"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_8816"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<p>states that the nonterminal <emu-nt id="_ref_8817"><a href="#prod-grammar-notation-WhileStatement">WhileStatement</a></emu-nt> represents the token <code>while</code>, followed by a left parenthesis token, followed by an <emu-nt id="_ref_8818"><a href="#prod-Expression">Expression</a></emu-nt>, followed by a right parenthesis token, followed by a <emu-nt id="_ref_8819"><a href="#prod-Statement">Statement</a></emu-nt>. The occurrences of <emu-nt id="_ref_8820"><a href="#prod-Expression">Expression</a></emu-nt> and <emu-nt id="_ref_8821"><a href="#prod-Statement">Statement</a></emu-nt> are themselves nonterminals. As another example, the syntactic definition:</p>
<emu-grammar type="example"><emu-production name="ArgumentList" id="prod-grammar-notation-ArgumentList">
<emu-nt><a href="#prod-grammar-notation-ArgumentList">ArgumentList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d4fc7da4"><emu-nt id="_ref_8822"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
<emu-rhs a="7ff23fee"><emu-nt id="_ref_8823"><a href="#prod-grammar-notation-ArgumentList">ArgumentList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_8824"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<p>states that an <emu-nt id="_ref_8825"><a href="#prod-grammar-notation-ArgumentList">ArgumentList</a></emu-nt> may represent either a single <emu-nt id="_ref_8826"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt> or an <emu-nt id="_ref_8827"><a href="#prod-grammar-notation-ArgumentList">ArgumentList</a></emu-nt>, followed by a comma, followed by an <emu-nt id="_ref_8828"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>. This definition of <emu-nt id="_ref_8829"><a href="#prod-grammar-notation-ArgumentList">ArgumentList</a></emu-nt> is recursive, that is, it is defined in terms of itself. The result is that an <emu-nt id="_ref_8830"><a href="#prod-grammar-notation-ArgumentList">ArgumentList</a></emu-nt> may contain any positive number of arguments, separated by commas, where each argument expression is an <emu-nt id="_ref_8831"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>. Such recursive definitions of nonterminals are common.</p>
<p>The subscripted suffix “<sub>opt</sub>”, which may appear after
a terminal or nonterminal, indicates an optional symbol. The
alternative containing the optional symbol actually specifies two
right-hand sides, one that omits the optional element and one that
includes it. This means that:</p>
<emu-grammar type="example"><emu-production name="VariableDeclaration" id="prod-grammar-notation-VariableDeclaration">
<emu-nt><a href="#prod-grammar-notation-VariableDeclaration">VariableDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0b9344a8"><emu-nt id="_ref_8832"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-nt optional="" id="_ref_8833"><a href="#prod-Initializer">Initializer</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<p>is a convenient abbreviation for:</p>
<emu-grammar type="example"><emu-production name="VariableDeclaration">
<emu-nt><a href="#prod-grammar-notation-VariableDeclaration">VariableDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="50e97238"><emu-nt id="_ref_8834"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt></emu-rhs>
<emu-rhs a="89becb83"><emu-nt id="_ref_8835"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-nt id="_ref_8836"><a href="#prod-Initializer">Initializer</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<p>and that:</p>
<emu-grammar type="example"><emu-production name="IterationStatement" id="prod-grammar-notation-IterationStatement">
<emu-nt><a href="#prod-grammar-notation-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="93c07e45"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_8837"><a href="#prod-LexicalDeclaration">LexicalDeclaration</a></emu-nt><emu-nt optional="" id="_ref_8838"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_8839"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_8840"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<p>is a convenient abbreviation for:</p>
<emu-grammar type="example"><emu-production name="IterationStatement">
<emu-nt><a href="#prod-grammar-notation-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="180d57b5"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_8841"><a href="#prod-LexicalDeclaration">LexicalDeclaration</a></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_8842"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_8843"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="0acd6093"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_8844"><a href="#prod-LexicalDeclaration">LexicalDeclaration</a></emu-nt><emu-nt id="_ref_8845"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_8846"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_8847"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<p>which in turn is an abbreviation for:</p>
<emu-grammar type="example"><emu-production name="IterationStatement">
<emu-nt><a href="#prod-grammar-notation-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="00273dd7"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_8848"><a href="#prod-LexicalDeclaration">LexicalDeclaration</a></emu-nt><emu-t>;</emu-t><emu-t>)</emu-t><emu-nt id="_ref_8849"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="d4b04297"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_8850"><a href="#prod-LexicalDeclaration">LexicalDeclaration</a></emu-nt><emu-t>;</emu-t><emu-nt id="_ref_8851"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_8852"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="e8d15924"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_8853"><a href="#prod-LexicalDeclaration">LexicalDeclaration</a></emu-nt><emu-nt id="_ref_8854"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>;</emu-t><emu-t>)</emu-t><emu-nt id="_ref_8855"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="7f2cbdb0"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_8856"><a href="#prod-LexicalDeclaration">LexicalDeclaration</a></emu-nt><emu-nt id="_ref_8857"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>;</emu-t><emu-nt id="_ref_8858"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_8859"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<p>so, in this example, the nonterminal <emu-nt id="_ref_8860"><a href="#prod-grammar-notation-IterationStatement">IterationStatement</a></emu-nt> actually has four alternative right-hand sides.</p>
<p>A production may be parameterized by a subscripted annotation of the form “<sub>[parameters]</sub>”, which may appear as a suffix to the nonterminal symbol defined by the production. “<sub>parameters</sub>”
may be either a single name or a comma separated list of names. A
parameterized production is shorthand for a set of productions defining
all combinations of the parameter names, preceded by an underscore,
appended to the parameterized nonterminal symbol. This means that:</p>
<emu-grammar type="example"><emu-production name="StatementList" params="Return" id="prod-grammar-notation-StatementList">
<emu-nt params="Return"><a href="#prod-grammar-notation-StatementList">StatementList</a><emu-mods><emu-params>[Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="aa6f7913"><emu-nt id="_ref_8861"><a href="#prod-ReturnStatement">ReturnStatement</a></emu-nt></emu-rhs>
<emu-rhs a="82c424b7"><emu-nt id="_ref_8862"><a href="#prod-ExpressionStatement">ExpressionStatement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<p>is a convenient abbreviation for:</p>
<emu-grammar type="example"><emu-production name="StatementList">
<emu-nt><a href="#prod-grammar-notation-StatementList">StatementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="aa6f7913"><emu-nt id="_ref_8863"><a href="#prod-ReturnStatement">ReturnStatement</a></emu-nt></emu-rhs>
<emu-rhs a="82c424b7"><emu-nt id="_ref_8864"><a href="#prod-ExpressionStatement">ExpressionStatement</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="StatementList_Return" id="prod-grammar-notation-StatementList_Return">
<emu-nt><a href="#prod-grammar-notation-StatementList_Return">StatementList_Return</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="aa6f7913"><emu-nt id="_ref_8865"><a href="#prod-ReturnStatement">ReturnStatement</a></emu-nt></emu-rhs>
<emu-rhs a="82c424b7"><emu-nt id="_ref_8866"><a href="#prod-ExpressionStatement">ExpressionStatement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<p>and that:</p>
<emu-grammar type="example"><emu-production name="StatementList" params="Return, In">
<emu-nt params="Return, In"><a href="#prod-grammar-notation-StatementList">StatementList</a><emu-mods><emu-params>[Return, In]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="aa6f7913"><emu-nt id="_ref_8867"><a href="#prod-ReturnStatement">ReturnStatement</a></emu-nt></emu-rhs>
<emu-rhs a="82c424b7"><emu-nt id="_ref_8868"><a href="#prod-ExpressionStatement">ExpressionStatement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<p>is an abbreviation for:</p>
<emu-grammar type="example"><emu-production name="StatementList">
<emu-nt><a href="#prod-grammar-notation-StatementList">StatementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="aa6f7913"><emu-nt id="_ref_8869"><a href="#prod-ReturnStatement">ReturnStatement</a></emu-nt></emu-rhs>
<emu-rhs a="82c424b7"><emu-nt id="_ref_8870"><a href="#prod-ExpressionStatement">ExpressionStatement</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="StatementList_Return">
<emu-nt><a href="#prod-grammar-notation-StatementList_Return">StatementList_Return</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="aa6f7913"><emu-nt id="_ref_8871"><a href="#prod-ReturnStatement">ReturnStatement</a></emu-nt></emu-rhs>
<emu-rhs a="82c424b7"><emu-nt id="_ref_8872"><a href="#prod-ExpressionStatement">ExpressionStatement</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="StatementList_In" id="prod-grammar-notation-StatementList_In">
<emu-nt><a href="#prod-grammar-notation-StatementList_In">StatementList_In</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="aa6f7913"><emu-nt id="_ref_8873"><a href="#prod-ReturnStatement">ReturnStatement</a></emu-nt></emu-rhs>
<emu-rhs a="82c424b7"><emu-nt id="_ref_8874"><a href="#prod-ExpressionStatement">ExpressionStatement</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="StatementList_Return_In" id="prod-grammar-notation-StatementList_Return_In">
<emu-nt><a href="#prod-grammar-notation-StatementList_Return_In">StatementList_Return_In</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="aa6f7913"><emu-nt id="_ref_8875"><a href="#prod-ReturnStatement">ReturnStatement</a></emu-nt></emu-rhs>
<emu-rhs a="82c424b7"><emu-nt id="_ref_8876"><a href="#prod-ExpressionStatement">ExpressionStatement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<p>Multiple parameters produce a combinatory number of
productions, not all of which are necessarily referenced in a complete
grammar.</p>
<p>References to nonterminals on the right-hand side of a production can also be parameterized. For example:</p>
<emu-grammar type="example"><emu-production name="StatementList">
<emu-nt><a href="#prod-grammar-notation-StatementList">StatementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="aa6f7913"><emu-nt id="_ref_8877"><a href="#prod-ReturnStatement">ReturnStatement</a></emu-nt></emu-rhs>
<emu-rhs a="abb21bdc"><emu-nt params="+In" id="_ref_8878"><a href="#prod-ExpressionStatement">ExpressionStatement</a><emu-mods><emu-params>[+In]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<p>is equivalent to saying:</p>
<emu-grammar type="example"><emu-production name="StatementList">
<emu-nt><a href="#prod-grammar-notation-StatementList">StatementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="aa6f7913"><emu-nt id="_ref_8879"><a href="#prod-ReturnStatement">ReturnStatement</a></emu-nt></emu-rhs>
<emu-rhs a="93a8206f"><emu-nt>ExpressionStatement_In</emu-nt></emu-rhs>
</emu-production></emu-grammar>
<p>and:</p>
<emu-grammar type="example"><emu-production name="StatementList">
<emu-nt><a href="#prod-grammar-notation-StatementList">StatementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="aa6f7913"><emu-nt id="_ref_8880"><a href="#prod-ReturnStatement">ReturnStatement</a></emu-nt></emu-rhs>
<emu-rhs a="70147e05"><emu-nt params="~In" id="_ref_8881"><a href="#prod-ExpressionStatement">ExpressionStatement</a><emu-mods><emu-params>[~In]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<p>is equivalent to:</p>
<emu-grammar type="example"><emu-production name="StatementList">
<emu-nt><a href="#prod-grammar-notation-StatementList">StatementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="aa6f7913"><emu-nt id="_ref_8882"><a href="#prod-ReturnStatement">ReturnStatement</a></emu-nt></emu-rhs>
<emu-rhs a="82c424b7"><emu-nt id="_ref_8883"><a href="#prod-ExpressionStatement">ExpressionStatement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<p>A nonterminal reference may have both a parameter list and an “<sub>opt</sub>” suffix. For example:</p>
<emu-grammar type="example"><emu-production name="VariableDeclaration">
<emu-nt><a href="#prod-grammar-notation-VariableDeclaration">VariableDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="363e22bb"><emu-nt id="_ref_8884"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-nt params="+In" optional="" id="_ref_8885"><a href="#prod-Initializer">Initializer</a><emu-mods><emu-params>[+In]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<p>is an abbreviation for:</p>
<emu-grammar type="example"><emu-production name="VariableDeclaration">
<emu-nt><a href="#prod-grammar-notation-VariableDeclaration">VariableDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="50e97238"><emu-nt id="_ref_8886"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt></emu-rhs>
<emu-rhs a="693077fa"><emu-nt id="_ref_8887"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-nt>Initializer_In</emu-nt></emu-rhs>
</emu-production></emu-grammar>
<p>Prefixing a parameter name with “<sub>?</sub>” on a right-hand
side nonterminal reference makes that parameter value dependent upon the
occurrence of the parameter name on the reference to the current
production's left-hand side symbol. For example:</p>
<emu-grammar type="example"><emu-production name="VariableDeclaration" params="In">
<emu-nt params="In"><a href="#prod-grammar-notation-VariableDeclaration">VariableDeclaration</a><emu-mods><emu-params>[In]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="dde5478d"><emu-nt id="_ref_8888"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-nt params="?In" id="_ref_8889"><a href="#prod-Initializer">Initializer</a><emu-mods><emu-params>[?In]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<p>is an abbreviation for:</p>
<emu-grammar type="example"><emu-production name="VariableDeclaration">
<emu-nt><a href="#prod-grammar-notation-VariableDeclaration">VariableDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="89becb83"><emu-nt id="_ref_8890"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-nt id="_ref_8891"><a href="#prod-Initializer">Initializer</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="VariableDeclaration_In" id="prod-grammar-notation-VariableDeclaration_In">
<emu-nt><a href="#prod-grammar-notation-VariableDeclaration_In">VariableDeclaration_In</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="693077fa"><emu-nt id="_ref_8892"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-nt>Initializer_In</emu-nt></emu-rhs>
</emu-production></emu-grammar>
<p>If a right-hand side alternative is prefixed with
“[+parameter]” that alternative is only available if the named parameter
was used in referencing the production's nonterminal symbol. If a
right-hand side alternative is prefixed with “[~parameter]” that
alternative is only available if the named parameter was <em>not</em> used in referencing the production's nonterminal symbol. This means that:</p>
<emu-grammar type="example"><emu-production name="StatementList" params="Return">
<emu-nt params="Return"><a href="#prod-grammar-notation-StatementList">StatementList</a><emu-mods><emu-params>[Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a712bea8" constraints="+Return"><emu-constraints>[+Return]</emu-constraints><emu-nt id="_ref_8893"><a href="#prod-ReturnStatement">ReturnStatement</a></emu-nt></emu-rhs>
<emu-rhs a="82c424b7"><emu-nt id="_ref_8894"><a href="#prod-ExpressionStatement">ExpressionStatement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<p>is an abbreviation for:</p>
<emu-grammar type="example"><emu-production name="StatementList">
<emu-nt><a href="#prod-grammar-notation-StatementList">StatementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="82c424b7"><emu-nt id="_ref_8895"><a href="#prod-ExpressionStatement">ExpressionStatement</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="StatementList_Return">
<emu-nt><a href="#prod-grammar-notation-StatementList_Return">StatementList_Return</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="aa6f7913"><emu-nt id="_ref_8896"><a href="#prod-ReturnStatement">ReturnStatement</a></emu-nt></emu-rhs>
<emu-rhs a="82c424b7"><emu-nt id="_ref_8897"><a href="#prod-ExpressionStatement">ExpressionStatement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<p>and that:</p>
<emu-grammar type="example"><emu-production name="StatementList" params="Return">
<emu-nt params="Return"><a href="#prod-grammar-notation-StatementList">StatementList</a><emu-mods><emu-params>[Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="9abebc34" constraints="~Return"><emu-constraints>[~Return]</emu-constraints><emu-nt id="_ref_8898"><a href="#prod-ReturnStatement">ReturnStatement</a></emu-nt></emu-rhs>
<emu-rhs a="82c424b7"><emu-nt id="_ref_8899"><a href="#prod-ExpressionStatement">ExpressionStatement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<p>is an abbreviation for:</p>
<emu-grammar type="example"><emu-production name="StatementList">
<emu-nt><a href="#prod-grammar-notation-StatementList">StatementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="aa6f7913"><emu-nt id="_ref_8900"><a href="#prod-ReturnStatement">ReturnStatement</a></emu-nt></emu-rhs>
<emu-rhs a="82c424b7"><emu-nt id="_ref_8901"><a href="#prod-ExpressionStatement">ExpressionStatement</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="StatementList_Return">
<emu-nt><a href="#prod-grammar-notation-StatementList_Return">StatementList_Return</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="82c424b7"><emu-nt id="_ref_8902"><a href="#prod-ExpressionStatement">ExpressionStatement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<p>When the words “<b>one of</b>” follow the colon(s) in a grammar
definition, they signify that each of the terminal symbols on the
following line or lines is an alternative definition. For example, the
lexical grammar for ECMAScript contains the production:</p>
<emu-grammar type="example"><emu-production name="NonZeroDigit" type="lexical" oneof="" id="prod-grammar-notation-NonZeroDigit">
<emu-nt><a href="#prod-grammar-notation-NonZeroDigit">NonZeroDigit</a></emu-nt><emu-geq>::</emu-geq><emu-oneof>one of</emu-oneof><emu-rhs><emu-t>1</emu-t><emu-t>2</emu-t><emu-t>3</emu-t><emu-t>4</emu-t><emu-t>5</emu-t><emu-t>6</emu-t><emu-t>7</emu-t><emu-t>8</emu-t><emu-t>9</emu-t></emu-rhs>
</emu-production></emu-grammar>
<p>which is merely a convenient abbreviation for:</p>
<emu-grammar type="example"><emu-production name="NonZeroDigit" type="lexical">
<emu-nt><a href="#prod-grammar-notation-NonZeroDigit">NonZeroDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="292aa5dd"><emu-t>1</emu-t></emu-rhs>
<emu-rhs a="5ca73105"><emu-t>2</emu-t></emu-rhs>
<emu-rhs a="ec6bb6b2"><emu-t>3</emu-t></emu-rhs>
<emu-rhs a="58ec4a73"><emu-t>4</emu-t></emu-rhs>
<emu-rhs a="8fcdef77"><emu-t>5</emu-t></emu-rhs>
<emu-rhs a="0b64877d"><emu-t>6</emu-t></emu-rhs>
<emu-rhs a="ea5e07a4"><emu-t>7</emu-t></emu-rhs>
<emu-rhs a="7a5bd8c3"><emu-t>8</emu-t></emu-rhs>
<emu-rhs a="163f4308"><emu-t>9</emu-t></emu-rhs>
</emu-production></emu-grammar>
<p>If the phrase “[empty]” appears as the right-hand side of a
production, it indicates that the production's right-hand side contains
no terminals or nonterminals.</p>
<p>If the phrase “[lookahead ∉ <var>set</var>]” appears in the
right-hand side of a production, it indicates that the production may
not be used if the immediately following input token sequence is a
member of the given <var>set</var>. The <var>set</var> can be written as
a comma separated list of one or two element terminal sequences
enclosed in curly brackets. For convenience, the set can also be written
as a nonterminal, in which case it represents the set of all terminals
to which that nonterminal could expand. If the <var>set</var> consists of a single terminal the phrase “[lookahead ≠ <var>terminal</var>]” may be used.</p>
<p>For example, given the definitions:</p>
<emu-grammar type="example"><emu-production name="DecimalDigit" type="lexical" oneof="" id="prod-grammar-notation-DecimalDigit">
<emu-nt><a href="#prod-grammar-notation-DecimalDigit">DecimalDigit</a></emu-nt><emu-geq>::</emu-geq><emu-oneof>one of</emu-oneof><emu-rhs><emu-t>0</emu-t><emu-t>1</emu-t><emu-t>2</emu-t><emu-t>3</emu-t><emu-t>4</emu-t><emu-t>5</emu-t><emu-t>6</emu-t><emu-t>7</emu-t><emu-t>8</emu-t><emu-t>9</emu-t></emu-rhs>
</emu-production>
<emu-production name="DecimalDigits" type="lexical" id="prod-grammar-notation-DecimalDigits">
<emu-nt><a href="#prod-grammar-notation-DecimalDigits">DecimalDigits</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="b3831ee0"><emu-nt id="_ref_8903"><a href="#prod-grammar-notation-DecimalDigit">DecimalDigit</a></emu-nt></emu-rhs>
<emu-rhs a="9f250657"><emu-nt id="_ref_8904"><a href="#prod-grammar-notation-DecimalDigits">DecimalDigits</a></emu-nt><emu-nt id="_ref_8905"><a href="#prod-grammar-notation-DecimalDigit">DecimalDigit</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<p>the definition:</p>
<emu-grammar type="example"><emu-production name="LookaheadExample" type="lexical" id="prod-grammar-notation-LookaheadExample">
<emu-nt><a href="#prod-grammar-notation-LookaheadExample">LookaheadExample</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="e21e12ce"><emu-t>n</emu-t><emu-gann>[lookahead ∉ { <emu-t>1</emu-t>, <emu-t>3</emu-t>, <emu-t>5</emu-t>, <emu-t>7</emu-t>, <emu-t>9</emu-t> }]</emu-gann><emu-nt id="_ref_8906"><a href="#prod-grammar-notation-DecimalDigits">DecimalDigits</a></emu-nt></emu-rhs>
<emu-rhs a="195cbc6c"><emu-nt id="_ref_8907"><a href="#prod-grammar-notation-DecimalDigit">DecimalDigit</a></emu-nt><emu-gann>[lookahead ∉ <emu-nt id="_ref_8908"><a href="#prod-grammar-notation-DecimalDigit">DecimalDigit</a></emu-nt>]</emu-gann></emu-rhs>
</emu-production></emu-grammar>
<p>matches either the letter <code>n</code> followed by one or more decimal digits the first of which is even, or a decimal digit not followed by another decimal digit.</p>
<p>Similarly, if the phrase “[lookahead ∈ <var>set</var>]” appears
in the right-hand side of a production, it indicates that the
production may only be used if the immediately following input token
sequence is a member of the given <var>set</var>. If the <var>set</var> consists of a single terminal the phrase “[lookahead = <var>terminal</var>]” may be used.</p>
<p>If the phrase “[no <emu-nt id="_ref_8909"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]” appears in the right-hand side of a production of the syntactic grammar, it indicates that the production is <em>a restricted production</em>: it may not be used if a <emu-nt id="_ref_8910"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> occurs in the input stream at the indicated position. For example, the production:</p>
<emu-grammar type="example"><emu-production name="ThrowStatement" id="prod-grammar-notation-ThrowStatement">
<emu-nt><a href="#prod-grammar-notation-ThrowStatement">ThrowStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ff4ec866"><emu-t>throw</emu-t><emu-gann>[no <emu-nt id="_ref_8911"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-nt id="_ref_8912"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<p>indicates that the production may not be used if a <emu-nt id="_ref_8913"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> occurs in the script between the <code>throw</code> token and the <emu-nt id="_ref_8914"><a href="#prod-Expression">Expression</a></emu-nt>.</p>
<p>Unless the presence of a <emu-nt id="_ref_8915"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> is forbidden by a restricted production, any number of occurrences of <emu-nt id="_ref_8916"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt>
may appear between any two consecutive tokens in the stream of input
elements without affecting the syntactic acceptability of the script.</p>
<p>When an alternative in a production of the lexical grammar or
the numeric string grammar appears to be a multi-code point token, it
represents the sequence of code points that would make up such a token.</p>
<p>The right-hand side of a production may specify that certain expansions are not permitted by using the phrase “<b>but not</b>” and then indicating the expansions to be excluded. For example, the production:</p>
<emu-grammar type="example"><emu-production name="Identifier" type="lexical" id="prod-grammar-notation-Identifier">
<emu-nt><a href="#prod-grammar-notation-Identifier">Identifier</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="bfa5c374"><emu-nt id="_ref_8917"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt><emu-gmod>but not <emu-nt id="_ref_8918"><a href="#prod-ReservedWord">ReservedWord</a></emu-nt></emu-gmod></emu-rhs>
</emu-production></emu-grammar>
<p>means that the nonterminal <emu-nt id="_ref_8919"><a href="#prod-grammar-notation-Identifier">Identifier</a></emu-nt> may be replaced by any sequence of code points that could replace <emu-nt id="_ref_8920"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt> provided that the same sequence of code points could not replace <emu-nt id="_ref_8921"><a href="#prod-ReservedWord">ReservedWord</a></emu-nt>.</p>
<p>Finally, a few nonterminal symbols are described by a
descriptive phrase in sans-serif type in cases where it would be
impractical to list all the alternatives:</p>
<emu-grammar type="example"><emu-production name="SourceCharacter" type="lexical" id="prod-grammar-notation-SourceCharacter">
<emu-nt><a href="#prod-grammar-notation-SourceCharacter">SourceCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="c64b38bd"><emu-gprose>any Unicode code point</emu-gprose></emu-rhs>
</emu-production></emu-grammar>
</emu-clause>
</emu-clause>
<emu-clause id="sec-algorithm-conventions">
<h1><span class="secnum">5.2</span>Algorithm Conventions</h1>
<p>The specification often uses a numbered list to specify steps in
an algorithm. These algorithms are used to precisely specify the
required semantics of ECMAScript language constructs. The algorithms are
not intended to imply the use of any specific implementation technique.
In practice, there may be more efficient algorithms available to
implement a given feature.</p>
<p>Algorithms may be explicitly parameterized, in which case the
names and usage of the parameters must be provided as part of the
algorithm's definition.</p>
<p>Algorithm steps may be subdivided into sequential substeps.
Substeps are indented and may themselves be further divided into
indented substeps. Outline numbering conventions are used to identify
substeps with the first level of substeps labelled with lower case
alphabetic characters and the second level of substeps labelled with
lower case roman numerals. If more than three levels are required these
rules repeat with the fourth level using numeric labels. For example:</p>
<emu-alg><ol><li>Top-level step<ol><li>Substep.</li><li>Substep.<ol><li>Subsubstep.<ol><li>Subsubsubstep<ol><li>Subsubsubsubstep<ol><li>Subsubsubsubsubstep
</li></ol></li></ol></li></ol></li></ol></li></ol></li></ol></emu-alg>
<p>A step or substep may be written as an “if” predicate that
conditions its substeps. In this case, the substeps are only applied if
the predicate is true. If a step or substep begins with the word “else”,
it is a predicate that is the negation of the preceding “if” predicate
step at the same level.</p>
<p>A step may specify the iterative application of its substeps.</p>
<p>A step that begins with “<dfn id="assert">Assert</dfn>:” asserts
an invariant condition of its algorithm. Such assertions are used to
make explicit algorithmic invariants that would otherwise be implicit.
Such assertions add no additional semantic requirements and hence need
not be checked by an implementation. They are used simply to clarify
algorithms.</p>
<p>Algorithm steps may declare named aliases for any value using the form “Let <var>x</var> be <var>someValue</var>”. These aliases are reference-like in that both <var>x</var> and <var>someValue</var>
refer to the same underlying data and modifications to either are
visible to both. Algorithm steps that want to avoid this reference-like
behaviour should explicitly make a copy of the right-hand side: “Let <var>x</var> be a copy of <var>someValue</var>” creates a shallow copy of <var>someValue</var>.</p>
<p>Once declared, an alias may be referenced in any subsequent steps
and must not be referenced from steps prior to the alias's declaration.
Aliases may be modified using the form “Set <var>x</var> to <var>someOtherValue</var>”.</p>
<emu-clause id="sec-algorithm-conventions-abstract-operations">
<h1><span class="secnum">5.2.1</span>Abstract Operations</h1>
<p>In order to facilitate their use in multiple parts of this specification, some algorithms, called <dfn>abstract operations</dfn>,
are named and written in parameterized functional form so that they may
be referenced by name from within other algorithms. Abstract operations
are typically referenced using a functional application style such as
OperationName(<var>arg1</var>, <var>arg2</var>). Some abstract
operations are treated as polymorphically dispatched methods of
class-like specification abstractions. Such method-like abstract
operations are typically referenced using a method application style
such as <var>someValue</var>.OperationName(<var>arg1</var>, <var>arg2</var>).</p>
</emu-clause>
<emu-clause id="sec-algorithm-conventions-syntax-directed-operations" namespace="algorithm-conventions">
<h1><span class="secnum">5.2.2</span>Syntax-Directed Operations</h1>
<p>A <dfn>syntax-directed operation</dfn> is a named operation
whose definition consists of algorithms, each of which is associated
with one or more productions from one of the ECMAScript grammars. A
production that has multiple alternative definitions will typically have
a distinct algorithm for each alternative. When an algorithm is
associated with a grammar production, it may reference the terminal and
nonterminal symbols of the production alternative as if they were
parameters of the algorithm. When used in this manner, nonterminal
symbols refer to the actual alternative definition that is matched when
parsing the source text. The <dfn>source text matched by</dfn> a
grammar production is the portion of the source text that starts at the
beginning of the first terminal that participated in the match and ends
at the end of the last terminal that participated in the match.</p>
<p>When an algorithm is associated with a production alternative,
the alternative is typically shown without any “[ ]” grammar
annotations. Such annotations should only affect the syntactic
recognition of the alternative and have no effect on the associated
semantics for the alternative.</p>
<p>Syntax-directed operations are invoked with a parse node and,
optionally, other parameters by using the conventions on steps 1, 3, and
4 in the following algorithm:</p>
<emu-alg><ol><li>Let <var>status</var> be the result of performing SyntaxDirectedOperation of <emu-nt>SomeNonTerminal</emu-nt>.</li><li>Let <var>someParseNode</var> be the parse of some source text.</li><li>Perform SyntaxDirectedOperation of <var>someParseNode</var>.</li><li>Perform SyntaxDirectedOperation of <var>someParseNode</var> passing <code>"value"</code> as the argument.
</li></ol></emu-alg>
<p>Unless explicitly specified otherwise, all chain productions
have an implicit definition for every operation that might be applied to
that production's left-hand side nonterminal. The implicit definition
simply reapplies the same operation with the same parameters, if any, to
the <emu-xref href="#sec-context-free-grammars" id="_ref_8632"><a href="#sec-context-free-grammars">chain production</a></emu-xref>'s
sole right-hand side nonterminal and then returns the result. For
example, assume that some algorithm has a step of the form: “Return the
result of evaluating <emu-nt id="_ref_8922"><a href="#prod-algorithm-conventions-Block">Block</a></emu-nt>” and that there is a production:</p>
<emu-grammar type="example"><emu-production name="Block" id="prod-algorithm-conventions-Block">
<emu-nt><a href="#prod-algorithm-conventions-Block">Block</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6782c9a7"><emu-t>{</emu-t><emu-nt id="_ref_8923"><a href="#prod-StatementList">StatementList</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<p>but the Evaluation operation does not associate an algorithm
with that production. In that case, the Evaluation operation implicitly
includes an association of the form:</p>
<p><b>Runtime Semantics: Evaluation</b></p>
<emu-grammar type="example"><emu-production name="Block" collapsed="">
<emu-nt><a href="#prod-algorithm-conventions-Block">Block</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6782c9a7"><emu-t>{</emu-t><emu-nt id="_ref_8924"><a href="#prod-StatementList">StatementList</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the result of evaluating <emu-nt id="_ref_8925"><a href="#prod-StatementList">StatementList</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-runtime-semantics">
<h1><span class="secnum">5.2.3</span>Runtime Semantics</h1>
<p>Algorithms which specify semantics that must be called at runtime are called <dfn>runtime semantics</dfn>. Runtime semantics are defined by <emu-xref href="#sec-algorithm-conventions-abstract-operations" id="_ref_891"><a href="#sec-algorithm-conventions-abstract-operations">abstract operations</a></emu-xref> or syntax-directed operations. Such algorithms always return a completion record.</p>
<emu-clause id="sec-implicit-completion-values">
<h1><span class="secnum">5.2.3.1</span>Implicit Completion Values</h1>
<p>The algorithms of this specification often implicitly return <emu-xref aoid="Completion" id="_ref_892"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref> Records whose [[Type]] is <emu-const>normal</emu-const>. Unless it is otherwise obvious from the context, an algorithm statement that returns a value that is not a <emu-xref href="#sec-completion-record-specification-type" id="_ref_893"><a href="#sec-completion-record-specification-type">Completion Record</a></emu-xref>, such as:</p>
<emu-alg><ol><li>Return <code>"Infinity"</code>.
</li></ol></emu-alg>
<p>means the same thing as:</p>
<emu-alg><ol><li>Return <emu-xref aoid="NormalCompletion" id="_ref_894"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<code>"Infinity"</code>).
</li></ol></emu-alg>
<p>However, if the value expression of a “return” statement is a <emu-xref href="#sec-completion-record-specification-type" id="_ref_895"><a href="#sec-completion-record-specification-type">Completion Record</a></emu-xref> construction literal, the resulting <emu-xref href="#sec-completion-record-specification-type" id="_ref_896"><a href="#sec-completion-record-specification-type">Completion Record</a></emu-xref> is returned. If the value expression is a call to an abstract operation, the “return” statement simply returns the <emu-xref href="#sec-completion-record-specification-type" id="_ref_897"><a href="#sec-completion-record-specification-type">Completion Record</a></emu-xref> produced by the abstract operation.</p>
<p>The abstract operation <emu-xref aoid="Completion" id="_ref_898"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>completionRecord</var>) is used to emphasize that a previously computed <emu-xref href="#sec-completion-record-specification-type" id="_ref_899"><a href="#sec-completion-record-specification-type">Completion Record</a></emu-xref> is being returned. The <emu-xref aoid="Completion" id="_ref_900"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref> abstract operation takes a single argument, <var>completionRecord</var>, and performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_901"><a href="#assert">Assert</a></emu-xref>: <var>completionRecord</var> is a <emu-xref href="#sec-completion-record-specification-type" id="_ref_902"><a href="#sec-completion-record-specification-type">Completion Record</a></emu-xref>.</li><li>Return <var>completionRecord</var> as the <emu-xref href="#sec-completion-record-specification-type" id="_ref_903"><a href="#sec-completion-record-specification-type">Completion Record</a></emu-xref> of this abstract operation.
</li></ol></emu-alg>
<p>A “return” statement without a value in an algorithm step means the same thing as:</p>
<emu-alg><ol><li>Return <emu-xref aoid="NormalCompletion" id="_ref_904"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-val>undefined</emu-val>).
</li></ol></emu-alg>
<p>Any reference to a <emu-xref href="#sec-completion-record-specification-type" id="_ref_905"><a href="#sec-completion-record-specification-type">Completion Record</a></emu-xref> value that is in a context that does not explicitly require a complete <emu-xref href="#sec-completion-record-specification-type" id="_ref_906"><a href="#sec-completion-record-specification-type">Completion Record</a></emu-xref> value is equivalent to an explicit reference to the [[Value]] field of the <emu-xref href="#sec-completion-record-specification-type" id="_ref_907"><a href="#sec-completion-record-specification-type">Completion Record</a></emu-xref> value unless the <emu-xref href="#sec-completion-record-specification-type" id="_ref_908"><a href="#sec-completion-record-specification-type">Completion Record</a></emu-xref> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_909"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-throw-an-exception">
<h1><span class="secnum">5.2.3.2</span>Throw an Exception</h1>
<p>Algorithms steps that say to throw an exception, such as</p>
<emu-alg><ol><li>Throw a <emu-val>TypeError</emu-val> exception.
</li></ol></emu-alg>
<p>mean the same things as:</p>
<emu-alg><ol><li>Return <emu-xref aoid="ThrowCompletion" id="_ref_910"><a href="#sec-throwcompletion">ThrowCompletion</a></emu-xref>(a newly created <emu-val>TypeError</emu-val> object).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-returnifabrupt" aoid="ReturnIfAbrupt">
<h1><span class="secnum">5.2.3.3</span>ReturnIfAbrupt</h1>
<p>Algorithms steps that say or are otherwise equivalent to:</p>
<emu-alg><ol><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_911"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>argument</var>).
</li></ol></emu-alg>
<p>mean the same thing as:</p>
<emu-alg><ol><li>If <var>argument</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_912"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, return <var>argument</var>.</li><li>Else if <var>argument</var> is a <emu-xref href="#sec-completion-record-specification-type" id="_ref_913"><a href="#sec-completion-record-specification-type">Completion Record</a></emu-xref>, set <var>argument</var> to <var>argument</var>.[[Value]].
</li></ol></emu-alg>
<p>Algorithms steps that say or are otherwise equivalent to:</p>
<emu-alg><ol><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_914"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(AbstractOperation()).
</li></ol></emu-alg>
<p>mean the same thing as:</p>
<emu-alg><ol><li>Let <var>hygienicTemp</var> be AbstractOperation().</li><li>If <var>hygienicTemp</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_915"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, return <var>hygienicTemp</var>.</li><li>Else if <var>hygienicTemp</var> is a <emu-xref href="#sec-completion-record-specification-type" id="_ref_916"><a href="#sec-completion-record-specification-type">Completion Record</a></emu-xref>, set <var>hygienicTemp</var> to <var>hygienicTemp</var>.[[Value]].
</li></ol></emu-alg>
<p>Where <var>hygienicTemp</var> is ephemeral and visible only in the steps pertaining to ReturnIfAbrupt.</p>
<p>Algorithms steps that say or are otherwise equivalent to:</p>
<emu-alg><ol><li>Let <var>result</var> be AbstractOperation(<emu-xref aoid="ReturnIfAbrupt" id="_ref_917"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>argument</var>)).
</li></ol></emu-alg>
<p>mean the same thing as:</p>
<emu-alg><ol><li>If <var>argument</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_918"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, return <var>argument</var>.</li><li>If <var>argument</var> is a <emu-xref href="#sec-completion-record-specification-type" id="_ref_919"><a href="#sec-completion-record-specification-type">Completion Record</a></emu-xref>, set <var>argument</var> to <var>argument</var>.[[Value]].</li><li>Let <var>result</var> be AbstractOperation(<var>argument</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-returnifabrupt-shorthands">
<h1><span class="secnum">5.2.3.4</span>ReturnIfAbrupt Shorthands</h1>
<p>Invocations of <emu-xref href="#sec-algorithm-conventions-abstract-operations" id="_ref_920"><a href="#sec-algorithm-conventions-abstract-operations">abstract operations</a></emu-xref> and syntax-directed operations that are prefixed by <code>?</code> indicate that <emu-xref aoid="ReturnIfAbrupt" id="_ref_921"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref> should be applied to the resulting <emu-xref href="#sec-completion-record-specification-type" id="_ref_922"><a href="#sec-completion-record-specification-type">Completion Record</a></emu-xref>. For example, the step:</p>
<emu-alg><ol><li>?&nbsp;OperationName().
</li></ol></emu-alg>
<p>is equivalent to the following step:</p>
<emu-alg><ol><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_923"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(OperationName()).
</li></ol></emu-alg>
<p>Similarly, for method application style, the step:</p>
<emu-alg><ol><li>? <var>someValue</var>.OperationName().
</li></ol></emu-alg>
<p>is equivalent to:</p>
<emu-alg><ol><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_924"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>someValue</var>.OperationName()).
</li></ol></emu-alg>
<p>Similarly, prefix <code>!</code> is used to indicate that the following invocation of an abstract or syntax-directed operation will never return an <emu-xref href="#sec-completion-record-specification-type" id="_ref_925"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref> and that the resulting <emu-xref href="#sec-completion-record-specification-type" id="_ref_926"><a href="#sec-completion-record-specification-type">Completion Record</a></emu-xref>'s [[Value]] field should be used in place of the return value of the operation. For example, the step:</p>
<emu-alg><ol><li>Let <var>val</var> be !&nbsp;OperationName().
</li></ol></emu-alg>
<p>is equivalent to the following steps:</p>
<emu-alg><ol><li>Let <var>val</var> be OperationName().</li><li><emu-xref href="#assert" id="_ref_927"><a href="#assert">Assert</a></emu-xref>: <var>val</var> is never an <emu-xref href="#sec-completion-record-specification-type" id="_ref_928"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>.</li><li>If <var>val</var> is a <emu-xref href="#sec-completion-record-specification-type" id="_ref_929"><a href="#sec-completion-record-specification-type">Completion Record</a></emu-xref>, set <var>val</var> to <var>val</var>.[[Value]].
</li></ol></emu-alg>
<p>Syntax-directed operations for <emu-xref href="#sec-runtime-semantics" id="_ref_930"><a href="#sec-runtime-semantics">runtime semantics</a></emu-xref> make use of this shorthand by placing <code>!</code> or <code>?</code> before the invocation of the operation:</p>
<emu-alg><ol><li>Perform ! SyntaxDirectedOperation of <emu-nt>NonTerminal</emu-nt>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-static-semantic-rules">
<h1><span class="secnum">5.2.4</span>Static Semantics</h1>
<p>Context-free grammars are not sufficiently powerful to express
all the rules that define whether a stream of input elements form a
valid ECMAScript <emu-nt id="_ref_8926"><a href="#prod-Script">Script</a></emu-nt> or <emu-nt id="_ref_8927"><a href="#prod-Module">Module</a></emu-nt>
that may be evaluated. In some situations additional rules are needed
that may be expressed using either ECMAScript algorithm conventions or
prose requirements. Such rules are always associated with a production
of a grammar and are called the <dfn>static semantics</dfn> of the production.</p>
<p>Static Semantic Rules have names and typically are defined
using an algorithm. Named Static Semantic Rules are associated with
grammar productions and a production that has multiple alternative
definitions will typically have for each alternative a distinct
algorithm for each applicable named static semantic rule.</p>
<p>Unless otherwise specified every grammar production alternative
in this specification implicitly has a definition for a static semantic
rule named Contains which takes an argument named <var>symbol</var>
whose value is a terminal or nonterminal of the grammar that includes
the associated production. The default definition of Contains is:</p>
<emu-alg><ol><li>For each child node <var>child</var> of this <emu-xref href="#sec-syntactic-grammar" id="_ref_931"><a href="#sec-syntactic-grammar">Parse Node</a></emu-xref>, do<ol><li>If <var>child</var> is an instance of <var>symbol</var>, return <emu-val>true</emu-val>.</li><li>If <var>child</var> is an instance of a nonterminal, then<ol><li>Let <var>contained</var> be the result of <var>child</var> Contains <var>symbol</var>.</li><li>If <var>contained</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li></ol></li></ol></li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
<p>The above definition is explicitly over-ridden for specific productions.</p>
<p>A special kind of static semantic rule is an <dfn id="early-error-rule">Early Error Rule</dfn>. <emu-xref href="#early-error" id="_ref_932"><a href="#early-error">Early error</a></emu-xref> rules define <emu-xref href="#early-error" id="_ref_933"><a href="#early-error">early error</a></emu-xref> conditions (see clause <emu-xref href="#sec-error-handling-and-language-extensions" id="_ref_13"><a href="#sec-error-handling-and-language-extensions">16</a></emu-xref>) that are associated with specific grammar productions. Evaluation of most <emu-xref href="#early-error" id="_ref_934"><a href="#early-error">early error</a></emu-xref>
rules are not explicitly invoked within the algorithms of this
specification. A conforming implementation must, prior to the first
evaluation of a <emu-nt id="_ref_8928"><a href="#prod-Script">Script</a></emu-nt> or <emu-nt id="_ref_8929"><a href="#prod-Module">Module</a></emu-nt>, validate all of the <emu-xref href="#early-error" id="_ref_935"><a href="#early-error">early error</a></emu-xref> rules of the productions used to parse that <emu-nt id="_ref_8930"><a href="#prod-Script">Script</a></emu-nt> or <emu-nt id="_ref_8931"><a href="#prod-Module">Module</a></emu-nt>. If any of the <emu-xref href="#early-error" id="_ref_936"><a href="#early-error">early error</a></emu-xref> rules are violated the <emu-nt id="_ref_8932"><a href="#prod-Script">Script</a></emu-nt> or <emu-nt id="_ref_8933"><a href="#prod-Module">Module</a></emu-nt> is invalid and cannot be evaluated.</p>
</emu-clause>
<emu-clause id="sec-mathematical-operations">
<h1><span class="secnum">5.2.5</span>Mathematical Operations</h1>
<p>Mathematical operations such as addition, subtraction,
negation, multiplication, division, and the mathematical functions
defined later in this clause should always be understood as computing
exact mathematical results on mathematical real numbers, which unless
otherwise noted do not include infinities and do not include a negative
zero that is distinguished from positive zero. Algorithms in this
standard that model floating-point arithmetic include explicit steps,
where necessary, to handle infinities and signed zero and to perform
rounding. If a mathematical operation or function is applied to a
floating-point number, it should be understood as being applied to the
exact mathematical value represented by that floating-point number; such
a floating-point number must be finite, and if it is <emu-val>+0</emu-val> or <emu-val>-0</emu-val> then the corresponding mathematical value is simply 0.</p>
<p>The mathematical function <emu-eqn id="eqn-abs" aoid="abs" class="inline">abs(<var>x</var>)</emu-eqn> produces the absolute value of <var>x</var>, which is <emu-eqn class="inline">-<var>x</var></emu-eqn> if <var>x</var> is negative (less than zero) and otherwise is <var>x</var> itself.</p>
<p>The mathematical function <emu-eqn id="eqn-min" aoid="min" class="inline">min(<var>x1</var>, <var>x2</var>, ..., <var>xN</var>)</emu-eqn> produces the mathematically smallest of <emu-eqn class="inline"><var>x1</var></emu-eqn> through <emu-eqn class="inline"><var>xN</var></emu-eqn>. The mathematical function <emu-eqn id="eqn-max" aoid="max" class="inline">max(<var>x1</var>, <var>x2</var>, ..., <var>xN</var>)</emu-eqn> produces the mathematically largest of <emu-eqn class="inline"><var>x1</var></emu-eqn> through <emu-eqn class="inline"><var>xN</var></emu-eqn>. The domain and range of these mathematical functions include <emu-val>+∞</emu-val> and <emu-val>-∞</emu-val>.</p>
<p>The notation “<emu-eqn id="eqn-modulo" aoid="modulo" class="inline"><var>x</var> modulo <var>y</var></emu-eqn>” (<var>y</var> must be finite and nonzero) computes a value <var>k</var> of the same sign as <var>y</var> (or zero) such that <emu-eqn class="inline"><emu-xref aoid="abs" id="_ref_937"><a href="#eqn-abs">abs</a></emu-xref>(<var>k</var>) &lt; <emu-xref aoid="abs" id="_ref_938"><a href="#eqn-abs">abs</a></emu-xref>(<var>y</var>) and <var>x</var> - <var>k</var> = <var>q</var> × <var>y</var></emu-eqn> for some integer <var>q</var>.</p>
<p>The mathematical function <emu-eqn id="eqn-floor" aoid="floor" class="inline">floor(<var>x</var>)</emu-eqn> produces the largest integer (closest to positive infinity) that is not larger than <var>x</var>.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p><emu-eqn class="inline"><emu-xref aoid="floor" id="_ref_939"><a href="#eqn-floor">floor</a></emu-xref>(<var>x</var>) = <var>x</var> - (<var>x</var> <emu-xref aoid="modulo" id="_ref_940"><a href="#eqn-modulo">modulo</a></emu-xref> 1)</emu-eqn>.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-ecmascript-data-types-and-values" aoid="Type">
<h1><span class="secnum">6</span>ECMAScript Data Types and Values</h1>
<p>Algorithms within this specification manipulate values each of
which has an associated type. The possible value types are exactly those
defined in this clause. Types are further subclassified into ECMAScript
language types and specification types.</p>
<p>Within this specification, the notation “Type(<var>x</var>)” is used as shorthand for “the <dfn id="type">type</dfn> of <var>x</var>”
where “type” refers to the ECMAScript language and specification types
defined in this clause. When the term “empty” is used as if it was
naming a value, it is equivalent to saying “no value of any type”.</p>
<emu-clause id="sec-ecmascript-language-types">
<h1><span class="secnum">6.1</span>ECMAScript Language Types</h1>
<p>An <dfn>ECMAScript language type</dfn> corresponds to values
that are directly manipulated by an ECMAScript programmer using the
ECMAScript language. The ECMAScript language types are Undefined, Null,
Boolean, String, Symbol, Number, and Object. An <dfn>ECMAScript language value</dfn> is a value that is characterized by an ECMAScript language type.</p>
<emu-clause id="sec-ecmascript-language-types-undefined-type">
<h1><span class="secnum">6.1.1</span>The Undefined Type</h1>
<p>The Undefined type has exactly one value, called <emu-val>undefined</emu-val>. Any variable that has not been assigned a value has the value <emu-val>undefined</emu-val>.</p>
</emu-clause>
<emu-clause id="sec-ecmascript-language-types-null-type">
<h1><span class="secnum">6.1.2</span>The Null Type</h1>
<p>The Null type has exactly one value, called <emu-val>null</emu-val>.</p>
</emu-clause>
<emu-clause id="sec-ecmascript-language-types-boolean-type">
<h1><span class="secnum">6.1.3</span>The Boolean Type</h1>
<p>The Boolean type represents a logical entity having two values, called <emu-val>true</emu-val> and <emu-val>false</emu-val>.</p>
</emu-clause>
<emu-clause id="sec-ecmascript-language-types-string-type">
<h1><span class="secnum">6.1.4</span>The String Type</h1>
<p>The String type is the set of all ordered sequences of zero or
more 16-bit unsigned integer values (“elements”) up to a maximum length
of 2<sup>53</sup> - 1 elements. The String type is generally used to
represent textual data in a running ECMAScript program, in which case
each element in the String is treated as a UTF-16 code unit value. Each
element is regarded as occupying a position within the sequence. These
positions are indexed with nonnegative integers. The first element (if
any) is at index 0, the next element (if any) at index 1, and so on. The
length of a String is the number of elements (i.e., 16-bit values)
within it. The empty String has length zero and therefore contains no
elements.</p>
<p>ECMAScript operations that do not interpret String contents
apply no further semantics. Operations that do interpret String values
treat each element as a single UTF-16 code unit. However, ECMAScript
does not restrict the value of or relationships between these code
units, so operations that further interpret String contents as sequences
of Unicode code points encoded in UTF-16 must account for ill-formed
subsequences. Such operations apply special treatment to every code unit
with a numeric value in the inclusive range 0xD800 to 0xDBFF (defined
by the Unicode Standard as a <dfn id="leading-surrogate">leading surrogate</dfn>, or more formally as a <dfn id="high-surrogate-code-unit">high-surrogate code unit</dfn>) and every code unit with a numeric value in the inclusive range 0xDC00 to 0xDFFF (defined as a <dfn id="trailing-surrogate">trailing surrogate</dfn>, or more formally as a <dfn id="low-surrogate-code-unit">low-surrogate code unit</dfn>) using the following rules:</p>
<ul>
<li>
A code unit that is not a <emu-xref href="#leading-surrogate" id="_ref_14"><a href="#leading-surrogate">leading surrogate</a></emu-xref> and not a <emu-xref href="#trailing-surrogate" id="_ref_15"><a href="#trailing-surrogate">trailing surrogate</a></emu-xref> is interpreted as a code point with the same value.
</li>
<li>
A sequence of two code units, where the first code unit <var>c1</var> is a <emu-xref href="#leading-surrogate" id="_ref_16"><a href="#leading-surrogate">leading surrogate</a></emu-xref> and the second code unit <var>c2</var> a <emu-xref href="#trailing-surrogate" id="_ref_17"><a href="#trailing-surrogate">trailing surrogate</a></emu-xref>, is a <dfn id="surrogate-pair">surrogate pair</dfn> and is interpreted as a code point with the value (<var>c1</var> - 0xD800) × 0x400 + (<var>c2</var> - 0xDC00) + 0x10000. (See <emu-xref href="#sec-utf16decode" id="_ref_18"><a href="#sec-utf16decode">10.1.2</a></emu-xref>)
</li>
<li>
A code unit that is a <emu-xref href="#leading-surrogate" id="_ref_19"><a href="#leading-surrogate">leading surrogate</a></emu-xref> or <emu-xref href="#trailing-surrogate" id="_ref_20"><a href="#trailing-surrogate">trailing surrogate</a></emu-xref>, but is not part of a <emu-xref href="#surrogate-pair" id="_ref_21"><a href="#surrogate-pair">surrogate pair</a></emu-xref>, is interpreted as a code point with the same value.
</li>
</ul>
<p>The function <code>String.prototype.normalize</code> (see <emu-xref href="#sec-string.prototype.normalize" id="_ref_22"><a href="#sec-string.prototype.normalize">21.1.3.12</a></emu-xref>) can be used to explicitly normalize a String value. <code>String.prototype.localeCompare</code> (see <emu-xref href="#sec-string.prototype.localecompare" id="_ref_23"><a href="#sec-string.prototype.localecompare">21.1.3.10</a></emu-xref>)
internally normalizes String values, but no other operations implicitly
normalize the strings upon which they operate. Only operations that are
explicitly specified to be language or locale sensitive produce
language-sensitive results.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The rationale behind this design was to keep the
implementation of Strings as simple and high-performing as possible. If
ECMAScript source text is in Normalized Form C, string literals are
guaranteed to also be normalized, as long as they do not contain any
Unicode escape sequences.</p>
</div></emu-note>
<p>In this specification, the phrase "the <dfn>string-concatenation</dfn> of <var>A</var>, <var>B</var>,
..." (where each argument is a String value, a code unit, or a sequence
of code units) denotes the String value whose sequence of code units is
the concatenation of the code units (in order) of each of the arguments
(in order).</p>
</emu-clause>
<emu-clause id="sec-ecmascript-language-types-symbol-type">
<h1><span class="secnum">6.1.5</span>The Symbol Type</h1>
<p>The Symbol type is the set of all non-String values that may be used as the key of an Object property (<emu-xref href="#sec-object-type" id="_ref_24"><a href="#sec-object-type">6.1.7</a></emu-xref>).</p>
<p>Each possible Symbol value is unique and immutable.</p>
<p>Each Symbol value immutably holds an associated value called [[Description]] that is either <emu-val>undefined</emu-val> or a String value.</p>
<emu-clause id="sec-well-known-symbols">
<h1><span class="secnum">6.1.5.1</span>Well-Known Symbols</h1>
<p>Well-known symbols are built-in Symbol values that are
explicitly referenced by algorithms of this specification. They are
typically used as the keys of properties whose values serve as extension
points of a specification algorithm. Unless otherwise specified,
well-known symbols values are shared by all realms (<emu-xref href="#sec-code-realms" id="_ref_25"><a href="#sec-code-realms">8.2</a></emu-xref>).</p>
<p>Within this specification a well-known symbol is referred to
by using a notation of the form @@name, where “name” is one of the
values listed in <emu-xref href="#table-1" id="_ref_26"><a href="#table-1">Table 1</a></emu-xref>.</p>
<emu-table id="table-1" caption="Well-known Symbols"><figure><figcaption>Table 1: Well-known Symbols</figcaption>
<table>
<tbody>
<tr>
<th>
Specification Name
</th>
<th>
[[Description]]
</th>
<th>
Value and Purpose
</th>
</tr>
<tr>
<td>
@@asyncIterator
</td>
<td>
<code>"Symbol.asyncIterator"</code>
</td>
<td>
A method that returns the default AsyncIterator for an object. Called by the semantics of the <code>for</code>-<code>await</code>-<code>of</code> statement.
</td>
</tr>
<tr>
<td>
@@hasInstance
</td>
<td>
<code>"Symbol.hasInstance"</code>
</td>
<td>
A method that determines if a <emu-xref href="#constructor" id="_ref_941"><a href="#constructor">constructor</a></emu-xref> object recognizes an object as one of the <emu-xref href="#constructor" id="_ref_942"><a href="#constructor">constructor</a></emu-xref>'s instances. Called by the semantics of the <code>instanceof</code> operator.
</td>
</tr>
<tr>
<td>
@@isConcatSpreadable
</td>
<td>
<code>"Symbol.isConcatSpreadable"</code>
</td>
<td>
A Boolean valued property that if true indicates that an object should be flattened to its array elements by <emu-xref href="#sec-array.prototype.concat" id="_ref_27"><a href="#sec-array.prototype.concat"><code>Array.prototype.concat</code></a></emu-xref>.
</td>
</tr>
<tr>
<td>
@@iterator
</td>
<td>
<code>"Symbol.iterator"</code>
</td>
<td>
A method that returns the default Iterator for an object. Called by the semantics of the for-of statement.
</td>
</tr>
<tr>
<td>
@@match
</td>
<td>
<code>"Symbol.match"</code>
</td>
<td>
A regular expression method that matches the regular expression against a string. Called by the <emu-xref href="#sec-string.prototype.match" id="_ref_28"><a href="#sec-string.prototype.match"><code>String.prototype.match</code></a></emu-xref> method.
</td>
</tr>
<tr>
<td>
@@replace
</td>
<td>
<code>"Symbol.replace"</code>
</td>
<td>
A regular expression method that replaces matched substrings of a string. Called by the <emu-xref href="#sec-string.prototype.replace" id="_ref_29"><a href="#sec-string.prototype.replace"><code>String.prototype.replace</code></a></emu-xref> method.
</td>
</tr>
<tr>
<td>
@@search
</td>
<td>
<code>"Symbol.search"</code>
</td>
<td>
A regular expression method that returns the index
within a string that matches the regular expression. Called by the <emu-xref href="#sec-string.prototype.search" id="_ref_30"><a href="#sec-string.prototype.search"><code>String.prototype.search</code></a></emu-xref> method.
</td>
</tr>
<tr>
<td>
@@species
</td>
<td>
<code>"Symbol.species"</code>
</td>
<td>
A function valued property that is the <emu-xref href="#constructor" id="_ref_943"><a href="#constructor">constructor</a></emu-xref> function that is used to create derived objects.
</td>
</tr>
<tr>
<td>
@@split
</td>
<td>
<code>"Symbol.split"</code>
</td>
<td>
A regular expression method that splits a string at the
indices that match the regular expression. Called by the <emu-xref href="#sec-string.prototype.split" id="_ref_31"><a href="#sec-string.prototype.split"><code>String.prototype.split</code></a></emu-xref> method.
</td>
</tr>
<tr>
<td>
@@toPrimitive
</td>
<td>
<code>"Symbol.toPrimitive"</code>
</td>
<td>
A method that converts an object to a corresponding primitive value. Called by the <emu-xref aoid="ToPrimitive" id="_ref_944"><a href="#sec-toprimitive">ToPrimitive</a></emu-xref> abstract operation.
</td>
</tr>
<tr>
<td>
@@toStringTag
</td>
<td>
<code>"Symbol.toStringTag"</code>
</td>
<td>
A String valued property that is used in the creation of
the default string description of an object. Accessed by the built-in
method <emu-xref href="#sec-object.prototype.tostring" id="_ref_32"><a href="#sec-object.prototype.tostring"><code>Object.prototype.toString</code></a></emu-xref>.
</td>
</tr>
<tr>
<td>
@@unscopables
</td>
<td>
<code>"Symbol.unscopables"</code>
</td>
<td>
An object valued property whose own and inherited property names are property names that are excluded from the <code>with</code> environment bindings of the associated object.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
</emu-clause>
</emu-clause>
<emu-clause id="sec-ecmascript-language-types-number-type">
<h1><span class="secnum">6.1.6</span>The Number Type</h1>
<p>The Number type has exactly 18437736874454810627 (that is, <emu-eqn class="inline">2<sup>64</sup> - 2<sup>53</sup> + 3</emu-eqn>)
values, representing the double-precision 64-bit format IEEE 754-2008
values as specified in the IEEE Standard for Binary Floating-Point
Arithmetic, except that the 9007199254740990 (that is, <emu-eqn class="inline">2<sup>53</sup> - 2</emu-eqn>) distinct “Not-a-Number” values of the IEEE Standard are represented in ECMAScript as a single special <emu-val>NaN</emu-val> value. (Note that the <emu-val>NaN</emu-val> value is produced by the program expression <code>NaN</code>.)
In some implementations, external code might be able to detect a
difference between various Not-a-Number values, but such behaviour is
implementation-dependent; to ECMAScript code, all <emu-val>NaN</emu-val> values are indistinguishable from each other.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The bit pattern that might be observed in an ArrayBuffer (see <emu-xref href="#sec-arraybuffer-objects" id="_ref_33"><a href="#sec-arraybuffer-objects">24.1</a></emu-xref>) or a SharedArrayBuffer (see <emu-xref href="#sec-sharedarraybuffer-objects" id="_ref_34"><a href="#sec-sharedarraybuffer-objects">24.2</a></emu-xref>)
after a Number value has been stored into it is not necessarily the
same as the internal representation of that Number value used by the
ECMAScript implementation.</p>
</div></emu-note>
<p>There are two other special values, called <emu-val>positive Infinity</emu-val> and <emu-val>negative Infinity</emu-val>. For brevity, these values are also referred to for expository purposes by the symbols <emu-val>+∞</emu-val> and <emu-val>-∞</emu-val>, respectively. (Note that these two infinite Number values are produced by the program expressions <code>+Infinity</code> (or simply <code>Infinity</code>) and <code>-Infinity</code>.)</p>
<p>The other 18437736874454810624 (that is, <emu-eqn class="inline">2<sup>64</sup> - 2<sup>53</sup></emu-eqn>)
values are called the finite numbers. Half of these are positive
numbers and half are negative numbers; for every finite positive Number
value there is a corresponding negative value having the same magnitude.</p>
<p>Note that there is both a <emu-val>positive zero</emu-val> and a <emu-val>negative zero</emu-val>. For brevity, these values are also referred to for expository purposes by the symbols <emu-val>+0</emu-val> and <emu-val>-0</emu-val>, respectively. (Note that these two different zero Number values are produced by the program expressions <code>+0</code> (or simply <code>0</code>) and <code>-0</code>.)</p>
<p>The 18437736874454810622 (that is, <emu-eqn class="inline">2<sup>64</sup> - 2<sup>53</sup> - 2</emu-eqn>) finite nonzero values are of two kinds:</p>
<p>18428729675200069632 (that is, <emu-eqn class="inline">2<sup>64</sup> - 2<sup>54</sup></emu-eqn>) of them are normalized, having the form</p>
<div class="math-display">
<var>s</var> × <var>m</var> × 2<sup><var>e</var></sup>
</div>
<p>where <var>s</var> is +1 or -1, <var>m</var> is a positive integer less than 2<sup>53</sup> but not less than 2<sup>52</sup>, and <var>e</var> is an integer ranging from -1074 to 971, inclusive.</p>
<p>The remaining 9007199254740990 (that is, <emu-eqn class="inline">2<sup>53</sup> - 2</emu-eqn>) values are denormalized, having the form</p>
<div class="math-display">
<var>s</var> × <var>m</var> × 2<sup><var>e</var></sup>
</div>
<p>where <var>s</var> is +1 or -1, <var>m</var> is a positive integer less than 2<sup>52</sup>, and <var>e</var> is -1074.</p>
<p>Note that all the positive and negative integers whose magnitude is no greater than 2<sup>53</sup> are representable in the Number type (indeed, the integer 0 has two representations, <emu-val>+0</emu-val> and <emu-val>-0</emu-val>).</p>
<p>A finite number has an <em>odd significand</em> if it is nonzero and the integer <var>m</var> used to express it (in one of the two forms shown above) is odd. Otherwise, it has an <em>even significand</em>.</p>
<p>In this specification, the phrase “the Number value for <var>x</var>” where <var>x</var>
represents an exact real mathematical quantity (which might even be an
irrational number such as π) means a Number value chosen in the
following manner. Consider the set of all finite values of the Number
type, with <emu-val>-0</emu-val> removed and with two additional values added to it that are not representable in the Number type, namely 2<sup>1024</sup> (which is <emu-eqn class="inline">+1 × 2<sup>53</sup> × 2<sup>971</sup></emu-eqn>) and <emu-eqn class="inline">-2<sup>1024</sup></emu-eqn> (which is <emu-eqn class="inline">-1 × 2<sup>53</sup> × 2<sup>971</sup></emu-eqn>). Choose the member of this set that is closest in value to <var>x</var>.
If two values of the set are equally close, then the one with an even
significand is chosen; for this purpose, the two extra values 2<sup>1024</sup> and <emu-eqn class="inline">-2<sup>1024</sup></emu-eqn> are considered to have even significands. Finally, if 2<sup>1024</sup> was chosen, replace it with <emu-val>+∞</emu-val>; if <emu-eqn class="inline">-2<sup>1024</sup></emu-eqn> was chosen, replace it with <emu-val>-∞</emu-val>; if <emu-val>+0</emu-val> was chosen, replace it with <emu-val>-0</emu-val> if and only if <var>x</var> is less than zero; any other chosen value is used unchanged. The result is the Number value for <var>x</var>. (This procedure corresponds exactly to the behaviour of the IEEE 754-2008 “round to nearest, ties to even” mode.)</p>
<p>Some ECMAScript operators deal only with integers in specific ranges such as <emu-eqn class="inline">-2<sup>31</sup></emu-eqn> through <emu-eqn class="inline">2<sup>31</sup> - 1</emu-eqn>, inclusive, or in the range 0 through <emu-eqn class="inline">2<sup>16</sup> - 1</emu-eqn>,
inclusive. These operators accept any value of the Number type but
first convert each such value to an integer value in the expected range.
See the descriptions of the numeric conversion operations in <emu-xref href="#sec-type-conversion" id="_ref_35"><a href="#sec-type-conversion">7.1</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-object-type">
<h1><span class="secnum">6.1.7</span>The Object Type</h1>
<p>An Object is logically a collection of properties. Each property is either a data property, or an accessor property:</p>
<ul>
<li>
A <dfn>data property</dfn> associates a key value with an <emu-xref href="#sec-ecmascript-language-types" id="_ref_945"><a href="#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref> and a set of Boolean attributes.
</li>
<li>
An <dfn>accessor property</dfn> associates a key value with
one or two accessor functions, and a set of Boolean attributes. The
accessor functions are used to store or retrieve an <emu-xref href="#sec-ecmascript-language-types" id="_ref_946"><a href="#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref> that is associated with the property.
</li>
</ul>
<p>Properties are identified using key values. A property key
value is either an ECMAScript String value or a Symbol value. All String
and Symbol values, including the empty string, are valid as property
keys. A <dfn id="property-name">property name</dfn> is a property key that is a String value.</p>
<p>An <dfn id="integer-index">integer index</dfn> is a String-valued property key that is a canonical numeric String (see <emu-xref href="#sec-canonicalnumericindexstring" id="_ref_36"><a href="#sec-canonicalnumericindexstring">7.1.16</a></emu-xref>) and whose numeric value is either <emu-val>+0</emu-val> or a positive integer ≤ 2<sup>53</sup> - 1. An <dfn id="array-index">array index</dfn> is an <emu-xref href="#integer-index" id="_ref_947"><a href="#integer-index">integer index</a></emu-xref> whose numeric value <var>i</var> is in the range <emu-eqn class="inline">+0 ≤ <var>i</var> &lt; 2<sup>32</sup> - 1</emu-eqn>.</p>
<p>Property keys are used to access properties and their values. There are two kinds of access for properties: <em>get</em> and <em>set</em>,
corresponding to value retrieval and assignment, respectively. The
properties accessible via get and set access includes both <em>own properties</em> that are a direct part of an object and <em>inherited properties</em>
which are provided by another associated object via a property
inheritance relationship. Inherited properties may be either own or
inherited properties of the associated object. Each own property of an
object must each have a key value that is distinct from the key values
of the other own properties of that object.</p>
<p>All objects are logically collections of properties, but there
are multiple forms of objects that differ in their semantics for
accessing and manipulating their properties. <dfn id="ordinary-objects">Ordinary objects</dfn> are the most common form of objects and have the default object semantics. An <dfn id="exotic-object">exotic object</dfn> is any form of object whose property semantics differ in any way from the default semantics.</p>
<emu-clause id="sec-property-attributes">
<h1><span class="secnum">6.1.7.1</span>Property Attributes</h1>
<p>Attributes are used in this specification to define and explain the state of Object properties. A <emu-xref href="#sec-object-type" id="_ref_948"><a href="#sec-object-type">data property</a></emu-xref> associates a key value with the attributes listed in <emu-xref href="#table-2" id="_ref_37"><a href="#table-2">Table 2</a></emu-xref>.</p>
<emu-table id="table-2" caption="Attributes of a Data Property"><figure><figcaption>Table 2: Attributes of a Data Property</figcaption>
<table>
<tbody>
<tr>
<th>
Attribute Name
</th>
<th>
Value Domain
</th>
<th>
Description
</th>
</tr>
<tr>
<td>
[[Value]]
</td>
<td>
Any <emu-xref href="#sec-ecmascript-language-types" id="_ref_949"><a href="#sec-ecmascript-language-types">ECMAScript language type</a></emu-xref>
</td>
<td>
The value retrieved by a get access of the property.
</td>
</tr>
<tr>
<td>
[[Writable]]
</td>
<td>
Boolean
</td>
<td>
If <emu-val>false</emu-val>, attempts by ECMAScript code to change the property's [[Value]] attribute using [[Set]] will not succeed.
</td>
</tr>
<tr>
<td>
[[Enumerable]]
</td>
<td>
Boolean
</td>
<td>
If <emu-val>true</emu-val>, the property will be enumerated by a for-in enumeration (see <emu-xref href="#sec-for-in-and-for-of-statements" id="_ref_38"><a href="#sec-for-in-and-for-of-statements">13.7.5</a></emu-xref>). Otherwise, the property is said to be non-enumerable.
</td>
</tr>
<tr>
<td>
[[Configurable]]
</td>
<td>
Boolean
</td>
<td>
If <emu-val>false</emu-val>, attempts to delete the property, change the property to be an <emu-xref href="#sec-object-type" id="_ref_950"><a href="#sec-object-type">accessor property</a></emu-xref>, or change its attributes (other than [[Value]], or changing [[Writable]] to <emu-val>false</emu-val>) will fail.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<p>An <emu-xref href="#sec-object-type" id="_ref_951"><a href="#sec-object-type">accessor property</a></emu-xref> associates a key value with the attributes listed in <emu-xref href="#table-3" id="_ref_39"><a href="#table-3">Table 3</a></emu-xref>.</p>
<emu-table id="table-3" caption="Attributes of an Accessor Property"><figure><figcaption>Table 3: Attributes of an Accessor Property</figcaption>
<table>
<tbody>
<tr>
<th>
Attribute Name
</th>
<th>
Value Domain
</th>
<th>
Description
</th>
</tr>
<tr>
<td>
[[Get]]
</td>
<td>
Object | Undefined
</td>
<td>
If the value is an Object it must be a <emu-xref href="#function-object" id="_ref_952"><a href="#function-object">function object</a></emu-xref>. The function's [[Call]] internal method (<emu-xref href="#table-6" id="_ref_40"><a href="#table-6">Table 6</a></emu-xref>) is called with an empty arguments list to retrieve the property value each time a get access of the property is performed.
</td>
</tr>
<tr>
<td>
[[Set]]
</td>
<td>
Object | Undefined
</td>
<td>
If the value is an Object it must be a <emu-xref href="#function-object" id="_ref_953"><a href="#function-object">function object</a></emu-xref>. The function's [[Call]] internal method (<emu-xref href="#table-6" id="_ref_41"><a href="#table-6">Table 6</a></emu-xref>)
is called with an arguments list containing the assigned value as its
sole argument each time a set access of the property is performed. The
effect of a property's [[Set]] internal method may, but is not required
to, have an effect on the value returned by subsequent calls to the
property's [[Get]] internal method.
</td>
</tr>
<tr>
<td>
[[Enumerable]]
</td>
<td>
Boolean
</td>
<td>
If <emu-val>true</emu-val>, the property is to be enumerated by a for-in enumeration (see <emu-xref href="#sec-for-in-and-for-of-statements" id="_ref_42"><a href="#sec-for-in-and-for-of-statements">13.7.5</a></emu-xref>). Otherwise, the property is said to be non-enumerable.
</td>
</tr>
<tr>
<td>
[[Configurable]]
</td>
<td>
Boolean
</td>
<td>
If <emu-val>false</emu-val>, attempts to delete the property, change the property to be a <emu-xref href="#sec-object-type" id="_ref_954"><a href="#sec-object-type">data property</a></emu-xref>, or change its attributes will fail.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<p>If the initial values of a property's attributes are not
explicitly specified by this specification, the default value defined in
<emu-xref href="#table-4" id="_ref_43"><a href="#table-4">Table 4</a></emu-xref> is used.</p>
<emu-table id="table-4" caption="Default Attribute Values"><figure><figcaption>Table 4: Default Attribute Values</figcaption>
<table>
<tbody>
<tr>
<th>
Attribute Name
</th>
<th>
Default Value
</th>
</tr>
<tr>
<td>
[[Value]]
</td>
<td>
<emu-val>undefined</emu-val>
</td>
</tr>
<tr>
<td>
[[Get]]
</td>
<td>
<emu-val>undefined</emu-val>
</td>
</tr>
<tr>
<td>
[[Set]]
</td>
<td>
<emu-val>undefined</emu-val>
</td>
</tr>
<tr>
<td>
[[Writable]]
</td>
<td>
<emu-val>false</emu-val>
</td>
</tr>
<tr>
<td>
[[Enumerable]]
</td>
<td>
<emu-val>false</emu-val>
</td>
</tr>
<tr>
<td>
[[Configurable]]
</td>
<td>
<emu-val>false</emu-val>
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
</emu-clause>
<emu-clause id="sec-object-internal-methods-and-internal-slots">
<h1><span class="secnum">6.1.7.2</span>Object Internal Methods and Internal Slots</h1>
<p>The actual semantics of objects, in ECMAScript, are specified via algorithms called <em>internal methods</em>.
Each object in an ECMAScript engine is associated with a set of
internal methods that defines its runtime behaviour. These internal
methods are not part of the ECMAScript language. They are defined by
this specification purely for expository purposes. However, each object
within an implementation of ECMAScript must behave as specified by the
internal methods associated with it. The exact manner in which this is
accomplished is determined by the implementation.</p>
<p>Internal method names are polymorphic. This means that
different object values may perform different algorithms when a common
internal method name is invoked upon them. That actual object upon which
an internal method is invoked is the “target” of the invocation. If, at
runtime, the implementation of an algorithm attempts to use an internal
method of an object that the object does not support, a <emu-val>TypeError</emu-val> exception is thrown.</p>
<p>Internal slots correspond to internal state that is
associated with objects and used by various ECMAScript specification
algorithms. Internal slots are not object properties and they are not
inherited. Depending upon the specific internal slot specification, such
state may consist of values of any <emu-xref href="#sec-ecmascript-language-types" id="_ref_955"><a href="#sec-ecmascript-language-types">ECMAScript language type</a></emu-xref>
or of specific ECMAScript specification type values. Unless explicitly
specified otherwise, internal slots are allocated as part of the process
of creating an object and may not be dynamically added to an object.
Unless specified otherwise, the initial value of an internal slot is the
value <emu-val>undefined</emu-val>. Various algorithms within this
specification create objects that have internal slots. However, the
ECMAScript language provides no direct way to associate internal slots
with an object.</p>
<p>Internal methods and internal slots are identified within
this specification using names enclosed in double square brackets [[ ]].</p>
<p><emu-xref href="#table-5" id="_ref_44"><a href="#table-5">Table 5</a></emu-xref> summarizes the <em>essential internal methods</em>
used by this specification that are applicable to all objects created
or manipulated by ECMAScript code. Every object must have algorithms for
all of the essential internal methods. However, all objects do not
necessarily use the same algorithms for those methods.</p>
<p>The “Signature” column of <emu-xref href="#table-5" id="_ref_45"><a href="#table-5">Table 5</a></emu-xref>
and other similar tables describes the invocation pattern for each
internal method. The invocation pattern always includes a parenthesized
list of descriptive parameter names. If a parameter name is the same as
an ECMAScript type name then the name describes the required type of the
parameter value. If an internal method explicitly returns a value, its
parameter list is followed by the symbol “→” and the type name of the
returned value. The type names used in signatures refer to the types
defined in clause <emu-xref href="#sec-ecmascript-data-types-and-values" id="_ref_46"><a href="#sec-ecmascript-data-types-and-values">6</a></emu-xref> augmented by the following additional names. “<em>any</em>” means the value may be any <emu-xref href="#sec-ecmascript-language-types" id="_ref_956"><a href="#sec-ecmascript-language-types">ECMAScript language type</a></emu-xref>. An internal method implicitly returns a <emu-xref href="#sec-completion-record-specification-type" id="_ref_957"><a href="#sec-completion-record-specification-type">Completion Record</a></emu-xref>. In addition to its parameters, an internal method always has access to the object that is the target of the method invocation.</p>
<emu-table id="table-5" caption="Essential Internal Methods"><figure><figcaption>Table 5: Essential Internal Methods</figcaption>
<table>
<tbody>
<tr>
<th>
Internal Method
</th>
<th>
Signature
</th>
<th>
Description
</th>
</tr>
<tr>
<td>
[[GetPrototypeOf]]
</td>
<td>
( ) <b>→</b> Object | Null
</td>
<td>
Determine the object that provides inherited properties for this object. A <emu-val>null</emu-val> value indicates that there are no inherited properties.
</td>
</tr>
<tr>
<td>
[[SetPrototypeOf]]
</td>
<td>
(Object | Null) <b>→</b> Boolean
</td>
<td>
Associate this object with another object that provides inherited properties. Passing <emu-val>null</emu-val> indicates that there are no inherited properties. Returns <emu-val>true</emu-val> indicating that the operation was completed successfully or <emu-val>false</emu-val> indicating that the operation was not successful.
</td>
</tr>
<tr>
<td>
[[IsExtensible]]
</td>
<td>
( ) <b>→</b> Boolean
</td>
<td>
Determine whether it is permitted to add additional properties to this object.
</td>
</tr>
<tr>
<td>
[[PreventExtensions]]
</td>
<td>
( ) <b>→</b> Boolean
</td>
<td>
Control whether new properties may be added to this object. Returns <emu-val>true</emu-val> if the operation was successful or <emu-val>false</emu-val> if the operation was unsuccessful.
</td>
</tr>
<tr>
<td>
[[GetOwnProperty]]
</td>
<td>
(<var>propertyKey</var>) <b>→</b> Undefined | <emu-xref href="#sec-property-descriptor-specification-type" id="_ref_958"><a href="#sec-property-descriptor-specification-type">Property Descriptor</a></emu-xref>
</td>
<td>
Return a <emu-xref href="#sec-property-descriptor-specification-type" id="_ref_959"><a href="#sec-property-descriptor-specification-type">Property Descriptor</a></emu-xref> for the own property of this object whose key is <var>propertyKey</var>, or <emu-val>undefined</emu-val> if no such property exists.
</td>
</tr>
<tr>
<td>
[[DefineOwnProperty]]
</td>
<td>
(<var>propertyKey</var>, <var>PropertyDescriptor</var>) <b>→</b> Boolean
</td>
<td>
Create or alter the own property, whose key is <var>propertyKey</var>, to have the state described by <var>PropertyDescriptor</var>. Return <emu-val>true</emu-val> if that property was successfully created/updated or <emu-val>false</emu-val> if the property could not be created or updated.
</td>
</tr>
<tr>
<td>
[[HasProperty]]
</td>
<td>
(<var>propertyKey</var>) <b>→</b> Boolean
</td>
<td>
Return a Boolean value indicating whether this object
already has either an own or inherited property whose key is <var>propertyKey</var>.
</td>
</tr>
<tr>
<td>
[[Get]]
</td>
<td>
(<var>propertyKey</var>, <var>Receiver</var>) <b>→</b> <em>any</em>
</td>
<td>
Return the value of the property whose key is <var>propertyKey</var> from this object. If any ECMAScript code must be executed to retrieve the property value, <var>Receiver</var> is used as the <emu-val>this</emu-val> value when evaluating the code.
</td>
</tr>
<tr>
<td>
[[Set]]
</td>
<td>
(<var>propertyKey</var>, <var>value</var>, <var>Receiver</var>) <b>→</b> Boolean
</td>
<td>
Set the value of the property whose key is <var>propertyKey</var> to <var>value</var>. If any ECMAScript code must be executed to set the property value, <var>Receiver</var> is used as the <emu-val>this</emu-val> value when evaluating the code. Returns <emu-val>true</emu-val> if the property value was set or <emu-val>false</emu-val> if it could not be set.
</td>
</tr>
<tr>
<td>
[[Delete]]
</td>
<td>
(<var>propertyKey</var>) <b>→</b> Boolean
</td>
<td>
Remove the own property whose key is <var>propertyKey</var> from this object. Return <emu-val>false</emu-val> if the property was not deleted and is still present. Return <emu-val>true</emu-val> if the property was deleted or is not present.
</td>
</tr>
<tr>
<td>
[[OwnPropertyKeys]]
</td>
<td>
( ) <b>→</b> <emu-xref href="#sec-list-and-record-specification-type" id="_ref_960"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of propertyKey
</td>
<td>
Return a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_961"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> whose elements are all of the own property keys for the object.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<p><emu-xref href="#table-6" id="_ref_47"><a href="#table-6">Table 6</a></emu-xref> summarizes additional essential internal methods that are supported by objects that may be called as functions. A <dfn id="function-object">function object</dfn> is an object that supports the [[Call]] internal method. A <dfn id="constructor">constructor</dfn>
is an object that supports the [[Construct]] internal method. Every
object that supports [[Construct]] must support [[Call]]; that is, every
<emu-xref href="#constructor" id="_ref_962"><a href="#constructor">constructor</a></emu-xref> must be a <emu-xref href="#function-object" id="_ref_963"><a href="#function-object">function object</a></emu-xref>. Therefore, a <emu-xref href="#constructor" id="_ref_964"><a href="#constructor">constructor</a></emu-xref> may also be referred to as a <em><emu-xref href="#constructor" id="_ref_965"><a href="#constructor">constructor</a></emu-xref> function</em> or <em><emu-xref href="#constructor" id="_ref_966"><a href="#constructor">constructor</a></emu-xref> <emu-xref href="#function-object" id="_ref_967"><a href="#function-object">function object</a></emu-xref></em>.</p>
<emu-table id="table-6" caption="Additional Essential Internal Methods of Function Objects"><figure><figcaption>Table 6: Additional Essential Internal Methods of Function Objects</figcaption>
<table>
<tbody>
<tr>
<th>
Internal Method
</th>
<th>
Signature
</th>
<th>
Description
</th>
</tr>
<tr>
<td>
[[Call]]
</td>
<td>
(<em>any</em>, a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_968"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of <em>any</em>) <b>→</b> <em>any</em>
</td>
<td>
Executes code associated with this object. Invoked via a
function call expression. The arguments to the internal method are a <emu-val>this</emu-val>
value and a list containing the arguments passed to the function by a
call expression. Objects that implement this internal method are <em>callable</em>.
</td>
</tr>
<tr>
<td>
[[Construct]]
</td>
<td>
(a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_969"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of <em>any</em>, Object) <b>→</b> Object
</td>
<td>
Creates an object. Invoked via the <code>new</code> or <code>super</code>
operators. The first argument to the internal method is a list
containing the arguments of the operator. The second argument is the
object to which the <code>new</code> operator was initially applied. Objects that implement this internal method are called <em>constructors</em>. A <emu-xref href="#function-object" id="_ref_970"><a href="#function-object">function object</a></emu-xref> is not necessarily a <emu-xref href="#constructor" id="_ref_971"><a href="#constructor">constructor</a></emu-xref> and such non-<emu-xref href="#constructor" id="_ref_972"><a href="#constructor">constructor</a></emu-xref> function objects do not have a [[Construct]] internal method.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<p>The semantics of the essential internal methods for ordinary objects and standard exotic objects are specified in clause <emu-xref href="#sec-ordinary-and-exotic-objects-behaviours" id="_ref_48"><a href="#sec-ordinary-and-exotic-objects-behaviours">9</a></emu-xref>. If any specified use of an internal method of an <emu-xref href="#exotic-object" id="_ref_973"><a href="#exotic-object">exotic object</a></emu-xref> is not supported by an implementation, that usage must throw a <emu-val>TypeError</emu-val> exception when attempted.</p>
</emu-clause>
<emu-clause id="sec-invariants-of-the-essential-internal-methods">
<h1><span class="secnum">6.1.7.3</span>Invariants of the Essential Internal Methods</h1>
<p>The Internal Methods of Objects of an ECMAScript engine must
conform to the list of invariants specified below. Ordinary ECMAScript
Objects as well as all standard exotic objects in this specification
maintain these invariants. ECMAScript Proxy objects maintain these
invariants by means of runtime checks on the result of traps invoked on
the [[ProxyHandler]] object.</p>
<p>Any implementation provided exotic objects must also maintain
these invariants for those objects. Violation of these invariants may
cause ECMAScript code to have unpredictable behaviour and create
security issues. However, violation of these invariants must never
compromise the memory safety of an implementation.</p>
<p>An implementation must not allow these invariants to be
circumvented in any manner such as by providing alternative interfaces
that implement the functionality of the essential internal methods
without enforcing their invariants.</p>
<h2>Definitions:</h2>
<ul>
<li>
The <em>target</em> of an internal method is the object upon which the internal method is called.
</li>
<li>
A target is <em>non-extensible</em> if it has been observed to return <emu-val>false</emu-val> from its [[IsExtensible]] internal method, or <emu-val>true</emu-val> from its [[PreventExtensions]] internal method.
</li>
<li>
A <em>non-existent</em> property is a property that does not exist as an own property on a non-extensible target.
</li>
<li>
All references to <em><emu-xref aoid="SameValue" id="_ref_974"><a href="#sec-samevalue">SameValue</a></emu-xref></em> are according to the definition of the <emu-xref aoid="SameValue" id="_ref_975"><a href="#sec-samevalue">SameValue</a></emu-xref> algorithm.
</li>
</ul>
<h2>[[GetPrototypeOf]] ( )</h2>
<ul>
<li>
The Type of the return value must be either Object or Null.
</li>
<li>
If target is non-extensible, and [[GetPrototypeOf]] returns a value <var>V</var>, then any future calls to [[GetPrototypeOf]] should return the <emu-xref aoid="SameValue" id="_ref_976"><a href="#sec-samevalue">SameValue</a></emu-xref> as <var>V</var>.
</li>
</ul>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>An object's prototype chain should have finite length (that
is, starting from any object, recursively applying the
[[GetPrototypeOf]] internal method to its result should eventually lead
to the value <emu-val>null</emu-val>). However, this requirement is not
enforceable as an object level invariant if the prototype chain includes
any exotic objects that do not use the ordinary object definition of
[[GetPrototypeOf]]. Such a circular prototype chain may result in
infinite loops when accessing object properties.</p>
</div></emu-note>
<h2>[[SetPrototypeOf]] ( <var>V</var> )</h2>
<ul>
<li>
The Type of the return value must be Boolean.
</li>
<li>
If target is non-extensible, [[SetPrototypeOf]] must return <emu-val>false</emu-val>, unless <var>V</var> is the <emu-xref aoid="SameValue" id="_ref_977"><a href="#sec-samevalue">SameValue</a></emu-xref> as the target's observed [[GetPrototypeOf]] value.
</li>
</ul>
<h2>[[IsExtensible]] ( )</h2>
<ul>
<li>
The Type of the return value must be Boolean.
</li>
<li>
If [[IsExtensible]] returns <emu-val>false</emu-val>, all future calls to [[IsExtensible]] on the target must return <emu-val>false</emu-val>.
</li>
</ul>
<h2>[[PreventExtensions]] ( )</h2>
<ul>
<li>
The Type of the return value must be Boolean.
</li>
<li>
If [[PreventExtensions]] returns <emu-val>true</emu-val>, all future calls to [[IsExtensible]] on the target must return <emu-val>false</emu-val> and the target is now considered non-extensible.
</li>
</ul>
<h2>[[GetOwnProperty]] ( <var>P</var> )</h2>
<ul>
<li>
The Type of the return value must be either <emu-xref href="#sec-property-descriptor-specification-type" id="_ref_978"><a href="#sec-property-descriptor-specification-type">Property Descriptor</a></emu-xref> or Undefined.
</li>
<li>
If the Type of the return value is <emu-xref href="#sec-property-descriptor-specification-type" id="_ref_979"><a href="#sec-property-descriptor-specification-type">Property Descriptor</a></emu-xref>, the return value must be a <emu-xref href="#sec-completepropertydescriptor" id="_ref_49"><a href="#sec-completepropertydescriptor">complete property descriptor</a></emu-xref>.
</li>
<li>
If <var>P</var> is described as a non-configurable, non-writable own <emu-xref href="#sec-object-type" id="_ref_980"><a href="#sec-object-type">data property</a></emu-xref>, all future calls to [[GetOwnProperty]] ( <var>P</var> ) must return Property Descritor whose [[Value]] is <emu-xref aoid="SameValue" id="_ref_981"><a href="#sec-samevalue">SameValue</a></emu-xref> as <var>P</var>'s [[Value]] attribute.
</li>
<li>
If <var>P</var>'s attributes other than [[Writable]] may change over time or if the property might be deleted, then <var>P</var>'s [[Configurable]] attribute must be <emu-val>true</emu-val>.
</li>
<li>
If the [[Writable]] attribute may change from <emu-val>false</emu-val> to <emu-val>true</emu-val>, then the [[Configurable]] attribute must be <emu-val>true</emu-val>.
</li>
<li>
If the target is non-extensible and <var>P</var> is non-existent, then all future calls to [[GetOwnProperty]] (<var>P</var>) on the target must describe <var>P</var> as non-existent (i.e. [[GetOwnProperty]] (<var>P</var>) must return <emu-val>undefined</emu-val>).
</li>
</ul>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>As a consequence of the third invariant, if a property is described as a <emu-xref href="#sec-object-type" id="_ref_982"><a href="#sec-object-type">data property</a></emu-xref> and it may return different values over time, then either or both of the [[Writable]] and [[Configurable]] attributes must be <emu-val>true</emu-val> even if no mechanism to change the value is exposed via the other internal methods.</p>
</div></emu-note>
<h2>[[DefineOwnProperty]] ( <var>P</var>, <var>Desc</var> )</h2>
<ul>
<li>
The Type of the return value must be Boolean.
</li>
<li>
[[DefineOwnProperty]] must return <emu-val>false</emu-val> if <var>P</var> has previously been observed as a non-configurable own property of the target, unless either:
<ol>
<li>
<var>P</var> is a writable <emu-xref href="#sec-object-type" id="_ref_983"><a href="#sec-object-type">data property</a></emu-xref>. A non-configurable writable <emu-xref href="#sec-object-type" id="_ref_984"><a href="#sec-object-type">data property</a></emu-xref> can be changed into a non-configurable non-writable <emu-xref href="#sec-object-type" id="_ref_985"><a href="#sec-object-type">data property</a></emu-xref>.
</li>
<li>
All attributes of <var>Desc</var> are the <emu-xref aoid="SameValue" id="_ref_986"><a href="#sec-samevalue">SameValue</a></emu-xref> as <var>P</var>'s attributes.
</li>
</ol>
</li>
<li>
[[DefineOwnProperty]] (<var>P</var>, <var>Desc</var>) must return <emu-val>false</emu-val> if target is non-extensible and <var>P</var> is a non-existent own property. That is, a non-extensible target object cannot be extended with new properties.
</li>
</ul>
<h2>[[HasProperty]] ( <var>P</var> )</h2>
<ul>
<li>
The Type of the return value must be Boolean.
</li>
<li>
If <var>P</var> was previously observed as a non-configurable own data or <emu-xref href="#sec-object-type" id="_ref_987"><a href="#sec-object-type">accessor property</a></emu-xref> of the target, [[HasProperty]] must return <emu-val>true</emu-val>.
</li>
</ul>
<h2>[[Get]] ( <var>P</var>, <var>Receiver</var> )</h2>
<ul>
<li>
If <var>P</var> was previously observed as a non-configurable, non-writable own <emu-xref href="#sec-object-type" id="_ref_988"><a href="#sec-object-type">data property</a></emu-xref> of the target with value <var>V</var>, then [[Get]] must return the <emu-xref aoid="SameValue" id="_ref_989"><a href="#sec-samevalue">SameValue</a></emu-xref> as <var>V</var>.
</li>
<li>
If <var>P</var> was previously observed as a non-configurable own <emu-xref href="#sec-object-type" id="_ref_990"><a href="#sec-object-type">accessor property</a></emu-xref> of the target whose [[Get]] attribute is <emu-val>undefined</emu-val>, the [[Get]] operation must return <emu-val>undefined</emu-val>.
</li>
</ul>
<h2>[[Set]] ( <var>P</var>, <var>V</var>, <var>Receiver</var> )</h2>
<ul>
<li>
The Type of the return value must be Boolean.
</li>
<li>
If <var>P</var> was previously observed as a non-configurable, non-writable own <emu-xref href="#sec-object-type" id="_ref_991"><a href="#sec-object-type">data property</a></emu-xref> of the target, then [[Set]] must return <emu-val>false</emu-val> unless <var>V</var> is the <emu-xref aoid="SameValue" id="_ref_992"><a href="#sec-samevalue">SameValue</a></emu-xref> as <var>P</var>'s [[Value]] attribute.
</li>
<li>
If <var>P</var> was previously observed as a non-configurable own <emu-xref href="#sec-object-type" id="_ref_993"><a href="#sec-object-type">accessor property</a></emu-xref> of the target whose [[Set]] attribute is <emu-val>undefined</emu-val>, the [[Set]] operation must return <emu-val>false</emu-val>.
</li>
</ul>
<h2>[[Delete]] ( <var>P</var> )</h2>
<ul>
<li>
The Type of the return value must be Boolean.
</li>
<li>
If <var>P</var> was previously observed as a non-configurable own data or <emu-xref href="#sec-object-type" id="_ref_994"><a href="#sec-object-type">accessor property</a></emu-xref> of the target, [[Delete]] must return <emu-val>false</emu-val>.
</li>
</ul>
<h2>[[OwnPropertyKeys]] ( )</h2>
<ul>
<li>
The return value must be a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_995"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li>
<li>
The returned <emu-xref href="#sec-list-and-record-specification-type" id="_ref_996"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> must not contain any duplicate entries.
</li>
<li>
The Type of each element of the returned <emu-xref href="#sec-list-and-record-specification-type" id="_ref_997"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> is either String or Symbol.
</li>
<li>
The returned <emu-xref href="#sec-list-and-record-specification-type" id="_ref_998"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> must contain at least the keys of all non-configurable own properties that have previously been observed.
</li>
<li>
If the object is non-extensible, the returned <emu-xref href="#sec-list-and-record-specification-type" id="_ref_999"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> must contain only the keys of all own properties of the object that are observable using [[GetOwnProperty]].
</li>
</ul>
<h2>[[Construct]] ( )</h2>
<ul>
<li>
The Type of the return value must be Object.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-well-known-intrinsic-objects">
<h1><span class="secnum">6.1.7.4</span>Well-Known Intrinsic Objects</h1>
<p>Well-known intrinsics are built-in objects that are
explicitly referenced by the algorithms of this specification and which
usually have <emu-xref href="#realm" id="_ref_1000"><a href="#realm">realm</a></emu-xref>-specific
identities. Unless otherwise specified each intrinsic object actually
corresponds to a set of similar objects, one per <emu-xref href="#realm" id="_ref_1001"><a href="#realm">realm</a></emu-xref>.</p>
<p>Within this specification a reference such as %name% means the intrinsic object, associated with the current <emu-xref href="#realm" id="_ref_1002"><a href="#realm">realm</a></emu-xref>, corresponding to the name. Determination of the current <emu-xref href="#realm" id="_ref_1003"><a href="#realm">realm</a></emu-xref> and its intrinsics is described in <emu-xref href="#sec-execution-contexts" id="_ref_50"><a href="#sec-execution-contexts">8.3</a></emu-xref>. The well-known intrinsics are listed in <emu-xref href="#table-7" id="_ref_51"><a href="#table-7">Table 7</a></emu-xref>.</p>
<emu-table id="table-7" caption="Well-Known Intrinsic Objects"><figure><figcaption>Table 7: Well-Known Intrinsic Objects</figcaption>
<table>
<tbody>
<tr>
<th>
Intrinsic Name
</th>
<th>
Global Name
</th>
<th>
ECMAScript Language Association
</th>
</tr>
<tr>
<td>
<emu-xref href="#sec-array-constructor" id="_ref_1004"><a href="#sec-array-constructor">%Array%</a></emu-xref>
</td>
<td>
<code>Array</code>
</td>
<td>
The <code>Array</code> <emu-xref href="#constructor" id="_ref_1005"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-array-constructor" id="_ref_52"><a href="#sec-array-constructor">22.1.1</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-arraybuffer-constructor" id="_ref_1006"><a href="#sec-arraybuffer-constructor">%ArrayBuffer%</a></emu-xref>
</td>
<td>
<code>ArrayBuffer</code>
</td>
<td>
The <code>ArrayBuffer</code> <emu-xref href="#constructor" id="_ref_1007"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-arraybuffer-constructor" id="_ref_53"><a href="#sec-arraybuffer-constructor">24.1.2</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-properties-of-the-arraybuffer-prototype-object" id="_ref_1008"><a href="#sec-properties-of-the-arraybuffer-prototype-object">%ArrayBufferPrototype%</a></emu-xref>
</td>
<td>
<code>ArrayBuffer.prototype</code>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1009"><a href="#sec-object-type">data property</a></emu-xref> of <emu-xref href="#sec-arraybuffer-constructor" id="_ref_1010"><a href="#sec-arraybuffer-constructor">%ArrayBuffer%</a></emu-xref>.
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-%arrayiteratorprototype%-object" id="_ref_1011"><a href="#sec-%arrayiteratorprototype%-object">%ArrayIteratorPrototype%</a></emu-xref>
</td>
<td>
</td>
<td>
The prototype of Array iterator objects (<emu-xref href="#sec-array-iterator-objects" id="_ref_54"><a href="#sec-array-iterator-objects">22.1.5</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-properties-of-the-array-prototype-object" id="_ref_1012"><a href="#sec-properties-of-the-array-prototype-object">%ArrayPrototype%</a></emu-xref>
</td>
<td>
<code>Array.prototype</code>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1013"><a href="#sec-object-type">data property</a></emu-xref> of <emu-xref href="#sec-array-constructor" id="_ref_1014"><a href="#sec-array-constructor">%Array%</a></emu-xref> (<emu-xref href="#sec-properties-of-the-array-prototype-object" id="_ref_55"><a href="#sec-properties-of-the-array-prototype-object">22.1.3</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-array.prototype.entries" id="_ref_1015"><a href="#sec-array.prototype.entries">%ArrayProto_entries%</a></emu-xref>
</td>
<td>
<code>Array.prototype.entries</code>
</td>
<td>
The initial value of the <code>entries</code> <emu-xref href="#sec-object-type" id="_ref_1016"><a href="#sec-object-type">data property</a></emu-xref> of <emu-xref href="#sec-properties-of-the-array-prototype-object" id="_ref_1017"><a href="#sec-properties-of-the-array-prototype-object">%ArrayPrototype%</a></emu-xref> (<emu-xref href="#sec-array.prototype.entries" id="_ref_56"><a href="#sec-array.prototype.entries">22.1.3.4</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-array.prototype.foreach" id="_ref_1018"><a href="#sec-array.prototype.foreach">%ArrayProto_forEach%</a></emu-xref>
</td>
<td>
<code>Array.prototype.forEach</code>
</td>
<td>
The initial value of the <code>forEach</code> <emu-xref href="#sec-object-type" id="_ref_1019"><a href="#sec-object-type">data property</a></emu-xref> of <emu-xref href="#sec-properties-of-the-array-prototype-object" id="_ref_1020"><a href="#sec-properties-of-the-array-prototype-object">%ArrayPrototype%</a></emu-xref> (<emu-xref href="#sec-array.prototype.foreach" id="_ref_57"><a href="#sec-array.prototype.foreach">22.1.3.12</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-array.prototype.keys" id="_ref_1021"><a href="#sec-array.prototype.keys">%ArrayProto_keys%</a></emu-xref>
</td>
<td>
<code>Array.prototype.keys</code>
</td>
<td>
The initial value of the <code>keys</code> <emu-xref href="#sec-object-type" id="_ref_1022"><a href="#sec-object-type">data property</a></emu-xref> of <emu-xref href="#sec-properties-of-the-array-prototype-object" id="_ref_1023"><a href="#sec-properties-of-the-array-prototype-object">%ArrayPrototype%</a></emu-xref> (<emu-xref href="#sec-array.prototype.keys" id="_ref_58"><a href="#sec-array.prototype.keys">22.1.3.16</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-array.prototype.values" id="_ref_1024"><a href="#sec-array.prototype.values">%ArrayProto_values%</a></emu-xref>
</td>
<td>
<code>Array.prototype.values</code>
</td>
<td>
The initial value of the <code>values</code> <emu-xref href="#sec-object-type" id="_ref_1025"><a href="#sec-object-type">data property</a></emu-xref> of <emu-xref href="#sec-properties-of-the-array-prototype-object" id="_ref_1026"><a href="#sec-properties-of-the-array-prototype-object">%ArrayPrototype%</a></emu-xref> (<emu-xref href="#sec-array.prototype.values" id="_ref_59"><a href="#sec-array.prototype.values">22.1.3.32</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-%asyncfromsynciteratorprototype%-object" id="_ref_1027"><a href="#sec-%asyncfromsynciteratorprototype%-object">%AsyncFromSyncIteratorPrototype%</a></emu-xref>
</td>
<td>
</td>
<td>
The prototype of async-from-sync iterator objects (<emu-xref href="#sec-async-from-sync-iterator-objects" id="_ref_60"><a href="#sec-async-from-sync-iterator-objects">25.1.4</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-async-function-constructor" id="_ref_1028"><a href="#sec-async-function-constructor">%AsyncFunction%</a></emu-xref>
</td>
<td>
</td>
<td>
The <emu-xref href="#constructor" id="_ref_1029"><a href="#constructor">constructor</a></emu-xref> of async function objects (<emu-xref href="#sec-async-function-constructor" id="_ref_61"><a href="#sec-async-function-constructor">25.7.1</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-async-function-prototype-properties" id="_ref_1030"><a href="#sec-async-function-prototype-properties">%AsyncFunctionPrototype%</a></emu-xref>
</td>
<td>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1031"><a href="#sec-object-type">data property</a></emu-xref> of <emu-xref href="#sec-async-function-constructor" id="_ref_1032"><a href="#sec-async-function-constructor">%AsyncFunction%</a></emu-xref>
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-asyncgeneratorfunction-prototype" id="_ref_1033"><a href="#sec-asyncgeneratorfunction-prototype">%AsyncGenerator%</a></emu-xref>
</td>
<td>
</td>
<td>
The initial value of the <code>prototype</code> property of <emu-xref href="#sec-asyncgeneratorfunction-constructor" id="_ref_1034"><a href="#sec-asyncgeneratorfunction-constructor">%AsyncGeneratorFunction%</a></emu-xref>
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-asyncgeneratorfunction-constructor" id="_ref_1035"><a href="#sec-asyncgeneratorfunction-constructor">%AsyncGeneratorFunction%</a></emu-xref>
</td>
<td>
</td>
<td>
The <emu-xref href="#constructor" id="_ref_1036"><a href="#constructor">constructor</a></emu-xref> of async iterator objects (<emu-xref href="#sec-asyncgeneratorfunction-constructor" id="_ref_62"><a href="#sec-asyncgeneratorfunction-constructor">25.3.1</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-properties-of-asyncgenerator-prototype" id="_ref_1037"><a href="#sec-properties-of-asyncgenerator-prototype">%AsyncGeneratorPrototype%</a></emu-xref>
</td>
<td>
</td>
<td>
The initial value of the <code>prototype</code> property of <emu-xref href="#sec-asyncgeneratorfunction-prototype" id="_ref_1038"><a href="#sec-asyncgeneratorfunction-prototype">%AsyncGenerator%</a></emu-xref>
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-asynciteratorprototype" id="_ref_1039"><a href="#sec-asynciteratorprototype">%AsyncIteratorPrototype%</a></emu-xref>
</td>
<td>
</td>
<td>
An object that all standard built-in async iterator objects indirectly inherit from
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-atomics-object" id="_ref_1040"><a href="#sec-atomics-object">%Atomics%</a></emu-xref>
</td>
<td>
<code>Atomics</code>
</td>
<td>
The <code>Atomics</code> object (<emu-xref href="#sec-atomics-object" id="_ref_63"><a href="#sec-atomics-object">24.4</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-boolean-constructor" id="_ref_1041"><a href="#sec-boolean-constructor">%Boolean%</a></emu-xref>
</td>
<td>
<code>Boolean</code>
</td>
<td>
The <code>Boolean</code> <emu-xref href="#constructor" id="_ref_1042"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-boolean-constructor" id="_ref_64"><a href="#sec-boolean-constructor">19.3.1</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-properties-of-the-boolean-prototype-object" id="_ref_1043"><a href="#sec-properties-of-the-boolean-prototype-object">%BooleanPrototype%</a></emu-xref>
</td>
<td>
<code>Boolean.prototype</code>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1044"><a href="#sec-object-type">data property</a></emu-xref> of <emu-xref href="#sec-boolean-constructor" id="_ref_1045"><a href="#sec-boolean-constructor">%Boolean%</a></emu-xref> (<emu-xref href="#sec-properties-of-the-boolean-prototype-object" id="_ref_65"><a href="#sec-properties-of-the-boolean-prototype-object">19.3.3</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-dataview-constructor" id="_ref_1046"><a href="#sec-dataview-constructor">%DataView%</a></emu-xref>
</td>
<td>
<code>DataView</code>
</td>
<td>
The <code>DataView</code> <emu-xref href="#constructor" id="_ref_1047"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-dataview-constructor" id="_ref_66"><a href="#sec-dataview-constructor">24.3.2</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-properties-of-the-dataview-prototype-object" id="_ref_1048"><a href="#sec-properties-of-the-dataview-prototype-object">%DataViewPrototype%</a></emu-xref>
</td>
<td>
<code>DataView.prototype</code>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1049"><a href="#sec-object-type">data property</a></emu-xref> of <emu-xref href="#sec-dataview-constructor" id="_ref_1050"><a href="#sec-dataview-constructor">%DataView%</a></emu-xref>
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-date-constructor" id="_ref_1051"><a href="#sec-date-constructor">%Date%</a></emu-xref>
</td>
<td>
<code>Date</code>
</td>
<td>
The <code>Date</code> <emu-xref href="#constructor" id="_ref_1052"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-date-constructor" id="_ref_67"><a href="#sec-date-constructor">20.3.2</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-properties-of-the-date-prototype-object" id="_ref_1053"><a href="#sec-properties-of-the-date-prototype-object">%DatePrototype%</a></emu-xref>
</td>
<td>
<code>Date.prototype</code>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1054"><a href="#sec-object-type">data property</a></emu-xref> of <emu-xref href="#sec-date-constructor" id="_ref_1055"><a href="#sec-date-constructor">%Date%</a></emu-xref>.
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-decodeuri-encodeduri" id="_ref_1056"><a href="#sec-decodeuri-encodeduri">%decodeURI%</a></emu-xref>
</td>
<td>
<code>decodeURI</code>
</td>
<td>
The <code>decodeURI</code> function (<emu-xref href="#sec-decodeuri-encodeduri" id="_ref_68"><a href="#sec-decodeuri-encodeduri">18.2.6.2</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-decodeuricomponent-encodeduricomponent" id="_ref_1057"><a href="#sec-decodeuricomponent-encodeduricomponent">%decodeURIComponent%</a></emu-xref>
</td>
<td>
<code>decodeURIComponent</code>
</td>
<td>
The <code>decodeURIComponent</code> function (<emu-xref href="#sec-decodeuricomponent-encodeduricomponent" id="_ref_69"><a href="#sec-decodeuricomponent-encodeduricomponent">18.2.6.3</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-encodeuri-uri" id="_ref_1058"><a href="#sec-encodeuri-uri">%encodeURI%</a></emu-xref>
</td>
<td>
<code>encodeURI</code>
</td>
<td>
The <code>encodeURI</code> function (<emu-xref href="#sec-encodeuri-uri" id="_ref_70"><a href="#sec-encodeuri-uri">18.2.6.4</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-encodeuricomponent-uricomponent" id="_ref_1059"><a href="#sec-encodeuricomponent-uricomponent">%encodeURIComponent%</a></emu-xref>
</td>
<td>
<code>encodeURIComponent</code>
</td>
<td>
The <code>encodeURIComponent</code> function (<emu-xref href="#sec-encodeuricomponent-uricomponent" id="_ref_71"><a href="#sec-encodeuricomponent-uricomponent">18.2.6.5</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-error-constructor" id="_ref_1060"><a href="#sec-error-constructor">%Error%</a></emu-xref>
</td>
<td>
<code>Error</code>
</td>
<td>
The <code>Error</code> <emu-xref href="#constructor" id="_ref_1061"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-error-constructor" id="_ref_72"><a href="#sec-error-constructor">19.5.1</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-properties-of-the-error-prototype-object" id="_ref_1062"><a href="#sec-properties-of-the-error-prototype-object">%ErrorPrototype%</a></emu-xref>
</td>
<td>
<code>Error.prototype</code>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1063"><a href="#sec-object-type">data property</a></emu-xref> of <emu-xref href="#sec-error-constructor" id="_ref_1064"><a href="#sec-error-constructor">%Error%</a></emu-xref>
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-eval-x" id="_ref_1065"><a href="#sec-eval-x">%eval%</a></emu-xref>
</td>
<td>
<code>eval</code>
</td>
<td>
The <code>eval</code> function (<emu-xref href="#sec-eval-x" id="_ref_73"><a href="#sec-eval-x">18.2.1</a></emu-xref>)
</td>
</tr>
<tr>
<td>
%EvalError%
</td>
<td>
<code>EvalError</code>
</td>
<td>
The <code>EvalError</code> <emu-xref href="#constructor" id="_ref_1066"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-native-error-types-used-in-this-standard-evalerror" id="_ref_74"><a href="#sec-native-error-types-used-in-this-standard-evalerror">19.5.5.1</a></emu-xref>)
</td>
</tr>
<tr>
<td>
%EvalErrorPrototype%
</td>
<td>
<code>EvalError.prototype</code>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1067"><a href="#sec-object-type">data property</a></emu-xref> of %EvalError%
</td>
</tr>
<tr>
<td>
%Float32Array%
</td>
<td>
<code>Float32Array</code>
</td>
<td>
The <code>Float32Array</code> <emu-xref href="#constructor" id="_ref_1068"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-typedarray-objects" id="_ref_75"><a href="#sec-typedarray-objects">22.2</a></emu-xref>)
</td>
</tr>
<tr>
<td>
%Float32ArrayPrototype%
</td>
<td>
<code>Float32Array.prototype</code>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1069"><a href="#sec-object-type">data property</a></emu-xref> of %Float32Array%
</td>
</tr>
<tr>
<td>
%Float64Array%
</td>
<td>
<code>Float64Array</code>
</td>
<td>
The <code>Float64Array</code> <emu-xref href="#constructor" id="_ref_1070"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-typedarray-objects" id="_ref_76"><a href="#sec-typedarray-objects">22.2</a></emu-xref>)
</td>
</tr>
<tr>
<td>
%Float64ArrayPrototype%
</td>
<td>
<code>Float64Array.prototype</code>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1071"><a href="#sec-object-type">data property</a></emu-xref> of %Float64Array%
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-function-constructor" id="_ref_1072"><a href="#sec-function-constructor">%Function%</a></emu-xref>
</td>
<td>
<code>Function</code>
</td>
<td>
The <code>Function</code> <emu-xref href="#constructor" id="_ref_1073"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-function-constructor" id="_ref_77"><a href="#sec-function-constructor">19.2.1</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_1074"><a href="#sec-properties-of-the-function-prototype-object">%FunctionPrototype%</a></emu-xref>
</td>
<td>
<code>Function.prototype</code>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1075"><a href="#sec-object-type">data property</a></emu-xref> of <emu-xref href="#sec-function-constructor" id="_ref_1076"><a href="#sec-function-constructor">%Function%</a></emu-xref>
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-properties-of-the-generatorfunction-prototype-object" id="_ref_1077"><a href="#sec-properties-of-the-generatorfunction-prototype-object">%Generator%</a></emu-xref>
</td>
<td>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1078"><a href="#sec-object-type">data property</a></emu-xref> of <emu-xref href="#sec-generatorfunction-constructor" id="_ref_1079"><a href="#sec-generatorfunction-constructor">%GeneratorFunction%</a></emu-xref>
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-generatorfunction-constructor" id="_ref_1080"><a href="#sec-generatorfunction-constructor">%GeneratorFunction%</a></emu-xref>
</td>
<td>
</td>
<td>
The <emu-xref href="#constructor" id="_ref_1081"><a href="#constructor">constructor</a></emu-xref> of generator objects (<emu-xref href="#sec-generatorfunction-constructor" id="_ref_78"><a href="#sec-generatorfunction-constructor">25.2.1</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-properties-of-generator-prototype" id="_ref_1082"><a href="#sec-properties-of-generator-prototype">%GeneratorPrototype%</a></emu-xref>
</td>
<td>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1083"><a href="#sec-object-type">data property</a></emu-xref> of <emu-xref href="#sec-properties-of-the-generatorfunction-prototype-object" id="_ref_1084"><a href="#sec-properties-of-the-generatorfunction-prototype-object">%Generator%</a></emu-xref>
</td>
</tr>
<tr>
<td>
%Int8Array%
</td>
<td>
<code>Int8Array</code>
</td>
<td>
The <code>Int8Array</code> <emu-xref href="#constructor" id="_ref_1085"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-typedarray-objects" id="_ref_79"><a href="#sec-typedarray-objects">22.2</a></emu-xref>)
</td>
</tr>
<tr>
<td>
%Int8ArrayPrototype%
</td>
<td>
<code>Int8Array.prototype</code>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1086"><a href="#sec-object-type">data property</a></emu-xref> of %Int8Array%
</td>
</tr>
<tr>
<td>
%Int16Array%
</td>
<td>
<code>Int16Array</code>
</td>
<td>
The <code>Int16Array</code> <emu-xref href="#constructor" id="_ref_1087"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-typedarray-objects" id="_ref_80"><a href="#sec-typedarray-objects">22.2</a></emu-xref>)
</td>
</tr>
<tr>
<td>
%Int16ArrayPrototype%
</td>
<td>
<code>Int16Array.prototype</code>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1088"><a href="#sec-object-type">data property</a></emu-xref> of %Int16Array%
</td>
</tr>
<tr>
<td>
%Int32Array%
</td>
<td>
<code>Int32Array</code>
</td>
<td>
The <code>Int32Array</code> <emu-xref href="#constructor" id="_ref_1089"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-typedarray-objects" id="_ref_81"><a href="#sec-typedarray-objects">22.2</a></emu-xref>)
</td>
</tr>
<tr>
<td>
%Int32ArrayPrototype%
</td>
<td>
<code>Int32Array.prototype</code>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1090"><a href="#sec-object-type">data property</a></emu-xref> of %Int32Array%
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-isfinite-number" id="_ref_1091"><a href="#sec-isfinite-number">%isFinite%</a></emu-xref>
</td>
<td>
<code>isFinite</code>
</td>
<td>
The <code>isFinite</code> function (<emu-xref href="#sec-isfinite-number" id="_ref_82"><a href="#sec-isfinite-number">18.2.2</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-isnan-number" id="_ref_1092"><a href="#sec-isnan-number">%isNaN%</a></emu-xref>
</td>
<td>
<code>isNaN</code>
</td>
<td>
The <code>isNaN</code> function (<emu-xref href="#sec-isnan-number" id="_ref_83"><a href="#sec-isnan-number">18.2.3</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-%iteratorprototype%-object" id="_ref_1093"><a href="#sec-%iteratorprototype%-object">%IteratorPrototype%</a></emu-xref>
</td>
<td>
</td>
<td>
An object that all standard built-in iterator objects indirectly inherit from
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-json-object" id="_ref_1094"><a href="#sec-json-object">%JSON%</a></emu-xref>
</td>
<td>
<code>JSON</code>
</td>
<td>
The <code>JSON</code> object (<emu-xref href="#sec-json-object" id="_ref_84"><a href="#sec-json-object">24.5</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-json.parse" id="_ref_1095"><a href="#sec-json.parse">%JSONParse%</a></emu-xref>
</td>
<td>
<code>JSON.parse</code>
</td>
<td>
The initial value of the <code>parse</code> <emu-xref href="#sec-object-type" id="_ref_1096"><a href="#sec-object-type">data property</a></emu-xref> of <emu-xref href="#sec-json-object" id="_ref_1097"><a href="#sec-json-object">%JSON%</a></emu-xref>
</td>
</tr>
<tr>
<td>
%JSONStringify%
</td>
<td>
<code>JSON.stringify</code>
</td>
<td>
The initial value of the <code>stringify</code> <emu-xref href="#sec-object-type" id="_ref_1098"><a href="#sec-object-type">data property</a></emu-xref> of <emu-xref href="#sec-json-object" id="_ref_1099"><a href="#sec-json-object">%JSON%</a></emu-xref>
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-map-constructor" id="_ref_1100"><a href="#sec-map-constructor">%Map%</a></emu-xref>
</td>
<td>
<code>Map</code>
</td>
<td>
The <code>Map</code> <emu-xref href="#constructor" id="_ref_1101"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-map-constructor" id="_ref_85"><a href="#sec-map-constructor">23.1.1</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-%mapiteratorprototype%-object" id="_ref_1102"><a href="#sec-%mapiteratorprototype%-object">%MapIteratorPrototype%</a></emu-xref>
</td>
<td>
</td>
<td>
The prototype of Map iterator objects (<emu-xref href="#sec-map-iterator-objects" id="_ref_86"><a href="#sec-map-iterator-objects">23.1.5</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-properties-of-the-map-prototype-object" id="_ref_1103"><a href="#sec-properties-of-the-map-prototype-object">%MapPrototype%</a></emu-xref>
</td>
<td>
<code>Map.prototype</code>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1104"><a href="#sec-object-type">data property</a></emu-xref> of <emu-xref href="#sec-map-constructor" id="_ref_1105"><a href="#sec-map-constructor">%Map%</a></emu-xref>
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-math-object" id="_ref_1106"><a href="#sec-math-object">%Math%</a></emu-xref>
</td>
<td>
<code>Math</code>
</td>
<td>
The <code>Math</code> object (<emu-xref href="#sec-math-object" id="_ref_87"><a href="#sec-math-object">20.2</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-number-constructor" id="_ref_1107"><a href="#sec-number-constructor">%Number%</a></emu-xref>
</td>
<td>
<code>Number</code>
</td>
<td>
The <code>Number</code> <emu-xref href="#constructor" id="_ref_1108"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-number-constructor" id="_ref_88"><a href="#sec-number-constructor">20.1.1</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-properties-of-the-number-prototype-object" id="_ref_1109"><a href="#sec-properties-of-the-number-prototype-object">%NumberPrototype%</a></emu-xref>
</td>
<td>
<code>Number.prototype</code>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1110"><a href="#sec-object-type">data property</a></emu-xref> of <emu-xref href="#sec-number-constructor" id="_ref_1111"><a href="#sec-number-constructor">%Number%</a></emu-xref>
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-object-constructor" id="_ref_1112"><a href="#sec-object-constructor">%Object%</a></emu-xref>
</td>
<td>
<code>Object</code>
</td>
<td>
The <code>Object</code> <emu-xref href="#constructor" id="_ref_1113"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-object-constructor" id="_ref_89"><a href="#sec-object-constructor">19.1.1</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_1114"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>
</td>
<td>
<code>Object.prototype</code>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1115"><a href="#sec-object-type">data property</a></emu-xref> of <emu-xref href="#sec-object-constructor" id="_ref_1116"><a href="#sec-object-constructor">%Object%</a></emu-xref> (<emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_90"><a href="#sec-properties-of-the-object-prototype-object">19.1.3</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-object.prototype.tostring" id="_ref_1117"><a href="#sec-object.prototype.tostring">%ObjProto_toString%</a></emu-xref>
</td>
<td>
<code>Object.prototype.toString</code>
</td>
<td>
The initial value of the <code>toString</code> <emu-xref href="#sec-object-type" id="_ref_1118"><a href="#sec-object-type">data property</a></emu-xref> of <emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_1119"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref> (<emu-xref href="#sec-object.prototype.tostring" id="_ref_91"><a href="#sec-object.prototype.tostring">19.1.3.6</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-object.prototype.valueof" id="_ref_1120"><a href="#sec-object.prototype.valueof">%ObjProto_valueOf%</a></emu-xref>
</td>
<td>
<code>Object.prototype.valueOf</code>
</td>
<td>
The initial value of the <code>valueOf</code> <emu-xref href="#sec-object-type" id="_ref_1121"><a href="#sec-object-type">data property</a></emu-xref> of <emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_1122"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref> (<emu-xref href="#sec-object.prototype.valueof" id="_ref_92"><a href="#sec-object.prototype.valueof">19.1.3.7</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-parsefloat-string" id="_ref_1123"><a href="#sec-parsefloat-string">%parseFloat%</a></emu-xref>
</td>
<td>
<code>parseFloat</code>
</td>
<td>
The <code>parseFloat</code> function (<emu-xref href="#sec-parsefloat-string" id="_ref_93"><a href="#sec-parsefloat-string">18.2.4</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-parseint-string-radix" id="_ref_1124"><a href="#sec-parseint-string-radix">%parseInt%</a></emu-xref>
</td>
<td>
<code>parseInt</code>
</td>
<td>
The <code>parseInt</code> function (<emu-xref href="#sec-parseint-string-radix" id="_ref_94"><a href="#sec-parseint-string-radix">18.2.5</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-promise-constructor" id="_ref_1125"><a href="#sec-promise-constructor">%Promise%</a></emu-xref>
</td>
<td>
<code>Promise</code>
</td>
<td>
The <code>Promise</code> <emu-xref href="#constructor" id="_ref_1126"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-promise-constructor" id="_ref_95"><a href="#sec-promise-constructor">25.6.3</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-properties-of-the-promise-prototype-object" id="_ref_1127"><a href="#sec-properties-of-the-promise-prototype-object">%PromisePrototype%</a></emu-xref>
</td>
<td>
<code>Promise.prototype</code>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1128"><a href="#sec-object-type">data property</a></emu-xref> of <emu-xref href="#sec-promise-constructor" id="_ref_1129"><a href="#sec-promise-constructor">%Promise%</a></emu-xref>
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-promise.prototype.then" id="_ref_1130"><a href="#sec-promise.prototype.then">%PromiseProto_then%</a></emu-xref>
</td>
<td>
<code>Promise.prototype.then</code>
</td>
<td>
The initial value of the <code>then</code> <emu-xref href="#sec-object-type" id="_ref_1131"><a href="#sec-object-type">data property</a></emu-xref> of <emu-xref href="#sec-properties-of-the-promise-prototype-object" id="_ref_1132"><a href="#sec-properties-of-the-promise-prototype-object">%PromisePrototype%</a></emu-xref> (<emu-xref href="#sec-promise.prototype.then" id="_ref_96"><a href="#sec-promise.prototype.then">25.6.5.4</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-promise.all" id="_ref_1133"><a href="#sec-promise.all">%Promise_all%</a></emu-xref>
</td>
<td>
<code>Promise.all</code>
</td>
<td>
The initial value of the <code>all</code> <emu-xref href="#sec-object-type" id="_ref_1134"><a href="#sec-object-type">data property</a></emu-xref> of <emu-xref href="#sec-promise-constructor" id="_ref_1135"><a href="#sec-promise-constructor">%Promise%</a></emu-xref> (<emu-xref href="#sec-promise.all" id="_ref_97"><a href="#sec-promise.all">25.6.4.1</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-promise.reject" id="_ref_1136"><a href="#sec-promise.reject">%Promise_reject%</a></emu-xref>
</td>
<td>
<code>Promise.reject</code>
</td>
<td>
The initial value of the <code>reject</code> <emu-xref href="#sec-object-type" id="_ref_1137"><a href="#sec-object-type">data property</a></emu-xref> of <emu-xref href="#sec-promise-constructor" id="_ref_1138"><a href="#sec-promise-constructor">%Promise%</a></emu-xref> (<emu-xref href="#sec-promise.reject" id="_ref_98"><a href="#sec-promise.reject">25.6.4.4</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-promise.resolve" id="_ref_1139"><a href="#sec-promise.resolve">%Promise_resolve%</a></emu-xref>
</td>
<td>
<code>Promise.resolve</code>
</td>
<td>
The initial value of the <code>resolve</code> <emu-xref href="#sec-object-type" id="_ref_1140"><a href="#sec-object-type">data property</a></emu-xref> of <emu-xref href="#sec-promise-constructor" id="_ref_1141"><a href="#sec-promise-constructor">%Promise%</a></emu-xref> (<emu-xref href="#sec-promise.resolve" id="_ref_99"><a href="#sec-promise.resolve">25.6.4.5</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-proxy-constructor" id="_ref_1142"><a href="#sec-proxy-constructor">%Proxy%</a></emu-xref>
</td>
<td>
<code>Proxy</code>
</td>
<td>
The <code>Proxy</code> <emu-xref href="#constructor" id="_ref_1143"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-proxy-constructor" id="_ref_100"><a href="#sec-proxy-constructor">26.2.1</a></emu-xref>)
</td>
</tr>
<tr>
<td>
%RangeError%
</td>
<td>
<code>RangeError</code>
</td>
<td>
The <code>RangeError</code> <emu-xref href="#constructor" id="_ref_1144"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-native-error-types-used-in-this-standard-rangeerror" id="_ref_101"><a href="#sec-native-error-types-used-in-this-standard-rangeerror">19.5.5.2</a></emu-xref>)
</td>
</tr>
<tr>
<td>
%RangeErrorPrototype%
</td>
<td>
<code>RangeError.prototype</code>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1145"><a href="#sec-object-type">data property</a></emu-xref> of %RangeError%
</td>
</tr>
<tr>
<td>
%ReferenceError%
</td>
<td>
<code>ReferenceError</code>
</td>
<td>
The <code>ReferenceError</code> <emu-xref href="#constructor" id="_ref_1146"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-native-error-types-used-in-this-standard-referenceerror" id="_ref_102"><a href="#sec-native-error-types-used-in-this-standard-referenceerror">19.5.5.3</a></emu-xref>)
</td>
</tr>
<tr>
<td>
%ReferenceErrorPrototype%
</td>
<td>
<code>ReferenceError.prototype</code>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1147"><a href="#sec-object-type">data property</a></emu-xref> of %ReferenceError%
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-reflect-object" id="_ref_1148"><a href="#sec-reflect-object">%Reflect%</a></emu-xref>
</td>
<td>
<code>Reflect</code>
</td>
<td>
The <code>Reflect</code> object (<emu-xref href="#sec-reflect-object" id="_ref_103"><a href="#sec-reflect-object">26.1</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-regexp-constructor" id="_ref_1149"><a href="#sec-regexp-constructor">%RegExp%</a></emu-xref>
</td>
<td>
<code>RegExp</code>
</td>
<td>
The <code>RegExp</code> <emu-xref href="#constructor" id="_ref_1150"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-regexp-constructor" id="_ref_104"><a href="#sec-regexp-constructor">21.2.3</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-properties-of-the-regexp-prototype-object" id="_ref_1151"><a href="#sec-properties-of-the-regexp-prototype-object">%RegExpPrototype%</a></emu-xref>
</td>
<td>
<code>RegExp.prototype</code>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1152"><a href="#sec-object-type">data property</a></emu-xref> of <emu-xref href="#sec-regexp-constructor" id="_ref_1153"><a href="#sec-regexp-constructor">%RegExp%</a></emu-xref>
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-set-constructor" id="_ref_1154"><a href="#sec-set-constructor">%Set%</a></emu-xref>
</td>
<td>
<code>Set</code>
</td>
<td>
The <code>Set</code> <emu-xref href="#constructor" id="_ref_1155"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-set-constructor" id="_ref_105"><a href="#sec-set-constructor">23.2.1</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-%setiteratorprototype%-object" id="_ref_1156"><a href="#sec-%setiteratorprototype%-object">%SetIteratorPrototype%</a></emu-xref>
</td>
<td>
</td>
<td>
The prototype of Set iterator objects (<emu-xref href="#sec-set-iterator-objects" id="_ref_106"><a href="#sec-set-iterator-objects">23.2.5</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-properties-of-the-set-prototype-object" id="_ref_1157"><a href="#sec-properties-of-the-set-prototype-object">%SetPrototype%</a></emu-xref>
</td>
<td>
<code>Set.prototype</code>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1158"><a href="#sec-object-type">data property</a></emu-xref> of <emu-xref href="#sec-set-constructor" id="_ref_1159"><a href="#sec-set-constructor">%Set%</a></emu-xref>
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-sharedarraybuffer-constructor" id="_ref_1160"><a href="#sec-sharedarraybuffer-constructor">%SharedArrayBuffer%</a></emu-xref>
</td>
<td>
<code>SharedArrayBuffer</code>
</td>
<td>
The <code>SharedArrayBuffer</code> <emu-xref href="#constructor" id="_ref_1161"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-sharedarraybuffer-constructor" id="_ref_107"><a href="#sec-sharedarraybuffer-constructor">24.2.2</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-properties-of-the-sharedarraybuffer-prototype-object" id="_ref_1162"><a href="#sec-properties-of-the-sharedarraybuffer-prototype-object">%SharedArrayBufferPrototype%</a></emu-xref>
</td>
<td>
<code>SharedArrayBuffer.prototype</code>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1163"><a href="#sec-object-type">data property</a></emu-xref> of <emu-xref href="#sec-sharedarraybuffer-constructor" id="_ref_1164"><a href="#sec-sharedarraybuffer-constructor">%SharedArrayBuffer%</a></emu-xref>
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-string-constructor" id="_ref_1165"><a href="#sec-string-constructor">%String%</a></emu-xref>
</td>
<td>
<code>String</code>
</td>
<td>
The <code>String</code> <emu-xref href="#constructor" id="_ref_1166"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-string-constructor" id="_ref_108"><a href="#sec-string-constructor">21.1.1</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-%stringiteratorprototype%-object" id="_ref_1167"><a href="#sec-%stringiteratorprototype%-object">%StringIteratorPrototype%</a></emu-xref>
</td>
<td>
</td>
<td>
The prototype of String iterator objects (<emu-xref href="#sec-string-iterator-objects" id="_ref_109"><a href="#sec-string-iterator-objects">21.1.5</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-properties-of-the-string-prototype-object" id="_ref_1168"><a href="#sec-properties-of-the-string-prototype-object">%StringPrototype%</a></emu-xref>
</td>
<td>
<code>String.prototype</code>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1169"><a href="#sec-object-type">data property</a></emu-xref> of <emu-xref href="#sec-string-constructor" id="_ref_1170"><a href="#sec-string-constructor">%String%</a></emu-xref>
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-symbol-constructor" id="_ref_1171"><a href="#sec-symbol-constructor">%Symbol%</a></emu-xref>
</td>
<td>
<code>Symbol</code>
</td>
<td>
The <code>Symbol</code> <emu-xref href="#constructor" id="_ref_1172"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-symbol-constructor" id="_ref_110"><a href="#sec-symbol-constructor">19.4.1</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-properties-of-the-symbol-prototype-object" id="_ref_1173"><a href="#sec-properties-of-the-symbol-prototype-object">%SymbolPrototype%</a></emu-xref>
</td>
<td>
<code>Symbol.prototype</code>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1174"><a href="#sec-object-type">data property</a></emu-xref> of <emu-xref href="#sec-symbol-constructor" id="_ref_1175"><a href="#sec-symbol-constructor">%Symbol%</a></emu-xref> (<emu-xref href="#sec-properties-of-the-symbol-prototype-object" id="_ref_111"><a href="#sec-properties-of-the-symbol-prototype-object">19.4.3</a></emu-xref>)
</td>
</tr>
<tr>
<td>
%SyntaxError%
</td>
<td>
<code>SyntaxError</code>
</td>
<td>
The <code>SyntaxError</code> <emu-xref href="#constructor" id="_ref_1176"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-native-error-types-used-in-this-standard-syntaxerror" id="_ref_112"><a href="#sec-native-error-types-used-in-this-standard-syntaxerror">19.5.5.4</a></emu-xref>)
</td>
</tr>
<tr>
<td>
%SyntaxErrorPrototype%
</td>
<td>
<code>SyntaxError.prototype</code>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1177"><a href="#sec-object-type">data property</a></emu-xref> of %SyntaxError%
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-%throwtypeerror%" id="_ref_1178"><a href="#sec-%throwtypeerror%">%ThrowTypeError%</a></emu-xref>
</td>
<td>
</td>
<td>
A <emu-xref href="#function-object" id="_ref_1179"><a href="#function-object">function object</a></emu-xref> that unconditionally throws a new instance of %TypeError%
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_1180"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref>
</td>
<td>
</td>
<td>
The super class of all typed Array constructors (<emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_113"><a href="#sec-%typedarray%-intrinsic-object">22.2.1</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-properties-of-the-%typedarrayprototype%-object" id="_ref_1181"><a href="#sec-properties-of-the-%typedarrayprototype%-object">%TypedArrayPrototype%</a></emu-xref>
</td>
<td>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1182"><a href="#sec-object-type">data property</a></emu-xref> of <emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_1183"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref>
</td>
</tr>
<tr>
<td>
%TypeError%
</td>
<td>
<code>TypeError</code>
</td>
<td>
The <code>TypeError</code> <emu-xref href="#constructor" id="_ref_1184"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-native-error-types-used-in-this-standard-typeerror" id="_ref_114"><a href="#sec-native-error-types-used-in-this-standard-typeerror">19.5.5.5</a></emu-xref>)
</td>
</tr>
<tr>
<td>
%TypeErrorPrototype%
</td>
<td>
<code>TypeError.prototype</code>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1185"><a href="#sec-object-type">data property</a></emu-xref> of %TypeError%
</td>
</tr>
<tr>
<td>
%Uint8Array%
</td>
<td>
<code>Uint8Array</code>
</td>
<td>
The <code>Uint8Array</code> <emu-xref href="#constructor" id="_ref_1186"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-typedarray-objects" id="_ref_115"><a href="#sec-typedarray-objects">22.2</a></emu-xref>)
</td>
</tr>
<tr>
<td>
%Uint8ArrayPrototype%
</td>
<td>
<code>Uint8Array.prototype</code>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1187"><a href="#sec-object-type">data property</a></emu-xref> of %Uint8Array%
</td>
</tr>
<tr>
<td>
%Uint8ClampedArray%
</td>
<td>
<code>Uint8ClampedArray</code>
</td>
<td>
The <code>Uint8ClampedArray</code> <emu-xref href="#constructor" id="_ref_1188"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-typedarray-objects" id="_ref_116"><a href="#sec-typedarray-objects">22.2</a></emu-xref>)
</td>
</tr>
<tr>
<td>
%Uint8ClampedArrayPrototype%
</td>
<td>
<code>Uint8ClampedArray.prototype</code>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1189"><a href="#sec-object-type">data property</a></emu-xref> of %Uint8ClampedArray%
</td>
</tr>
<tr>
<td>
%Uint16Array%
</td>
<td>
<code>Uint16Array</code>
</td>
<td>
The <code>Uint16Array</code> <emu-xref href="#constructor" id="_ref_1190"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-typedarray-objects" id="_ref_117"><a href="#sec-typedarray-objects">22.2</a></emu-xref>)
</td>
</tr>
<tr>
<td>
%Uint16ArrayPrototype%
</td>
<td>
<code>Uint16Array.prototype</code>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1191"><a href="#sec-object-type">data property</a></emu-xref> of %Uint16Array%
</td>
</tr>
<tr>
<td>
%Uint32Array%
</td>
<td>
<code>Uint32Array</code>
</td>
<td>
The <code>Uint32Array</code> <emu-xref href="#constructor" id="_ref_1192"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-typedarray-objects" id="_ref_118"><a href="#sec-typedarray-objects">22.2</a></emu-xref>)
</td>
</tr>
<tr>
<td>
%Uint32ArrayPrototype%
</td>
<td>
<code>Uint32Array.prototype</code>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1193"><a href="#sec-object-type">data property</a></emu-xref> of %Uint32Array%
</td>
</tr>
<tr>
<td>
%URIError%
</td>
<td>
<code>URIError</code>
</td>
<td>
The <code>URIError</code> <emu-xref href="#constructor" id="_ref_1194"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-native-error-types-used-in-this-standard-urierror" id="_ref_119"><a href="#sec-native-error-types-used-in-this-standard-urierror">19.5.5.6</a></emu-xref>)
</td>
</tr>
<tr>
<td>
%URIErrorPrototype%
</td>
<td>
<code>URIError.prototype</code>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1195"><a href="#sec-object-type">data property</a></emu-xref> of %URIError%
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-weakmap-constructor" id="_ref_1196"><a href="#sec-weakmap-constructor">%WeakMap%</a></emu-xref>
</td>
<td>
<code>WeakMap</code>
</td>
<td>
The <code>WeakMap</code> <emu-xref href="#constructor" id="_ref_1197"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-weakmap-constructor" id="_ref_120"><a href="#sec-weakmap-constructor">23.3.1</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-properties-of-the-weakmap-prototype-object" id="_ref_1198"><a href="#sec-properties-of-the-weakmap-prototype-object">%WeakMapPrototype%</a></emu-xref>
</td>
<td>
<code>WeakMap.prototype</code>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1199"><a href="#sec-object-type">data property</a></emu-xref> of <emu-xref href="#sec-weakmap-constructor" id="_ref_1200"><a href="#sec-weakmap-constructor">%WeakMap%</a></emu-xref>
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-weakset-constructor" id="_ref_1201"><a href="#sec-weakset-constructor">%WeakSet%</a></emu-xref>
</td>
<td>
<code>WeakSet</code>
</td>
<td>
The <code>WeakSet</code> <emu-xref href="#constructor" id="_ref_1202"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-weakset-constructor" id="_ref_121"><a href="#sec-weakset-constructor">23.4.1</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-properties-of-the-weakset-prototype-object" id="_ref_1203"><a href="#sec-properties-of-the-weakset-prototype-object">%WeakSetPrototype%</a></emu-xref>
</td>
<td>
<code>WeakSet.prototype</code>
</td>
<td>
The initial value of the <code>prototype</code> <emu-xref href="#sec-object-type" id="_ref_1204"><a href="#sec-object-type">data property</a></emu-xref> of <emu-xref href="#sec-weakset-constructor" id="_ref_1205"><a href="#sec-weakset-constructor">%WeakSet%</a></emu-xref>
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-ecmascript-specification-types">
<h1><span class="secnum">6.2</span>ECMAScript Specification Types</h1>
<p>A specification type corresponds to meta-values that are used
within algorithms to describe the semantics of ECMAScript language
constructs and ECMAScript language types. The specification types
include <emu-xref href="#sec-reference-specification-type" id="_ref_1206"><a href="#sec-reference-specification-type">Reference</a></emu-xref>, <emu-xref href="#sec-list-and-record-specification-type" id="_ref_1207"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>, <emu-xref aoid="Completion" id="_ref_1208"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>, <emu-xref href="#sec-property-descriptor-specification-type" id="_ref_1209"><a href="#sec-property-descriptor-specification-type">Property Descriptor</a></emu-xref>, <emu-xref href="#sec-lexical-environments" id="_ref_1210"><a href="#sec-lexical-environments">Lexical Environment</a></emu-xref>, <emu-xref href="#sec-environment-records" id="_ref_1211"><a href="#sec-environment-records">Environment Record</a></emu-xref>, and <emu-xref href="#sec-data-blocks" id="_ref_1212"><a href="#sec-data-blocks">Data Block</a></emu-xref>.
Specification type values are specification artefacts that do not
necessarily correspond to any specific entity within an ECMAScript
implementation. Specification type values may be used to describe
intermediate results of ECMAScript expression evaluation but such values
cannot be stored as properties of objects or values of ECMAScript
language variables.</p>
<emu-clause id="sec-list-and-record-specification-type">
<h1><span class="secnum">6.2.1</span>The List and Record Specification Types</h1>
<p>The <dfn>List</dfn> type is used to explain the evaluation of argument lists (see <emu-xref href="#sec-argument-lists" id="_ref_122"><a href="#sec-argument-lists">12.3.6</a></emu-xref>) in <code>new</code>
expressions, in function calls, and in other algorithms where a simple
ordered list of values is needed. Values of the List type are simply
ordered sequences of list elements containing the individual values.
These sequences may be of any length. The elements of a list may be
randomly accessed using 0-origin indices. For notational convenience an
array-like syntax can be used to access List elements. For example, <var>arguments</var>[2] is shorthand for saying the 3<sup>rd</sup> element of the List <var>arguments</var>.</p>
<p>For notational convenience within this specification, a literal
syntax can be used to express a new List value. For example, « 1, 2 »
defines a List value that has two elements each of which is initialized
to a specific value. A new empty List can be expressed as « ».</p>
<p>The <dfn>Record</dfn> type is used to describe data
aggregations within the algorithms of this specification. A Record type
value consists of one or more named fields. The value of each field is
either an ECMAScript value or an abstract value represented by a name
associated with the Record type. Field names are always enclosed in
double brackets, for example [[Value]].</p>
<p>For notational convenience within this specification, an object
literal-like syntax can be used to express a Record value. For example,
{ [[Field1]]: 42, [[Field2]]: <emu-val>false</emu-val>, [[Field3]]: <emu-const>empty</emu-const>
} defines a Record value that has three fields, each of which is
initialized to a specific value. Field name order is not significant.
Any fields that are not explicitly listed are considered to be absent.</p>
<p>In specification text and algorithms, dot notation may be used
to refer to a specific field of a Record value. For example, if R is the
record shown in the previous paragraph then R.[[Field2]] is shorthand
for “the field of R named [[Field2]]”.</p>
<p>Schema for commonly used Record field combinations may be
named, and that name may be used as a prefix to a literal Record value
to identify the specific kind of aggregations that is being described.
For example: PropertyDescriptor { [[Value]]: 42, [[Writable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-set-and-relation-specification-type">
<h1><span class="secnum">6.2.2</span>The Set and Relation Specification Types</h1>
<p>The <dfn>Set</dfn> type is used to explain a collection of unordered elements for use in the <emu-xref href="#sec-memory-model" id="_ref_1213"><a href="#sec-memory-model">memory model</a></emu-xref>.
Values of the Set type are simple collections of elements, where no
element appears more than once. Elements may be added to and removed
from Sets. Sets may be unioned, intersected, or subtracted from each
other.</p>
<p>The <dfn>Relation</dfn> type is used to explain constraints on
Sets. Values of the Relation type are Sets of ordered pairs of values
from its value domain. For example, a Relation on events is a set of
ordered pairs of events. For a Relation <var>R</var> and two values <var>a</var> and <var>b</var> in the value domain of <var>R</var>, <var>a</var> <var>R</var> <var>b</var> is shorthand for saying the ordered pair (<var>a</var>, <var>b</var>) is a member of <var>R</var>. A Relation is least with respect to some conditions when it is the smallest Relation that satisfies those conditions.</p>
<p>A <dfn>strict partial order</dfn> is a Relation value <var>R</var> that satisfies the following.</p>
<ul>
<li>
<p>For all <var>a</var>, <var>b</var>, and <var>c</var> in <var>R</var>'s domain:</p>
<ul>
<li>It is not the case that <var>a</var> <var>R</var> <var>a</var>, and</li>
<li>If <var>a</var> <var>R</var> <var>b</var> and <var>b</var> <var>R</var> <var>c</var>, then <var>a</var> <var>R</var> <var>c</var>.</li>
</ul>
</li>
</ul>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>The two properties above are called, in order, irreflexivity and transitivity.</p>
</div></emu-note>
<p>A <dfn>strict total order</dfn> is a Relation value <var>R</var> that satisfies the following.</p>
<ul>
<li>
<p>For all <var>a</var>, <var>b</var>, and <var>c</var> in <var>R</var>'s domain:</p>
<ul>
<li><var>a</var> is identical to <var>b</var> or <var>a</var> <var>R</var> <var>b</var> or <var>b</var> <var>R</var> <var>a</var>, and</li>
<li>It is not the case that <var>a</var> <var>R</var> <var>a</var>, and</li>
<li>If <var>a</var> <var>R</var> <var>b</var> and <var>b</var> <var>R</var> <var>c</var>, then <var>a</var> <var>R</var> <var>c</var>.</li>
</ul>
</li>
</ul>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The three properties above are called, in order, totality, irreflexivity, and transitivity.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-completion-record-specification-type" aoid="Completion">
<h1><span class="secnum">6.2.3</span>The Completion Record Specification Type</h1>
<p>The Completion type is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_1214"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> used to explain the runtime propagation of values and control flow such as the behaviour of statements (<code>break</code>, <code>continue</code>, <code>return</code> and <code>throw</code>) that perform nonlocal transfers of control.</p>
<p>Values of the Completion type are <emu-xref href="#sec-list-and-record-specification-type" id="_ref_1215"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> values whose fields are defined as by <emu-xref href="#table-8" id="_ref_123"><a href="#table-8">Table 8</a></emu-xref>. Such values are referred to as <dfn>Completion Record</dfn>s.</p>
<emu-table id="table-8" caption="Completion Record Fields"><figure><figcaption>Table 8: <emu-xref href="#sec-completion-record-specification-type" id="_ref_1216"><a href="#sec-completion-record-specification-type">Completion Record</a></emu-xref> Fields</figcaption>
<table>
<tbody>
<tr>
<th>
Field Name
</th>
<th>
Value
</th>
<th>
Meaning
</th>
</tr>
<tr>
<td>
[[Type]]
</td>
<td>
One of <emu-const>normal</emu-const>, <emu-const>break</emu-const>, <emu-const>continue</emu-const>, <emu-const>return</emu-const>, or <emu-const>throw</emu-const>
</td>
<td>
The type of completion that occurred.
</td>
</tr>
<tr>
<td>
[[Value]]
</td>
<td>
any <emu-xref href="#sec-ecmascript-language-types" id="_ref_1217"><a href="#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref> or <emu-const>empty</emu-const>
</td>
<td>
The value that was produced.
</td>
</tr>
<tr>
<td>
[[Target]]
</td>
<td>
any ECMAScript string or <emu-const>empty</emu-const>
</td>
<td>
The target label for directed control transfers.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<p>The term “<dfn>abrupt completion</dfn>” refers to any completion with a [[Type]] value other than <emu-const>normal</emu-const>.</p>
<emu-clause id="await" aoid="Await">
<h1><span class="secnum">6.2.3.1</span>Await</h1>
<p>Algorithm steps that say</p>
<emu-alg><ol><li>Let <var>completion</var> be <emu-xref aoid="Await" id="_ref_1218"><a href="#await">Await</a></emu-xref>(<var>value</var>).
</li></ol></emu-alg>
<p>mean the same thing as:</p>
<emu-alg><ol><li>Let <var>asyncContext</var> be the <emu-xref href="#running-execution-context" id="_ref_1219"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Let <var>promise</var> be ?&nbsp;<emu-xref aoid="PromiseResolve" id="_ref_1220"><a href="#sec-promise-resolve">PromiseResolve</a></emu-xref>(<emu-xref href="#sec-promise-constructor" id="_ref_1221"><a href="#sec-promise-constructor">%Promise%</a></emu-xref>, « <var>value</var> »).</li><li>Let <var>stepsFulfilled</var> be the algorithm steps defined in <emu-xref href="#await-fulfilled" title="" id="_ref_124"><a href="#await-fulfilled">Await Fulfilled Functions</a></emu-xref>.</li><li>Let <var>onFulfilled</var> be <emu-xref aoid="CreateBuiltinFunction" id="_ref_1222"><a href="#sec-createbuiltinfunction">CreateBuiltinFunction</a></emu-xref>(<var>stepsFulfilled</var>, « [[AsyncContext]] »).</li><li>Set <var>onFulfilled</var>.[[AsyncContext]] to <var>asyncContext</var>.</li><li>Let <var>stepsRejected</var> be the algorithm steps defined in <emu-xref href="#await-rejected" title="" id="_ref_125"><a href="#await-rejected">Await Rejected Functions</a></emu-xref>.</li><li>Let <var>onRejected</var> be <emu-xref aoid="CreateBuiltinFunction" id="_ref_1223"><a href="#sec-createbuiltinfunction">CreateBuiltinFunction</a></emu-xref>(<var>stepsRejected</var>, « [[AsyncContext]] »).</li><li>Set <var>onRejected</var>.[[AsyncContext]] to <var>asyncContext</var>.</li><li>Perform !&nbsp;<emu-xref aoid="PerformPromiseThen" id="_ref_1224"><a href="#sec-performpromisethen">PerformPromiseThen</a></emu-xref>(<var>promise</var>, <var>onFulfilled</var>, <var>onRejected</var>).</li><li>Remove <var>asyncContext</var> from the <emu-xref href="#execution-context-stack" id="_ref_1225"><a href="#execution-context-stack">execution context stack</a></emu-xref> and restore the <emu-xref href="#sec-execution-contexts" id="_ref_1226"><a href="#sec-execution-contexts">execution context</a></emu-xref> that is at the top of the <emu-xref href="#execution-context-stack" id="_ref_1227"><a href="#execution-context-stack">execution context stack</a></emu-xref> as the <emu-xref href="#running-execution-context" id="_ref_1228"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Set the code evaluation state of <var>asyncContext</var> such that when evaluation is resumed with a <emu-xref aoid="Completion" id="_ref_1229"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref> <var>completion</var>, the following steps of the algorithm that invoked <emu-xref aoid="Await" id="_ref_1230"><a href="#await">Await</a></emu-xref> will be performed, with <var>completion</var> available.</li><li>Return.</li><li>NOTE: This returns to the evaluation of the operation that had most previously resumed evaluation of <var>asyncContext</var>.
</li></ol></emu-alg>
<p>where all variables in the above steps, with the exception of <var>completion</var>, are ephemeral and visible only in the steps pertaining to Await.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Await can be combined with the <code>?</code> and <code>!</code> prefixes, so that for example</p>
<emu-alg><ol><li>Let <var>result</var> be ?&nbsp;<emu-xref aoid="Await" id="_ref_1231"><a href="#await">Await</a></emu-xref>(<var>value</var>).
</li></ol></emu-alg>
<p>means the same thing as:</p>
<emu-alg><ol><li>Let <var>result</var> be <emu-xref aoid="Await" id="_ref_1232"><a href="#await">Await</a></emu-xref>(<var>value</var>).</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_1233"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>result</var>).
</li></ol></emu-alg>
</div></emu-note>
<emu-clause id="await-fulfilled">
<h1><span class="secnum">6.2.3.1.1</span>Await Fulfilled Functions</h1>
<p>An <emu-xref aoid="Await" id="_ref_1234"><a href="#await">Await</a></emu-xref> fulfilled function is an anonymous built-in function that is used as part of the <emu-xref aoid="Await" id="_ref_1235"><a href="#await">Await</a></emu-xref> specification device to deliver the promise fulfillment value to the caller as a normal completion. Each <emu-xref aoid="Await" id="_ref_1236"><a href="#await">Await</a></emu-xref> fulfilled function has an [[AsyncContext]] internal slot.</p>
<p>When an <emu-xref aoid="Await" id="_ref_1237"><a href="#await">Await</a></emu-xref> fulfilled function is called with argument <var>value</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>F</var> be the <emu-xref href="#active-function-object" id="_ref_1238"><a href="#active-function-object">active function object</a></emu-xref>.</li><li>Let <var>asyncContext</var> be <var>F</var>.[[AsyncContext]].</li><li>Let <var>prevContext</var> be the <emu-xref href="#running-execution-context" id="_ref_1239"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li><emu-xref aoid="Suspend" id="_ref_1240"><a href="#sec-suspend">Suspend</a></emu-xref> <var>prevContext</var>.</li><li>Push <var>asyncContext</var> onto the <emu-xref href="#execution-context-stack" id="_ref_1241"><a href="#execution-context-stack">execution context stack</a></emu-xref>; <var>asyncContext</var> is now the <emu-xref href="#running-execution-context" id="_ref_1242"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Resume the suspended evaluation of <var>asyncContext</var> using <emu-xref aoid="NormalCompletion" id="_ref_1243"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<var>value</var>) as the result of the operation that suspended it.</li><li><emu-xref href="#assert" id="_ref_1244"><a href="#assert">Assert</a></emu-xref>: When we reach this step, <var>asyncContext</var> has already been removed from the <emu-xref href="#execution-context-stack" id="_ref_1245"><a href="#execution-context-stack">execution context stack</a></emu-xref> and <var>prevContext</var> is the currently <emu-xref href="#running-execution-context" id="_ref_1246"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Return <emu-val>undefined</emu-val>.
</li></ol></emu-alg>
<p>The <code>"length"</code> property of an <emu-xref aoid="Await" id="_ref_1247"><a href="#await">Await</a></emu-xref> fulfilled function is 1.</p>
</emu-clause>
<emu-clause id="await-rejected">
<h1><span class="secnum">6.2.3.1.2</span>Await Rejected Functions</h1>
<p>An <emu-xref aoid="Await" id="_ref_1248"><a href="#await">Await</a></emu-xref> rejected function is an anonymous built-in function that is used as part of the <emu-xref aoid="Await" id="_ref_1249"><a href="#await">Await</a></emu-xref> specification device to deliver the promise rejection reason to the caller as an abrupt throw completion. Each <emu-xref aoid="Await" id="_ref_1250"><a href="#await">Await</a></emu-xref> rejected function has an [[AsyncContext]] internal slot.</p>
<p>When an <emu-xref aoid="Await" id="_ref_1251"><a href="#await">Await</a></emu-xref> rejected function is called with argument <var>reason</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>F</var> be the <emu-xref href="#active-function-object" id="_ref_1252"><a href="#active-function-object">active function object</a></emu-xref>.</li><li>Let <var>asyncContext</var> be <var>F</var>.[[AsyncContext]].</li><li>Let <var>prevContext</var> be the <emu-xref href="#running-execution-context" id="_ref_1253"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li><emu-xref aoid="Suspend" id="_ref_1254"><a href="#sec-suspend">Suspend</a></emu-xref> <var>prevContext</var>.</li><li>Push <var>asyncContext</var> onto the <emu-xref href="#execution-context-stack" id="_ref_1255"><a href="#execution-context-stack">execution context stack</a></emu-xref>; <var>asyncContext</var> is now the <emu-xref href="#running-execution-context" id="_ref_1256"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Resume the suspended evaluation of <var>asyncContext</var> using <emu-xref aoid="ThrowCompletion" id="_ref_1257"><a href="#sec-throwcompletion">ThrowCompletion</a></emu-xref>(<var>reason</var>) as the result of the operation that suspended it.</li><li><emu-xref href="#assert" id="_ref_1258"><a href="#assert">Assert</a></emu-xref>: When we reach this step, <var>asyncContext</var> has already been removed from the <emu-xref href="#execution-context-stack" id="_ref_1259"><a href="#execution-context-stack">execution context stack</a></emu-xref> and <var>prevContext</var> is the currently <emu-xref href="#running-execution-context" id="_ref_1260"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Return <emu-val>undefined</emu-val>.
</li></ol></emu-alg>
<p>The <code>"length"</code> property of an <emu-xref aoid="Await" id="_ref_1261"><a href="#await">Await</a></emu-xref> rejected function is 1.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-normalcompletion" aoid="NormalCompletion">
<h1><span class="secnum">6.2.3.2</span>NormalCompletion</h1>
<p>The abstract operation NormalCompletion with a single <var>argument</var>, such as:</p>
<emu-alg><ol><li>Return <emu-xref aoid="NormalCompletion" id="_ref_1262"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<var>argument</var>).
</li></ol></emu-alg>
<p>Is a shorthand that is defined as follows:</p>
<emu-alg><ol><li>Return <emu-xref aoid="Completion" id="_ref_1263"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref> { [[Type]]: <emu-const>normal</emu-const>, [[Value]]: <var>argument</var>, [[Target]]: <emu-const>empty</emu-const> }.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-throwcompletion" aoid="ThrowCompletion">
<h1><span class="secnum">6.2.3.3</span>ThrowCompletion</h1>
<p>The abstract operation ThrowCompletion with a single <var>argument</var>, such as:</p>
<emu-alg><ol><li>Return <emu-xref aoid="ThrowCompletion" id="_ref_1264"><a href="#sec-throwcompletion">ThrowCompletion</a></emu-xref>(<var>argument</var>).
</li></ol></emu-alg>
<p>Is a shorthand that is defined as follows:</p>
<emu-alg><ol><li>Return <emu-xref aoid="Completion" id="_ref_1265"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref> { [[Type]]: <emu-const>throw</emu-const>, [[Value]]: <var>argument</var>, [[Target]]: <emu-const>empty</emu-const> }.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-updateempty" aoid="UpdateEmpty">
<h1><span class="secnum">6.2.3.4</span>UpdateEmpty ( <var>completionRecord</var>, <var>value</var> )</h1>
<p>The abstract operation UpdateEmpty with arguments <var>completionRecord</var> and <var>value</var> performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1266"><a href="#assert">Assert</a></emu-xref>: If <var>completionRecord</var>.[[Type]] is either <emu-const>return</emu-const> or <emu-const>throw</emu-const>, then <var>completionRecord</var>.[[Value]] is not <emu-const>empty</emu-const>.</li><li>If <var>completionRecord</var>.[[Value]] is not <emu-const>empty</emu-const>, return <emu-xref aoid="Completion" id="_ref_1267"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>completionRecord</var>).</li><li>Return <emu-xref aoid="Completion" id="_ref_1268"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref> { [[Type]]: <var>completionRecord</var>.[[Type]], [[Value]]: <var>value</var>, [[Target]]: <var>completionRecord</var>.[[Target]] }.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-reference-specification-type">
<h1><span class="secnum">6.2.4</span>The Reference Specification Type</h1>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The Reference type is used to explain the behaviour of such operators as <code>delete</code>, <code>typeof</code>, the assignment operators, the <code>super</code> keyword and other language features. For example, the left-hand operand of an assignment is expected to produce a reference.</p>
</div></emu-note>
<p>A <dfn>Reference</dfn> is a resolved name or property binding.
A Reference consists of three components, the base value component, the
referenced name component, and the Boolean-valued strict reference
flag. The base value component is either <emu-val>undefined</emu-val>, an Object, a Boolean, a String, a Symbol, a Number, or an <emu-xref href="#sec-environment-records" id="_ref_1269"><a href="#sec-environment-records">Environment Record</a></emu-xref>. A base value component of <emu-val>undefined</emu-val> indicates that the Reference could not be resolved to a binding. The referenced name component is a String or Symbol value.</p>
<p>A <dfn id="super-reference">Super Reference</dfn> is a Reference that is used to represent a name binding that was expressed using the super keyword. A <emu-xref href="#super-reference" id="_ref_1270"><a href="#super-reference">Super Reference</a></emu-xref> has an additional thisValue component, and its base value component will never be an <emu-xref href="#sec-environment-records" id="_ref_1271"><a href="#sec-environment-records">Environment Record</a></emu-xref>.</p>
<p>The following <emu-xref href="#sec-algorithm-conventions-abstract-operations" id="_ref_1272"><a href="#sec-algorithm-conventions-abstract-operations">abstract operations</a></emu-xref> are used in this specification to operate on references:</p>
<emu-clause id="sec-getbase" aoid="GetBase" oldids="ao-getbase">
<span id="ao-getbase"></span><h1><span class="secnum">6.2.4.1</span>GetBase ( <var>V</var> )</h1>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1273"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1274"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>V</var>) is <emu-xref href="#sec-reference-specification-type" id="_ref_1275"><a href="#sec-reference-specification-type">Reference</a></emu-xref>.</li><li>Return the base value component of <var>V</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-getreferencedname" aoid="GetReferencedName" oldids="ao-getreferencedname">
<span id="ao-getreferencedname"></span><h1><span class="secnum">6.2.4.2</span>GetReferencedName ( <var>V</var> )</h1>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1276"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1277"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>V</var>) is <emu-xref href="#sec-reference-specification-type" id="_ref_1278"><a href="#sec-reference-specification-type">Reference</a></emu-xref>.</li><li>Return the referenced name component of <var>V</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-isstrictreference" aoid="IsStrictReference" oldids="ao-isstrictreference">
<span id="ao-isstrictreference"></span><h1><span class="secnum">6.2.4.3</span>IsStrictReference ( <var>V</var> )</h1>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1279"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1280"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>V</var>) is <emu-xref href="#sec-reference-specification-type" id="_ref_1281"><a href="#sec-reference-specification-type">Reference</a></emu-xref>.</li><li>Return the strict reference flag of <var>V</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-hasprimitivebase" aoid="HasPrimitiveBase" oldids="ao-hasprimitivebase">
<span id="ao-hasprimitivebase"></span><h1><span class="secnum">6.2.4.4</span>HasPrimitiveBase ( <var>V</var> )</h1>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1282"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1283"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>V</var>) is <emu-xref href="#sec-reference-specification-type" id="_ref_1284"><a href="#sec-reference-specification-type">Reference</a></emu-xref>.</li><li>If <emu-xref aoid="Type" id="_ref_1285"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>V</var>'s base value component) is Boolean, String, Symbol, or Number, return <emu-val>true</emu-val>; otherwise return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-ispropertyreference" aoid="IsPropertyReference" oldids="ao-ispropertyreference">
<span id="ao-ispropertyreference"></span><h1><span class="secnum">6.2.4.5</span>IsPropertyReference ( <var>V</var> )</h1>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1286"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1287"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>V</var>) is <emu-xref href="#sec-reference-specification-type" id="_ref_1288"><a href="#sec-reference-specification-type">Reference</a></emu-xref>.</li><li>If either the base value component of <var>V</var> is an Object or <emu-xref aoid="HasPrimitiveBase" id="_ref_1289"><a href="#sec-hasprimitivebase">HasPrimitiveBase</a></emu-xref>(<var>V</var>) is <emu-val>true</emu-val>, return <emu-val>true</emu-val>; otherwise return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-isunresolvablereference" aoid="IsUnresolvableReference" oldids="ao-isunresolvablereference">
<span id="ao-isunresolvablereference"></span><h1><span class="secnum">6.2.4.6</span>IsUnresolvableReference ( <var>V</var> )</h1>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1290"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1291"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>V</var>) is <emu-xref href="#sec-reference-specification-type" id="_ref_1292"><a href="#sec-reference-specification-type">Reference</a></emu-xref>.</li><li>If the base value component of <var>V</var> is <emu-val>undefined</emu-val>, return <emu-val>true</emu-val>; otherwise return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-issuperreference" aoid="IsSuperReference" oldids="ao-issuperreference">
<span id="ao-issuperreference"></span><h1><span class="secnum">6.2.4.7</span>IsSuperReference ( <var>V</var> )</h1>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1293"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1294"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>V</var>) is <emu-xref href="#sec-reference-specification-type" id="_ref_1295"><a href="#sec-reference-specification-type">Reference</a></emu-xref>.</li><li>If <var>V</var> has a thisValue component, return <emu-val>true</emu-val>; otherwise return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-getvalue" aoid="GetValue">
<h1><span class="secnum">6.2.4.8</span>GetValue ( <var>V</var> )</h1>
<emu-alg><ol><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_1296"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>V</var>).</li><li>If <emu-xref aoid="Type" id="_ref_1297"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>V</var>) is not <emu-xref href="#sec-reference-specification-type" id="_ref_1298"><a href="#sec-reference-specification-type">Reference</a></emu-xref>, return <var>V</var>.</li><li>Let <var>base</var> be <emu-xref aoid="GetBase" id="_ref_1299"><a href="#sec-getbase">GetBase</a></emu-xref>(<var>V</var>).</li><li>If <emu-xref aoid="IsUnresolvableReference" id="_ref_1300"><a href="#sec-isunresolvablereference">IsUnresolvableReference</a></emu-xref>(<var>V</var>) is <emu-val>true</emu-val>, throw a <emu-val>ReferenceError</emu-val> exception.</li><li>If <emu-xref aoid="IsPropertyReference" id="_ref_1301"><a href="#sec-ispropertyreference">IsPropertyReference</a></emu-xref>(<var>V</var>) is <emu-val>true</emu-val>, then<ol><li>If <emu-xref aoid="HasPrimitiveBase" id="_ref_1302"><a href="#sec-hasprimitivebase">HasPrimitiveBase</a></emu-xref>(<var>V</var>) is <emu-val>true</emu-val>, then<ol><li><emu-xref href="#assert" id="_ref_1303"><a href="#assert">Assert</a></emu-xref>: In this case, <var>base</var> will never be <emu-val>undefined</emu-val> or <emu-val>null</emu-val>.</li><li>Set <var>base</var> to !&nbsp;<emu-xref aoid="ToObject" id="_ref_1304"><a href="#sec-toobject">ToObject</a></emu-xref>(<var>base</var>).</li></ol></li><li>Return ? <var>base</var>.[[Get]](<emu-xref aoid="GetReferencedName" id="_ref_1305"><a href="#sec-getreferencedname">GetReferencedName</a></emu-xref>(<var>V</var>), <emu-xref aoid="GetThisValue" id="_ref_1306"><a href="#sec-getthisvalue">GetThisValue</a></emu-xref>(<var>V</var>)).</li></ol></li><li>Else <var>base</var> must be an <emu-xref href="#sec-environment-records" id="_ref_1307"><a href="#sec-environment-records">Environment Record</a></emu-xref>,<ol><li>Return ? <var>base</var>.GetBindingValue(<emu-xref aoid="GetReferencedName" id="_ref_1308"><a href="#sec-getreferencedname">GetReferencedName</a></emu-xref>(<var>V</var>), <emu-xref aoid="IsStrictReference" id="_ref_1309"><a href="#sec-isstrictreference">IsStrictReference</a></emu-xref>(<var>V</var>)) (see <emu-xref href="#sec-environment-records" id="_ref_126"><a href="#sec-environment-records">8.1.1</a></emu-xref>).
</li></ol></li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The object that may be created in step 5.a.ii is not
accessible outside of the above abstract operation and the ordinary
object [[Get]] internal method. An implementation might choose to avoid
the actual creation of the object.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-putvalue" aoid="PutValue">
<h1><span class="secnum">6.2.4.9</span>PutValue ( <var>V</var>, <var>W</var> )</h1>
<emu-alg><ol><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_1310"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>V</var>).</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_1311"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>W</var>).</li><li>If <emu-xref aoid="Type" id="_ref_1312"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>V</var>) is not <emu-xref href="#sec-reference-specification-type" id="_ref_1313"><a href="#sec-reference-specification-type">Reference</a></emu-xref>, throw a <emu-val>ReferenceError</emu-val> exception.</li><li>Let <var>base</var> be <emu-xref aoid="GetBase" id="_ref_1314"><a href="#sec-getbase">GetBase</a></emu-xref>(<var>V</var>).</li><li>If <emu-xref aoid="IsUnresolvableReference" id="_ref_1315"><a href="#sec-isunresolvablereference">IsUnresolvableReference</a></emu-xref>(<var>V</var>) is <emu-val>true</emu-val>, then<ol><li>If <emu-xref aoid="IsStrictReference" id="_ref_1316"><a href="#sec-isstrictreference">IsStrictReference</a></emu-xref>(<var>V</var>) is <emu-val>true</emu-val>, then<ol><li>Throw a <emu-val>ReferenceError</emu-val> exception.</li></ol></li><li>Let <var>globalObj</var> be <emu-xref aoid="GetGlobalObject" id="_ref_1317"><a href="#sec-getglobalobject">GetGlobalObject</a></emu-xref>().</li><li>Return ?&nbsp;<emu-xref aoid="Set" id="_ref_1318"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>globalObj</var>, <emu-xref aoid="GetReferencedName" id="_ref_1319"><a href="#sec-getreferencedname">GetReferencedName</a></emu-xref>(<var>V</var>), <var>W</var>, <emu-val>false</emu-val>).</li></ol></li><li>Else if <emu-xref aoid="IsPropertyReference" id="_ref_1320"><a href="#sec-ispropertyreference">IsPropertyReference</a></emu-xref>(<var>V</var>) is <emu-val>true</emu-val>, then<ol><li>If <emu-xref aoid="HasPrimitiveBase" id="_ref_1321"><a href="#sec-hasprimitivebase">HasPrimitiveBase</a></emu-xref>(<var>V</var>) is <emu-val>true</emu-val>, then<ol><li><emu-xref href="#assert" id="_ref_1322"><a href="#assert">Assert</a></emu-xref>: In this case, <var>base</var> will never be <emu-val>undefined</emu-val> or <emu-val>null</emu-val>.</li><li>Set <var>base</var> to !&nbsp;<emu-xref aoid="ToObject" id="_ref_1323"><a href="#sec-toobject">ToObject</a></emu-xref>(<var>base</var>).</li></ol></li><li>Let <var>succeeded</var> be ? <var>base</var>.[[Set]](<emu-xref aoid="GetReferencedName" id="_ref_1324"><a href="#sec-getreferencedname">GetReferencedName</a></emu-xref>(<var>V</var>), <var>W</var>, <emu-xref aoid="GetThisValue" id="_ref_1325"><a href="#sec-getthisvalue">GetThisValue</a></emu-xref>(<var>V</var>)).</li><li>If <var>succeeded</var> is <emu-val>false</emu-val> and <emu-xref aoid="IsStrictReference" id="_ref_1326"><a href="#sec-isstrictreference">IsStrictReference</a></emu-xref>(<var>V</var>) is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return.</li></ol></li><li>Else <var>base</var> must be an <emu-xref href="#sec-environment-records" id="_ref_1327"><a href="#sec-environment-records">Environment Record</a></emu-xref>,<ol><li>Return ? <var>base</var>.SetMutableBinding(<emu-xref aoid="GetReferencedName" id="_ref_1328"><a href="#sec-getreferencedname">GetReferencedName</a></emu-xref>(<var>V</var>), <var>W</var>, <emu-xref aoid="IsStrictReference" id="_ref_1329"><a href="#sec-isstrictreference">IsStrictReference</a></emu-xref>(<var>V</var>)) (see <emu-xref href="#sec-environment-records" id="_ref_127"><a href="#sec-environment-records">8.1.1</a></emu-xref>).
</li></ol></li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The object that may be created in step 6.a.ii is not
accessible outside of the above algorithm and the ordinary object
[[Set]] internal method. An implementation might choose to avoid the
actual creation of that object.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-getthisvalue" aoid="GetThisValue">
<h1><span class="secnum">6.2.4.10</span>GetThisValue ( <var>V</var> )</h1>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1330"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPropertyReference" id="_ref_1331"><a href="#sec-ispropertyreference">IsPropertyReference</a></emu-xref>(<var>V</var>) is <emu-val>true</emu-val>.</li><li>If <emu-xref aoid="IsSuperReference" id="_ref_1332"><a href="#sec-issuperreference">IsSuperReference</a></emu-xref>(<var>V</var>) is <emu-val>true</emu-val>, then<ol><li>Return the value of the thisValue component of the reference <var>V</var>.</li></ol></li><li>Return <emu-xref aoid="GetBase" id="_ref_1333"><a href="#sec-getbase">GetBase</a></emu-xref>(<var>V</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-initializereferencedbinding" aoid="InitializeReferencedBinding">
<h1><span class="secnum">6.2.4.11</span>InitializeReferencedBinding ( <var>V</var>, <var>W</var> )</h1>
<emu-alg><ol><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_1334"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>V</var>).</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_1335"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>W</var>).</li><li><emu-xref href="#assert" id="_ref_1336"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1337"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>V</var>) is <emu-xref href="#sec-reference-specification-type" id="_ref_1338"><a href="#sec-reference-specification-type">Reference</a></emu-xref>.</li><li><emu-xref href="#assert" id="_ref_1339"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsUnresolvableReference" id="_ref_1340"><a href="#sec-isunresolvablereference">IsUnresolvableReference</a></emu-xref>(<var>V</var>) is <emu-val>false</emu-val>.</li><li>Let <var>base</var> be <emu-xref aoid="GetBase" id="_ref_1341"><a href="#sec-getbase">GetBase</a></emu-xref>(<var>V</var>).</li><li><emu-xref href="#assert" id="_ref_1342"><a href="#assert">Assert</a></emu-xref>: <var>base</var> is an <emu-xref href="#sec-environment-records" id="_ref_1343"><a href="#sec-environment-records">Environment Record</a></emu-xref>.</li><li>Return <var>base</var>.InitializeBinding(<emu-xref aoid="GetReferencedName" id="_ref_1344"><a href="#sec-getreferencedname">GetReferencedName</a></emu-xref>(<var>V</var>), <var>W</var>).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-property-descriptor-specification-type">
<h1><span class="secnum">6.2.5</span>The Property Descriptor Specification Type</h1>
<p>The <dfn>Property Descriptor</dfn> type is used to explain the
manipulation and reification of Object property attributes. Values of
the Property Descriptor type are Records. Each field's name is an
attribute name and its value is a corresponding attribute value as
specified in <emu-xref href="#sec-property-attributes" id="_ref_128"><a href="#sec-property-attributes">6.1.7.1</a></emu-xref>.
In addition, any field may be present or absent. The schema name used
within this specification to tag literal descriptions of Property
Descriptor records is “PropertyDescriptor”.</p>
<p>Property Descriptor values may be further classified as data
Property Descriptors and accessor Property Descriptors based upon the
existence or use of certain fields. A data Property Descriptor is one
that includes any fields named either [[Value]] or [[Writable]]. An
accessor Property Descriptor is one that includes any fields named
either [[Get]] or [[Set]]. Any Property Descriptor may have fields named
[[Enumerable]] and [[Configurable]]. A Property Descriptor value may
not be both a data Property Descriptor and an accessor Property
Descriptor; however, it may be neither. A generic Property Descriptor is
a Property Descriptor value that is neither a data Property Descriptor
nor an accessor Property Descriptor. A fully populated Property
Descriptor is one that is either an accessor Property Descriptor or a
data Property Descriptor and that has all of the fields that correspond
to the property attributes defined in either <emu-xref href="#table-2" id="_ref_129"><a href="#table-2">Table 2</a></emu-xref> or <emu-xref href="#table-3" id="_ref_130"><a href="#table-3">Table 3</a></emu-xref>.</p>
<p>The following <emu-xref href="#sec-algorithm-conventions-abstract-operations" id="_ref_1345"><a href="#sec-algorithm-conventions-abstract-operations">abstract operations</a></emu-xref> are used in this specification to operate upon Property Descriptor values:</p>
<emu-clause id="sec-isaccessordescriptor" aoid="IsAccessorDescriptor">
<h1><span class="secnum">6.2.5.1</span>IsAccessorDescriptor ( <var>Desc</var> )</h1>
<p>When the abstract operation IsAccessorDescriptor is called with <emu-xref href="#sec-property-descriptor-specification-type" id="_ref_1346"><a href="#sec-property-descriptor-specification-type">Property Descriptor</a></emu-xref> <var>Desc</var>, the following steps are taken:</p>
<emu-alg><ol><li>If <var>Desc</var> is <emu-val>undefined</emu-val>, return <emu-val>false</emu-val>.</li><li>If both <var>Desc</var>.[[Get]] and <var>Desc</var>.[[Set]] are absent, return <emu-val>false</emu-val>.</li><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-isdatadescriptor" aoid="IsDataDescriptor">
<h1><span class="secnum">6.2.5.2</span>IsDataDescriptor ( <var>Desc</var> )</h1>
<p>When the abstract operation IsDataDescriptor is called with <emu-xref href="#sec-property-descriptor-specification-type" id="_ref_1347"><a href="#sec-property-descriptor-specification-type">Property Descriptor</a></emu-xref> <var>Desc</var>, the following steps are taken:</p>
<emu-alg><ol><li>If <var>Desc</var> is <emu-val>undefined</emu-val>, return <emu-val>false</emu-val>.</li><li>If both <var>Desc</var>.[[Value]] and <var>Desc</var>.[[Writable]] are absent, return <emu-val>false</emu-val>.</li><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-isgenericdescriptor" aoid="IsGenericDescriptor">
<h1><span class="secnum">6.2.5.3</span>IsGenericDescriptor ( <var>Desc</var> )</h1>
<p>When the abstract operation IsGenericDescriptor is called with <emu-xref href="#sec-property-descriptor-specification-type" id="_ref_1348"><a href="#sec-property-descriptor-specification-type">Property Descriptor</a></emu-xref> <var>Desc</var>, the following steps are taken:</p>
<emu-alg><ol><li>If <var>Desc</var> is <emu-val>undefined</emu-val>, return <emu-val>false</emu-val>.</li><li>If <emu-xref aoid="IsAccessorDescriptor" id="_ref_1349"><a href="#sec-isaccessordescriptor">IsAccessorDescriptor</a></emu-xref>(<var>Desc</var>) and <emu-xref aoid="IsDataDescriptor" id="_ref_1350"><a href="#sec-isdatadescriptor">IsDataDescriptor</a></emu-xref>(<var>Desc</var>) are both <emu-val>false</emu-val>, return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-frompropertydescriptor" aoid="FromPropertyDescriptor">
<h1><span class="secnum">6.2.5.4</span>FromPropertyDescriptor ( <var>Desc</var> )</h1>
<p>When the abstract operation FromPropertyDescriptor is called with <emu-xref href="#sec-property-descriptor-specification-type" id="_ref_1351"><a href="#sec-property-descriptor-specification-type">Property Descriptor</a></emu-xref> <var>Desc</var>, the following steps are taken:</p>
<emu-alg><ol><li>If <var>Desc</var> is <emu-val>undefined</emu-val>, return <emu-val>undefined</emu-val>.</li><li>Let <var>obj</var> be <emu-xref aoid="ObjectCreate" id="_ref_1352"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_1353"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>).</li><li><emu-xref href="#assert" id="_ref_1354"><a href="#assert">Assert</a></emu-xref>: <var>obj</var> is an extensible ordinary object with no own properties.</li><li>If <var>Desc</var> has a [[Value]] field, then<ol><li>Perform <emu-xref aoid="CreateDataProperty" id="_ref_1355"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>obj</var>, <code>"value"</code>, <var>Desc</var>.[[Value]]).</li></ol></li><li>If <var>Desc</var> has a [[Writable]] field, then<ol><li>Perform <emu-xref aoid="CreateDataProperty" id="_ref_1356"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>obj</var>, <code>"writable"</code>, <var>Desc</var>.[[Writable]]).</li></ol></li><li>If <var>Desc</var> has a [[Get]] field, then<ol><li>Perform <emu-xref aoid="CreateDataProperty" id="_ref_1357"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>obj</var>, <code>"get"</code>, <var>Desc</var>.[[Get]]).</li></ol></li><li>If <var>Desc</var> has a [[Set]] field, then<ol><li>Perform <emu-xref aoid="CreateDataProperty" id="_ref_1358"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>obj</var>, <code>"set"</code>, <var>Desc</var>.[[Set]]).</li></ol></li><li>If <var>Desc</var> has an [[Enumerable]] field, then<ol><li>Perform <emu-xref aoid="CreateDataProperty" id="_ref_1359"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>obj</var>, <code>"enumerable"</code>, <var>Desc</var>.[[Enumerable]]).</li></ol></li><li>If <var>Desc</var> has a [[Configurable]] field, then<ol><li>Perform <emu-xref aoid="CreateDataProperty" id="_ref_1360"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>obj</var>, <code>"configurable"</code>, <var>Desc</var>.[[Configurable]]).</li></ol></li><li><emu-xref href="#assert" id="_ref_1361"><a href="#assert">Assert</a></emu-xref>: All of the above <emu-xref aoid="CreateDataProperty" id="_ref_1362"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref> operations return <emu-val>true</emu-val>.</li><li>Return <var>obj</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-topropertydescriptor" aoid="ToPropertyDescriptor">
<h1><span class="secnum">6.2.5.5</span>ToPropertyDescriptor ( <var>Obj</var> )</h1>
<p>When the abstract operation ToPropertyDescriptor is called with object <var>Obj</var>, the following steps are taken:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_1363"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>Obj</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>desc</var> be a new <emu-xref href="#sec-property-descriptor-specification-type" id="_ref_1364"><a href="#sec-property-descriptor-specification-type">Property Descriptor</a></emu-xref> that initially has no fields.</li><li>Let <var>hasEnumerable</var> be ?&nbsp;<emu-xref aoid="HasProperty" id="_ref_1365"><a href="#sec-hasproperty">HasProperty</a></emu-xref>(<var>Obj</var>, <code>"enumerable"</code>).</li><li>If <var>hasEnumerable</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>enumerable</var> be <emu-xref aoid="ToBoolean" id="_ref_1366"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_1367"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>Obj</var>, <code>"enumerable"</code>)).</li><li>Set <var>desc</var>.[[Enumerable]] to <var>enumerable</var>.</li></ol></li><li>Let <var>hasConfigurable</var> be ?&nbsp;<emu-xref aoid="HasProperty" id="_ref_1368"><a href="#sec-hasproperty">HasProperty</a></emu-xref>(<var>Obj</var>, <code>"configurable"</code>).</li><li>If <var>hasConfigurable</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>configurable</var> be <emu-xref aoid="ToBoolean" id="_ref_1369"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_1370"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>Obj</var>, <code>"configurable"</code>)).</li><li>Set <var>desc</var>.[[Configurable]] to <var>configurable</var>.</li></ol></li><li>Let <var>hasValue</var> be ?&nbsp;<emu-xref aoid="HasProperty" id="_ref_1371"><a href="#sec-hasproperty">HasProperty</a></emu-xref>(<var>Obj</var>, <code>"value"</code>).</li><li>If <var>hasValue</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>value</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_1372"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>Obj</var>, <code>"value"</code>).</li><li>Set <var>desc</var>.[[Value]] to <var>value</var>.</li></ol></li><li>Let <var>hasWritable</var> be ?&nbsp;<emu-xref aoid="HasProperty" id="_ref_1373"><a href="#sec-hasproperty">HasProperty</a></emu-xref>(<var>Obj</var>, <code>"writable"</code>).</li><li>If <var>hasWritable</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>writable</var> be <emu-xref aoid="ToBoolean" id="_ref_1374"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_1375"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>Obj</var>, <code>"writable"</code>)).</li><li>Set <var>desc</var>.[[Writable]] to <var>writable</var>.</li></ol></li><li>Let <var>hasGet</var> be ?&nbsp;<emu-xref aoid="HasProperty" id="_ref_1376"><a href="#sec-hasproperty">HasProperty</a></emu-xref>(<var>Obj</var>, <code>"get"</code>).</li><li>If <var>hasGet</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>getter</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_1377"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>Obj</var>, <code>"get"</code>).</li><li>If <emu-xref aoid="IsCallable" id="_ref_1378"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>getter</var>) is <emu-val>false</emu-val> and <var>getter</var> is not <emu-val>undefined</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Set <var>desc</var>.[[Get]] to <var>getter</var>.</li></ol></li><li>Let <var>hasSet</var> be ?&nbsp;<emu-xref aoid="HasProperty" id="_ref_1379"><a href="#sec-hasproperty">HasProperty</a></emu-xref>(<var>Obj</var>, <code>"set"</code>).</li><li>If <var>hasSet</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>setter</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_1380"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>Obj</var>, <code>"set"</code>).</li><li>If <emu-xref aoid="IsCallable" id="_ref_1381"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>setter</var>) is <emu-val>false</emu-val> and <var>setter</var> is not <emu-val>undefined</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Set <var>desc</var>.[[Set]] to <var>setter</var>.</li></ol></li><li>If <var>desc</var>.[[Get]] is present or <var>desc</var>.[[Set]] is present, then<ol><li>If <var>desc</var>.[[Value]] is present or <var>desc</var>.[[Writable]] is present, throw a <emu-val>TypeError</emu-val> exception.</li></ol></li><li>Return <var>desc</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-completepropertydescriptor" aoid="CompletePropertyDescriptor">
<h1><span class="secnum">6.2.5.6</span>CompletePropertyDescriptor ( <var>Desc</var> )</h1>
<p>When the abstract operation CompletePropertyDescriptor is called with <emu-xref href="#sec-property-descriptor-specification-type" id="_ref_1382"><a href="#sec-property-descriptor-specification-type">Property Descriptor</a></emu-xref> <var>Desc</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1383"><a href="#assert">Assert</a></emu-xref>: <var>Desc</var> is a <emu-xref href="#sec-property-descriptor-specification-type" id="_ref_1384"><a href="#sec-property-descriptor-specification-type">Property Descriptor</a></emu-xref>.</li><li>Let <var>like</var> be <emu-xref href="#sec-list-and-record-specification-type" id="_ref_1385"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Value]]: <emu-val>undefined</emu-val>, [[Writable]]: <emu-val>false</emu-val>, [[Get]]: <emu-val>undefined</emu-val>, [[Set]]: <emu-val>undefined</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</li><li>If <emu-xref aoid="IsGenericDescriptor" id="_ref_1386"><a href="#sec-isgenericdescriptor">IsGenericDescriptor</a></emu-xref>(<var>Desc</var>) is <emu-val>true</emu-val> or <emu-xref aoid="IsDataDescriptor" id="_ref_1387"><a href="#sec-isdatadescriptor">IsDataDescriptor</a></emu-xref>(<var>Desc</var>) is <emu-val>true</emu-val>, then<ol><li>If <var>Desc</var> does not have a [[Value]] field, set <var>Desc</var>.[[Value]] to <var>like</var>.[[Value]].</li><li>If <var>Desc</var> does not have a [[Writable]] field, set <var>Desc</var>.[[Writable]] to <var>like</var>.[[Writable]].</li></ol></li><li>Else,<ol><li>If <var>Desc</var> does not have a [[Get]] field, set <var>Desc</var>.[[Get]] to <var>like</var>.[[Get]].</li><li>If <var>Desc</var> does not have a [[Set]] field, set <var>Desc</var>.[[Set]] to <var>like</var>.[[Set]].</li></ol></li><li>If <var>Desc</var> does not have an [[Enumerable]] field, set <var>Desc</var>.[[Enumerable]] to <var>like</var>.[[Enumerable]].</li><li>If <var>Desc</var> does not have a [[Configurable]] field, set <var>Desc</var>.[[Configurable]] to <var>like</var>.[[Configurable]].</li><li>Return <var>Desc</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-lexical-environment-and-environment-record-specification-types">
<h1><span class="secnum">6.2.6</span>The Lexical Environment and Environment Record Specification Types</h1>
<p>The <emu-xref href="#sec-lexical-environments" id="_ref_1388"><a href="#sec-lexical-environments">Lexical Environment</a></emu-xref> and <emu-xref href="#sec-environment-records" id="_ref_1389"><a href="#sec-environment-records">Environment Record</a></emu-xref>
types are used to explain the behaviour of name resolution in nested
functions and blocks. These types and the operations upon them are
defined in <emu-xref href="#sec-lexical-environments" id="_ref_131"><a href="#sec-lexical-environments">8.1</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-data-blocks">
<h1><span class="secnum">6.2.7</span>Data Blocks</h1>
<p>The <dfn>Data Block</dfn> specification type is used to
describe a distinct and mutable sequence of byte-sized (8 bit) numeric
values. A Data Block value is created with a fixed number of bytes that
each have the initial value 0.</p>
<p>For notational convenience within this specification, an
array-like syntax can be used to access the individual bytes of a Data
Block value. This notation presents a Data Block value as a 0-origined
integer-indexed sequence of bytes. For example, if <var>db</var> is a 5 byte Data Block value then <var>db</var>[2] can be used to access its 3<sup>rd</sup> byte.</p>
<p>A data block that resides in memory that can be referenced from multiple agents concurrently is designated a <dfn>Shared Data Block</dfn>. A Shared Data Block has an identity (for the purposes of equality testing Shared Data Block values) that is <em>address-free</em>:
it is tied not to the virtual addresses the block is mapped to in any
process, but to the set of locations in memory that the block
represents. Two data blocks are equal only if the sets of the locations
they contain are equal; otherwise, they are not equal and the
intersection of the sets of locations they contain is empty. Finally,
Shared Data Blocks can be distinguished from Data Blocks.</p>
<p>The semantics of Shared Data Blocks is defined using Shared Data Block events by the <emu-xref href="#sec-memory-model" id="_ref_1390"><a href="#sec-memory-model">memory model</a></emu-xref>. <emu-xref href="#sec-algorithm-conventions-abstract-operations" id="_ref_1391"><a href="#sec-algorithm-conventions-abstract-operations">Abstract operations</a></emu-xref> below introduce Shared Data Block events and act as the interface between evaluation semantics and the event semantics of the <emu-xref href="#sec-memory-model" id="_ref_1392"><a href="#sec-memory-model">memory model</a></emu-xref>. The events form a <emu-xref href="#sec-candidate-executions" id="_ref_1393"><a href="#sec-candidate-executions">candidate execution</a></emu-xref>, on which the <emu-xref href="#sec-memory-model" id="_ref_1394"><a href="#sec-memory-model">memory model</a></emu-xref> acts as a filter. Please consult the <emu-xref href="#sec-memory-model" id="_ref_1395"><a href="#sec-memory-model">memory model</a></emu-xref> for full semantics.</p>
<p>Shared Data Block events are modeled by Records, defined in the <emu-xref href="#sec-memory-model" id="_ref_1396"><a href="#sec-memory-model">memory model</a></emu-xref>.</p>
<p>The following <emu-xref href="#sec-algorithm-conventions-abstract-operations" id="_ref_1397"><a href="#sec-algorithm-conventions-abstract-operations">abstract operations</a></emu-xref> are used in this specification to operate upon Data Block values:</p>
<emu-clause id="sec-createbytedatablock" aoid="CreateByteDataBlock">
<h1><span class="secnum">6.2.7.1</span>CreateByteDataBlock ( <var>size</var> )</h1>
<p>When the abstract operation CreateByteDataBlock is called with integer argument <var>size</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1398"><a href="#assert">Assert</a></emu-xref>: <var>size</var> ≥ 0.</li><li>Let <var>db</var> be a new <emu-xref href="#sec-data-blocks" id="_ref_1399"><a href="#sec-data-blocks">Data Block</a></emu-xref> value consisting of <var>size</var> bytes. If it is impossible to create such a <emu-xref href="#sec-data-blocks" id="_ref_1400"><a href="#sec-data-blocks">Data Block</a></emu-xref>, throw a <emu-val>RangeError</emu-val> exception.</li><li>Set all of the bytes of <var>db</var> to 0.</li><li>Return <var>db</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-createsharedbytedatablock" aoid="CreateSharedByteDataBlock">
<h1><span class="secnum">6.2.7.2</span>CreateSharedByteDataBlock ( <var>size</var> )</h1>
<p>When the abstract operation CreateSharedByteDataBlock is called with integer argument <var>size</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1401"><a href="#assert">Assert</a></emu-xref>: <var>size</var> ≥ 0.</li><li>Let <var>db</var> be a new <emu-xref href="#sec-data-blocks" id="_ref_1402"><a href="#sec-data-blocks">Shared Data Block</a></emu-xref> value consisting of <var>size</var> bytes. If it is impossible to create such a <emu-xref href="#sec-data-blocks" id="_ref_1403"><a href="#sec-data-blocks">Shared Data Block</a></emu-xref>, throw a <emu-val>RangeError</emu-val> exception.</li><li>Let <var>execution</var> be the [[CandidateExecution]] field of the <emu-xref href="#surrounding-agent" id="_ref_1404"><a href="#surrounding-agent">surrounding agent</a></emu-xref>'s <emu-xref href="#agent-record" id="_ref_1405"><a href="#agent-record">Agent Record</a></emu-xref>.</li><li>Let <var>eventList</var> be the [[EventList]] field of the element in <var>execution</var>.[[EventsRecords]] whose [[AgentSignifier]] is <emu-xref aoid="AgentSignifier" id="_ref_1406"><a href="#sec-agentsignifier">AgentSignifier</a></emu-xref>().</li><li>Let <var>zero</var> be « 0 ».</li><li>For each index <var>i</var> of <var>db</var>, do<ol><li>Append <emu-xref href="#sec-memory-model-fundamentals" id="_ref_1407"><a href="#sec-memory-model-fundamentals">WriteSharedMemory</a></emu-xref> { [[Order]]: <code>"Init"</code>, [[NoTear]]: <emu-val>true</emu-val>, [[Block]]: <var>db</var>, [[ByteIndex]]: <var>i</var>, [[ElementSize]]: 1, [[Payload]]: <var>zero</var> } to <var>eventList</var>.</li></ol></li><li>Return <var>db</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-copydatablockbytes" aoid="CopyDataBlockBytes">
<h1><span class="secnum">6.2.7.3</span>CopyDataBlockBytes ( <var>toBlock</var>, <var>toIndex</var>, <var>fromBlock</var>, <var>fromIndex</var>, <var>count</var> )</h1>
<p>When the abstract operation CopyDataBlockBytes is called, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1408"><a href="#assert">Assert</a></emu-xref>: <var>fromBlock</var> and <var>toBlock</var> are distinct <emu-xref href="#sec-data-blocks" id="_ref_1409"><a href="#sec-data-blocks">Data Block</a></emu-xref> or <emu-xref href="#sec-data-blocks" id="_ref_1410"><a href="#sec-data-blocks">Shared Data Block</a></emu-xref> values.</li><li><emu-xref href="#assert" id="_ref_1411"><a href="#assert">Assert</a></emu-xref>: <var>fromIndex</var>, <var>toIndex</var>, and <var>count</var> are integer values ≥ 0.</li><li>Let <var>fromSize</var> be the number of bytes in <var>fromBlock</var>.</li><li><emu-xref href="#assert" id="_ref_1412"><a href="#assert">Assert</a></emu-xref>: <var>fromIndex</var> + <var>count</var> ≤ <var>fromSize</var>.</li><li>Let <var>toSize</var> be the number of bytes in <var>toBlock</var>.</li><li><emu-xref href="#assert" id="_ref_1413"><a href="#assert">Assert</a></emu-xref>: <var>toIndex</var> + <var>count</var> ≤ <var>toSize</var>.</li><li>Repeat, while <var>count</var> &gt; 0<ol><li>If <var>fromBlock</var> is a <emu-xref href="#sec-data-blocks" id="_ref_1414"><a href="#sec-data-blocks">Shared Data Block</a></emu-xref>, then<ol><li>Let <var>execution</var> be the [[CandidateExecution]] field of the <emu-xref href="#surrounding-agent" id="_ref_1415"><a href="#surrounding-agent">surrounding agent</a></emu-xref>'s <emu-xref href="#agent-record" id="_ref_1416"><a href="#agent-record">Agent Record</a></emu-xref>.</li><li>Let <var>eventList</var> be the [[EventList]] field of the element in <var>execution</var>.[[EventsRecords]] whose [[AgentSignifier]] is <emu-xref aoid="AgentSignifier" id="_ref_1417"><a href="#sec-agentsignifier">AgentSignifier</a></emu-xref>().</li><li>Let <var>bytes</var> be a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_1418"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of length 1 that contains a nondeterministically chosen byte value.</li><li>NOTE: In implementations, <var>bytes</var>
is the result of a non-atomic read instruction on the underlying
hardware. The nondeterminism is a semantic prescription of the <emu-xref href="#sec-memory-model" id="_ref_1419"><a href="#sec-memory-model">memory model</a></emu-xref> to describe observable behaviour of hardware with weak consistency.</li><li>Let <var>readEvent</var> be <emu-xref href="#sec-memory-model-fundamentals" id="_ref_1420"><a href="#sec-memory-model-fundamentals">ReadSharedMemory</a></emu-xref> { [[Order]]: <code>"Unordered"</code>, [[NoTear]]: <emu-val>true</emu-val>, [[Block]]: <var>fromBlock</var>, [[ByteIndex]]: <var>fromIndex</var>, [[ElementSize]]: 1 }.</li><li>Append <var>readEvent</var> to <var>eventList</var>.</li><li>Append <emu-xref href="#sec-chosen-value-records" id="_ref_1421"><a href="#sec-chosen-value-records">Chosen Value Record</a></emu-xref> { [[Event]]: <var>readEvent</var>, [[ChosenValue]]: <var>bytes</var> } to <var>execution</var>.[[ChosenValues]].</li><li>If <var>toBlock</var> is a <emu-xref href="#sec-data-blocks" id="_ref_1422"><a href="#sec-data-blocks">Shared Data Block</a></emu-xref>, then<ol><li>Append <emu-xref href="#sec-memory-model-fundamentals" id="_ref_1423"><a href="#sec-memory-model-fundamentals">WriteSharedMemory</a></emu-xref> { [[Order]]: <code>"Unordered"</code>, [[NoTear]]: <emu-val>true</emu-val>, [[Block]]: <var>toBlock</var>, [[ByteIndex]]: <var>toIndex</var>, [[ElementSize]]: 1, [[Payload]]: <var>bytes</var> } to <var>eventList</var>.</li></ol></li><li>Else,<ol><li>Set <var>toBlock</var>[<var>toIndex</var>] to <var>bytes</var>[0].</li></ol></li></ol></li><li>Else,<ol><li><emu-xref href="#assert" id="_ref_1424"><a href="#assert">Assert</a></emu-xref>: <var>toBlock</var> is not a <emu-xref href="#sec-data-blocks" id="_ref_1425"><a href="#sec-data-blocks">Shared Data Block</a></emu-xref>.</li><li>Set <var>toBlock</var>[<var>toIndex</var>] to <var>fromBlock</var>[<var>fromIndex</var>].</li></ol></li><li>Increment <var>toIndex</var> and <var>fromIndex</var> each by 1.</li><li>Decrement <var>count</var> by 1.</li></ol></li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_1426"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-abstract-operations">
<h1><span class="secnum">7</span>Abstract Operations</h1>
<p>These operations are not a part of the ECMAScript language; they
are defined here to solely to aid the specification of the semantics of
the ECMAScript language. Other, more specialized <emu-xref href="#sec-algorithm-conventions-abstract-operations" id="_ref_1427"><a href="#sec-algorithm-conventions-abstract-operations">abstract operations</a></emu-xref> are defined throughout this specification.</p>
<emu-clause id="sec-type-conversion">
<h1><span class="secnum">7.1</span>Type Conversion</h1>
<p>The ECMAScript language implicitly performs automatic type
conversion as needed. To clarify the semantics of certain constructs it
is useful to define a set of conversion <emu-xref href="#sec-algorithm-conventions-abstract-operations" id="_ref_1428"><a href="#sec-algorithm-conventions-abstract-operations">abstract operations</a></emu-xref>. The conversion <emu-xref href="#sec-algorithm-conventions-abstract-operations" id="_ref_1429"><a href="#sec-algorithm-conventions-abstract-operations">abstract operations</a></emu-xref> are polymorphic; they can accept a value of any <emu-xref href="#sec-ecmascript-language-types" id="_ref_1430"><a href="#sec-ecmascript-language-types">ECMAScript language type</a></emu-xref>. But no other specification types are used with these operations.</p>
<emu-clause id="sec-toprimitive" aoid="ToPrimitive" oldids="table-9">
<span id="table-9"></span><h1><span class="secnum">7.1.1</span>ToPrimitive ( <var>input</var> [ , <var>PreferredType</var> ] )</h1>
<p>The abstract operation ToPrimitive takes an <var>input</var> argument and an optional argument <var>PreferredType</var>. The abstract operation ToPrimitive converts its <var>input</var>
argument to a non-Object type. If an object is capable of converting to
more than one primitive type, it may use the optional hint <var>PreferredType</var> to favour that type. Conversion occurs according to the following algorithm:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1431"><a href="#assert">Assert</a></emu-xref>: <var>input</var> is an <emu-xref href="#sec-ecmascript-language-types" id="_ref_1432"><a href="#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref>.</li><li>If <emu-xref aoid="Type" id="_ref_1433"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>input</var>) is Object, then<ol><li>If <var>PreferredType</var> is not present, let <var>hint</var> be <code>"default"</code>.</li><li>Else if <var>PreferredType</var> is hint String, let <var>hint</var> be <code>"string"</code>.</li><li>Else <var>PreferredType</var> is hint Number, let <var>hint</var> be <code>"number"</code>.</li><li>Let <var>exoticToPrim</var> be ?&nbsp;<emu-xref aoid="GetMethod" id="_ref_1434"><a href="#sec-getmethod">GetMethod</a></emu-xref>(<var>input</var>, @@toPrimitive).</li><li>If <var>exoticToPrim</var> is not <emu-val>undefined</emu-val>, then<ol><li>Let <var>result</var> be ?&nbsp;<emu-xref aoid="Call" id="_ref_1435"><a href="#sec-call">Call</a></emu-xref>(<var>exoticToPrim</var>, <var>input</var>, « <var>hint</var> »).</li><li>If <emu-xref aoid="Type" id="_ref_1436"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>result</var>) is not Object, return <var>result</var>.</li><li>Throw a <emu-val>TypeError</emu-val> exception.</li></ol></li><li>If <var>hint</var> is <code>"default"</code>, set <var>hint</var> to <code>"number"</code>.</li><li>Return ?&nbsp;<emu-xref aoid="OrdinaryToPrimitive" id="_ref_1437"><a href="#sec-ordinarytoprimitive">OrdinaryToPrimitive</a></emu-xref>(<var>input</var>, <var>hint</var>).</li></ol></li><li>Return <var>input</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>When ToPrimitive is called with no hint, then it generally
behaves as if the hint were Number. However, objects may over-ride this
behaviour by defining a @@toPrimitive method. Of the objects defined in
this specification only Date objects (see <emu-xref href="#sec-date.prototype-@@toprimitive" id="_ref_132"><a href="#sec-date.prototype-@@toprimitive">20.3.4.45</a></emu-xref>) and Symbol objects (see <emu-xref href="#sec-symbol.prototype-@@toprimitive" id="_ref_133"><a href="#sec-symbol.prototype-@@toprimitive">19.4.3.5</a></emu-xref>) over-ride the default ToPrimitive behaviour. Date objects treat no hint as if the hint were String.</p>
</div></emu-note>
<emu-clause id="sec-ordinarytoprimitive" aoid="OrdinaryToPrimitive">
<h1><span class="secnum">7.1.1.1</span>OrdinaryToPrimitive ( <var>O</var>, <var>hint</var> )</h1>
<p>When the abstract operation OrdinaryToPrimitive is called with arguments <var>O</var> and <var>hint</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1438"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1439"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is Object.</li><li><emu-xref href="#assert" id="_ref_1440"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1441"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>hint</var>) is String and its value is either <code>"string"</code> or <code>"number"</code>.</li><li>If <var>hint</var> is <code>"string"</code>, then<ol><li>Let <var>methodNames</var> be « <code>"toString"</code>, <code>"valueOf"</code> ».</li></ol></li><li>Else,<ol><li>Let <var>methodNames</var> be « <code>"valueOf"</code>, <code>"toString"</code> ».</li></ol></li><li>For each <var>name</var> in <var>methodNames</var> in <emu-xref href="#sec-list-and-record-specification-type" id="_ref_1442"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> order, do<ol><li>Let <var>method</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_1443"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <var>name</var>).</li><li>If <emu-xref aoid="IsCallable" id="_ref_1444"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>method</var>) is <emu-val>true</emu-val>, then<ol><li>Let <var>result</var> be ?&nbsp;<emu-xref aoid="Call" id="_ref_1445"><a href="#sec-call">Call</a></emu-xref>(<var>method</var>, <var>O</var>).</li><li>If <emu-xref aoid="Type" id="_ref_1446"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>result</var>) is not Object, return <var>result</var>.</li></ol></li></ol></li><li>Throw a <emu-val>TypeError</emu-val> exception.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-toboolean" aoid="ToBoolean">
<h1><span class="secnum">7.1.2</span>ToBoolean ( <var>argument</var> )</h1>
<p>The abstract operation ToBoolean converts <var>argument</var> to a value of type Boolean according to <emu-xref href="#table-10" id="_ref_134"><a href="#table-10">Table 9</a></emu-xref>:</p>
<emu-table id="table-10" caption="ToBoolean Conversions"><figure><figcaption>Table 9: <emu-xref aoid="ToBoolean" id="_ref_1447"><a href="#sec-toboolean">ToBoolean</a></emu-xref> Conversions</figcaption>
<table>
<tbody>
<tr>
<th>
Argument Type
</th>
<th>
Result
</th>
</tr>
<tr>
<td>
Undefined
</td>
<td>
Return <emu-val>false</emu-val>.
</td>
</tr>
<tr>
<td>
Null
</td>
<td>
Return <emu-val>false</emu-val>.
</td>
</tr>
<tr>
<td>
Boolean
</td>
<td>
Return <var>argument</var>.
</td>
</tr>
<tr>
<td>
Number
</td>
<td>
If <var>argument</var> is <emu-val>+0</emu-val>, <emu-val>-0</emu-val>, or <emu-val>NaN</emu-val>, return <emu-val>false</emu-val>; otherwise return <emu-val>true</emu-val>.
</td>
</tr>
<tr>
<td>
String
</td>
<td>
If <var>argument</var> is the empty String (its length is zero), return <emu-val>false</emu-val>; otherwise return <emu-val>true</emu-val>.
</td>
</tr>
<tr>
<td>
Symbol
</td>
<td>
Return <emu-val>true</emu-val>.
</td>
</tr>
<tr>
<td>
Object
</td>
<td>
Return <emu-val>true</emu-val>.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
</emu-clause>
<emu-clause id="sec-tonumber" aoid="ToNumber">
<h1><span class="secnum">7.1.3</span>ToNumber ( <var>argument</var> )</h1>
<p>The abstract operation ToNumber converts <var>argument</var> to a value of type Number according to <emu-xref href="#table-11" id="_ref_135"><a href="#table-11">Table 10</a></emu-xref>:</p>
<emu-table id="table-11" caption="ToNumber Conversions"><figure><figcaption>Table 10: <emu-xref aoid="ToNumber" id="_ref_1448"><a href="#sec-tonumber">ToNumber</a></emu-xref> Conversions</figcaption>
<table>
<tbody>
<tr>
<th>
Argument Type
</th>
<th>
Result
</th>
</tr>
<tr>
<td>
Undefined
</td>
<td>
Return <emu-val>NaN</emu-val>.
</td>
</tr>
<tr>
<td>
Null
</td>
<td>
Return <emu-val>+0</emu-val>.
</td>
</tr>
<tr>
<td>
Boolean
</td>
<td>
If <var>argument</var> is <emu-val>true</emu-val>, return 1. If <var>argument</var> is <emu-val>false</emu-val>, return <emu-val>+0</emu-val>.
</td>
</tr>
<tr>
<td>
Number
</td>
<td>
Return <var>argument</var> (no conversion).
</td>
</tr>
<tr>
<td>
String
</td>
<td>
See grammar and conversion algorithm below.
</td>
</tr>
<tr>
<td>
Symbol
</td>
<td>
Throw a <emu-val>TypeError</emu-val> exception.
</td>
</tr>
<tr>
<td>
Object
</td>
<td>
<p>Apply the following steps:</p>
<emu-alg><ol><li>Let <var>primValue</var> be ?&nbsp;<emu-xref aoid="ToPrimitive" id="_ref_1449"><a href="#sec-toprimitive">ToPrimitive</a></emu-xref>(<var>argument</var>, hint Number).</li><li>Return ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_1450"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>primValue</var>).
</li></ol></emu-alg>
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<emu-clause id="sec-tonumber-applied-to-the-string-type">
<h1><span class="secnum">7.1.3.1</span>ToNumber Applied to the String Type</h1>
<p><emu-xref aoid="ToNumber" id="_ref_1451"><a href="#sec-tonumber">ToNumber</a></emu-xref> applied to Strings applies the following grammar to the input String interpreted as a sequence of UTF-16 encoded code points (<emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_136"><a href="#sec-ecmascript-language-types-string-type">6.1.4</a></emu-xref>). If the grammar cannot interpret the String as an expansion of <emu-nt id="_ref_8934"><a href="#prod-StringNumericLiteral">StringNumericLiteral</a></emu-nt>, then the result of <emu-xref aoid="ToNumber" id="_ref_1452"><a href="#sec-tonumber">ToNumber</a></emu-xref> is <emu-val>NaN</emu-val>.</p>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>The terminal symbols of this grammar are all composed of
characters in the Unicode Basic Multilingual Plane (BMP). Therefore, the
result of <emu-xref aoid="ToNumber" id="_ref_1453"><a href="#sec-tonumber">ToNumber</a></emu-xref> will be <emu-val>NaN</emu-val> if the string contains any <emu-xref href="#leading-surrogate" id="_ref_137"><a href="#leading-surrogate">leading surrogate</a></emu-xref> or <emu-xref href="#trailing-surrogate" id="_ref_138"><a href="#trailing-surrogate">trailing surrogate</a></emu-xref> code units, whether paired or unpaired.</p>
</div></emu-note>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="StringNumericLiteral" type="regexp" id="prod-StringNumericLiteral">
<emu-nt><a href="#prod-StringNumericLiteral">StringNumericLiteral</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="9a4be900"><emu-nt optional="" id="_ref_8935"><a href="#prod-StrWhiteSpace">StrWhiteSpace</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="fe58c396"><emu-nt optional="" id="_ref_8936"><a href="#prod-StrWhiteSpace">StrWhiteSpace</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt id="_ref_8937"><a href="#prod-StrNumericLiteral">StrNumericLiteral</a></emu-nt><emu-nt optional="" id="_ref_8938"><a href="#prod-StrWhiteSpace">StrWhiteSpace</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="StrWhiteSpace" type="regexp" id="prod-StrWhiteSpace">
<emu-nt><a href="#prod-StrWhiteSpace">StrWhiteSpace</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="2b0ea266"><emu-nt id="_ref_8939"><a href="#prod-StrWhiteSpaceChar">StrWhiteSpaceChar</a></emu-nt><emu-nt optional="" id="_ref_8940"><a href="#prod-StrWhiteSpace">StrWhiteSpace</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="StrWhiteSpaceChar" type="regexp" id="prod-StrWhiteSpaceChar">
<emu-nt><a href="#prod-StrWhiteSpaceChar">StrWhiteSpaceChar</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="1424dc49"><emu-nt id="_ref_8941"><a href="#prod-WhiteSpace">WhiteSpace</a></emu-nt></emu-rhs>
<emu-rhs a="3b331ccd"><emu-nt id="_ref_8942"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="StrNumericLiteral" type="regexp" id="prod-StrNumericLiteral">
<emu-nt><a href="#prod-StrNumericLiteral">StrNumericLiteral</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="db369ee0"><emu-nt id="_ref_8943"><a href="#prod-StrDecimalLiteral">StrDecimalLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="d3d71ddd"><emu-nt id="_ref_8944"><a href="#prod-BinaryIntegerLiteral">BinaryIntegerLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="832f57ee"><emu-nt id="_ref_8945"><a href="#prod-OctalIntegerLiteral">OctalIntegerLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="1d0c4a66"><emu-nt id="_ref_8946"><a href="#prod-HexIntegerLiteral">HexIntegerLiteral</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="StrDecimalLiteral" type="regexp" id="prod-StrDecimalLiteral">
<emu-nt><a href="#prod-StrDecimalLiteral">StrDecimalLiteral</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="477fcd23"><emu-nt id="_ref_8947"><a href="#prod-StrUnsignedDecimalLiteral">StrUnsignedDecimalLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="a3f639a9"><emu-t>+</emu-t><emu-nt id="_ref_8948"><a href="#prod-StrUnsignedDecimalLiteral">StrUnsignedDecimalLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="d60f01a5"><emu-t>-</emu-t><emu-nt id="_ref_8949"><a href="#prod-StrUnsignedDecimalLiteral">StrUnsignedDecimalLiteral</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="StrUnsignedDecimalLiteral" type="regexp" id="prod-StrUnsignedDecimalLiteral">
<emu-nt><a href="#prod-StrUnsignedDecimalLiteral">StrUnsignedDecimalLiteral</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="4afe8df8"><emu-t>Infinity</emu-t></emu-rhs>
<emu-rhs a="8a89062c"><emu-nt id="_ref_8950"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-t>.</emu-t><emu-nt optional="" id="_ref_8951"><a href="#prod-DecimalDigits">DecimalDigits</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt optional="" id="_ref_8952"><a href="#prod-ExponentPart">ExponentPart</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="5cf3aa35"><emu-t>.</emu-t><emu-nt id="_ref_8953"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-nt optional="" id="_ref_8954"><a href="#prod-ExponentPart">ExponentPart</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="24e27af7"><emu-nt id="_ref_8955"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-nt optional="" id="_ref_8956"><a href="#prod-ExponentPart">ExponentPart</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<p>All grammar symbols not explicitly defined above have the definitions used in the Lexical Grammar for numeric literals (<emu-xref href="#sec-literals-numeric-literals" id="_ref_139"><a href="#sec-literals-numeric-literals">11.8.3</a></emu-xref>)</p>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>Some differences should be noted between the syntax of a <emu-nt id="_ref_8957"><a href="#prod-StringNumericLiteral">StringNumericLiteral</a></emu-nt> and a <emu-nt id="_ref_8958"><a href="#prod-NumericLiteral">NumericLiteral</a></emu-nt>:</p>
<ul>
<li>
A <emu-nt id="_ref_8959"><a href="#prod-StringNumericLiteral">StringNumericLiteral</a></emu-nt> may include leading and/or trailing white space and/or line terminators.
</li>
<li>
A <emu-nt id="_ref_8960"><a href="#prod-StringNumericLiteral">StringNumericLiteral</a></emu-nt> that is decimal may have any number of leading <code>0</code> digits.
</li>
<li>
A <emu-nt id="_ref_8961"><a href="#prod-StringNumericLiteral">StringNumericLiteral</a></emu-nt> that is decimal may include a <code>+</code> or <code>-</code> to indicate its sign.
</li>
<li>
A <emu-nt id="_ref_8962"><a href="#prod-StringNumericLiteral">StringNumericLiteral</a></emu-nt> that is empty or contains only white space is converted to <emu-val>+0</emu-val>.
</li>
<li>
<code>Infinity</code> and <code>-Infinity</code> are recognized as a <emu-nt id="_ref_8963"><a href="#prod-StringNumericLiteral">StringNumericLiteral</a></emu-nt> but not as a <emu-nt id="_ref_8964"><a href="#prod-NumericLiteral">NumericLiteral</a></emu-nt>.
</li>
</ul>
</div></emu-note>
<emu-clause id="sec-runtime-semantics-mv-s">
<h1><span class="secnum">7.1.3.1.1</span>Runtime Semantics: MV</h1>
<p>The conversion of a String to a Number value is similar
overall to the determination of the Number value for a numeric literal
(see <emu-xref href="#sec-literals-numeric-literals" id="_ref_140"><a href="#sec-literals-numeric-literals">11.8.3</a></emu-xref>),
but some of the details are different, so the process for converting a
String numeric literal to a value of Number type is given here. This
value is determined in two steps: first, a mathematical value (MV) is
derived from the String numeric literal; second, this mathematical value
is rounded as described below. The MV on any grammar symbol, not
provided below, is the MV for that symbol defined in <emu-xref href="#sec-static-semantics-mv" id="_ref_141"><a href="#sec-static-semantics-mv">11.8.3.1</a></emu-xref>.</p>
<ul>
<li>
The MV of <emu-grammar><emu-production name="StringNumericLiteral" type="regexp" collapsed="" class=" inline">
<emu-nt><a href="#prod-StringNumericLiteral">StringNumericLiteral</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></emu-rhs>
</emu-production></emu-grammar> is 0.
</li>
<li>
The MV of <emu-grammar><emu-production name="StringNumericLiteral" type="regexp" collapsed="" class=" inline">
<emu-nt><a href="#prod-StringNumericLiteral">StringNumericLiteral</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="63c9217f"><emu-nt id="_ref_8965"><a href="#prod-StrWhiteSpace">StrWhiteSpace</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is 0.
</li>
<li>
The MV of <emu-grammar><emu-production name="StringNumericLiteral" type="regexp" collapsed="" class=" inline">
<emu-nt><a href="#prod-StringNumericLiteral">StringNumericLiteral</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="fe58c396"><emu-nt optional="" id="_ref_8966"><a href="#prod-StrWhiteSpace">StrWhiteSpace</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt id="_ref_8967"><a href="#prod-StrNumericLiteral">StrNumericLiteral</a></emu-nt><emu-nt optional="" id="_ref_8968"><a href="#prod-StrWhiteSpace">StrWhiteSpace</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_8969"><a href="#prod-StrNumericLiteral">StrNumericLiteral</a></emu-nt>, no matter whether white space is present or not.
</li>
<li>
The MV of <emu-grammar><emu-production name="StrNumericLiteral" type="regexp" collapsed="" class=" inline">
<emu-nt><a href="#prod-StrNumericLiteral">StrNumericLiteral</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="db369ee0"><emu-nt id="_ref_8970"><a href="#prod-StrDecimalLiteral">StrDecimalLiteral</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_8971"><a href="#prod-StrDecimalLiteral">StrDecimalLiteral</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="StrNumericLiteral" type="regexp" collapsed="" class=" inline">
<emu-nt><a href="#prod-StrNumericLiteral">StrNumericLiteral</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="d3d71ddd"><emu-nt id="_ref_8972"><a href="#prod-BinaryIntegerLiteral">BinaryIntegerLiteral</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_8973"><a href="#prod-BinaryIntegerLiteral">BinaryIntegerLiteral</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="StrNumericLiteral" type="regexp" collapsed="" class=" inline">
<emu-nt><a href="#prod-StrNumericLiteral">StrNumericLiteral</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="832f57ee"><emu-nt id="_ref_8974"><a href="#prod-OctalIntegerLiteral">OctalIntegerLiteral</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_8975"><a href="#prod-OctalIntegerLiteral">OctalIntegerLiteral</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="StrNumericLiteral" type="regexp" collapsed="" class=" inline">
<emu-nt><a href="#prod-StrNumericLiteral">StrNumericLiteral</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="1d0c4a66"><emu-nt id="_ref_8976"><a href="#prod-HexIntegerLiteral">HexIntegerLiteral</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_8977"><a href="#prod-HexIntegerLiteral">HexIntegerLiteral</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="StrDecimalLiteral" type="regexp" collapsed="" class=" inline">
<emu-nt><a href="#prod-StrDecimalLiteral">StrDecimalLiteral</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="477fcd23"><emu-nt id="_ref_8978"><a href="#prod-StrUnsignedDecimalLiteral">StrUnsignedDecimalLiteral</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_8979"><a href="#prod-StrUnsignedDecimalLiteral">StrUnsignedDecimalLiteral</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="StrDecimalLiteral" type="regexp" collapsed="" class=" inline">
<emu-nt><a href="#prod-StrDecimalLiteral">StrDecimalLiteral</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="a3f639a9"><emu-t>+</emu-t><emu-nt id="_ref_8980"><a href="#prod-StrUnsignedDecimalLiteral">StrUnsignedDecimalLiteral</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_8981"><a href="#prod-StrUnsignedDecimalLiteral">StrUnsignedDecimalLiteral</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="StrDecimalLiteral" type="regexp" collapsed="" class=" inline">
<emu-nt><a href="#prod-StrDecimalLiteral">StrDecimalLiteral</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="d60f01a5"><emu-t>-</emu-t><emu-nt id="_ref_8982"><a href="#prod-StrUnsignedDecimalLiteral">StrUnsignedDecimalLiteral</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the negative of the MV of <emu-nt id="_ref_8983"><a href="#prod-StrUnsignedDecimalLiteral">StrUnsignedDecimalLiteral</a></emu-nt>. (Note that if the MV of <emu-nt id="_ref_8984"><a href="#prod-StrUnsignedDecimalLiteral">StrUnsignedDecimalLiteral</a></emu-nt>
is 0, the negative of this MV is also 0. The rounding rule described
below handles the conversion of this signless mathematical zero to a
floating-point <emu-val>+0</emu-val> or <emu-val>-0</emu-val> as appropriate.)
</li>
<li>
The MV of <emu-grammar><emu-production name="StrUnsignedDecimalLiteral" type="regexp" collapsed="" class=" inline">
<emu-nt><a href="#prod-StrUnsignedDecimalLiteral">StrUnsignedDecimalLiteral</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="4afe8df8"><emu-t>Infinity</emu-t></emu-rhs>
</emu-production></emu-grammar> is 10<sup>10000</sup> (a value so large that it will round to <emu-val>+∞</emu-val>).
</li>
<li>
The MV of <emu-grammar><emu-production name="StrUnsignedDecimalLiteral" type="regexp" collapsed="" class=" inline">
<emu-nt><a href="#prod-StrUnsignedDecimalLiteral">StrUnsignedDecimalLiteral</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="33bf537e"><emu-nt id="_ref_8985"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-t>.</emu-t></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_8986"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="StrUnsignedDecimalLiteral" type="regexp" collapsed="" class=" inline">
<emu-nt><a href="#prod-StrUnsignedDecimalLiteral">StrUnsignedDecimalLiteral</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="4565db95"><emu-nt id="_ref_8987"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-t>.</emu-t><emu-nt id="_ref_8988"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of the first <emu-nt id="_ref_8989"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt> plus (the MV of the second <emu-nt id="_ref_8990"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt> times 10<sup>-<var>n</var></sup>), where <var>n</var> is the number of code points in the second <emu-nt id="_ref_8991"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="StrUnsignedDecimalLiteral" type="regexp" collapsed="" class=" inline">
<emu-nt><a href="#prod-StrUnsignedDecimalLiteral">StrUnsignedDecimalLiteral</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="6f5fda9f"><emu-nt id="_ref_8992"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-t>.</emu-t><emu-nt id="_ref_8993"><a href="#prod-ExponentPart">ExponentPart</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_8994"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt> times 10<sup><var>e</var></sup>, where <var>e</var> is the MV of <emu-nt id="_ref_8995"><a href="#prod-ExponentPart">ExponentPart</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="StrUnsignedDecimalLiteral" type="regexp" collapsed="" class=" inline">
<emu-nt><a href="#prod-StrUnsignedDecimalLiteral">StrUnsignedDecimalLiteral</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="4694f1d2"><emu-nt id="_ref_8996"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-t>.</emu-t><emu-nt id="_ref_8997"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-nt id="_ref_8998"><a href="#prod-ExponentPart">ExponentPart</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is (the MV of the first <emu-nt id="_ref_8999"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt> plus (the MV of the second <emu-nt id="_ref_9000"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt> times 10<sup>-<var>n</var></sup>)) times 10<sup><var>e</var></sup>, where <var>n</var> is the number of code points in the second <emu-nt id="_ref_9001"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt> and <var>e</var> is the MV of <emu-nt id="_ref_9002"><a href="#prod-ExponentPart">ExponentPart</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="StrUnsignedDecimalLiteral" type="regexp" collapsed="" class=" inline">
<emu-nt><a href="#prod-StrUnsignedDecimalLiteral">StrUnsignedDecimalLiteral</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="c1f33372"><emu-t>.</emu-t><emu-nt id="_ref_9003"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_9004"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt> times 10<sup>-<var>n</var></sup>, where <var>n</var> is the number of code points in <emu-nt id="_ref_9005"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="StrUnsignedDecimalLiteral" type="regexp" collapsed="" class=" inline">
<emu-nt><a href="#prod-StrUnsignedDecimalLiteral">StrUnsignedDecimalLiteral</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="0cd5f3c3"><emu-t>.</emu-t><emu-nt id="_ref_9006"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-nt id="_ref_9007"><a href="#prod-ExponentPart">ExponentPart</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_9008"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt> times 10<sup><var>e</var> - <var>n</var></sup>, where <var>n</var> is the number of code points in <emu-nt id="_ref_9009"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt> and <var>e</var> is the MV of <emu-nt id="_ref_9010"><a href="#prod-ExponentPart">ExponentPart</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="StrUnsignedDecimalLiteral" type="regexp" collapsed="" class=" inline">
<emu-nt><a href="#prod-StrUnsignedDecimalLiteral">StrUnsignedDecimalLiteral</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="6d7b4e5f"><emu-nt id="_ref_9011"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_9012"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="StrUnsignedDecimalLiteral" type="regexp" collapsed="" class=" inline">
<emu-nt><a href="#prod-StrUnsignedDecimalLiteral">StrUnsignedDecimalLiteral</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="2e993467"><emu-nt id="_ref_9013"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-nt id="_ref_9014"><a href="#prod-ExponentPart">ExponentPart</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_9015"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt> times 10<sup><var>e</var></sup>, where <var>e</var> is the MV of <emu-nt id="_ref_9016"><a href="#prod-ExponentPart">ExponentPart</a></emu-nt>.
</li>
</ul>
<p>Once the exact MV for a String numeric literal has been
determined, it is then rounded to a value of the Number type. If the MV
is 0, then the rounded value is <emu-val>+0</emu-val> unless the first non white space code point in the String numeric literal is <code>"-"</code>, in which case the rounded value is <emu-val>-0</emu-val>. Otherwise, the rounded value must be the Number value for the MV (in the sense defined in <emu-xref href="#sec-ecmascript-language-types-number-type" id="_ref_142"><a href="#sec-ecmascript-language-types-number-type">6.1.6</a></emu-xref>), unless the literal includes a <emu-nt id="_ref_9017"><a href="#prod-StrUnsignedDecimalLiteral">StrUnsignedDecimalLiteral</a></emu-nt>
and the literal has more than 20 significant digits, in which case the
Number value may be either the Number value for the MV of a literal
produced by replacing each significant digit after the 20th with a 0
digit or the Number value for the MV of a literal produced by replacing
each significant digit after the 20th with a 0 digit and then
incrementing the literal at the 20th digit position. A digit is
significant if it is not part of an <emu-nt id="_ref_9018"><a href="#prod-ExponentPart">ExponentPart</a></emu-nt> and</p>
<ul>
<li>
it is not <code>0</code>; or
</li>
<li>
there is a nonzero digit to its left and there is a nonzero digit, not in the <emu-nt id="_ref_9019"><a href="#prod-ExponentPart">ExponentPart</a></emu-nt>, to its right.
</li>
</ul>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-tointeger" aoid="ToInteger">
<h1><span class="secnum">7.1.4</span>ToInteger ( <var>argument</var> )</h1>
<p>The abstract operation ToInteger converts <var>argument</var> to an integral numeric value. This abstract operation functions as follows:</p>
<emu-alg><ol><li>Let <var>number</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_1454"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>argument</var>).</li><li>If <var>number</var> is <emu-val>NaN</emu-val>, return <emu-val>+0</emu-val>.</li><li>If <var>number</var> is <emu-val>+0</emu-val>, <emu-val>-0</emu-val>, <emu-val>+∞</emu-val>, or <emu-val>-∞</emu-val>, return <var>number</var>.</li><li>Return the number value that is the same sign as <var>number</var> and whose magnitude is <emu-xref aoid="floor" id="_ref_1455"><a href="#eqn-floor">floor</a></emu-xref>(<emu-xref aoid="abs" id="_ref_1456"><a href="#eqn-abs">abs</a></emu-xref>(<var>number</var>)).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-toint32" aoid="ToInt32">
<h1><span class="secnum">7.1.5</span>ToInt32 ( <var>argument</var> )</h1>
<p>The abstract operation ToInt32 converts <var>argument</var> to one of 2<sup>32</sup> integer values in the range <emu-eqn class="inline">-2<sup>31</sup></emu-eqn> through <emu-eqn class="inline">2<sup>31</sup> - 1</emu-eqn>, inclusive. This abstract operation functions as follows:</p>
<emu-alg><ol><li>Let <var>number</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_1457"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>argument</var>).</li><li>If <var>number</var> is <emu-val>NaN</emu-val>, <emu-val>+0</emu-val>, <emu-val>-0</emu-val>, <emu-val>+∞</emu-val>, or <emu-val>-∞</emu-val>, return <emu-val>+0</emu-val>.</li><li>Let <var>int</var> be the mathematical value that is the same sign as <var>number</var> and whose magnitude is <emu-xref aoid="floor" id="_ref_1458"><a href="#eqn-floor">floor</a></emu-xref>(<emu-xref aoid="abs" id="_ref_1459"><a href="#eqn-abs">abs</a></emu-xref>(<var>number</var>)).</li><li>Let <var>int32bit</var> be <var>int</var> <emu-xref aoid="modulo" id="_ref_1460"><a href="#eqn-modulo">modulo</a></emu-xref> 2<sup>32</sup>.</li><li>If <var>int32bit</var> ≥ 2<sup>31</sup>, return <var>int32bit</var> - 2<sup>32</sup>; otherwise return <var>int32bit</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Given the above definition of ToInt32:</p>
<ul>
<li>
The ToInt32 abstract operation is idempotent: if applied to a
result that it produced, the second application leaves that value
unchanged.
</li>
<li>
ToInt32(<emu-xref aoid="ToUint32" id="_ref_1461"><a href="#sec-touint32">ToUint32</a></emu-xref>(<var>x</var>)) is equal to ToInt32(<var>x</var>) for all values of <var>x</var>. (It is to preserve this latter property that <emu-val>+∞</emu-val> and <emu-val>-∞</emu-val> are mapped to <emu-val>+0</emu-val>.)
</li>
<li>
ToInt32 maps <emu-val>-0</emu-val> to <emu-val>+0</emu-val>.
</li>
</ul>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-touint32" aoid="ToUint32">
<h1><span class="secnum">7.1.6</span>ToUint32 ( <var>argument</var> )</h1>
<p>The abstract operation ToUint32 converts <var>argument</var> to one of 2<sup>32</sup> integer values in the range 0 through <emu-eqn class="inline">2<sup>32</sup> - 1</emu-eqn>, inclusive. This abstract operation functions as follows:</p>
<emu-alg><ol><li>Let <var>number</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_1462"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>argument</var>).</li><li>If <var>number</var> is <emu-val>NaN</emu-val>, <emu-val>+0</emu-val>, <emu-val>-0</emu-val>, <emu-val>+∞</emu-val>, or <emu-val>-∞</emu-val>, return <emu-val>+0</emu-val>.</li><li>Let <var>int</var> be the mathematical value that is the same sign as <var>number</var> and whose magnitude is <emu-xref aoid="floor" id="_ref_1463"><a href="#eqn-floor">floor</a></emu-xref>(<emu-xref aoid="abs" id="_ref_1464"><a href="#eqn-abs">abs</a></emu-xref>(<var>number</var>)).</li><li>Let <var>int32bit</var> be <var>int</var> <emu-xref aoid="modulo" id="_ref_1465"><a href="#eqn-modulo">modulo</a></emu-xref> 2<sup>32</sup>.</li><li>Return <var>int32bit</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Given the above definition of ToUint32:</p>
<ul>
<li>
Step 5 is the only difference between ToUint32 and <emu-xref aoid="ToInt32" id="_ref_1466"><a href="#sec-toint32">ToInt32</a></emu-xref>.
</li>
<li>
The ToUint32 abstract operation is idempotent: if applied to
a result that it produced, the second application leaves that value
unchanged.
</li>
<li>
ToUint32(<emu-xref aoid="ToInt32" id="_ref_1467"><a href="#sec-toint32">ToInt32</a></emu-xref>(<var>x</var>)) is equal to ToUint32(<var>x</var>) for all values of <var>x</var>. (It is to preserve this latter property that <emu-val>+∞</emu-val> and <emu-val>-∞</emu-val> are mapped to <emu-val>+0</emu-val>.)
</li>
<li>
ToUint32 maps <emu-val>-0</emu-val> to <emu-val>+0</emu-val>.
</li>
</ul>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-toint16" aoid="ToInt16">
<h1><span class="secnum">7.1.7</span>ToInt16 ( <var>argument</var> )</h1>
<p>The abstract operation ToInt16 converts <var>argument</var> to one of 2<sup>16</sup> integer values in the range -32768 through 32767, inclusive. This abstract operation functions as follows:</p>
<emu-alg><ol><li>Let <var>number</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_1468"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>argument</var>).</li><li>If <var>number</var> is <emu-val>NaN</emu-val>, <emu-val>+0</emu-val>, <emu-val>-0</emu-val>, <emu-val>+∞</emu-val>, or <emu-val>-∞</emu-val>, return <emu-val>+0</emu-val>.</li><li>Let <var>int</var> be the mathematical value that is the same sign as <var>number</var> and whose magnitude is <emu-xref aoid="floor" id="_ref_1469"><a href="#eqn-floor">floor</a></emu-xref>(<emu-xref aoid="abs" id="_ref_1470"><a href="#eqn-abs">abs</a></emu-xref>(<var>number</var>)).</li><li>Let <var>int16bit</var> be <var>int</var> <emu-xref aoid="modulo" id="_ref_1471"><a href="#eqn-modulo">modulo</a></emu-xref> 2<sup>16</sup>.</li><li>If <var>int16bit</var> ≥ 2<sup>15</sup>, return <var>int16bit</var> - 2<sup>16</sup>; otherwise return <var>int16bit</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-touint16" aoid="ToUint16">
<h1><span class="secnum">7.1.8</span>ToUint16 ( <var>argument</var> )</h1>
<p>The abstract operation ToUint16 converts <var>argument</var> to one of 2<sup>16</sup> integer values in the range 0 through <emu-eqn class="inline">2<sup>16</sup> - 1</emu-eqn>, inclusive. This abstract operation functions as follows:</p>
<emu-alg><ol><li>Let <var>number</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_1472"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>argument</var>).</li><li>If <var>number</var> is <emu-val>NaN</emu-val>, <emu-val>+0</emu-val>, <emu-val>-0</emu-val>, <emu-val>+∞</emu-val>, or <emu-val>-∞</emu-val>, return <emu-val>+0</emu-val>.</li><li>Let <var>int</var> be the mathematical value that is the same sign as <var>number</var> and whose magnitude is <emu-xref aoid="floor" id="_ref_1473"><a href="#eqn-floor">floor</a></emu-xref>(<emu-xref aoid="abs" id="_ref_1474"><a href="#eqn-abs">abs</a></emu-xref>(<var>number</var>)).</li><li>Let <var>int16bit</var> be <var>int</var> <emu-xref aoid="modulo" id="_ref_1475"><a href="#eqn-modulo">modulo</a></emu-xref> 2<sup>16</sup>.</li><li>Return <var>int16bit</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Given the above definition of ToUint16:</p>
<ul>
<li>
The substitution of 2<sup>16</sup> for 2<sup>32</sup> in step 4 is the only difference between <emu-xref aoid="ToUint32" id="_ref_1476"><a href="#sec-touint32">ToUint32</a></emu-xref> and ToUint16.
</li>
<li>
ToUint16 maps <emu-val>-0</emu-val> to <emu-val>+0</emu-val>.
</li>
</ul>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-toint8" aoid="ToInt8">
<h1><span class="secnum">7.1.9</span>ToInt8 ( <var>argument</var> )</h1>
<p>The abstract operation ToInt8 converts <var>argument</var> to one of 2<sup>8</sup> integer values in the range -128 through 127, inclusive. This abstract operation functions as follows:</p>
<emu-alg><ol><li>Let <var>number</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_1477"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>argument</var>).</li><li>If <var>number</var> is <emu-val>NaN</emu-val>, <emu-val>+0</emu-val>, <emu-val>-0</emu-val>, <emu-val>+∞</emu-val>, or <emu-val>-∞</emu-val>, return <emu-val>+0</emu-val>.</li><li>Let <var>int</var> be the mathematical value that is the same sign as <var>number</var> and whose magnitude is <emu-xref aoid="floor" id="_ref_1478"><a href="#eqn-floor">floor</a></emu-xref>(<emu-xref aoid="abs" id="_ref_1479"><a href="#eqn-abs">abs</a></emu-xref>(<var>number</var>)).</li><li>Let <var>int8bit</var> be <var>int</var> <emu-xref aoid="modulo" id="_ref_1480"><a href="#eqn-modulo">modulo</a></emu-xref> 2<sup>8</sup>.</li><li>If <var>int8bit</var> ≥ 2<sup>7</sup>, return <var>int8bit</var> - 2<sup>8</sup>; otherwise return <var>int8bit</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-touint8" aoid="ToUint8">
<h1><span class="secnum">7.1.10</span>ToUint8 ( <var>argument</var> )</h1>
<p>The abstract operation ToUint8 converts <var>argument</var> to one of 2<sup>8</sup> integer values in the range 0 through 255, inclusive. This abstract operation functions as follows:</p>
<emu-alg><ol><li>Let <var>number</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_1481"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>argument</var>).</li><li>If <var>number</var> is <emu-val>NaN</emu-val>, <emu-val>+0</emu-val>, <emu-val>-0</emu-val>, <emu-val>+∞</emu-val>, or <emu-val>-∞</emu-val>, return <emu-val>+0</emu-val>.</li><li>Let <var>int</var> be the mathematical value that is the same sign as <var>number</var> and whose magnitude is <emu-xref aoid="floor" id="_ref_1482"><a href="#eqn-floor">floor</a></emu-xref>(<emu-xref aoid="abs" id="_ref_1483"><a href="#eqn-abs">abs</a></emu-xref>(<var>number</var>)).</li><li>Let <var>int8bit</var> be <var>int</var> <emu-xref aoid="modulo" id="_ref_1484"><a href="#eqn-modulo">modulo</a></emu-xref> 2<sup>8</sup>.</li><li>Return <var>int8bit</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-touint8clamp" aoid="ToUint8Clamp">
<h1><span class="secnum">7.1.11</span>ToUint8Clamp ( <var>argument</var> )</h1>
<p>The abstract operation ToUint8Clamp converts <var>argument</var> to one of 2<sup>8</sup> integer values in the range 0 through 255, inclusive. This abstract operation functions as follows:</p>
<emu-alg><ol><li>Let <var>number</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_1485"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>argument</var>).</li><li>If <var>number</var> is <emu-val>NaN</emu-val>, return <emu-val>+0</emu-val>.</li><li>If <var>number</var> ≤ 0, return <emu-val>+0</emu-val>.</li><li>If <var>number</var> ≥ 255, return 255.</li><li>Let <var>f</var> be <emu-xref aoid="floor" id="_ref_1486"><a href="#eqn-floor">floor</a></emu-xref>(<var>number</var>).</li><li>If <var>f</var> + 0.5 &lt; <var>number</var>, return <var>f</var> + 1.</li><li>If <var>number</var> &lt; <var>f</var> + 0.5, return <var>f</var>.</li><li>If <var>f</var> is odd, return <var>f</var> + 1.</li><li>Return <var>f</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Unlike the other ECMAScript integer conversion abstract
operation, ToUint8Clamp rounds rather than truncates non-integer values
and does not convert <emu-val>+∞</emu-val> to 0. ToUint8Clamp does “round half to even” tie-breaking. This differs from <code>Math.round</code> which does “round half up” tie-breaking.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-tostring" aoid="ToString">
<h1><span class="secnum">7.1.12</span>ToString ( <var>argument</var> )</h1>
<p>The abstract operation ToString converts <var>argument</var> to a value of type String according to <emu-xref href="#table-12" id="_ref_143"><a href="#table-12">Table 11</a></emu-xref>:</p>
<emu-table id="table-12" caption="ToString Conversions"><figure><figcaption>Table 11: <emu-xref aoid="ToString" id="_ref_1487"><a href="#sec-tostring">ToString</a></emu-xref> Conversions</figcaption>
<table>
<tbody>
<tr>
<th>
Argument Type
</th>
<th>
Result
</th>
</tr>
<tr>
<td>
Undefined
</td>
<td>
Return <code>"undefined"</code>.
</td>
</tr>
<tr>
<td>
Null
</td>
<td>
Return <code>"null"</code>.
</td>
</tr>
<tr>
<td>
Boolean
</td>
<td>
<p>If <var>argument</var> is <emu-val>true</emu-val>, return <code>"true"</code>.</p>
<p>If <var>argument</var> is <emu-val>false</emu-val>, return <code>"false"</code>.</p>
</td>
</tr>
<tr>
<td>
Number
</td>
<td>
Return <emu-xref aoid="NumberToString" id="_ref_1488"><a href="#sec-tostring-applied-to-the-number-type">NumberToString</a></emu-xref>(<var>argument</var>).
</td>
</tr>
<tr>
<td>
String
</td>
<td>
Return <var>argument</var>.
</td>
</tr>
<tr>
<td>
Symbol
</td>
<td>
Throw a <emu-val>TypeError</emu-val> exception.
</td>
</tr>
<tr>
<td>
Object
</td>
<td>
<p>Apply the following steps:</p>
<emu-alg><ol><li>Let <var>primValue</var> be ?&nbsp;<emu-xref aoid="ToPrimitive" id="_ref_1489"><a href="#sec-toprimitive">ToPrimitive</a></emu-xref>(<var>argument</var>, hint String).</li><li>Return ?&nbsp;<emu-xref aoid="ToString" id="_ref_1490"><a href="#sec-tostring">ToString</a></emu-xref>(<var>primValue</var>).
</li></ol></emu-alg>
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<emu-clause id="sec-tostring-applied-to-the-number-type" aoid="NumberToString">
<h1><span class="secnum">7.1.12.1</span>NumberToString ( <var>m</var> )</h1>
<p>The abstract operation NumberToString converts a Number <var>m</var> to String format as follows:</p>
<emu-alg><ol><li>If <var>m</var> is <emu-val>NaN</emu-val>, return the String <code>"NaN"</code>.</li><li>If <var>m</var> is <emu-val>+0</emu-val> or <emu-val>-0</emu-val>, return the String <code>"0"</code>.</li><li>If <var>m</var> is less than zero, return the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_1491"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <code>"-"</code> and !&nbsp;<emu-xref aoid="NumberToString" id="_ref_1492"><a href="#sec-tostring-applied-to-the-number-type">NumberToString</a></emu-xref>(-<var>m</var>).</li><li>If <var>m</var> is <emu-val>+∞</emu-val>, return the String <code>"Infinity"</code>.</li><li>Otherwise, let <var>n</var>, <var>k</var>, and <var>s</var> be integers such that <var>k</var> ≥ 1, 10<sup><var>k</var> - 1</sup> ≤ <var>s</var> &lt; 10<sup><var>k</var></sup>, the Number value for <var>s</var> × 10<sup><var>n</var> - <var>k</var></sup> is <var>m</var>, and <var>k</var> is as small as possible. Note that <var>k</var> is the number of digits in the decimal representation of <var>s</var>, that <var>s</var> is not divisible by 10, and that the least significant digit of <var>s</var> is not necessarily uniquely determined by these criteria.</li><li>If <var>k</var> ≤ <var>n</var> ≤ 21, return the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_1493"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of:<ul><li>the code units of the <var>k</var> digits of the decimal representation of <var>s</var> (in order, with no leading zeroes)</li><li><var>n</var> - <var>k</var> occurrences of the code unit 0x0030 (DIGIT ZERO)</li></ul></li><li>If 0 &lt; <var>n</var> ≤ 21, return the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_1494"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of:<ul><li>the code units of the most significant <var>n</var> digits of the decimal representation of <var>s</var></li><li>the code unit 0x002E (FULL STOP)</li><li>the code units of the remaining <var>k</var> - <var>n</var> digits of the decimal representation of <var>s</var></li></ul></li><li>If -6 &lt; <var>n</var> ≤ 0, return the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_1495"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of:<ul><li>the code unit 0x0030 (DIGIT ZERO)</li><li>the code unit 0x002E (FULL STOP)</li><li>-<var>n</var> occurrences of the code unit 0x0030 (DIGIT ZERO)</li><li>the code units of the <var>k</var> digits of the decimal representation of <var>s</var></li></ul></li><li>Otherwise, if <var>k</var> = 1, return the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_1496"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of:<ul><li>the code unit of the single digit of <var>s</var></li><li>the code unit 0x0065 (LATIN SMALL LETTER E)</li><li>the code unit 0x002B (PLUS SIGN) or the code unit 0x002D (HYPHEN-MINUS) according to whether <var>n</var> - 1 is positive or negative</li><li>the code units of the decimal representation of the integer <emu-xref aoid="abs" id="_ref_1497"><a href="#eqn-abs">abs</a></emu-xref>(<var>n</var> - 1) (with no leading zeroes)</li></ul></li><li>Return the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_1498"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of:<ul><li>the code units of the most significant digit of the decimal representation of <var>s</var></li><li>the code unit 0x002E (FULL STOP)</li><li>the code units of the remaining <var>k</var> - 1 digits of the decimal representation of <var>s</var></li><li>the code unit 0x0065 (LATIN SMALL LETTER E)</li><li>the code unit 0x002B (PLUS SIGN) or the code unit 0x002D (HYPHEN-MINUS) according to whether <var>n</var> - 1 is positive or negative</li><li>the code units of the decimal representation of the integer <emu-xref aoid="abs" id="_ref_1499"><a href="#eqn-abs">abs</a></emu-xref>(<var>n</var> - 1) (with no leading zeroes)
</li></ul></li></ol></emu-alg>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>The following observations may be useful as guidelines for
implementations, but are not part of the normative requirements of this
Standard:</p>
<ul>
<li>
If x is any Number value other than <emu-val>-0</emu-val>, then <emu-xref aoid="ToNumber" id="_ref_1500"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<emu-xref aoid="ToString" id="_ref_1501"><a href="#sec-tostring">ToString</a></emu-xref>(x)) is exactly the same Number value as x.
</li>
<li>
The least significant digit of s is not always uniquely determined by the requirements listed in step 5.
</li>
</ul>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>For implementations that provide more accurate conversions
than required by the rules above, it is recommended that the following
alternative version of step 5 be used as a guideline:</p>
<emu-alg><ol start="5"><li>Otherwise, let <var>n</var>, <var>k</var>, and <var>s</var> be integers such that <var>k</var> ≥ 1, 10<sup><var>k</var> - 1</sup> ≤ <var>s</var> &lt; 10<sup><var>k</var></sup>, the Number value for <var>s</var> × 10<sup><var>n</var> - <var>k</var></sup> is <var>m</var>, and <var>k</var> is as small as possible. If there are multiple possibilities for <var>s</var>, choose the value of <var>s</var> for which <var>s</var> × 10<sup><var>n</var> - <var>k</var></sup> is closest in value to <var>m</var>. If there are two such possible values of <var>s</var>, choose the one that is even. Note that <var>k</var> is the number of digits in the decimal representation of <var>s</var> and that <var>s</var> is not divisible by 10.
</li></ol></emu-alg>
</div></emu-note>
<emu-note><span class="note">Note 3</span><div class="note-contents">
<p>Implementers of ECMAScript may find useful the paper and
code written by David M. Gay for binary-to-decimal conversion of
floating-point numbers:</p>
<p>Gay, David M. Correctly Rounded Binary-Decimal and
Decimal-Binary Conversions. Numerical Analysis, Manuscript 90-10.
AT&amp;T Bell Laboratories (Murray Hill, New Jersey). November 30, 1990.
Available as
<br>
<a href="http://ampl.com/REFS/abstracts.html#rounding">http://ampl.com/REFS/abstracts.html#rounding</a>. Associated code available as
<br>
<a href="http://netlib.sandia.gov/fp/dtoa.c">http://netlib.sandia.gov/fp/dtoa.c</a> and as
<br>
<a href="http://netlib.sandia.gov/fp/g_fmt.c">http://netlib.sandia.gov/fp/g_fmt.c</a> and may also be found at the various <code>netlib</code> mirror sites.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-toobject" aoid="ToObject">
<h1><span class="secnum">7.1.13</span>ToObject ( <var>argument</var> )</h1>
<p>The abstract operation ToObject converts <var>argument</var> to a value of type Object according to <emu-xref href="#table-13" id="_ref_144"><a href="#table-13">Table 12</a></emu-xref>:</p>
<emu-table id="table-13" caption="ToObject Conversions"><figure><figcaption>Table 12: <emu-xref aoid="ToObject" id="_ref_1502"><a href="#sec-toobject">ToObject</a></emu-xref> Conversions</figcaption>
<table>
<tbody>
<tr>
<th>
Argument Type
</th>
<th>
Result
</th>
</tr>
<tr>
<td>
Undefined
</td>
<td>
Throw a <emu-val>TypeError</emu-val> exception.
</td>
</tr>
<tr>
<td>
Null
</td>
<td>
Throw a <emu-val>TypeError</emu-val> exception.
</td>
</tr>
<tr>
<td>
Boolean
</td>
<td>
Return a new Boolean object whose [[BooleanData]] internal slot is set to <var>argument</var>. See <emu-xref href="#sec-boolean-objects" id="_ref_145"><a href="#sec-boolean-objects">19.3</a></emu-xref> for a description of Boolean objects.
</td>
</tr>
<tr>
<td>
Number
</td>
<td>
Return a new Number object whose [[NumberData]] internal slot is set to <var>argument</var>. See <emu-xref href="#sec-number-objects" id="_ref_146"><a href="#sec-number-objects">20.1</a></emu-xref> for a description of Number objects.
</td>
</tr>
<tr>
<td>
String
</td>
<td>
Return a new String object whose [[StringData]] internal slot is set to <var>argument</var>. See <emu-xref href="#sec-string-objects" id="_ref_147"><a href="#sec-string-objects">21.1</a></emu-xref> for a description of String objects.
</td>
</tr>
<tr>
<td>
Symbol
</td>
<td>
Return a new Symbol object whose [[SymbolData]] internal slot is set to <var>argument</var>. See <emu-xref href="#sec-symbol-objects" id="_ref_148"><a href="#sec-symbol-objects">19.4</a></emu-xref> for a description of Symbol objects.
</td>
</tr>
<tr>
<td>
Object
</td>
<td>
Return <var>argument</var>.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
</emu-clause>
<emu-clause id="sec-topropertykey" aoid="ToPropertyKey">
<h1><span class="secnum">7.1.14</span>ToPropertyKey ( <var>argument</var> )</h1>
<p>The abstract operation ToPropertyKey converts <var>argument</var> to a value that can be used as a property key by performing the following steps:</p>
<emu-alg><ol><li>Let <var>key</var> be ?&nbsp;<emu-xref aoid="ToPrimitive" id="_ref_1503"><a href="#sec-toprimitive">ToPrimitive</a></emu-xref>(<var>argument</var>, hint String).</li><li>If <emu-xref aoid="Type" id="_ref_1504"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>key</var>) is Symbol, then<ol><li>Return <var>key</var>.</li></ol></li><li>Return !&nbsp;<emu-xref aoid="ToString" id="_ref_1505"><a href="#sec-tostring">ToString</a></emu-xref>(<var>key</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-tolength" aoid="ToLength">
<h1><span class="secnum">7.1.15</span>ToLength ( <var>argument</var> )</h1>
<p>The abstract operation ToLength converts <var>argument</var> to an integer suitable for use as the length of an array-like object. It performs the following steps:</p>
<emu-alg><ol><li>Let <var>len</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_1506"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>argument</var>).</li><li>If <var>len</var> ≤ <emu-val>+0</emu-val>, return <emu-val>+0</emu-val>.</li><li>Return <emu-xref aoid="min" id="_ref_1507"><a href="#eqn-min">min</a></emu-xref>(<var>len</var>, 2<sup>53</sup> - 1).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-canonicalnumericindexstring" aoid="CanonicalNumericIndexString">
<h1><span class="secnum">7.1.16</span>CanonicalNumericIndexString ( <var>argument</var> )</h1>
<p>The abstract operation CanonicalNumericIndexString returns <var>argument</var> converted to a numeric value if it is a String representation of a Number that would be produced by <emu-xref aoid="ToString" id="_ref_1508"><a href="#sec-tostring">ToString</a></emu-xref>, or the string <code>"-0"</code>. Otherwise, it returns <emu-val>undefined</emu-val>. This abstract operation functions as follows:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1509"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1510"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>argument</var>) is String.</li><li>If <var>argument</var> is <code>"-0"</code>, return <emu-val>-0</emu-val>.</li><li>Let <var>n</var> be !&nbsp;<emu-xref aoid="ToNumber" id="_ref_1511"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>argument</var>).</li><li>If <emu-xref aoid="SameValue" id="_ref_1512"><a href="#sec-samevalue">SameValue</a></emu-xref>(! <emu-xref aoid="ToString" id="_ref_1513"><a href="#sec-tostring">ToString</a></emu-xref>(<var>n</var>), <var>argument</var>) is <emu-val>false</emu-val>, return <emu-val>undefined</emu-val>.</li><li>Return <var>n</var>.
</li></ol></emu-alg>
<p>A <em>canonical numeric string</em> is any String value for which the CanonicalNumericIndexString abstract operation does not return <emu-val>undefined</emu-val>.</p>
</emu-clause>
<emu-clause id="sec-toindex" aoid="ToIndex">
<h1><span class="secnum">7.1.17</span>ToIndex ( <var>value</var> )</h1>
<p>The abstract operation ToIndex returns <var>value</var> argument converted to a numeric value if it is a valid <emu-xref href="#integer-index" id="_ref_1514"><a href="#integer-index">integer index</a></emu-xref> value. This abstract operation functions as follows:</p>
<emu-alg><ol><li>If <var>value</var> is <emu-val>undefined</emu-val>, then<ol><li>Let <var>index</var> be 0.</li></ol></li><li>Else,<ol><li>Let <var>integerIndex</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_1515"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>value</var>).</li><li>If <var>integerIndex</var> &lt; 0, throw a <emu-val>RangeError</emu-val> exception.</li><li>Let <var>index</var> be !&nbsp;<emu-xref aoid="ToLength" id="_ref_1516"><a href="#sec-tolength">ToLength</a></emu-xref>(<var>integerIndex</var>).</li><li>If <emu-xref aoid="SameValueZero" id="_ref_1517"><a href="#sec-samevaluezero">SameValueZero</a></emu-xref>(<var>integerIndex</var>, <var>index</var>) is <emu-val>false</emu-val>, throw a <emu-val>RangeError</emu-val> exception.</li></ol></li><li>Return <var>index</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-testing-and-comparison-operations">
<h1><span class="secnum">7.2</span>Testing and Comparison Operations</h1>
<emu-clause id="sec-requireobjectcoercible" aoid="RequireObjectCoercible">
<h1><span class="secnum">7.2.1</span>RequireObjectCoercible ( <var>argument</var> )</h1>
<p>The abstract operation RequireObjectCoercible throws an error if <var>argument</var> is a value that cannot be converted to an Object using <emu-xref aoid="ToObject" id="_ref_1518"><a href="#sec-toobject">ToObject</a></emu-xref>. It is defined by <emu-xref href="#table-14" id="_ref_149"><a href="#table-14">Table 13</a></emu-xref>:</p>
<emu-table id="table-14" caption="RequireObjectCoercible Results"><figure><figcaption>Table 13: <emu-xref aoid="RequireObjectCoercible" id="_ref_1519"><a href="#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref> Results</figcaption>
<table>
<tbody>
<tr>
<th>
Argument Type
</th>
<th>
Result
</th>
</tr>
<tr>
<td>
Undefined
</td>
<td>
Throw a <emu-val>TypeError</emu-val> exception.
</td>
</tr>
<tr>
<td>
Null
</td>
<td>
Throw a <emu-val>TypeError</emu-val> exception.
</td>
</tr>
<tr>
<td>
Boolean
</td>
<td>
Return <var>argument</var>.
</td>
</tr>
<tr>
<td>
Number
</td>
<td>
Return <var>argument</var>.
</td>
</tr>
<tr>
<td>
String
</td>
<td>
Return <var>argument</var>.
</td>
</tr>
<tr>
<td>
Symbol
</td>
<td>
Return <var>argument</var>.
</td>
</tr>
<tr>
<td>
Object
</td>
<td>
Return <var>argument</var>.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
</emu-clause>
<emu-clause id="sec-isarray" aoid="IsArray">
<h1><span class="secnum">7.2.2</span>IsArray ( <var>argument</var> )</h1>
<p>The abstract operation IsArray takes one argument <var>argument</var>, and performs the following steps:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_1520"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>argument</var>) is not Object, return <emu-val>false</emu-val>.</li><li>If <var>argument</var> is an Array <emu-xref href="#exotic-object" id="_ref_1521"><a href="#exotic-object">exotic object</a></emu-xref>, return <emu-val>true</emu-val>.</li><li>If <var>argument</var> is a Proxy <emu-xref href="#exotic-object" id="_ref_1522"><a href="#exotic-object">exotic object</a></emu-xref>, then<ol><li>If <var>argument</var>.[[ProxyHandler]] is <emu-val>null</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>target</var> be <var>argument</var>.[[ProxyTarget]].</li><li>Return ?&nbsp;<emu-xref aoid="IsArray" id="_ref_1523"><a href="#sec-isarray">IsArray</a></emu-xref>(<var>target</var>).</li></ol></li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-iscallable" aoid="IsCallable">
<h1><span class="secnum">7.2.3</span>IsCallable ( <var>argument</var> )</h1>
<p>The abstract operation IsCallable determines if <var>argument</var>, which must be an <emu-xref href="#sec-ecmascript-language-types" id="_ref_1524"><a href="#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref>, is a callable function with a [[Call]] internal method.</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_1525"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>argument</var>) is not Object, return <emu-val>false</emu-val>.</li><li>If <var>argument</var> has a [[Call]] internal method, return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-isconstructor" aoid="IsConstructor">
<h1><span class="secnum">7.2.4</span>IsConstructor ( <var>argument</var> )</h1>
<p>The abstract operation IsConstructor determines if <var>argument</var>, which must be an <emu-xref href="#sec-ecmascript-language-types" id="_ref_1526"><a href="#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref>, is a <emu-xref href="#function-object" id="_ref_1527"><a href="#function-object">function object</a></emu-xref> with a [[Construct]] internal method.</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_1528"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>argument</var>) is not Object, return <emu-val>false</emu-val>.</li><li>If <var>argument</var> has a [[Construct]] internal method, return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-isextensible-o" aoid="IsExtensible">
<h1><span class="secnum">7.2.5</span>IsExtensible ( <var>O</var> )</h1>
<p>The abstract operation IsExtensible is used to determine whether additional properties can be added to the object that is <var>O</var>. A Boolean value is returned. This abstract operation performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1529"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1530"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is Object.</li><li>Return ? <var>O</var>.[[IsExtensible]]().
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-isinteger" aoid="IsInteger">
<h1><span class="secnum">7.2.6</span>IsInteger ( <var>argument</var> )</h1>
<p>The abstract operation IsInteger determines if <var>argument</var> is a finite integer numeric value.</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_1531"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>argument</var>) is not Number, return <emu-val>false</emu-val>.</li><li>If <var>argument</var> is <emu-val>NaN</emu-val>, <emu-val>+∞</emu-val>, or <emu-val>-∞</emu-val>, return <emu-val>false</emu-val>.</li><li>If <emu-xref aoid="floor" id="_ref_1532"><a href="#eqn-floor">floor</a></emu-xref>(<emu-xref aoid="abs" id="_ref_1533"><a href="#eqn-abs">abs</a></emu-xref>(<var>argument</var>)) ≠ <emu-xref aoid="abs" id="_ref_1534"><a href="#eqn-abs">abs</a></emu-xref>(<var>argument</var>), return <emu-val>false</emu-val>.</li><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-ispropertykey" aoid="IsPropertyKey">
<h1><span class="secnum">7.2.7</span>IsPropertyKey ( <var>argument</var> )</h1>
<p>The abstract operation IsPropertyKey determines if <var>argument</var>, which must be an <emu-xref href="#sec-ecmascript-language-types" id="_ref_1535"><a href="#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref>, is a value that may be used as a property key.</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_1536"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>argument</var>) is String, return <emu-val>true</emu-val>.</li><li>If <emu-xref aoid="Type" id="_ref_1537"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>argument</var>) is Symbol, return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-isregexp" aoid="IsRegExp">
<h1><span class="secnum">7.2.8</span>IsRegExp ( <var>argument</var> )</h1>
<p>The abstract operation IsRegExp with argument <var>argument</var> performs the following steps:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_1538"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>argument</var>) is not Object, return <emu-val>false</emu-val>.</li><li>Let <var>matcher</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_1539"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>argument</var>, @@match).</li><li>If <var>matcher</var> is not <emu-val>undefined</emu-val>, return <emu-xref aoid="ToBoolean" id="_ref_1540"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(<var>matcher</var>).</li><li>If <var>argument</var> has a [[RegExpMatcher]] internal slot, return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-isstringprefix" aoid="IsStringPrefix">
<h1><span class="secnum">7.2.9</span>IsStringPrefix ( <var>p</var>, <var>q</var> )</h1>
<p>The abstract operation IsStringPrefix determines if String <var>p</var> is a prefix of String <var>q</var>.</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1541"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1542"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>p</var>) is String.</li><li><emu-xref href="#assert" id="_ref_1543"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1544"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>q</var>) is String.</li><li>If <var>q</var> can be the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_1545"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>p</var> and some other String <var>r</var>, return <emu-val>true</emu-val>. Otherwise, return <emu-val>false</emu-val>.</li><li>NOTE: Any String is a prefix of itself, because <var>r</var> may be the empty String.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-samevalue" aoid="SameValue">
<h1><span class="secnum">7.2.10</span>SameValue ( <var>x</var>, <var>y</var> )</h1>
<p>The internal comparison abstract operation SameValue(<var>x</var>, <var>y</var>), where <var>x</var> and <var>y</var> are ECMAScript language values, produces <emu-val>true</emu-val> or <emu-val>false</emu-val>. Such a comparison is performed as follows:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_1546"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>x</var>) is different from <emu-xref aoid="Type" id="_ref_1547"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>y</var>), return <emu-val>false</emu-val>.</li><li>If <emu-xref aoid="Type" id="_ref_1548"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>x</var>) is Number, then<ol><li>If <var>x</var> is <emu-val>NaN</emu-val> and <var>y</var> is <emu-val>NaN</emu-val>, return <emu-val>true</emu-val>.</li><li>If <var>x</var> is <emu-val>+0</emu-val> and <var>y</var> is <emu-val>-0</emu-val>, return <emu-val>false</emu-val>.</li><li>If <var>x</var> is <emu-val>-0</emu-val> and <var>y</var> is <emu-val>+0</emu-val>, return <emu-val>false</emu-val>.</li><li>If <var>x</var> is the same Number value as <var>y</var>, return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.</li></ol></li><li>Return <emu-xref aoid="SameValueNonNumber" id="_ref_1549"><a href="#sec-samevaluenonnumber">SameValueNonNumber</a></emu-xref>(<var>x</var>, <var>y</var>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>This algorithm differs from the <emu-xref aoid="Strict Equality Comparison" id="_ref_1550"><a href="#sec-strict-equality-comparison">Strict Equality Comparison</a></emu-xref> Algorithm in its treatment of signed zeroes and NaNs.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-samevaluezero" aoid="SameValueZero">
<h1><span class="secnum">7.2.11</span>SameValueZero ( <var>x</var>, <var>y</var> )</h1>
<p>The internal comparison abstract operation SameValueZero(<var>x</var>, <var>y</var>), where <var>x</var> and <var>y</var> are ECMAScript language values, produces <emu-val>true</emu-val> or <emu-val>false</emu-val>. Such a comparison is performed as follows:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_1551"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>x</var>) is different from <emu-xref aoid="Type" id="_ref_1552"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>y</var>), return <emu-val>false</emu-val>.</li><li>If <emu-xref aoid="Type" id="_ref_1553"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>x</var>) is Number, then<ol><li>If <var>x</var> is <emu-val>NaN</emu-val> and <var>y</var> is <emu-val>NaN</emu-val>, return <emu-val>true</emu-val>.</li><li>If <var>x</var> is <emu-val>+0</emu-val> and <var>y</var> is <emu-val>-0</emu-val>, return <emu-val>true</emu-val>.</li><li>If <var>x</var> is <emu-val>-0</emu-val> and <var>y</var> is <emu-val>+0</emu-val>, return <emu-val>true</emu-val>.</li><li>If <var>x</var> is the same Number value as <var>y</var>, return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.</li></ol></li><li>Return <emu-xref aoid="SameValueNonNumber" id="_ref_1554"><a href="#sec-samevaluenonnumber">SameValueNonNumber</a></emu-xref>(<var>x</var>, <var>y</var>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>SameValueZero differs from <emu-xref aoid="SameValue" id="_ref_1555"><a href="#sec-samevalue">SameValue</a></emu-xref> only in its treatment of <emu-val>+0</emu-val> and <emu-val>-0</emu-val>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-samevaluenonnumber" aoid="SameValueNonNumber">
<h1><span class="secnum">7.2.12</span>SameValueNonNumber ( <var>x</var>, <var>y</var> )</h1>
<p>The internal comparison abstract operation SameValueNonNumber(<var>x</var>, <var>y</var>), where neither <var>x</var> nor <var>y</var> are Number values, produces <emu-val>true</emu-val> or <emu-val>false</emu-val>. Such a comparison is performed as follows:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1556"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1557"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>x</var>) is not Number.</li><li><emu-xref href="#assert" id="_ref_1558"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1559"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>x</var>) is the same as <emu-xref aoid="Type" id="_ref_1560"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>y</var>).</li><li>If <emu-xref aoid="Type" id="_ref_1561"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>x</var>) is Undefined, return <emu-val>true</emu-val>.</li><li>If <emu-xref aoid="Type" id="_ref_1562"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>x</var>) is Null, return <emu-val>true</emu-val>.</li><li>If <emu-xref aoid="Type" id="_ref_1563"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>x</var>) is String, then<ol><li>If <var>x</var> and <var>y</var> are exactly the same sequence of code units (same length and same code units at corresponding indices), return <emu-val>true</emu-val>; otherwise, return <emu-val>false</emu-val>.</li></ol></li><li>If <emu-xref aoid="Type" id="_ref_1564"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>x</var>) is Boolean, then<ol><li>If <var>x</var> and <var>y</var> are both <emu-val>true</emu-val> or both <emu-val>false</emu-val>, return <emu-val>true</emu-val>; otherwise, return <emu-val>false</emu-val>.</li></ol></li><li>If <emu-xref aoid="Type" id="_ref_1565"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>x</var>) is Symbol, then<ol><li>If <var>x</var> and <var>y</var> are both the same Symbol value, return <emu-val>true</emu-val>; otherwise, return <emu-val>false</emu-val>.</li></ol></li><li>If <var>x</var> and <var>y</var> are the same Object value, return <emu-val>true</emu-val>. Otherwise, return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-abstract-relational-comparison" aoid="Abstract Relational Comparison">
<h1><span class="secnum">7.2.13</span>Abstract Relational Comparison</h1>
<p>The comparison <var>x</var> &lt; <var>y</var>, where <var>x</var> and <var>y</var> are values, produces <emu-val>true</emu-val>, <emu-val>false</emu-val>, or <emu-val>undefined</emu-val> (which indicates that at least one operand is <emu-val>NaN</emu-val>). In addition to <var>x</var> and <var>y</var> the algorithm takes a Boolean flag named <var>LeftFirst</var>
as a parameter. The flag is used to control the order in which
operations with potentially visible side-effects are performed upon <var>x</var> and <var>y</var>. It is necessary because ECMAScript specifies left to right evaluation of expressions. The default value of <var>LeftFirst</var> is <emu-val>true</emu-val> and indicates that the <var>x</var> parameter corresponds to an expression that occurs to the left of the <var>y</var> parameter's corresponding expression. If <var>LeftFirst</var> is <emu-val>false</emu-val>, the reverse is the case and operations must be performed upon <var>y</var> before <var>x</var>. Such a comparison is performed as follows:</p>
<emu-alg><ol><li>If the <var>LeftFirst</var> flag is <emu-val>true</emu-val>, then<ol><li>Let <var>px</var> be ?&nbsp;<emu-xref aoid="ToPrimitive" id="_ref_1566"><a href="#sec-toprimitive">ToPrimitive</a></emu-xref>(<var>x</var>, hint Number).</li><li>Let <var>py</var> be ?&nbsp;<emu-xref aoid="ToPrimitive" id="_ref_1567"><a href="#sec-toprimitive">ToPrimitive</a></emu-xref>(<var>y</var>, hint Number).</li></ol></li><li>Else the order of evaluation needs to be reversed to preserve left to right evaluation,<ol><li>Let <var>py</var> be ?&nbsp;<emu-xref aoid="ToPrimitive" id="_ref_1568"><a href="#sec-toprimitive">ToPrimitive</a></emu-xref>(<var>y</var>, hint Number).</li><li>Let <var>px</var> be ?&nbsp;<emu-xref aoid="ToPrimitive" id="_ref_1569"><a href="#sec-toprimitive">ToPrimitive</a></emu-xref>(<var>x</var>, hint Number).</li></ol></li><li>If <emu-xref aoid="Type" id="_ref_1570"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>px</var>) is String and <emu-xref aoid="Type" id="_ref_1571"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>py</var>) is String, then<ol><li>If <emu-xref aoid="IsStringPrefix" id="_ref_1572"><a href="#sec-isstringprefix">IsStringPrefix</a></emu-xref>(<var>py</var>, <var>px</var>) is <emu-val>true</emu-val>, return <emu-val>false</emu-val>.</li><li>If <emu-xref aoid="IsStringPrefix" id="_ref_1573"><a href="#sec-isstringprefix">IsStringPrefix</a></emu-xref>(<var>px</var>, <var>py</var>) is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Let <var>k</var> be the smallest nonnegative integer such that the code unit at index <var>k</var> within <var>px</var> is different from the code unit at index <var>k</var> within <var>py</var>. (There must be such a <var>k</var>, for neither String is a prefix of the other.)</li><li>Let <var>m</var> be the integer that is the numeric value of the code unit at index <var>k</var> within <var>px</var>.</li><li>Let <var>n</var> be the integer that is the numeric value of the code unit at index <var>k</var> within <var>py</var>.</li><li>If <var>m</var> &lt; <var>n</var>, return <emu-val>true</emu-val>. Otherwise, return <emu-val>false</emu-val>.</li></ol></li><li>Else,<ol><li>NOTE: Because <var>px</var> and <var>py</var> are primitive values evaluation order is not important.</li><li>Let <var>nx</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_1574"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>px</var>).</li><li>Let <var>ny</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_1575"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>py</var>).</li><li>If <var>nx</var> is <emu-val>NaN</emu-val>, return <emu-val>undefined</emu-val>.</li><li>If <var>ny</var> is <emu-val>NaN</emu-val>, return <emu-val>undefined</emu-val>.</li><li>If <var>nx</var> and <var>ny</var> are the same Number value, return <emu-val>false</emu-val>.</li><li>If <var>nx</var> is <emu-val>+0</emu-val> and <var>ny</var> is <emu-val>-0</emu-val>, return <emu-val>false</emu-val>.</li><li>If <var>nx</var> is <emu-val>-0</emu-val> and <var>ny</var> is <emu-val>+0</emu-val>, return <emu-val>false</emu-val>.</li><li>If <var>nx</var> is <emu-val>+∞</emu-val>, return <emu-val>false</emu-val>.</li><li>If <var>ny</var> is <emu-val>+∞</emu-val>, return <emu-val>true</emu-val>.</li><li>If <var>ny</var> is <emu-val>-∞</emu-val>, return <emu-val>false</emu-val>.</li><li>If <var>nx</var> is <emu-val>-∞</emu-val>, return <emu-val>true</emu-val>.</li><li>If the mathematical value of <var>nx</var> is less than the mathematical value of <var>ny</var>—note that these mathematical values are both finite and not both zero—return <emu-val>true</emu-val>. Otherwise, return <emu-val>false</emu-val>.
</li></ol></li></ol></emu-alg>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>Step 3 differs from step 7 in the algorithm for the addition operator <code>+</code> (<emu-xref href="#sec-addition-operator-plus" id="_ref_150"><a href="#sec-addition-operator-plus">12.8.3</a></emu-xref>) by using the logical-and operation instead of the logical-or operation.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The comparison of Strings uses a simple lexicographic
ordering 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 String 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.
Also, note that for strings containing supplementary characters,
lexicographic ordering on sequences of UTF-16 code unit values differs
from that on sequences of code point values.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-abstract-equality-comparison" aoid="Abstract Equality Comparison">
<h1><span class="secnum">7.2.14</span>Abstract Equality Comparison</h1>
<p>The comparison <var>x</var> == <var>y</var>, where <var>x</var> and <var>y</var> are values, produces <emu-val>true</emu-val> or <emu-val>false</emu-val>. Such a comparison is performed as follows:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_1576"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>x</var>) is the same as <emu-xref aoid="Type" id="_ref_1577"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>y</var>), then<ol><li>Return the result of performing <emu-xref aoid="Strict Equality Comparison" id="_ref_1578"><a href="#sec-strict-equality-comparison">Strict Equality Comparison</a></emu-xref> <var>x</var> === <var>y</var>.</li></ol></li><li>If <var>x</var> is <emu-val>null</emu-val> and <var>y</var> is <emu-val>undefined</emu-val>, return <emu-val>true</emu-val>.</li><li>If <var>x</var> is <emu-val>undefined</emu-val> and <var>y</var> is <emu-val>null</emu-val>, return <emu-val>true</emu-val>.</li><li>If <emu-xref aoid="Type" id="_ref_1579"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>x</var>) is Number and <emu-xref aoid="Type" id="_ref_1580"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>y</var>) is String, return the result of the comparison <var>x</var> == !&nbsp;<emu-xref aoid="ToNumber" id="_ref_1581"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>y</var>).</li><li>If <emu-xref aoid="Type" id="_ref_1582"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>x</var>) is String and <emu-xref aoid="Type" id="_ref_1583"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>y</var>) is Number, return the result of the comparison !&nbsp;<emu-xref aoid="ToNumber" id="_ref_1584"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>x</var>) == <var>y</var>.</li><li>If <emu-xref aoid="Type" id="_ref_1585"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>x</var>) is Boolean, return the result of the comparison !&nbsp;<emu-xref aoid="ToNumber" id="_ref_1586"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>x</var>) == <var>y</var>.</li><li>If <emu-xref aoid="Type" id="_ref_1587"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>y</var>) is Boolean, return the result of the comparison <var>x</var> == !&nbsp;<emu-xref aoid="ToNumber" id="_ref_1588"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>y</var>).</li><li>If <emu-xref aoid="Type" id="_ref_1589"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>x</var>) is either String, Number, or Symbol and <emu-xref aoid="Type" id="_ref_1590"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>y</var>) is Object, return the result of the comparison <var>x</var> == <emu-xref aoid="ToPrimitive" id="_ref_1591"><a href="#sec-toprimitive">ToPrimitive</a></emu-xref>(<var>y</var>).</li><li>If <emu-xref aoid="Type" id="_ref_1592"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>x</var>) is Object and <emu-xref aoid="Type" id="_ref_1593"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>y</var>) is either String, Number, or Symbol, return the result of the comparison <emu-xref aoid="ToPrimitive" id="_ref_1594"><a href="#sec-toprimitive">ToPrimitive</a></emu-xref>(<var>x</var>) == <var>y</var>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-strict-equality-comparison" aoid="Strict Equality Comparison">
<h1><span class="secnum">7.2.15</span>Strict Equality Comparison</h1>
<p>The comparison <var>x</var> === <var>y</var>, where <var>x</var> and <var>y</var> are values, produces <emu-val>true</emu-val> or <emu-val>false</emu-val>. Such a comparison is performed as follows:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_1595"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>x</var>) is different from <emu-xref aoid="Type" id="_ref_1596"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>y</var>), return <emu-val>false</emu-val>.</li><li>If <emu-xref aoid="Type" id="_ref_1597"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>x</var>) is Number, then<ol><li>If <var>x</var> is <emu-val>NaN</emu-val>, return <emu-val>false</emu-val>.</li><li>If <var>y</var> is <emu-val>NaN</emu-val>, return <emu-val>false</emu-val>.</li><li>If <var>x</var> is the same Number value as <var>y</var>, return <emu-val>true</emu-val>.</li><li>If <var>x</var> is <emu-val>+0</emu-val> and <var>y</var> is <emu-val>-0</emu-val>, return <emu-val>true</emu-val>.</li><li>If <var>x</var> is <emu-val>-0</emu-val> and <var>y</var> is <emu-val>+0</emu-val>, return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.</li></ol></li><li>Return <emu-xref aoid="SameValueNonNumber" id="_ref_1598"><a href="#sec-samevaluenonnumber">SameValueNonNumber</a></emu-xref>(<var>x</var>, <var>y</var>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>This algorithm differs from the <emu-xref aoid="SameValue" id="_ref_1599"><a href="#sec-samevalue">SameValue</a></emu-xref> Algorithm in its treatment of signed zeroes and NaNs.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-operations-on-objects">
<h1><span class="secnum">7.3</span>Operations on Objects</h1>
<emu-clause id="sec-get-o-p" aoid="Get">
<h1><span class="secnum">7.3.1</span>Get ( <var>O</var>, <var>P</var> )</h1>
<p>The abstract operation Get is used to retrieve the value of a
specific property of an object. The operation is called with arguments <var>O</var> and <var>P</var> where <var>O</var> is the object and <var>P</var> is the property key. This abstract operation performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1600"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1601"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is Object.</li><li><emu-xref href="#assert" id="_ref_1602"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPropertyKey" id="_ref_1603"><a href="#sec-ispropertykey">IsPropertyKey</a></emu-xref>(<var>P</var>) is <emu-val>true</emu-val>.</li><li>Return ? <var>O</var>.[[Get]](<var>P</var>, <var>O</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-getv" aoid="GetV">
<h1><span class="secnum">7.3.2</span>GetV ( <var>V</var>, <var>P</var> )</h1>
<p>The abstract operation GetV is used to retrieve the value of a specific property of an <emu-xref href="#sec-ecmascript-language-types" id="_ref_1604"><a href="#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref>.
If the value is not an object, the property lookup is performed using a
wrapper object appropriate for the type of the value. The operation is
called with arguments <var>V</var> and <var>P</var> where <var>V</var> is the value and <var>P</var> is the property key. This abstract operation performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1605"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPropertyKey" id="_ref_1606"><a href="#sec-ispropertykey">IsPropertyKey</a></emu-xref>(<var>P</var>) is <emu-val>true</emu-val>.</li><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_1607"><a href="#sec-toobject">ToObject</a></emu-xref>(<var>V</var>).</li><li>Return ? <var>O</var>.[[Get]](<var>P</var>, <var>V</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-set-o-p-v-throw" aoid="Set">
<h1><span class="secnum">7.3.3</span>Set ( <var>O</var>, <var>P</var>, <var>V</var>, <var>Throw</var> )</h1>
<p>The abstract operation Set is used to set the value of a specific property of an object. The operation is called with arguments <var>O</var>, <var>P</var>, <var>V</var>, and <var>Throw</var> where <var>O</var> is the object, <var>P</var> is the property key, <var>V</var> is the new value for the property and <var>Throw</var> is a Boolean flag. This abstract operation performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1608"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1609"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is Object.</li><li><emu-xref href="#assert" id="_ref_1610"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPropertyKey" id="_ref_1611"><a href="#sec-ispropertykey">IsPropertyKey</a></emu-xref>(<var>P</var>) is <emu-val>true</emu-val>.</li><li><emu-xref href="#assert" id="_ref_1612"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1613"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>Throw</var>) is Boolean.</li><li>Let <var>success</var> be ? <var>O</var>.[[Set]](<var>P</var>, <var>V</var>, <var>O</var>).</li><li>If <var>success</var> is <emu-val>false</emu-val> and <var>Throw</var> is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return <var>success</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-createdataproperty" aoid="CreateDataProperty">
<h1><span class="secnum">7.3.4</span>CreateDataProperty ( <var>O</var>, <var>P</var>, <var>V</var> )</h1>
<p>The abstract operation CreateDataProperty is used to create a
new own property of an object. The operation is called with arguments <var>O</var>, <var>P</var>, and <var>V</var> where <var>O</var> is the object, <var>P</var> is the property key, and <var>V</var> is the value for the property. This abstract operation performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1614"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1615"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is Object.</li><li><emu-xref href="#assert" id="_ref_1616"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPropertyKey" id="_ref_1617"><a href="#sec-ispropertykey">IsPropertyKey</a></emu-xref>(<var>P</var>) is <emu-val>true</emu-val>.</li><li>Let <var>newDesc</var> be the PropertyDescriptor { [[Value]]: <var>V</var>, [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>true</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</li><li>Return ? <var>O</var>.[[DefineOwnProperty]](<var>P</var>, <var>newDesc</var>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>This abstract operation creates a property whose attributes
are set to the same defaults used for properties created by the
ECMAScript language assignment operator. Normally, the property will not
already exist. If it does exist and is not configurable or if <var>O</var> is not extensible, [[DefineOwnProperty]] will return <emu-val>false</emu-val>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-createmethodproperty" aoid="CreateMethodProperty">
<h1><span class="secnum">7.3.5</span>CreateMethodProperty ( <var>O</var>, <var>P</var>, <var>V</var> )</h1>
<p>The abstract operation CreateMethodProperty is used to create a
new own property of an object. The operation is called with arguments <var>O</var>, <var>P</var>, and <var>V</var> where <var>O</var> is the object, <var>P</var> is the property key, and <var>V</var> is the value for the property. This abstract operation performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1618"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1619"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is Object.</li><li><emu-xref href="#assert" id="_ref_1620"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPropertyKey" id="_ref_1621"><a href="#sec-ispropertykey">IsPropertyKey</a></emu-xref>(<var>P</var>) is <emu-val>true</emu-val>.</li><li>Let <var>newDesc</var> be the PropertyDescriptor { [[Value]]: <var>V</var>, [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</li><li>Return ? <var>O</var>.[[DefineOwnProperty]](<var>P</var>, <var>newDesc</var>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>This abstract operation creates a property whose attributes
are set to the same defaults used for built-in methods and methods
defined using class declaration syntax. Normally, the property will not
already exist. If it does exist and is not configurable or if <var>O</var> is not extensible, [[DefineOwnProperty]] will return <emu-val>false</emu-val>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-createdatapropertyorthrow" aoid="CreateDataPropertyOrThrow">
<h1><span class="secnum">7.3.6</span>CreateDataPropertyOrThrow ( <var>O</var>, <var>P</var>, <var>V</var> )</h1>
<p>The abstract operation CreateDataPropertyOrThrow is used to create a new own property of an object. It throws a <emu-val>TypeError</emu-val> exception if the requested property update cannot be performed. The operation is called with arguments <var>O</var>, <var>P</var>, and <var>V</var> where <var>O</var> is the object, <var>P</var> is the property key, and <var>V</var> is the value for the property. This abstract operation performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1622"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1623"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is Object.</li><li><emu-xref href="#assert" id="_ref_1624"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPropertyKey" id="_ref_1625"><a href="#sec-ispropertykey">IsPropertyKey</a></emu-xref>(<var>P</var>) is <emu-val>true</emu-val>.</li><li>Let <var>success</var> be ?&nbsp;<emu-xref aoid="CreateDataProperty" id="_ref_1626"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>O</var>, <var>P</var>, <var>V</var>).</li><li>If <var>success</var> is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return <var>success</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>This abstract operation creates a property whose attributes
are set to the same defaults used for properties created by the
ECMAScript language assignment operator. Normally, the property will not
already exist. If it does exist and is not configurable or if <var>O</var> is not extensible, [[DefineOwnProperty]] will return <emu-val>false</emu-val> causing this operation to throw a <emu-val>TypeError</emu-val> exception.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-definepropertyorthrow" aoid="DefinePropertyOrThrow">
<h1><span class="secnum">7.3.7</span>DefinePropertyOrThrow ( <var>O</var>, <var>P</var>, <var>desc</var> )</h1>
<p>The abstract operation DefinePropertyOrThrow is used to call
the [[DefineOwnProperty]] internal method of an object in a manner that
will throw a <emu-val>TypeError</emu-val> exception if the requested property update cannot be performed. The operation is called with arguments <var>O</var>, <var>P</var>, and <var>desc</var> where <var>O</var> is the object, <var>P</var> is the property key, and <var>desc</var> is the <emu-xref href="#sec-property-descriptor-specification-type" id="_ref_1627"><a href="#sec-property-descriptor-specification-type">Property Descriptor</a></emu-xref> for the property. This abstract operation performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1628"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1629"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is Object.</li><li><emu-xref href="#assert" id="_ref_1630"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPropertyKey" id="_ref_1631"><a href="#sec-ispropertykey">IsPropertyKey</a></emu-xref>(<var>P</var>) is <emu-val>true</emu-val>.</li><li>Let <var>success</var> be ? <var>O</var>.[[DefineOwnProperty]](<var>P</var>, <var>desc</var>).</li><li>If <var>success</var> is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return <var>success</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-deletepropertyorthrow" aoid="DeletePropertyOrThrow">
<h1><span class="secnum">7.3.8</span>DeletePropertyOrThrow ( <var>O</var>, <var>P</var> )</h1>
<p>The abstract operation DeletePropertyOrThrow is used to remove a
specific own property of an object. It throws an exception if the
property is not configurable. The operation is called with arguments <var>O</var> and <var>P</var> where <var>O</var> is the object and <var>P</var> is the property key. This abstract operation performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1632"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1633"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is Object.</li><li><emu-xref href="#assert" id="_ref_1634"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPropertyKey" id="_ref_1635"><a href="#sec-ispropertykey">IsPropertyKey</a></emu-xref>(<var>P</var>) is <emu-val>true</emu-val>.</li><li>Let <var>success</var> be ? <var>O</var>.[[Delete]](<var>P</var>).</li><li>If <var>success</var> is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return <var>success</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-getmethod" aoid="GetMethod">
<h1><span class="secnum">7.3.9</span>GetMethod ( <var>V</var>, <var>P</var> )</h1>
<p>The abstract operation GetMethod is used to get the value of a specific property of an <emu-xref href="#sec-ecmascript-language-types" id="_ref_1636"><a href="#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref> when the value of the property is expected to be a function. The operation is called with arguments <var>V</var> and <var>P</var> where <var>V</var> is the <emu-xref href="#sec-ecmascript-language-types" id="_ref_1637"><a href="#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref>, <var>P</var> is the property key. This abstract operation performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1638"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPropertyKey" id="_ref_1639"><a href="#sec-ispropertykey">IsPropertyKey</a></emu-xref>(<var>P</var>) is <emu-val>true</emu-val>.</li><li>Let <var>func</var> be ?&nbsp;<emu-xref aoid="GetV" id="_ref_1640"><a href="#sec-getv">GetV</a></emu-xref>(<var>V</var>, <var>P</var>).</li><li>If <var>func</var> is either <emu-val>undefined</emu-val> or <emu-val>null</emu-val>, return <emu-val>undefined</emu-val>.</li><li>If <emu-xref aoid="IsCallable" id="_ref_1641"><a href="#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>Return <var>func</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-hasproperty" aoid="HasProperty">
<h1><span class="secnum">7.3.10</span>HasProperty ( <var>O</var>, <var>P</var> )</h1>
<p>The abstract operation HasProperty is used to determine whether
an object has a property with the specified property key. The property
may be either an own or inherited. A Boolean value is returned. The
operation is called with arguments <var>O</var> and <var>P</var> where <var>O</var> is the object and <var>P</var> is the property key. This abstract operation performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1642"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1643"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is Object.</li><li><emu-xref href="#assert" id="_ref_1644"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPropertyKey" id="_ref_1645"><a href="#sec-ispropertykey">IsPropertyKey</a></emu-xref>(<var>P</var>) is <emu-val>true</emu-val>.</li><li>Return ? <var>O</var>.[[HasProperty]](<var>P</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-hasownproperty" aoid="HasOwnProperty">
<h1><span class="secnum">7.3.11</span>HasOwnProperty ( <var>O</var>, <var>P</var> )</h1>
<p>The abstract operation HasOwnProperty is used to determine
whether an object has an own property with the specified property key. A
Boolean value is returned. The operation is called with arguments <var>O</var> and <var>P</var> where <var>O</var> is the object and <var>P</var> is the property key. This abstract operation performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1646"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1647"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is Object.</li><li><emu-xref href="#assert" id="_ref_1648"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPropertyKey" id="_ref_1649"><a href="#sec-ispropertykey">IsPropertyKey</a></emu-xref>(<var>P</var>) is <emu-val>true</emu-val>.</li><li>Let <var>desc</var> be ? <var>O</var>.[[GetOwnProperty]](<var>P</var>).</li><li>If <var>desc</var> is <emu-val>undefined</emu-val>, return <emu-val>false</emu-val>.</li><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-call" aoid="Call">
<h1><span class="secnum">7.3.12</span>Call ( <var>F</var>, <var>V</var> [ , <var>argumentsList</var> ] )</h1>
<p>The abstract operation Call is used to call the [[Call]] internal method of a <emu-xref href="#function-object" id="_ref_1650"><a href="#function-object">function object</a></emu-xref>. The operation is called with arguments <var>F</var>, <var>V</var>, and optionally <var>argumentsList</var> where <var>F</var> is the <emu-xref href="#function-object" id="_ref_1651"><a href="#function-object">function object</a></emu-xref>, <var>V</var> is an <emu-xref href="#sec-ecmascript-language-types" id="_ref_1652"><a href="#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref> that is the <emu-val>this</emu-val> value of the [[Call]], and <var>argumentsList</var> is the value passed to the corresponding argument of the internal method. If <var>argumentsList</var> is not present, a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_1653"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> is used as its value. This abstract operation performs the following steps:</p>
<emu-alg><ol><li>If <var>argumentsList</var> is not present, set <var>argumentsList</var> to a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_1654"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>If <emu-xref aoid="IsCallable" id="_ref_1655"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>F</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return ? <var>F</var>.[[Call]](<var>V</var>, <var>argumentsList</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-construct" aoid="Construct">
<h1><span class="secnum">7.3.13</span>Construct ( <var>F</var> [ , <var>argumentsList</var> [ , <var>newTarget</var> ] ] )</h1>
<p>The abstract operation Construct is used to call the [[Construct]] internal method of a <emu-xref href="#function-object" id="_ref_1656"><a href="#function-object">function object</a></emu-xref>. The operation is called with arguments <var>F</var>, and optionally <var>argumentsList</var>, and <var>newTarget</var> where <var>F</var> is the <emu-xref href="#function-object" id="_ref_1657"><a href="#function-object">function object</a></emu-xref>. <var>argumentsList</var> and <var>newTarget</var> are the values to be passed as the corresponding arguments of the internal method. If <var>argumentsList</var> is not present, a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_1658"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> is used as its value. If <var>newTarget</var> is not present, <var>F</var> is used as its value. This abstract operation performs the following steps:</p>
<emu-alg><ol><li>If <var>newTarget</var> is not present, set <var>newTarget</var> to <var>F</var>.</li><li>If <var>argumentsList</var> is not present, set <var>argumentsList</var> to a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_1659"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li><emu-xref href="#assert" id="_ref_1660"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsConstructor" id="_ref_1661"><a href="#sec-isconstructor">IsConstructor</a></emu-xref>(<var>F</var>) is <emu-val>true</emu-val>.</li><li><emu-xref href="#assert" id="_ref_1662"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsConstructor" id="_ref_1663"><a href="#sec-isconstructor">IsConstructor</a></emu-xref>(<var>newTarget</var>) is <emu-val>true</emu-val>.</li><li>Return ? <var>F</var>.[[Construct]](<var>argumentsList</var>, <var>newTarget</var>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>If <var>newTarget</var> is not present, this operation is equivalent to: <code>new F(...argumentsList)</code></p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-setintegritylevel" aoid="SetIntegrityLevel">
<h1><span class="secnum">7.3.14</span>SetIntegrityLevel ( <var>O</var>, <var>level</var> )</h1>
<p>The abstract operation SetIntegrityLevel is used to fix the set
of own properties of an object. This abstract operation performs the
following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1664"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1665"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is Object.</li><li><emu-xref href="#assert" id="_ref_1666"><a href="#assert">Assert</a></emu-xref>: <var>level</var> is either <code>"sealed"</code> or <code>"frozen"</code>.</li><li>Let <var>status</var> be ? <var>O</var>.[[PreventExtensions]]().</li><li>If <var>status</var> is <emu-val>false</emu-val>, return <emu-val>false</emu-val>.</li><li>Let <var>keys</var> be ? <var>O</var>.[[OwnPropertyKeys]]().</li><li>If <var>level</var> is <code>"sealed"</code>, then<ol><li>For each element <var>k</var> of <var>keys</var>, do<ol><li>Perform ?&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_1667"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>O</var>, <var>k</var>, PropertyDescriptor { [[Configurable]]: <emu-val>false</emu-val> }).</li></ol></li></ol></li><li>Else <var>level</var> is <code>"frozen"</code>,<ol><li>For each element <var>k</var> of <var>keys</var>, do<ol><li>Let <var>currentDesc</var> be ? <var>O</var>.[[GetOwnProperty]](<var>k</var>).</li><li>If <var>currentDesc</var> is not <emu-val>undefined</emu-val>, then<ol><li>If <emu-xref aoid="IsAccessorDescriptor" id="_ref_1668"><a href="#sec-isaccessordescriptor">IsAccessorDescriptor</a></emu-xref>(<var>currentDesc</var>) is <emu-val>true</emu-val>, then<ol><li>Let <var>desc</var> be the PropertyDescriptor { [[Configurable]]: <emu-val>false</emu-val> }.</li></ol></li><li>Else,<ol><li>Let <var>desc</var> be the PropertyDescriptor { [[Configurable]]: <emu-val>false</emu-val>, [[Writable]]: <emu-val>false</emu-val> }.</li></ol></li><li>Perform ?&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_1669"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>O</var>, <var>k</var>, <var>desc</var>).</li></ol></li></ol></li></ol></li><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-testintegritylevel" aoid="TestIntegrityLevel">
<h1><span class="secnum">7.3.15</span>TestIntegrityLevel ( <var>O</var>, <var>level</var> )</h1>
<p>The abstract operation TestIntegrityLevel is used to determine
if the set of own properties of an object are fixed. This abstract
operation performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1670"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1671"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is Object.</li><li><emu-xref href="#assert" id="_ref_1672"><a href="#assert">Assert</a></emu-xref>: <var>level</var> is either <code>"sealed"</code> or <code>"frozen"</code>.</li><li>Let <var>status</var> be ?&nbsp;<emu-xref aoid="IsExtensible" id="_ref_1673"><a href="#sec-isextensible-o">IsExtensible</a></emu-xref>(<var>O</var>).</li><li>If <var>status</var> is <emu-val>true</emu-val>, return <emu-val>false</emu-val>.</li><li>NOTE: If the object is extensible, none of its properties are examined.</li><li>Let <var>keys</var> be ? <var>O</var>.[[OwnPropertyKeys]]().</li><li>For each element <var>k</var> of <var>keys</var>, do<ol><li>Let <var>currentDesc</var> be ? <var>O</var>.[[GetOwnProperty]](<var>k</var>).</li><li>If <var>currentDesc</var> is not <emu-val>undefined</emu-val>, then<ol><li>If <var>currentDesc</var>.[[Configurable]] is <emu-val>true</emu-val>, return <emu-val>false</emu-val>.</li><li>If <var>level</var> is <code>"frozen"</code> and <emu-xref aoid="IsDataDescriptor" id="_ref_1674"><a href="#sec-isdatadescriptor">IsDataDescriptor</a></emu-xref>(<var>currentDesc</var>) is <emu-val>true</emu-val>, then<ol><li>If <var>currentDesc</var>.[[Writable]] is <emu-val>true</emu-val>, return <emu-val>false</emu-val>.</li></ol></li></ol></li></ol></li><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-createarrayfromlist" aoid="CreateArrayFromList">
<h1><span class="secnum">7.3.16</span>CreateArrayFromList ( <var>elements</var> )</h1>
<p>The abstract operation CreateArrayFromList is used to create an Array object whose elements are provided by a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_1675"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>. This abstract operation performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1676"><a href="#assert">Assert</a></emu-xref>: <var>elements</var> is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_1677"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> whose elements are all ECMAScript language values.</li><li>Let <var>array</var> be !&nbsp;<emu-xref aoid="ArrayCreate" id="_ref_1678"><a href="#sec-arraycreate">ArrayCreate</a></emu-xref>(0).</li><li>Let <var>n</var> be 0.</li><li>For each element <var>e</var> of <var>elements</var>, do<ol><li>Let <var>status</var> be <emu-xref aoid="CreateDataProperty" id="_ref_1679"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>array</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_1680"><a href="#sec-tostring">ToString</a></emu-xref>(<var>n</var>), <var>e</var>).</li><li><emu-xref href="#assert" id="_ref_1681"><a href="#assert">Assert</a></emu-xref>: <var>status</var> is <emu-val>true</emu-val>.</li><li>Increment <var>n</var> by 1.</li></ol></li><li>Return <var>array</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-createlistfromarraylike" aoid="CreateListFromArrayLike">
<h1><span class="secnum">7.3.17</span>CreateListFromArrayLike ( <var>obj</var> [ , <var>elementTypes</var> ] )</h1>
<p>The abstract operation CreateListFromArrayLike is used to create a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_1682"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> value whose elements are provided by the indexed properties of an array-like object, <var>obj</var>. The optional argument <var>elementTypes</var> is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_1683"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing the names of ECMAScript Language Types that are allowed for element values of the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_1684"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> that is created. This abstract operation performs the following steps:</p>
<emu-alg><ol><li>If <var>elementTypes</var> is not present, set <var>elementTypes</var> to « Undefined, Null, Boolean, String, Symbol, Number, Object ».</li><li>If <emu-xref aoid="Type" id="_ref_1685"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>obj</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>len</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_1686"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_1687"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>obj</var>, <code>"length"</code>)).</li><li>Let <var>list</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_1688"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>index</var> be 0.</li><li>Repeat, while <var>index</var> &lt; <var>len</var><ol><li>Let <var>indexName</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_1689"><a href="#sec-tostring">ToString</a></emu-xref>(<var>index</var>).</li><li>Let <var>next</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_1690"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>obj</var>, <var>indexName</var>).</li><li>If <emu-xref aoid="Type" id="_ref_1691"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>next</var>) is not an element of <var>elementTypes</var>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Append <var>next</var> as the last element of <var>list</var>.</li><li>Increase <var>index</var> by 1.</li></ol></li><li>Return <var>list</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-invoke" aoid="Invoke">
<h1><span class="secnum">7.3.18</span>Invoke ( <var>V</var>, <var>P</var> [ , <var>argumentsList</var> ] )</h1>
<p>The abstract operation Invoke is used to call a method property of an <emu-xref href="#sec-ecmascript-language-types" id="_ref_1692"><a href="#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref>. The operation is called with arguments <var>V</var>, <var>P</var>, and optionally <var>argumentsList</var> where <var>V</var> serves as both the lookup point for the property and the <emu-val>this</emu-val> value of the call, <var>P</var> is the property key, and <var>argumentsList</var> is the list of arguments values passed to the method. If <var>argumentsList</var> is not present, a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_1693"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> is used as its value. This abstract operation performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1694"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPropertyKey" id="_ref_1695"><a href="#sec-ispropertykey">IsPropertyKey</a></emu-xref>(<var>P</var>) is <emu-val>true</emu-val>.</li><li>If <var>argumentsList</var> is not present, set <var>argumentsList</var> to a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_1696"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>func</var> be ?&nbsp;<emu-xref aoid="GetV" id="_ref_1697"><a href="#sec-getv">GetV</a></emu-xref>(<var>V</var>, <var>P</var>).</li><li>Return ?&nbsp;<emu-xref aoid="Call" id="_ref_1698"><a href="#sec-call">Call</a></emu-xref>(<var>func</var>, <var>V</var>, <var>argumentsList</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-ordinaryhasinstance" aoid="OrdinaryHasInstance">
<h1><span class="secnum">7.3.19</span>OrdinaryHasInstance ( <var>C</var>, <var>O</var> )</h1>
<p>The abstract operation OrdinaryHasInstance implements the default algorithm for determining if an object <var>O</var> inherits from the instance object inheritance path provided by <emu-xref href="#constructor" id="_ref_1699"><a href="#constructor">constructor</a></emu-xref> <var>C</var>. This abstract operation performs the following steps:</p>
<emu-alg><ol><li>If <emu-xref aoid="IsCallable" id="_ref_1700"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>C</var>) is <emu-val>false</emu-val>, return <emu-val>false</emu-val>.</li><li>If <var>C</var> has a [[BoundTargetFunction]] internal slot, then<ol><li>Let <var>BC</var> be <var>C</var>.[[BoundTargetFunction]].</li><li>Return ?&nbsp;<emu-xref aoid="InstanceofOperator" id="_ref_1701"><a href="#sec-instanceofoperator">InstanceofOperator</a></emu-xref>(<var>O</var>, <var>BC</var>).</li></ol></li><li>If <emu-xref aoid="Type" id="_ref_1702"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, return <emu-val>false</emu-val>.</li><li>Let <var>P</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_1703"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>C</var>, <code>"prototype"</code>).</li><li>If <emu-xref aoid="Type" id="_ref_1704"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>P</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Repeat,<ol><li>Set <var>O</var> to ? <var>O</var>.[[GetPrototypeOf]]().</li><li>If <var>O</var> is <emu-val>null</emu-val>, return <emu-val>false</emu-val>.</li><li>If <emu-xref aoid="SameValue" id="_ref_1705"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>P</var>, <var>O</var>) is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.
</li></ol></li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-speciesconstructor" aoid="SpeciesConstructor">
<h1><span class="secnum">7.3.20</span>SpeciesConstructor ( <var>O</var>, <var>defaultConstructor</var> )</h1>
<p>The abstract operation SpeciesConstructor is used to retrieve the <emu-xref href="#constructor" id="_ref_1706"><a href="#constructor">constructor</a></emu-xref> that should be used to create new objects that are derived from the argument object <var>O</var>. The <var>defaultConstructor</var> argument is the <emu-xref href="#constructor" id="_ref_1707"><a href="#constructor">constructor</a></emu-xref> to use if a <emu-xref href="#constructor" id="_ref_1708"><a href="#constructor">constructor</a></emu-xref> @@species property cannot be found starting from <var>O</var>. This abstract operation performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1709"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1710"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is Object.</li><li>Let <var>C</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_1711"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <code>"constructor"</code>).</li><li>If <var>C</var> is <emu-val>undefined</emu-val>, return <var>defaultConstructor</var>.</li><li>If <emu-xref aoid="Type" id="_ref_1712"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>C</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>S</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_1713"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>C</var>, @@species).</li><li>If <var>S</var> is either <emu-val>undefined</emu-val> or <emu-val>null</emu-val>, return <var>defaultConstructor</var>.</li><li>If <emu-xref aoid="IsConstructor" id="_ref_1714"><a href="#sec-isconstructor">IsConstructor</a></emu-xref>(<var>S</var>) is <emu-val>true</emu-val>, return <var>S</var>.</li><li>Throw a <emu-val>TypeError</emu-val> exception.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-enumerableownpropertynames" aoid="EnumerableOwnPropertyNames" oldids="sec-enumerableownproperties">
<span id="sec-enumerableownproperties"></span><h1><span class="secnum">7.3.21</span>EnumerableOwnPropertyNames ( <var>O</var>, <var>kind</var> )</h1>
<p>When the abstract operation EnumerableOwnPropertyNames is called with Object <var>O</var> and String <var>kind</var> the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1715"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1716"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is Object.</li><li>Let <var>ownKeys</var> be ? <var>O</var>.[[OwnPropertyKeys]]().</li><li>Let <var>properties</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_1717"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>For each element <var>key</var> of <var>ownKeys</var> in <emu-xref href="#sec-list-and-record-specification-type" id="_ref_1718"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> order, do<ol><li>If <emu-xref aoid="Type" id="_ref_1719"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>key</var>) is String, then<ol><li>Let <var>desc</var> be ? <var>O</var>.[[GetOwnProperty]](<var>key</var>).</li><li>If <var>desc</var> is not <emu-val>undefined</emu-val> and <var>desc</var>.[[Enumerable]] is <emu-val>true</emu-val>, then<ol><li>If <var>kind</var> is <emu-val>"key"</emu-val>, append <var>key</var> to <var>properties</var>.</li><li>Else,<ol><li>Let <var>value</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_1720"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <var>key</var>).</li><li>If <var>kind</var> is <emu-val>"value"</emu-val>, append <var>value</var> to <var>properties</var>.</li><li>Else,<ol><li><emu-xref href="#assert" id="_ref_1721"><a href="#assert">Assert</a></emu-xref>: <var>kind</var> is <emu-val>"key+value"</emu-val>.</li><li>Let <var>entry</var> be <emu-xref aoid="CreateArrayFromList" id="_ref_1722"><a href="#sec-createarrayfromlist">CreateArrayFromList</a></emu-xref>(« <var>key</var>, <var>value</var> »).</li><li>Append <var>entry</var> to <var>properties</var>.</li></ol></li></ol></li></ol></li></ol></li></ol></li><li>Order the elements of <var>properties</var> so they are in the same relative order as would be produced by the Iterator that would be returned if the <emu-xref aoid="EnumerateObjectProperties" id="_ref_1723"><a href="#sec-enumerate-object-properties">EnumerateObjectProperties</a></emu-xref> internal method were invoked with <var>O</var>.</li><li>Return <var>properties</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-getfunctionrealm" aoid="GetFunctionRealm">
<h1><span class="secnum">7.3.22</span>GetFunctionRealm ( <var>obj</var> )</h1>
<p>The abstract operation GetFunctionRealm with argument <var>obj</var> performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1724"><a href="#assert">Assert</a></emu-xref>: <var>obj</var> is a callable object.</li><li>If <var>obj</var> has a [[Realm]] internal slot, then<ol><li>Return <var>obj</var>.[[Realm]].</li></ol></li><li>If <var>obj</var> is a Bound Function <emu-xref href="#exotic-object" id="_ref_1725"><a href="#exotic-object">exotic object</a></emu-xref>, then<ol><li>Let <var>target</var> be <var>obj</var>.[[BoundTargetFunction]].</li><li>Return ?&nbsp;<emu-xref aoid="GetFunctionRealm" id="_ref_1726"><a href="#sec-getfunctionrealm">GetFunctionRealm</a></emu-xref>(<var>target</var>).</li></ol></li><li>If <var>obj</var> is a Proxy <emu-xref href="#exotic-object" id="_ref_1727"><a href="#exotic-object">exotic object</a></emu-xref>, then<ol><li>If <var>obj</var>.[[ProxyHandler]] is <emu-val>null</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>proxyTarget</var> be <var>obj</var>.[[ProxyTarget]].</li><li>Return ?&nbsp;<emu-xref aoid="GetFunctionRealm" id="_ref_1728"><a href="#sec-getfunctionrealm">GetFunctionRealm</a></emu-xref>(<var>proxyTarget</var>).</li></ol></li><li>Return <emu-xref href="#current-realm" id="_ref_1729"><a href="#current-realm">the current Realm Record</a></emu-xref>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Step 5 will only be reached if <var>obj</var> is a non-standard function <emu-xref href="#exotic-object" id="_ref_1730"><a href="#exotic-object">exotic object</a></emu-xref> that does not have a [[Realm]] internal slot.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-copydataproperties" aoid="CopyDataProperties">
<h1><span class="secnum">7.3.23</span>CopyDataProperties ( <var>target</var>, <var>source</var>, <var>excludedItems</var> )</h1>
<p>When the abstract operation CopyDataProperties is called with arguments <var>target</var>, <var>source</var>, and <var>excludedItems</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1731"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1732"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>target</var>) is Object.</li><li><emu-xref href="#assert" id="_ref_1733"><a href="#assert">Assert</a></emu-xref>: <var>excludedItems</var> is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_1734"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of property keys.</li><li>If <var>source</var> is <emu-val>undefined</emu-val> or <emu-val>null</emu-val>, return <var>target</var>.</li><li>Let <var>from</var> be !&nbsp;<emu-xref aoid="ToObject" id="_ref_1735"><a href="#sec-toobject">ToObject</a></emu-xref>(<var>source</var>).</li><li>Let <var>keys</var> be ? <var>from</var>.[[OwnPropertyKeys]]().</li><li>For each element <var>nextKey</var> of <var>keys</var> in <emu-xref href="#sec-list-and-record-specification-type" id="_ref_1736"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> order, do<ol><li>Let <var>excluded</var> be <emu-val>false</emu-val>.</li><li>For each element <var>e</var> of <var>excludedItems</var> in <emu-xref href="#sec-list-and-record-specification-type" id="_ref_1737"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> order, do<ol><li>If <emu-xref aoid="SameValue" id="_ref_1738"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>e</var>, <var>nextKey</var>) is <emu-val>true</emu-val>, then<ol><li>Set <var>excluded</var> to <emu-val>true</emu-val>.</li></ol></li></ol></li><li>If <var>excluded</var> is <emu-val>false</emu-val>, then<ol><li>Let <var>desc</var> be ? <var>from</var>.[[GetOwnProperty]](<var>nextKey</var>).</li><li>If <var>desc</var> is not <emu-val>undefined</emu-val> and <var>desc</var>.[[Enumerable]] is <emu-val>true</emu-val>, then<ol><li>Let <var>propValue</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_1739"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>from</var>, <var>nextKey</var>).</li><li>Perform !&nbsp;<emu-xref aoid="CreateDataProperty" id="_ref_1740"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>target</var>, <var>nextKey</var>, <var>propValue</var>).</li></ol></li></ol></li></ol></li><li>Return <var>target</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The target passed in here is always a newly created object which is not directly accessible in case of an error being thrown.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-operations-on-iterator-objects">
<h1><span class="secnum">7.4</span>Operations on Iterator Objects</h1>
<p>See Common Iteration Interfaces (<emu-xref href="#sec-iteration" id="_ref_151"><a href="#sec-iteration">25.1</a></emu-xref>).</p>
<emu-clause id="sec-getiterator" aoid="GetIterator">
<h1><span class="secnum">7.4.1</span>GetIterator ( <var>obj</var> [ , <var>hint</var> [ , <var>method</var> ] ] )</h1>
<p>The abstract operation GetIterator with argument <var>obj</var> and optional arguments <var>hint</var> and <var>method</var> performs the following steps:</p>
<emu-alg><ol><li>If <var>hint</var> is not present, set <var>hint</var> to <emu-const>sync</emu-const>.</li><li><emu-xref href="#assert" id="_ref_1741"><a href="#assert">Assert</a></emu-xref>: <var>hint</var> is either <emu-const>sync</emu-const> or <emu-const>async</emu-const>.</li><li>If <var>method</var> is not present, then<ol><li>If <var>hint</var> is <emu-const>async</emu-const>, then<ol><li>Set <var>method</var> to ?&nbsp;<emu-xref aoid="GetMethod" id="_ref_1742"><a href="#sec-getmethod">GetMethod</a></emu-xref>(<var>obj</var>, @@asyncIterator).</li><li>If <var>method</var> is <emu-val>undefined</emu-val>, then<ol><li>Let <var>syncMethod</var> be ?&nbsp;<emu-xref aoid="GetMethod" id="_ref_1743"><a href="#sec-getmethod">GetMethod</a></emu-xref>(<var>obj</var>, @@iterator).</li><li>Let <var>syncIteratorRecord</var> be ?&nbsp;<emu-xref aoid="GetIterator" id="_ref_1744"><a href="#sec-getiterator">GetIterator</a></emu-xref>(<var>obj</var>, <emu-const>sync</emu-const>, <var>syncMethod</var>).</li><li>Return ?&nbsp;<emu-xref aoid="CreateAsyncFromSyncIterator" id="_ref_1745"><a href="#sec-createasyncfromsynciterator">CreateAsyncFromSyncIterator</a></emu-xref>(<var>syncIteratorRecord</var>).</li></ol></li></ol></li><li>Otherwise, set <var>method</var> to ?&nbsp;<emu-xref aoid="GetMethod" id="_ref_1746"><a href="#sec-getmethod">GetMethod</a></emu-xref>(<var>obj</var>, @@iterator).</li></ol></li><li>Let <var>iterator</var> be ?&nbsp;<emu-xref aoid="Call" id="_ref_1747"><a href="#sec-call">Call</a></emu-xref>(<var>method</var>, <var>obj</var>).</li><li>If <emu-xref aoid="Type" id="_ref_1748"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>iterator</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>nextMethod</var> be ?&nbsp;<emu-xref aoid="GetV" id="_ref_1749"><a href="#sec-getv">GetV</a></emu-xref>(<var>iterator</var>, <code>"next"</code>).</li><li>Let <var>iteratorRecord</var> be <emu-xref href="#sec-list-and-record-specification-type" id="_ref_1750"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Iterator]]: <var>iterator</var>, [[NextMethod]]: <var>nextMethod</var>, [[Done]]: <emu-val>false</emu-val> }.</li><li>Return <var>iteratorRecord</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-iteratornext" aoid="IteratorNext">
<h1><span class="secnum">7.4.2</span>IteratorNext ( <var>iteratorRecord</var> [ , <var>value</var> ] )</h1>
<p>The abstract operation IteratorNext with argument <var>iteratorRecord</var> and optional argument <var>value</var> performs the following steps:</p>
<emu-alg><ol><li>If <var>value</var> is not present, then<ol><li>Let <var>result</var> be ?&nbsp;<emu-xref aoid="Call" id="_ref_1751"><a href="#sec-call">Call</a></emu-xref>(<var>iteratorRecord</var>.[[NextMethod]], <var>iteratorRecord</var>.[[Iterator]], « »).</li></ol></li><li>Else,<ol><li>Let <var>result</var> be ?&nbsp;<emu-xref aoid="Call" id="_ref_1752"><a href="#sec-call">Call</a></emu-xref>(<var>iteratorRecord</var>.[[NextMethod]], <var>iteratorRecord</var>.[[Iterator]], « <var>value</var> »).</li></ol></li><li>If <emu-xref aoid="Type" id="_ref_1753"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>result</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return <var>result</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-iteratorcomplete" aoid="IteratorComplete">
<h1><span class="secnum">7.4.3</span>IteratorComplete ( <var>iterResult</var> )</h1>
<p>The abstract operation IteratorComplete with argument <var>iterResult</var> performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1754"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1755"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>iterResult</var>) is Object.</li><li>Return <emu-xref aoid="ToBoolean" id="_ref_1756"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_1757"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>iterResult</var>, <code>"done"</code>)).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-iteratorvalue" aoid="IteratorValue">
<h1><span class="secnum">7.4.4</span>IteratorValue ( <var>iterResult</var> )</h1>
<p>The abstract operation IteratorValue with argument <var>iterResult</var> performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1758"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1759"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>iterResult</var>) is Object.</li><li>Return ?&nbsp;<emu-xref aoid="Get" id="_ref_1760"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>iterResult</var>, <code>"value"</code>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-iteratorstep" aoid="IteratorStep">
<h1><span class="secnum">7.4.5</span>IteratorStep ( <var>iteratorRecord</var> )</h1>
<p>The abstract operation IteratorStep with argument <var>iteratorRecord</var> requests the next value from <var>iteratorRecord</var>.[[Iterator]] by calling <var>iteratorRecord</var>.[[NextMethod]] and returns either <emu-val>false</emu-val>
indicating that the iterator has reached its end or the IteratorResult
object if a next value is available. IteratorStep performs the following
steps:</p>
<emu-alg><ol><li>Let <var>result</var> be ?&nbsp;<emu-xref aoid="IteratorNext" id="_ref_1761"><a href="#sec-iteratornext">IteratorNext</a></emu-xref>(<var>iteratorRecord</var>).</li><li>Let <var>done</var> be ?&nbsp;<emu-xref aoid="IteratorComplete" id="_ref_1762"><a href="#sec-iteratorcomplete">IteratorComplete</a></emu-xref>(<var>result</var>).</li><li>If <var>done</var> is <emu-val>true</emu-val>, return <emu-val>false</emu-val>.</li><li>Return <var>result</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-iteratorclose" aoid="IteratorClose">
<h1><span class="secnum">7.4.6</span>IteratorClose ( <var>iteratorRecord</var>, <var>completion</var> )</h1>
<p>The abstract operation IteratorClose with arguments <var>iteratorRecord</var> and <var>completion</var>
is used to notify an iterator that it should perform any actions it
would normally perform when it has reached its completed state:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1763"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1764"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>iteratorRecord</var>.[[Iterator]]) is Object.</li><li><emu-xref href="#assert" id="_ref_1765"><a href="#assert">Assert</a></emu-xref>: <var>completion</var> is a <emu-xref href="#sec-completion-record-specification-type" id="_ref_1766"><a href="#sec-completion-record-specification-type">Completion Record</a></emu-xref>.</li><li>Let <var>iterator</var> be <var>iteratorRecord</var>.[[Iterator]].</li><li>Let <var>return</var> be ?&nbsp;<emu-xref aoid="GetMethod" id="_ref_1767"><a href="#sec-getmethod">GetMethod</a></emu-xref>(<var>iterator</var>, <code>"return"</code>).</li><li>If <var>return</var> is <emu-val>undefined</emu-val>, return <emu-xref aoid="Completion" id="_ref_1768"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>completion</var>).</li><li>Let <var>innerResult</var> be <emu-xref aoid="Call" id="_ref_1769"><a href="#sec-call">Call</a></emu-xref>(<var>return</var>, <var>iterator</var>, « »).</li><li>If <var>completion</var>.[[Type]] is <emu-const>throw</emu-const>, return <emu-xref aoid="Completion" id="_ref_1770"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>completion</var>).</li><li>If <var>innerResult</var>.[[Type]] is <emu-const>throw</emu-const>, return <emu-xref aoid="Completion" id="_ref_1771"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>innerResult</var>).</li><li>If <emu-xref aoid="Type" id="_ref_1772"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>innerResult</var>.[[Value]]) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return <emu-xref aoid="Completion" id="_ref_1773"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>completion</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-asynciteratorclose" aoid="AsyncIteratorClose">
<h1><span class="secnum">7.4.7</span>AsyncIteratorClose ( <var>iteratorRecord</var>, <var>completion</var> )</h1>
<p>The abstract operation AsyncIteratorClose with arguments <var>iteratorRecord</var> and <var>completion</var>
is used to notify an async iterator that it should perform any actions
it would normally perform when it has reached its completed state:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1774"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1775"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>iteratorRecord</var>.[[Iterator]]) is Object.</li><li><emu-xref href="#assert" id="_ref_1776"><a href="#assert">Assert</a></emu-xref>: <var>completion</var> is a <emu-xref href="#sec-completion-record-specification-type" id="_ref_1777"><a href="#sec-completion-record-specification-type">Completion Record</a></emu-xref>.</li><li>Let <var>iterator</var> be <var>iteratorRecord</var>.[[Iterator]].</li><li>Let <var>return</var> be ?&nbsp;<emu-xref aoid="GetMethod" id="_ref_1778"><a href="#sec-getmethod">GetMethod</a></emu-xref>(<var>iterator</var>, <code>"return"</code>).</li><li>If <var>return</var> is <emu-val>undefined</emu-val>, return <emu-xref aoid="Completion" id="_ref_1779"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>completion</var>).</li><li>Let <var>innerResult</var> be <emu-xref aoid="Call" id="_ref_1780"><a href="#sec-call">Call</a></emu-xref>(<var>return</var>, <var>iterator</var>, « »).</li><li>If <var>innerResult</var>.[[Type]] is <emu-const>normal</emu-const>, set <var>innerResult</var> to <emu-xref aoid="Await" id="_ref_1781"><a href="#await">Await</a></emu-xref>(<var>innerResult</var>.[[Value]]).</li><li>If <var>completion</var>.[[Type]] is <emu-const>throw</emu-const>, return <emu-xref aoid="Completion" id="_ref_1782"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>completion</var>).</li><li>If <var>innerResult</var>.[[Type]] is <emu-const>throw</emu-const>, return <emu-xref aoid="Completion" id="_ref_1783"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>innerResult</var>).</li><li>If <emu-xref aoid="Type" id="_ref_1784"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>innerResult</var>.[[Value]]) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return <emu-xref aoid="Completion" id="_ref_1785"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>completion</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-createiterresultobject" aoid="CreateIterResultObject">
<h1><span class="secnum">7.4.8</span>CreateIterResultObject ( <var>value</var>, <var>done</var> )</h1>
<p>The abstract operation CreateIterResultObject with arguments <var>value</var> and <var>done</var> creates an object that supports the IteratorResult interface by performing the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_1786"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1787"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>done</var>) is Boolean.</li><li>Let <var>obj</var> be <emu-xref aoid="ObjectCreate" id="_ref_1788"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_1789"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>).</li><li>Perform <emu-xref aoid="CreateDataProperty" id="_ref_1790"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>obj</var>, <code>"value"</code>, <var>value</var>).</li><li>Perform <emu-xref aoid="CreateDataProperty" id="_ref_1791"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>obj</var>, <code>"done"</code>, <var>done</var>).</li><li>Return <var>obj</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-createlistiteratorRecord" oldids="sec-createlistiterator" aoid="CreateListIteratorRecord">
<span id="sec-createlistiterator"></span><h1><span class="secnum">7.4.9</span>CreateListIteratorRecord ( <var>list</var> )</h1>
<p>The abstract operation CreateListIteratorRecord with argument <var>list</var> creates an Iterator (<emu-xref href="#sec-iterator-interface" id="_ref_152"><a href="#sec-iterator-interface">25.1.1.2</a></emu-xref>) object record whose next method returns the successive elements of <var>list</var>. It performs the following steps:</p>
<emu-alg><ol><li>Let <var>iterator</var> be <emu-xref aoid="ObjectCreate" id="_ref_1792"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-%iteratorprototype%-object" id="_ref_1793"><a href="#sec-%iteratorprototype%-object">%IteratorPrototype%</a></emu-xref>, « [[IteratedList]], [[ListIteratorNextIndex]] »).</li><li>Set <var>iterator</var>.[[IteratedList]] to <var>list</var>.</li><li>Set <var>iterator</var>.[[ListIteratorNextIndex]] to 0.</li><li>Let <var>steps</var> be the algorithm steps defined in ListIterator <code>next</code> (<emu-xref href="#sec-listiterator-next" id="_ref_153"><a href="#sec-listiterator-next">7.4.9.1</a></emu-xref>).</li><li>Let <var>next</var> be <emu-xref aoid="CreateBuiltinFunction" id="_ref_1794"><a href="#sec-createbuiltinfunction">CreateBuiltinFunction</a></emu-xref>(<var>steps</var>, « »).</li><li>Return <emu-xref href="#sec-list-and-record-specification-type" id="_ref_1795"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Iterator]]: <var>iterator</var>, [[NextMethod]]: <var>next</var>, [[Done]]: <emu-val>false</emu-val> }.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The list iterator object is never directly accessible to ECMAScript code.</p>
</div></emu-note>
<emu-clause id="sec-listiterator-next">
<h1><span class="secnum">7.4.9.1</span>ListIterator next ( )</h1>
<p>The ListIterator <code>next</code> method is a standard built-in <emu-xref href="#function-object" id="_ref_1796"><a href="#function-object">function object</a></emu-xref> (clause <emu-xref href="#sec-ecmascript-standard-built-in-objects" id="_ref_154"><a href="#sec-ecmascript-standard-built-in-objects">17</a></emu-xref>) that performs the following steps:</p>
<emu-alg><ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li><emu-xref href="#assert" id="_ref_1797"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1798"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is Object.</li><li><emu-xref href="#assert" id="_ref_1799"><a href="#assert">Assert</a></emu-xref>: <var>O</var> has an [[IteratedList]] internal slot.</li><li>Let <var>list</var> be <var>O</var>.[[IteratedList]].</li><li>Let <var>index</var> be <var>O</var>.[[ListIteratorNextIndex]].</li><li>Let <var>len</var> be the number of elements of <var>list</var>.</li><li>If <var>index</var> ≥ <var>len</var>, then<ol><li>Return <emu-xref aoid="CreateIterResultObject" id="_ref_1800"><a href="#sec-createiterresultobject">CreateIterResultObject</a></emu-xref>(<emu-val>undefined</emu-val>, <emu-val>true</emu-val>).</li></ol></li><li>Set <var>O</var>.[[ListIteratorNextIndex]] to <var>index</var> + 1.</li><li>Return <emu-xref aoid="CreateIterResultObject" id="_ref_1801"><a href="#sec-createiterresultobject">CreateIterResultObject</a></emu-xref>(<var>list</var>[<var>index</var>], <emu-val>false</emu-val>).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-executable-code-and-execution-contexts">
<h1><span class="secnum">8</span>Executable Code and Execution Contexts</h1>
<emu-clause id="sec-lexical-environments">
<h1><span class="secnum">8.1</span>Lexical Environments</h1>
<p>A <dfn>Lexical Environment</dfn> is a specification type used to define the association of <emu-nt id="_ref_9020"><a href="#prod-Identifier">Identifier</a></emu-nt>s
to specific variables and functions based upon the lexical nesting
structure of ECMAScript code. A Lexical Environment consists of an <emu-xref href="#sec-environment-records" id="_ref_1802"><a href="#sec-environment-records">Environment Record</a></emu-xref> and a possibly null reference to an <em>outer</em>
Lexical Environment. Usually a Lexical Environment is associated with
some specific syntactic structure of ECMAScript code such as a <emu-nt id="_ref_9021"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>, a <emu-nt id="_ref_9022"><a href="#prod-BlockStatement">BlockStatement</a></emu-nt>, or a <emu-nt id="_ref_9023"><a href="#prod-Catch">Catch</a></emu-nt> clause of a <emu-nt id="_ref_9024"><a href="#prod-TryStatement">TryStatement</a></emu-nt> and a new Lexical Environment is created each time such code is evaluated.</p>
<p>An <emu-xref href="#sec-environment-records" id="_ref_1803"><a href="#sec-environment-records">Environment Record</a></emu-xref>
records the identifier bindings that are created within the scope of
its associated Lexical Environment. It is referred to as the Lexical
Environment's <dfn>EnvironmentRecord</dfn>.</p>
<p>The outer environment reference is used to model the logical
nesting of Lexical Environment values. The outer reference of a (inner)
Lexical Environment is a reference to the Lexical Environment that
logically surrounds the inner Lexical Environment. An outer Lexical
Environment may, of course, have its own outer Lexical Environment. A
Lexical Environment may serve as the outer environment for multiple
inner Lexical Environments. For example, if a <emu-nt id="_ref_9025"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt> contains two nested <emu-nt id="_ref_9026"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>s
then the Lexical Environments of each of the nested functions will have
as their outer Lexical Environment the Lexical Environment of the
current evaluation of the surrounding function.</p>
<p>A <dfn id="global-environment">global environment</dfn> is a Lexical Environment which does not have an outer environment. The <emu-xref href="#global-environment" id="_ref_1804"><a href="#global-environment">global environment</a></emu-xref>'s outer environment reference is <emu-val>null</emu-val>. A <emu-xref href="#global-environment" id="_ref_1805"><a href="#global-environment">global environment</a></emu-xref>'s EnvironmentRecord may be prepopulated with identifier bindings and includes an associated <emu-xref href="#sec-global-object" id="_ref_1806"><a href="#sec-global-object">global object</a></emu-xref> whose properties provide some of the <emu-xref href="#global-environment" id="_ref_1807"><a href="#global-environment">global environment</a></emu-xref>'s identifier bindings. As ECMAScript code is executed, additional properties may be added to the <emu-xref href="#sec-global-object" id="_ref_1808"><a href="#sec-global-object">global object</a></emu-xref> and the initial properties may be modified.</p>
<p>A <dfn id="module-environment">module environment</dfn> is a Lexical Environment that contains the bindings for the top level declarations of a <emu-nt id="_ref_9027"><a href="#prod-Module">Module</a></emu-nt>. It also contains the bindings that are explicitly imported by the <emu-nt id="_ref_9028"><a href="#prod-Module">Module</a></emu-nt>. The outer environment of a <emu-xref href="#module-environment" id="_ref_1809"><a href="#module-environment">module environment</a></emu-xref> is a <emu-xref href="#global-environment" id="_ref_1810"><a href="#global-environment">global environment</a></emu-xref>.</p>
<p>A <dfn id="function-environment">function environment</dfn> is a Lexical Environment that corresponds to the invocation of an ECMAScript <emu-xref href="#function-object" id="_ref_1811"><a href="#function-object">function object</a></emu-xref>. A <emu-xref href="#function-environment" id="_ref_1812"><a href="#function-environment">function environment</a></emu-xref> may establish a new <code>this</code> binding. A <emu-xref href="#function-environment" id="_ref_1813"><a href="#function-environment">function environment</a></emu-xref> also captures the state necessary to support <code>super</code> method invocations.</p>
<p>Lexical Environments and <emu-xref href="#sec-environment-records" id="_ref_1814"><a href="#sec-environment-records">Environment Record</a></emu-xref>
values are purely specification mechanisms and need not correspond to
any specific artefact of an ECMAScript implementation. It is impossible
for an ECMAScript program to directly access or manipulate such values.</p>
<emu-clause id="sec-environment-records">
<h1><span class="secnum">8.1.1</span>Environment Records</h1>
<p>There are two primary kinds of <dfn>Environment Record</dfn> values used in this specification: <em>declarative Environment Records</em> and <em>object Environment Records</em>. Declarative Environment Records are used to define the effect of ECMAScript language syntactic elements such as <emu-nt id="_ref_9029"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>s, <emu-nt id="_ref_9030"><a href="#prod-VariableDeclaration">VariableDeclaration</a></emu-nt>s, and <emu-nt id="_ref_9031"><a href="#prod-Catch">Catch</a></emu-nt>
clauses that directly associate identifier bindings with ECMAScript
language values. Object Environment Records are used to define the
effect of ECMAScript elements such as <emu-nt id="_ref_9032"><a href="#prod-WithStatement">WithStatement</a></emu-nt>
that associate identifier bindings with the properties of some object.
Global Environment Records and function Environment Records are
specializations that are used for specifically for <emu-nt id="_ref_9033"><a href="#prod-Script">Script</a></emu-nt> global declarations and for top-level declarations within functions.</p>
<p>For specification purposes Environment Record values are values of the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_1815"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref>
specification type and can be thought of as existing in a simple
object-oriented hierarchy where Environment Record is an abstract class
with three concrete subclasses, declarative Environment Record, object
Environment Record, and global Environment Record. Function Environment
Records and module Environment Records are subclasses of declarative
Environment Record. The abstract class includes the abstract
specification methods defined in <emu-xref href="#table-15" id="_ref_155"><a href="#table-15">Table 14</a></emu-xref>. These abstract methods have distinct concrete algorithms for each of the concrete subclasses.</p>
<emu-table id="table-15" caption="Abstract Methods of Environment Records"><figure><figcaption>Table 14: Abstract Methods of Environment Records</figcaption>
<table>
<tbody>
<tr>
<th>
Method
</th>
<th>
Purpose
</th>
</tr>
<tr>
<td>
HasBinding(N)
</td>
<td>
Determine if an <emu-xref href="#sec-environment-records" id="_ref_1816"><a href="#sec-environment-records">Environment Record</a></emu-xref> has a binding for the String value <var>N</var>. Return <emu-val>true</emu-val> if it does and <emu-val>false</emu-val> if it does not.
</td>
</tr>
<tr>
<td>
CreateMutableBinding(N, D)
</td>
<td>
Create a new but uninitialized mutable binding in an <emu-xref href="#sec-environment-records" id="_ref_1817"><a href="#sec-environment-records">Environment Record</a></emu-xref>. The String value <var>N</var> is the text of the bound name. If the Boolean argument <var>D</var> is <emu-val>true</emu-val> the binding may be subsequently deleted.
</td>
</tr>
<tr>
<td>
CreateImmutableBinding(N, S)
</td>
<td>
Create a new but uninitialized immutable binding in an <emu-xref href="#sec-environment-records" id="_ref_1818"><a href="#sec-environment-records">Environment Record</a></emu-xref>. The String value <var>N</var> is the text of the bound name. If <var>S</var> is <emu-val>true</emu-val>
then attempts to set it after it has been initialized will always throw
an exception, regardless of the strict mode setting of operations that
reference that binding.
</td>
</tr>
<tr>
<td>
InitializeBinding(N, V)
</td>
<td>
Set the value of an already existing but uninitialized binding in an <emu-xref href="#sec-environment-records" id="_ref_1819"><a href="#sec-environment-records">Environment Record</a></emu-xref>. The String value <var>N</var> is the text of the bound name. <var>V</var> is the value for the binding and is a value of any <emu-xref href="#sec-ecmascript-language-types" id="_ref_1820"><a href="#sec-ecmascript-language-types">ECMAScript language type</a></emu-xref>.
</td>
</tr>
<tr>
<td>
SetMutableBinding(N, V, S)
</td>
<td>
Set the value of an already existing mutable binding in an <emu-xref href="#sec-environment-records" id="_ref_1821"><a href="#sec-environment-records">Environment Record</a></emu-xref>. The String value <var>N</var> is the text of the bound name. <var>V</var> is the value for the binding and may be a value of any <emu-xref href="#sec-ecmascript-language-types" id="_ref_1822"><a href="#sec-ecmascript-language-types">ECMAScript language type</a></emu-xref>. <var>S</var> is a Boolean flag. If <var>S</var> is <emu-val>true</emu-val> and the binding cannot be set throw a <emu-val>TypeError</emu-val> exception.
</td>
</tr>
<tr>
<td>
GetBindingValue(N, S)
</td>
<td>
Returns the value of an already existing binding from an <emu-xref href="#sec-environment-records" id="_ref_1823"><a href="#sec-environment-records">Environment Record</a></emu-xref>. The String value <var>N</var> is the text of the bound name. <var>S</var> is used to identify references originating in <emu-xref href="#sec-strict-mode-code" id="_ref_1824"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref> or that otherwise require strict mode reference semantics. If <var>S</var> is <emu-val>true</emu-val> and the binding does not exist throw a <emu-val>ReferenceError</emu-val> exception. If the binding exists but is uninitialized a <emu-val>ReferenceError</emu-val> is thrown, regardless of the value of <var>S</var>.
</td>
</tr>
<tr>
<td>
DeleteBinding(N)
</td>
<td>
Delete a binding from an <emu-xref href="#sec-environment-records" id="_ref_1825"><a href="#sec-environment-records">Environment Record</a></emu-xref>. The String value <var>N</var> is the text of the bound name. If a binding for <var>N</var> exists, remove the binding and return <emu-val>true</emu-val>. If the binding exists but cannot be removed return <emu-val>false</emu-val>. If the binding does not exist return <emu-val>true</emu-val>.
</td>
</tr>
<tr>
<td>
HasThisBinding()
</td>
<td>
Determine if an <emu-xref href="#sec-environment-records" id="_ref_1826"><a href="#sec-environment-records">Environment Record</a></emu-xref> establishes a <code>this</code> binding. Return <emu-val>true</emu-val> if it does and <emu-val>false</emu-val> if it does not.
</td>
</tr>
<tr>
<td>
HasSuperBinding()
</td>
<td>
Determine if an <emu-xref href="#sec-environment-records" id="_ref_1827"><a href="#sec-environment-records">Environment Record</a></emu-xref> establishes a <code>super</code> method binding. Return <emu-val>true</emu-val> if it does and <emu-val>false</emu-val> if it does not.
</td>
</tr>
<tr>
<td>
WithBaseObject()
</td>
<td>
If this <emu-xref href="#sec-environment-records" id="_ref_1828"><a href="#sec-environment-records">Environment Record</a></emu-xref> is associated with a <code>with</code> statement, return the with object. Otherwise, return <emu-val>undefined</emu-val>.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<emu-clause id="sec-declarative-environment-records">
<h1><span class="secnum">8.1.1.1</span>Declarative Environment Records</h1>
<p>Each declarative <emu-xref href="#sec-environment-records" id="_ref_1829"><a href="#sec-environment-records">Environment Record</a></emu-xref>
is associated with an ECMAScript program scope containing variable,
constant, let, class, module, import, and/or function declarations. A
declarative <emu-xref href="#sec-environment-records" id="_ref_1830"><a href="#sec-environment-records">Environment Record</a></emu-xref> binds the set of identifiers defined by the declarations contained within its scope.</p>
<p>The behaviour of the concrete specification methods for declarative Environment Records is defined by the following algorithms.</p>
<emu-clause id="sec-declarative-environment-records-hasbinding-n">
<h1><span class="secnum">8.1.1.1.1</span>HasBinding ( <var>N</var> )</h1>
<p>The concrete <emu-xref href="#sec-environment-records" id="_ref_1831"><a href="#sec-environment-records">Environment Record</a></emu-xref>
method HasBinding for declarative Environment Records simply determines
if the argument identifier is one of the identifiers bound by the
record:</p>
<emu-alg><ol><li>Let <var>envRec</var> be the declarative <emu-xref href="#sec-environment-records" id="_ref_1832"><a href="#sec-environment-records">Environment Record</a></emu-xref> for which the method was invoked.</li><li>If <var>envRec</var> has a binding for the name that is the value of <var>N</var>, return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-declarative-environment-records-createmutablebinding-n-d">
<h1><span class="secnum">8.1.1.1.2</span>CreateMutableBinding ( <var>N</var>, <var>D</var> )</h1>
<p>The concrete <emu-xref href="#sec-environment-records" id="_ref_1833"><a href="#sec-environment-records">Environment Record</a></emu-xref> method CreateMutableBinding for declarative Environment Records creates a new mutable binding for the name <var>N</var> that is uninitialized. A binding must not already exist in this <emu-xref href="#sec-environment-records" id="_ref_1834"><a href="#sec-environment-records">Environment Record</a></emu-xref> for <var>N</var>. If Boolean argument <var>D</var> has the value <emu-val>true</emu-val> the new binding is marked as being subject to deletion.</p>
<emu-alg><ol><li>Let <var>envRec</var> be the declarative <emu-xref href="#sec-environment-records" id="_ref_1835"><a href="#sec-environment-records">Environment Record</a></emu-xref> for which the method was invoked.</li><li><emu-xref href="#assert" id="_ref_1836"><a href="#assert">Assert</a></emu-xref>: <var>envRec</var> does not already have a binding for <var>N</var>.</li><li>Create a mutable binding in <var>envRec</var> for <var>N</var> and record that it is uninitialized. If <var>D</var> is <emu-val>true</emu-val>, record that the newly created binding may be deleted by a subsequent DeleteBinding call.</li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_1837"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-declarative-environment-records-createimmutablebinding-n-s">
<h1><span class="secnum">8.1.1.1.3</span>CreateImmutableBinding ( <var>N</var>, <var>S</var> )</h1>
<p>The concrete <emu-xref href="#sec-environment-records" id="_ref_1838"><a href="#sec-environment-records">Environment Record</a></emu-xref> method CreateImmutableBinding for declarative Environment Records creates a new immutable binding for the name <var>N</var> that is uninitialized. A binding must not already exist in this <emu-xref href="#sec-environment-records" id="_ref_1839"><a href="#sec-environment-records">Environment Record</a></emu-xref> for <var>N</var>. If the Boolean argument <var>S</var> has the value <emu-val>true</emu-val> the new binding is marked as a strict binding.</p>
<emu-alg><ol><li>Let <var>envRec</var> be the declarative <emu-xref href="#sec-environment-records" id="_ref_1840"><a href="#sec-environment-records">Environment Record</a></emu-xref> for which the method was invoked.</li><li><emu-xref href="#assert" id="_ref_1841"><a href="#assert">Assert</a></emu-xref>: <var>envRec</var> does not already have a binding for <var>N</var>.</li><li>Create an immutable binding in <var>envRec</var> for <var>N</var> and record that it is uninitialized. If <var>S</var> is <emu-val>true</emu-val>, record that the newly created binding is a strict binding.</li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_1842"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-declarative-environment-records-initializebinding-n-v">
<h1><span class="secnum">8.1.1.1.4</span>InitializeBinding ( <var>N</var>, <var>V</var> )</h1>
<p>The concrete <emu-xref href="#sec-environment-records" id="_ref_1843"><a href="#sec-environment-records">Environment Record</a></emu-xref>
method InitializeBinding for declarative Environment Records is used to
set the bound value of the current binding of the identifier whose name
is the value of the argument <var>N</var> to the value of argument <var>V</var>. An uninitialized binding for <var>N</var> must already exist.</p>
<emu-alg><ol><li>Let <var>envRec</var> be the declarative <emu-xref href="#sec-environment-records" id="_ref_1844"><a href="#sec-environment-records">Environment Record</a></emu-xref> for which the method was invoked.</li><li><emu-xref href="#assert" id="_ref_1845"><a href="#assert">Assert</a></emu-xref>: <var>envRec</var> must have an uninitialized binding for <var>N</var>.</li><li>Set the bound value for <var>N</var> in <var>envRec</var> to <var>V</var>.</li><li><emu-xref href="#sec-list-and-record-specification-type" id="_ref_1846"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> that the binding for <var>N</var> in <var>envRec</var> has been initialized.</li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_1847"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-declarative-environment-records-setmutablebinding-n-v-s">
<h1><span class="secnum">8.1.1.1.5</span>SetMutableBinding ( <var>N</var>, <var>V</var>, <var>S</var> )</h1>
<p>The concrete <emu-xref href="#sec-environment-records" id="_ref_1848"><a href="#sec-environment-records">Environment Record</a></emu-xref>
method SetMutableBinding for declarative Environment Records attempts
to change the bound value of the current binding of the identifier whose
name is the value of the argument <var>N</var> to the value of argument <var>V</var>. A binding for <var>N</var> normally already exists, but in rare cases it may not. If the binding is an immutable binding, a <emu-val>TypeError</emu-val> is thrown if <var>S</var> is <emu-val>true</emu-val>.</p>
<emu-alg><ol><li>Let <var>envRec</var> be the declarative <emu-xref href="#sec-environment-records" id="_ref_1849"><a href="#sec-environment-records">Environment Record</a></emu-xref> for which the method was invoked.</li><li>If <var>envRec</var> does not have a binding for <var>N</var>, then<ol><li>If <var>S</var> is <emu-val>true</emu-val>, throw a <emu-val>ReferenceError</emu-val> exception.</li><li>Perform <var>envRec</var>.CreateMutableBinding(<var>N</var>, <emu-val>true</emu-val>).</li><li>Perform <var>envRec</var>.InitializeBinding(<var>N</var>, <var>V</var>).</li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_1850"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).</li></ol></li><li>If the binding for <var>N</var> in <var>envRec</var> is a strict binding, set <var>S</var> to <emu-val>true</emu-val>.</li><li>If the binding for <var>N</var> in <var>envRec</var> has not yet been initialized, throw a <emu-val>ReferenceError</emu-val> exception.</li><li>Else if the binding for <var>N</var> in <var>envRec</var> is a mutable binding, change its bound value to <var>V</var>.</li><li>Else,<ol><li><emu-xref href="#assert" id="_ref_1851"><a href="#assert">Assert</a></emu-xref>: This is an attempt to change the value of an immutable binding.</li><li>If <var>S</var> is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li></ol></li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_1852"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>An example of ECMAScript code that results in a missing binding at step 2 is:</p>
<pre><code language="javascript">function f(){eval("var x; x = (delete x, 0);")}</code></pre>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-declarative-environment-records-getbindingvalue-n-s">
<h1><span class="secnum">8.1.1.1.6</span>GetBindingValue ( <var>N</var>, <var>S</var> )</h1>
<p>The concrete <emu-xref href="#sec-environment-records" id="_ref_1853"><a href="#sec-environment-records">Environment Record</a></emu-xref>
method GetBindingValue for declarative Environment Records simply
returns the value of its bound identifier whose name is the value of the
argument <var>N</var>. If the binding exists but is uninitialized a <emu-val>ReferenceError</emu-val> is thrown, regardless of the value of <var>S</var>.</p>
<emu-alg><ol><li>Let <var>envRec</var> be the declarative <emu-xref href="#sec-environment-records" id="_ref_1854"><a href="#sec-environment-records">Environment Record</a></emu-xref> for which the method was invoked.</li><li><emu-xref href="#assert" id="_ref_1855"><a href="#assert">Assert</a></emu-xref>: <var>envRec</var> has a binding for <var>N</var>.</li><li>If the binding for <var>N</var> in <var>envRec</var> is an uninitialized binding, throw a <emu-val>ReferenceError</emu-val> exception.</li><li>Return the value currently bound to <var>N</var> in <var>envRec</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-declarative-environment-records-deletebinding-n">
<h1><span class="secnum">8.1.1.1.7</span>DeleteBinding ( <var>N</var> )</h1>
<p>The concrete <emu-xref href="#sec-environment-records" id="_ref_1856"><a href="#sec-environment-records">Environment Record</a></emu-xref>
method DeleteBinding for declarative Environment Records can only
delete bindings that have been explicitly designated as being subject to
deletion.</p>
<emu-alg><ol><li>Let <var>envRec</var> be the declarative <emu-xref href="#sec-environment-records" id="_ref_1857"><a href="#sec-environment-records">Environment Record</a></emu-xref> for which the method was invoked.</li><li><emu-xref href="#assert" id="_ref_1858"><a href="#assert">Assert</a></emu-xref>: <var>envRec</var> has a binding for the name that is the value of <var>N</var>.</li><li>If the binding for <var>N</var> in <var>envRec</var> cannot be deleted, return <emu-val>false</emu-val>.</li><li>Remove the binding for <var>N</var> from <var>envRec</var>.</li><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-declarative-environment-records-hasthisbinding">
<h1><span class="secnum">8.1.1.1.8</span>HasThisBinding ( )</h1>
<p>Regular declarative Environment Records do not provide a <code>this</code> binding.</p>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-declarative-environment-records-hassuperbinding">
<h1><span class="secnum">8.1.1.1.9</span>HasSuperBinding ( )</h1>
<p>Regular declarative Environment Records do not provide a <code>super</code> binding.</p>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-declarative-environment-records-withbaseobject">
<h1><span class="secnum">8.1.1.1.10</span>WithBaseObject ( )</h1>
<p>Declarative Environment Records always return <emu-val>undefined</emu-val> as their WithBaseObject.</p>
<emu-alg><ol><li>Return <emu-val>undefined</emu-val>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-object-environment-records">
<h1><span class="secnum">8.1.1.2</span>Object Environment Records</h1>
<p>Each object <emu-xref href="#sec-environment-records" id="_ref_1859"><a href="#sec-environment-records">Environment Record</a></emu-xref> is associated with an object called its <em>binding object</em>. An object <emu-xref href="#sec-environment-records" id="_ref_1860"><a href="#sec-environment-records">Environment Record</a></emu-xref>
binds the set of string identifier names that directly correspond to
the property names of its binding object. Property keys that are not
strings in the form of an <emu-nt id="_ref_9034"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt>
are not included in the set of bound identifiers. Both own and
inherited properties are included in the set regardless of the setting
of their [[Enumerable]] attribute. Because properties can be dynamically
added and deleted from objects, the set of identifiers bound by an
object <emu-xref href="#sec-environment-records" id="_ref_1861"><a href="#sec-environment-records">Environment Record</a></emu-xref>
may potentially change as a side-effect of any operation that adds or
deletes properties. Any bindings that are created as a result of such a
side-effect are considered to be a mutable binding even if the Writable
attribute of the corresponding property has the value <emu-val>false</emu-val>. Immutable bindings do not exist for object Environment Records.</p>
<p>Object Environment Records created for <code>with</code> statements (<emu-xref href="#sec-with-statement" id="_ref_156"><a href="#sec-with-statement">13.11</a></emu-xref>) can provide their binding object as an implicit <emu-val>this</emu-val> value for use in function calls. The capability is controlled by a <var>withEnvironment</var> Boolean value that is associated with each object <emu-xref href="#sec-environment-records" id="_ref_1862"><a href="#sec-environment-records">Environment Record</a></emu-xref>. By default, the value of <var>withEnvironment</var> is <emu-val>false</emu-val> for any object <emu-xref href="#sec-environment-records" id="_ref_1863"><a href="#sec-environment-records">Environment Record</a></emu-xref>.</p>
<p>The behaviour of the concrete specification methods for object Environment Records is defined by the following algorithms.</p>
<emu-clause id="sec-object-environment-records-hasbinding-n">
<h1><span class="secnum">8.1.1.2.1</span>HasBinding ( <var>N</var> )</h1>
<p>The concrete <emu-xref href="#sec-environment-records" id="_ref_1864"><a href="#sec-environment-records">Environment Record</a></emu-xref>
method HasBinding for object Environment Records determines if its
associated binding object has a property whose name is the value of the
argument <var>N</var>:</p>
<emu-alg><ol><li>Let <var>envRec</var> be the object <emu-xref href="#sec-environment-records" id="_ref_1865"><a href="#sec-environment-records">Environment Record</a></emu-xref> for which the method was invoked.</li><li>Let <var>bindings</var> be the binding object for <var>envRec</var>.</li><li>Let <var>foundBinding</var> be ?&nbsp;<emu-xref aoid="HasProperty" id="_ref_1866"><a href="#sec-hasproperty">HasProperty</a></emu-xref>(<var>bindings</var>, <var>N</var>).</li><li>If <var>foundBinding</var> is <emu-val>false</emu-val>, return <emu-val>false</emu-val>.</li><li>If the <var>withEnvironment</var> flag of <var>envRec</var> is <emu-val>false</emu-val>, return <emu-val>true</emu-val>.</li><li>Let <var>unscopables</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_1867"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>bindings</var>, @@unscopables).</li><li>If <emu-xref aoid="Type" id="_ref_1868"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>unscopables</var>) is Object, then<ol><li>Let <var>blocked</var> be <emu-xref aoid="ToBoolean" id="_ref_1869"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_1870"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>unscopables</var>, <var>N</var>)).</li><li>If <var>blocked</var> is <emu-val>true</emu-val>, return <emu-val>false</emu-val>.</li></ol></li><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-object-environment-records-createmutablebinding-n-d">
<h1><span class="secnum">8.1.1.2.2</span>CreateMutableBinding ( <var>N</var>, <var>D</var> )</h1>
<p>The concrete <emu-xref href="#sec-environment-records" id="_ref_1871"><a href="#sec-environment-records">Environment Record</a></emu-xref> method CreateMutableBinding for object Environment Records creates in an <emu-xref href="#sec-environment-records" id="_ref_1872"><a href="#sec-environment-records">Environment Record</a></emu-xref>'s associated binding object a property whose name is the String value and initializes it to the value <emu-val>undefined</emu-val>. If Boolean argument <var>D</var> has the value <emu-val>true</emu-val> the new property's [[Configurable]] attribute is set to <emu-val>true</emu-val>; otherwise it is set to <emu-val>false</emu-val>.</p>
<emu-alg><ol><li>Let <var>envRec</var> be the object <emu-xref href="#sec-environment-records" id="_ref_1873"><a href="#sec-environment-records">Environment Record</a></emu-xref> for which the method was invoked.</li><li>Let <var>bindings</var> be the binding object for <var>envRec</var>.</li><li>Return ?&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_1874"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>bindings</var>, <var>N</var>, PropertyDescriptor { [[Value]]: <emu-val>undefined</emu-val>, [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>true</emu-val>, [[Configurable]]: <var>D</var> }).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Normally <var>envRec</var> will not have a binding for <var>N</var> but if it does, the semantics of <emu-xref aoid="DefinePropertyOrThrow" id="_ref_1875"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref> may result in an existing binding being replaced or shadowed or cause an <emu-xref href="#sec-completion-record-specification-type" id="_ref_1876"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref> to be returned.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-object-environment-records-createimmutablebinding-n-s">
<h1><span class="secnum">8.1.1.2.3</span>CreateImmutableBinding ( <var>N</var>, <var>S</var> )</h1>
<p>The concrete <emu-xref href="#sec-environment-records" id="_ref_1877"><a href="#sec-environment-records">Environment Record</a></emu-xref> method CreateImmutableBinding is never used within this specification in association with object Environment Records.</p>
</emu-clause>
<emu-clause id="sec-object-environment-records-initializebinding-n-v">
<h1><span class="secnum">8.1.1.2.4</span>InitializeBinding ( <var>N</var>, <var>V</var> )</h1>
<p>The concrete <emu-xref href="#sec-environment-records" id="_ref_1878"><a href="#sec-environment-records">Environment Record</a></emu-xref>
method InitializeBinding for object Environment Records is used to set
the bound value of the current binding of the identifier whose name is
the value of the argument <var>N</var> to the value of argument <var>V</var>. An uninitialized binding for <var>N</var> must already exist.</p>
<emu-alg><ol><li>Let <var>envRec</var> be the object <emu-xref href="#sec-environment-records" id="_ref_1879"><a href="#sec-environment-records">Environment Record</a></emu-xref> for which the method was invoked.</li><li><emu-xref href="#assert" id="_ref_1880"><a href="#assert">Assert</a></emu-xref>: <var>envRec</var> must have an uninitialized binding for <var>N</var>.</li><li><emu-xref href="#sec-list-and-record-specification-type" id="_ref_1881"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> that the binding for <var>N</var> in <var>envRec</var> has been initialized.</li><li>Return ? <var>envRec</var>.SetMutableBinding(<var>N</var>, <var>V</var>, <emu-val>false</emu-val>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>In this specification, all uses of CreateMutableBinding
for object Environment Records are immediately followed by a call to
InitializeBinding for the same name. Hence, implementations do not need
to explicitly track the initialization state of individual object <emu-xref href="#sec-environment-records" id="_ref_1882"><a href="#sec-environment-records">Environment Record</a></emu-xref> bindings.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-object-environment-records-setmutablebinding-n-v-s">
<h1><span class="secnum">8.1.1.2.5</span>SetMutableBinding ( <var>N</var>, <var>V</var>, <var>S</var> )</h1>
<p>The concrete <emu-xref href="#sec-environment-records" id="_ref_1883"><a href="#sec-environment-records">Environment Record</a></emu-xref> method SetMutableBinding for object Environment Records attempts to set the value of the <emu-xref href="#sec-environment-records" id="_ref_1884"><a href="#sec-environment-records">Environment Record</a></emu-xref>'s associated binding object's property whose name is the value of the argument <var>N</var> to the value of argument <var>V</var>. A property named <var>N</var>
normally already exists but if it does not or is not currently
writable, error handling is determined by the value of the Boolean
argument <var>S</var>.</p>
<emu-alg><ol><li>Let <var>envRec</var> be the object <emu-xref href="#sec-environment-records" id="_ref_1885"><a href="#sec-environment-records">Environment Record</a></emu-xref> for which the method was invoked.</li><li>Let <var>bindings</var> be the binding object for <var>envRec</var>.</li><li>Return ?&nbsp;<emu-xref aoid="Set" id="_ref_1886"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>bindings</var>, <var>N</var>, <var>V</var>, <var>S</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-object-environment-records-getbindingvalue-n-s">
<h1><span class="secnum">8.1.1.2.6</span>GetBindingValue ( <var>N</var>, <var>S</var> )</h1>
<p>The concrete <emu-xref href="#sec-environment-records" id="_ref_1887"><a href="#sec-environment-records">Environment Record</a></emu-xref>
method GetBindingValue for object Environment Records returns the value
of its associated binding object's property whose name is the String
value of the argument identifier <var>N</var>. The property should already exist but if it does not the result depends upon the value of the <var>S</var> argument:</p>
<emu-alg><ol><li>Let <var>envRec</var> be the object <emu-xref href="#sec-environment-records" id="_ref_1888"><a href="#sec-environment-records">Environment Record</a></emu-xref> for which the method was invoked.</li><li>Let <var>bindings</var> be the binding object for <var>envRec</var>.</li><li>Let <var>value</var> be ?&nbsp;<emu-xref aoid="HasProperty" id="_ref_1889"><a href="#sec-hasproperty">HasProperty</a></emu-xref>(<var>bindings</var>, <var>N</var>).</li><li>If <var>value</var> is <emu-val>false</emu-val>, then<ol><li>If <var>S</var> is <emu-val>false</emu-val>, return the value <emu-val>undefined</emu-val>; otherwise throw a <emu-val>ReferenceError</emu-val> exception.</li></ol></li><li>Return ?&nbsp;<emu-xref aoid="Get" id="_ref_1890"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>bindings</var>, <var>N</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-object-environment-records-deletebinding-n">
<h1><span class="secnum">8.1.1.2.7</span>DeleteBinding ( <var>N</var> )</h1>
<p>The concrete <emu-xref href="#sec-environment-records" id="_ref_1891"><a href="#sec-environment-records">Environment Record</a></emu-xref>
method DeleteBinding for object Environment Records can only delete
bindings that correspond to properties of the environment object whose
[[Configurable]] attribute have the value <emu-val>true</emu-val>.</p>
<emu-alg><ol><li>Let <var>envRec</var> be the object <emu-xref href="#sec-environment-records" id="_ref_1892"><a href="#sec-environment-records">Environment Record</a></emu-xref> for which the method was invoked.</li><li>Let <var>bindings</var> be the binding object for <var>envRec</var>.</li><li>Return ? <var>bindings</var>.[[Delete]](<var>N</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-object-environment-records-hasthisbinding">
<h1><span class="secnum">8.1.1.2.8</span>HasThisBinding ( )</h1>
<p>Regular object Environment Records do not provide a <code>this</code> binding.</p>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-object-environment-records-hassuperbinding">
<h1><span class="secnum">8.1.1.2.9</span>HasSuperBinding ( )</h1>
<p>Regular object Environment Records do not provide a <code>super</code> binding.</p>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-object-environment-records-withbaseobject">
<h1><span class="secnum">8.1.1.2.10</span>WithBaseObject ( )</h1>
<p>Object Environment Records return <emu-val>undefined</emu-val> as their WithBaseObject unless their <var>withEnvironment</var> flag is <emu-val>true</emu-val>.</p>
<emu-alg><ol><li>Let <var>envRec</var> be the object <emu-xref href="#sec-environment-records" id="_ref_1893"><a href="#sec-environment-records">Environment Record</a></emu-xref> for which the method was invoked.</li><li>If the <var>withEnvironment</var> flag of <var>envRec</var> is <emu-val>true</emu-val>, return the binding object for <var>envRec</var>.</li><li>Otherwise, return <emu-val>undefined</emu-val>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-function-environment-records">
<h1><span class="secnum">8.1.1.3</span>Function Environment Records</h1>
<p>A <dfn>function Environment Record</dfn> is a declarative <emu-xref href="#sec-environment-records" id="_ref_1894"><a href="#sec-environment-records">Environment Record</a></emu-xref> that is used to represent the top-level scope of a function and, if the function is not an <emu-nt id="_ref_9035"><a href="#prod-ArrowFunction">ArrowFunction</a></emu-nt>, provides a <code>this</code> binding. If a function is not an <emu-nt id="_ref_9036"><a href="#prod-ArrowFunction">ArrowFunction</a></emu-nt> function and references <code>super</code>, its function Environment Record also contains the state that is used to perform <code>super</code> method invocations from within the function.</p>
<p>Function Environment Records have the additional state fields listed in <emu-xref href="#table-16" id="_ref_157"><a href="#table-16">Table 15</a></emu-xref>.</p>
<emu-table id="table-16" caption="Additional Fields of Function Environment Records"><figure><figcaption>Table 15: Additional Fields of Function Environment Records</figcaption>
<table>
<tbody>
<tr>
<th>
Field Name
</th>
<th>
Value
</th>
<th>
Meaning
</th>
</tr>
<tr>
<td>
[[ThisValue]]
</td>
<td>
Any
</td>
<td>
This is the <emu-val>this</emu-val> value used for this invocation of the function.
</td>
</tr>
<tr>
<td>
[[ThisBindingStatus]]
</td>
<td>
<code>"lexical"</code> | <code>"initialized"</code> | <code>"uninitialized"</code>
</td>
<td>
If the value is <code>"lexical"</code>, this is an <emu-nt id="_ref_9037"><a href="#prod-ArrowFunction">ArrowFunction</a></emu-nt> and does not have a local this value.
</td>
</tr>
<tr>
<td>
[[FunctionObject]]
</td>
<td>
Object
</td>
<td>
The <emu-xref href="#function-object" id="_ref_1895"><a href="#function-object">function object</a></emu-xref> whose invocation caused this <emu-xref href="#sec-environment-records" id="_ref_1896"><a href="#sec-environment-records">Environment Record</a></emu-xref> to be created.
</td>
</tr>
<tr>
<td>
[[HomeObject]]
</td>
<td>
Object | <emu-val>undefined</emu-val>
</td>
<td>
If the associated function has <code>super</code> property accesses and is not an <emu-nt id="_ref_9038"><a href="#prod-ArrowFunction">ArrowFunction</a></emu-nt>, [[HomeObject]] is the object that the function is bound to as a method. The default value for [[HomeObject]] is <emu-val>undefined</emu-val>.
</td>
</tr>
<tr>
<td>
[[NewTarget]]
</td>
<td>
Object | <emu-val>undefined</emu-val>
</td>
<td>
If this <emu-xref href="#sec-environment-records" id="_ref_1897"><a href="#sec-environment-records">Environment Record</a></emu-xref> was created by the [[Construct]] internal method, [[NewTarget]] is the value of the [[Construct]] <var>newTarget</var> parameter. Otherwise, its value is <emu-val>undefined</emu-val>.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<p>Function Environment Records support all of the declarative <emu-xref href="#sec-environment-records" id="_ref_1898"><a href="#sec-environment-records">Environment Record</a></emu-xref> methods listed in <emu-xref href="#table-15" id="_ref_158"><a href="#table-15">Table 14</a></emu-xref>
and share the same specifications for all of those methods except for
HasThisBinding and HasSuperBinding. In addition, function Environment
Records support the methods listed in <emu-xref href="#table-17" id="_ref_159"><a href="#table-17">Table 16</a></emu-xref>:</p>
<emu-table id="table-17" caption="Additional Methods of Function Environment Records"><figure><figcaption>Table 16: Additional Methods of Function Environment Records</figcaption>
<table>
<tbody>
<tr>
<th>
Method
</th>
<th>
Purpose
</th>
</tr>
<tr>
<td>
BindThisValue(V)
</td>
<td>
Set the [[ThisValue]] and record that it has been initialized.
</td>
</tr>
<tr>
<td>
GetThisBinding()
</td>
<td>
Return the value of this <emu-xref href="#sec-environment-records" id="_ref_1899"><a href="#sec-environment-records">Environment Record</a></emu-xref>'s <code>this</code> binding. Throws a <emu-val>ReferenceError</emu-val> if the <code>this</code> binding has not been initialized.
</td>
</tr>
<tr>
<td>
GetSuperBase()
</td>
<td>
Return the object that is the base for <code>super</code> property accesses bound in this <emu-xref href="#sec-environment-records" id="_ref_1900"><a href="#sec-environment-records">Environment Record</a></emu-xref>. The object is derived from this <emu-xref href="#sec-environment-records" id="_ref_1901"><a href="#sec-environment-records">Environment Record</a></emu-xref>'s [[HomeObject]] field. The value <emu-val>undefined</emu-val> indicates that <code>super</code> property accesses will produce runtime errors.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<p>The behaviour of the additional concrete specification
methods for function Environment Records is defined by the following
algorithms:</p>
<emu-clause id="sec-bindthisvalue">
<h1><span class="secnum">8.1.1.3.1</span>BindThisValue ( <var>V</var> )</h1>
<emu-alg><ol><li>Let <var>envRec</var> be the <emu-xref href="#sec-function-environment-records" id="_ref_1902"><a href="#sec-function-environment-records">function Environment Record</a></emu-xref> for which the method was invoked.</li><li><emu-xref href="#assert" id="_ref_1903"><a href="#assert">Assert</a></emu-xref>: <var>envRec</var>.[[ThisBindingStatus]] is not <code>"lexical"</code>.</li><li>If <var>envRec</var>.[[ThisBindingStatus]] is <code>"initialized"</code>, throw a <emu-val>ReferenceError</emu-val> exception.</li><li>Set <var>envRec</var>.[[ThisValue]] to <var>V</var>.</li><li>Set <var>envRec</var>.[[ThisBindingStatus]] to <code>"initialized"</code>.</li><li>Return <var>V</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-function-environment-records-hasthisbinding">
<h1><span class="secnum">8.1.1.3.2</span>HasThisBinding ( )</h1>
<emu-alg><ol><li>Let <var>envRec</var> be the <emu-xref href="#sec-function-environment-records" id="_ref_1904"><a href="#sec-function-environment-records">function Environment Record</a></emu-xref> for which the method was invoked.</li><li>If <var>envRec</var>.[[ThisBindingStatus]] is <code>"lexical"</code>, return <emu-val>false</emu-val>; otherwise, return <emu-val>true</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-function-environment-records-hassuperbinding">
<h1><span class="secnum">8.1.1.3.3</span>HasSuperBinding ( )</h1>
<emu-alg><ol><li>Let <var>envRec</var> be the <emu-xref href="#sec-function-environment-records" id="_ref_1905"><a href="#sec-function-environment-records">function Environment Record</a></emu-xref> for which the method was invoked.</li><li>If <var>envRec</var>.[[ThisBindingStatus]] is <code>"lexical"</code>, return <emu-val>false</emu-val>.</li><li>If <var>envRec</var>.[[HomeObject]] has the value <emu-val>undefined</emu-val>, return <emu-val>false</emu-val>; otherwise, return <emu-val>true</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-function-environment-records-getthisbinding">
<h1><span class="secnum">8.1.1.3.4</span>GetThisBinding ( )</h1>
<emu-alg><ol><li>Let <var>envRec</var> be the <emu-xref href="#sec-function-environment-records" id="_ref_1906"><a href="#sec-function-environment-records">function Environment Record</a></emu-xref> for which the method was invoked.</li><li><emu-xref href="#assert" id="_ref_1907"><a href="#assert">Assert</a></emu-xref>: <var>envRec</var>.[[ThisBindingStatus]] is not <code>"lexical"</code>.</li><li>If <var>envRec</var>.[[ThisBindingStatus]] is <code>"uninitialized"</code>, throw a <emu-val>ReferenceError</emu-val> exception.</li><li>Return <var>envRec</var>.[[ThisValue]].
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-getsuperbase">
<h1><span class="secnum">8.1.1.3.5</span>GetSuperBase ( )</h1>
<emu-alg><ol><li>Let <var>envRec</var> be the <emu-xref href="#sec-function-environment-records" id="_ref_1908"><a href="#sec-function-environment-records">function Environment Record</a></emu-xref> for which the method was invoked.</li><li>Let <var>home</var> be <var>envRec</var>.[[HomeObject]].</li><li>If <var>home</var> has the value <emu-val>undefined</emu-val>, return <emu-val>undefined</emu-val>.</li><li><emu-xref href="#assert" id="_ref_1909"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_1910"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>home</var>) is Object.</li><li>Return ? <var>home</var>.[[GetPrototypeOf]]().
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-global-environment-records">
<h1><span class="secnum">8.1.1.4</span>Global Environment Records</h1>
<p>A global <emu-xref href="#sec-environment-records" id="_ref_1911"><a href="#sec-environment-records">Environment Record</a></emu-xref> is used to represent the outer most scope that is shared by all of the ECMAScript <emu-nt id="_ref_9039"><a href="#prod-Script">Script</a></emu-nt> elements that are processed in a common <emu-xref href="#realm" id="_ref_1912"><a href="#realm">realm</a></emu-xref>. A global <emu-xref href="#sec-environment-records" id="_ref_1913"><a href="#sec-environment-records">Environment Record</a></emu-xref> provides the bindings for built-in globals (clause <emu-xref href="#sec-global-object" id="_ref_160"><a href="#sec-global-object">18</a></emu-xref>), properties of the <emu-xref href="#sec-global-object" id="_ref_1914"><a href="#sec-global-object">global object</a></emu-xref>, and for all top-level declarations (<emu-xref href="#sec-block-static-semantics-toplevellexicallyscopeddeclarations" id="_ref_161"><a href="#sec-block-static-semantics-toplevellexicallyscopeddeclarations">13.2.8</a></emu-xref>, <emu-xref href="#sec-block-static-semantics-toplevelvarscopeddeclarations" id="_ref_162"><a href="#sec-block-static-semantics-toplevelvarscopeddeclarations">13.2.10</a></emu-xref>) that occur within a <emu-nt id="_ref_9040"><a href="#prod-Script">Script</a></emu-nt>.</p>
<p>A global <emu-xref href="#sec-environment-records" id="_ref_1915"><a href="#sec-environment-records">Environment Record</a></emu-xref> is logically a single record but it is specified as a composite encapsulating an object <emu-xref href="#sec-environment-records" id="_ref_1916"><a href="#sec-environment-records">Environment Record</a></emu-xref> and a declarative <emu-xref href="#sec-environment-records" id="_ref_1917"><a href="#sec-environment-records">Environment Record</a></emu-xref>. The object <emu-xref href="#sec-environment-records" id="_ref_1918"><a href="#sec-environment-records">Environment Record</a></emu-xref> has as its base object the <emu-xref href="#sec-global-object" id="_ref_1919"><a href="#sec-global-object">global object</a></emu-xref> of the associated <emu-xref href="#realm-record" id="_ref_1920"><a href="#realm-record">Realm Record</a></emu-xref>. This <emu-xref href="#sec-global-object" id="_ref_1921"><a href="#sec-global-object">global object</a></emu-xref> is the value returned by the global <emu-xref href="#sec-environment-records" id="_ref_1922"><a href="#sec-environment-records">Environment Record</a></emu-xref>'s GetThisBinding concrete method. The object <emu-xref href="#sec-environment-records" id="_ref_1923"><a href="#sec-environment-records">Environment Record</a></emu-xref> component of a global <emu-xref href="#sec-environment-records" id="_ref_1924"><a href="#sec-environment-records">Environment Record</a></emu-xref> contains the bindings for all built-in globals (clause <emu-xref href="#sec-global-object" id="_ref_163"><a href="#sec-global-object">18</a></emu-xref>) and all bindings introduced by a <emu-nt id="_ref_9041"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>, <emu-nt id="_ref_9042"><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a></emu-nt>, <emu-nt id="_ref_9043"><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt>, <emu-nt id="_ref_9044"><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt>, or <emu-nt id="_ref_9045"><a href="#prod-VariableStatement">VariableStatement</a></emu-nt> contained in global code. The bindings for all other ECMAScript declarations in global code are contained in the declarative <emu-xref href="#sec-environment-records" id="_ref_1925"><a href="#sec-environment-records">Environment Record</a></emu-xref> component of the global <emu-xref href="#sec-environment-records" id="_ref_1926"><a href="#sec-environment-records">Environment Record</a></emu-xref>.</p>
<p>Properties may be created directly on a <emu-xref href="#sec-global-object" id="_ref_1927"><a href="#sec-global-object">global object</a></emu-xref>. Hence, the object <emu-xref href="#sec-environment-records" id="_ref_1928"><a href="#sec-environment-records">Environment Record</a></emu-xref> component of a global <emu-xref href="#sec-environment-records" id="_ref_1929"><a href="#sec-environment-records">Environment Record</a></emu-xref> may contain both bindings created explicitly by <emu-nt id="_ref_9046"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>, <emu-nt id="_ref_9047"><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a></emu-nt>, <emu-nt id="_ref_9048"><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt>, <emu-nt id="_ref_9049"><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt>, or <emu-nt id="_ref_9050"><a href="#prod-VariableDeclaration">VariableDeclaration</a></emu-nt> declarations and bindings created implicitly as properties of the <emu-xref href="#sec-global-object" id="_ref_1930"><a href="#sec-global-object">global object</a></emu-xref>. In order to identify which bindings were explicitly created using declarations, a global <emu-xref href="#sec-environment-records" id="_ref_1931"><a href="#sec-environment-records">Environment Record</a></emu-xref> maintains a list of the names bound using its CreateGlobalVarBinding and CreateGlobalFunctionBinding concrete methods.</p>
<p>Global Environment Records have the additional fields listed in <emu-xref href="#table-18" id="_ref_164"><a href="#table-18">Table 17</a></emu-xref> and the additional methods listed in <emu-xref href="#table-19" id="_ref_165"><a href="#table-19">Table 18</a></emu-xref>.</p>
<emu-table id="table-18" caption="Additional Fields of Global Environment Records"><figure><figcaption>Table 17: Additional Fields of Global Environment Records</figcaption>
<table>
<tbody>
<tr>
<th>
Field Name
</th>
<th>
Value
</th>
<th>
Meaning
</th>
</tr>
<tr>
<td>
[[ObjectRecord]]
</td>
<td>
Object <emu-xref href="#sec-environment-records" id="_ref_1932"><a href="#sec-environment-records">Environment Record</a></emu-xref>
</td>
<td>
Binding object is the <emu-xref href="#sec-global-object" id="_ref_1933"><a href="#sec-global-object">global object</a></emu-xref>. It contains global built-in bindings as well as <emu-nt id="_ref_9051"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>, <emu-nt id="_ref_9052"><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a></emu-nt>, <emu-nt id="_ref_9053"><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt>, <emu-nt id="_ref_9054"><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt>, and <emu-nt id="_ref_9055"><a href="#prod-VariableDeclaration">VariableDeclaration</a></emu-nt> bindings in global code for the associated <emu-xref href="#realm" id="_ref_1934"><a href="#realm">realm</a></emu-xref>.
</td>
</tr>
<tr>
<td>
[[GlobalThisValue]]
</td>
<td>
Object
</td>
<td>
The value returned by <code>this</code> in global scope. Hosts may provide any ECMAScript Object value.
</td>
</tr>
<tr>
<td>
[[DeclarativeRecord]]
</td>
<td>
Declarative <emu-xref href="#sec-environment-records" id="_ref_1935"><a href="#sec-environment-records">Environment Record</a></emu-xref>
</td>
<td>
Contains bindings for all declarations in global code for the associated <emu-xref href="#realm" id="_ref_1936"><a href="#realm">realm</a></emu-xref> code except for <emu-nt id="_ref_9056"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>, <emu-nt id="_ref_9057"><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a></emu-nt>, <emu-nt id="_ref_9058"><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt>, <emu-nt id="_ref_9059"><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt>, and <emu-nt id="_ref_9060"><a href="#prod-VariableDeclaration">VariableDeclaration</a></emu-nt> <var>bindings</var>.
</td>
</tr>
<tr>
<td>
[[VarNames]]
</td>
<td>
<emu-xref href="#sec-list-and-record-specification-type" id="_ref_1937"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of String
</td>
<td>
The string names bound by <emu-nt id="_ref_9061"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>, <emu-nt id="_ref_9062"><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a></emu-nt>, <emu-nt id="_ref_9063"><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt>, <emu-nt id="_ref_9064"><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt>, and <emu-nt id="_ref_9065"><a href="#prod-VariableDeclaration">VariableDeclaration</a></emu-nt> declarations in global code for the associated <emu-xref href="#realm" id="_ref_1938"><a href="#realm">realm</a></emu-xref>.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<emu-table id="table-19" caption="Additional Methods of Global Environment Records"><figure><figcaption>Table 18: Additional Methods of Global Environment Records</figcaption>
<table>
<tbody>
<tr>
<th>
Method
</th>
<th>
Purpose
</th>
</tr>
<tr>
<td>
GetThisBinding()
</td>
<td>
Return the value of this <emu-xref href="#sec-environment-records" id="_ref_1939"><a href="#sec-environment-records">Environment Record</a></emu-xref>'s <code>this</code> binding.
</td>
</tr>
<tr>
<td>
HasVarDeclaration (N)
</td>
<td>
Determines if the argument identifier has a binding in this <emu-xref href="#sec-environment-records" id="_ref_1940"><a href="#sec-environment-records">Environment Record</a></emu-xref> that was created using a <emu-nt id="_ref_9066"><a href="#prod-VariableDeclaration">VariableDeclaration</a></emu-nt>, <emu-nt id="_ref_9067"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>, <emu-nt id="_ref_9068"><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a></emu-nt>, <emu-nt id="_ref_9069"><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt>, or <emu-nt id="_ref_9070"><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt>.
</td>
</tr>
<tr>
<td>
HasLexicalDeclaration (N)
</td>
<td>
Determines if the argument identifier has a binding in this <emu-xref href="#sec-environment-records" id="_ref_1941"><a href="#sec-environment-records">Environment Record</a></emu-xref> that was created using a lexical declaration such as a <emu-nt id="_ref_9071"><a href="#prod-LexicalDeclaration">LexicalDeclaration</a></emu-nt> or a <emu-nt id="_ref_9072"><a href="#prod-ClassDeclaration">ClassDeclaration</a></emu-nt>.
</td>
</tr>
<tr>
<td>
HasRestrictedGlobalProperty (N)
</td>
<td>
Determines if the argument is the name of a <emu-xref href="#sec-global-object" id="_ref_1942"><a href="#sec-global-object">global object</a></emu-xref> property that may not be shadowed by a global lexical binding.
</td>
</tr>
<tr>
<td>
CanDeclareGlobalVar (N)
</td>
<td>
Determines if a corresponding CreateGlobalVarBinding call would succeed if called for the same argument <var>N</var>.
</td>
</tr>
<tr>
<td>
CanDeclareGlobalFunction (N)
</td>
<td>
Determines if a corresponding CreateGlobalFunctionBinding call would succeed if called for the same argument <var>N</var>.
</td>
</tr>
<tr>
<td>
CreateGlobalVarBinding(N, D)
</td>
<td>
Used to create and initialize to <emu-val>undefined</emu-val> a global <code>var</code> binding in the [[ObjectRecord]] component of a global <emu-xref href="#sec-environment-records" id="_ref_1943"><a href="#sec-environment-records">Environment Record</a></emu-xref>. The binding will be a mutable binding. The corresponding <emu-xref href="#sec-global-object" id="_ref_1944"><a href="#sec-global-object">global object</a></emu-xref> property will have attribute values appropriate for a <code>var</code>. The String value <var>N</var> is the bound name. If <var>D</var> is <emu-val>true</emu-val>
the binding may be deleted. Logically equivalent to
CreateMutableBinding followed by a SetMutableBinding but it allows var
declarations to receive special treatment.
</td>
</tr>
<tr>
<td>
CreateGlobalFunctionBinding(N, V, D)
</td>
<td>
Create and initialize a global <code>function</code> binding in the [[ObjectRecord]] component of a global <emu-xref href="#sec-environment-records" id="_ref_1945"><a href="#sec-environment-records">Environment Record</a></emu-xref>. The binding will be a mutable binding. The corresponding <emu-xref href="#sec-global-object" id="_ref_1946"><a href="#sec-global-object">global object</a></emu-xref> property will have attribute values appropriate for a <code>function</code>. The String value <var>N</var> is the bound name. <var>V</var> is the initialization value. If the Boolean argument <var>D</var> is <emu-val>true</emu-val>
the binding may be deleted. Logically equivalent to
CreateMutableBinding followed by a SetMutableBinding but it allows
function declarations to receive special treatment.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<p>The behaviour of the concrete specification methods for global Environment Records is defined by the following algorithms.</p>
<emu-clause id="sec-global-environment-records-hasbinding-n">
<h1><span class="secnum">8.1.1.4.1</span>HasBinding ( <var>N</var> )</h1>
<p>The concrete <emu-xref href="#sec-environment-records" id="_ref_1947"><a href="#sec-environment-records">Environment Record</a></emu-xref>
method HasBinding for global Environment Records simply determines if
the argument identifier is one of the identifiers bound by the record:</p>
<emu-alg><ol><li>Let <var>envRec</var> be the global <emu-xref href="#sec-environment-records" id="_ref_1948"><a href="#sec-environment-records">Environment Record</a></emu-xref> for which the method was invoked.</li><li>Let <var>DclRec</var> be <var>envRec</var>.[[DeclarativeRecord]].</li><li>If <var>DclRec</var>.HasBinding(<var>N</var>) is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Let <var>ObjRec</var> be <var>envRec</var>.[[ObjectRecord]].</li><li>Return ? <var>ObjRec</var>.HasBinding(<var>N</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-global-environment-records-createmutablebinding-n-d">
<h1><span class="secnum">8.1.1.4.2</span>CreateMutableBinding ( <var>N</var>, <var>D</var> )</h1>
<p>The concrete <emu-xref href="#sec-environment-records" id="_ref_1949"><a href="#sec-environment-records">Environment Record</a></emu-xref> method CreateMutableBinding for global Environment Records creates a new mutable binding for the name <var>N</var> that is uninitialized. The binding is created in the associated DeclarativeRecord. A binding for <var>N</var> must not already exist in the DeclarativeRecord. If Boolean argument <var>D</var> has the value <emu-val>true</emu-val> the new binding is marked as being subject to deletion.</p>
<emu-alg><ol><li>Let <var>envRec</var> be the global <emu-xref href="#sec-environment-records" id="_ref_1950"><a href="#sec-environment-records">Environment Record</a></emu-xref> for which the method was invoked.</li><li>Let <var>DclRec</var> be <var>envRec</var>.[[DeclarativeRecord]].</li><li>If <var>DclRec</var>.HasBinding(<var>N</var>) is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return <var>DclRec</var>.CreateMutableBinding(<var>N</var>, <var>D</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-global-environment-records-createimmutablebinding-n-s">
<h1><span class="secnum">8.1.1.4.3</span>CreateImmutableBinding ( <var>N</var>, <var>S</var> )</h1>
<p>The concrete <emu-xref href="#sec-environment-records" id="_ref_1951"><a href="#sec-environment-records">Environment Record</a></emu-xref> method CreateImmutableBinding for global Environment Records creates a new immutable binding for the name <var>N</var> that is uninitialized. A binding must not already exist in this <emu-xref href="#sec-environment-records" id="_ref_1952"><a href="#sec-environment-records">Environment Record</a></emu-xref> for <var>N</var>. If the Boolean argument <var>S</var> has the value <emu-val>true</emu-val> the new binding is marked as a strict binding.</p>
<emu-alg><ol><li>Let <var>envRec</var> be the global <emu-xref href="#sec-environment-records" id="_ref_1953"><a href="#sec-environment-records">Environment Record</a></emu-xref> for which the method was invoked.</li><li>Let <var>DclRec</var> be <var>envRec</var>.[[DeclarativeRecord]].</li><li>If <var>DclRec</var>.HasBinding(<var>N</var>) is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return <var>DclRec</var>.CreateImmutableBinding(<var>N</var>, <var>S</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-global-environment-records-initializebinding-n-v">
<h1><span class="secnum">8.1.1.4.4</span>InitializeBinding ( <var>N</var>, <var>V</var> )</h1>
<p>The concrete <emu-xref href="#sec-environment-records" id="_ref_1954"><a href="#sec-environment-records">Environment Record</a></emu-xref>
method InitializeBinding for global Environment Records is used to set
the bound value of the current binding of the identifier whose name is
the value of the argument <var>N</var> to the value of argument <var>V</var>. An uninitialized binding for <var>N</var> must already exist.</p>
<emu-alg><ol><li>Let <var>envRec</var> be the global <emu-xref href="#sec-environment-records" id="_ref_1955"><a href="#sec-environment-records">Environment Record</a></emu-xref> for which the method was invoked.</li><li>Let <var>DclRec</var> be <var>envRec</var>.[[DeclarativeRecord]].</li><li>If <var>DclRec</var>.HasBinding(<var>N</var>) is <emu-val>true</emu-val>, then<ol><li>Return <var>DclRec</var>.InitializeBinding(<var>N</var>, <var>V</var>).</li></ol></li><li><emu-xref href="#assert" id="_ref_1956"><a href="#assert">Assert</a></emu-xref>: If the binding exists, it must be in the object <emu-xref href="#sec-environment-records" id="_ref_1957"><a href="#sec-environment-records">Environment Record</a></emu-xref>.</li><li>Let <var>ObjRec</var> be <var>envRec</var>.[[ObjectRecord]].</li><li>Return ? <var>ObjRec</var>.InitializeBinding(<var>N</var>, <var>V</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-global-environment-records-setmutablebinding-n-v-s">
<h1><span class="secnum">8.1.1.4.5</span>SetMutableBinding ( <var>N</var>, <var>V</var>, <var>S</var> )</h1>
<p>The concrete <emu-xref href="#sec-environment-records" id="_ref_1958"><a href="#sec-environment-records">Environment Record</a></emu-xref>
method SetMutableBinding for global Environment Records attempts to
change the bound value of the current binding of the identifier whose
name is the value of the argument <var>N</var> to the value of argument <var>V</var>. If the binding is an immutable binding, a <emu-val>TypeError</emu-val> is thrown if <var>S</var> is <emu-val>true</emu-val>. A property named <var>N</var>
normally already exists but if it does not or is not currently
writable, error handling is determined by the value of the Boolean
argument <var>S</var>.</p>
<emu-alg><ol><li>Let <var>envRec</var> be the global <emu-xref href="#sec-environment-records" id="_ref_1959"><a href="#sec-environment-records">Environment Record</a></emu-xref> for which the method was invoked.</li><li>Let <var>DclRec</var> be <var>envRec</var>.[[DeclarativeRecord]].</li><li>If <var>DclRec</var>.HasBinding(<var>N</var>) is <emu-val>true</emu-val>, then<ol><li>Return <var>DclRec</var>.SetMutableBinding(<var>N</var>, <var>V</var>, <var>S</var>).</li></ol></li><li>Let <var>ObjRec</var> be <var>envRec</var>.[[ObjectRecord]].</li><li>Return ? <var>ObjRec</var>.SetMutableBinding(<var>N</var>, <var>V</var>, <var>S</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-global-environment-records-getbindingvalue-n-s">
<h1><span class="secnum">8.1.1.4.6</span>GetBindingValue ( <var>N</var>, <var>S</var> )</h1>
<p>The concrete <emu-xref href="#sec-environment-records" id="_ref_1960"><a href="#sec-environment-records">Environment Record</a></emu-xref>
method GetBindingValue for global Environment Records returns the value
of its bound identifier whose name is the value of the argument <var>N</var>. If the binding is an uninitialized binding throw a <emu-val>ReferenceError</emu-val> exception. A property named <var>N</var>
normally already exists but if it does not or is not currently
writable, error handling is determined by the value of the Boolean
argument <var>S</var>.</p>
<emu-alg><ol><li>Let <var>envRec</var> be the global <emu-xref href="#sec-environment-records" id="_ref_1961"><a href="#sec-environment-records">Environment Record</a></emu-xref> for which the method was invoked.</li><li>Let <var>DclRec</var> be <var>envRec</var>.[[DeclarativeRecord]].</li><li>If <var>DclRec</var>.HasBinding(<var>N</var>) is <emu-val>true</emu-val>, then<ol><li>Return <var>DclRec</var>.GetBindingValue(<var>N</var>, <var>S</var>).</li></ol></li><li>Let <var>ObjRec</var> be <var>envRec</var>.[[ObjectRecord]].</li><li>Return ? <var>ObjRec</var>.GetBindingValue(<var>N</var>, <var>S</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-global-environment-records-deletebinding-n">
<h1><span class="secnum">8.1.1.4.7</span>DeleteBinding ( <var>N</var> )</h1>
<p>The concrete <emu-xref href="#sec-environment-records" id="_ref_1962"><a href="#sec-environment-records">Environment Record</a></emu-xref>
method DeleteBinding for global Environment Records can only delete
bindings that have been explicitly designated as being subject to
deletion.</p>
<emu-alg><ol><li>Let <var>envRec</var> be the global <emu-xref href="#sec-environment-records" id="_ref_1963"><a href="#sec-environment-records">Environment Record</a></emu-xref> for which the method was invoked.</li><li>Let <var>DclRec</var> be <var>envRec</var>.[[DeclarativeRecord]].</li><li>If <var>DclRec</var>.HasBinding(<var>N</var>) is <emu-val>true</emu-val>, then<ol><li>Return <var>DclRec</var>.DeleteBinding(<var>N</var>).</li></ol></li><li>Let <var>ObjRec</var> be <var>envRec</var>.[[ObjectRecord]].</li><li>Let <var>globalObject</var> be the binding object for <var>ObjRec</var>.</li><li>Let <var>existingProp</var> be ?&nbsp;<emu-xref aoid="HasOwnProperty" id="_ref_1964"><a href="#sec-hasownproperty">HasOwnProperty</a></emu-xref>(<var>globalObject</var>, <var>N</var>).</li><li>If <var>existingProp</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>status</var> be ? <var>ObjRec</var>.DeleteBinding(<var>N</var>).</li><li>If <var>status</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>varNames</var> be <var>envRec</var>.[[VarNames]].</li><li>If <var>N</var> is an element of <var>varNames</var>, remove that element from the <var>varNames</var>.</li></ol></li><li>Return <var>status</var>.</li></ol></li><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-global-environment-records-hasthisbinding">
<h1><span class="secnum">8.1.1.4.8</span>HasThisBinding ( )</h1>
<emu-alg><ol><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-global-environment-records-hassuperbinding">
<h1><span class="secnum">8.1.1.4.9</span>HasSuperBinding ( )</h1>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-global-environment-records-withbaseobject">
<h1><span class="secnum">8.1.1.4.10</span>WithBaseObject ( )</h1>
<p>Global Environment Records always return <emu-val>undefined</emu-val> as their WithBaseObject.</p>
<emu-alg><ol><li>Return <emu-val>undefined</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-global-environment-records-getthisbinding">
<h1><span class="secnum">8.1.1.4.11</span>GetThisBinding ( )</h1>
<emu-alg><ol><li>Let <var>envRec</var> be the global <emu-xref href="#sec-environment-records" id="_ref_1965"><a href="#sec-environment-records">Environment Record</a></emu-xref> for which the method was invoked.</li><li>Return <var>envRec</var>.[[GlobalThisValue]].
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-hasvardeclaration">
<h1><span class="secnum">8.1.1.4.12</span>HasVarDeclaration ( <var>N</var> )</h1>
<p>The concrete <emu-xref href="#sec-environment-records" id="_ref_1966"><a href="#sec-environment-records">Environment Record</a></emu-xref>
method HasVarDeclaration for global Environment Records determines if
the argument identifier has a binding in this record that was created
using a <emu-nt id="_ref_9073"><a href="#prod-VariableStatement">VariableStatement</a></emu-nt> or a <emu-nt id="_ref_9074"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>:</p>
<emu-alg><ol><li>Let <var>envRec</var> be the global <emu-xref href="#sec-environment-records" id="_ref_1967"><a href="#sec-environment-records">Environment Record</a></emu-xref> for which the method was invoked.</li><li>Let <var>varDeclaredNames</var> be <var>envRec</var>.[[VarNames]].</li><li>If <var>varDeclaredNames</var> contains <var>N</var>, return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-haslexicaldeclaration">
<h1><span class="secnum">8.1.1.4.13</span>HasLexicalDeclaration ( <var>N</var> )</h1>
<p>The concrete <emu-xref href="#sec-environment-records" id="_ref_1968"><a href="#sec-environment-records">Environment Record</a></emu-xref>
method HasLexicalDeclaration for global Environment Records determines
if the argument identifier has a binding in this record that was created
using a lexical declaration such as a <emu-nt id="_ref_9075"><a href="#prod-LexicalDeclaration">LexicalDeclaration</a></emu-nt> or a <emu-nt id="_ref_9076"><a href="#prod-ClassDeclaration">ClassDeclaration</a></emu-nt>:</p>
<emu-alg><ol><li>Let <var>envRec</var> be the global <emu-xref href="#sec-environment-records" id="_ref_1969"><a href="#sec-environment-records">Environment Record</a></emu-xref> for which the method was invoked.</li><li>Let <var>DclRec</var> be <var>envRec</var>.[[DeclarativeRecord]].</li><li>Return <var>DclRec</var>.HasBinding(<var>N</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-hasrestrictedglobalproperty">
<h1><span class="secnum">8.1.1.4.14</span>HasRestrictedGlobalProperty ( <var>N</var> )</h1>
<p>The concrete <emu-xref href="#sec-environment-records" id="_ref_1970"><a href="#sec-environment-records">Environment Record</a></emu-xref>
method HasRestrictedGlobalProperty for global Environment Records
determines if the argument identifier is the name of a property of the <emu-xref href="#sec-global-object" id="_ref_1971"><a href="#sec-global-object">global object</a></emu-xref> that must not be shadowed by a global lexical binding:</p>
<emu-alg><ol><li>Let <var>envRec</var> be the global <emu-xref href="#sec-environment-records" id="_ref_1972"><a href="#sec-environment-records">Environment Record</a></emu-xref> for which the method was invoked.</li><li>Let <var>ObjRec</var> be <var>envRec</var>.[[ObjectRecord]].</li><li>Let <var>globalObject</var> be the binding object for <var>ObjRec</var>.</li><li>Let <var>existingProp</var> be ? <var>globalObject</var>.[[GetOwnProperty]](<var>N</var>).</li><li>If <var>existingProp</var> is <emu-val>undefined</emu-val>, return <emu-val>false</emu-val>.</li><li>If <var>existingProp</var>.[[Configurable]] 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</span><div class="note-contents">
<p>Properties may exist upon a <emu-xref href="#sec-global-object" id="_ref_1973"><a href="#sec-global-object">global object</a></emu-xref>
that were directly created rather than being declared using a var or
function declaration. A global lexical binding may not be created that
has the same name as a non-configurable property of the <emu-xref href="#sec-global-object" id="_ref_1974"><a href="#sec-global-object">global object</a></emu-xref>. The global property <code>undefined</code> is an example of such a property.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-candeclareglobalvar">
<h1><span class="secnum">8.1.1.4.15</span>CanDeclareGlobalVar ( <var>N</var> )</h1>
<p>The concrete <emu-xref href="#sec-environment-records" id="_ref_1975"><a href="#sec-environment-records">Environment Record</a></emu-xref>
method CanDeclareGlobalVar for global Environment Records determines if
a corresponding CreateGlobalVarBinding call would succeed if called for
the same argument <var>N</var>. Redundant var declarations and var declarations for pre-existing <emu-xref href="#sec-global-object" id="_ref_1976"><a href="#sec-global-object">global object</a></emu-xref> properties are allowed.</p>
<emu-alg><ol><li>Let <var>envRec</var> be the global <emu-xref href="#sec-environment-records" id="_ref_1977"><a href="#sec-environment-records">Environment Record</a></emu-xref> for which the method was invoked.</li><li>Let <var>ObjRec</var> be <var>envRec</var>.[[ObjectRecord]].</li><li>Let <var>globalObject</var> be the binding object for <var>ObjRec</var>.</li><li>Let <var>hasProperty</var> be ?&nbsp;<emu-xref aoid="HasOwnProperty" id="_ref_1978"><a href="#sec-hasownproperty">HasOwnProperty</a></emu-xref>(<var>globalObject</var>, <var>N</var>).</li><li>If <var>hasProperty</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return ?&nbsp;<emu-xref aoid="IsExtensible" id="_ref_1979"><a href="#sec-isextensible-o">IsExtensible</a></emu-xref>(<var>globalObject</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-candeclareglobalfunction">
<h1><span class="secnum">8.1.1.4.16</span>CanDeclareGlobalFunction ( <var>N</var> )</h1>
<p>The concrete <emu-xref href="#sec-environment-records" id="_ref_1980"><a href="#sec-environment-records">Environment Record</a></emu-xref>
method CanDeclareGlobalFunction for global Environment Records
determines if a corresponding CreateGlobalFunctionBinding call would
succeed if called for the same argument <var>N</var>.</p>
<emu-alg><ol><li>Let <var>envRec</var> be the global <emu-xref href="#sec-environment-records" id="_ref_1981"><a href="#sec-environment-records">Environment Record</a></emu-xref> for which the method was invoked.</li><li>Let <var>ObjRec</var> be <var>envRec</var>.[[ObjectRecord]].</li><li>Let <var>globalObject</var> be the binding object for <var>ObjRec</var>.</li><li>Let <var>existingProp</var> be ? <var>globalObject</var>.[[GetOwnProperty]](<var>N</var>).</li><li>If <var>existingProp</var> is <emu-val>undefined</emu-val>, return ?&nbsp;<emu-xref aoid="IsExtensible" id="_ref_1982"><a href="#sec-isextensible-o">IsExtensible</a></emu-xref>(<var>globalObject</var>).</li><li>If <var>existingProp</var>.[[Configurable]] is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>If <emu-xref aoid="IsDataDescriptor" id="_ref_1983"><a href="#sec-isdatadescriptor">IsDataDescriptor</a></emu-xref>(<var>existingProp</var>) is <emu-val>true</emu-val> and <var>existingProp</var> has attribute values { [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>true</emu-val> }, return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-createglobalvarbinding">
<h1><span class="secnum">8.1.1.4.17</span>CreateGlobalVarBinding ( <var>N</var>, <var>D</var> )</h1>
<p>The concrete <emu-xref href="#sec-environment-records" id="_ref_1984"><a href="#sec-environment-records">Environment Record</a></emu-xref>
method CreateGlobalVarBinding for global Environment Records creates
and initializes a mutable binding in the associated object <emu-xref href="#sec-environment-records" id="_ref_1985"><a href="#sec-environment-records">Environment Record</a></emu-xref> and records the bound name in the associated [[VarNames]] <emu-xref href="#sec-list-and-record-specification-type" id="_ref_1986"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>. If a binding already exists, it is reused and assumed to be initialized.</p>
<emu-alg><ol><li>Let <var>envRec</var> be the global <emu-xref href="#sec-environment-records" id="_ref_1987"><a href="#sec-environment-records">Environment Record</a></emu-xref> for which the method was invoked.</li><li>Let <var>ObjRec</var> be <var>envRec</var>.[[ObjectRecord]].</li><li>Let <var>globalObject</var> be the binding object for <var>ObjRec</var>.</li><li>Let <var>hasProperty</var> be ?&nbsp;<emu-xref aoid="HasOwnProperty" id="_ref_1988"><a href="#sec-hasownproperty">HasOwnProperty</a></emu-xref>(<var>globalObject</var>, <var>N</var>).</li><li>Let <var>extensible</var> be ?&nbsp;<emu-xref aoid="IsExtensible" id="_ref_1989"><a href="#sec-isextensible-o">IsExtensible</a></emu-xref>(<var>globalObject</var>).</li><li>If <var>hasProperty</var> is <emu-val>false</emu-val> and <var>extensible</var> is <emu-val>true</emu-val>, then<ol><li>Perform ? <var>ObjRec</var>.CreateMutableBinding(<var>N</var>, <var>D</var>).</li><li>Perform ? <var>ObjRec</var>.InitializeBinding(<var>N</var>, <emu-val>undefined</emu-val>).</li></ol></li><li>Let <var>varDeclaredNames</var> be <var>envRec</var>.[[VarNames]].</li><li>If <var>varDeclaredNames</var> does not contain <var>N</var>, then<ol><li>Append <var>N</var> to <var>varDeclaredNames</var>.</li></ol></li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_1990"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-createglobalfunctionbinding">
<h1><span class="secnum">8.1.1.4.18</span>CreateGlobalFunctionBinding ( <var>N</var>, <var>V</var>, <var>D</var> )</h1>
<p>The concrete <emu-xref href="#sec-environment-records" id="_ref_1991"><a href="#sec-environment-records">Environment Record</a></emu-xref>
method CreateGlobalFunctionBinding for global Environment Records
creates and initializes a mutable binding in the associated object <emu-xref href="#sec-environment-records" id="_ref_1992"><a href="#sec-environment-records">Environment Record</a></emu-xref> and records the bound name in the associated [[VarNames]] <emu-xref href="#sec-list-and-record-specification-type" id="_ref_1993"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>. If a binding already exists, it is replaced.</p>
<emu-alg><ol><li>Let <var>envRec</var> be the global <emu-xref href="#sec-environment-records" id="_ref_1994"><a href="#sec-environment-records">Environment Record</a></emu-xref> for which the method was invoked.</li><li>Let <var>ObjRec</var> be <var>envRec</var>.[[ObjectRecord]].</li><li>Let <var>globalObject</var> be the binding object for <var>ObjRec</var>.</li><li>Let <var>existingProp</var> be ? <var>globalObject</var>.[[GetOwnProperty]](<var>N</var>).</li><li>If <var>existingProp</var> is <emu-val>undefined</emu-val> or <var>existingProp</var>.[[Configurable]] is <emu-val>true</emu-val>, then<ol><li>Let <var>desc</var> be the PropertyDescriptor { [[Value]]: <var>V</var>, [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>true</emu-val>, [[Configurable]]: <var>D</var> }.</li></ol></li><li>Else,<ol><li>Let <var>desc</var> be the PropertyDescriptor { [[Value]]: <var>V</var> }.</li></ol></li><li>Perform ?&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_1995"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>globalObject</var>, <var>N</var>, <var>desc</var>).</li><li><emu-xref href="#sec-list-and-record-specification-type" id="_ref_1996"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> that the binding for <var>N</var> in <var>ObjRec</var> has been initialized.</li><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_1997"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>globalObject</var>, <var>N</var>, <var>V</var>, <emu-val>false</emu-val>).</li><li>Let <var>varDeclaredNames</var> be <var>envRec</var>.[[VarNames]].</li><li>If <var>varDeclaredNames</var> does not contain <var>N</var>, then<ol><li>Append <var>N</var> to <var>varDeclaredNames</var>.</li></ol></li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_1998"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Global function declarations are always represented as own properties of the <emu-xref href="#sec-global-object" id="_ref_1999"><a href="#sec-global-object">global object</a></emu-xref>.
If possible, an existing own property is reconfigured to have a
standard set of attribute values. Steps 8-9 are equivalent to what
calling the InitializeBinding concrete method would do and if <var>globalObject</var> is a Proxy will produce the same sequence of Proxy trap calls.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-module-environment-records">
<h1><span class="secnum">8.1.1.5</span>Module Environment Records</h1>
<p>A module <emu-xref href="#sec-environment-records" id="_ref_2000"><a href="#sec-environment-records">Environment Record</a></emu-xref> is a declarative <emu-xref href="#sec-environment-records" id="_ref_2001"><a href="#sec-environment-records">Environment Record</a></emu-xref> that is used to represent the outer scope of an ECMAScript <emu-nt id="_ref_9077"><a href="#prod-Module">Module</a></emu-nt>.
In additional to normal mutable and immutable bindings, module
Environment Records also provide immutable import bindings which are
bindings that provide indirect access to a target binding that exists in
another <emu-xref href="#sec-environment-records" id="_ref_2002"><a href="#sec-environment-records">Environment Record</a></emu-xref>.</p>
<p>Module Environment Records support all of the declarative <emu-xref href="#sec-environment-records" id="_ref_2003"><a href="#sec-environment-records">Environment Record</a></emu-xref> methods listed in <emu-xref href="#table-15" id="_ref_166"><a href="#table-15">Table 14</a></emu-xref>
and share the same specifications for all of those methods except for
GetBindingValue, DeleteBinding, HasThisBinding and GetThisBinding. In
addition, module Environment Records support the methods listed in <emu-xref href="#table-20" id="_ref_167"><a href="#table-20">Table 19</a></emu-xref>:</p>
<emu-table id="table-20" caption="Additional Methods of Module Environment Records"><figure><figcaption>Table 19: Additional Methods of Module Environment Records</figcaption>
<table>
<tbody>
<tr>
<th>
Method
</th>
<th>
Purpose
</th>
</tr>
<tr>
<td>
CreateImportBinding(N, M, N2)
</td>
<td>
Create an immutable indirect binding in a module <emu-xref href="#sec-environment-records" id="_ref_2004"><a href="#sec-environment-records">Environment Record</a></emu-xref>. The String value <var>N</var> is the text of the bound name. <var>M</var> is a <emu-xref href="#sec-abstract-module-records" id="_ref_2005"><a href="#sec-abstract-module-records">Module Record</a></emu-xref>, and <var>N2</var> is a binding that exists in M's module <emu-xref href="#sec-environment-records" id="_ref_2006"><a href="#sec-environment-records">Environment Record</a></emu-xref>.
</td>
</tr>
<tr>
<td>
GetThisBinding()
</td>
<td>
Return the value of this <emu-xref href="#sec-environment-records" id="_ref_2007"><a href="#sec-environment-records">Environment Record</a></emu-xref>'s <code>this</code> binding.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<p>The behaviour of the additional concrete specification
methods for module Environment Records are defined by the following
algorithms:</p>
<emu-clause id="sec-module-environment-records-getbindingvalue-n-s">
<h1><span class="secnum">8.1.1.5.1</span>GetBindingValue ( <var>N</var>, <var>S</var> )</h1>
<p>The concrete <emu-xref href="#sec-environment-records" id="_ref_2008"><a href="#sec-environment-records">Environment Record</a></emu-xref>
method GetBindingValue for module Environment Records returns the value
of its bound identifier whose name is the value of the argument <var>N</var>.
However, if the binding is an indirect binding the value of the target
binding is returned. If the binding exists but is uninitialized a <emu-val>ReferenceError</emu-val> is thrown.</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2009"><a href="#assert">Assert</a></emu-xref>: <var>S</var> is <emu-val>true</emu-val>.</li><li>Let <var>envRec</var> be the module <emu-xref href="#sec-environment-records" id="_ref_2010"><a href="#sec-environment-records">Environment Record</a></emu-xref> for which the method was invoked.</li><li><emu-xref href="#assert" id="_ref_2011"><a href="#assert">Assert</a></emu-xref>: <var>envRec</var> has a binding for <var>N</var>.</li><li>If the binding for <var>N</var> is an indirect binding, then<ol><li>Let <var>M</var> and <var>N2</var> be the indirection values provided when this binding for <var>N</var> was created.</li><li>Let <var>targetEnv</var> be <var>M</var>.[[Environment]].</li><li>If <var>targetEnv</var> is <emu-val>undefined</emu-val>, throw a <emu-val>ReferenceError</emu-val> exception.</li><li>Let <var>targetER</var> be <var>targetEnv</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_2012"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref>.</li><li>Return ? <var>targetER</var>.GetBindingValue(<var>N2</var>, <emu-val>true</emu-val>).</li></ol></li><li>If the binding for <var>N</var> in <var>envRec</var> is an uninitialized binding, throw a <emu-val>ReferenceError</emu-val> exception.</li><li>Return the value currently bound to <var>N</var> in <var>envRec</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p><var>S</var> will always be <emu-val>true</emu-val> because a <emu-nt id="_ref_9078"><a href="#prod-Module">Module</a></emu-nt> is always <emu-xref href="#sec-strict-mode-code" id="_ref_2013"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-module-environment-records-deletebinding-n">
<h1><span class="secnum">8.1.1.5.2</span>DeleteBinding ( <var>N</var> )</h1>
<p>The concrete <emu-xref href="#sec-environment-records" id="_ref_2014"><a href="#sec-environment-records">Environment Record</a></emu-xref> method DeleteBinding for module Environment Records refuses to delete bindings.</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2015"><a href="#assert">Assert</a></emu-xref>: This method is never invoked. See <emu-xref href="#sec-delete-operator-static-semantics-early-errors" id="_ref_168"><a href="#sec-delete-operator-static-semantics-early-errors">12.5.3.1</a></emu-xref>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Module Environment Records are only used within strict code and an <emu-xref href="#early-error" id="_ref_2016"><a href="#early-error">early error</a></emu-xref> rule prevents the delete operator, in strict code, from being applied to a <emu-xref href="#sec-reference-specification-type" id="_ref_2017"><a href="#sec-reference-specification-type">Reference</a></emu-xref> that would resolve to a module <emu-xref href="#sec-environment-records" id="_ref_2018"><a href="#sec-environment-records">Environment Record</a></emu-xref> binding. See <emu-xref href="#sec-delete-operator-static-semantics-early-errors" id="_ref_169"><a href="#sec-delete-operator-static-semantics-early-errors">12.5.3.1</a></emu-xref>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-module-environment-records-hasthisbinding">
<h1><span class="secnum">8.1.1.5.3</span>HasThisBinding ( )</h1>
<p>Module Environment Records provide a <code>this</code> binding.</p>
<emu-alg><ol><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-module-environment-records-getthisbinding">
<h1><span class="secnum">8.1.1.5.4</span>GetThisBinding ( )</h1>
<emu-alg><ol><li>Return <emu-val>undefined</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-createimportbinding">
<h1><span class="secnum">8.1.1.5.5</span>CreateImportBinding ( <var>N</var>, <var>M</var>, <var>N2</var> )</h1>
<p>The concrete <emu-xref href="#sec-environment-records" id="_ref_2019"><a href="#sec-environment-records">Environment Record</a></emu-xref> method CreateImportBinding for module Environment Records creates a new initialized immutable indirect binding for the name <var>N</var>. A binding must not already exist in this <emu-xref href="#sec-environment-records" id="_ref_2020"><a href="#sec-environment-records">Environment Record</a></emu-xref> for <var>N</var>. <var>M</var> is a <emu-xref href="#sec-abstract-module-records" id="_ref_2021"><a href="#sec-abstract-module-records">Module Record</a></emu-xref>, and <var>N2</var> is the name of a binding that exists in M's module <emu-xref href="#sec-environment-records" id="_ref_2022"><a href="#sec-environment-records">Environment Record</a></emu-xref>. Accesses to the value of the new binding will indirectly access the bound value of the target binding.</p>
<emu-alg><ol><li>Let <var>envRec</var> be the module <emu-xref href="#sec-environment-records" id="_ref_2023"><a href="#sec-environment-records">Environment Record</a></emu-xref> for which the method was invoked.</li><li><emu-xref href="#assert" id="_ref_2024"><a href="#assert">Assert</a></emu-xref>: <var>envRec</var> does not already have a binding for <var>N</var>.</li><li><emu-xref href="#assert" id="_ref_2025"><a href="#assert">Assert</a></emu-xref>: <var>M</var> is a <emu-xref href="#sec-abstract-module-records" id="_ref_2026"><a href="#sec-abstract-module-records">Module Record</a></emu-xref>.</li><li><emu-xref href="#assert" id="_ref_2027"><a href="#assert">Assert</a></emu-xref>: When <var>M</var>.[[Environment]] is instantiated it will have a direct binding for <var>N2</var>.</li><li>Create an immutable indirect binding in <var>envRec</var> for <var>N</var> that references <var>M</var> and <var>N2</var> as its target binding and record that the binding is initialized.</li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_2028"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-lexical-environment-operations">
<h1><span class="secnum">8.1.2</span>Lexical Environment Operations</h1>
<p>The following <emu-xref href="#sec-algorithm-conventions-abstract-operations" id="_ref_2029"><a href="#sec-algorithm-conventions-abstract-operations">abstract operations</a></emu-xref> are used in this specification to operate upon lexical environments:</p>
<emu-clause id="sec-getidentifierreference" aoid="GetIdentifierReference">
<h1><span class="secnum">8.1.2.1</span>GetIdentifierReference ( <var>lex</var>, <var>name</var>, <var>strict</var> )</h1>
<p>The abstract operation GetIdentifierReference is called with a <emu-xref href="#sec-lexical-environments" id="_ref_2030"><a href="#sec-lexical-environments">Lexical Environment</a></emu-xref> <var>lex</var>, a String <var>name</var>, and a Boolean flag <var>strict</var>. The value of <var>lex</var> may be <emu-val>null</emu-val>. When called, the following steps are performed:</p>
<emu-alg><ol><li>If <var>lex</var> is the value <emu-val>null</emu-val>, then<ol><li>Return a value of type <emu-xref href="#sec-reference-specification-type" id="_ref_2031"><a href="#sec-reference-specification-type">Reference</a></emu-xref> whose base value component is <emu-val>undefined</emu-val>, whose referenced name component is <var>name</var>, and whose strict reference flag is <var>strict</var>.</li></ol></li><li>Let <var>envRec</var> be <var>lex</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_2032"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref>.</li><li>Let <var>exists</var> be ? <var>envRec</var>.HasBinding(<var>name</var>).</li><li>If <var>exists</var> is <emu-val>true</emu-val>, then<ol><li>Return a value of type <emu-xref href="#sec-reference-specification-type" id="_ref_2033"><a href="#sec-reference-specification-type">Reference</a></emu-xref> whose base value component is <var>envRec</var>, whose referenced name component is <var>name</var>, and whose strict reference flag is <var>strict</var>.</li></ol></li><li>Else,<ol><li>Let <var>outer</var> be the value of <var>lex</var>'s outer environment reference.</li><li>Return ?&nbsp;<emu-xref aoid="GetIdentifierReference" id="_ref_2034"><a href="#sec-getidentifierreference">GetIdentifierReference</a></emu-xref>(<var>outer</var>, <var>name</var>, <var>strict</var>).
</li></ol></li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-newdeclarativeenvironment" aoid="NewDeclarativeEnvironment">
<h1><span class="secnum">8.1.2.2</span>NewDeclarativeEnvironment ( <var>E</var> )</h1>
<p>When the abstract operation NewDeclarativeEnvironment is called with a <emu-xref href="#sec-lexical-environments" id="_ref_2035"><a href="#sec-lexical-environments">Lexical Environment</a></emu-xref> as argument <var>E</var> the following steps are performed:</p>
<emu-alg><ol><li>Let <var>env</var> be a new <emu-xref href="#sec-lexical-environments" id="_ref_2036"><a href="#sec-lexical-environments">Lexical Environment</a></emu-xref>.</li><li>Let <var>envRec</var> be a new declarative <emu-xref href="#sec-environment-records" id="_ref_2037"><a href="#sec-environment-records">Environment Record</a></emu-xref> containing no bindings.</li><li>Set <var>env</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_2038"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref> to <var>envRec</var>.</li><li>Set the outer lexical environment reference of <var>env</var> to <var>E</var>.</li><li>Return <var>env</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-newobjectenvironment" aoid="NewObjectEnvironment">
<h1><span class="secnum">8.1.2.3</span>NewObjectEnvironment ( <var>O</var>, <var>E</var> )</h1>
<p>When the abstract operation NewObjectEnvironment is called with an Object <var>O</var> and a <emu-xref href="#sec-lexical-environments" id="_ref_2039"><a href="#sec-lexical-environments">Lexical Environment</a></emu-xref> <var>E</var> as arguments, the following steps are performed:</p>
<emu-alg><ol><li>Let <var>env</var> be a new <emu-xref href="#sec-lexical-environments" id="_ref_2040"><a href="#sec-lexical-environments">Lexical Environment</a></emu-xref>.</li><li>Let <var>envRec</var> be a new object <emu-xref href="#sec-environment-records" id="_ref_2041"><a href="#sec-environment-records">Environment Record</a></emu-xref> containing <var>O</var> as the binding object.</li><li>Set <var>env</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_2042"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref> to <var>envRec</var>.</li><li>Set the outer lexical environment reference of <var>env</var> to <var>E</var>.</li><li>Return <var>env</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-newfunctionenvironment" aoid="NewFunctionEnvironment">
<h1><span class="secnum">8.1.2.4</span>NewFunctionEnvironment ( <var>F</var>, <var>newTarget</var> )</h1>
<p>When the abstract operation NewFunctionEnvironment is called with arguments <var>F</var> and <var>newTarget</var> the following steps are performed:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2043"><a href="#assert">Assert</a></emu-xref>: <var>F</var> is an ECMAScript function.</li><li><emu-xref href="#assert" id="_ref_2044"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_2045"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>newTarget</var>) is Undefined or Object.</li><li>Let <var>env</var> be a new <emu-xref href="#sec-lexical-environments" id="_ref_2046"><a href="#sec-lexical-environments">Lexical Environment</a></emu-xref>.</li><li>Let <var>envRec</var> be a new <emu-xref href="#sec-function-environment-records" id="_ref_2047"><a href="#sec-function-environment-records">function Environment Record</a></emu-xref> containing no bindings.</li><li>Set <var>envRec</var>.[[FunctionObject]] to <var>F</var>.</li><li>If <var>F</var>.[[ThisMode]] is <emu-const>lexical</emu-const>, set <var>envRec</var>.[[ThisBindingStatus]] to <code>"lexical"</code>.</li><li>Else, set <var>envRec</var>.[[ThisBindingStatus]] to <code>"uninitialized"</code>.</li><li>Let <var>home</var> be <var>F</var>.[[HomeObject]].</li><li>Set <var>envRec</var>.[[HomeObject]] to <var>home</var>.</li><li>Set <var>envRec</var>.[[NewTarget]] to <var>newTarget</var>.</li><li>Set <var>env</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_2048"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref> to <var>envRec</var>.</li><li>Set the outer lexical environment reference of <var>env</var> to <var>F</var>.[[Environment]].</li><li>Return <var>env</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-newglobalenvironment" aoid="NewGlobalEnvironment">
<h1><span class="secnum">8.1.2.5</span>NewGlobalEnvironment ( <var>G</var>, <var>thisValue</var> )</h1>
<p>When the abstract operation NewGlobalEnvironment is called with arguments <var>G</var> and <var>thisValue</var>, the following steps are performed:</p>
<emu-alg><ol><li>Let <var>env</var> be a new <emu-xref href="#sec-lexical-environments" id="_ref_2049"><a href="#sec-lexical-environments">Lexical Environment</a></emu-xref>.</li><li>Let <var>objRec</var> be a new object <emu-xref href="#sec-environment-records" id="_ref_2050"><a href="#sec-environment-records">Environment Record</a></emu-xref> containing <var>G</var> as the binding object.</li><li>Let <var>dclRec</var> be a new declarative <emu-xref href="#sec-environment-records" id="_ref_2051"><a href="#sec-environment-records">Environment Record</a></emu-xref> containing no bindings.</li><li>Let <var>globalRec</var> be a new global <emu-xref href="#sec-environment-records" id="_ref_2052"><a href="#sec-environment-records">Environment Record</a></emu-xref>.</li><li>Set <var>globalRec</var>.[[ObjectRecord]] to <var>objRec</var>.</li><li>Set <var>globalRec</var>.[[GlobalThisValue]] to <var>thisValue</var>.</li><li>Set <var>globalRec</var>.[[DeclarativeRecord]] to <var>dclRec</var>.</li><li>Set <var>globalRec</var>.[[VarNames]] to a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2053"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Set <var>env</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_2054"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref> to <var>globalRec</var>.</li><li>Set the outer lexical environment reference of <var>env</var> to <emu-val>null</emu-val>.</li><li>Return <var>env</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-newmoduleenvironment" aoid="NewModuleEnvironment">
<h1><span class="secnum">8.1.2.6</span>NewModuleEnvironment ( <var>E</var> )</h1>
<p>When the abstract operation NewModuleEnvironment is called with a <emu-xref href="#sec-lexical-environments" id="_ref_2055"><a href="#sec-lexical-environments">Lexical Environment</a></emu-xref> argument <var>E</var> the following steps are performed:</p>
<emu-alg><ol><li>Let <var>env</var> be a new <emu-xref href="#sec-lexical-environments" id="_ref_2056"><a href="#sec-lexical-environments">Lexical Environment</a></emu-xref>.</li><li>Let <var>envRec</var> be a new module <emu-xref href="#sec-environment-records" id="_ref_2057"><a href="#sec-environment-records">Environment Record</a></emu-xref> containing no bindings.</li><li>Set <var>env</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_2058"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref> to <var>envRec</var>.</li><li>Set the outer lexical environment reference of <var>env</var> to <var>E</var>.</li><li>Return <var>env</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-code-realms">
<h1><span class="secnum">8.2</span>Realms</h1>
<p>Before it is evaluated, all ECMAScript code must be associated with a <dfn id="realm">realm</dfn>. Conceptually, a <emu-xref href="#realm" id="_ref_2059"><a href="#realm">realm</a></emu-xref> consists of a set of intrinsic objects, an ECMAScript <emu-xref href="#global-environment" id="_ref_2060"><a href="#global-environment">global environment</a></emu-xref>, all of the ECMAScript code that is loaded within the scope of that <emu-xref href="#global-environment" id="_ref_2061"><a href="#global-environment">global environment</a></emu-xref>, and other associated state and resources.</p>
<p>A <emu-xref href="#realm" id="_ref_2062"><a href="#realm">realm</a></emu-xref> is represented in this specification as a <dfn id="realm-record">Realm Record</dfn> with the fields specified in <emu-xref href="#table-21" id="_ref_170"><a href="#table-21">Table 20</a></emu-xref>:</p>
<emu-table id="table-21" caption="Realm Record Fields"><figure><figcaption>Table 20: <emu-xref href="#realm-record" id="_ref_2063"><a href="#realm-record">Realm Record</a></emu-xref> Fields</figcaption>
<table>
<tbody>
<tr>
<th>
Field Name
</th>
<th>
Value
</th>
<th>
Meaning
</th>
</tr>
<tr>
<td>
[[Intrinsics]]
</td>
<td>
<emu-xref href="#sec-list-and-record-specification-type" id="_ref_2064"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> whose field names are intrinsic keys and whose values are objects
</td>
<td>
The intrinsic values used by code associated with this <emu-xref href="#realm" id="_ref_2065"><a href="#realm">realm</a></emu-xref>
</td>
</tr>
<tr>
<td>
[[GlobalObject]]
</td>
<td>
Object
</td>
<td>
The <emu-xref href="#sec-global-object" id="_ref_2066"><a href="#sec-global-object">global object</a></emu-xref> for this <emu-xref href="#realm" id="_ref_2067"><a href="#realm">realm</a></emu-xref>
</td>
</tr>
<tr>
<td>
[[GlobalEnv]]
</td>
<td>
<emu-xref href="#sec-lexical-environments" id="_ref_2068"><a href="#sec-lexical-environments">Lexical Environment</a></emu-xref>
</td>
<td>
The <emu-xref href="#global-environment" id="_ref_2069"><a href="#global-environment">global environment</a></emu-xref> for this <emu-xref href="#realm" id="_ref_2070"><a href="#realm">realm</a></emu-xref>
</td>
</tr>
<tr>
<td>
[[TemplateMap]]
</td>
<td>
A <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2071"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2072"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Site]]: <emu-xref href="#sec-syntactic-grammar" id="_ref_2073"><a href="#sec-syntactic-grammar">Parse Node</a></emu-xref>, [[Array]]: Object }.
</td>
<td>
<p>Template objects are canonicalized separately for each <emu-xref href="#realm" id="_ref_2074"><a href="#realm">realm</a></emu-xref> using its <emu-xref href="#realm-record" id="_ref_2075"><a href="#realm-record">Realm Record</a></emu-xref>'s [[TemplateMap]]. Each [[Site]] value is a <emu-xref href="#sec-syntactic-grammar" id="_ref_2076"><a href="#sec-syntactic-grammar">Parse Node</a></emu-xref> that is a <emu-nt id="_ref_9079"><a href="#prod-TemplateLiteral">TemplateLiteral</a></emu-nt>. The associated [[Array]] value is the corresponding template object that is passed to a tag function.</p>
<emu-note><span class="note">Note</span><div class="note-contents">Once a <emu-xref href="#sec-syntactic-grammar" id="_ref_2077"><a href="#sec-syntactic-grammar">Parse Node</a></emu-xref>
becomes unreachable, the corresponding [[Array]] is also unreachable,
and it would be unobservable if an implementation removed the pair from
the [[TemplateMap]] list.</div></emu-note>
</td>
</tr>
<tr>
<td>
[[HostDefined]]
</td>
<td>
Any, default value is <emu-val>undefined</emu-val>.
</td>
<td>
Field reserved for use by host environments that need to associate additional information with a <emu-xref href="#realm-record" id="_ref_2078"><a href="#realm-record">Realm Record</a></emu-xref>.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<emu-clause id="sec-createrealm" aoid="CreateRealm">
<h1><span class="secnum">8.2.1</span>CreateRealm ( )</h1>
<p>The abstract operation CreateRealm with no arguments performs the following steps:</p>
<emu-alg><ol><li>Let <var>realmRec</var> be a new <emu-xref href="#realm-record" id="_ref_2079"><a href="#realm-record">Realm Record</a></emu-xref>.</li><li>Perform <emu-xref aoid="CreateIntrinsics" id="_ref_2080"><a href="#sec-createintrinsics">CreateIntrinsics</a></emu-xref>(<var>realmRec</var>).</li><li>Set <var>realmRec</var>.[[GlobalObject]] to <emu-val>undefined</emu-val>.</li><li>Set <var>realmRec</var>.[[GlobalEnv]] to <emu-val>undefined</emu-val>.</li><li>Set <var>realmRec</var>.[[TemplateMap]] to a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2081"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Return <var>realmRec</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-createintrinsics" aoid="CreateIntrinsics">
<h1><span class="secnum">8.2.2</span>CreateIntrinsics ( <var>realmRec</var> )</h1>
<p>The abstract operation CreateIntrinsics with argument <var>realmRec</var> performs the following steps:</p>
<emu-alg><ol><li>Let <var>intrinsics</var> be a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2082"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref>.</li><li>Set <var>realmRec</var>.[[Intrinsics]] to <var>intrinsics</var>.</li><li>Let <var>objProto</var> be <emu-xref aoid="ObjectCreate" id="_ref_2083"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-val>null</emu-val>).</li><li>Set <var>intrinsics</var>.[[<emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_2084"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>]] to <var>objProto</var>.</li><li>Let <var>throwerSteps</var> be the algorithm steps specified in <emu-xref href="#sec-%throwtypeerror%" id="_ref_171"><a href="#sec-%throwtypeerror%">9.2.9.1</a></emu-xref> for the <emu-xref href="#sec-%throwtypeerror%" id="_ref_2085"><a href="#sec-%throwtypeerror%">%ThrowTypeError%</a></emu-xref> function.</li><li>Let <var>thrower</var> be <emu-xref aoid="CreateBuiltinFunction" id="_ref_2086"><a href="#sec-createbuiltinfunction">CreateBuiltinFunction</a></emu-xref>(<var>throwerSteps</var>, « », <var>realmRec</var>, <emu-val>null</emu-val>).</li><li>Set <var>intrinsics</var>.[[<emu-xref href="#sec-%throwtypeerror%" id="_ref_2087"><a href="#sec-%throwtypeerror%">%ThrowTypeError%</a></emu-xref>]] to <var>thrower</var>.</li><li>Let <var>noSteps</var> be an empty sequence of algorithm steps.</li><li>Let <var>funcProto</var> be <emu-xref aoid="CreateBuiltinFunction" id="_ref_2088"><a href="#sec-createbuiltinfunction">CreateBuiltinFunction</a></emu-xref>(<var>noSteps</var>, « », <var>realmRec</var>, <var>objProto</var>).</li><li>Set <var>intrinsics</var>.[[<emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_2089"><a href="#sec-properties-of-the-function-prototype-object">%FunctionPrototype%</a></emu-xref>]] to <var>funcProto</var>.</li><li>Call <var>thrower</var>.[[SetPrototypeOf]](<var>funcProto</var>).</li><li>Perform <emu-xref aoid="AddRestrictedFunctionProperties" id="_ref_2090"><a href="#sec-addrestrictedfunctionproperties">AddRestrictedFunctionProperties</a></emu-xref>(<var>funcProto</var>, <var>realmRec</var>).</li><li>Set fields of <var>intrinsics</var> with the values listed in <emu-xref href="#table-7" id="_ref_172"><a href="#table-7">Table 7</a></emu-xref>
that have not already been handled above. The field names are the names
listed in column one of the table. The value of each field is a new
object value fully and recursively populated with property values as
defined by the specification of each object in clauses 18-26. All object
property values are newly created object values. All values that are
built-in function objects are created by performing <emu-xref aoid="CreateBuiltinFunction" id="_ref_2091"><a href="#sec-createbuiltinfunction">CreateBuiltinFunction</a></emu-xref>(&lt;steps&gt;, &lt;slots&gt;, <var>realmRec</var>,
&lt;prototype&gt;) where &lt;steps&gt; is the definition of that
function provided by this specification, &lt;slots&gt; is a list of the
names, if any, of the function's specified internal slots, and
&lt;prototype&gt; is the specified value of the function's [[Prototype]]
internal slot. The creation of the intrinsics and their properties must
be ordered to avoid any dependencies upon objects that have not yet
been created.</li><li>Return <var>intrinsics</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-setrealmglobalobject" aoid="SetRealmGlobalObject">
<h1><span class="secnum">8.2.3</span>SetRealmGlobalObject ( <var>realmRec</var>, <var>globalObj</var>, <var>thisValue</var> )</h1>
<p>The abstract operation SetRealmGlobalObject with arguments <var>realmRec</var>, <var>globalObj</var>, and <var>thisValue</var> performs the following steps:</p>
<emu-alg><ol><li>If <var>globalObj</var> is <emu-val>undefined</emu-val>, then<ol><li>Let <var>intrinsics</var> be <var>realmRec</var>.[[Intrinsics]].</li><li>Set <var>globalObj</var> to <emu-xref aoid="ObjectCreate" id="_ref_2092"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<var>intrinsics</var>.[[<emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_2093"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>]]).</li></ol></li><li><emu-xref href="#assert" id="_ref_2094"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_2095"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>globalObj</var>) is Object.</li><li>If <var>thisValue</var> is <emu-val>undefined</emu-val>, set <var>thisValue</var> to <var>globalObj</var>.</li><li>Set <var>realmRec</var>.[[GlobalObject]] to <var>globalObj</var>.</li><li>Let <var>newGlobalEnv</var> be <emu-xref aoid="NewGlobalEnvironment" id="_ref_2096"><a href="#sec-newglobalenvironment">NewGlobalEnvironment</a></emu-xref>(<var>globalObj</var>, <var>thisValue</var>).</li><li>Set <var>realmRec</var>.[[GlobalEnv]] to <var>newGlobalEnv</var>.</li><li>Return <var>realmRec</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-setdefaultglobalbindings" aoid="SetDefaultGlobalBindings">
<h1><span class="secnum">8.2.4</span>SetDefaultGlobalBindings ( <var>realmRec</var> )</h1>
<p>The abstract operation SetDefaultGlobalBindings with argument <var>realmRec</var> performs the following steps:</p>
<emu-alg><ol><li>Let <var>global</var> be <var>realmRec</var>.[[GlobalObject]].</li><li>For each property of the Global Object specified in clause <emu-xref href="#sec-global-object" id="_ref_173"><a href="#sec-global-object">18</a></emu-xref>, do<ol><li>Let <var>name</var> be the String value of the <emu-xref href="#property-name" id="_ref_2097"><a href="#property-name">property name</a></emu-xref>.</li><li>Let <var>desc</var> be the fully populated <emu-xref href="#sec-object-type" id="_ref_2098"><a href="#sec-object-type">data property</a></emu-xref> descriptor for the property containing the specified attributes for the property. For properties listed in <emu-xref href="#sec-function-properties-of-the-global-object" id="_ref_174"><a href="#sec-function-properties-of-the-global-object">18.2</a></emu-xref>, <emu-xref href="#sec-constructor-properties-of-the-global-object" id="_ref_175"><a href="#sec-constructor-properties-of-the-global-object">18.3</a></emu-xref>, or <emu-xref href="#sec-other-properties-of-the-global-object" id="_ref_176"><a href="#sec-other-properties-of-the-global-object">18.4</a></emu-xref> the value of the [[Value]] attribute is the corresponding intrinsic object from <var>realmRec</var>.</li><li>Perform ?&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_2099"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>global</var>, <var>name</var>, <var>desc</var>).</li></ol></li><li>Return <var>global</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-execution-contexts">
<h1><span class="secnum">8.3</span>Execution Contexts</h1>
<p>An <dfn>execution context</dfn> is a specification device that
is used to track the runtime evaluation of code by an ECMAScript
implementation. At any point in time, there is at most one execution
context per <emu-xref href="#agent" id="_ref_2100"><a href="#agent">agent</a></emu-xref> that is actually executing code. This is known as the <emu-xref href="#agent" id="_ref_2101"><a href="#agent">agent</a></emu-xref>'s <dfn id="running-execution-context">running execution context</dfn>. All references to the <emu-xref href="#running-execution-context" id="_ref_2102"><a href="#running-execution-context">running execution context</a></emu-xref> in this specification denote the <emu-xref href="#running-execution-context" id="_ref_2103"><a href="#running-execution-context">running execution context</a></emu-xref> of the <emu-xref href="#surrounding-agent" id="_ref_2104"><a href="#surrounding-agent">surrounding agent</a></emu-xref>.</p>
<p>The <dfn id="execution-context-stack">execution context stack</dfn> is used to track execution contexts. The <emu-xref href="#running-execution-context" id="_ref_2105"><a href="#running-execution-context">running execution context</a></emu-xref>
is always the top element of this stack. A new execution context is
created whenever control is transferred from the executable code
associated with the currently <emu-xref href="#running-execution-context" id="_ref_2106"><a href="#running-execution-context">running execution context</a></emu-xref>
to executable code that is not associated with that execution context.
The newly created execution context is pushed onto the stack and becomes
the <emu-xref href="#running-execution-context" id="_ref_2107"><a href="#running-execution-context">running execution context</a></emu-xref>.</p>
<p>An execution context contains whatever implementation specific
state is necessary to track the execution progress of its associated
code. Each execution context has at least the state components listed in
<emu-xref href="#table-22" id="_ref_177"><a href="#table-22">Table 21</a></emu-xref>.</p>
<emu-table id="table-22" caption="State Components for All Execution Contexts"><figure><figcaption>Table 21: State Components for All Execution Contexts</figcaption>
<table>
<tbody>
<tr>
<th>
Component
</th>
<th>
Purpose
</th>
</tr>
<tr>
<td>
code evaluation state
</td>
<td>
Any state needed to perform, suspend, and resume evaluation of the code associated with this <emu-xref href="#sec-execution-contexts" id="_ref_2108"><a href="#sec-execution-contexts">execution context</a></emu-xref>.
</td>
</tr>
<tr>
<td>
Function
</td>
<td>
If this <emu-xref href="#sec-execution-contexts" id="_ref_2109"><a href="#sec-execution-contexts">execution context</a></emu-xref> is evaluating the code of a <emu-xref href="#function-object" id="_ref_2110"><a href="#function-object">function object</a></emu-xref>, then the value of this component is that <emu-xref href="#function-object" id="_ref_2111"><a href="#function-object">function object</a></emu-xref>. If the context is evaluating the code of a <emu-nt id="_ref_9080"><a href="#prod-Script">Script</a></emu-nt> or <emu-nt id="_ref_9081"><a href="#prod-Module">Module</a></emu-nt>, the value is <emu-val>null</emu-val>.
</td>
</tr>
<tr>
<td>
<emu-xref href="#realm" id="_ref_2112"><a href="#realm">Realm</a></emu-xref>
</td>
<td>
The <emu-xref href="#realm-record" id="_ref_2113"><a href="#realm-record">Realm Record</a></emu-xref> from which associated code accesses ECMAScript resources.
</td>
</tr>
<tr>
<td>
ScriptOrModule
</td>
<td>
The <emu-xref href="#sec-abstract-module-records" id="_ref_2114"><a href="#sec-abstract-module-records">Module Record</a></emu-xref> or <emu-xref href="#script-record" id="_ref_2115"><a href="#script-record">Script Record</a></emu-xref> from which associated code originates. If there is no originating script or module, as is the case for the original <emu-xref href="#sec-execution-contexts" id="_ref_2116"><a href="#sec-execution-contexts">execution context</a></emu-xref> created in <emu-xref aoid="InitializeHostDefinedRealm" id="_ref_2117"><a href="#sec-initializehostdefinedrealm">InitializeHostDefinedRealm</a></emu-xref>, the value is <emu-val>null</emu-val>.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<p>Evaluation of code by the <emu-xref href="#running-execution-context" id="_ref_2118"><a href="#running-execution-context">running execution context</a></emu-xref> may be suspended at various points defined within this specification. Once the <emu-xref href="#running-execution-context" id="_ref_2119"><a href="#running-execution-context">running execution context</a></emu-xref> has been suspended a different execution context may become the <emu-xref href="#running-execution-context" id="_ref_2120"><a href="#running-execution-context">running execution context</a></emu-xref> and commence evaluating its code. At some later time a suspended execution context may again become the <emu-xref href="#running-execution-context" id="_ref_2121"><a href="#running-execution-context">running execution context</a></emu-xref> and continue evaluating its code at the point where it had previously been suspended. Transition of the <emu-xref href="#running-execution-context" id="_ref_2122"><a href="#running-execution-context">running execution context</a></emu-xref>
status among execution contexts usually occurs in stack-like
last-in/first-out manner. However, some ECMAScript features require
non-LIFO transitions of the <emu-xref href="#running-execution-context" id="_ref_2123"><a href="#running-execution-context">running execution context</a></emu-xref>.</p>
<p>The value of the <emu-xref href="#realm" id="_ref_2124"><a href="#realm">Realm</a></emu-xref> component of the <emu-xref href="#running-execution-context" id="_ref_2125"><a href="#running-execution-context">running execution context</a></emu-xref> is also called <dfn id="current-realm">the current Realm Record</dfn>. The value of the Function component of the <emu-xref href="#running-execution-context" id="_ref_2126"><a href="#running-execution-context">running execution context</a></emu-xref> is also called the <dfn id="active-function-object">active function object</dfn>.</p>
<p>Execution contexts for ECMAScript code have the additional state components listed in <emu-xref href="#table-23" id="_ref_178"><a href="#table-23">Table 22</a></emu-xref>.</p>
<emu-table id="table-23" caption="Additional State Components for ECMAScript Code Execution Contexts"><figure><figcaption>Table 22: Additional State Components for ECMAScript Code Execution Contexts</figcaption>
<table>
<tbody>
<tr>
<th>
Component
</th>
<th>
Purpose
</th>
</tr>
<tr>
<td>
LexicalEnvironment
</td>
<td>
Identifies the <emu-xref href="#sec-lexical-environments" id="_ref_2127"><a href="#sec-lexical-environments">Lexical Environment</a></emu-xref> used to resolve identifier references made by code within this <emu-xref href="#sec-execution-contexts" id="_ref_2128"><a href="#sec-execution-contexts">execution context</a></emu-xref>.
</td>
</tr>
<tr>
<td>
VariableEnvironment
</td>
<td>
Identifies the <emu-xref href="#sec-lexical-environments" id="_ref_2129"><a href="#sec-lexical-environments">Lexical Environment</a></emu-xref> whose <emu-xref href="#sec-lexical-environments" id="_ref_2130"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref> holds bindings created by <emu-nt id="_ref_9082"><a href="#prod-VariableStatement">VariableStatement</a></emu-nt>s within this <emu-xref href="#sec-execution-contexts" id="_ref_2131"><a href="#sec-execution-contexts">execution context</a></emu-xref>.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<p>The LexicalEnvironment and VariableEnvironment components of an execution context are always Lexical Environments.</p>
<p>Execution contexts representing the evaluation of generator objects have the additional state components listed in <emu-xref href="#table-24" id="_ref_179"><a href="#table-24">Table 23</a></emu-xref>.</p>
<emu-table id="table-24" caption="Additional State Components for Generator Execution Contexts"><figure><figcaption>Table 23: Additional State Components for Generator Execution Contexts</figcaption>
<table>
<tbody>
<tr>
<th>
Component
</th>
<th>
Purpose
</th>
</tr>
<tr>
<td>
Generator
</td>
<td>
The GeneratorObject that this <emu-xref href="#sec-execution-contexts" id="_ref_2132"><a href="#sec-execution-contexts">execution context</a></emu-xref> is evaluating.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<p>In most situations only the <emu-xref href="#running-execution-context" id="_ref_2133"><a href="#running-execution-context">running execution context</a></emu-xref> (the top of the <emu-xref href="#execution-context-stack" id="_ref_2134"><a href="#execution-context-stack">execution context stack</a></emu-xref>)
is directly manipulated by algorithms within this specification. Hence
when the terms “LexicalEnvironment”, and “VariableEnvironment” are used
without qualification they are in reference to those components of the <emu-xref href="#running-execution-context" id="_ref_2135"><a href="#running-execution-context">running execution context</a></emu-xref>.</p>
<p>An execution context is purely a specification mechanism and need
not correspond to any particular artefact of an ECMAScript
implementation. It is impossible for ECMAScript code to directly access
or observe an execution context.</p>
<emu-clause id="sec-getactivescriptormodule" aoid="GetActiveScriptOrModule">
<h1><span class="secnum">8.3.1</span>GetActiveScriptOrModule ( )</h1>
<p>The GetActiveScriptOrModule abstract operation is used to determine the running script or module, based on the <emu-xref href="#running-execution-context" id="_ref_2136"><a href="#running-execution-context">running execution context</a></emu-xref>. GetActiveScriptOrModule performs the following steps:</p>
<emu-alg><ol><li>If the <emu-xref href="#execution-context-stack" id="_ref_2137"><a href="#execution-context-stack">execution context stack</a></emu-xref> is empty, return <emu-val>null</emu-val>.</li><li>Let <var>ec</var> be the topmost <emu-xref href="#sec-execution-contexts" id="_ref_2138"><a href="#sec-execution-contexts">execution context</a></emu-xref> on the <emu-xref href="#execution-context-stack" id="_ref_2139"><a href="#execution-context-stack">execution context stack</a></emu-xref> whose ScriptOrModule component is not <emu-val>null</emu-val>.</li><li>If no such <emu-xref href="#sec-execution-contexts" id="_ref_2140"><a href="#sec-execution-contexts">execution context</a></emu-xref> exists, return <emu-val>null</emu-val>. Otherwise, return <var>ec</var>'s ScriptOrModule component.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-resolvebinding" aoid="ResolveBinding">
<h1><span class="secnum">8.3.2</span>ResolveBinding ( <var>name</var> [ , <var>env</var> ] )</h1>
<p>The ResolveBinding abstract operation is used to determine the binding of <var>name</var> passed as a String value. The optional argument <var>env</var> can be used to explicitly provide the <emu-xref href="#sec-lexical-environments" id="_ref_2141"><a href="#sec-lexical-environments">Lexical Environment</a></emu-xref>
that is to be searched for the binding. During execution of ECMAScript
code, ResolveBinding is performed using the following algorithm:</p>
<emu-alg><ol><li>If <var>env</var> is not present or if <var>env</var> is <emu-val>undefined</emu-val>, then<ol><li>Set <var>env</var> to the <emu-xref href="#running-execution-context" id="_ref_2142"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment.</li></ol></li><li><emu-xref href="#assert" id="_ref_2143"><a href="#assert">Assert</a></emu-xref>: <var>env</var> is a <emu-xref href="#sec-lexical-environments" id="_ref_2144"><a href="#sec-lexical-environments">Lexical Environment</a></emu-xref>.</li><li>If the code matching the syntactic production that is being evaluated is contained in <emu-xref href="#sec-strict-mode-code" id="_ref_2145"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, let <var>strict</var> be <emu-val>true</emu-val>, else let <var>strict</var> be <emu-val>false</emu-val>.</li><li>Return ?&nbsp;<emu-xref aoid="GetIdentifierReference" id="_ref_2146"><a href="#sec-getidentifierreference">GetIdentifierReference</a></emu-xref>(<var>env</var>, <var>name</var>, <var>strict</var>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The result of ResolveBinding is always a <emu-xref href="#sec-reference-specification-type" id="_ref_2147"><a href="#sec-reference-specification-type">Reference</a></emu-xref> value with its referenced name component equal to the <var>name</var> argument.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-getthisenvironment" aoid="GetThisEnvironment">
<h1><span class="secnum">8.3.3</span>GetThisEnvironment ( )</h1>
<p>The abstract operation GetThisEnvironment finds the <emu-xref href="#sec-environment-records" id="_ref_2148"><a href="#sec-environment-records">Environment Record</a></emu-xref> that currently supplies the binding of the keyword <code>this</code>. GetThisEnvironment performs the following steps:</p>
<emu-alg><ol><li>Let <var>lex</var> be the <emu-xref href="#running-execution-context" id="_ref_2149"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment.</li><li>Repeat,<ol><li>Let <var>envRec</var> be <var>lex</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_2150"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref>.</li><li>Let <var>exists</var> be <var>envRec</var>.HasThisBinding().</li><li>If <var>exists</var> is <emu-val>true</emu-val>, return <var>envRec</var>.</li><li>Let <var>outer</var> be the value of <var>lex</var>'s outer environment reference.</li><li><emu-xref href="#assert" id="_ref_2151"><a href="#assert">Assert</a></emu-xref>: <var>outer</var> is not <emu-val>null</emu-val>.</li><li>Set <var>lex</var> to <var>outer</var>.
</li></ol></li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The loop in step 2 will always terminate because the list of environments always ends with the <emu-xref href="#global-environment" id="_ref_2152"><a href="#global-environment">global environment</a></emu-xref> which has a <code>this</code> binding.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-resolvethisbinding" aoid="ResolveThisBinding">
<h1><span class="secnum">8.3.4</span>ResolveThisBinding ( )</h1>
<p>The abstract operation ResolveThisBinding determines the binding of the keyword <code>this</code> using the LexicalEnvironment of the <emu-xref href="#running-execution-context" id="_ref_2153"><a href="#running-execution-context">running execution context</a></emu-xref>. ResolveThisBinding performs the following steps:</p>
<emu-alg><ol><li>Let <var>envRec</var> be <emu-xref aoid="GetThisEnvironment" id="_ref_2154"><a href="#sec-getthisenvironment">GetThisEnvironment</a></emu-xref>().</li><li>Return ? <var>envRec</var>.GetThisBinding().
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-getnewtarget" aoid="GetNewTarget">
<h1><span class="secnum">8.3.5</span>GetNewTarget ( )</h1>
<p>The abstract operation GetNewTarget determines the NewTarget value using the LexicalEnvironment of the <emu-xref href="#running-execution-context" id="_ref_2155"><a href="#running-execution-context">running execution context</a></emu-xref>. GetNewTarget performs the following steps:</p>
<emu-alg><ol><li>Let <var>envRec</var> be <emu-xref aoid="GetThisEnvironment" id="_ref_2156"><a href="#sec-getthisenvironment">GetThisEnvironment</a></emu-xref>().</li><li><emu-xref href="#assert" id="_ref_2157"><a href="#assert">Assert</a></emu-xref>: <var>envRec</var> has a [[NewTarget]] field.</li><li>Return <var>envRec</var>.[[NewTarget]].
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-getglobalobject" aoid="GetGlobalObject">
<h1><span class="secnum">8.3.6</span>GetGlobalObject ( )</h1>
<p>The abstract operation GetGlobalObject returns the <emu-xref href="#sec-global-object" id="_ref_2158"><a href="#sec-global-object">global object</a></emu-xref> used by the currently <emu-xref href="#running-execution-context" id="_ref_2159"><a href="#running-execution-context">running execution context</a></emu-xref>. GetGlobalObject performs the following steps:</p>
<emu-alg><ol><li>Let <var>ctx</var> be the <emu-xref href="#running-execution-context" id="_ref_2160"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Let <var>currentRealm</var> be <var>ctx</var>'s <emu-xref href="#realm" id="_ref_2161"><a href="#realm">Realm</a></emu-xref>.</li><li>Return <var>currentRealm</var>.[[GlobalObject]].
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-jobs-and-job-queues">
<h1><span class="secnum">8.4</span>Jobs and Job Queues</h1>
<p>A Job is an abstract operation that initiates an ECMAScript
computation when no other ECMAScript computation is currently in
progress. A Job abstract operation may be defined to accept an arbitrary
set of job parameters.</p>
<p>Execution of a Job can be initiated only when there is no <emu-xref href="#running-execution-context" id="_ref_2162"><a href="#running-execution-context">running execution context</a></emu-xref> and the <emu-xref href="#execution-context-stack" id="_ref_2163"><a href="#execution-context-stack">execution context stack</a></emu-xref> is empty. A PendingJob is a request for the future execution of a Job. A PendingJob is an internal <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2164"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> whose fields are specified in <emu-xref href="#table-25" id="_ref_180"><a href="#table-25">Table 24</a></emu-xref>.
Once execution of a Job is initiated, the Job always executes to
completion. No other Job may be initiated until the currently running
Job completes. However, the currently running Job or external events may
cause the enqueuing of additional PendingJobs that may be initiated
sometime after completion of the currently running Job.</p>
<emu-table id="table-25" caption="PendingJob Record Fields"><figure><figcaption>Table 24: PendingJob <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2165"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> Fields</figcaption>
<table>
<tbody>
<tr>
<th>
Field Name
</th>
<th>
Value
</th>
<th>
Meaning
</th>
</tr>
<tr>
<td>
[[Job]]
</td>
<td>
The name of a Job abstract operation
</td>
<td>
This is the abstract operation that is performed when execution of this PendingJob is initiated.
</td>
</tr>
<tr>
<td>
[[Arguments]]
</td>
<td>
A <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2166"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>
</td>
<td>
The <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2167"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of argument values that are to be passed to [[Job]] when it is activated.
</td>
</tr>
<tr>
<td>
[[Realm]]
</td>
<td>
A <emu-xref href="#realm-record" id="_ref_2168"><a href="#realm-record">Realm Record</a></emu-xref>
</td>
<td>
The <emu-xref href="#realm-record" id="_ref_2169"><a href="#realm-record">Realm Record</a></emu-xref> for the initial <emu-xref href="#sec-execution-contexts" id="_ref_2170"><a href="#sec-execution-contexts">execution context</a></emu-xref> when this PendingJob is initiated.
</td>
</tr>
<tr>
<td>
[[ScriptOrModule]]
</td>
<td>
A <emu-xref href="#script-record" id="_ref_2171"><a href="#script-record">Script Record</a></emu-xref> or <emu-xref href="#sec-abstract-module-records" id="_ref_2172"><a href="#sec-abstract-module-records">Module Record</a></emu-xref>
</td>
<td>
The script or module for the initial <emu-xref href="#sec-execution-contexts" id="_ref_2173"><a href="#sec-execution-contexts">execution context</a></emu-xref> when this PendingJob is initiated.
</td>
</tr>
<tr>
<td>
[[HostDefined]]
</td>
<td>
Any, default value is <emu-val>undefined</emu-val>.
</td>
<td>
Field reserved for use by host environments that need to associate additional information with a pending Job.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<p>A Job Queue is a FIFO queue of PendingJob records. Each Job Queue
has a name and the full set of available Job Queues are defined by an
ECMAScript implementation. Every ECMAScript implementation has at least
the Job Queues defined in <emu-xref href="#table-26" id="_ref_181"><a href="#table-26">Table 25</a></emu-xref>.</p>
<p>Each <emu-xref href="#agent" id="_ref_2174"><a href="#agent">agent</a></emu-xref>
has its own set of named Job Queues. All references to a named job
queue in this specification denote the named job queue of the <emu-xref href="#surrounding-agent" id="_ref_2175"><a href="#surrounding-agent">surrounding agent</a></emu-xref>.</p>
<emu-table id="table-26" caption="Required Job Queues"><figure><figcaption>Table 25: Required Job Queues</figcaption>
<table>
<tbody>
<tr>
<th>
Name
</th>
<th>
Purpose
</th>
</tr>
<tr>
<td>
ScriptJobs
</td>
<td>
Jobs that validate and evaluate ECMAScript <emu-nt id="_ref_9083"><a href="#prod-Script">Script</a></emu-nt> and <emu-nt id="_ref_9084"><a href="#prod-Module">Module</a></emu-nt> source text. See clauses 10 and 15.
</td>
</tr>
<tr>
<td>
PromiseJobs
</td>
<td>
Jobs that are responses to the settlement of a Promise (see <emu-xref href="#sec-promise-objects" id="_ref_182"><a href="#sec-promise-objects">25.6</a></emu-xref>).
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<p>A request for the future execution of a Job is made by
enqueueing, on a Job Queue, a PendingJob record that includes a Job
abstract operation name and any necessary argument values. When there is
no <emu-xref href="#running-execution-context" id="_ref_2176"><a href="#running-execution-context">running execution context</a></emu-xref> and the <emu-xref href="#execution-context-stack" id="_ref_2177"><a href="#execution-context-stack">execution context stack</a></emu-xref>
is empty, the ECMAScript implementation removes the first PendingJob
from a Job Queue and uses the information contained in it to create an <emu-xref href="#sec-execution-contexts" id="_ref_2178"><a href="#sec-execution-contexts">execution context</a></emu-xref> and starts execution of the associated Job abstract operation.</p>
<p>The PendingJob records from a single Job Queue are always
initiated in FIFO order. This specification does not define the order in
which multiple Job Queues are serviced. An ECMAScript implementation
may interweave the FIFO evaluation of the PendingJob records of a Job
Queue with the evaluation of the PendingJob records of one or more other
Job Queues. An implementation must define what occurs when there are no
<emu-xref href="#running-execution-context" id="_ref_2179"><a href="#running-execution-context">running execution context</a></emu-xref> and all Job Queues are empty.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Typically an ECMAScript implementation will have its Job Queues
pre-initialized with at least one PendingJob and one of those Jobs will
be the first to be executed. An implementation might choose to free all
resources and terminate if the current Job completes and all Job Queues
are empty. Alternatively, it might choose to wait for a some
implementation specific <emu-xref href="#agent" id="_ref_2180"><a href="#agent">agent</a></emu-xref> or mechanism to enqueue new PendingJob requests.</p>
</div></emu-note>
<p>The following <emu-xref href="#sec-algorithm-conventions-abstract-operations" id="_ref_2181"><a href="#sec-algorithm-conventions-abstract-operations">abstract operations</a></emu-xref> are used to create and manage Jobs and Job Queues:</p>
<emu-clause id="sec-enqueuejob" aoid="EnqueueJob">
<h1><span class="secnum">8.4.1</span>EnqueueJob ( <var>queueName</var>, <var>job</var>, <var>arguments</var> )</h1>
<p>The EnqueueJob abstract operation requires three arguments: <var>queueName</var>, <var>job</var>, and <var>arguments</var>. It performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2182"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_2183"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>queueName</var>) is String and its value is the name of a Job Queue recognized by this implementation.</li><li><emu-xref href="#assert" id="_ref_2184"><a href="#assert">Assert</a></emu-xref>: <var>job</var> is the name of a Job.</li><li><emu-xref href="#assert" id="_ref_2185"><a href="#assert">Assert</a></emu-xref>: <var>arguments</var> is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2186"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> that has the same number of elements as the number of parameters required by <var>job</var>.</li><li>Let <var>callerContext</var> be the <emu-xref href="#running-execution-context" id="_ref_2187"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Let <var>callerRealm</var> be <var>callerContext</var>'s <emu-xref href="#realm" id="_ref_2188"><a href="#realm">Realm</a></emu-xref>.</li><li>Let <var>callerScriptOrModule</var> be <var>callerContext</var>'s ScriptOrModule.</li><li>Let <var>pending</var> be PendingJob { [[Job]]: <var>job</var>, [[Arguments]]: <var>arguments</var>, [[Realm]]: <var>callerRealm</var>, [[ScriptOrModule]]: <var>callerScriptOrModule</var>, [[HostDefined]]: <emu-val>undefined</emu-val> }.</li><li>Perform any implementation or host environment defined processing of <var>pending</var>. This may include modifying the [[HostDefined]] field or any other field of <var>pending</var>.</li><li>Add <var>pending</var> at the back of the Job Queue named by <var>queueName</var>.</li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_2189"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-initializehostdefinedrealm" aoid="InitializeHostDefinedRealm">
<h1><span class="secnum">8.5</span>InitializeHostDefinedRealm ( )</h1>
<p>The abstract operation InitializeHostDefinedRealm performs the following steps:</p>
<emu-alg><ol><li>Let <var>realm</var> be <emu-xref aoid="CreateRealm" id="_ref_2190"><a href="#sec-createrealm">CreateRealm</a></emu-xref>().</li><li>Let <var>newContext</var> be a new <emu-xref href="#sec-execution-contexts" id="_ref_2191"><a href="#sec-execution-contexts">execution context</a></emu-xref>.</li><li>Set the Function of <var>newContext</var> to <emu-val>null</emu-val>.</li><li>Set the <emu-xref href="#realm" id="_ref_2192"><a href="#realm">Realm</a></emu-xref> of <var>newContext</var> to <var>realm</var>.</li><li>Set the ScriptOrModule of <var>newContext</var> to <emu-val>null</emu-val>.</li><li>Push <var>newContext</var> onto the <emu-xref href="#execution-context-stack" id="_ref_2193"><a href="#execution-context-stack">execution context stack</a></emu-xref>; <var>newContext</var> is now the <emu-xref href="#running-execution-context" id="_ref_2194"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>If the host requires use of an <emu-xref href="#exotic-object" id="_ref_2195"><a href="#exotic-object">exotic object</a></emu-xref> to serve as <var>realm</var>'s <emu-xref href="#sec-global-object" id="_ref_2196"><a href="#sec-global-object">global object</a></emu-xref>, let <var>global</var> be such an object created in an implementation-defined manner. Otherwise, let <var>global</var> be <emu-val>undefined</emu-val>, indicating that an ordinary object should be created as the <emu-xref href="#sec-global-object" id="_ref_2197"><a href="#sec-global-object">global object</a></emu-xref>.</li><li>If the host requires that the <code>this</code> binding in <var>realm</var>'s global scope return an object other than the <emu-xref href="#sec-global-object" id="_ref_2198"><a href="#sec-global-object">global object</a></emu-xref>, let <var>thisValue</var> be such an object created in an implementation-defined manner. Otherwise, let <var>thisValue</var> be <emu-val>undefined</emu-val>, indicating that <var>realm</var>'s global <code>this</code> binding should be the <emu-xref href="#sec-global-object" id="_ref_2199"><a href="#sec-global-object">global object</a></emu-xref>.</li><li>Perform <emu-xref aoid="SetRealmGlobalObject" id="_ref_2200"><a href="#sec-setrealmglobalobject">SetRealmGlobalObject</a></emu-xref>(<var>realm</var>, <var>global</var>, <var>thisValue</var>).</li><li>Let <var>globalObj</var> be ?&nbsp;<emu-xref aoid="SetDefaultGlobalBindings" id="_ref_2201"><a href="#sec-setdefaultglobalbindings">SetDefaultGlobalBindings</a></emu-xref>(<var>realm</var>).</li><li>Create any implementation-defined <emu-xref href="#sec-global-object" id="_ref_2202"><a href="#sec-global-object">global object</a></emu-xref> properties on <var>globalObj</var>.</li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_2203"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-runjobs" aoid="RunJobs">
<h1><span class="secnum">8.6</span>RunJobs ( )</h1>
<p>The abstract operation RunJobs performs the following steps:</p>
<emu-alg><ol><li>Perform ?&nbsp;<emu-xref aoid="InitializeHostDefinedRealm" id="_ref_2204"><a href="#sec-initializehostdefinedrealm">InitializeHostDefinedRealm</a></emu-xref>().</li><li>In an implementation-dependent manner, obtain the ECMAScript source texts (see clause <emu-xref href="#sec-ecmascript-language-source-code" id="_ref_183"><a href="#sec-ecmascript-language-source-code">10</a></emu-xref>) and any associated host-defined values for zero or more ECMAScript scripts and/or ECMAScript modules. For each such <var>sourceText</var> and <var>hostDefined</var>, do<ol><li>If <var>sourceText</var> is the source code of a script, then<ol><li>Perform <emu-xref aoid="EnqueueJob" id="_ref_2205"><a href="#sec-enqueuejob">EnqueueJob</a></emu-xref>(<code>"ScriptJobs"</code>, <emu-xref aoid="ScriptEvaluationJob" id="_ref_2206"><a href="#sec-scriptevaluationjob">ScriptEvaluationJob</a></emu-xref>, « <var>sourceText</var>, <var>hostDefined</var> »).</li></ol></li><li>Else <var>sourceText</var> is the source code of a module,<ol><li>Perform <emu-xref aoid="EnqueueJob" id="_ref_2207"><a href="#sec-enqueuejob">EnqueueJob</a></emu-xref>(<code>"ScriptJobs"</code>, <emu-xref aoid="TopLevelModuleEvaluationJob" id="_ref_2208"><a href="#sec-toplevelmoduleevaluationjob">TopLevelModuleEvaluationJob</a></emu-xref>, « <var>sourceText</var>, <var>hostDefined</var> »).</li></ol></li></ol></li><li>Repeat,<ol><li><emu-xref aoid="Suspend" id="_ref_2209"><a href="#sec-suspend">Suspend</a></emu-xref> the <emu-xref href="#running-execution-context" id="_ref_2210"><a href="#running-execution-context">running execution context</a></emu-xref> and remove it from the <emu-xref href="#execution-context-stack" id="_ref_2211"><a href="#execution-context-stack">execution context stack</a></emu-xref>.</li><li><emu-xref href="#assert" id="_ref_2212"><a href="#assert">Assert</a></emu-xref>: The <emu-xref href="#execution-context-stack" id="_ref_2213"><a href="#execution-context-stack">execution context stack</a></emu-xref> is now empty.</li><li>Let <var>nextQueue</var>
be a non-empty Job Queue chosen in an implementation-defined manner. If
all Job Queues are empty, the result is implementation-defined.</li><li>Let <var>nextPending</var> be the PendingJob record at the front of <var>nextQueue</var>. Remove that record from <var>nextQueue</var>.</li><li>Let <var>newContext</var> be a new <emu-xref href="#sec-execution-contexts" id="_ref_2214"><a href="#sec-execution-contexts">execution context</a></emu-xref>.</li><li>Set <var>newContext</var>'s Function to <emu-val>null</emu-val>.</li><li>Set <var>newContext</var>'s <emu-xref href="#realm" id="_ref_2215"><a href="#realm">Realm</a></emu-xref> to <var>nextPending</var>.[[Realm]].</li><li>Set <var>newContext</var>'s ScriptOrModule to <var>nextPending</var>.[[ScriptOrModule]].</li><li>Push <var>newContext</var> onto the <emu-xref href="#execution-context-stack" id="_ref_2216"><a href="#execution-context-stack">execution context stack</a></emu-xref>; <var>newContext</var> is now the <emu-xref href="#running-execution-context" id="_ref_2217"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Perform any implementation or host environment defined job initialization using <var>nextPending</var>.</li><li>Let <var>result</var> be the result of performing the abstract operation named by <var>nextPending</var>.[[Job]] using the elements of <var>nextPending</var>.[[Arguments]] as its arguments.</li><li>If <var>result</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_2218"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, perform <emu-xref aoid="HostReportErrors" id="_ref_2219"><a href="#sec-host-report-errors">HostReportErrors</a></emu-xref>(« <var>result</var>.[[Value]] »).
</li></ol></li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-agents">
<h1><span class="secnum">8.7</span>Agents</h1>
<p>An <dfn id="agent">agent</dfn> comprises a set of ECMAScript execution contexts, an <emu-xref href="#execution-context-stack" id="_ref_2220"><a href="#execution-context-stack">execution context stack</a></emu-xref>, a <emu-xref href="#running-execution-context" id="_ref_2221"><a href="#running-execution-context">running execution context</a></emu-xref>, a set of named job queues, an <dfn id="agent-record">Agent Record</dfn>, and an <dfn id="executing-thread">executing thread</dfn>. Except for the <emu-xref href="#executing-thread" id="_ref_2222"><a href="#executing-thread">executing thread</a></emu-xref>, the constituents of an <emu-xref href="#agent" id="_ref_2223"><a href="#agent">agent</a></emu-xref> belong exclusively to that <emu-xref href="#agent" id="_ref_2224"><a href="#agent">agent</a></emu-xref>.</p>
<p>An <emu-xref href="#agent" id="_ref_2225"><a href="#agent">agent</a></emu-xref>'s <emu-xref href="#executing-thread" id="_ref_2226"><a href="#executing-thread">executing thread</a></emu-xref> executes the jobs in the <emu-xref href="#agent" id="_ref_2227"><a href="#agent">agent</a></emu-xref>'s job queues on the <emu-xref href="#agent" id="_ref_2228"><a href="#agent">agent</a></emu-xref>'s execution contexts independently of other agents, except that an <emu-xref href="#executing-thread" id="_ref_2229"><a href="#executing-thread">executing thread</a></emu-xref> may be used as the <emu-xref href="#executing-thread" id="_ref_2230"><a href="#executing-thread">executing thread</a></emu-xref> by multiple agents, provided none of the agents sharing the thread have an <emu-xref href="#agent-record" id="_ref_2231"><a href="#agent-record">Agent Record</a></emu-xref> whose [[CanBlock]] property is <emu-val>true</emu-val>.</p>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>Some web browsers share a single <emu-xref href="#executing-thread" id="_ref_2232"><a href="#executing-thread">executing thread</a></emu-xref> across multiple unrelated tabs of a browser window, for example.</p>
</div></emu-note>
<p>While an <emu-xref href="#agent" id="_ref_2233"><a href="#agent">agent</a></emu-xref>'s <emu-xref href="#executing-thread" id="_ref_2234"><a href="#executing-thread">executing thread</a></emu-xref> executes the jobs in the <emu-xref href="#agent" id="_ref_2235"><a href="#agent">agent</a></emu-xref>'s job queues, the <emu-xref href="#agent" id="_ref_2236"><a href="#agent">agent</a></emu-xref> is the <dfn id="surrounding-agent">surrounding agent</dfn> for the code in those jobs. The code uses the <emu-xref href="#surrounding-agent" id="_ref_2237"><a href="#surrounding-agent">surrounding agent</a></emu-xref> to access the specification level execution objects held within the <emu-xref href="#agent" id="_ref_2238"><a href="#agent">agent</a></emu-xref>: the <emu-xref href="#running-execution-context" id="_ref_2239"><a href="#running-execution-context">running execution context</a></emu-xref>, the <emu-xref href="#execution-context-stack" id="_ref_2240"><a href="#execution-context-stack">execution context stack</a></emu-xref>, the named job queues, and the <emu-xref href="#agent-record" id="_ref_2241"><a href="#agent-record">Agent Record</a></emu-xref>'s fields.</p>
<emu-table id="table-agent-record" caption="Agent Record Fields"><figure><figcaption>Table 26: <emu-xref href="#agent-record" id="_ref_2242"><a href="#agent-record">Agent Record</a></emu-xref> Fields</figcaption>
<table>
<tbody>
<tr>
<th>Field Name</th>
<th>Value</th>
<th>Meaning</th>
</tr>
<tr>
<td>[[LittleEndian]]</td>
<td>Boolean</td>
<td>The default value computed for the <em>isLittleEndian</em> parameter when it is needed by the algorithms <emu-xref aoid="GetValueFromBuffer" id="_ref_2243"><a href="#sec-getvaluefrombuffer">GetValueFromBuffer</a></emu-xref> and <emu-xref aoid="SetValueInBuffer" id="_ref_2244"><a href="#sec-setvalueinbuffer">SetValueInBuffer</a></emu-xref>.
The choice is implementation-dependent and should be the alternative
that is most efficient for the implementation. Once the value has been
observed it cannot change.</td>
</tr>
<tr>
<td>[[CanBlock]]</td>
<td>Boolean</td>
<td>Determines whether the <emu-xref href="#agent" id="_ref_2245"><a href="#agent">agent</a></emu-xref> can block or not.</td>
</tr>
<tr>
<td>[[Signifier]]</td>
<td>Any globally-unique value</td>
<td>Uniquely identifies the <emu-xref href="#agent" id="_ref_2246"><a href="#agent">agent</a></emu-xref> within its <emu-xref href="#sec-agent-clusters" id="_ref_2247"><a href="#sec-agent-clusters">agent cluster</a></emu-xref>.</td>
</tr>
<tr>
<td>[[IsLockFree1]]</td>
<td>Boolean</td>
<td><emu-val>true</emu-val> if atomic operations on one-byte values are lock-free, <emu-val>false</emu-val> otherwise.</td>
</tr>
<tr>
<td>[[IsLockFree2]]</td>
<td>Boolean</td>
<td><emu-val>true</emu-val> if atomic operations on two-byte values are lock-free, <emu-val>false</emu-val> otherwise.</td>
</tr>
<tr>
<td>[[CandidateExecution]]</td>
<td>A <emu-xref href="#sec-candidate-executions" id="_ref_2248"><a href="#sec-candidate-executions">candidate execution</a></emu-xref> <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2249"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref></td>
<td>See the <emu-xref href="#sec-memory-model" id="_ref_2250"><a href="#sec-memory-model">memory model</a></emu-xref>.</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<p>Once the values of [[Signifier]], [[IsLockFree1]], and [[IsLockFree2]] have been observed by any <emu-xref href="#agent" id="_ref_2251"><a href="#agent">agent</a></emu-xref> in the <emu-xref href="#sec-agent-clusters" id="_ref_2252"><a href="#sec-agent-clusters">agent cluster</a></emu-xref> they cannot change.</p>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The values of [[IsLockFree1]] and [[IsLockFree2]] are not
necessarily determined by the hardware, but may also reflect
implementation choices that can vary over time and between ECMAScript
implementations.</p>
<p>There is no [[IsLockFree4]] property: 4-byte atomic operations are always lock-free.</p>
<p>In practice, if an atomic operation is implemented with any
type of lock the operation is not lock-free. Lock-free does not imply
wait-free: there is no upper bound on how many machine steps may be
required to complete a lock-free atomic operation.</p>
<p>That an atomic access of size <em>n</em> is lock-free does not imply anything about the (perceived) atomicity of non-atomic accesses of size <em>n</em>, specifically, non-atomic accesses may still be performed as a sequence of several separate memory accesses. See <emu-xref href="#sec-memory-model-fundamentals" id="_ref_2253"><a href="#sec-memory-model-fundamentals">ReadSharedMemory</a></emu-xref> and <emu-xref href="#sec-memory-model-fundamentals" id="_ref_2254"><a href="#sec-memory-model-fundamentals">WriteSharedMemory</a></emu-xref> for details.</p>
</div></emu-note>
<emu-note><span class="note">Note 3</span><div class="note-contents">
<p>An <emu-xref href="#agent" id="_ref_2255"><a href="#agent">agent</a></emu-xref> is a specification mechanism and need not correspond to any particular artefact of an ECMAScript implementation.</p>
</div></emu-note>
<emu-clause id="sec-agentsignifier" aoid="AgentSignifier">
<h1><span class="secnum">8.7.1</span>AgentSignifier ( )</h1>
<p>The abstract operation AgentSignifier takes no arguments. It performs the following steps:</p>
<emu-alg><ol><li>Let <var>AR</var> be the <emu-xref href="#agent-record" id="_ref_2256"><a href="#agent-record">Agent Record</a></emu-xref> of the <emu-xref href="#surrounding-agent" id="_ref_2257"><a href="#surrounding-agent">surrounding agent</a></emu-xref>.</li><li>Return <var>AR</var>.[[Signifier]].
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-agentcansuspend" aoid="AgentCanSuspend">
<h1><span class="secnum">8.7.2</span>AgentCanSuspend ( )</h1>
<p>The abstract operation AgentCanSuspend takes no arguments. It performs the following steps:</p>
<emu-alg><ol><li>Let <var>AR</var> be the <emu-xref href="#agent-record" id="_ref_2258"><a href="#agent-record">Agent Record</a></emu-xref> of the <emu-xref href="#surrounding-agent" id="_ref_2259"><a href="#surrounding-agent">surrounding agent</a></emu-xref>.</li><li>Return <var>AR</var>.[[CanBlock]].
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>In some environments it may not be reasonable for a given <emu-xref href="#agent" id="_ref_2260"><a href="#agent">agent</a></emu-xref>
to suspend. For example, in a web browser environment, it may be
reasonable to disallow suspending a document's main event handling
thread, while still allowing workers' event handling threads to suspend.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-agent-clusters">
<h1><span class="secnum">8.8</span>Agent Clusters</h1>
<p>An <dfn>agent cluster</dfn> is a maximal set of agents that can communicate by operating on shared memory.</p>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>Programs within different agents may share memory by
unspecified means. At a minimum, the backing memory for
SharedArrayBuffer objects can be shared among the agents in the cluster.</p>
<p>There may be agents that can communicate by message passing that cannot share memory; they are never in the same agent cluster.</p>
</div></emu-note>
<p>Every <emu-xref href="#agent" id="_ref_2261"><a href="#agent">agent</a></emu-xref> belongs to exactly one agent cluster.</p>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The agents in a cluster need not all be alive at some particular point in time. If <emu-xref href="#agent" id="_ref_2262"><a href="#agent">agent</a></emu-xref> <b>A</b> creates another <emu-xref href="#agent" id="_ref_2263"><a href="#agent">agent</a></emu-xref> <b>B</b>, after which <b>A</b> terminates and <b>B</b> creates <emu-xref href="#agent" id="_ref_2264"><a href="#agent">agent</a></emu-xref> <b>C</b>, the three agents are in the same cluster if <b>A</b> could share some memory with <b>B</b> and <b>B</b> could share some memory with <b>C</b>.</p>
</div></emu-note>
<p>All agents within a cluster must have the same value for the [[LittleEndian]] property in their respective <emu-xref href="#agent" id="_ref_2265"><a href="#agent">Agent</a></emu-xref> Records.</p>
<emu-note><span class="note">Note 3</span><div class="note-contents">
<p>If different agents within an agent cluster have different
values of [[LittleEndian]] it becomes hard to use shared memory for
multi-byte data.</p>
</div></emu-note>
<p>All agents within a cluster must have the same values for the [[IsLockFree1]] property in their respective <emu-xref href="#agent" id="_ref_2266"><a href="#agent">Agent</a></emu-xref> Records; similarly for the [[IsLockFree2]] property.</p>
<p>All agents within a cluster must have different values for the [[Signifier]] property in their respective <emu-xref href="#agent" id="_ref_2267"><a href="#agent">Agent</a></emu-xref> Records.</p>
<p>An embedding may deactivate (stop forward progress) or activate (resume forward progress) an <emu-xref href="#agent" id="_ref_2268"><a href="#agent">agent</a></emu-xref> without the <emu-xref href="#agent" id="_ref_2269"><a href="#agent">agent</a></emu-xref>'s
knowledge or cooperation. If the embedding does so, it must not leave
some agents in the cluster active while other agents in the cluster are
deactivated indefinitely.</p>
<emu-note><span class="note">Note 4</span><div class="note-contents">
<p>The purpose of the preceding restriction is to avoid a situation where an <emu-xref href="#agent" id="_ref_2270"><a href="#agent">agent</a></emu-xref> deadlocks or starves because another <emu-xref href="#agent" id="_ref_2271"><a href="#agent">agent</a></emu-xref>
has been deactivated. For example, if an HTML shared worker that has a
lifetime independent of documents in any windows were allowed to share
memory with the dedicated worker of such an independent document, and
the document and its dedicated worker were to be deactivated while the
dedicated worker holds a lock (say, the document is pushed into its
window's history), and the shared worker then tries to acquire the lock,
then the shared worker will be blocked until the dedicated worker is
activated again, if ever. Meanwhile other workers trying to access the
shared worker from other windows will starve.</p>
<p>The implication of the restriction is that it will not be
possible to share memory between agents that don't belong to the same
suspend/wake collective within the embedding.</p>
</div></emu-note>
<p>An embedding may terminate an <emu-xref href="#agent" id="_ref_2272"><a href="#agent">agent</a></emu-xref> without any of the <emu-xref href="#agent" id="_ref_2273"><a href="#agent">agent</a></emu-xref>'s cluster's other agents' prior knowledge or cooperation. If an <emu-xref href="#agent" id="_ref_2274"><a href="#agent">agent</a></emu-xref> is terminated not by programmatic action of its own or of another <emu-xref href="#agent" id="_ref_2275"><a href="#agent">agent</a></emu-xref>
in the cluster but by forces external to the cluster, then the
embedding must choose one of two strategies: Either terminate all the
agents in the cluster, or provide reliable APIs that allow the agents in
the cluster to coordinate so that at least one remaining member of the
cluster will be able to detect the termination, with the termination
data containing enough information to identify the <emu-xref href="#agent" id="_ref_2276"><a href="#agent">agent</a></emu-xref> that was terminated.</p>
<emu-note><span class="note">Note 5</span><div class="note-contents">
<p>Examples of that type of termination are: operating systems or
users terminating agents that are running in separate processes; the
embedding itself terminating an <emu-xref href="#agent" id="_ref_2277"><a href="#agent">agent</a></emu-xref> that is running in-process with the other agents when per-<emu-xref href="#agent" id="_ref_2278"><a href="#agent">agent</a></emu-xref> resource accounting indicates that the <emu-xref href="#agent" id="_ref_2279"><a href="#agent">agent</a></emu-xref> is runaway.</p>
</div></emu-note>
<p>Prior to any evaluation of any ECMAScript code by any <emu-xref href="#agent" id="_ref_2280"><a href="#agent">agent</a></emu-xref> in a cluster, the [[CandidateExecution]] field of the <emu-xref href="#agent-record" id="_ref_2281"><a href="#agent-record">Agent Record</a></emu-xref> for all agents in the cluster is set to the initial <emu-xref href="#sec-candidate-executions" id="_ref_2282"><a href="#sec-candidate-executions">candidate execution</a></emu-xref>. The initial <emu-xref href="#sec-candidate-executions" id="_ref_2283"><a href="#sec-candidate-executions">candidate execution</a></emu-xref> is an <emu-xref href="#sec-candidate-executions" id="_ref_2284"><a href="#sec-candidate-executions">empty candidate execution</a></emu-xref> whose [[EventsRecords]] field is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2285"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing, for each <emu-xref href="#agent" id="_ref_2286"><a href="#agent">agent</a></emu-xref>, an <emu-xref href="#sec-agent-event-records" id="_ref_2287"><a href="#sec-agent-event-records">Agent Events Record</a></emu-xref> whose [[AgentSignifier]] field is that <emu-xref href="#agent" id="_ref_2288"><a href="#agent">agent</a></emu-xref>'s signifier, and whose [[EventList]] and [[AgentSynchronizesWith]] fields are empty Lists.</p>
<emu-note><span class="note">Note 6</span><div class="note-contents">
<p>All agents in an agent cluster share the same <emu-xref href="#sec-candidate-executions" id="_ref_2289"><a href="#sec-candidate-executions">candidate execution</a></emu-xref> in its <emu-xref href="#agent-record" id="_ref_2290"><a href="#agent-record">Agent Record</a></emu-xref>'s [[CandidateExecution]] field. The <emu-xref href="#sec-candidate-executions" id="_ref_2291"><a href="#sec-candidate-executions">candidate execution</a></emu-xref> is a specification mechanism used by the <emu-xref href="#sec-memory-model" id="_ref_2292"><a href="#sec-memory-model">memory model</a></emu-xref>.</p>
</div></emu-note>
<emu-note><span class="note">Note 7</span><div class="note-contents">
<p>An agent cluster is a specification mechanism and need not
correspond to any particular artefact of an ECMAScript implementation.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-forward-progress">
<h1><span class="secnum">8.9</span>Forward Progress</h1>
<p>For an <emu-xref href="#agent" id="_ref_2293"><a href="#agent">agent</a></emu-xref> to <em>make forward progress</em> is for it to perform an evaluation step according to this specification.</p>
<p>An <emu-xref href="#agent" id="_ref_2294"><a href="#agent">agent</a></emu-xref> becomes <em>blocked</em> when its <emu-xref href="#running-execution-context" id="_ref_2295"><a href="#running-execution-context">running execution context</a></emu-xref> waits synchronously and indefinitely for an external event. Only agents whose <emu-xref href="#agent-record" id="_ref_2296"><a href="#agent-record">Agent Record</a></emu-xref>'s [[CanBlock]] property is <emu-val>true</emu-val> can become blocked in this sense. An <em>unblocked</em> <emu-xref href="#agent" id="_ref_2297"><a href="#agent">agent</a></emu-xref> is one that is not blocked.</p>
<p>Implementations must ensure that:</p>
<ul>
<li>every unblocked <emu-xref href="#agent" id="_ref_2298"><a href="#agent">agent</a></emu-xref> with a dedicated <emu-xref href="#executing-thread" id="_ref_2299"><a href="#executing-thread">executing thread</a></emu-xref> eventually makes forward progress</li>
<li>in a set of agents that share an <emu-xref href="#executing-thread" id="_ref_2300"><a href="#executing-thread">executing thread</a></emu-xref>, one <emu-xref href="#agent" id="_ref_2301"><a href="#agent">agent</a></emu-xref> eventually makes forward progress</li>
<li>an <emu-xref href="#agent" id="_ref_2302"><a href="#agent">agent</a></emu-xref> does not cause another <emu-xref href="#agent" id="_ref_2303"><a href="#agent">agent</a></emu-xref> to become blocked except via explicit APIs that provide blocking.</li>
</ul>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>This, along with the liveness guarantee in the <emu-xref href="#sec-memory-model" id="_ref_2304"><a href="#sec-memory-model">memory model</a></emu-xref>, ensures that all <code>"SeqCst"</code> writes eventually become observable to all agents.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-ordinary-and-exotic-objects-behaviours">
<h1><span class="secnum">9</span>Ordinary and Exotic Objects Behaviours</h1>
<emu-clause id="sec-ordinary-object-internal-methods-and-internal-slots">
<h1><span class="secnum">9.1</span>Ordinary Object Internal Methods and Internal Slots</h1>
<p>All ordinary objects have an internal slot called [[Prototype]]. The value of this internal slot is either <emu-val>null</emu-val>
or an object and is used for implementing inheritance. Data properties
of the [[Prototype]] object are inherited (and visible as properties of
the child object) for the purposes of get access, but not for set
access. Accessor properties are inherited for both get access and set
access.</p>
<p>Every ordinary object has a Boolean-valued [[Extensible]]
internal slot which is used to fulfill the extensibility-related
internal method invariants specified in <emu-xref href="#sec-invariants-of-the-essential-internal-methods" id="_ref_184"><a href="#sec-invariants-of-the-essential-internal-methods">6.1.7.3</a></emu-xref>. Namely, once the value of an object's [[Extensible]] internal slot has been set to <emu-val>false</emu-val>,
it is no longer possible to add properties to the object, to modify the
value of the object's [[Prototype]] internal slot, or to subsequently
change the value of [[Extensible]] to <emu-val>true</emu-val>.</p>
<p>In the following algorithm descriptions, assume <var>O</var> is an ordinary object, <var>P</var> is a property key value, <var>V</var> is any <emu-xref href="#sec-ecmascript-language-types" id="_ref_2305"><a href="#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref>, and <var>Desc</var> is a <emu-xref href="#sec-property-descriptor-specification-type" id="_ref_2306"><a href="#sec-property-descriptor-specification-type">Property Descriptor</a></emu-xref> record.</p>
<p>Each ordinary object internal method delegates to a
similarly-named abstract operation. If such an abstract operation
depends on another internal method, then the internal method is invoked
on <var>O</var> rather than calling the similarly-named abstract
operation directly. These semantics ensure that exotic objects have
their overridden internal methods invoked when ordinary object internal
methods are applied to them.</p>
<emu-clause id="sec-ordinary-object-internal-methods-and-internal-slots-getprototypeof">
<h1><span class="secnum">9.1.1</span>[[GetPrototypeOf]] ( )</h1>
<p>When the [[GetPrototypeOf]] internal method of <var>O</var> is called, the following steps are taken:</p>
<emu-alg><ol><li>Return !&nbsp;<emu-xref aoid="OrdinaryGetPrototypeOf" id="_ref_2307"><a href="#sec-ordinarygetprototypeof">OrdinaryGetPrototypeOf</a></emu-xref>(<var>O</var>).
</li></ol></emu-alg>
<emu-clause id="sec-ordinarygetprototypeof" aoid="OrdinaryGetPrototypeOf">
<h1><span class="secnum">9.1.1.1</span>OrdinaryGetPrototypeOf ( <var>O</var> )</h1>
<p>When the abstract operation OrdinaryGetPrototypeOf is called with Object <var>O</var>, the following steps are taken:</p>
<emu-alg><ol><li>Return <var>O</var>.[[Prototype]].
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-ordinary-object-internal-methods-and-internal-slots-setprototypeof-v">
<h1><span class="secnum">9.1.2</span>[[SetPrototypeOf]] ( <var>V</var> )</h1>
<p>When the [[SetPrototypeOf]] internal method of <var>O</var> is called with argument <var>V</var>, the following steps are taken:</p>
<emu-alg><ol><li>Return !&nbsp;<emu-xref aoid="OrdinarySetPrototypeOf" id="_ref_2308"><a href="#sec-ordinarysetprototypeof">OrdinarySetPrototypeOf</a></emu-xref>(<var>O</var>, <var>V</var>).
</li></ol></emu-alg>
<emu-clause id="sec-ordinarysetprototypeof" aoid="OrdinarySetPrototypeOf">
<h1><span class="secnum">9.1.2.1</span>OrdinarySetPrototypeOf ( <var>O</var>, <var>V</var> )</h1>
<p>When the abstract operation OrdinarySetPrototypeOf is called with Object <var>O</var> and value <var>V</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2309"><a href="#assert">Assert</a></emu-xref>: Either <emu-xref aoid="Type" id="_ref_2310"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>V</var>) is Object or <emu-xref aoid="Type" id="_ref_2311"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>V</var>) is Null.</li><li>Let <var>extensible</var> be <var>O</var>.[[Extensible]].</li><li>Let <var>current</var> be <var>O</var>.[[Prototype]].</li><li>If <emu-xref aoid="SameValue" id="_ref_2312"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>V</var>, <var>current</var>) is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>If <var>extensible</var> is <emu-val>false</emu-val>, return <emu-val>false</emu-val>.</li><li>Let <var>p</var> be <var>V</var>.</li><li>Let <var>done</var> be <emu-val>false</emu-val>.</li><li>Repeat, while <var>done</var> is <emu-val>false</emu-val>,<ol><li>If <var>p</var> is <emu-val>null</emu-val>, set <var>done</var> to <emu-val>true</emu-val>.</li><li>Else if <emu-xref aoid="SameValue" id="_ref_2313"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>p</var>, <var>O</var>) is <emu-val>true</emu-val>, return <emu-val>false</emu-val>.</li><li>Else,<ol><li>If <var>p</var>.[[GetPrototypeOf]] is not the ordinary object internal method defined in <emu-xref href="#sec-ordinary-object-internal-methods-and-internal-slots-getprototypeof" id="_ref_185"><a href="#sec-ordinary-object-internal-methods-and-internal-slots-getprototypeof">9.1.1</a></emu-xref>, set <var>done</var> to <emu-val>true</emu-val>.</li><li>Else, set <var>p</var> to <var>p</var>.[[Prototype]].</li></ol></li></ol></li><li>Set <var>O</var>.[[Prototype]] to <var>V</var>.</li><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The loop in step 8 guarantees that there will be no
circularities in any prototype chain that only includes objects that use
the ordinary object definitions for [[GetPrototypeOf]] and
[[SetPrototypeOf]].</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-ordinary-object-internal-methods-and-internal-slots-isextensible">
<h1><span class="secnum">9.1.3</span>[[IsExtensible]] ( )</h1>
<p>When the [[IsExtensible]] internal method of <var>O</var> is called, the following steps are taken:</p>
<emu-alg><ol><li>Return !&nbsp;<emu-xref aoid="OrdinaryIsExtensible" id="_ref_2314"><a href="#sec-ordinaryisextensible">OrdinaryIsExtensible</a></emu-xref>(<var>O</var>).
</li></ol></emu-alg>
<emu-clause id="sec-ordinaryisextensible" aoid="OrdinaryIsExtensible">
<h1><span class="secnum">9.1.3.1</span>OrdinaryIsExtensible ( <var>O</var> )</h1>
<p>When the abstract operation OrdinaryIsExtensible is called with Object <var>O</var>, the following steps are taken:</p>
<emu-alg><ol><li>Return <var>O</var>.[[Extensible]].
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-ordinary-object-internal-methods-and-internal-slots-preventextensions">
<h1><span class="secnum">9.1.4</span>[[PreventExtensions]] ( )</h1>
<p>When the [[PreventExtensions]] internal method of <var>O</var> is called, the following steps are taken:</p>
<emu-alg><ol><li>Return !&nbsp;<emu-xref aoid="OrdinaryPreventExtensions" id="_ref_2315"><a href="#sec-ordinarypreventextensions">OrdinaryPreventExtensions</a></emu-xref>(<var>O</var>).
</li></ol></emu-alg>
<emu-clause id="sec-ordinarypreventextensions" aoid="OrdinaryPreventExtensions">
<h1><span class="secnum">9.1.4.1</span>OrdinaryPreventExtensions ( <var>O</var> )</h1>
<p>When the abstract operation OrdinaryPreventExtensions is called with Object <var>O</var>, the following steps are taken:</p>
<emu-alg><ol><li>Set <var>O</var>.[[Extensible]] to <emu-val>false</emu-val>.</li><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-ordinary-object-internal-methods-and-internal-slots-getownproperty-p">
<h1><span class="secnum">9.1.5</span>[[GetOwnProperty]] ( <var>P</var> )</h1>
<p>When the [[GetOwnProperty]] internal method of <var>O</var> is called with property key <var>P</var>, the following steps are taken:</p>
<emu-alg><ol><li>Return !&nbsp;<emu-xref aoid="OrdinaryGetOwnProperty" id="_ref_2316"><a href="#sec-ordinarygetownproperty">OrdinaryGetOwnProperty</a></emu-xref>(<var>O</var>, <var>P</var>).
</li></ol></emu-alg>
<emu-clause id="sec-ordinarygetownproperty" aoid="OrdinaryGetOwnProperty">
<h1><span class="secnum">9.1.5.1</span>OrdinaryGetOwnProperty ( <var>O</var>, <var>P</var> )</h1>
<p>When the abstract operation OrdinaryGetOwnProperty is called with Object <var>O</var> and with property key <var>P</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2317"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPropertyKey" id="_ref_2318"><a href="#sec-ispropertykey">IsPropertyKey</a></emu-xref>(<var>P</var>) is <emu-val>true</emu-val>.</li><li>If <var>O</var> does not have an own property with key <var>P</var>, return <emu-val>undefined</emu-val>.</li><li>Let <var>D</var> be a newly created <emu-xref href="#sec-property-descriptor-specification-type" id="_ref_2319"><a href="#sec-property-descriptor-specification-type">Property Descriptor</a></emu-xref> with no fields.</li><li>Let <var>X</var> be <var>O</var>'s own property whose key is <var>P</var>.</li><li>If <var>X</var> is a <emu-xref href="#sec-object-type" id="_ref_2320"><a href="#sec-object-type">data property</a></emu-xref>, then<ol><li>Set <var>D</var>.[[Value]] to the value of <var>X</var>'s [[Value]] attribute.</li><li>Set <var>D</var>.[[Writable]] to the value of <var>X</var>'s [[Writable]] attribute.</li></ol></li><li>Else <var>X</var> is an <emu-xref href="#sec-object-type" id="_ref_2321"><a href="#sec-object-type">accessor property</a></emu-xref>,<ol><li>Set <var>D</var>.[[Get]] to the value of <var>X</var>'s [[Get]] attribute.</li><li>Set <var>D</var>.[[Set]] to the value of <var>X</var>'s [[Set]] attribute.</li></ol></li><li>Set <var>D</var>.[[Enumerable]] to the value of <var>X</var>'s [[Enumerable]] attribute.</li><li>Set <var>D</var>.[[Configurable]] to the value of <var>X</var>'s [[Configurable]] attribute.</li><li>Return <var>D</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-ordinary-object-internal-methods-and-internal-slots-defineownproperty-p-desc">
<h1><span class="secnum">9.1.6</span>[[DefineOwnProperty]] ( <var>P</var>, <var>Desc</var> )</h1>
<p>When the [[DefineOwnProperty]] internal method of <var>O</var> is called with property key <var>P</var> and <emu-xref href="#sec-property-descriptor-specification-type" id="_ref_2322"><a href="#sec-property-descriptor-specification-type">Property Descriptor</a></emu-xref> <var>Desc</var>, the following steps are taken:</p>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="OrdinaryDefineOwnProperty" id="_ref_2323"><a href="#sec-ordinarydefineownproperty">OrdinaryDefineOwnProperty</a></emu-xref>(<var>O</var>, <var>P</var>, <var>Desc</var>).
</li></ol></emu-alg>
<emu-clause id="sec-ordinarydefineownproperty" aoid="OrdinaryDefineOwnProperty">
<h1><span class="secnum">9.1.6.1</span>OrdinaryDefineOwnProperty ( <var>O</var>, <var>P</var>, <var>Desc</var> )</h1>
<p>When the abstract operation OrdinaryDefineOwnProperty is called with Object <var>O</var>, property key <var>P</var>, and <emu-xref href="#sec-property-descriptor-specification-type" id="_ref_2324"><a href="#sec-property-descriptor-specification-type">Property Descriptor</a></emu-xref> <var>Desc</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>current</var> be ? <var>O</var>.[[GetOwnProperty]](<var>P</var>).</li><li>Let <var>extensible</var> be ?&nbsp;<emu-xref aoid="IsExtensible" id="_ref_2325"><a href="#sec-isextensible-o">IsExtensible</a></emu-xref>(<var>O</var>).</li><li>Return <emu-xref aoid="ValidateAndApplyPropertyDescriptor" id="_ref_2326"><a href="#sec-validateandapplypropertydescriptor">ValidateAndApplyPropertyDescriptor</a></emu-xref>(<var>O</var>, <var>P</var>, <var>extensible</var>, <var>Desc</var>, <var>current</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-iscompatiblepropertydescriptor" aoid="IsCompatiblePropertyDescriptor">
<h1><span class="secnum">9.1.6.2</span>IsCompatiblePropertyDescriptor ( <var>Extensible</var>, <var>Desc</var>, <var>Current</var> )</h1>
<p>When the abstract operation IsCompatiblePropertyDescriptor is called with Boolean value <var>Extensible</var>, and Property Descriptors <var>Desc</var>, and <var>Current</var>, the following steps are taken:</p>
<emu-alg><ol><li>Return <emu-xref aoid="ValidateAndApplyPropertyDescriptor" id="_ref_2327"><a href="#sec-validateandapplypropertydescriptor">ValidateAndApplyPropertyDescriptor</a></emu-xref>(<emu-val>undefined</emu-val>, <emu-val>undefined</emu-val>, <var>Extensible</var>, <var>Desc</var>, <var>Current</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-validateandapplypropertydescriptor" aoid="ValidateAndApplyPropertyDescriptor">
<h1><span class="secnum">9.1.6.3</span>ValidateAndApplyPropertyDescriptor ( <var>O</var>, <var>P</var>, <var>extensible</var>, <var>Desc</var>, <var>current</var> )</h1>
<p>When the abstract operation ValidateAndApplyPropertyDescriptor is called with Object <var>O</var>, property key <var>P</var>, Boolean value <var>extensible</var>, and Property Descriptors <var>Desc</var>, and <var>current</var>, the following steps are taken:</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>If <emu-val>undefined</emu-val> is passed as <var>O</var>, only validation is performed and no object updates are performed.</p>
</div></emu-note>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2328"><a href="#assert">Assert</a></emu-xref>: If <var>O</var> is not <emu-val>undefined</emu-val>, then <emu-xref aoid="IsPropertyKey" id="_ref_2329"><a href="#sec-ispropertykey">IsPropertyKey</a></emu-xref>(<var>P</var>) is <emu-val>true</emu-val>.</li><li>If <var>current</var> is <emu-val>undefined</emu-val>, then<ol><li>If <var>extensible</var> is <emu-val>false</emu-val>, return <emu-val>false</emu-val>.</li><li><emu-xref href="#assert" id="_ref_2330"><a href="#assert">Assert</a></emu-xref>: <var>extensible</var> is <emu-val>true</emu-val>.</li><li>If <emu-xref aoid="IsGenericDescriptor" id="_ref_2331"><a href="#sec-isgenericdescriptor">IsGenericDescriptor</a></emu-xref>(<var>Desc</var>) is <emu-val>true</emu-val> or <emu-xref aoid="IsDataDescriptor" id="_ref_2332"><a href="#sec-isdatadescriptor">IsDataDescriptor</a></emu-xref>(<var>Desc</var>) is <emu-val>true</emu-val>, then<ol><li>If <var>O</var> is not <emu-val>undefined</emu-val>, create an own <emu-xref href="#sec-object-type" id="_ref_2333"><a href="#sec-object-type">data property</a></emu-xref> named <var>P</var> of object <var>O</var> whose [[Value]], [[Writable]], [[Enumerable]] and [[Configurable]] attribute values are described by <var>Desc</var>. If the value of an attribute field of <var>Desc</var> is absent, the attribute of the newly created property is set to its default value.</li></ol></li><li>Else <var>Desc</var> must be an accessor <emu-xref href="#sec-property-descriptor-specification-type" id="_ref_2334"><a href="#sec-property-descriptor-specification-type">Property Descriptor</a></emu-xref>,<ol><li>If <var>O</var> is not <emu-val>undefined</emu-val>, create an own <emu-xref href="#sec-object-type" id="_ref_2335"><a href="#sec-object-type">accessor property</a></emu-xref> named <var>P</var> of object <var>O</var> whose [[Get]], [[Set]], [[Enumerable]] and [[Configurable]] attribute values are described by <var>Desc</var>. If the value of an attribute field of <var>Desc</var> is absent, the attribute of the newly created property is set to its default value.</li></ol></li><li>Return <emu-val>true</emu-val>.</li></ol></li><li>If every field in <var>Desc</var> is absent, return <emu-val>true</emu-val>.</li><li>If <var>current</var>.[[Configurable]] is <emu-val>false</emu-val>, then<ol><li>If <var>Desc</var>.[[Configurable]] is present and its value is <emu-val>true</emu-val>, return <emu-val>false</emu-val>.</li><li>If <var>Desc</var>.[[Enumerable]] is present and the [[Enumerable]] fields of <var>current</var> and <var>Desc</var> are the Boolean negation of each other, return <emu-val>false</emu-val>.</li></ol></li><li>If <emu-xref aoid="IsGenericDescriptor" id="_ref_2336"><a href="#sec-isgenericdescriptor">IsGenericDescriptor</a></emu-xref>(<var>Desc</var>) is <emu-val>true</emu-val>, no further validation is required.</li><li>Else if <emu-xref aoid="IsDataDescriptor" id="_ref_2337"><a href="#sec-isdatadescriptor">IsDataDescriptor</a></emu-xref>(<var>current</var>) and <emu-xref aoid="IsDataDescriptor" id="_ref_2338"><a href="#sec-isdatadescriptor">IsDataDescriptor</a></emu-xref>(<var>Desc</var>) have different results, then<ol><li>If <var>current</var>.[[Configurable]] is <emu-val>false</emu-val>, return <emu-val>false</emu-val>.</li><li>If <emu-xref aoid="IsDataDescriptor" id="_ref_2339"><a href="#sec-isdatadescriptor">IsDataDescriptor</a></emu-xref>(<var>current</var>) is <emu-val>true</emu-val>, then<ol><li>If <var>O</var> is not <emu-val>undefined</emu-val>, convert the property named <var>P</var> of object <var>O</var> from a <emu-xref href="#sec-object-type" id="_ref_2340"><a href="#sec-object-type">data property</a></emu-xref> to an <emu-xref href="#sec-object-type" id="_ref_2341"><a href="#sec-object-type">accessor property</a></emu-xref>.
Preserve the existing values of the converted property's
[[Configurable]] and [[Enumerable]] attributes and set the rest of the
property's attributes to their default values.</li></ol></li><li>Else,<ol><li>If <var>O</var> is not <emu-val>undefined</emu-val>, convert the property named <var>P</var> of object <var>O</var> from an <emu-xref href="#sec-object-type" id="_ref_2342"><a href="#sec-object-type">accessor property</a></emu-xref> to a <emu-xref href="#sec-object-type" id="_ref_2343"><a href="#sec-object-type">data property</a></emu-xref>.
Preserve the existing values of the converted property's
[[Configurable]] and [[Enumerable]] attributes and set the rest of the
property's attributes to their default values.</li></ol></li></ol></li><li>Else if <emu-xref aoid="IsDataDescriptor" id="_ref_2344"><a href="#sec-isdatadescriptor">IsDataDescriptor</a></emu-xref>(<var>current</var>) and <emu-xref aoid="IsDataDescriptor" id="_ref_2345"><a href="#sec-isdatadescriptor">IsDataDescriptor</a></emu-xref>(<var>Desc</var>) are both <emu-val>true</emu-val>, then<ol><li>If <var>current</var>.[[Configurable]] is <emu-val>false</emu-val> and <var>current</var>.[[Writable]] is <emu-val>false</emu-val>, then<ol><li>If <var>Desc</var>.[[Writable]] is present and <var>Desc</var>.[[Writable]] is <emu-val>true</emu-val>, return <emu-val>false</emu-val>.</li><li>If <var>Desc</var>.[[Value]] is present and <emu-xref aoid="SameValue" id="_ref_2346"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>Desc</var>.[[Value]], <var>current</var>.[[Value]]) is <emu-val>false</emu-val>, return <emu-val>false</emu-val>.</li><li>Return <emu-val>true</emu-val>.</li></ol></li></ol></li><li>Else <emu-xref aoid="IsAccessorDescriptor" id="_ref_2347"><a href="#sec-isaccessordescriptor">IsAccessorDescriptor</a></emu-xref>(<var>current</var>) and <emu-xref aoid="IsAccessorDescriptor" id="_ref_2348"><a href="#sec-isaccessordescriptor">IsAccessorDescriptor</a></emu-xref>(<var>Desc</var>) are both <emu-val>true</emu-val>,<ol><li>If <var>current</var>.[[Configurable]] is <emu-val>false</emu-val>, then<ol><li>If <var>Desc</var>.[[Set]] is present and <emu-xref aoid="SameValue" id="_ref_2349"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>Desc</var>.[[Set]], <var>current</var>.[[Set]]) is <emu-val>false</emu-val>, return <emu-val>false</emu-val>.</li><li>If <var>Desc</var>.[[Get]] is present and <emu-xref aoid="SameValue" id="_ref_2350"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>Desc</var>.[[Get]], <var>current</var>.[[Get]]) is <emu-val>false</emu-val>, return <emu-val>false</emu-val>.</li><li>Return <emu-val>true</emu-val>.</li></ol></li></ol></li><li>If <var>O</var> is not <emu-val>undefined</emu-val>, then<ol><li>For each field of <var>Desc</var> that is present, set the corresponding attribute of the property named <var>P</var> of object <var>O</var> to the value of the field.</li></ol></li><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-ordinary-object-internal-methods-and-internal-slots-hasproperty-p">
<h1><span class="secnum">9.1.7</span>[[HasProperty]] ( <var>P</var> )</h1>
<p>When the [[HasProperty]] internal method of <var>O</var> is called with property key <var>P</var>, the following steps are taken:</p>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="OrdinaryHasProperty" id="_ref_2351"><a href="#sec-ordinaryhasproperty">OrdinaryHasProperty</a></emu-xref>(<var>O</var>, <var>P</var>).
</li></ol></emu-alg>
<emu-clause id="sec-ordinaryhasproperty" aoid="OrdinaryHasProperty">
<h1><span class="secnum">9.1.7.1</span>OrdinaryHasProperty ( <var>O</var>, <var>P</var> )</h1>
<p>When the abstract operation OrdinaryHasProperty is called with Object <var>O</var> and with property key <var>P</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2352"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPropertyKey" id="_ref_2353"><a href="#sec-ispropertykey">IsPropertyKey</a></emu-xref>(<var>P</var>) is <emu-val>true</emu-val>.</li><li>Let <var>hasOwn</var> be ? <var>O</var>.[[GetOwnProperty]](<var>P</var>).</li><li>If <var>hasOwn</var> is not <emu-val>undefined</emu-val>, return <emu-val>true</emu-val>.</li><li>Let <var>parent</var> be ? <var>O</var>.[[GetPrototypeOf]]().</li><li>If <var>parent</var> is not <emu-val>null</emu-val>, then<ol><li>Return ? <var>parent</var>.[[HasProperty]](<var>P</var>).</li></ol></li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-ordinary-object-internal-methods-and-internal-slots-get-p-receiver">
<h1><span class="secnum">9.1.8</span>[[Get]] ( <var>P</var>, <var>Receiver</var> )</h1>
<p>When the [[Get]] internal method of <var>O</var> is called with property key <var>P</var> and <emu-xref href="#sec-ecmascript-language-types" id="_ref_2354"><a href="#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref> <var>Receiver</var>, the following steps are taken:</p>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="OrdinaryGet" id="_ref_2355"><a href="#sec-ordinaryget">OrdinaryGet</a></emu-xref>(<var>O</var>, <var>P</var>, <var>Receiver</var>).
</li></ol></emu-alg>
<emu-clause id="sec-ordinaryget" aoid="OrdinaryGet">
<h1><span class="secnum">9.1.8.1</span>OrdinaryGet ( <var>O</var>, <var>P</var>, <var>Receiver</var> )</h1>
<p>When the abstract operation OrdinaryGet is called with Object <var>O</var>, property key <var>P</var>, and <emu-xref href="#sec-ecmascript-language-types" id="_ref_2356"><a href="#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref> <var>Receiver</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2357"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPropertyKey" id="_ref_2358"><a href="#sec-ispropertykey">IsPropertyKey</a></emu-xref>(<var>P</var>) is <emu-val>true</emu-val>.</li><li>Let <var>desc</var> be ? <var>O</var>.[[GetOwnProperty]](<var>P</var>).</li><li>If <var>desc</var> is <emu-val>undefined</emu-val>, then<ol><li>Let <var>parent</var> be ? <var>O</var>.[[GetPrototypeOf]]().</li><li>If <var>parent</var> is <emu-val>null</emu-val>, return <emu-val>undefined</emu-val>.</li><li>Return ? <var>parent</var>.[[Get]](<var>P</var>, <var>Receiver</var>).</li></ol></li><li>If <emu-xref aoid="IsDataDescriptor" id="_ref_2359"><a href="#sec-isdatadescriptor">IsDataDescriptor</a></emu-xref>(<var>desc</var>) is <emu-val>true</emu-val>, return <var>desc</var>.[[Value]].</li><li><emu-xref href="#assert" id="_ref_2360"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsAccessorDescriptor" id="_ref_2361"><a href="#sec-isaccessordescriptor">IsAccessorDescriptor</a></emu-xref>(<var>desc</var>) is <emu-val>true</emu-val>.</li><li>Let <var>getter</var> be <var>desc</var>.[[Get]].</li><li>If <var>getter</var> is <emu-val>undefined</emu-val>, return <emu-val>undefined</emu-val>.</li><li>Return ?&nbsp;<emu-xref aoid="Call" id="_ref_2362"><a href="#sec-call">Call</a></emu-xref>(<var>getter</var>, <var>Receiver</var>).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-ordinary-object-internal-methods-and-internal-slots-set-p-v-receiver">
<h1><span class="secnum">9.1.9</span>[[Set]] ( <var>P</var>, <var>V</var>, <var>Receiver</var> )</h1>
<p>When the [[Set]] internal method of <var>O</var> is called with property key <var>P</var>, value <var>V</var>, and <emu-xref href="#sec-ecmascript-language-types" id="_ref_2363"><a href="#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref> <var>Receiver</var>, the following steps are taken:</p>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="OrdinarySet" id="_ref_2364"><a href="#sec-ordinaryset">OrdinarySet</a></emu-xref>(<var>O</var>, <var>P</var>, <var>V</var>, <var>Receiver</var>).
</li></ol></emu-alg>
<emu-clause id="sec-ordinaryset" aoid="OrdinarySet">
<h1><span class="secnum">9.1.9.1</span>OrdinarySet ( <var>O</var>, <var>P</var>, <var>V</var>, <var>Receiver</var> )</h1>
<p>When the abstract operation OrdinarySet is called with Object <var>O</var>, property key <var>P</var>, value <var>V</var>, and <emu-xref href="#sec-ecmascript-language-types" id="_ref_2365"><a href="#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref> <var>Receiver</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2366"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPropertyKey" id="_ref_2367"><a href="#sec-ispropertykey">IsPropertyKey</a></emu-xref>(<var>P</var>) is <emu-val>true</emu-val>.</li><li>Let <var>ownDesc</var> be ? <var>O</var>.[[GetOwnProperty]](<var>P</var>).</li><li>Return <emu-xref aoid="OrdinarySetWithOwnDescriptor" id="_ref_2368"><a href="#sec-ordinarysetwithowndescriptor">OrdinarySetWithOwnDescriptor</a></emu-xref>(<var>O</var>, <var>P</var>, <var>V</var>, <var>Receiver</var>, <var>ownDesc</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-ordinarysetwithowndescriptor" aoid="OrdinarySetWithOwnDescriptor">
<h1><span class="secnum">9.1.9.2</span>OrdinarySetWithOwnDescriptor ( <var>O</var>, <var>P</var>, <var>V</var>, <var>Receiver</var>, <var>ownDesc</var> )</h1>
<p>When the abstract operation OrdinarySetWithOwnDescriptor is called with Object <var>O</var>, property key <var>P</var>, value <var>V</var>, <emu-xref href="#sec-ecmascript-language-types" id="_ref_2369"><a href="#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref> <var>Receiver</var>, and <emu-xref href="#sec-property-descriptor-specification-type" id="_ref_2370"><a href="#sec-property-descriptor-specification-type">Property Descriptor</a></emu-xref> (or <emu-val>undefined</emu-val>) <var>ownDesc</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2371"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPropertyKey" id="_ref_2372"><a href="#sec-ispropertykey">IsPropertyKey</a></emu-xref>(<var>P</var>) is <emu-val>true</emu-val>.</li><li>If <var>ownDesc</var> is <emu-val>undefined</emu-val>, then<ol><li>Let <var>parent</var> be ? <var>O</var>.[[GetPrototypeOf]]().</li><li>If <var>parent</var> is not <emu-val>null</emu-val>, then<ol><li>Return ? <var>parent</var>.[[Set]](<var>P</var>, <var>V</var>, <var>Receiver</var>).</li></ol></li><li>Else,<ol><li>Set <var>ownDesc</var> to the PropertyDescriptor { [[Value]]: <emu-val>undefined</emu-val>, [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>true</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</li></ol></li></ol></li><li>If <emu-xref aoid="IsDataDescriptor" id="_ref_2373"><a href="#sec-isdatadescriptor">IsDataDescriptor</a></emu-xref>(<var>ownDesc</var>) is <emu-val>true</emu-val>, then<ol><li>If <var>ownDesc</var>.[[Writable]] is <emu-val>false</emu-val>, return <emu-val>false</emu-val>.</li><li>If <emu-xref aoid="Type" id="_ref_2374"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>Receiver</var>) is not Object, return <emu-val>false</emu-val>.</li><li>Let <var>existingDescriptor</var> be ? <var>Receiver</var>.[[GetOwnProperty]](<var>P</var>).</li><li>If <var>existingDescriptor</var> is not <emu-val>undefined</emu-val>, then<ol><li>If <emu-xref aoid="IsAccessorDescriptor" id="_ref_2375"><a href="#sec-isaccessordescriptor">IsAccessorDescriptor</a></emu-xref>(<var>existingDescriptor</var>) is <emu-val>true</emu-val>, return <emu-val>false</emu-val>.</li><li>If <var>existingDescriptor</var>.[[Writable]] is <emu-val>false</emu-val>, return <emu-val>false</emu-val>.</li><li>Let <var>valueDesc</var> be the PropertyDescriptor { [[Value]]: <var>V</var> }.</li><li>Return ? <var>Receiver</var>.[[DefineOwnProperty]](<var>P</var>, <var>valueDesc</var>).</li></ol></li><li>Else <var>Receiver</var> does not currently have a property <var>P</var>,<ol><li>Return ?&nbsp;<emu-xref aoid="CreateDataProperty" id="_ref_2376"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>Receiver</var>, <var>P</var>, <var>V</var>).</li></ol></li></ol></li><li><emu-xref href="#assert" id="_ref_2377"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsAccessorDescriptor" id="_ref_2378"><a href="#sec-isaccessordescriptor">IsAccessorDescriptor</a></emu-xref>(<var>ownDesc</var>) is <emu-val>true</emu-val>.</li><li>Let <var>setter</var> be <var>ownDesc</var>.[[Set]].</li><li>If <var>setter</var> is <emu-val>undefined</emu-val>, return <emu-val>false</emu-val>.</li><li>Perform ?&nbsp;<emu-xref aoid="Call" id="_ref_2379"><a href="#sec-call">Call</a></emu-xref>(<var>setter</var>, <var>Receiver</var>, « <var>V</var> »).</li><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-ordinary-object-internal-methods-and-internal-slots-delete-p">
<h1><span class="secnum">9.1.10</span>[[Delete]] ( <var>P</var> )</h1>
<p>When the [[Delete]] internal method of <var>O</var> is called with property key <var>P</var>, the following steps are taken:</p>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="OrdinaryDelete" id="_ref_2380"><a href="#sec-ordinarydelete">OrdinaryDelete</a></emu-xref>(<var>O</var>, <var>P</var>).
</li></ol></emu-alg>
<emu-clause id="sec-ordinarydelete" aoid="OrdinaryDelete">
<h1><span class="secnum">9.1.10.1</span>OrdinaryDelete ( <var>O</var>, <var>P</var> )</h1>
<p>When the abstract operation OrdinaryDelete is called with Object <var>O</var> and property key <var>P</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2381"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPropertyKey" id="_ref_2382"><a href="#sec-ispropertykey">IsPropertyKey</a></emu-xref>(<var>P</var>) is <emu-val>true</emu-val>.</li><li>Let <var>desc</var> be ? <var>O</var>.[[GetOwnProperty]](<var>P</var>).</li><li>If <var>desc</var> is <emu-val>undefined</emu-val>, return <emu-val>true</emu-val>.</li><li>If <var>desc</var>.[[Configurable]] is <emu-val>true</emu-val>, then<ol><li>Remove the own property with name <var>P</var> from <var>O</var>.</li><li>Return <emu-val>true</emu-val>.</li></ol></li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-ordinary-object-internal-methods-and-internal-slots-ownpropertykeys">
<h1><span class="secnum">9.1.11</span>[[OwnPropertyKeys]] ( )</h1>
<p>When the [[OwnPropertyKeys]] internal method of <var>O</var> is called, the following steps are taken:</p>
<emu-alg><ol><li>Return !&nbsp;<emu-xref aoid="OrdinaryOwnPropertyKeys" id="_ref_2383"><a href="#sec-ordinaryownpropertykeys">OrdinaryOwnPropertyKeys</a></emu-xref>(<var>O</var>).
</li></ol></emu-alg>
<emu-clause id="sec-ordinaryownpropertykeys" aoid="OrdinaryOwnPropertyKeys">
<h1><span class="secnum">9.1.11.1</span>OrdinaryOwnPropertyKeys ( <var>O</var> )</h1>
<p>When the abstract operation OrdinaryOwnPropertyKeys is called with Object <var>O</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>keys</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2384"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>For each own property key <var>P</var> of <var>O</var> that is an <emu-xref href="#array-index" id="_ref_2385"><a href="#array-index">array index</a></emu-xref>, in ascending numeric index order, do<ol><li>Add <var>P</var> as the last element of <var>keys</var>.</li></ol></li><li>For each own property key <var>P</var> of <var>O</var> that is a String but is not an <emu-xref href="#array-index" id="_ref_2386"><a href="#array-index">array index</a></emu-xref>, in ascending chronological order of property creation, do<ol><li>Add <var>P</var> as the last element of <var>keys</var>.</li></ol></li><li>For each own property key <var>P</var> of <var>O</var> that is a Symbol, in ascending chronological order of property creation, do<ol><li>Add <var>P</var> as the last element of <var>keys</var>.</li></ol></li><li>Return <var>keys</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-objectcreate" aoid="ObjectCreate">
<h1><span class="secnum">9.1.12</span>ObjectCreate ( <var>proto</var> [ , <var>internalSlotsList</var> ] )</h1>
<p>The abstract operation ObjectCreate with argument <var>proto</var> (an object or null) is used to specify the runtime creation of new ordinary objects. The optional argument <var>internalSlotsList</var> is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2387"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of the names of additional internal slots that must be defined as part of the object. If the list is not provided, a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2388"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> is used. This abstract operation performs the following steps:</p>
<emu-alg><ol><li>If <var>internalSlotsList</var> is not present, set <var>internalSlotsList</var> to a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2389"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>obj</var> be a newly created object with an internal slot for each name in <var>internalSlotsList</var>.</li><li>Set <var>obj</var>'s essential internal methods to the default ordinary object definitions specified in <emu-xref href="#sec-ordinary-object-internal-methods-and-internal-slots" id="_ref_186"><a href="#sec-ordinary-object-internal-methods-and-internal-slots">9.1</a></emu-xref>.</li><li>Set <var>obj</var>.[[Prototype]] to <var>proto</var>.</li><li>Set <var>obj</var>.[[Extensible]] to <emu-val>true</emu-val>.</li><li>Return <var>obj</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-ordinarycreatefromconstructor" aoid="OrdinaryCreateFromConstructor">
<h1><span class="secnum">9.1.13</span>OrdinaryCreateFromConstructor ( <var>constructor</var>, <var>intrinsicDefaultProto</var> [ , <var>internalSlotsList</var> ] )</h1>
<p>The abstract operation OrdinaryCreateFromConstructor creates an ordinary object whose [[Prototype]] value is retrieved from a <emu-xref href="#constructor" id="_ref_2390"><a href="#constructor">constructor</a></emu-xref>'s <code>prototype</code> property, if it exists. Otherwise the intrinsic named by <var>intrinsicDefaultProto</var> is used for [[Prototype]]. The optional <var>internalSlotsList</var> is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2391"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of the names of additional internal slots that must be defined as part of the object. If the list is not provided, a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2392"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> is used. This abstract operation performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2393"><a href="#assert">Assert</a></emu-xref>: <var>intrinsicDefaultProto</var>
is a String value that is this specification's name of an intrinsic
object. The corresponding object must be an intrinsic that is intended
to be used as the [[Prototype]] value of an object.</li><li>Let <var>proto</var> be ?&nbsp;<emu-xref aoid="GetPrototypeFromConstructor" id="_ref_2394"><a href="#sec-getprototypefromconstructor">GetPrototypeFromConstructor</a></emu-xref>(<var>constructor</var>, <var>intrinsicDefaultProto</var>).</li><li>Return <emu-xref aoid="ObjectCreate" id="_ref_2395"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<var>proto</var>, <var>internalSlotsList</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-getprototypefromconstructor" aoid="GetPrototypeFromConstructor">
<h1><span class="secnum">9.1.14</span>GetPrototypeFromConstructor ( <var>constructor</var>, <var>intrinsicDefaultProto</var> )</h1>
<p>The abstract operation GetPrototypeFromConstructor determines
the [[Prototype]] value that should be used to create an object
corresponding to a specific <emu-xref href="#constructor" id="_ref_2396"><a href="#constructor">constructor</a></emu-xref>. The value is retrieved from the <emu-xref href="#constructor" id="_ref_2397"><a href="#constructor">constructor</a></emu-xref>'s <code>prototype</code> property, if it exists. Otherwise the intrinsic named by <var>intrinsicDefaultProto</var> is used for [[Prototype]]. This abstract operation performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2398"><a href="#assert">Assert</a></emu-xref>: <var>intrinsicDefaultProto</var>
is a String value that is this specification's name of an intrinsic
object. The corresponding object must be an intrinsic that is intended
to be used as the [[Prototype]] value of an object.</li><li><emu-xref href="#assert" id="_ref_2399"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsCallable" id="_ref_2400"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>constructor</var>) is <emu-val>true</emu-val>.</li><li>Let <var>proto</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_2401"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>constructor</var>, <code>"prototype"</code>).</li><li>If <emu-xref aoid="Type" id="_ref_2402"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>proto</var>) is not Object, then<ol><li>Let <var>realm</var> be ?&nbsp;<emu-xref aoid="GetFunctionRealm" id="_ref_2403"><a href="#sec-getfunctionrealm">GetFunctionRealm</a></emu-xref>(<var>constructor</var>).</li><li>Set <var>proto</var> to <var>realm</var>'s intrinsic object named <var>intrinsicDefaultProto</var>.</li></ol></li><li>Return <var>proto</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>If <var>constructor</var> does not supply a [[Prototype]] value, the default value that is used is obtained from the <emu-xref href="#realm" id="_ref_2404"><a href="#realm">realm</a></emu-xref> of the <var>constructor</var> function rather than from the <emu-xref href="#running-execution-context" id="_ref_2405"><a href="#running-execution-context">running execution context</a></emu-xref>.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-ecmascript-function-objects">
<h1><span class="secnum">9.2</span>ECMAScript Function Objects</h1>
<p>ECMAScript function objects encapsulate parameterized ECMAScript
code closed over a lexical environment and support the dynamic
evaluation of that code. An ECMAScript <emu-xref href="#function-object" id="_ref_2406"><a href="#function-object">function object</a></emu-xref>
is an ordinary object and has the same internal slots and the same
internal methods as other ordinary objects. The code of an ECMAScript <emu-xref href="#function-object" id="_ref_2407"><a href="#function-object">function object</a></emu-xref> may be either <emu-xref href="#sec-strict-mode-code" id="_ref_2408"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref> (<emu-xref href="#sec-strict-mode-code" id="_ref_187"><a href="#sec-strict-mode-code">10.2.1</a></emu-xref>) or <emu-xref href="#non-strict-code" id="_ref_2409"><a href="#non-strict-code">non-strict code</a></emu-xref>. An ECMAScript <emu-xref href="#function-object" id="_ref_2410"><a href="#function-object">function object</a></emu-xref> whose code is <emu-xref href="#sec-strict-mode-code" id="_ref_2411"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref> is called a <dfn id="strict-function">strict function</dfn>. One whose code is not <emu-xref href="#sec-strict-mode-code" id="_ref_2412"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref> is called a <dfn id="non-strict-function">non-strict function</dfn>.</p>
<p>ECMAScript function objects have the additional internal slots listed in <emu-xref href="#table-27" id="_ref_188"><a href="#table-27">Table 27</a></emu-xref>.</p>
<emu-table id="table-27" caption="Internal Slots of ECMAScript Function Objects"><figure><figcaption>Table 27: Internal Slots of ECMAScript Function Objects</figcaption>
<table>
<tbody>
<tr>
<th>
Internal Slot
</th>
<th>
Type
</th>
<th>
Description
</th>
</tr>
<tr>
<td>
[[Environment]]
</td>
<td>
<emu-xref href="#sec-lexical-environments" id="_ref_2413"><a href="#sec-lexical-environments">Lexical Environment</a></emu-xref>
</td>
<td>
The <emu-xref href="#sec-lexical-environments" id="_ref_2414"><a href="#sec-lexical-environments">Lexical Environment</a></emu-xref> that the function was closed over. Used as the outer environment when evaluating the code of the function.
</td>
</tr>
<tr>
<td>
[[FormalParameters]]
</td>
<td>
<emu-xref href="#sec-syntactic-grammar" id="_ref_2415"><a href="#sec-syntactic-grammar">Parse Node</a></emu-xref>
</td>
<td>
The root parse node of the source text that defines the function's formal parameter list.
</td>
</tr>
<tr>
<td>
[[FunctionKind]]
</td>
<td>
String
</td>
<td>
Either <code>"normal"</code>, <code>"classConstructor"</code>, <code>"generator"</code>, <code>"async"</code>, or <code>"async generator"</code>.
</td>
</tr>
<tr>
<td>
[[ECMAScriptCode]]
</td>
<td>
<emu-xref href="#sec-syntactic-grammar" id="_ref_2416"><a href="#sec-syntactic-grammar">Parse Node</a></emu-xref>
</td>
<td>
The root parse node of the source text that defines the function's body.
</td>
</tr>
<tr>
<td>
[[ConstructorKind]]
</td>
<td>
String
</td>
<td>
Either <code>"base"</code> or <code>"derived"</code>.
</td>
</tr>
<tr>
<td>
[[Realm]]
</td>
<td>
<emu-xref href="#realm-record" id="_ref_2417"><a href="#realm-record">Realm Record</a></emu-xref>
</td>
<td>
The <emu-xref href="#realm" id="_ref_2418"><a href="#realm">realm</a></emu-xref> in which the function was created and which provides any intrinsic objects that are accessed when evaluating the function.
</td>
</tr>
<tr>
<td>
[[ScriptOrModule]]
</td>
<td>
<emu-xref href="#script-record" id="_ref_2419"><a href="#script-record">Script Record</a></emu-xref> or <emu-xref href="#sec-abstract-module-records" id="_ref_2420"><a href="#sec-abstract-module-records">Module Record</a></emu-xref>
</td>
<td>
The script or module in which the function was created.
</td>
</tr>
<tr>
<td>
[[ThisMode]]
</td>
<td>
(lexical, strict, global)
</td>
<td>
Defines how <code>this</code> references are interpreted within the formal parameters and code body of the function. <emu-const>lexical</emu-const> means that <code>this</code> refers to the <emu-val>this</emu-val> value of a lexically enclosing function. <emu-const>strict</emu-const> means that the <emu-val>this</emu-val> value is used exactly as provided by an invocation of the function. <emu-const>global</emu-const> means that a <emu-val>this</emu-val> value of <emu-val>undefined</emu-val> is interpreted as a reference to the <emu-xref href="#sec-global-object" id="_ref_2421"><a href="#sec-global-object">global object</a></emu-xref>.
</td>
</tr>
<tr>
<td>
[[Strict]]
</td>
<td>
Boolean
</td>
<td>
<emu-val>true</emu-val> if this is a <emu-xref href="#strict-function" id="_ref_2422"><a href="#strict-function">strict function</a></emu-xref>, <emu-val>false</emu-val> if this is a <emu-xref href="#non-strict-function" id="_ref_2423"><a href="#non-strict-function">non-strict function</a></emu-xref>.
</td>
</tr>
<tr>
<td>
[[HomeObject]]
</td>
<td>
Object
</td>
<td>
If the function uses <code>super</code>, this is the object whose [[GetPrototypeOf]] provides the object where <code>super</code> property lookups begin.
</td>
</tr>
<tr>
<td>
[[SourceText]]
</td>
<td>
String
</td>
<td>
The <emu-xref href="#sec-source-text" id="_ref_189"><a href="#sec-source-text">source text</a></emu-xref> that defines the function.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<p>All ECMAScript function objects have the [[Call]] internal method
defined here. ECMAScript functions that are also constructors in
addition have the [[Construct]] internal method.</p>
<emu-clause id="sec-ecmascript-function-objects-call-thisargument-argumentslist">
<h1><span class="secnum">9.2.1</span>[[Call]] ( <var>thisArgument</var>, <var>argumentsList</var> )</h1>
<p>The [[Call]] internal method for an ECMAScript <emu-xref href="#function-object" id="_ref_2424"><a href="#function-object">function object</a></emu-xref> <var>F</var> is called with parameters <var>thisArgument</var> and <var>argumentsList</var>, a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2425"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of ECMAScript language values. The following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2426"><a href="#assert">Assert</a></emu-xref>: <var>F</var> is an ECMAScript <emu-xref href="#function-object" id="_ref_2427"><a href="#function-object">function object</a></emu-xref>.</li><li>If <var>F</var>.[[FunctionKind]] is <code>"classConstructor"</code>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>callerContext</var> be the <emu-xref href="#running-execution-context" id="_ref_2428"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Let <var>calleeContext</var> be <emu-xref aoid="PrepareForOrdinaryCall" id="_ref_2429"><a href="#sec-prepareforordinarycall">PrepareForOrdinaryCall</a></emu-xref>(<var>F</var>, <emu-val>undefined</emu-val>).</li><li><emu-xref href="#assert" id="_ref_2430"><a href="#assert">Assert</a></emu-xref>: <var>calleeContext</var> is now the <emu-xref href="#running-execution-context" id="_ref_2431"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Perform <emu-xref aoid="OrdinaryCallBindThis" id="_ref_2432"><a href="#sec-ordinarycallbindthis">OrdinaryCallBindThis</a></emu-xref>(<var>F</var>, <var>calleeContext</var>, <var>thisArgument</var>).</li><li>Let <var>result</var> be <emu-xref aoid="OrdinaryCallEvaluateBody" id="_ref_2433"><a href="#sec-ordinarycallevaluatebody">OrdinaryCallEvaluateBody</a></emu-xref>(<var>F</var>, <var>argumentsList</var>).</li><li>Remove <var>calleeContext</var> from the <emu-xref href="#execution-context-stack" id="_ref_2434"><a href="#execution-context-stack">execution context stack</a></emu-xref> and restore <var>callerContext</var> as the <emu-xref href="#running-execution-context" id="_ref_2435"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>If <var>result</var>.[[Type]] is <emu-const>return</emu-const>, return <emu-xref aoid="NormalCompletion" id="_ref_2436"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<var>result</var>.[[Value]]).</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_2437"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>result</var>).</li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_2438"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-val>undefined</emu-val>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>When <var>calleeContext</var> is removed from the <emu-xref href="#execution-context-stack" id="_ref_2439"><a href="#execution-context-stack">execution context stack</a></emu-xref> in step 8 it must not be destroyed if it is suspended and retained for later resumption by an accessible generator object.</p>
</div></emu-note>
<emu-clause id="sec-prepareforordinarycall" aoid="PrepareForOrdinaryCall">
<h1><span class="secnum">9.2.1.1</span>PrepareForOrdinaryCall ( <var>F</var>, <var>newTarget</var> )</h1>
<p>When the abstract operation PrepareForOrdinaryCall is called with <emu-xref href="#function-object" id="_ref_2440"><a href="#function-object">function object</a></emu-xref> <var>F</var> and <emu-xref href="#sec-ecmascript-language-types" id="_ref_2441"><a href="#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref> <var>newTarget</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2442"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_2443"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>newTarget</var>) is Undefined or Object.</li><li>Let <var>callerContext</var> be the <emu-xref href="#running-execution-context" id="_ref_2444"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Let <var>calleeContext</var> be a new ECMAScript code <emu-xref href="#sec-execution-contexts" id="_ref_2445"><a href="#sec-execution-contexts">execution context</a></emu-xref>.</li><li>Set the Function of <var>calleeContext</var> to <var>F</var>.</li><li>Let <var>calleeRealm</var> be <var>F</var>.[[Realm]].</li><li>Set the <emu-xref href="#realm" id="_ref_2446"><a href="#realm">Realm</a></emu-xref> of <var>calleeContext</var> to <var>calleeRealm</var>.</li><li>Set the ScriptOrModule of <var>calleeContext</var> to <var>F</var>.[[ScriptOrModule]].</li><li>Let <var>localEnv</var> be <emu-xref aoid="NewFunctionEnvironment" id="_ref_2447"><a href="#sec-newfunctionenvironment">NewFunctionEnvironment</a></emu-xref>(<var>F</var>, <var>newTarget</var>).</li><li>Set the LexicalEnvironment of <var>calleeContext</var> to <var>localEnv</var>.</li><li>Set the VariableEnvironment of <var>calleeContext</var> to <var>localEnv</var>.</li><li>If <var>callerContext</var> is not already suspended, suspend <var>callerContext</var>.</li><li>Push <var>calleeContext</var> onto the <emu-xref href="#execution-context-stack" id="_ref_2448"><a href="#execution-context-stack">execution context stack</a></emu-xref>; <var>calleeContext</var> is now the <emu-xref href="#running-execution-context" id="_ref_2449"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>NOTE: Any exception objects produced after this point are associated with <var>calleeRealm</var>.</li><li>Return <var>calleeContext</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-ordinarycallbindthis" aoid="OrdinaryCallBindThis">
<h1><span class="secnum">9.2.1.2</span>OrdinaryCallBindThis ( <var>F</var>, <var>calleeContext</var>, <var>thisArgument</var> )</h1>
<p>When the abstract operation OrdinaryCallBindThis is called with <emu-xref href="#function-object" id="_ref_2450"><a href="#function-object">function object</a></emu-xref> <var>F</var>, <emu-xref href="#sec-execution-contexts" id="_ref_2451"><a href="#sec-execution-contexts">execution context</a></emu-xref> <var>calleeContext</var>, and ECMAScript value <var>thisArgument</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>thisMode</var> be <var>F</var>.[[ThisMode]].</li><li>If <var>thisMode</var> is <emu-const>lexical</emu-const>, return <emu-xref aoid="NormalCompletion" id="_ref_2452"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-val>undefined</emu-val>).</li><li>Let <var>calleeRealm</var> be <var>F</var>.[[Realm]].</li><li>Let <var>localEnv</var> be the LexicalEnvironment of <var>calleeContext</var>.</li><li>If <var>thisMode</var> is <emu-const>strict</emu-const>, let <var>thisValue</var> be <var>thisArgument</var>.</li><li>Else,<ol><li>If <var>thisArgument</var> is <emu-val>undefined</emu-val> or <emu-val>null</emu-val>, then<ol><li>Let <var>globalEnv</var> be <var>calleeRealm</var>.[[GlobalEnv]].</li><li>Let <var>globalEnvRec</var> be <var>globalEnv</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_2453"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref>.</li><li><emu-xref href="#assert" id="_ref_2454"><a href="#assert">Assert</a></emu-xref>: <var>globalEnvRec</var> is a global <emu-xref href="#sec-environment-records" id="_ref_2455"><a href="#sec-environment-records">Environment Record</a></emu-xref>.</li><li>Let <var>thisValue</var> be <var>globalEnvRec</var>.[[GlobalThisValue]].</li></ol></li><li>Else,<ol><li>Let <var>thisValue</var> be !&nbsp;<emu-xref aoid="ToObject" id="_ref_2456"><a href="#sec-toobject">ToObject</a></emu-xref>(<var>thisArgument</var>).</li><li>NOTE: <emu-xref aoid="ToObject" id="_ref_2457"><a href="#sec-toobject">ToObject</a></emu-xref> produces wrapper objects using <var>calleeRealm</var>.</li></ol></li></ol></li><li>Let <var>envRec</var> be <var>localEnv</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_2458"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref>.</li><li><emu-xref href="#assert" id="_ref_2459"><a href="#assert">Assert</a></emu-xref>: <var>envRec</var> is a <emu-xref href="#sec-function-environment-records" id="_ref_2460"><a href="#sec-function-environment-records">function Environment Record</a></emu-xref>.</li><li><emu-xref href="#assert" id="_ref_2461"><a href="#assert">Assert</a></emu-xref>: The next step never returns an <emu-xref href="#sec-completion-record-specification-type" id="_ref_2462"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref> because <var>envRec</var>.[[ThisBindingStatus]] is not <code>"initialized"</code>.</li><li>Return <var>envRec</var>.BindThisValue(<var>thisValue</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-ordinarycallevaluatebody" aoid="OrdinaryCallEvaluateBody">
<h1><span class="secnum">9.2.1.3</span>OrdinaryCallEvaluateBody ( <var>F</var>, <var>argumentsList</var> )</h1>
<p>When the abstract operation OrdinaryCallEvaluateBody is called with <emu-xref href="#function-object" id="_ref_2463"><a href="#function-object">function object</a></emu-xref> <var>F</var> and <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2464"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> <var>argumentsList</var>, the following steps are taken:</p>
<emu-alg><ol><li>Return the result of EvaluateBody of the parsed code that is <var>F</var>.[[ECMAScriptCode]] passing <var>F</var> and <var>argumentsList</var> as the arguments.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-ecmascript-function-objects-construct-argumentslist-newtarget">
<h1><span class="secnum">9.2.2</span>[[Construct]] ( <var>argumentsList</var>, <var>newTarget</var> )</h1>
<p>The [[Construct]] internal method for an ECMAScript <emu-xref href="#function-object" id="_ref_2465"><a href="#function-object">function object</a></emu-xref> <var>F</var> is called with parameters <var>argumentsList</var> and <var>newTarget</var>. <var>argumentsList</var> is a possibly empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2466"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of ECMAScript language values. The following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2467"><a href="#assert">Assert</a></emu-xref>: <var>F</var> is an ECMAScript <emu-xref href="#function-object" id="_ref_2468"><a href="#function-object">function object</a></emu-xref>.</li><li><emu-xref href="#assert" id="_ref_2469"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_2470"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>newTarget</var>) is Object.</li><li>Let <var>callerContext</var> be the <emu-xref href="#running-execution-context" id="_ref_2471"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Let <var>kind</var> be <var>F</var>.[[ConstructorKind]].</li><li>If <var>kind</var> is <code>"base"</code>, then<ol><li>Let <var>thisArgument</var> be ?&nbsp;<emu-xref aoid="OrdinaryCreateFromConstructor" id="_ref_2472"><a href="#sec-ordinarycreatefromconstructor">OrdinaryCreateFromConstructor</a></emu-xref>(<var>newTarget</var>, <code>"%ObjectPrototype%"</code>).</li></ol></li><li>Let <var>calleeContext</var> be <emu-xref aoid="PrepareForOrdinaryCall" id="_ref_2473"><a href="#sec-prepareforordinarycall">PrepareForOrdinaryCall</a></emu-xref>(<var>F</var>, <var>newTarget</var>).</li><li><emu-xref href="#assert" id="_ref_2474"><a href="#assert">Assert</a></emu-xref>: <var>calleeContext</var> is now the <emu-xref href="#running-execution-context" id="_ref_2475"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>If <var>kind</var> is <code>"base"</code>, perform <emu-xref aoid="OrdinaryCallBindThis" id="_ref_2476"><a href="#sec-ordinarycallbindthis">OrdinaryCallBindThis</a></emu-xref>(<var>F</var>, <var>calleeContext</var>, <var>thisArgument</var>).</li><li>Let <var>constructorEnv</var> be the LexicalEnvironment of <var>calleeContext</var>.</li><li>Let <var>envRec</var> be <var>constructorEnv</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_2477"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref>.</li><li>Let <var>result</var> be <emu-xref aoid="OrdinaryCallEvaluateBody" id="_ref_2478"><a href="#sec-ordinarycallevaluatebody">OrdinaryCallEvaluateBody</a></emu-xref>(<var>F</var>, <var>argumentsList</var>).</li><li>Remove <var>calleeContext</var> from the <emu-xref href="#execution-context-stack" id="_ref_2479"><a href="#execution-context-stack">execution context stack</a></emu-xref> and restore <var>callerContext</var> as the <emu-xref href="#running-execution-context" id="_ref_2480"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>If <var>result</var>.[[Type]] is <emu-const>return</emu-const>, then<ol><li>If <emu-xref aoid="Type" id="_ref_2481"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>result</var>.[[Value]]) is Object, return <emu-xref aoid="NormalCompletion" id="_ref_2482"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<var>result</var>.[[Value]]).</li><li>If <var>kind</var> is <code>"base"</code>, return <emu-xref aoid="NormalCompletion" id="_ref_2483"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<var>thisArgument</var>).</li><li>If <var>result</var>.[[Value]] is not <emu-val>undefined</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li></ol></li><li>Else, <emu-xref aoid="ReturnIfAbrupt" id="_ref_2484"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>result</var>).</li><li>Return ? <var>envRec</var>.GetThisBinding().
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-functionallocate" aoid="FunctionAllocate">
<h1><span class="secnum">9.2.3</span>FunctionAllocate ( <var>functionPrototype</var>, <var>strict</var>, <var>functionKind</var> )</h1>
<p>The abstract operation FunctionAllocate requires the three arguments <var>functionPrototype</var>, <var>strict</var> and <var>functionKind</var>. FunctionAllocate performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2485"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_2486"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>functionPrototype</var>) is Object.</li><li><emu-xref href="#assert" id="_ref_2487"><a href="#assert">Assert</a></emu-xref>: <var>functionKind</var> is either <code>"normal"</code>, <code>"non-constructor"</code>, <code>"generator"</code>, <code>"async"</code>, or <code>"async generator"</code>.</li><li>If <var>functionKind</var> is <code>"normal"</code>, let <var>needsConstruct</var> be <emu-val>true</emu-val>.</li><li>Else, let <var>needsConstruct</var> be <emu-val>false</emu-val>.</li><li>If <var>functionKind</var> is <code>"non-constructor"</code>, set <var>functionKind</var> to <code>"normal"</code>.</li><li>Let <var>F</var> be a newly created ECMAScript <emu-xref href="#function-object" id="_ref_2488"><a href="#function-object">function object</a></emu-xref> with the internal slots listed in <emu-xref href="#table-27" id="_ref_190"><a href="#table-27">Table 27</a></emu-xref>. All of those internal slots are initialized to <emu-val>undefined</emu-val>.</li><li>Set <var>F</var>'s essential internal methods to the default ordinary object definitions specified in <emu-xref href="#sec-ordinary-object-internal-methods-and-internal-slots" id="_ref_191"><a href="#sec-ordinary-object-internal-methods-and-internal-slots">9.1</a></emu-xref>.</li><li>Set <var>F</var>.[[Call]] to the definition specified in <emu-xref href="#sec-ecmascript-function-objects-call-thisargument-argumentslist" id="_ref_192"><a href="#sec-ecmascript-function-objects-call-thisargument-argumentslist">9.2.1</a></emu-xref>.</li><li>If <var>needsConstruct</var> is <emu-val>true</emu-val>, then<ol><li>Set <var>F</var>.[[Construct]] to the definition specified in <emu-xref href="#sec-ecmascript-function-objects-construct-argumentslist-newtarget" id="_ref_193"><a href="#sec-ecmascript-function-objects-construct-argumentslist-newtarget">9.2.2</a></emu-xref>.</li><li>Set <var>F</var>.[[ConstructorKind]] to <code>"base"</code>.</li></ol></li><li>Set <var>F</var>.[[Strict]] to <var>strict</var>.</li><li>Set <var>F</var>.[[FunctionKind]] to <var>functionKind</var>.</li><li>Set <var>F</var>.[[Prototype]] to <var>functionPrototype</var>.</li><li>Set <var>F</var>.[[Extensible]] to <emu-val>true</emu-val>.</li><li>Set <var>F</var>.[[Realm]] to <emu-xref href="#current-realm" id="_ref_2489"><a href="#current-realm">the current Realm Record</a></emu-xref>.</li><li>Return <var>F</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-functioninitialize" aoid="FunctionInitialize">
<h1><span class="secnum">9.2.4</span>FunctionInitialize ( <var>F</var>, <var>kind</var>, <var>ParameterList</var>, <var>Body</var>, <var>Scope</var> )</h1>
<p>The abstract operation FunctionInitialize requires the arguments: a <emu-xref href="#function-object" id="_ref_2490"><a href="#function-object">function object</a></emu-xref> <var>F</var>, <var>kind</var> which is one of (Normal, Method, Arrow), a parameter list <emu-xref href="#sec-syntactic-grammar" id="_ref_2491"><a href="#sec-syntactic-grammar">Parse Node</a></emu-xref> specified by <var>ParameterList</var>, a body <emu-xref href="#sec-syntactic-grammar" id="_ref_2492"><a href="#sec-syntactic-grammar">Parse Node</a></emu-xref> specified by <var>Body</var>, a <emu-xref href="#sec-lexical-environments" id="_ref_2493"><a href="#sec-lexical-environments">Lexical Environment</a></emu-xref> specified by <var>Scope</var>. FunctionInitialize performs the following steps:</p>
<emu-alg><ol><li>Let <var>len</var> be the ExpectedArgumentCount of <var>ParameterList</var>.</li><li>Perform !&nbsp;<emu-xref aoid="SetFunctionLength" id="_ref_2494"><a href="#sec-setfunctionlength">SetFunctionLength</a></emu-xref>(<var>F</var>, <var>len</var>).</li><li>Let <var>Strict</var> be <var>F</var>.[[Strict]].</li><li>Set <var>F</var>.[[Environment]] to <var>Scope</var>.</li><li>Set <var>F</var>.[[FormalParameters]] to <var>ParameterList</var>.</li><li>Set <var>F</var>.[[ECMAScriptCode]] to <var>Body</var>.</li><li>Set <var>F</var>.[[ScriptOrModule]] to <emu-xref aoid="GetActiveScriptOrModule" id="_ref_2495"><a href="#sec-getactivescriptormodule">GetActiveScriptOrModule</a></emu-xref>().</li><li>If <var>kind</var> is <emu-const>Arrow</emu-const>, set <var>F</var>.[[ThisMode]] to <emu-const>lexical</emu-const>.</li><li>Else if <var>Strict</var> is <emu-val>true</emu-val>, set <var>F</var>.[[ThisMode]] to <emu-const>strict</emu-const>.</li><li>Else, set <var>F</var>.[[ThisMode]] to <emu-const>global</emu-const>.</li><li>Return <var>F</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-functioncreate" aoid="FunctionCreate">
<h1><span class="secnum">9.2.5</span>FunctionCreate ( <var>kind</var>, <var>ParameterList</var>, <var>Body</var>, <var>Scope</var>, <var>Strict</var> [ , <var>prototype</var> ] )</h1>
<p>The abstract operation FunctionCreate requires the arguments: <var>kind</var> which is one of (Normal, Method, Arrow), a parameter list <emu-xref href="#sec-syntactic-grammar" id="_ref_2496"><a href="#sec-syntactic-grammar">Parse Node</a></emu-xref> specified by <var>ParameterList</var>, a body <emu-xref href="#sec-syntactic-grammar" id="_ref_2497"><a href="#sec-syntactic-grammar">Parse Node</a></emu-xref> specified by <var>Body</var>, a <emu-xref href="#sec-lexical-environments" id="_ref_2498"><a href="#sec-lexical-environments">Lexical Environment</a></emu-xref> specified by <var>Scope</var>, a Boolean flag <var>Strict</var>, and optionally, an object <var>prototype</var>. FunctionCreate performs the following steps:</p>
<emu-alg><ol><li>If <var>prototype</var> is not present, then<ol><li>Set <var>prototype</var> to the intrinsic object <emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_2499"><a href="#sec-properties-of-the-function-prototype-object">%FunctionPrototype%</a></emu-xref>.</li></ol></li><li>If <var>kind</var> is not <emu-const>Normal</emu-const>, let <var>allocKind</var> be <code>"non-constructor"</code>.</li><li>Else, let <var>allocKind</var> be <code>"normal"</code>.</li><li>Let <var>F</var> be <emu-xref aoid="FunctionAllocate" id="_ref_2500"><a href="#sec-functionallocate">FunctionAllocate</a></emu-xref>(<var>prototype</var>, <var>Strict</var>, <var>allocKind</var>).</li><li>Return <emu-xref aoid="FunctionInitialize" id="_ref_2501"><a href="#sec-functioninitialize">FunctionInitialize</a></emu-xref>(<var>F</var>, <var>kind</var>, <var>ParameterList</var>, <var>Body</var>, <var>Scope</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-generatorfunctioncreate" aoid="GeneratorFunctionCreate">
<h1><span class="secnum">9.2.6</span>GeneratorFunctionCreate ( <var>kind</var>, <var>ParameterList</var>, <var>Body</var>, <var>Scope</var>, <var>Strict</var> )</h1>
<p>The abstract operation GeneratorFunctionCreate requires the arguments: <var>kind</var> which is one of (Normal, Method), a parameter list <emu-xref href="#sec-syntactic-grammar" id="_ref_2502"><a href="#sec-syntactic-grammar">Parse Node</a></emu-xref> specified by <var>ParameterList</var>, a body <emu-xref href="#sec-syntactic-grammar" id="_ref_2503"><a href="#sec-syntactic-grammar">Parse Node</a></emu-xref> specified by <var>Body</var>, a <emu-xref href="#sec-lexical-environments" id="_ref_2504"><a href="#sec-lexical-environments">Lexical Environment</a></emu-xref> specified by <var>Scope</var>, and a Boolean flag <var>Strict</var>. GeneratorFunctionCreate performs the following steps:</p>
<emu-alg><ol><li>Let <var>functionPrototype</var> be the intrinsic object <emu-xref href="#sec-properties-of-the-generatorfunction-prototype-object" id="_ref_2505"><a href="#sec-properties-of-the-generatorfunction-prototype-object">%Generator%</a></emu-xref>.</li><li>Let <var>F</var> be <emu-xref aoid="FunctionAllocate" id="_ref_2506"><a href="#sec-functionallocate">FunctionAllocate</a></emu-xref>(<var>functionPrototype</var>, <var>Strict</var>, <code>"generator"</code>).</li><li>Return <emu-xref aoid="FunctionInitialize" id="_ref_2507"><a href="#sec-functioninitialize">FunctionInitialize</a></emu-xref>(<var>F</var>, <var>kind</var>, <var>ParameterList</var>, <var>Body</var>, <var>Scope</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-asyncgeneratorfunctioncreate" aoid="AsyncGeneratorFunctionCreate">
<h1><span class="secnum">9.2.7</span>AsyncGeneratorFunctionCreate ( <var>kind</var>, <var>ParameterList</var>, <var>Body</var>, <var>Scope</var>, <var>Strict</var> )</h1>
<p>The abstract operation AsyncGeneratorFunctionCreate requires the arguments: <var>kind</var> which is one of (<emu-const>Normal</emu-const>, <emu-const>Method</emu-const>), a parameter list <emu-xref href="#sec-syntactic-grammar" id="_ref_2508"><a href="#sec-syntactic-grammar">Parse Node</a></emu-xref> specified by <var>ParameterList</var>, a body <emu-xref href="#sec-syntactic-grammar" id="_ref_2509"><a href="#sec-syntactic-grammar">Parse Node</a></emu-xref> specified by <var>Body</var>, a <emu-xref href="#sec-lexical-environments" id="_ref_2510"><a href="#sec-lexical-environments">Lexical Environment</a></emu-xref> specified by <var>Scope</var>, and a Boolean flag <var>Strict</var>. AsyncGeneratorFunctionCreate performs the following steps:</p>
<emu-alg><ol><li>Let <var>functionPrototype</var> be the intrinsic object <emu-xref href="#sec-asyncgeneratorfunction-prototype" id="_ref_2511"><a href="#sec-asyncgeneratorfunction-prototype">%AsyncGenerator%</a></emu-xref>.</li><li>Let <var>F</var> be !&nbsp;<emu-xref aoid="FunctionAllocate" id="_ref_2512"><a href="#sec-functionallocate">FunctionAllocate</a></emu-xref>(<var>functionPrototype</var>, <var>Strict</var>, <code>"generator"</code>).</li><li>Return !&nbsp;<emu-xref aoid="FunctionInitialize" id="_ref_2513"><a href="#sec-functioninitialize">FunctionInitialize</a></emu-xref>(<var>F</var>, <var>kind</var>, <var>ParameterList</var>, <var>Body</var>, <var>Scope</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-async-functions-abstract-operations-async-function-create" aoid="AsyncFunctionCreate">
<h1><span class="secnum">9.2.8</span>AsyncFunctionCreate ( <var>kind</var>, <var>parameters</var>, <var>body</var>, <var>Scope</var>, <var>Strict</var> )</h1>
<p>The abstract operation AsyncFunctionCreate requires the arguments: <var>kind</var> which is one of (<emu-const>Normal</emu-const>, <emu-const>Method</emu-const>, <emu-const>Arrow</emu-const>), a parameter list <emu-xref href="#sec-syntactic-grammar" id="_ref_2514"><a href="#sec-syntactic-grammar">Parse Node</a></emu-xref> specified by <var>parameters</var>, a body <emu-xref href="#sec-syntactic-grammar" id="_ref_2515"><a href="#sec-syntactic-grammar">Parse Node</a></emu-xref> specified by <var>body</var>, a <emu-xref href="#sec-lexical-environments" id="_ref_2516"><a href="#sec-lexical-environments">Lexical Environment</a></emu-xref> specified by <var>Scope</var>, and a Boolean flag <var>Strict</var>. AsyncFunctionCreate performs the following steps:</p>
<emu-alg><ol><li>Let <var>functionPrototype</var> be the intrinsic object <emu-xref href="#sec-async-function-prototype-properties" id="_ref_2517"><a href="#sec-async-function-prototype-properties">%AsyncFunctionPrototype%</a></emu-xref>.</li><li>Let <var>F</var> be !&nbsp;<emu-xref aoid="FunctionAllocate" id="_ref_2518"><a href="#sec-functionallocate">FunctionAllocate</a></emu-xref>(<var>functionPrototype</var>, <var>Strict</var>, <code>"async"</code>).</li><li>Return !&nbsp;<emu-xref aoid="FunctionInitialize" id="_ref_2519"><a href="#sec-functioninitialize">FunctionInitialize</a></emu-xref>(<var>F</var>, <var>kind</var>, <var>parameters</var>, <var>body</var>, <var>Scope</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-addrestrictedfunctionproperties" aoid="AddRestrictedFunctionProperties">
<h1><span class="secnum">9.2.9</span>AddRestrictedFunctionProperties ( <var>F</var>, <var>realm</var> )</h1>
<p>The abstract operation AddRestrictedFunctionProperties is called with a <emu-xref href="#function-object" id="_ref_2520"><a href="#function-object">function object</a></emu-xref> <var>F</var> and <emu-xref href="#realm-record" id="_ref_2521"><a href="#realm-record">Realm Record</a></emu-xref> <var>realm</var> as its argument. It performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2522"><a href="#assert">Assert</a></emu-xref>: <var>realm</var>.[[Intrinsics]].[[<emu-xref href="#sec-%throwtypeerror%" id="_ref_2523"><a href="#sec-%throwtypeerror%">%ThrowTypeError%</a></emu-xref>]] exists and has been initialized.</li><li>Let <var>thrower</var> be <var>realm</var>.[[Intrinsics]].[[<emu-xref href="#sec-%throwtypeerror%" id="_ref_2524"><a href="#sec-%throwtypeerror%">%ThrowTypeError%</a></emu-xref>]].</li><li>Perform !&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_2525"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>F</var>, <code>"caller"</code>, PropertyDescriptor { [[Get]]: <var>thrower</var>, [[Set]]: <var>thrower</var>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }).</li><li>Return !&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_2526"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>F</var>, <code>"arguments"</code>, PropertyDescriptor { [[Get]]: <var>thrower</var>, [[Set]]: <var>thrower</var>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }).
</li></ol></emu-alg>
<emu-clause id="sec-%throwtypeerror%">
<h1><span class="secnum">9.2.9.1</span>%ThrowTypeError% ( )</h1>
<p>The <dfn>%ThrowTypeError%</dfn> intrinsic is an anonymous built-in <emu-xref href="#function-object" id="_ref_2527"><a href="#function-object">function object</a></emu-xref> that is defined once for each <emu-xref href="#realm" id="_ref_2528"><a href="#realm">realm</a></emu-xref>. When %ThrowTypeError% is called it performs the following steps:</p>
<emu-alg><ol><li>Throw a <emu-val>TypeError</emu-val> exception.
</li></ol></emu-alg>
<p>The value of the [[Extensible]] internal slot of a %ThrowTypeError% function is <emu-val>false</emu-val>.</p>
<p>The <code>"length"</code> property of a %ThrowTypeError% function has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-makeconstructor" aoid="MakeConstructor">
<h1><span class="secnum">9.2.10</span>MakeConstructor ( <var>F</var> [ , <var>writablePrototype</var> [ , <var>prototype</var> ] ] )</h1>
<p>The abstract operation MakeConstructor requires a Function argument <var>F</var> and optionally, a Boolean <var>writablePrototype</var> and an object <var>prototype</var>. If <var>prototype</var> is provided it is assumed to already contain, if needed, a <code>"constructor"</code> property whose value is <var>F</var>. This operation converts <var>F</var> into a <emu-xref href="#constructor" id="_ref_2529"><a href="#constructor">constructor</a></emu-xref> by performing the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2530"><a href="#assert">Assert</a></emu-xref>: <var>F</var> is an ECMAScript <emu-xref href="#function-object" id="_ref_2531"><a href="#function-object">function object</a></emu-xref>.</li><li><emu-xref href="#assert" id="_ref_2532"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsConstructor" id="_ref_2533"><a href="#sec-isconstructor">IsConstructor</a></emu-xref>(<var>F</var>) is <emu-val>true</emu-val>.</li><li><emu-xref href="#assert" id="_ref_2534"><a href="#assert">Assert</a></emu-xref>: <var>F</var> is an extensible object that does not have a <code>prototype</code> own property.</li><li>If <var>writablePrototype</var> is not present, set <var>writablePrototype</var> to <emu-val>true</emu-val>.</li><li>If <var>prototype</var> is not present, then<ol><li>Set <var>prototype</var> to <emu-xref aoid="ObjectCreate" id="_ref_2535"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_2536"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>).</li><li>Perform !&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_2537"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>prototype</var>, <code>"constructor"</code>, PropertyDescriptor { [[Value]]: <var>F</var>, [[Writable]]: <var>writablePrototype</var>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }).</li></ol></li><li>Perform !&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_2538"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>F</var>, <code>"prototype"</code>, PropertyDescriptor { [[Value]]: <var>prototype</var>, [[Writable]]: <var>writablePrototype</var>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }).</li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_2539"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-val>undefined</emu-val>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-makeclassconstructor" aoid="MakeClassConstructor">
<h1><span class="secnum">9.2.11</span>MakeClassConstructor ( <var>F</var> )</h1>
<p>The abstract operation MakeClassConstructor with argument <var>F</var> performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2540"><a href="#assert">Assert</a></emu-xref>: <var>F</var> is an ECMAScript <emu-xref href="#function-object" id="_ref_2541"><a href="#function-object">function object</a></emu-xref>.</li><li><emu-xref href="#assert" id="_ref_2542"><a href="#assert">Assert</a></emu-xref>: <var>F</var>.[[FunctionKind]] is <code>"normal"</code>.</li><li>Set <var>F</var>.[[FunctionKind]] to <code>"classConstructor"</code>.</li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_2543"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-val>undefined</emu-val>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-makemethod" aoid="MakeMethod">
<h1><span class="secnum">9.2.12</span>MakeMethod ( <var>F</var>, <var>homeObject</var> )</h1>
<p>The abstract operation MakeMethod with arguments <var>F</var> and <var>homeObject</var> configures <var>F</var> as a method by performing the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2544"><a href="#assert">Assert</a></emu-xref>: <var>F</var> is an ECMAScript <emu-xref href="#function-object" id="_ref_2545"><a href="#function-object">function object</a></emu-xref>.</li><li><emu-xref href="#assert" id="_ref_2546"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_2547"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>homeObject</var>) is Object.</li><li>Set <var>F</var>.[[HomeObject]] to <var>homeObject</var>.</li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_2548"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-val>undefined</emu-val>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-setfunctionname" aoid="SetFunctionName">
<h1><span class="secnum">9.2.13</span>SetFunctionName ( <var>F</var>, <var>name</var> [ , <var>prefix</var> ] )</h1>
<p>The abstract operation SetFunctionName requires a Function argument <var>F</var>, a String or Symbol argument <var>name</var> and optionally a String argument <var>prefix</var>. This operation adds a <code>name</code> property to <var>F</var> by performing the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2549"><a href="#assert">Assert</a></emu-xref>: <var>F</var> is an extensible object that does not have a <code>name</code> own property.</li><li><emu-xref href="#assert" id="_ref_2550"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_2551"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>name</var>) is either Symbol or String.</li><li><emu-xref href="#assert" id="_ref_2552"><a href="#assert">Assert</a></emu-xref>: If <var>prefix</var> is present, then <emu-xref aoid="Type" id="_ref_2553"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>prefix</var>) is String.</li><li>If <emu-xref aoid="Type" id="_ref_2554"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>name</var>) is Symbol, then<ol><li>Let <var>description</var> be <var>name</var>'s [[Description]] value.</li><li>If <var>description</var> is <emu-val>undefined</emu-val>, set <var>name</var> to the empty String.</li><li>Else, set <var>name</var> to the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_2555"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <code>"["</code>, <var>description</var>, and <code>"]"</code>.</li></ol></li><li>If <var>prefix</var> is present, then<ol><li>Set <var>name</var> to the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_2556"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>prefix</var>, the code unit 0x0020 (SPACE), and <var>name</var>.</li></ol></li><li>Return !&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_2557"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>F</var>, <code>"name"</code>, PropertyDescriptor { [[Value]]: <var>name</var>, [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-setfunctionlength" aoid="SetFunctionLength">
<h1><span class="secnum">9.2.14</span>SetFunctionLength ( <var>F</var>, <var>length</var> )</h1>
<p>The abstract operation SetFunctionLength requires a Function argument <var>F</var> and a Number argument <var>length</var>. This operation adds a <code>"length"</code> property to <var>F</var> by performing the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2558"><a href="#assert">Assert</a></emu-xref>: <var>F</var> is an extensible object that does not have a <code>"length"</code> own property.</li><li><emu-xref href="#assert" id="_ref_2559"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_2560"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>length</var>) is Number.</li><li><emu-xref href="#assert" id="_ref_2561"><a href="#assert">Assert</a></emu-xref>: <var>length</var> ≥ 0 and !&nbsp;<emu-xref aoid="ToInteger" id="_ref_2562"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>length</var>) is equal to <var>length</var>.</li><li>Return !&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_2563"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>F</var>, <code>"length"</code>, PropertyDescriptor { [[Value]]: <var>length</var>, [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-functiondeclarationinstantiation" aoid="FunctionDeclarationInstantiation">
<h1><span class="secnum">9.2.15</span>FunctionDeclarationInstantiation ( <var>func</var>, <var>argumentsList</var> )</h1>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>When an <emu-xref href="#sec-execution-contexts" id="_ref_2564"><a href="#sec-execution-contexts">execution context</a></emu-xref> is established for evaluating an ECMAScript function a new <emu-xref href="#sec-function-environment-records" id="_ref_2565"><a href="#sec-function-environment-records">function Environment Record</a></emu-xref> is created and bindings for each formal parameter are instantiated in that <emu-xref href="#sec-environment-records" id="_ref_2566"><a href="#sec-environment-records">Environment Record</a></emu-xref>.
Each declaration in the function body is also instantiated. If the
function's formal parameters do not include any default value
initializers then the body declarations are instantiated in the same <emu-xref href="#sec-environment-records" id="_ref_2567"><a href="#sec-environment-records">Environment Record</a></emu-xref> as the parameters. If default value parameter initializers exist, a second <emu-xref href="#sec-environment-records" id="_ref_2568"><a href="#sec-environment-records">Environment Record</a></emu-xref>
is created for the body declarations. Formal parameters and functions
are initialized as part of FunctionDeclarationInstantiation. All other
bindings are initialized during evaluation of the function body.</p>
</div></emu-note>
<p>FunctionDeclarationInstantiation is performed as follows using arguments <var>func</var> and <var>argumentsList</var>. <var>func</var> is the <emu-xref href="#function-object" id="_ref_2569"><a href="#function-object">function object</a></emu-xref> for which the <emu-xref href="#sec-execution-contexts" id="_ref_2570"><a href="#sec-execution-contexts">execution context</a></emu-xref> is being established.</p>
<!--
WARNING: If you add, remove, rename, or repurpose any variable names
within this algorithm, you may need to update
#sec-web-compat-functiondeclarationinstantiation accordingly.
-->
<emu-alg><ol><li>Let <var>calleeContext</var> be the <emu-xref href="#running-execution-context" id="_ref_2571"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Let <var>env</var> be the LexicalEnvironment of <var>calleeContext</var>.</li><li>Let <var>envRec</var> be <var>env</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_2572"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref>.</li><li>Let <var>code</var> be <var>func</var>.[[ECMAScriptCode]].</li><li>Let <var>strict</var> be <var>func</var>.[[Strict]].</li><li>Let <var>formals</var> be <var>func</var>.[[FormalParameters]].</li><li>Let <var>parameterNames</var> be the BoundNames of <var>formals</var>.</li><li>If <var>parameterNames</var> has any duplicate entries, let <var>hasDuplicates</var> be <emu-val>true</emu-val>. Otherwise, let <var>hasDuplicates</var> be <emu-val>false</emu-val>.</li><li>Let <var>simpleParameterList</var> be IsSimpleParameterList of <var>formals</var>.</li><li>Let <var>hasParameterExpressions</var> be ContainsExpression of <var>formals</var>.</li><li>Let <var>varNames</var> be the VarDeclaredNames of <var>code</var>.</li><li>Let <var>varDeclarations</var> be the VarScopedDeclarations of <var>code</var>.</li><li>Let <var>lexicalNames</var> be the LexicallyDeclaredNames of <var>code</var>.</li><li>Let <var>functionNames</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2573"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>functionsToInitialize</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2574"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>For each <var>d</var> in <var>varDeclarations</var>, in reverse list order, do<ol><li>If <var>d</var> is neither a <emu-nt id="_ref_9085"><a href="#prod-VariableDeclaration">VariableDeclaration</a></emu-nt> nor a <emu-nt id="_ref_9086"><a href="#prod-ForBinding">ForBinding</a></emu-nt> nor a <emu-nt id="_ref_9087"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt>, then<ol><li><emu-xref href="#assert" id="_ref_2575"><a href="#assert">Assert</a></emu-xref>: <var>d</var> is either a <emu-nt id="_ref_9088"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>, a <emu-nt id="_ref_9089"><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a></emu-nt>, an <emu-nt id="_ref_9090"><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt>, or an <emu-nt id="_ref_9091"><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt>.</li><li>Let <var>fn</var> be the sole element of the BoundNames of <var>d</var>.</li><li>If <var>fn</var> is not an element of <var>functionNames</var>, then<ol><li>Insert <var>fn</var> as the first element of <var>functionNames</var>.</li><li>NOTE: If there are multiple function declarations for the same name, the last declaration is used.</li><li>Insert <var>d</var> as the first element of <var>functionsToInitialize</var>.</li></ol></li></ol></li></ol></li><li>Let <var>argumentsObjectNeeded</var> be <emu-val>true</emu-val>.</li><li>If <var>func</var>.[[ThisMode]] is <emu-const>lexical</emu-const>, then<ol><li>NOTE: Arrow functions never have an arguments objects.</li><li>Set <var>argumentsObjectNeeded</var> to <emu-val>false</emu-val>.</li></ol></li><li>Else if <code>"arguments"</code> is an element of <var>parameterNames</var>, then<ol><li>Set <var>argumentsObjectNeeded</var> to <emu-val>false</emu-val>.</li></ol></li><li>Else if <var>hasParameterExpressions</var> is <emu-val>false</emu-val>, then<ol><li>If <code>"arguments"</code> is an element of <var>functionNames</var> or if <code>"arguments"</code> is an element of <var>lexicalNames</var>, then<ol><li>Set <var>argumentsObjectNeeded</var> to <emu-val>false</emu-val>.</li></ol></li></ol></li><li>For each String <var>paramName</var> in <var>parameterNames</var>, do<ol><li>Let <var>alreadyDeclared</var> be <var>envRec</var>.HasBinding(<var>paramName</var>).</li><li>NOTE:
Early errors ensure that duplicate parameter names can only occur in
non-strict functions that do not have parameter default values or rest
parameters.</li><li>If <var>alreadyDeclared</var> is <emu-val>false</emu-val>, then<ol><li>Perform ! <var>envRec</var>.CreateMutableBinding(<var>paramName</var>, <emu-val>false</emu-val>).</li><li>If <var>hasDuplicates</var> is <emu-val>true</emu-val>, then<ol><li>Perform ! <var>envRec</var>.InitializeBinding(<var>paramName</var>, <emu-val>undefined</emu-val>).</li></ol></li></ol></li></ol></li><li>If <var>argumentsObjectNeeded</var> is <emu-val>true</emu-val>, then<ol><li>If <var>strict</var> is <emu-val>true</emu-val> or if <var>simpleParameterList</var> is <emu-val>false</emu-val>, then<ol><li>Let <var>ao</var> be <emu-xref aoid="CreateUnmappedArgumentsObject" id="_ref_2576"><a href="#sec-createunmappedargumentsobject">CreateUnmappedArgumentsObject</a></emu-xref>(<var>argumentsList</var>).</li></ol></li><li>Else,<ol><li>NOTE:
mapped argument object is only provided for non-strict functions that
don't have a rest parameter, any parameter default value initializers,
or any destructured parameters.</li><li>Let <var>ao</var> be <emu-xref aoid="CreateMappedArgumentsObject" id="_ref_2577"><a href="#sec-createmappedargumentsobject">CreateMappedArgumentsObject</a></emu-xref>(<var>func</var>, <var>formals</var>, <var>argumentsList</var>, <var>envRec</var>).</li></ol></li><li>If <var>strict</var> is <emu-val>true</emu-val>, then<ol><li>Perform ! <var>envRec</var>.CreateImmutableBinding(<code>"arguments"</code>, <emu-val>false</emu-val>).</li></ol></li><li>Else,<ol><li>Perform ! <var>envRec</var>.CreateMutableBinding(<code>"arguments"</code>, <emu-val>false</emu-val>).</li></ol></li><li>Call <var>envRec</var>.InitializeBinding(<code>"arguments"</code>, <var>ao</var>).</li><li>Let <var>parameterBindings</var> be a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2578"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of <var>parameterNames</var> with <code>"arguments"</code> appended.</li></ol></li><li>Else,<ol><li>Let <var>parameterBindings</var> be <var>parameterNames</var>.</li></ol></li><li>Let <var>iteratorRecord</var> be <emu-xref aoid="CreateListIteratorRecord" id="_ref_2579"><a href="#sec-createlistiteratorRecord">CreateListIteratorRecord</a></emu-xref>(<var>argumentsList</var>).</li><li>If <var>hasDuplicates</var> is <emu-val>true</emu-val>, then<ol><li>Perform ? IteratorBindingInitialization for <var>formals</var> with <var>iteratorRecord</var> and <emu-val>undefined</emu-val> as arguments.</li></ol></li><li>Else,<ol><li>Perform ? IteratorBindingInitialization for <var>formals</var> with <var>iteratorRecord</var> and <var>env</var> as arguments.</li></ol></li><li>If <var>hasParameterExpressions</var> is <emu-val>false</emu-val>, then<ol><li>NOTE: Only a single lexical environment is needed for the parameters and top-level vars.</li><li>Let <var>instantiatedVarNames</var> be a copy of the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2580"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> <var>parameterBindings</var>.</li><li>For each <var>n</var> in <var>varNames</var>, do<ol><li>If <var>n</var> is not an element of <var>instantiatedVarNames</var>, then<ol><li>Append <var>n</var> to <var>instantiatedVarNames</var>.</li><li>Perform ! <var>envRec</var>.CreateMutableBinding(<var>n</var>, <emu-val>false</emu-val>).</li><li>Call <var>envRec</var>.InitializeBinding(<var>n</var>, <emu-val>undefined</emu-val>).</li></ol></li></ol></li><li>Let <var>varEnv</var> be <var>env</var>.</li><li>Let <var>varEnvRec</var> be <var>envRec</var>.</li></ol></li><li>Else,<ol><li>NOTE: A separate <emu-xref href="#sec-environment-records" id="_ref_2581"><a href="#sec-environment-records">Environment Record</a></emu-xref>
is needed to ensure that closures created by expressions in the formal
parameter list do not have visibility of declarations in the function
body.</li><li>Let <var>varEnv</var> be <emu-xref aoid="NewDeclarativeEnvironment" id="_ref_2582"><a href="#sec-newdeclarativeenvironment">NewDeclarativeEnvironment</a></emu-xref>(<var>env</var>).</li><li>Let <var>varEnvRec</var> be <var>varEnv</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_2583"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref>.</li><li>Set the VariableEnvironment of <var>calleeContext</var> to <var>varEnv</var>.</li><li>Let <var>instantiatedVarNames</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2584"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>For each <var>n</var> in <var>varNames</var>, do<ol><li>If <var>n</var> is not an element of <var>instantiatedVarNames</var>, then<ol><li>Append <var>n</var> to <var>instantiatedVarNames</var>.</li><li>Perform ! <var>varEnvRec</var>.CreateMutableBinding(<var>n</var>, <emu-val>false</emu-val>).</li><li>If <var>n</var> is not an element of <var>parameterBindings</var> or if <var>n</var> is an element of <var>functionNames</var>, let <var>initialValue</var> be <emu-val>undefined</emu-val>.</li><li>Else,<ol><li>Let <var>initialValue</var> be ! <var>envRec</var>.GetBindingValue(<var>n</var>, <emu-val>false</emu-val>).</li></ol></li><li>Call <var>varEnvRec</var>.InitializeBinding(<var>n</var>, <var>initialValue</var>).</li><li>NOTE:
vars whose names are the same as a formal parameter, initially have the
same value as the corresponding initialized parameter.</li></ol></li></ol></li></ol></li><li>NOTE: Annex <emu-xref href="#sec-web-compat-functiondeclarationinstantiation" id="_ref_194"><a href="#sec-web-compat-functiondeclarationinstantiation">B.3.3.1</a></emu-xref> adds additional steps at this point.</li><li>If <var>strict</var> is <emu-val>false</emu-val>, then<ol><li>Let <var>lexEnv</var> be <emu-xref aoid="NewDeclarativeEnvironment" id="_ref_2585"><a href="#sec-newdeclarativeenvironment">NewDeclarativeEnvironment</a></emu-xref>(<var>varEnv</var>).</li><li>NOTE: Non-strict functions use a separate lexical <emu-xref href="#sec-environment-records" id="_ref_2586"><a href="#sec-environment-records">Environment Record</a></emu-xref> for top-level lexical declarations so that a <emu-xref href="#sec-function-calls-runtime-semantics-evaluation" id="_ref_2587"><a href="#sec-function-calls-runtime-semantics-evaluation">direct eval</a></emu-xref>
can determine whether any var scoped declarations introduced by the
eval code conflict with pre-existing top-level lexically scoped
declarations. This is not needed for strict functions because a strict <emu-xref href="#sec-function-calls-runtime-semantics-evaluation" id="_ref_2588"><a href="#sec-function-calls-runtime-semantics-evaluation">direct eval</a></emu-xref> always places all declarations into a new <emu-xref href="#sec-environment-records" id="_ref_2589"><a href="#sec-environment-records">Environment Record</a></emu-xref>.</li></ol></li><li>Else, let <var>lexEnv</var> be <var>varEnv</var>.</li><li>Let <var>lexEnvRec</var> be <var>lexEnv</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_2590"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref>.</li><li>Set the LexicalEnvironment of <var>calleeContext</var> to <var>lexEnv</var>.</li><li>Let <var>lexDeclarations</var> be the LexicallyScopedDeclarations of <var>code</var>.</li><li>For each element <var>d</var> in <var>lexDeclarations</var>, do<ol><li>NOTE:
A lexically declared name cannot be the same as a function/generator
declaration, formal parameter, or a var name. Lexically declared names
are only instantiated here but not initialized.</li><li>For each element <var>dn</var> of the BoundNames of <var>d</var>, do<ol><li>If IsConstantDeclaration of <var>d</var> is <emu-val>true</emu-val>, then<ol><li>Perform ! <var>lexEnvRec</var>.CreateImmutableBinding(<var>dn</var>, <emu-val>true</emu-val>).</li></ol></li><li>Else,<ol><li>Perform ! <var>lexEnvRec</var>.CreateMutableBinding(<var>dn</var>, <emu-val>false</emu-val>).</li></ol></li></ol></li></ol></li><li>For each <emu-xref href="#sec-syntactic-grammar" id="_ref_2591"><a href="#sec-syntactic-grammar">Parse Node</a></emu-xref> <var>f</var> in <var>functionsToInitialize</var>, do<ol><li>Let <var>fn</var> be the sole element of the BoundNames of <var>f</var>.</li><li>Let <var>fo</var> be the result of performing InstantiateFunctionObject for <var>f</var> with argument <var>lexEnv</var>.</li><li>Perform ! <var>varEnvRec</var>.SetMutableBinding(<var>fn</var>, <var>fo</var>, <emu-val>false</emu-val>).</li></ol></li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_2592"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p><emu-xref href="#sec-block-level-function-declarations-web-legacy-compatibility-semantics" id="_ref_195"><a href="#sec-block-level-function-declarations-web-legacy-compatibility-semantics">B.3.3</a></emu-xref>
provides an extension to the above algorithm that is necessary for
backwards compatibility with web browser implementations of ECMAScript
that predate ECMAScript 2015.</p>
</div></emu-note>
<emu-note><span class="note">Note 3</span><div class="note-contents">
<p>Parameter <emu-nt id="_ref_9092"><a href="#prod-Initializer">Initializer</a></emu-nt>s may contain <emu-xref href="#sec-function-calls-runtime-semantics-evaluation" id="_ref_2593"><a href="#sec-function-calls-runtime-semantics-evaluation">direct eval</a></emu-xref> expressions. Any top level declarations of such evals are only visible to the eval code (<emu-xref href="#sec-types-of-source-code" id="_ref_196"><a href="#sec-types-of-source-code">10.2</a></emu-xref>). The creation of the environment for such declarations is described in <emu-xref href="#sec-function-definitions-runtime-semantics-iteratorbindinginitialization" id="_ref_197"><a href="#sec-function-definitions-runtime-semantics-iteratorbindinginitialization">14.1.19</a></emu-xref>.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-built-in-function-objects">
<h1><span class="secnum">9.3</span>Built-in Function Objects</h1>
<p>The built-in function objects defined in this specification may be implemented as either ECMAScript function objects (<emu-xref href="#sec-ecmascript-function-objects" id="_ref_198"><a href="#sec-ecmascript-function-objects">9.2</a></emu-xref>)
whose behaviour is provided using ECMAScript code or as implementation
provided function exotic objects whose behaviour is provided in some
other manner. In either case, the effect of calling such functions must
conform to their specifications. An implementation may also provide
additional built-in function objects that are not defined in this
specification.</p>
<p>If a built-in <emu-xref href="#function-object" id="_ref_2594"><a href="#function-object">function object</a></emu-xref> is implemented as an <emu-xref href="#exotic-object" id="_ref_2595"><a href="#exotic-object">exotic object</a></emu-xref> it must have the ordinary object behaviour specified in <emu-xref href="#sec-ordinary-object-internal-methods-and-internal-slots" id="_ref_199"><a href="#sec-ordinary-object-internal-methods-and-internal-slots">9.1</a></emu-xref>. All such function exotic objects also have [[Prototype]], [[Extensible]], [[Realm]], and [[ScriptOrModule]] internal slots.</p>
<p>Unless otherwise specified every built-in <emu-xref href="#function-object" id="_ref_2596"><a href="#function-object">function object</a></emu-xref> has the <emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_2597"><a href="#sec-properties-of-the-function-prototype-object">%FunctionPrototype%</a></emu-xref> object as the initial value of its [[Prototype]] internal slot.</p>
<p>The behaviour specified for each built-in function via algorithm
steps or other means is the specification of the function body behaviour
for both [[Call]] and [[Construct]] invocations of the function.
However, [[Construct]] invocation is not supported by all built-in
functions. For each built-in function, when invoked with [[Call]], the
[[Call]] <var>thisArgument</var> provides the <emu-val>this</emu-val> value, the [[Call]] <var>argumentsList</var> provides the named parameters, and the NewTarget value is <emu-val>undefined</emu-val>. When invoked with [[Construct]], the <emu-val>this</emu-val> value is uninitialized, the [[Construct]] <var>argumentsList</var> provides the named parameters, and the [[Construct]] <var>newTarget</var> parameter provides the NewTarget value. If the built-in function is implemented as an ECMAScript <emu-xref href="#function-object" id="_ref_2598"><a href="#function-object">function object</a></emu-xref>
then this specified behaviour must be implemented by the ECMAScript
code that is the body of the function. Built-in functions that are
ECMAScript function objects must be strict functions. If a built-in <emu-xref href="#constructor" id="_ref_2599"><a href="#constructor">constructor</a></emu-xref> has any [[Call]] behaviour other than throwing a <emu-val>TypeError</emu-val>
exception, an ECMAScript implementation of the function must be done in
a manner that does not cause the function's [[FunctionKind]] internal
slot to have the value <code>"classConstructor"</code>.</p>
<p>Built-in function objects that are not identified as constructors
do not implement the [[Construct]] internal method unless otherwise
specified in the description of a particular function. When a built-in <emu-xref href="#constructor" id="_ref_2600"><a href="#constructor">constructor</a></emu-xref> is called as part of a <code>new</code> expression the <var>argumentsList</var> parameter of the invoked [[Construct]] internal method provides the values for the built-in <emu-xref href="#constructor" id="_ref_2601"><a href="#constructor">constructor</a></emu-xref>'s named parameters.</p>
<p>Built-in functions that are not constructors do not have a <code>prototype</code> property unless otherwise specified in the description of a particular function.</p>
<p>If a built-in <emu-xref href="#function-object" id="_ref_2602"><a href="#function-object">function object</a></emu-xref>
is not implemented as an ECMAScript function it must provide [[Call]]
and [[Construct]] internal methods that conform to the following
definitions:</p>
<emu-clause id="sec-built-in-function-objects-call-thisargument-argumentslist">
<h1><span class="secnum">9.3.1</span>[[Call]] ( <var>thisArgument</var>, <var>argumentsList</var> )</h1>
<p>The [[Call]] internal method for a built-in <emu-xref href="#function-object" id="_ref_2603"><a href="#function-object">function object</a></emu-xref> <var>F</var> is called with parameters <var>thisArgument</var> and <var>argumentsList</var>, a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2604"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of ECMAScript language values. The following steps are taken:</p>
<emu-alg><ol><li>Let <var>callerContext</var> be the <emu-xref href="#running-execution-context" id="_ref_2605"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>If <var>callerContext</var> is not already suspended, suspend <var>callerContext</var>.</li><li>Let <var>calleeContext</var> be a new ECMAScript code <emu-xref href="#sec-execution-contexts" id="_ref_2606"><a href="#sec-execution-contexts">execution context</a></emu-xref>.</li><li>Set the Function of <var>calleeContext</var> to <var>F</var>.</li><li>Let <var>calleeRealm</var> be <var>F</var>.[[Realm]].</li><li>Set the <emu-xref href="#realm" id="_ref_2607"><a href="#realm">Realm</a></emu-xref> of <var>calleeContext</var> to <var>calleeRealm</var>.</li><li>Set the ScriptOrModule of <var>calleeContext</var> to <var>F</var>.[[ScriptOrModule]].</li><li>Perform any necessary implementation-defined initialization of <var>calleeContext</var>.</li><li>Push <var>calleeContext</var> onto the <emu-xref href="#execution-context-stack" id="_ref_2608"><a href="#execution-context-stack">execution context stack</a></emu-xref>; <var>calleeContext</var> is now the <emu-xref href="#running-execution-context" id="_ref_2609"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Let <var>result</var> be the <emu-xref href="#sec-completion-record-specification-type" id="_ref_2610"><a href="#sec-completion-record-specification-type">Completion Record</a></emu-xref> that is the result of evaluating <var>F</var> in an implementation-defined manner that conforms to the specification of <var>F</var>. <var>thisArgument</var> is the <emu-val>this</emu-val> value, <var>argumentsList</var> provides the named parameters, and the NewTarget value is <emu-val>undefined</emu-val>.</li><li>Remove <var>calleeContext</var> from the <emu-xref href="#execution-context-stack" id="_ref_2611"><a href="#execution-context-stack">execution context stack</a></emu-xref> and restore <var>callerContext</var> as the <emu-xref href="#running-execution-context" id="_ref_2612"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Return <var>result</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>When <var>calleeContext</var> is removed from the <emu-xref href="#execution-context-stack" id="_ref_2613"><a href="#execution-context-stack">execution context stack</a></emu-xref> it must not be destroyed if it has been suspended and retained by an accessible generator object for later resumption.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-built-in-function-objects-construct-argumentslist-newtarget">
<h1><span class="secnum">9.3.2</span>[[Construct]] ( <var>argumentsList</var>, <var>newTarget</var> )</h1>
<p>The [[Construct]] internal method for built-in <emu-xref href="#function-object" id="_ref_2614"><a href="#function-object">function object</a></emu-xref> <var>F</var> is called with parameters <var>argumentsList</var> and <var>newTarget</var>. The steps performed are the same as [[Call]] (see <emu-xref href="#sec-built-in-function-objects-call-thisargument-argumentslist" id="_ref_200"><a href="#sec-built-in-function-objects-call-thisargument-argumentslist">9.3.1</a></emu-xref>) except that step 10 is replaced by:</p>
<emu-alg><ol start="10"><li>Let <var>result</var> be the <emu-xref href="#sec-completion-record-specification-type" id="_ref_2615"><a href="#sec-completion-record-specification-type">Completion Record</a></emu-xref> that is the result of evaluating <var>F</var> in an implementation-defined manner that conforms to the specification of <var>F</var>. The <emu-val>this</emu-val> value is uninitialized, <var>argumentsList</var> provides the named parameters, and <var>newTarget</var> provides the NewTarget value.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-createbuiltinfunction" aoid="CreateBuiltinFunction">
<h1><span class="secnum">9.3.3</span>CreateBuiltinFunction ( <var>steps</var>, <var>internalSlotsList</var> [ , <var>realm</var> [ , <var>prototype</var> ] ] )</h1>
<p>The abstract operation CreateBuiltinFunction takes arguments <var>steps</var>, <var>internalSlotsList</var>, <var>realm</var>, and <var>prototype</var>. The argument <var>internalSlotsList</var> is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2616"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of the names of additional internal slots that must be defined as part of the object. CreateBuiltinFunction returns a built-in <emu-xref href="#function-object" id="_ref_2617"><a href="#function-object">function object</a></emu-xref> created by the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2618"><a href="#assert">Assert</a></emu-xref>: <var>steps</var> is either a set of algorithm steps or other definition of a function's behaviour provided in this specification.</li><li>If <var>realm</var> is not present, set <var>realm</var> to <emu-xref href="#current-realm" id="_ref_2619"><a href="#current-realm">the current Realm Record</a></emu-xref>.</li><li><emu-xref href="#assert" id="_ref_2620"><a href="#assert">Assert</a></emu-xref>: <var>realm</var> is a <emu-xref href="#realm-record" id="_ref_2621"><a href="#realm-record">Realm Record</a></emu-xref>.</li><li>If <var>prototype</var> is not present, set <var>prototype</var> to <var>realm</var>.[[Intrinsics]].[[<emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_2622"><a href="#sec-properties-of-the-function-prototype-object">%FunctionPrototype%</a></emu-xref>]].</li><li>Let <var>func</var> be a new built-in <emu-xref href="#function-object" id="_ref_2623"><a href="#function-object">function object</a></emu-xref> that when called performs the action described by <var>steps</var>. The new <emu-xref href="#function-object" id="_ref_2624"><a href="#function-object">function object</a></emu-xref> has internal slots whose names are the elements of <var>internalSlotsList</var>. The initial value of each of those internal slots is <emu-val>undefined</emu-val>.</li><li>Set <var>func</var>.[[Realm]] to <var>realm</var>.</li><li>Set <var>func</var>.[[Prototype]] to <var>prototype</var>.</li><li>Set <var>func</var>.[[Extensible]] to <emu-val>true</emu-val>.</li><li>Set <var>func</var>.[[ScriptOrModule]] to <emu-val>null</emu-val>.</li><li>Return <var>func</var>.
</li></ol></emu-alg>
<p>Each built-in function defined in this specification is created by calling the CreateBuiltinFunction abstract operation.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-built-in-exotic-object-internal-methods-and-slots">
<h1><span class="secnum">9.4</span>Built-in Exotic Object Internal Methods and Slots</h1>
<p>This specification defines several kinds of built-in exotic
objects. These objects generally behave similar to ordinary objects
except for a few specific situations. The following exotic objects use
the ordinary object internal methods except where it is explicitly
specified otherwise below:</p>
<emu-clause id="sec-bound-function-exotic-objects">
<h1><span class="secnum">9.4.1</span>Bound Function Exotic Objects</h1>
<p>A <dfn>bound function</dfn> is an <emu-xref href="#exotic-object" id="_ref_2625"><a href="#exotic-object">exotic object</a></emu-xref> that wraps another <emu-xref href="#function-object" id="_ref_2626"><a href="#function-object">function object</a></emu-xref>.
A bound function is callable (it has a [[Call]] internal method and may
have a [[Construct]] internal method). Calling a bound function
generally results in a call of its wrapped function.</p>
<p>Bound function objects do not have the internal slots of ECMAScript function objects defined in <emu-xref href="#table-27" id="_ref_201"><a href="#table-27">Table 27</a></emu-xref>. Instead they have the internal slots defined in <emu-xref href="#table-28" id="_ref_202"><a href="#table-28">Table 28</a></emu-xref>.</p>
<emu-table id="table-28" caption="Internal Slots of Bound Function Exotic Objects"><figure><figcaption>Table 28: Internal Slots of Bound Function Exotic Objects</figcaption>
<table>
<tbody>
<tr>
<th>
Internal Slot
</th>
<th>
Type
</th>
<th>
Description
</th>
</tr>
<tr>
<td>
[[BoundTargetFunction]]
</td>
<td>
Callable Object
</td>
<td>
The wrapped <emu-xref href="#function-object" id="_ref_2627"><a href="#function-object">function object</a></emu-xref>.
</td>
</tr>
<tr>
<td>
[[BoundThis]]
</td>
<td>
Any
</td>
<td>
The value that is always passed as the <emu-val>this</emu-val> value when calling the wrapped function.
</td>
</tr>
<tr>
<td>
[[BoundArguments]]
</td>
<td>
<emu-xref href="#sec-list-and-record-specification-type" id="_ref_2628"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of Any
</td>
<td>
A list of values whose elements are used as the first arguments to any call to the wrapped function.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<p>Bound function objects provide all of the essential internal methods as specified in <emu-xref href="#sec-ordinary-object-internal-methods-and-internal-slots" id="_ref_203"><a href="#sec-ordinary-object-internal-methods-and-internal-slots">9.1</a></emu-xref>. However, they use the following definitions for the essential internal methods of function objects.</p>
<emu-clause id="sec-bound-function-exotic-objects-call-thisargument-argumentslist">
<h1><span class="secnum">9.4.1.1</span>[[Call]] ( <var>thisArgument</var>, <var>argumentsList</var> )</h1>
<p>When the [[Call]] internal method of a <emu-xref href="#sec-bound-function-exotic-objects" id="_ref_2629"><a href="#sec-bound-function-exotic-objects">bound function</a></emu-xref> <emu-xref href="#exotic-object" id="_ref_2630"><a href="#exotic-object">exotic object</a></emu-xref>, <var>F</var>, which was created using the bind function is called with parameters <var>thisArgument</var> and <var>argumentsList</var>, a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2631"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of ECMAScript language values, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>target</var> be <var>F</var>.[[BoundTargetFunction]].</li><li>Let <var>boundThis</var> be <var>F</var>.[[BoundThis]].</li><li>Let <var>boundArgs</var> be <var>F</var>.[[BoundArguments]].</li><li>Let <var>args</var> be a new list containing the same values as the list <var>boundArgs</var> in the same order followed by the same values as the list <var>argumentsList</var> in the same order.</li><li>Return ?&nbsp;<emu-xref aoid="Call" id="_ref_2632"><a href="#sec-call">Call</a></emu-xref>(<var>target</var>, <var>boundThis</var>, <var>args</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-bound-function-exotic-objects-construct-argumentslist-newtarget">
<h1><span class="secnum">9.4.1.2</span>[[Construct]] ( <var>argumentsList</var>, <var>newTarget</var> )</h1>
<p>When the [[Construct]] internal method of a <emu-xref href="#sec-bound-function-exotic-objects" id="_ref_2633"><a href="#sec-bound-function-exotic-objects">bound function</a></emu-xref> <emu-xref href="#exotic-object" id="_ref_2634"><a href="#exotic-object">exotic object</a></emu-xref>, <var>F</var> that was created using the bind function is called with a list of arguments <var>argumentsList</var> and <var>newTarget</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>target</var> be <var>F</var>.[[BoundTargetFunction]].</li><li><emu-xref href="#assert" id="_ref_2635"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsConstructor" id="_ref_2636"><a href="#sec-isconstructor">IsConstructor</a></emu-xref>(<var>target</var>) is <emu-val>true</emu-val>.</li><li>Let <var>boundArgs</var> be <var>F</var>.[[BoundArguments]].</li><li>Let <var>args</var> be a new list containing the same values as the list <var>boundArgs</var> in the same order followed by the same values as the list <var>argumentsList</var> in the same order.</li><li>If <emu-xref aoid="SameValue" id="_ref_2637"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>F</var>, <var>newTarget</var>) is <emu-val>true</emu-val>, set <var>newTarget</var> to <var>target</var>.</li><li>Return ?&nbsp;<emu-xref aoid="Construct" id="_ref_2638"><a href="#sec-construct">Construct</a></emu-xref>(<var>target</var>, <var>args</var>, <var>newTarget</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-boundfunctioncreate" aoid="BoundFunctionCreate">
<h1><span class="secnum">9.4.1.3</span>BoundFunctionCreate ( <var>targetFunction</var>, <var>boundThis</var>, <var>boundArgs</var> )</h1>
<p>The abstract operation BoundFunctionCreate with arguments <var>targetFunction</var>, <var>boundThis</var> and <var>boundArgs</var> is used to specify the creation of new Bound Function exotic objects. It performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2639"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_2640"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>targetFunction</var>) is Object.</li><li>Let <var>proto</var> be ? <var>targetFunction</var>.[[GetPrototypeOf]]().</li><li>Let <var>obj</var> be a newly created object.</li><li>Set <var>obj</var>'s essential internal methods to the default ordinary object definitions specified in <emu-xref href="#sec-ordinary-object-internal-methods-and-internal-slots" id="_ref_204"><a href="#sec-ordinary-object-internal-methods-and-internal-slots">9.1</a></emu-xref>.</li><li>Set <var>obj</var>.[[Call]] as described in <emu-xref href="#sec-bound-function-exotic-objects-call-thisargument-argumentslist" id="_ref_205"><a href="#sec-bound-function-exotic-objects-call-thisargument-argumentslist">9.4.1.1</a></emu-xref>.</li><li>If <emu-xref aoid="IsConstructor" id="_ref_2641"><a href="#sec-isconstructor">IsConstructor</a></emu-xref>(<var>targetFunction</var>) is <emu-val>true</emu-val>, then<ol><li>Set <var>obj</var>.[[Construct]] as described in <emu-xref href="#sec-bound-function-exotic-objects-construct-argumentslist-newtarget" id="_ref_206"><a href="#sec-bound-function-exotic-objects-construct-argumentslist-newtarget">9.4.1.2</a></emu-xref>.</li></ol></li><li>Set <var>obj</var>.[[Prototype]] to <var>proto</var>.</li><li>Set <var>obj</var>.[[Extensible]] to <emu-val>true</emu-val>.</li><li>Set <var>obj</var>.[[BoundTargetFunction]] to <var>targetFunction</var>.</li><li>Set <var>obj</var>.[[BoundThis]] to <var>boundThis</var>.</li><li>Set <var>obj</var>.[[BoundArguments]] to <var>boundArgs</var>.</li><li>Return <var>obj</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-array-exotic-objects">
<h1><span class="secnum">9.4.2</span>Array Exotic Objects</h1>
<p>An <em>Array object</em> is an <emu-xref href="#exotic-object" id="_ref_2642"><a href="#exotic-object">exotic object</a></emu-xref> that gives special treatment to <emu-xref href="#array-index" id="_ref_2643"><a href="#array-index">array index</a></emu-xref> property keys (see <emu-xref href="#sec-object-type" id="_ref_207"><a href="#sec-object-type">6.1.7</a></emu-xref>). A property whose <emu-xref href="#property-name" id="_ref_2644"><a href="#property-name">property name</a></emu-xref> is an <emu-xref href="#array-index" id="_ref_2645"><a href="#array-index">array index</a></emu-xref> is also called an <em>element</em>. Every Array object has a non-configurable <code>"length"</code> property whose value is always a nonnegative integer less than 2<sup>32</sup>. The value of the <code>"length"</code> property is numerically greater than the name of every own property whose name is an <emu-xref href="#array-index" id="_ref_2646"><a href="#array-index">array index</a></emu-xref>;
whenever an own property of an Array object is created or changed,
other properties are adjusted as necessary to maintain this invariant.
Specifically, whenever an own property is added whose name is an <emu-xref href="#array-index" id="_ref_2647"><a href="#array-index">array index</a></emu-xref>, the value of the <code>"length"</code> property is changed, if necessary, to be one more than the numeric value of that <emu-xref href="#array-index" id="_ref_2648"><a href="#array-index">array index</a></emu-xref>; and whenever the value of the <code>"length"</code> property is changed, every own property whose name is an <emu-xref href="#array-index" id="_ref_2649"><a href="#array-index">array index</a></emu-xref>
whose value is not smaller than the new length is deleted. This
constraint applies only to own properties of an Array object and is
unaffected by <code>"length"</code> or <emu-xref href="#array-index" id="_ref_2650"><a href="#array-index">array index</a></emu-xref> properties that may be inherited from its prototypes.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>A String <emu-xref href="#property-name" id="_ref_2651"><a href="#property-name">property name</a></emu-xref> <var>P</var> is an <em><emu-xref href="#array-index" id="_ref_2652"><a href="#array-index">array index</a></emu-xref></em> if and only if <emu-xref aoid="ToString" id="_ref_2653"><a href="#sec-tostring">ToString</a></emu-xref>(<emu-xref aoid="ToUint32" id="_ref_2654"><a href="#sec-touint32">ToUint32</a></emu-xref>(<var>P</var>)) is equal to <var>P</var> and <emu-xref aoid="ToUint32" id="_ref_2655"><a href="#sec-touint32">ToUint32</a></emu-xref>(<var>P</var>) is not equal to <emu-eqn class="inline">2<sup>32</sup> - 1</emu-eqn>.</p>
</div></emu-note>
<p>Array exotic objects provide an alternative definition for the
[[DefineOwnProperty]] internal method. Except for that internal method,
Array exotic objects provide all of the other essential internal methods
as specified in <emu-xref href="#sec-ordinary-object-internal-methods-and-internal-slots" id="_ref_208"><a href="#sec-ordinary-object-internal-methods-and-internal-slots">9.1</a></emu-xref>.</p>
<emu-clause id="sec-array-exotic-objects-defineownproperty-p-desc">
<h1><span class="secnum">9.4.2.1</span>[[DefineOwnProperty]] ( <var>P</var>, <var>Desc</var> )</h1>
<p>When the [[DefineOwnProperty]] internal method of an Array <emu-xref href="#exotic-object" id="_ref_2656"><a href="#exotic-object">exotic object</a></emu-xref> <var>A</var> is called with property key <var>P</var>, and <emu-xref href="#sec-property-descriptor-specification-type" id="_ref_2657"><a href="#sec-property-descriptor-specification-type">Property Descriptor</a></emu-xref> <var>Desc</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2658"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPropertyKey" id="_ref_2659"><a href="#sec-ispropertykey">IsPropertyKey</a></emu-xref>(<var>P</var>) is <emu-val>true</emu-val>.</li><li>If <var>P</var> is <code>"length"</code>, then<ol><li>Return ?&nbsp;<emu-xref aoid="ArraySetLength" id="_ref_2660"><a href="#sec-arraysetlength">ArraySetLength</a></emu-xref>(<var>A</var>, <var>Desc</var>).</li></ol></li><li>Else if <var>P</var> is an <emu-xref href="#array-index" id="_ref_2661"><a href="#array-index">array index</a></emu-xref>, then<ol><li>Let <var>oldLenDesc</var> be <emu-xref aoid="OrdinaryGetOwnProperty" id="_ref_2662"><a href="#sec-ordinarygetownproperty">OrdinaryGetOwnProperty</a></emu-xref>(<var>A</var>, <code>"length"</code>).</li><li><emu-xref href="#assert" id="_ref_2663"><a href="#assert">Assert</a></emu-xref>: <var>oldLenDesc</var> will never be <emu-val>undefined</emu-val> or an accessor descriptor because Array objects are created with a length <emu-xref href="#sec-object-type" id="_ref_2664"><a href="#sec-object-type">data property</a></emu-xref> that cannot be deleted or reconfigured.</li><li>Let <var>oldLen</var> be <var>oldLenDesc</var>.[[Value]].</li><li>Let <var>index</var> be !&nbsp;<emu-xref aoid="ToUint32" id="_ref_2665"><a href="#sec-touint32">ToUint32</a></emu-xref>(<var>P</var>).</li><li>If <var>index</var> ≥ <var>oldLen</var> and <var>oldLenDesc</var>.[[Writable]] is <emu-val>false</emu-val>, return <emu-val>false</emu-val>.</li><li>Let <var>succeeded</var> be !&nbsp;<emu-xref aoid="OrdinaryDefineOwnProperty" id="_ref_2666"><a href="#sec-ordinarydefineownproperty">OrdinaryDefineOwnProperty</a></emu-xref>(<var>A</var>, <var>P</var>, <var>Desc</var>).</li><li>If <var>succeeded</var> is <emu-val>false</emu-val>, return <emu-val>false</emu-val>.</li><li>If <var>index</var> ≥ <var>oldLen</var>, then<ol><li>Set <var>oldLenDesc</var>.[[Value]] to <var>index</var> + 1.</li><li>Let <var>succeeded</var> be <emu-xref aoid="OrdinaryDefineOwnProperty" id="_ref_2667"><a href="#sec-ordinarydefineownproperty">OrdinaryDefineOwnProperty</a></emu-xref>(<var>A</var>, <code>"length"</code>, <var>oldLenDesc</var>).</li><li><emu-xref href="#assert" id="_ref_2668"><a href="#assert">Assert</a></emu-xref>: <var>succeeded</var> is <emu-val>true</emu-val>.</li></ol></li><li>Return <emu-val>true</emu-val>.</li></ol></li><li>Return <emu-xref aoid="OrdinaryDefineOwnProperty" id="_ref_2669"><a href="#sec-ordinarydefineownproperty">OrdinaryDefineOwnProperty</a></emu-xref>(<var>A</var>, <var>P</var>, <var>Desc</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-arraycreate" aoid="ArrayCreate">
<h1><span class="secnum">9.4.2.2</span>ArrayCreate ( <var>length</var> [ , <var>proto</var> ] )</h1>
<p>The abstract operation ArrayCreate with argument <var>length</var> (either 0 or a positive integer) and optional argument <var>proto</var> is used to specify the creation of new Array exotic objects. It performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2670"><a href="#assert">Assert</a></emu-xref>: <var>length</var> is an integer Number ≥ 0.</li><li>If <var>length</var> is <emu-val>-0</emu-val>, set <var>length</var> to <emu-val>+0</emu-val>.</li><li>If <var>length</var> &gt; 2<sup>32</sup> - 1, throw a <emu-val>RangeError</emu-val> exception.</li><li>If <var>proto</var> is not present, set <var>proto</var> to the intrinsic object <emu-xref href="#sec-properties-of-the-array-prototype-object" id="_ref_2671"><a href="#sec-properties-of-the-array-prototype-object">%ArrayPrototype%</a></emu-xref>.</li><li>Let <var>A</var> be a newly created Array <emu-xref href="#exotic-object" id="_ref_2672"><a href="#exotic-object">exotic object</a></emu-xref>.</li><li>Set <var>A</var>'s essential internal methods except for [[DefineOwnProperty]] to the default ordinary object definitions specified in <emu-xref href="#sec-ordinary-object-internal-methods-and-internal-slots" id="_ref_209"><a href="#sec-ordinary-object-internal-methods-and-internal-slots">9.1</a></emu-xref>.</li><li>Set <var>A</var>.[[DefineOwnProperty]] as specified in <emu-xref href="#sec-array-exotic-objects-defineownproperty-p-desc" id="_ref_210"><a href="#sec-array-exotic-objects-defineownproperty-p-desc">9.4.2.1</a></emu-xref>.</li><li>Set <var>A</var>.[[Prototype]] to <var>proto</var>.</li><li>Set <var>A</var>.[[Extensible]] to <emu-val>true</emu-val>.</li><li>Perform !&nbsp;<emu-xref aoid="OrdinaryDefineOwnProperty" id="_ref_2673"><a href="#sec-ordinarydefineownproperty">OrdinaryDefineOwnProperty</a></emu-xref>(<var>A</var>, <code>"length"</code>, PropertyDescriptor { [[Value]]: <var>length</var>, [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }).</li><li>Return <var>A</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-arrayspeciescreate" aoid="ArraySpeciesCreate">
<h1><span class="secnum">9.4.2.3</span>ArraySpeciesCreate ( <var>originalArray</var>, <var>length</var> )</h1>
<p>The abstract operation ArraySpeciesCreate with arguments <var>originalArray</var> and <var>length</var> is used to specify the creation of a new Array object using a <emu-xref href="#constructor" id="_ref_2674"><a href="#constructor">constructor</a></emu-xref> function that is derived from <var>originalArray</var>. It performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2675"><a href="#assert">Assert</a></emu-xref>: <var>length</var> is an integer Number ≥ 0.</li><li>If <var>length</var> is <emu-val>-0</emu-val>, set <var>length</var> to <emu-val>+0</emu-val>.</li><li>Let <var>isArray</var> be ?&nbsp;<emu-xref aoid="IsArray" id="_ref_2676"><a href="#sec-isarray">IsArray</a></emu-xref>(<var>originalArray</var>).</li><li>If <var>isArray</var> is <emu-val>false</emu-val>, return ?&nbsp;<emu-xref aoid="ArrayCreate" id="_ref_2677"><a href="#sec-arraycreate">ArrayCreate</a></emu-xref>(<var>length</var>).</li><li>Let <var>C</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_2678"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>originalArray</var>, <code>"constructor"</code>).</li><li>If <emu-xref aoid="IsConstructor" id="_ref_2679"><a href="#sec-isconstructor">IsConstructor</a></emu-xref>(<var>C</var>) is <emu-val>true</emu-val>, then<ol><li>Let <var>thisRealm</var> be <emu-xref href="#current-realm" id="_ref_2680"><a href="#current-realm">the current Realm Record</a></emu-xref>.</li><li>Let <var>realmC</var> be ?&nbsp;<emu-xref aoid="GetFunctionRealm" id="_ref_2681"><a href="#sec-getfunctionrealm">GetFunctionRealm</a></emu-xref>(<var>C</var>).</li><li>If <var>thisRealm</var> and <var>realmC</var> are not the same <emu-xref href="#realm-record" id="_ref_2682"><a href="#realm-record">Realm Record</a></emu-xref>, then<ol><li>If <emu-xref aoid="SameValue" id="_ref_2683"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>C</var>, <var>realmC</var>.[[Intrinsics]].[[<emu-xref href="#sec-array-constructor" id="_ref_2684"><a href="#sec-array-constructor">%Array%</a></emu-xref>]]) is <emu-val>true</emu-val>, set <var>C</var> to <emu-val>undefined</emu-val>.</li></ol></li></ol></li><li>If <emu-xref aoid="Type" id="_ref_2685"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>C</var>) is Object, then<ol><li>Set <var>C</var> to ?&nbsp;<emu-xref aoid="Get" id="_ref_2686"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>C</var>, @@species).</li><li>If <var>C</var> is <emu-val>null</emu-val>, set <var>C</var> to <emu-val>undefined</emu-val>.</li></ol></li><li>If <var>C</var> is <emu-val>undefined</emu-val>, return ?&nbsp;<emu-xref aoid="ArrayCreate" id="_ref_2687"><a href="#sec-arraycreate">ArrayCreate</a></emu-xref>(<var>length</var>).</li><li>If <emu-xref aoid="IsConstructor" id="_ref_2688"><a href="#sec-isconstructor">IsConstructor</a></emu-xref>(<var>C</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_2689"><a href="#sec-construct">Construct</a></emu-xref>(<var>C</var>, « <var>length</var> »).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>If <var>originalArray</var> was created using the standard built-in Array <emu-xref href="#constructor" id="_ref_2690"><a href="#constructor">constructor</a></emu-xref> for a <emu-xref href="#realm" id="_ref_2691"><a href="#realm">realm</a></emu-xref> that is not the <emu-xref href="#realm" id="_ref_2692"><a href="#realm">realm</a></emu-xref> of the <emu-xref href="#running-execution-context" id="_ref_2693"><a href="#running-execution-context">running execution context</a></emu-xref>, then a new Array is created using the <emu-xref href="#realm" id="_ref_2694"><a href="#realm">realm</a></emu-xref> of the <emu-xref href="#running-execution-context" id="_ref_2695"><a href="#running-execution-context">running execution context</a></emu-xref>.
This maintains compatibility with Web browsers that have historically
had that behaviour for the Array.prototype methods that now are defined
using ArraySpeciesCreate.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-arraysetlength" aoid="ArraySetLength">
<h1><span class="secnum">9.4.2.4</span>ArraySetLength ( <var>A</var>, <var>Desc</var> )</h1>
<p>When the abstract operation ArraySetLength is called with an Array <emu-xref href="#exotic-object" id="_ref_2696"><a href="#exotic-object">exotic object</a></emu-xref> <var>A</var>, and <emu-xref href="#sec-property-descriptor-specification-type" id="_ref_2697"><a href="#sec-property-descriptor-specification-type">Property Descriptor</a></emu-xref> <var>Desc</var>, the following steps are taken:</p>
<emu-alg><ol><li>If <var>Desc</var>.[[Value]] is absent, then<ol><li>Return <emu-xref aoid="OrdinaryDefineOwnProperty" id="_ref_2698"><a href="#sec-ordinarydefineownproperty">OrdinaryDefineOwnProperty</a></emu-xref>(<var>A</var>, <code>"length"</code>, <var>Desc</var>).</li></ol></li><li>Let <var>newLenDesc</var> be a copy of <var>Desc</var>.</li><li>Let <var>newLen</var> be ?&nbsp;<emu-xref aoid="ToUint32" id="_ref_2699"><a href="#sec-touint32">ToUint32</a></emu-xref>(<var>Desc</var>.[[Value]]).</li><li>Let <var>numberLen</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_2700"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>Desc</var>.[[Value]]).</li><li>If <var>newLen</var> ≠ <var>numberLen</var>, throw a <emu-val>RangeError</emu-val> exception.</li><li>Set <var>newLenDesc</var>.[[Value]] to <var>newLen</var>.</li><li>Let <var>oldLenDesc</var> be <emu-xref aoid="OrdinaryGetOwnProperty" id="_ref_2701"><a href="#sec-ordinarygetownproperty">OrdinaryGetOwnProperty</a></emu-xref>(<var>A</var>, <code>"length"</code>).</li><li><emu-xref href="#assert" id="_ref_2702"><a href="#assert">Assert</a></emu-xref>: <var>oldLenDesc</var> will never be <emu-val>undefined</emu-val> or an accessor descriptor because Array objects are created with a length <emu-xref href="#sec-object-type" id="_ref_2703"><a href="#sec-object-type">data property</a></emu-xref> that cannot be deleted or reconfigured.</li><li>Let <var>oldLen</var> be <var>oldLenDesc</var>.[[Value]].</li><li>If <var>newLen</var> ≥ <var>oldLen</var>, then<ol><li>Return <emu-xref aoid="OrdinaryDefineOwnProperty" id="_ref_2704"><a href="#sec-ordinarydefineownproperty">OrdinaryDefineOwnProperty</a></emu-xref>(<var>A</var>, <code>"length"</code>, <var>newLenDesc</var>).</li></ol></li><li>If <var>oldLenDesc</var>.[[Writable]] is <emu-val>false</emu-val>, return <emu-val>false</emu-val>.</li><li>If <var>newLenDesc</var>.[[Writable]] is absent or has the value <emu-val>true</emu-val>, let <var>newWritable</var> be <emu-val>true</emu-val>.</li><li>Else,<ol><li>Need to defer setting the [[Writable]] attribute to <emu-val>false</emu-val> in case any elements cannot be deleted.</li><li>Let <var>newWritable</var> be <emu-val>false</emu-val>.</li><li>Set <var>newLenDesc</var>.[[Writable]] to <emu-val>true</emu-val>.</li></ol></li><li>Let <var>succeeded</var> be !&nbsp;<emu-xref aoid="OrdinaryDefineOwnProperty" id="_ref_2705"><a href="#sec-ordinarydefineownproperty">OrdinaryDefineOwnProperty</a></emu-xref>(<var>A</var>, <code>"length"</code>, <var>newLenDesc</var>).</li><li>If <var>succeeded</var> is <emu-val>false</emu-val>, return <emu-val>false</emu-val>.</li><li>Repeat, while <var>newLen</var> &lt; <var>oldLen</var>,<ol><li>Decrease <var>oldLen</var> by 1.</li><li>Let <var>deleteSucceeded</var> be ! <var>A</var>.[[Delete]](! <emu-xref aoid="ToString" id="_ref_2706"><a href="#sec-tostring">ToString</a></emu-xref>(<var>oldLen</var>)).</li><li>If <var>deleteSucceeded</var> is <emu-val>false</emu-val>, then<ol><li>Set <var>newLenDesc</var>.[[Value]] to <var>oldLen</var> + 1.</li><li>If <var>newWritable</var> is <emu-val>false</emu-val>, set <var>newLenDesc</var>.[[Writable]] to <emu-val>false</emu-val>.</li><li>Perform !&nbsp;<emu-xref aoid="OrdinaryDefineOwnProperty" id="_ref_2707"><a href="#sec-ordinarydefineownproperty">OrdinaryDefineOwnProperty</a></emu-xref>(<var>A</var>, <code>"length"</code>, <var>newLenDesc</var>).</li><li>Return <emu-val>false</emu-val>.</li></ol></li></ol></li><li>If <var>newWritable</var> is <emu-val>false</emu-val>, then<ol><li>Return <emu-xref aoid="OrdinaryDefineOwnProperty" id="_ref_2708"><a href="#sec-ordinarydefineownproperty">OrdinaryDefineOwnProperty</a></emu-xref>(<var>A</var>, <code>"length"</code>, PropertyDescriptor { [[Writable]]: <emu-val>false</emu-val> }). This call will always return <emu-val>true</emu-val>.</li></ol></li><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>In steps 3 and 4, if <var>Desc</var>.[[Value]] is an object then its <code>valueOf</code> method is called twice. This is legacy behaviour that was specified with this effect starting with the 2<sup>nd</sup> Edition of this specification.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-string-exotic-objects">
<h1><span class="secnum">9.4.3</span>String Exotic Objects</h1>
<p>A <em>String object</em> is an <emu-xref href="#exotic-object" id="_ref_2709"><a href="#exotic-object">exotic object</a></emu-xref>
that encapsulates a String value and exposes virtual integer-indexed
data properties corresponding to the individual code unit elements of
the String value. String exotic objects always have a <emu-xref href="#sec-object-type" id="_ref_2710"><a href="#sec-object-type">data property</a></emu-xref> named <code>"length"</code> whose value is the number of code unit elements in the encapsulated String value. Both the code unit data properties and the <code>"length"</code> property are non-writable and non-configurable.</p>
<p>String exotic objects have the same internal slots as ordinary objects. They also have a [[StringData]] internal slot.</p>
<p>String exotic objects provide alternative definitions for the following internal methods. All of the other String <emu-xref href="#exotic-object" id="_ref_2711"><a href="#exotic-object">exotic object</a></emu-xref> essential internal methods that are not defined below are as specified in <emu-xref href="#sec-ordinary-object-internal-methods-and-internal-slots" id="_ref_211"><a href="#sec-ordinary-object-internal-methods-and-internal-slots">9.1</a></emu-xref>.</p>
<emu-clause id="sec-string-exotic-objects-getownproperty-p">
<h1><span class="secnum">9.4.3.1</span>[[GetOwnProperty]] ( <var>P</var> )</h1>
<p>When the [[GetOwnProperty]] internal method of a String <emu-xref href="#exotic-object" id="_ref_2712"><a href="#exotic-object">exotic object</a></emu-xref> <var>S</var> is called with property key <var>P</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2713"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPropertyKey" id="_ref_2714"><a href="#sec-ispropertykey">IsPropertyKey</a></emu-xref>(<var>P</var>) is <emu-val>true</emu-val>.</li><li>Let <var>desc</var> be <emu-xref aoid="OrdinaryGetOwnProperty" id="_ref_2715"><a href="#sec-ordinarygetownproperty">OrdinaryGetOwnProperty</a></emu-xref>(<var>S</var>, <var>P</var>).</li><li>If <var>desc</var> is not <emu-val>undefined</emu-val>, return <var>desc</var>.</li><li>Return !&nbsp;<emu-xref aoid="StringGetOwnProperty" id="_ref_2716"><a href="#sec-stringgetownproperty">StringGetOwnProperty</a></emu-xref>(<var>S</var>, <var>P</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-string-exotic-objects-defineownproperty-p-desc">
<h1><span class="secnum">9.4.3.2</span>[[DefineOwnProperty]] ( <var>P</var>, <var>Desc</var> )</h1>
<p>When the [[DefineOwnProperty]] internal method of a String <emu-xref href="#exotic-object" id="_ref_2717"><a href="#exotic-object">exotic object</a></emu-xref> <var>S</var> is called with property key <var>P</var>, and <emu-xref href="#sec-property-descriptor-specification-type" id="_ref_2718"><a href="#sec-property-descriptor-specification-type">Property Descriptor</a></emu-xref> <var>Desc</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2719"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPropertyKey" id="_ref_2720"><a href="#sec-ispropertykey">IsPropertyKey</a></emu-xref>(<var>P</var>) is <emu-val>true</emu-val>.</li><li>Let <var>stringDesc</var> be !&nbsp;<emu-xref aoid="StringGetOwnProperty" id="_ref_2721"><a href="#sec-stringgetownproperty">StringGetOwnProperty</a></emu-xref>(<var>S</var>, <var>P</var>).</li><li>If <var>stringDesc</var> is not <emu-val>undefined</emu-val>, then<ol><li>Let <var>extensible</var> be <var>S</var>.[[Extensible]].</li><li>Return !&nbsp;<emu-xref aoid="IsCompatiblePropertyDescriptor" id="_ref_2722"><a href="#sec-iscompatiblepropertydescriptor">IsCompatiblePropertyDescriptor</a></emu-xref>(<var>extensible</var>, <var>Desc</var>, <var>stringDesc</var>).</li></ol></li><li>Return !&nbsp;<emu-xref aoid="OrdinaryDefineOwnProperty" id="_ref_2723"><a href="#sec-ordinarydefineownproperty">OrdinaryDefineOwnProperty</a></emu-xref>(<var>S</var>, <var>P</var>, <var>Desc</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-string-exotic-objects-ownpropertykeys">
<h1><span class="secnum">9.4.3.3</span>[[OwnPropertyKeys]] ( )</h1>
<p>When the [[OwnPropertyKeys]] internal method of a String <emu-xref href="#exotic-object" id="_ref_2724"><a href="#exotic-object">exotic object</a></emu-xref> <var>O</var> is called, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>keys</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2725"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>str</var> be <var>O</var>.[[StringData]].</li><li><emu-xref href="#assert" id="_ref_2726"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_2727"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>str</var>) is String.</li><li>Let <var>len</var> be the length of <var>str</var>.</li><li>For each integer <var>i</var> starting with 0 such that <var>i</var> &lt; <var>len</var>, in ascending order, do<ol><li>Add !&nbsp;<emu-xref aoid="ToString" id="_ref_2728"><a href="#sec-tostring">ToString</a></emu-xref>(<var>i</var>) as the last element of <var>keys</var>.</li></ol></li><li>For each own property key <var>P</var> of <var>O</var> such that <var>P</var> is an <emu-xref href="#array-index" id="_ref_2729"><a href="#array-index">array index</a></emu-xref> and <emu-xref aoid="ToInteger" id="_ref_2730"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>P</var>) ≥ <var>len</var>, in ascending numeric index order, do<ol><li>Add <var>P</var> as the last element of <var>keys</var>.</li></ol></li><li>For each own property key <var>P</var> of <var>O</var> such that <emu-xref aoid="Type" id="_ref_2731"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>P</var>) is String and <var>P</var> is not an <emu-xref href="#array-index" id="_ref_2732"><a href="#array-index">array index</a></emu-xref>, in ascending chronological order of property creation, do<ol><li>Add <var>P</var> as the last element of <var>keys</var>.</li></ol></li><li>For each own property key <var>P</var> of <var>O</var> such that <emu-xref aoid="Type" id="_ref_2733"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>P</var>) is Symbol, in ascending chronological order of property creation, do<ol><li>Add <var>P</var> as the last element of <var>keys</var>.</li></ol></li><li>Return <var>keys</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-stringcreate" aoid="StringCreate">
<h1><span class="secnum">9.4.3.4</span>StringCreate ( <var>value</var>, <var>prototype</var> )</h1>
<p>The abstract operation StringCreate with arguments <var>value</var> and <var>prototype</var> is used to specify the creation of new String exotic objects. It performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2734"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_2735"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>value</var>) is String.</li><li>Let <var>S</var> be a newly created String <emu-xref href="#exotic-object" id="_ref_2736"><a href="#exotic-object">exotic object</a></emu-xref>.</li><li>Set <var>S</var>.[[StringData]] to <var>value</var>.</li><li>Set <var>S</var>'s essential internal methods to the default ordinary object definitions specified in <emu-xref href="#sec-ordinary-object-internal-methods-and-internal-slots" id="_ref_212"><a href="#sec-ordinary-object-internal-methods-and-internal-slots">9.1</a></emu-xref>.</li><li>Set <var>S</var>.[[GetOwnProperty]] as specified in <emu-xref href="#sec-string-exotic-objects-getownproperty-p" id="_ref_213"><a href="#sec-string-exotic-objects-getownproperty-p">9.4.3.1</a></emu-xref>.</li><li>Set <var>S</var>.[[DefineOwnProperty]] as specified in <emu-xref href="#sec-string-exotic-objects-defineownproperty-p-desc" id="_ref_214"><a href="#sec-string-exotic-objects-defineownproperty-p-desc">9.4.3.2</a></emu-xref>.</li><li>Set <var>S</var>.[[OwnPropertyKeys]] as specified in <emu-xref href="#sec-string-exotic-objects-ownpropertykeys" id="_ref_215"><a href="#sec-string-exotic-objects-ownpropertykeys">9.4.3.3</a></emu-xref>.</li><li>Set <var>S</var>.[[Prototype]] to <var>prototype</var>.</li><li>Set <var>S</var>.[[Extensible]] to <emu-val>true</emu-val>.</li><li>Let <var>length</var> be the number of code unit elements in <var>value</var>.</li><li>Perform !&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_2737"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>S</var>, <code>"length"</code>, PropertyDescriptor { [[Value]]: <var>length</var>, [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }).</li><li>Return <var>S</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-stringgetownproperty" aoid="StringGetOwnProperty">
<h1><span class="secnum">9.4.3.5</span>StringGetOwnProperty ( <var>S</var>, <var>P</var> )</h1>
<p>The abstract operation StringGetOwnProperty called with arguments <var>S</var> and <var>P</var> performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2738"><a href="#assert">Assert</a></emu-xref>: <var>S</var> is an Object that has a [[StringData]] internal slot.</li><li><emu-xref href="#assert" id="_ref_2739"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPropertyKey" id="_ref_2740"><a href="#sec-ispropertykey">IsPropertyKey</a></emu-xref>(<var>P</var>) is <emu-val>true</emu-val>.</li><li>If <emu-xref aoid="Type" id="_ref_2741"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>P</var>) is not String, return <emu-val>undefined</emu-val>.</li><li>Let <var>index</var> be !&nbsp;<emu-xref aoid="CanonicalNumericIndexString" id="_ref_2742"><a href="#sec-canonicalnumericindexstring">CanonicalNumericIndexString</a></emu-xref>(<var>P</var>).</li><li>If <var>index</var> is <emu-val>undefined</emu-val>, return <emu-val>undefined</emu-val>.</li><li>If <emu-xref aoid="IsInteger" id="_ref_2743"><a href="#sec-isinteger">IsInteger</a></emu-xref>(<var>index</var>) is <emu-val>false</emu-val>, return <emu-val>undefined</emu-val>.</li><li>If <var>index</var> = <emu-val>-0</emu-val>, return <emu-val>undefined</emu-val>.</li><li>Let <var>str</var> be <var>S</var>.[[StringData]].</li><li><emu-xref href="#assert" id="_ref_2744"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_2745"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>str</var>) is String.</li><li>Let <var>len</var> be the length of <var>str</var>.</li><li>If <var>index</var> &lt; 0 or <var>len</var> ≤ <var>index</var>, return <emu-val>undefined</emu-val>.</li><li>Let <var>resultStr</var> be the String value of length 1, containing one code unit from <var>str</var>, specifically the code unit at index <var>index</var>.</li><li>Return a PropertyDescriptor { [[Value]]: <var>resultStr</var>, [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>true</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-arguments-exotic-objects">
<h1><span class="secnum">9.4.4</span>Arguments Exotic Objects</h1>
<p>Most ECMAScript functions make an arguments object available to
their code. Depending upon the characteristics of the function
definition, its arguments object is either an ordinary object or an <em>arguments <emu-xref href="#exotic-object" id="_ref_2746"><a href="#exotic-object">exotic object</a></emu-xref></em>. An arguments <emu-xref href="#exotic-object" id="_ref_2747"><a href="#exotic-object">exotic object</a></emu-xref> is an <emu-xref href="#exotic-object" id="_ref_2748"><a href="#exotic-object">exotic object</a></emu-xref> whose <emu-xref href="#array-index" id="_ref_2749"><a href="#array-index">array index</a></emu-xref> properties map to the formal parameters bindings of an invocation of its associated ECMAScript function.</p>
<p>Arguments exotic objects have the same internal slots as
ordinary objects. They also have a [[ParameterMap]] internal slot.
Ordinary arguments objects also have a [[ParameterMap]] internal slot
whose value is always undefined. For ordinary argument objects the
[[ParameterMap]] internal slot is only used by <code>Object.prototype.toString</code> (<emu-xref href="#sec-object.prototype.tostring" id="_ref_216"><a href="#sec-object.prototype.tostring">19.1.3.6</a></emu-xref>) to identify them as such.</p>
<p>Arguments exotic objects provide alternative definitions for the following internal methods. All of the other arguments <emu-xref href="#exotic-object" id="_ref_2750"><a href="#exotic-object">exotic object</a></emu-xref> essential internal methods that are not defined below are as specified in <emu-xref href="#sec-ordinary-object-internal-methods-and-internal-slots" id="_ref_217"><a href="#sec-ordinary-object-internal-methods-and-internal-slots">9.1</a></emu-xref></p>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>The integer-indexed data properties of an arguments <emu-xref href="#exotic-object" id="_ref_2751"><a href="#exotic-object">exotic object</a></emu-xref> whose numeric name values are less than the number of formal parameters of the corresponding <emu-xref href="#function-object" id="_ref_2752"><a href="#function-object">function object</a></emu-xref> initially share their values with the corresponding argument bindings in the function's <emu-xref href="#sec-execution-contexts" id="_ref_2753"><a href="#sec-execution-contexts">execution context</a></emu-xref>.
This means that changing the property changes the corresponding value
of the argument binding and vice-versa. This correspondence is broken if
such a property is deleted and then redefined or if the property is
changed into an <emu-xref href="#sec-object-type" id="_ref_2754"><a href="#sec-object-type">accessor property</a></emu-xref>.
If the arguments object is an ordinary object, the values of its
properties are simply a copy of the arguments passed to the function and
there is no dynamic linkage between the property values and the formal
parameter values.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The ParameterMap object and its property values are used as a
device for specifying the arguments object correspondence to argument
bindings. The ParameterMap object and the objects that are the values of
its properties are not directly observable from ECMAScript code. An
ECMAScript implementation does not need to actually create or use such
objects to implement the specified semantics.</p>
</div></emu-note>
<emu-note><span class="note">Note 3</span><div class="note-contents">
<p>Ordinary arguments objects define a non-configurable <emu-xref href="#sec-object-type" id="_ref_2755"><a href="#sec-object-type">accessor property</a></emu-xref> named <code>"callee"</code> which throws a <emu-val>TypeError</emu-val> exception on access. The <code>"callee"</code>
property has a more specific meaning for arguments exotic objects,
which are created only for some class of non-strict functions. The
definition of this property in the ordinary variant exists to ensure
that it is not defined in any other manner by conforming ECMAScript
implementations.</p>
</div></emu-note>
<emu-note><span class="note">Note 4</span><div class="note-contents">
<p>ECMAScript implementations of arguments exotic objects have historically contained an <emu-xref href="#sec-object-type" id="_ref_2756"><a href="#sec-object-type">accessor property</a></emu-xref> named <code>"caller"</code>. Prior to ECMAScript 2017, this specification included the definition of a throwing <code>"caller"</code>
property on ordinary arguments objects. Since implementations do not
contain this extension any longer, ECMAScript 2017 dropped the
requirement for a throwing <code>"caller"</code> accessor.</p>
</div></emu-note>
<emu-clause id="sec-arguments-exotic-objects-getownproperty-p">
<h1><span class="secnum">9.4.4.1</span>[[GetOwnProperty]] ( <var>P</var> )</h1>
<p>The [[GetOwnProperty]] internal method of an arguments <emu-xref href="#exotic-object" id="_ref_2757"><a href="#exotic-object">exotic object</a></emu-xref> when called with a property key <var>P</var> performs the following steps:</p>
<emu-alg><ol><li>Let <var>args</var> be the arguments object.</li><li>Let <var>desc</var> be <emu-xref aoid="OrdinaryGetOwnProperty" id="_ref_2758"><a href="#sec-ordinarygetownproperty">OrdinaryGetOwnProperty</a></emu-xref>(<var>args</var>, <var>P</var>).</li><li>If <var>desc</var> is <emu-val>undefined</emu-val>, return <var>desc</var>.</li><li>Let <var>map</var> be <var>args</var>.[[ParameterMap]].</li><li>Let <var>isMapped</var> be !&nbsp;<emu-xref aoid="HasOwnProperty" id="_ref_2759"><a href="#sec-hasownproperty">HasOwnProperty</a></emu-xref>(<var>map</var>, <var>P</var>).</li><li>If <var>isMapped</var> is <emu-val>true</emu-val>, then<ol><li>Set <var>desc</var>.[[Value]] to <emu-xref aoid="Get" id="_ref_2760"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>map</var>, <var>P</var>).</li></ol></li><li>Return <var>desc</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-arguments-exotic-objects-defineownproperty-p-desc">
<h1><span class="secnum">9.4.4.2</span>[[DefineOwnProperty]] ( <var>P</var>, <var>Desc</var> )</h1>
<p>The [[DefineOwnProperty]] internal method of an arguments <emu-xref href="#exotic-object" id="_ref_2761"><a href="#exotic-object">exotic object</a></emu-xref> when called with a property key <var>P</var> and <emu-xref href="#sec-property-descriptor-specification-type" id="_ref_2762"><a href="#sec-property-descriptor-specification-type">Property Descriptor</a></emu-xref> <var>Desc</var> performs the following steps:</p>
<emu-alg><ol><li>Let <var>args</var> be the arguments object.</li><li>Let <var>map</var> be <var>args</var>.[[ParameterMap]].</li><li>Let <var>isMapped</var> be <emu-xref aoid="HasOwnProperty" id="_ref_2763"><a href="#sec-hasownproperty">HasOwnProperty</a></emu-xref>(<var>map</var>, <var>P</var>).</li><li>Let <var>newArgDesc</var> be <var>Desc</var>.</li><li>If <var>isMapped</var> is <emu-val>true</emu-val> and <emu-xref aoid="IsDataDescriptor" id="_ref_2764"><a href="#sec-isdatadescriptor">IsDataDescriptor</a></emu-xref>(<var>Desc</var>) is <emu-val>true</emu-val>, then<ol><li>If <var>Desc</var>.[[Value]] is not present and <var>Desc</var>.[[Writable]] is present and its value is <emu-val>false</emu-val>, then<ol><li>Set <var>newArgDesc</var> to a copy of <var>Desc</var>.</li><li>Set <var>newArgDesc</var>.[[Value]] to <emu-xref aoid="Get" id="_ref_2765"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>map</var>, <var>P</var>).</li></ol></li></ol></li><li>Let <var>allowed</var> be ?&nbsp;<emu-xref aoid="OrdinaryDefineOwnProperty" id="_ref_2766"><a href="#sec-ordinarydefineownproperty">OrdinaryDefineOwnProperty</a></emu-xref>(<var>args</var>, <var>P</var>, <var>newArgDesc</var>).</li><li>If <var>allowed</var> is <emu-val>false</emu-val>, return <emu-val>false</emu-val>.</li><li>If <var>isMapped</var> is <emu-val>true</emu-val>, then<ol><li>If <emu-xref aoid="IsAccessorDescriptor" id="_ref_2767"><a href="#sec-isaccessordescriptor">IsAccessorDescriptor</a></emu-xref>(<var>Desc</var>) is <emu-val>true</emu-val>, then<ol><li>Call <var>map</var>.[[Delete]](<var>P</var>).</li></ol></li><li>Else,<ol><li>If <var>Desc</var>.[[Value]] is present, then<ol><li>Let <var>setStatus</var> be <emu-xref aoid="Set" id="_ref_2768"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>map</var>, <var>P</var>, <var>Desc</var>.[[Value]], <emu-val>false</emu-val>).</li><li><emu-xref href="#assert" id="_ref_2769"><a href="#assert">Assert</a></emu-xref>: <var>setStatus</var> is <emu-val>true</emu-val> because formal parameters mapped by argument objects are always writable.</li></ol></li><li>If <var>Desc</var>.[[Writable]] is present and its value is <emu-val>false</emu-val>, then<ol><li>Call <var>map</var>.[[Delete]](<var>P</var>).</li></ol></li></ol></li></ol></li><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-arguments-exotic-objects-get-p-receiver">
<h1><span class="secnum">9.4.4.3</span>[[Get]] ( <var>P</var>, <var>Receiver</var> )</h1>
<p>The [[Get]] internal method of an arguments <emu-xref href="#exotic-object" id="_ref_2770"><a href="#exotic-object">exotic object</a></emu-xref> when called with a property key <var>P</var> and <emu-xref href="#sec-ecmascript-language-types" id="_ref_2771"><a href="#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref> <var>Receiver</var> performs the following steps:</p>
<emu-alg><ol><li>Let <var>args</var> be the arguments object.</li><li>Let <var>map</var> be <var>args</var>.[[ParameterMap]].</li><li>Let <var>isMapped</var> be !&nbsp;<emu-xref aoid="HasOwnProperty" id="_ref_2772"><a href="#sec-hasownproperty">HasOwnProperty</a></emu-xref>(<var>map</var>, <var>P</var>).</li><li>If <var>isMapped</var> is <emu-val>false</emu-val>, then<ol><li>Return ?&nbsp;<emu-xref aoid="OrdinaryGet" id="_ref_2773"><a href="#sec-ordinaryget">OrdinaryGet</a></emu-xref>(<var>args</var>, <var>P</var>, <var>Receiver</var>).</li></ol></li><li>Else <var>map</var> contains a formal parameter mapping for <var>P</var>,<ol><li>Return <emu-xref aoid="Get" id="_ref_2774"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>map</var>, <var>P</var>).
</li></ol></li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-arguments-exotic-objects-set-p-v-receiver">
<h1><span class="secnum">9.4.4.4</span>[[Set]] ( <var>P</var>, <var>V</var>, <var>Receiver</var> )</h1>
<p>The [[Set]] internal method of an arguments <emu-xref href="#exotic-object" id="_ref_2775"><a href="#exotic-object">exotic object</a></emu-xref> when called with property key <var>P</var>, value <var>V</var>, and <emu-xref href="#sec-ecmascript-language-types" id="_ref_2776"><a href="#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref> <var>Receiver</var> performs the following steps:</p>
<emu-alg><ol><li>Let <var>args</var> be the arguments object.</li><li>If <emu-xref aoid="SameValue" id="_ref_2777"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>args</var>, <var>Receiver</var>) is <emu-val>false</emu-val>, then<ol><li>Let <var>isMapped</var> be <emu-val>false</emu-val>.</li></ol></li><li>Else,<ol><li>Let <var>map</var> be <var>args</var>.[[ParameterMap]].</li><li>Let <var>isMapped</var> be !&nbsp;<emu-xref aoid="HasOwnProperty" id="_ref_2778"><a href="#sec-hasownproperty">HasOwnProperty</a></emu-xref>(<var>map</var>, <var>P</var>).</li></ol></li><li>If <var>isMapped</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>setStatus</var> be <emu-xref aoid="Set" id="_ref_2779"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>map</var>, <var>P</var>, <var>V</var>, <emu-val>false</emu-val>).</li><li><emu-xref href="#assert" id="_ref_2780"><a href="#assert">Assert</a></emu-xref>: <var>setStatus</var> is <emu-val>true</emu-val> because formal parameters mapped by argument objects are always writable.</li></ol></li><li>Return ?&nbsp;<emu-xref aoid="OrdinarySet" id="_ref_2781"><a href="#sec-ordinaryset">OrdinarySet</a></emu-xref>(<var>args</var>, <var>P</var>, <var>V</var>, <var>Receiver</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-arguments-exotic-objects-delete-p">
<h1><span class="secnum">9.4.4.5</span>[[Delete]] ( <var>P</var> )</h1>
<p>The [[Delete]] internal method of an arguments <emu-xref href="#exotic-object" id="_ref_2782"><a href="#exotic-object">exotic object</a></emu-xref> when called with a property key <var>P</var> performs the following steps:</p>
<emu-alg><ol><li>Let <var>args</var> be the arguments object.</li><li>Let <var>map</var> be <var>args</var>.[[ParameterMap]].</li><li>Let <var>isMapped</var> be !&nbsp;<emu-xref aoid="HasOwnProperty" id="_ref_2783"><a href="#sec-hasownproperty">HasOwnProperty</a></emu-xref>(<var>map</var>, <var>P</var>).</li><li>Let <var>result</var> be ?&nbsp;<emu-xref aoid="OrdinaryDelete" id="_ref_2784"><a href="#sec-ordinarydelete">OrdinaryDelete</a></emu-xref>(<var>args</var>, <var>P</var>).</li><li>If <var>result</var> is <emu-val>true</emu-val> and <var>isMapped</var> is <emu-val>true</emu-val>, then<ol><li>Call <var>map</var>.[[Delete]](<var>P</var>).</li></ol></li><li>Return <var>result</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-createunmappedargumentsobject" aoid="CreateUnmappedArgumentsObject">
<h1><span class="secnum">9.4.4.6</span>CreateUnmappedArgumentsObject ( <var>argumentsList</var> )</h1>
<p>The abstract operation CreateUnmappedArgumentsObject called with an argument <var>argumentsList</var> performs the following steps:</p>
<emu-alg><ol><li>Let <var>len</var> be the number of elements in <var>argumentsList</var>.</li><li>Let <var>obj</var> be <emu-xref aoid="ObjectCreate" id="_ref_2785"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_2786"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>, « [[ParameterMap]] »).</li><li>Set <var>obj</var>.[[ParameterMap]] to <emu-val>undefined</emu-val>.</li><li>Perform <emu-xref aoid="DefinePropertyOrThrow" id="_ref_2787"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>obj</var>, <code>"length"</code>, PropertyDescriptor { [[Value]]: <var>len</var>, [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }).</li><li>Let <var>index</var> be 0.</li><li>Repeat, while <var>index</var> &lt; <var>len</var>,<ol><li>Let <var>val</var> be <var>argumentsList</var>[<var>index</var>].</li><li>Perform <emu-xref aoid="CreateDataProperty" id="_ref_2788"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>obj</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_2789"><a href="#sec-tostring">ToString</a></emu-xref>(<var>index</var>), <var>val</var>).</li><li>Increase <var>index</var> by 1.</li></ol></li><li>Perform !&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_2790"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>obj</var>, @@iterator, PropertyDescriptor { [[Value]]: <emu-xref href="#sec-array.prototype.values" id="_ref_2791"><a href="#sec-array.prototype.values">%ArrayProto_values%</a></emu-xref>, [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }).</li><li>Perform !&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_2792"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>obj</var>, <code>"callee"</code>, PropertyDescriptor { [[Get]]: <emu-xref href="#sec-%throwtypeerror%" id="_ref_2793"><a href="#sec-%throwtypeerror%">%ThrowTypeError%</a></emu-xref>, [[Set]]: <emu-xref href="#sec-%throwtypeerror%" id="_ref_2794"><a href="#sec-%throwtypeerror%">%ThrowTypeError%</a></emu-xref>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }).</li><li>Return <var>obj</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-createmappedargumentsobject" aoid="CreateMappedArgumentsObject">
<h1><span class="secnum">9.4.4.7</span>CreateMappedArgumentsObject ( <var>func</var>, <var>formals</var>, <var>argumentsList</var>, <var>env</var> )</h1>
<p>The abstract operation CreateMappedArgumentsObject is called with object <var>func</var>, <emu-xref href="#sec-syntactic-grammar" id="_ref_2795"><a href="#sec-syntactic-grammar">Parse Node</a></emu-xref> <var>formals</var>, <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2796"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> <var>argumentsList</var>, and <emu-xref href="#sec-environment-records" id="_ref_2797"><a href="#sec-environment-records">Environment Record</a></emu-xref> <var>env</var>. The following steps are performed:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2798"><a href="#assert">Assert</a></emu-xref>: <var>formals</var> does not contain a rest parameter, any binding patterns, or any initializers. It may contain duplicate identifiers.</li><li>Let <var>len</var> be the number of elements in <var>argumentsList</var>.</li><li>Let <var>obj</var> be a newly created arguments <emu-xref href="#exotic-object" id="_ref_2799"><a href="#exotic-object">exotic object</a></emu-xref> with a [[ParameterMap]] internal slot.</li><li>Set <var>obj</var>.[[GetOwnProperty]] as specified in <emu-xref href="#sec-arguments-exotic-objects-getownproperty-p" id="_ref_218"><a href="#sec-arguments-exotic-objects-getownproperty-p">9.4.4.1</a></emu-xref>.</li><li>Set <var>obj</var>.[[DefineOwnProperty]] as specified in <emu-xref href="#sec-arguments-exotic-objects-defineownproperty-p-desc" id="_ref_219"><a href="#sec-arguments-exotic-objects-defineownproperty-p-desc">9.4.4.2</a></emu-xref>.</li><li>Set <var>obj</var>.[[Get]] as specified in <emu-xref href="#sec-arguments-exotic-objects-get-p-receiver" id="_ref_220"><a href="#sec-arguments-exotic-objects-get-p-receiver">9.4.4.3</a></emu-xref>.</li><li>Set <var>obj</var>.[[Set]] as specified in <emu-xref href="#sec-arguments-exotic-objects-set-p-v-receiver" id="_ref_221"><a href="#sec-arguments-exotic-objects-set-p-v-receiver">9.4.4.4</a></emu-xref>.</li><li>Set <var>obj</var>.[[Delete]] as specified in <emu-xref href="#sec-arguments-exotic-objects-delete-p" id="_ref_222"><a href="#sec-arguments-exotic-objects-delete-p">9.4.4.5</a></emu-xref>.</li><li>Set the remainder of <var>obj</var>'s essential internal methods to the default ordinary object definitions specified in <emu-xref href="#sec-ordinary-object-internal-methods-and-internal-slots" id="_ref_223"><a href="#sec-ordinary-object-internal-methods-and-internal-slots">9.1</a></emu-xref>.</li><li>Set <var>obj</var>.[[Prototype]] to <emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_2800"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>.</li><li>Set <var>obj</var>.[[Extensible]] to <emu-val>true</emu-val>.</li><li>Let <var>map</var> be <emu-xref aoid="ObjectCreate" id="_ref_2801"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-val>null</emu-val>).</li><li>Set <var>obj</var>.[[ParameterMap]] to <var>map</var>.</li><li>Let <var>parameterNames</var> be the BoundNames of <var>formals</var>.</li><li>Let <var>numberOfParameters</var> be the number of elements in <var>parameterNames</var>.</li><li>Let <var>index</var> be 0.</li><li>Repeat, while <var>index</var> &lt; <var>len</var>,<ol><li>Let <var>val</var> be <var>argumentsList</var>[<var>index</var>].</li><li>Perform <emu-xref aoid="CreateDataProperty" id="_ref_2802"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>obj</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_2803"><a href="#sec-tostring">ToString</a></emu-xref>(<var>index</var>), <var>val</var>).</li><li>Increase <var>index</var> by 1.</li></ol></li><li>Perform <emu-xref aoid="DefinePropertyOrThrow" id="_ref_2804"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>obj</var>, <code>"length"</code>, PropertyDescriptor { [[Value]]: <var>len</var>, [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }).</li><li>Let <var>mappedNames</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2805"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>index</var> be <var>numberOfParameters</var> - 1.</li><li>Repeat, while <var>index</var> ≥ 0,<ol><li>Let <var>name</var> be <var>parameterNames</var>[<var>index</var>].</li><li>If <var>name</var> is not an element of <var>mappedNames</var>, then<ol><li>Add <var>name</var> as an element of the list <var>mappedNames</var>.</li><li>If <var>index</var> &lt; <var>len</var>, then<ol><li>Let <var>g</var> be <emu-xref aoid="MakeArgGetter" id="_ref_2806"><a href="#sec-makearggetter">MakeArgGetter</a></emu-xref>(<var>name</var>, <var>env</var>).</li><li>Let <var>p</var> be <emu-xref aoid="MakeArgSetter" id="_ref_2807"><a href="#sec-makeargsetter">MakeArgSetter</a></emu-xref>(<var>name</var>, <var>env</var>).</li><li>Perform <var>map</var>.[[DefineOwnProperty]](! <emu-xref aoid="ToString" id="_ref_2808"><a href="#sec-tostring">ToString</a></emu-xref>(<var>index</var>), PropertyDescriptor { [[Set]]: <var>p</var>, [[Get]]: <var>g</var>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }).</li></ol></li></ol></li><li>Decrease <var>index</var> by 1.</li></ol></li><li>Perform !&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_2809"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>obj</var>, @@iterator, PropertyDescriptor { [[Value]]: <emu-xref href="#sec-array.prototype.values" id="_ref_2810"><a href="#sec-array.prototype.values">%ArrayProto_values%</a></emu-xref>, [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }).</li><li>Perform !&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_2811"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>obj</var>, <code>"callee"</code>, PropertyDescriptor { [[Value]]: <var>func</var>, [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }).</li><li>Return <var>obj</var>.
</li></ol></emu-alg>
<emu-clause id="sec-makearggetter" aoid="MakeArgGetter">
<h1><span class="secnum">9.4.4.7.1</span>MakeArgGetter ( <var>name</var>, <var>env</var> )</h1>
<p>The abstract operation MakeArgGetter called with String <var>name</var> and <emu-xref href="#sec-environment-records" id="_ref_2812"><a href="#sec-environment-records">Environment Record</a></emu-xref> <var>env</var> creates a built-in <emu-xref href="#function-object" id="_ref_2813"><a href="#function-object">function object</a></emu-xref> that when executed returns the value bound for <var>name</var> in <var>env</var>. It performs the following steps:</p>
<emu-alg><ol><li>Let <var>steps</var> be the steps of an ArgGetter function as specified below.</li><li>Let <var>getter</var> be <emu-xref aoid="CreateBuiltinFunction" id="_ref_2814"><a href="#sec-createbuiltinfunction">CreateBuiltinFunction</a></emu-xref>(<var>steps</var>, « [[Name]], [[Env]] »).</li><li>Set <var>getter</var>.[[Name]] to <var>name</var>.</li><li>Set <var>getter</var>.[[Env]] to <var>env</var>.</li><li>Return <var>getter</var>.
</li></ol></emu-alg>
<p>An ArgGetter function is an anonymous built-in function
with [[Name]] and [[Env]] internal slots. When an ArgGetter function
that expects no arguments is called it performs the following steps:</p>
<emu-alg><ol><li>Let <var>f</var> be the <emu-xref href="#active-function-object" id="_ref_2815"><a href="#active-function-object">active function object</a></emu-xref>.</li><li>Let <var>name</var> be <var>f</var>.[[Name]].</li><li>Let <var>env</var> be <var>f</var>.[[Env]].</li><li>Return <var>env</var>.GetBindingValue(<var>name</var>, <emu-val>false</emu-val>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>ArgGetter functions are never directly accessible to ECMAScript code.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-makeargsetter" aoid="MakeArgSetter">
<h1><span class="secnum">9.4.4.7.2</span>MakeArgSetter ( <var>name</var>, <var>env</var> )</h1>
<p>The abstract operation MakeArgSetter called with String <var>name</var> and <emu-xref href="#sec-environment-records" id="_ref_2816"><a href="#sec-environment-records">Environment Record</a></emu-xref> <var>env</var> creates a built-in <emu-xref href="#function-object" id="_ref_2817"><a href="#function-object">function object</a></emu-xref> that when executed sets the value bound for <var>name</var> in <var>env</var>. It performs the following steps:</p>
<emu-alg><ol><li>Let <var>steps</var> be the steps of an ArgSetter function as specified below.</li><li>Let <var>setter</var> be <emu-xref aoid="CreateBuiltinFunction" id="_ref_2818"><a href="#sec-createbuiltinfunction">CreateBuiltinFunction</a></emu-xref>(<var>steps</var>, « [[Name]], [[Env]] »).</li><li>Set <var>setter</var>.[[Name]] to <var>name</var>.</li><li>Set <var>setter</var>.[[Env]] to <var>env</var>.</li><li>Return <var>setter</var>.
</li></ol></emu-alg>
<p>An ArgSetter function is an anonymous built-in function
with [[Name]] and [[Env]] internal slots. When an ArgSetter function is
called with argument <var>value</var> it performs the following steps:</p>
<emu-alg><ol><li>Let <var>f</var> be the <emu-xref href="#active-function-object" id="_ref_2819"><a href="#active-function-object">active function object</a></emu-xref>.</li><li>Let <var>name</var> be <var>f</var>.[[Name]].</li><li>Let <var>env</var> be <var>f</var>.[[Env]].</li><li>Return <var>env</var>.SetMutableBinding(<var>name</var>, <var>value</var>, <emu-val>false</emu-val>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>ArgSetter functions are never directly accessible to ECMAScript code.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-integer-indexed-exotic-objects">
<h1><span class="secnum">9.4.5</span>Integer-Indexed Exotic Objects</h1>
<p>An <dfn id="integer-indexed-exotic-object">Integer-Indexed exotic object</dfn> is an <emu-xref href="#exotic-object" id="_ref_2820"><a href="#exotic-object">exotic object</a></emu-xref> that performs special handling of <emu-xref href="#integer-index" id="_ref_2821"><a href="#integer-index">integer index</a></emu-xref> property keys.</p>
<p><emu-xref href="#integer-indexed-exotic-object" id="_ref_224"><a href="#integer-indexed-exotic-object">Integer-Indexed exotic objects</a></emu-xref>
have the same internal slots as ordinary objects and additionally
[[ViewedArrayBuffer]], [[ArrayLength]], [[ByteOffset]], and
[[TypedArrayName]] internal slots.</p>
<p><emu-xref href="#integer-indexed-exotic-object" id="_ref_225"><a href="#integer-indexed-exotic-object">Integer-Indexed exotic objects</a></emu-xref> provide alternative definitions for the following internal methods. All of the other <emu-xref href="#integer-indexed-exotic-object" id="_ref_2822"><a href="#integer-indexed-exotic-object">Integer-Indexed exotic object</a></emu-xref> essential internal methods that are not defined below are as specified in <emu-xref href="#sec-ordinary-object-internal-methods-and-internal-slots" id="_ref_226"><a href="#sec-ordinary-object-internal-methods-and-internal-slots">9.1</a></emu-xref>.</p>
<emu-clause id="sec-integer-indexed-exotic-objects-getownproperty-p">
<h1><span class="secnum">9.4.5.1</span>[[GetOwnProperty]] ( <var>P</var> )</h1>
<p>When the [[GetOwnProperty]] internal method of an <emu-xref href="#integer-indexed-exotic-object" id="_ref_2823"><a href="#integer-indexed-exotic-object">Integer-Indexed exotic object</a></emu-xref> <var>O</var> is called with property key <var>P</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2824"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPropertyKey" id="_ref_2825"><a href="#sec-ispropertykey">IsPropertyKey</a></emu-xref>(<var>P</var>) is <emu-val>true</emu-val>.</li><li><emu-xref href="#assert" id="_ref_2826"><a href="#assert">Assert</a></emu-xref>: <var>O</var> is an Object that has a [[ViewedArrayBuffer]] internal slot.</li><li>If <emu-xref aoid="Type" id="_ref_2827"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>P</var>) is String, then<ol><li>Let <var>numericIndex</var> be !&nbsp;<emu-xref aoid="CanonicalNumericIndexString" id="_ref_2828"><a href="#sec-canonicalnumericindexstring">CanonicalNumericIndexString</a></emu-xref>(<var>P</var>).</li><li>If <var>numericIndex</var> is not <emu-val>undefined</emu-val>, then<ol><li>Let <var>value</var> be ?&nbsp;<emu-xref aoid="IntegerIndexedElementGet" id="_ref_2829"><a href="#sec-integerindexedelementget">IntegerIndexedElementGet</a></emu-xref>(<var>O</var>, <var>numericIndex</var>).</li><li>If <var>value</var> is <emu-val>undefined</emu-val>, return <emu-val>undefined</emu-val>.</li><li>Return a PropertyDescriptor { [[Value]]: <var>value</var>, [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>true</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</li></ol></li></ol></li><li>Return <emu-xref aoid="OrdinaryGetOwnProperty" id="_ref_2830"><a href="#sec-ordinarygetownproperty">OrdinaryGetOwnProperty</a></emu-xref>(<var>O</var>, <var>P</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-integer-indexed-exotic-objects-hasproperty-p">
<h1><span class="secnum">9.4.5.2</span>[[HasProperty]] ( <var>P</var> )</h1>
<p>When the [[HasProperty]] internal method of an <emu-xref href="#integer-indexed-exotic-object" id="_ref_2831"><a href="#integer-indexed-exotic-object">Integer-Indexed exotic object</a></emu-xref> <var>O</var> is called with property key <var>P</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2832"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPropertyKey" id="_ref_2833"><a href="#sec-ispropertykey">IsPropertyKey</a></emu-xref>(<var>P</var>) is <emu-val>true</emu-val>.</li><li><emu-xref href="#assert" id="_ref_2834"><a href="#assert">Assert</a></emu-xref>: <var>O</var> is an Object that has a [[ViewedArrayBuffer]] internal slot.</li><li>If <emu-xref aoid="Type" id="_ref_2835"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>P</var>) is String, then<ol><li>Let <var>numericIndex</var> be !&nbsp;<emu-xref aoid="CanonicalNumericIndexString" id="_ref_2836"><a href="#sec-canonicalnumericindexstring">CanonicalNumericIndexString</a></emu-xref>(<var>P</var>).</li><li>If <var>numericIndex</var> is not <emu-val>undefined</emu-val>, then<ol><li>Let <var>buffer</var> be <var>O</var>.[[ViewedArrayBuffer]].</li><li>If <emu-xref aoid="IsDetachedBuffer" id="_ref_2837"><a href="#sec-isdetachedbuffer">IsDetachedBuffer</a></emu-xref>(<var>buffer</var>) is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <emu-xref aoid="IsInteger" id="_ref_2838"><a href="#sec-isinteger">IsInteger</a></emu-xref>(<var>numericIndex</var>) is <emu-val>false</emu-val>, return <emu-val>false</emu-val>.</li><li>If <var>numericIndex</var> = <emu-val>-0</emu-val>, return <emu-val>false</emu-val>.</li><li>If <var>numericIndex</var> &lt; 0, return <emu-val>false</emu-val>.</li><li>If <var>numericIndex</var> ≥ <var>O</var>.[[ArrayLength]], return <emu-val>false</emu-val>.</li><li>Return <emu-val>true</emu-val>.</li></ol></li></ol></li><li>Return ?&nbsp;<emu-xref aoid="OrdinaryHasProperty" id="_ref_2839"><a href="#sec-ordinaryhasproperty">OrdinaryHasProperty</a></emu-xref>(<var>O</var>, <var>P</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-integer-indexed-exotic-objects-defineownproperty-p-desc">
<h1><span class="secnum">9.4.5.3</span>[[DefineOwnProperty]] ( <var>P</var>, <var>Desc</var> )</h1>
<p>When the [[DefineOwnProperty]] internal method of an <emu-xref href="#integer-indexed-exotic-object" id="_ref_2840"><a href="#integer-indexed-exotic-object">Integer-Indexed exotic object</a></emu-xref> <var>O</var> is called with property key <var>P</var>, and <emu-xref href="#sec-property-descriptor-specification-type" id="_ref_2841"><a href="#sec-property-descriptor-specification-type">Property Descriptor</a></emu-xref> <var>Desc</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2842"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPropertyKey" id="_ref_2843"><a href="#sec-ispropertykey">IsPropertyKey</a></emu-xref>(<var>P</var>) is <emu-val>true</emu-val>.</li><li><emu-xref href="#assert" id="_ref_2844"><a href="#assert">Assert</a></emu-xref>: <var>O</var> is an Object that has a [[ViewedArrayBuffer]] internal slot.</li><li>If <emu-xref aoid="Type" id="_ref_2845"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>P</var>) is String, then<ol><li>Let <var>numericIndex</var> be !&nbsp;<emu-xref aoid="CanonicalNumericIndexString" id="_ref_2846"><a href="#sec-canonicalnumericindexstring">CanonicalNumericIndexString</a></emu-xref>(<var>P</var>).</li><li>If <var>numericIndex</var> is not <emu-val>undefined</emu-val>, then<ol><li>If <emu-xref aoid="IsInteger" id="_ref_2847"><a href="#sec-isinteger">IsInteger</a></emu-xref>(<var>numericIndex</var>) is <emu-val>false</emu-val>, return <emu-val>false</emu-val>.</li><li>If <var>numericIndex</var> = <emu-val>-0</emu-val>, return <emu-val>false</emu-val>.</li><li>If <var>numericIndex</var> &lt; 0, return <emu-val>false</emu-val>.</li><li>Let <var>length</var> be <var>O</var>.[[ArrayLength]].</li><li>If <var>numericIndex</var> ≥ <var>length</var>, return <emu-val>false</emu-val>.</li><li>If <emu-xref aoid="IsAccessorDescriptor" id="_ref_2848"><a href="#sec-isaccessordescriptor">IsAccessorDescriptor</a></emu-xref>(<var>Desc</var>) is <emu-val>true</emu-val>, return <emu-val>false</emu-val>.</li><li>If <var>Desc</var> has a [[Configurable]] field and if <var>Desc</var>.[[Configurable]] is <emu-val>true</emu-val>, return <emu-val>false</emu-val>.</li><li>If <var>Desc</var> has an [[Enumerable]] field and if <var>Desc</var>.[[Enumerable]] is <emu-val>false</emu-val>, return <emu-val>false</emu-val>.</li><li>If <var>Desc</var> has a [[Writable]] field and if <var>Desc</var>.[[Writable]] is <emu-val>false</emu-val>, return <emu-val>false</emu-val>.</li><li>If <var>Desc</var> has a [[Value]] field, then<ol><li>Let <var>value</var> be <var>Desc</var>.[[Value]].</li><li>Return ?&nbsp;<emu-xref aoid="IntegerIndexedElementSet" id="_ref_2849"><a href="#sec-integerindexedelementset">IntegerIndexedElementSet</a></emu-xref>(<var>O</var>, <var>numericIndex</var>, <var>value</var>).</li></ol></li><li>Return <emu-val>true</emu-val>.</li></ol></li></ol></li><li>Return !&nbsp;<emu-xref aoid="OrdinaryDefineOwnProperty" id="_ref_2850"><a href="#sec-ordinarydefineownproperty">OrdinaryDefineOwnProperty</a></emu-xref>(<var>O</var>, <var>P</var>, <var>Desc</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-integer-indexed-exotic-objects-get-p-receiver">
<h1><span class="secnum">9.4.5.4</span>[[Get]] ( <var>P</var>, <var>Receiver</var> )</h1>
<p>When the [[Get]] internal method of an <emu-xref href="#integer-indexed-exotic-object" id="_ref_2851"><a href="#integer-indexed-exotic-object">Integer-Indexed exotic object</a></emu-xref> <var>O</var> is called with property key <var>P</var> and <emu-xref href="#sec-ecmascript-language-types" id="_ref_2852"><a href="#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref> <var>Receiver</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2853"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPropertyKey" id="_ref_2854"><a href="#sec-ispropertykey">IsPropertyKey</a></emu-xref>(<var>P</var>) is <emu-val>true</emu-val>.</li><li>If <emu-xref aoid="Type" id="_ref_2855"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>P</var>) is String, then<ol><li>Let <var>numericIndex</var> be !&nbsp;<emu-xref aoid="CanonicalNumericIndexString" id="_ref_2856"><a href="#sec-canonicalnumericindexstring">CanonicalNumericIndexString</a></emu-xref>(<var>P</var>).</li><li>If <var>numericIndex</var> is not <emu-val>undefined</emu-val>, then<ol><li>Return ?&nbsp;<emu-xref aoid="IntegerIndexedElementGet" id="_ref_2857"><a href="#sec-integerindexedelementget">IntegerIndexedElementGet</a></emu-xref>(<var>O</var>, <var>numericIndex</var>).</li></ol></li></ol></li><li>Return ?&nbsp;<emu-xref aoid="OrdinaryGet" id="_ref_2858"><a href="#sec-ordinaryget">OrdinaryGet</a></emu-xref>(<var>O</var>, <var>P</var>, <var>Receiver</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-integer-indexed-exotic-objects-set-p-v-receiver">
<h1><span class="secnum">9.4.5.5</span>[[Set]] ( <var>P</var>, <var>V</var>, <var>Receiver</var> )</h1>
<p>When the [[Set]] internal method of an <emu-xref href="#integer-indexed-exotic-object" id="_ref_2859"><a href="#integer-indexed-exotic-object">Integer-Indexed exotic object</a></emu-xref> <var>O</var> is called with property key <var>P</var>, value <var>V</var>, and <emu-xref href="#sec-ecmascript-language-types" id="_ref_2860"><a href="#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref> <var>Receiver</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2861"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPropertyKey" id="_ref_2862"><a href="#sec-ispropertykey">IsPropertyKey</a></emu-xref>(<var>P</var>) is <emu-val>true</emu-val>.</li><li>If <emu-xref aoid="Type" id="_ref_2863"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>P</var>) is String, then<ol><li>Let <var>numericIndex</var> be !&nbsp;<emu-xref aoid="CanonicalNumericIndexString" id="_ref_2864"><a href="#sec-canonicalnumericindexstring">CanonicalNumericIndexString</a></emu-xref>(<var>P</var>).</li><li>If <var>numericIndex</var> is not <emu-val>undefined</emu-val>, then<ol><li>Return ?&nbsp;<emu-xref aoid="IntegerIndexedElementSet" id="_ref_2865"><a href="#sec-integerindexedelementset">IntegerIndexedElementSet</a></emu-xref>(<var>O</var>, <var>numericIndex</var>, <var>V</var>).</li></ol></li></ol></li><li>Return ?&nbsp;<emu-xref aoid="OrdinarySet" id="_ref_2866"><a href="#sec-ordinaryset">OrdinarySet</a></emu-xref>(<var>O</var>, <var>P</var>, <var>V</var>, <var>Receiver</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-integer-indexed-exotic-objects-ownpropertykeys">
<h1><span class="secnum">9.4.5.6</span>[[OwnPropertyKeys]] ( )</h1>
<p>When the [[OwnPropertyKeys]] internal method of an <emu-xref href="#integer-indexed-exotic-object" id="_ref_2867"><a href="#integer-indexed-exotic-object">Integer-Indexed exotic object</a></emu-xref> <var>O</var> is called, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>keys</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2868"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li><emu-xref href="#assert" id="_ref_2869"><a href="#assert">Assert</a></emu-xref>: <var>O</var> is an Object that has [[ViewedArrayBuffer]], [[ArrayLength]], [[ByteOffset]], and [[TypedArrayName]] internal slots.</li><li>Let <var>len</var> be <var>O</var>.[[ArrayLength]].</li><li>For each integer <var>i</var> starting with 0 such that <var>i</var> &lt; <var>len</var>, in ascending order, do<ol><li>Add !&nbsp;<emu-xref aoid="ToString" id="_ref_2870"><a href="#sec-tostring">ToString</a></emu-xref>(<var>i</var>) as the last element of <var>keys</var>.</li></ol></li><li>For each own property key <var>P</var> of <var>O</var> such that <emu-xref aoid="Type" id="_ref_2871"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>P</var>) is String and <var>P</var> is not an <emu-xref href="#integer-index" id="_ref_2872"><a href="#integer-index">integer index</a></emu-xref>, in ascending chronological order of property creation, do<ol><li>Add <var>P</var> as the last element of <var>keys</var>.</li></ol></li><li>For each own property key <var>P</var> of <var>O</var> such that <emu-xref aoid="Type" id="_ref_2873"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>P</var>) is Symbol, in ascending chronological order of property creation, do<ol><li>Add <var>P</var> as the last element of <var>keys</var>.</li></ol></li><li>Return <var>keys</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-integerindexedobjectcreate" aoid="IntegerIndexedObjectCreate">
<h1><span class="secnum">9.4.5.7</span>IntegerIndexedObjectCreate ( <var>prototype</var>, <var>internalSlotsList</var> )</h1>
<p>The abstract operation IntegerIndexedObjectCreate with arguments <var>prototype</var> and <var>internalSlotsList</var> is used to specify the creation of new <emu-xref href="#integer-indexed-exotic-object" id="_ref_227"><a href="#integer-indexed-exotic-object">Integer-Indexed exotic objects</a></emu-xref>. The argument <var>internalSlotsList</var> is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2874"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>
of the names of additional internal slots that must be defined as part
of the object. IntegerIndexedObjectCreate performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2875"><a href="#assert">Assert</a></emu-xref>: <var>internalSlotsList</var> contains the names [[ViewedArrayBuffer]], [[ArrayLength]], [[ByteOffset]], and [[TypedArrayName]].</li><li>Let <var>A</var> be a newly created object with an internal slot for each name in <var>internalSlotsList</var>.</li><li>Set <var>A</var>'s essential internal methods to the default ordinary object definitions specified in <emu-xref href="#sec-ordinary-object-internal-methods-and-internal-slots" id="_ref_228"><a href="#sec-ordinary-object-internal-methods-and-internal-slots">9.1</a></emu-xref>.</li><li>Set <var>A</var>.[[GetOwnProperty]] as specified in <emu-xref href="#sec-integer-indexed-exotic-objects-getownproperty-p" id="_ref_229"><a href="#sec-integer-indexed-exotic-objects-getownproperty-p">9.4.5.1</a></emu-xref>.</li><li>Set <var>A</var>.[[HasProperty]] as specified in <emu-xref href="#sec-integer-indexed-exotic-objects-hasproperty-p" id="_ref_230"><a href="#sec-integer-indexed-exotic-objects-hasproperty-p">9.4.5.2</a></emu-xref>.</li><li>Set <var>A</var>.[[DefineOwnProperty]] as specified in <emu-xref href="#sec-integer-indexed-exotic-objects-defineownproperty-p-desc" id="_ref_231"><a href="#sec-integer-indexed-exotic-objects-defineownproperty-p-desc">9.4.5.3</a></emu-xref>.</li><li>Set <var>A</var>.[[Get]] as specified in <emu-xref href="#sec-integer-indexed-exotic-objects-get-p-receiver" id="_ref_232"><a href="#sec-integer-indexed-exotic-objects-get-p-receiver">9.4.5.4</a></emu-xref>.</li><li>Set <var>A</var>.[[Set]] as specified in <emu-xref href="#sec-integer-indexed-exotic-objects-set-p-v-receiver" id="_ref_233"><a href="#sec-integer-indexed-exotic-objects-set-p-v-receiver">9.4.5.5</a></emu-xref>.</li><li>Set <var>A</var>.[[OwnPropertyKeys]] as specified in <emu-xref href="#sec-integer-indexed-exotic-objects-ownpropertykeys" id="_ref_234"><a href="#sec-integer-indexed-exotic-objects-ownpropertykeys">9.4.5.6</a></emu-xref>.</li><li>Set <var>A</var>.[[Prototype]] to <var>prototype</var>.</li><li>Set <var>A</var>.[[Extensible]] to <emu-val>true</emu-val>.</li><li>Return <var>A</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-integerindexedelementget" aoid="IntegerIndexedElementGet">
<h1><span class="secnum">9.4.5.8</span>IntegerIndexedElementGet ( <var>O</var>, <var>index</var> )</h1>
<p>The abstract operation IntegerIndexedElementGet with arguments <var>O</var> and <var>index</var> performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2876"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_2877"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>index</var>) is Number.</li><li><emu-xref href="#assert" id="_ref_2878"><a href="#assert">Assert</a></emu-xref>: <var>O</var> is an Object that has [[ViewedArrayBuffer]], [[ArrayLength]], [[ByteOffset]], and [[TypedArrayName]] internal slots.</li><li>Let <var>buffer</var> be <var>O</var>.[[ViewedArrayBuffer]].</li><li>If <emu-xref aoid="IsDetachedBuffer" id="_ref_2879"><a href="#sec-isdetachedbuffer">IsDetachedBuffer</a></emu-xref>(<var>buffer</var>) is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <emu-xref aoid="IsInteger" id="_ref_2880"><a href="#sec-isinteger">IsInteger</a></emu-xref>(<var>index</var>) is <emu-val>false</emu-val>, return <emu-val>undefined</emu-val>.</li><li>If <var>index</var> = <emu-val>-0</emu-val>, return <emu-val>undefined</emu-val>.</li><li>Let <var>length</var> be <var>O</var>.[[ArrayLength]].</li><li>If <var>index</var> &lt; 0 or <var>index</var> ≥ <var>length</var>, return <emu-val>undefined</emu-val>.</li><li>Let <var>offset</var> be <var>O</var>.[[ByteOffset]].</li><li>Let <var>arrayTypeName</var> be the String value of <var>O</var>.[[TypedArrayName]].</li><li>Let <var>elementSize</var> be the Number value of the Element Size value specified in <emu-xref href="#table-49" id="_ref_235"><a href="#table-49">Table 59</a></emu-xref> for <var>arrayTypeName</var>.</li><li>Let <var>indexedPosition</var> be (<var>index</var> × <var>elementSize</var>) + <var>offset</var>.</li><li>Let <var>elementType</var> be the String value of the Element Type value in <emu-xref href="#table-49" id="_ref_236"><a href="#table-49">Table 59</a></emu-xref> for <var>arrayTypeName</var>.</li><li>Return <emu-xref aoid="GetValueFromBuffer" id="_ref_2881"><a href="#sec-getvaluefrombuffer">GetValueFromBuffer</a></emu-xref>(<var>buffer</var>, <var>indexedPosition</var>, <var>elementType</var>, <emu-val>true</emu-val>, <code>"Unordered"</code>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-integerindexedelementset" aoid="IntegerIndexedElementSet">
<h1><span class="secnum">9.4.5.9</span>IntegerIndexedElementSet ( <var>O</var>, <var>index</var>, <var>value</var> )</h1>
<p>The abstract operation IntegerIndexedElementSet with arguments <var>O</var>, <var>index</var>, and <var>value</var> performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2882"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_2883"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>index</var>) is Number.</li><li><emu-xref href="#assert" id="_ref_2884"><a href="#assert">Assert</a></emu-xref>: <var>O</var> is an Object that has [[ViewedArrayBuffer]], [[ArrayLength]], [[ByteOffset]], and [[TypedArrayName]] internal slots.</li><li>Let <var>numValue</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_2885"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>value</var>).</li><li>Let <var>buffer</var> be <var>O</var>.[[ViewedArrayBuffer]].</li><li>If <emu-xref aoid="IsDetachedBuffer" id="_ref_2886"><a href="#sec-isdetachedbuffer">IsDetachedBuffer</a></emu-xref>(<var>buffer</var>) is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <emu-xref aoid="IsInteger" id="_ref_2887"><a href="#sec-isinteger">IsInteger</a></emu-xref>(<var>index</var>) is <emu-val>false</emu-val>, return <emu-val>false</emu-val>.</li><li>If <var>index</var> = <emu-val>-0</emu-val>, return <emu-val>false</emu-val>.</li><li>Let <var>length</var> be <var>O</var>.[[ArrayLength]].</li><li>If <var>index</var> &lt; 0 or <var>index</var> ≥ <var>length</var>, return <emu-val>false</emu-val>.</li><li>Let <var>offset</var> be <var>O</var>.[[ByteOffset]].</li><li>Let <var>arrayTypeName</var> be the String value of <var>O</var>.[[TypedArrayName]].</li><li>Let <var>elementSize</var> be the Number value of the Element Size value specified in <emu-xref href="#table-49" id="_ref_237"><a href="#table-49">Table 59</a></emu-xref> for <var>arrayTypeName</var>.</li><li>Let <var>indexedPosition</var> be (<var>index</var> × <var>elementSize</var>) + <var>offset</var>.</li><li>Let <var>elementType</var> be the String value of the Element Type value in <emu-xref href="#table-49" id="_ref_238"><a href="#table-49">Table 59</a></emu-xref> for <var>arrayTypeName</var>.</li><li>Perform <emu-xref aoid="SetValueInBuffer" id="_ref_2888"><a href="#sec-setvalueinbuffer">SetValueInBuffer</a></emu-xref>(<var>buffer</var>, <var>indexedPosition</var>, <var>elementType</var>, <var>numValue</var>, <emu-val>true</emu-val>, <code>"Unordered"</code>).</li><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-module-namespace-exotic-objects">
<h1><span class="secnum">9.4.6</span>Module Namespace Exotic Objects</h1>
<p>A <em>module namespace object</em> is an <emu-xref href="#exotic-object" id="_ref_2889"><a href="#exotic-object">exotic object</a></emu-xref> that exposes the bindings exported from an ECMAScript <emu-nt id="_ref_9093"><a href="#prod-Module">Module</a></emu-nt> (See <emu-xref href="#sec-exports" id="_ref_239"><a href="#sec-exports">15.2.3</a></emu-xref>). There is a one-to-one correspondence between the String-keyed own properties of a module namespace <emu-xref href="#exotic-object" id="_ref_2890"><a href="#exotic-object">exotic object</a></emu-xref> and the binding names exported by the <emu-nt id="_ref_9094"><a href="#prod-Module">Module</a></emu-nt>. The exported bindings include any bindings that are indirectly exported using <code>export *</code>
export items. Each String-valued own property key is the StringValue of
the corresponding exported binding name. These are the only
String-keyed properties of a module namespace <emu-xref href="#exotic-object" id="_ref_2891"><a href="#exotic-object">exotic object</a></emu-xref>. Each such property has the attributes { [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>true</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }. Module namespace objects are not extensible.</p>
<p>Module namespace objects have the internal slots defined in <emu-xref href="#table-29" id="_ref_240"><a href="#table-29">Table 29</a></emu-xref>.</p>
<emu-table id="table-29" caption="Internal Slots of Module Namespace Exotic Objects"><figure><figcaption>Table 29: Internal Slots of Module Namespace Exotic Objects</figcaption>
<table>
<tbody>
<tr>
<th>
Internal Slot
</th>
<th>
Type
</th>
<th>
Description
</th>
</tr>
<tr>
<td>
[[Module]]
</td>
<td>
<emu-xref href="#sec-abstract-module-records" id="_ref_2892"><a href="#sec-abstract-module-records">Module Record</a></emu-xref>
</td>
<td>
The <emu-xref href="#sec-abstract-module-records" id="_ref_2893"><a href="#sec-abstract-module-records">Module Record</a></emu-xref> whose exports this namespace exposes.
</td>
</tr>
<tr>
<td>
[[Exports]]
</td>
<td>
<emu-xref href="#sec-list-and-record-specification-type" id="_ref_2894"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of String
</td>
<td>
A <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2895"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>
containing the String values of the exported names exposed as own
properties of this object. The list is ordered as if an Array of those
String values had been sorted using <code>Array.prototype.sort</code> using <emu-val>undefined</emu-val> as <var>comparefn</var>.
</td>
</tr>
<tr>
<td>
[[Prototype]]
</td>
<td>
Null
</td>
<td>
This slot always contains the value <emu-val>null</emu-val> (see <emu-xref href="#sec-module-namespace-exotic-objects-setprototypeof-v" id="_ref_241"><a href="#sec-module-namespace-exotic-objects-setprototypeof-v">9.4.6.1</a></emu-xref>).
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<p>Module namespace exotic objects provide alternative definitions
for all of the internal methods except [[GetPrototypeOf]], which
behaves as defined in <emu-xref href="#sec-ordinary-object-internal-methods-and-internal-slots-getprototypeof" id="_ref_242"><a href="#sec-ordinary-object-internal-methods-and-internal-slots-getprototypeof">9.1.1</a></emu-xref>.</p>
<emu-clause id="sec-module-namespace-exotic-objects-setprototypeof-v">
<h1><span class="secnum">9.4.6.1</span>[[SetPrototypeOf]] ( <var>V</var> )</h1>
<p>When the [[SetPrototypeOf]] internal method of a module namespace <emu-xref href="#exotic-object" id="_ref_2896"><a href="#exotic-object">exotic object</a></emu-xref> <var>O</var> is called with argument <var>V</var>, the following steps are taken:</p>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="SetImmutablePrototype" id="_ref_2897"><a href="#sec-set-immutable-prototype">SetImmutablePrototype</a></emu-xref>(<var>O</var>, <var>V</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-module-namespace-exotic-objects-isextensible">
<h1><span class="secnum">9.4.6.2</span>[[IsExtensible]] ( )</h1>
<p>When the [[IsExtensible]] internal method of a module namespace <emu-xref href="#exotic-object" id="_ref_2898"><a href="#exotic-object">exotic object</a></emu-xref> <var>O</var> is called, the following steps are taken:</p>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-module-namespace-exotic-objects-preventextensions">
<h1><span class="secnum">9.4.6.3</span>[[PreventExtensions]] ( )</h1>
<p>When the [[PreventExtensions]] internal method of a module namespace <emu-xref href="#exotic-object" id="_ref_2899"><a href="#exotic-object">exotic object</a></emu-xref> <var>O</var> is called, the following steps are taken:</p>
<emu-alg><ol><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-module-namespace-exotic-objects-getownproperty-p">
<h1><span class="secnum">9.4.6.4</span>[[GetOwnProperty]] ( <var>P</var> )</h1>
<p>When the [[GetOwnProperty]] internal method of a module namespace <emu-xref href="#exotic-object" id="_ref_2900"><a href="#exotic-object">exotic object</a></emu-xref> <var>O</var> is called with property key <var>P</var>, the following steps are taken:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_2901"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>P</var>) is Symbol, return <emu-xref aoid="OrdinaryGetOwnProperty" id="_ref_2902"><a href="#sec-ordinarygetownproperty">OrdinaryGetOwnProperty</a></emu-xref>(<var>O</var>, <var>P</var>).</li><li>Let <var>exports</var> be <var>O</var>.[[Exports]].</li><li>If <var>P</var> is not an element of <var>exports</var>, return <emu-val>undefined</emu-val>.</li><li>Let <var>value</var> be ? <var>O</var>.[[Get]](<var>P</var>, <var>O</var>).</li><li>Return PropertyDescriptor { [[Value]]: <var>value</var>, [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>true</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-module-namespace-exotic-objects-defineownproperty-p-desc">
<h1><span class="secnum">9.4.6.5</span>[[DefineOwnProperty]] ( <var>P</var>, <var>Desc</var> )</h1>
<p>When the [[DefineOwnProperty]] internal method of a module namespace <emu-xref href="#exotic-object" id="_ref_2903"><a href="#exotic-object">exotic object</a></emu-xref> <var>O</var> is called with property key <var>P</var> and <emu-xref href="#sec-property-descriptor-specification-type" id="_ref_2904"><a href="#sec-property-descriptor-specification-type">Property Descriptor</a></emu-xref> <var>Desc</var>, the following steps are taken:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_2905"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>P</var>) is Symbol, return <emu-xref aoid="OrdinaryDefineOwnProperty" id="_ref_2906"><a href="#sec-ordinarydefineownproperty">OrdinaryDefineOwnProperty</a></emu-xref>(<var>O</var>, <var>P</var>, <var>Desc</var>).</li><li>Let <var>current</var> be ? <var>O</var>.[[GetOwnProperty]](<var>P</var>).</li><li>If <var>current</var> is <emu-val>undefined</emu-val>, return <emu-val>false</emu-val>.</li><li>If <emu-xref aoid="IsAccessorDescriptor" id="_ref_2907"><a href="#sec-isaccessordescriptor">IsAccessorDescriptor</a></emu-xref>(<var>Desc</var>) is <emu-val>true</emu-val>, return <emu-val>false</emu-val>.</li><li>If <var>Desc</var>.[[Writable]] is present and has value <emu-val>false</emu-val>, return <emu-val>false</emu-val>.</li><li>If <var>Desc</var>.[[Enumerable]] is present and has value <emu-val>false</emu-val>, return <emu-val>false</emu-val>.</li><li>If <var>Desc</var>.[[Configurable]] is present and has value <emu-val>true</emu-val>, return <emu-val>false</emu-val>.</li><li>If <var>Desc</var>.[[Value]] is present, return <emu-xref aoid="SameValue" id="_ref_2908"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>Desc</var>.[[Value]], <var>current</var>.[[Value]]).</li><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-module-namespace-exotic-objects-hasproperty-p">
<h1><span class="secnum">9.4.6.6</span>[[HasProperty]] ( <var>P</var> )</h1>
<p>When the [[HasProperty]] internal method of a module namespace <emu-xref href="#exotic-object" id="_ref_2909"><a href="#exotic-object">exotic object</a></emu-xref> <var>O</var> is called with property key <var>P</var>, the following steps are taken:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_2910"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>P</var>) is Symbol, return <emu-xref aoid="OrdinaryHasProperty" id="_ref_2911"><a href="#sec-ordinaryhasproperty">OrdinaryHasProperty</a></emu-xref>(<var>O</var>, <var>P</var>).</li><li>Let <var>exports</var> be <var>O</var>.[[Exports]].</li><li>If <var>P</var> is an element of <var>exports</var>, return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-module-namespace-exotic-objects-get-p-receiver">
<h1><span class="secnum">9.4.6.7</span>[[Get]] ( <var>P</var>, <var>Receiver</var> )</h1>
<p>When the [[Get]] internal method of a module namespace <emu-xref href="#exotic-object" id="_ref_2912"><a href="#exotic-object">exotic object</a></emu-xref> <var>O</var> is called with property key <var>P</var> and <emu-xref href="#sec-ecmascript-language-types" id="_ref_2913"><a href="#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref> <var>Receiver</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2914"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPropertyKey" id="_ref_2915"><a href="#sec-ispropertykey">IsPropertyKey</a></emu-xref>(<var>P</var>) is <emu-val>true</emu-val>.</li><li>If <emu-xref aoid="Type" id="_ref_2916"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>P</var>) is Symbol, then<ol><li>Return ?&nbsp;<emu-xref aoid="OrdinaryGet" id="_ref_2917"><a href="#sec-ordinaryget">OrdinaryGet</a></emu-xref>(<var>O</var>, <var>P</var>, <var>Receiver</var>).</li></ol></li><li>Let <var>exports</var> be <var>O</var>.[[Exports]].</li><li>If <var>P</var> is not an element of <var>exports</var>, return <emu-val>undefined</emu-val>.</li><li>Let <var>m</var> be <var>O</var>.[[Module]].</li><li>Let <var>binding</var> be ! <var>m</var>.ResolveExport(<var>P</var>, « »).</li><li><emu-xref href="#assert" id="_ref_2918"><a href="#assert">Assert</a></emu-xref>: <var>binding</var> is a <emu-xref href="#resolvedbinding-record" id="_ref_2919"><a href="#resolvedbinding-record">ResolvedBinding Record</a></emu-xref>.</li><li>Let <var>targetModule</var> be <var>binding</var>.[[Module]].</li><li><emu-xref href="#assert" id="_ref_2920"><a href="#assert">Assert</a></emu-xref>: <var>targetModule</var> is not <emu-val>undefined</emu-val>.</li><li>Let <var>targetEnv</var> be <var>targetModule</var>.[[Environment]].</li><li>If <var>targetEnv</var> is <emu-val>undefined</emu-val>, throw a <emu-val>ReferenceError</emu-val> exception.</li><li>Let <var>targetEnvRec</var> be <var>targetEnv</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_2921"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref>.</li><li>Return ? <var>targetEnvRec</var>.GetBindingValue(<var>binding</var>.[[BindingName]], <emu-val>true</emu-val>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>ResolveExport is idempotent and side-effect free. An
implementation might choose to pre-compute or cache the ResolveExport
results for the [[Exports]] of each module namespace <emu-xref href="#exotic-object" id="_ref_2922"><a href="#exotic-object">exotic object</a></emu-xref>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-module-namespace-exotic-objects-set-p-v-receiver">
<h1><span class="secnum">9.4.6.8</span>[[Set]] ( <var>P</var>, <var>V</var>, <var>Receiver</var> )</h1>
<p>When the [[Set]] internal method of a module namespace <emu-xref href="#exotic-object" id="_ref_2923"><a href="#exotic-object">exotic object</a></emu-xref> <var>O</var> is called with property key <var>P</var>, value <var>V</var>, and <emu-xref href="#sec-ecmascript-language-types" id="_ref_2924"><a href="#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref> <var>Receiver</var>, the following steps are taken:</p>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-module-namespace-exotic-objects-delete-p">
<h1><span class="secnum">9.4.6.9</span>[[Delete]] ( <var>P</var> )</h1>
<p>When the [[Delete]] internal method of a module namespace <emu-xref href="#exotic-object" id="_ref_2925"><a href="#exotic-object">exotic object</a></emu-xref> <var>O</var> is called with property key <var>P</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2926"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPropertyKey" id="_ref_2927"><a href="#sec-ispropertykey">IsPropertyKey</a></emu-xref>(<var>P</var>) is <emu-val>true</emu-val>.</li><li>If <emu-xref aoid="Type" id="_ref_2928"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>P</var>) is Symbol, then<ol><li>Return ?&nbsp;<emu-xref aoid="OrdinaryDelete" id="_ref_2929"><a href="#sec-ordinarydelete">OrdinaryDelete</a></emu-xref>(<var>O</var>, <var>P</var>).</li></ol></li><li>Let <var>exports</var> be <var>O</var>.[[Exports]].</li><li>If <var>P</var> is an element of <var>exports</var>, return <emu-val>false</emu-val>.</li><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-module-namespace-exotic-objects-ownpropertykeys">
<h1><span class="secnum">9.4.6.10</span>[[OwnPropertyKeys]] ( )</h1>
<p>When the [[OwnPropertyKeys]] internal method of a module namespace <emu-xref href="#exotic-object" id="_ref_2930"><a href="#exotic-object">exotic object</a></emu-xref> <var>O</var> is called, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>exports</var> be a copy of <var>O</var>.[[Exports]].</li><li>Let <var>symbolKeys</var> be !&nbsp;<emu-xref aoid="OrdinaryOwnPropertyKeys" id="_ref_2931"><a href="#sec-ordinaryownpropertykeys">OrdinaryOwnPropertyKeys</a></emu-xref>(<var>O</var>).</li><li>Append all the entries of <var>symbolKeys</var> to the end of <var>exports</var>.</li><li>Return <var>exports</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-modulenamespacecreate" aoid="ModuleNamespaceCreate">
<h1><span class="secnum">9.4.6.11</span>ModuleNamespaceCreate ( <var>module</var>, <var>exports</var> )</h1>
<p>The abstract operation ModuleNamespaceCreate with arguments <var>module</var>, and <var>exports</var> is used to specify the creation of new module namespace exotic objects. It performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2932"><a href="#assert">Assert</a></emu-xref>: <var>module</var> is a <emu-xref href="#sec-abstract-module-records" id="_ref_2933"><a href="#sec-abstract-module-records">Module Record</a></emu-xref>.</li><li><emu-xref href="#assert" id="_ref_2934"><a href="#assert">Assert</a></emu-xref>: <var>module</var>.[[Namespace]] is <emu-val>undefined</emu-val>.</li><li><emu-xref href="#assert" id="_ref_2935"><a href="#assert">Assert</a></emu-xref>: <var>exports</var> is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2936"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of String values.</li><li>Let <var>M</var> be a newly created object.</li><li>Set <var>M</var>'s essential internal methods to the definitions specified in <emu-xref href="#sec-module-namespace-exotic-objects" id="_ref_243"><a href="#sec-module-namespace-exotic-objects">9.4.6</a></emu-xref>.</li><li>Set <var>M</var>.[[Module]] to <var>module</var>.</li><li>Let <var>sortedExports</var> be a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_2937"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing the same values as the list <var>exports</var> where the values are ordered as if an Array of the same values had been sorted using <code>Array.prototype.sort</code> using <emu-val>undefined</emu-val> as <var>comparefn</var>.</li><li>Set <var>M</var>.[[Exports]] to <var>sortedExports</var>.</li><li>Create own properties of <var>M</var> corresponding to the definitions in <emu-xref href="#sec-module-namespace-objects" id="_ref_244"><a href="#sec-module-namespace-objects">26.3</a></emu-xref>.</li><li>Set <var>module</var>.[[Namespace]] to <var>M</var>.</li><li>Return <var>M</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-immutable-prototype-exotic-objects">
<h1><span class="secnum">9.4.7</span>Immutable Prototype Exotic Objects</h1>
<p>An <dfn>immutable prototype exotic object</dfn> is an <emu-xref href="#exotic-object" id="_ref_2938"><a href="#exotic-object">exotic object</a></emu-xref> that has a [[Prototype]] internal slot that will not change once it is initialized.</p>
<p>Immutable prototype exotic objects have the same internal slots
as ordinary objects. They are exotic only in the following internal
methods. All other internal methods of immutable prototype exotic
objects that are not explicitly defined below are instead defined as in
<a href="#sec-ordinary-object-internal-methods-and-internal-slots">ordinary objects.</a></p>
<emu-clause id="sec-immutable-prototype-exotic-objects-setprototypeof-v">
<h1><span class="secnum">9.4.7.1</span>[[SetPrototypeOf]] ( <var>V</var> )</h1>
<p>When the [[SetPrototypeOf]] internal method of an <emu-xref href="#sec-immutable-prototype-exotic-objects" id="_ref_2939"><a href="#sec-immutable-prototype-exotic-objects">immutable prototype exotic object</a></emu-xref> <var>O</var> is called with argument <var>V</var>, the following steps are taken:</p>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="SetImmutablePrototype" id="_ref_2940"><a href="#sec-set-immutable-prototype">SetImmutablePrototype</a></emu-xref>(<var>O</var>, <var>V</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-set-immutable-prototype" aoid="SetImmutablePrototype">
<h1><span class="secnum">9.4.7.2</span>SetImmutablePrototype ( <var>O</var>, <var>V</var> )</h1>
<p>When the SetImmutablePrototype abstract operation is called with arguments <var>O</var> and <var>V</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2941"><a href="#assert">Assert</a></emu-xref>: Either <emu-xref aoid="Type" id="_ref_2942"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>V</var>) is Object or <emu-xref aoid="Type" id="_ref_2943"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>V</var>) is Null.</li><li>Let <var>current</var> be ? <var>O</var>.[[GetPrototypeOf]]().</li><li>If <emu-xref aoid="SameValue" id="_ref_2944"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>V</var>, <var>current</var>) is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-proxy-object-internal-methods-and-internal-slots">
<h1><span class="secnum">9.5</span>Proxy Object Internal Methods and Internal Slots</h1>
<p>A proxy object is an <emu-xref href="#exotic-object" id="_ref_2945"><a href="#exotic-object">exotic object</a></emu-xref>
whose essential internal methods are partially implemented using
ECMAScript code. Every proxy object has an internal slot called
[[ProxyHandler]]. The value of [[ProxyHandler]] is an object, called the
proxy's <em>handler object</em>, or <emu-val>null</emu-val>. Methods (see <emu-xref href="#table-30" id="_ref_245"><a href="#table-30">Table 30</a></emu-xref>)
of a handler object may be used to augment the implementation for one
or more of the proxy object's internal methods. Every proxy object also
has an internal slot called [[ProxyTarget]] whose value is either an
object or the <emu-val>null</emu-val> value. This object is called the proxy's <em>target object</em>.</p>
<emu-table id="table-30" caption="Proxy Handler Methods"><figure><figcaption>Table 30: Proxy Handler Methods</figcaption>
<table>
<tbody>
<tr>
<th>
Internal Method
</th>
<th>
Handler Method
</th>
</tr>
<tr>
<td>
[[GetPrototypeOf]]
</td>
<td>
<code>getPrototypeOf</code>
</td>
</tr>
<tr>
<td>
[[SetPrototypeOf]]
</td>
<td>
<code>setPrototypeOf</code>
</td>
</tr>
<tr>
<td>
[[IsExtensible]]
</td>
<td>
<code>isExtensible</code>
</td>
</tr>
<tr>
<td>
[[PreventExtensions]]
</td>
<td>
<code>preventExtensions</code>
</td>
</tr>
<tr>
<td>
[[GetOwnProperty]]
</td>
<td>
<code>getOwnPropertyDescriptor</code>
</td>
</tr>
<tr>
<td>
[[DefineOwnProperty]]
</td>
<td>
<code>defineProperty</code>
</td>
</tr>
<tr>
<td>
[[HasProperty]]
</td>
<td>
<code>has</code>
</td>
</tr>
<tr>
<td>
[[Get]]
</td>
<td>
<code>get</code>
</td>
</tr>
<tr>
<td>
[[Set]]
</td>
<td>
<code>set</code>
</td>
</tr>
<tr>
<td>
[[Delete]]
</td>
<td>
<code>deleteProperty</code>
</td>
</tr>
<tr>
<td>
[[OwnPropertyKeys]]
</td>
<td>
<code>ownKeys</code>
</td>
</tr>
<tr>
<td>
[[Call]]
</td>
<td>
<code>apply</code>
</td>
</tr>
<tr>
<td>
[[Construct]]
</td>
<td>
<code>construct</code>
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<p>When a handler method is called to provide the implementation of a
proxy object internal method, the handler method is passed the proxy's
target object as a parameter. A proxy's handler object does not
necessarily have a method corresponding to every essential internal
method. Invoking an internal method on the proxy results in the
invocation of the corresponding internal method on the proxy's target
object if the handler object does not have a method corresponding to the
internal trap.</p>
<p>The [[ProxyHandler]] and [[ProxyTarget]] internal slots of a
proxy object are always initialized when the object is created and
typically may not be modified. Some proxy objects are created in a
manner that permits them to be subsequently <em>revoked</em>. When a proxy is revoked, its [[ProxyHandler]] and [[ProxyTarget]] internal slots are set to <emu-val>null</emu-val> causing subsequent invocations of internal methods on that proxy object to throw a <emu-val>TypeError</emu-val> exception.</p>
<p>Because proxy objects permit the implementation of internal
methods to be provided by arbitrary ECMAScript code, it is possible to
define a proxy object whose handler methods violates the invariants
defined in <emu-xref href="#sec-invariants-of-the-essential-internal-methods" id="_ref_246"><a href="#sec-invariants-of-the-essential-internal-methods">6.1.7.3</a></emu-xref>. Some of the internal method invariants defined in <emu-xref href="#sec-invariants-of-the-essential-internal-methods" id="_ref_247"><a href="#sec-invariants-of-the-essential-internal-methods">6.1.7.3</a></emu-xref>
are essential integrity invariants. These invariants are explicitly
enforced by the proxy object internal methods specified in this section.
An ECMAScript implementation must be robust in the presence of all
possible invariant violations.</p>
<p>In the following algorithm descriptions, assume <var>O</var> is an ECMAScript proxy object, <var>P</var> is a property key value, <var>V</var> is any <emu-xref href="#sec-ecmascript-language-types" id="_ref_2946"><a href="#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref> and <var>Desc</var> is a <emu-xref href="#sec-property-descriptor-specification-type" id="_ref_2947"><a href="#sec-property-descriptor-specification-type">Property Descriptor</a></emu-xref> record.</p>
<emu-clause id="sec-proxy-object-internal-methods-and-internal-slots-getprototypeof">
<h1><span class="secnum">9.5.1</span>[[GetPrototypeOf]] ( )</h1>
<p>When the [[GetPrototypeOf]] internal method of a Proxy <emu-xref href="#exotic-object" id="_ref_2948"><a href="#exotic-object">exotic object</a></emu-xref> <var>O</var> is called, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>handler</var> be <var>O</var>.[[ProxyHandler]].</li><li>If <var>handler</var> is <emu-val>null</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li><emu-xref href="#assert" id="_ref_2949"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_2950"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>handler</var>) is Object.</li><li>Let <var>target</var> be <var>O</var>.[[ProxyTarget]].</li><li>Let <var>trap</var> be ?&nbsp;<emu-xref aoid="GetMethod" id="_ref_2951"><a href="#sec-getmethod">GetMethod</a></emu-xref>(<var>handler</var>, <code>"getPrototypeOf"</code>).</li><li>If <var>trap</var> is <emu-val>undefined</emu-val>, then<ol><li>Return ? <var>target</var>.[[GetPrototypeOf]]().</li></ol></li><li>Let <var>handlerProto</var> be ?&nbsp;<emu-xref aoid="Call" id="_ref_2952"><a href="#sec-call">Call</a></emu-xref>(<var>trap</var>, <var>handler</var>, « <var>target</var> »).</li><li>If <emu-xref aoid="Type" id="_ref_2953"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>handlerProto</var>) is neither Object nor Null, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>extensibleTarget</var> be ?&nbsp;<emu-xref aoid="IsExtensible" id="_ref_2954"><a href="#sec-isextensible-o">IsExtensible</a></emu-xref>(<var>target</var>).</li><li>If <var>extensibleTarget</var> is <emu-val>true</emu-val>, return <var>handlerProto</var>.</li><li>Let <var>targetProto</var> be ? <var>target</var>.[[GetPrototypeOf]]().</li><li>If <emu-xref aoid="SameValue" id="_ref_2955"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>handlerProto</var>, <var>targetProto</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return <var>handlerProto</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>[[GetPrototypeOf]] for proxy objects enforces the following invariants:</p>
<ul>
<li>
The result of [[GetPrototypeOf]] must be either an Object or <emu-val>null</emu-val>.
</li>
<li>
If the target object is not extensible, [[GetPrototypeOf]]
applied to the proxy object must return the same value as
[[GetPrototypeOf]] applied to the proxy object's target object.
</li>
</ul>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-proxy-object-internal-methods-and-internal-slots-setprototypeof-v">
<h1><span class="secnum">9.5.2</span>[[SetPrototypeOf]] ( <var>V</var> )</h1>
<p>When the [[SetPrototypeOf]] internal method of a Proxy <emu-xref href="#exotic-object" id="_ref_2956"><a href="#exotic-object">exotic object</a></emu-xref> <var>O</var> is called with argument <var>V</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2957"><a href="#assert">Assert</a></emu-xref>: Either <emu-xref aoid="Type" id="_ref_2958"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>V</var>) is Object or <emu-xref aoid="Type" id="_ref_2959"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>V</var>) is Null.</li><li>Let <var>handler</var> be <var>O</var>.[[ProxyHandler]].</li><li>If <var>handler</var> is <emu-val>null</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li><emu-xref href="#assert" id="_ref_2960"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_2961"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>handler</var>) is Object.</li><li>Let <var>target</var> be <var>O</var>.[[ProxyTarget]].</li><li>Let <var>trap</var> be ?&nbsp;<emu-xref aoid="GetMethod" id="_ref_2962"><a href="#sec-getmethod">GetMethod</a></emu-xref>(<var>handler</var>, <code>"setPrototypeOf"</code>).</li><li>If <var>trap</var> is <emu-val>undefined</emu-val>, then<ol><li>Return ? <var>target</var>.[[SetPrototypeOf]](<var>V</var>).</li></ol></li><li>Let <var>booleanTrapResult</var> be <emu-xref aoid="ToBoolean" id="_ref_2963"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="Call" id="_ref_2964"><a href="#sec-call">Call</a></emu-xref>(<var>trap</var>, <var>handler</var>, « <var>target</var>, <var>V</var> »)).</li><li>If <var>booleanTrapResult</var> is <emu-val>false</emu-val>, return <emu-val>false</emu-val>.</li><li>Let <var>extensibleTarget</var> be ?&nbsp;<emu-xref aoid="IsExtensible" id="_ref_2965"><a href="#sec-isextensible-o">IsExtensible</a></emu-xref>(<var>target</var>).</li><li>If <var>extensibleTarget</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Let <var>targetProto</var> be ? <var>target</var>.[[GetPrototypeOf]]().</li><li>If <emu-xref aoid="SameValue" id="_ref_2966"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>V</var>, <var>targetProto</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>[[SetPrototypeOf]] for proxy objects enforces the following invariants:</p>
<ul>
<li>
The result of [[SetPrototypeOf]] is a Boolean value.
</li>
<li>
If the target object is not extensible, the argument value
must be the same as the result of [[GetPrototypeOf]] applied to target
object.
</li>
</ul>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-proxy-object-internal-methods-and-internal-slots-isextensible">
<h1><span class="secnum">9.5.3</span>[[IsExtensible]] ( )</h1>
<p>When the [[IsExtensible]] internal method of a Proxy <emu-xref href="#exotic-object" id="_ref_2967"><a href="#exotic-object">exotic object</a></emu-xref> <var>O</var> is called, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>handler</var> be <var>O</var>.[[ProxyHandler]].</li><li>If <var>handler</var> is <emu-val>null</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li><emu-xref href="#assert" id="_ref_2968"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_2969"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>handler</var>) is Object.</li><li>Let <var>target</var> be <var>O</var>.[[ProxyTarget]].</li><li>Let <var>trap</var> be ?&nbsp;<emu-xref aoid="GetMethod" id="_ref_2970"><a href="#sec-getmethod">GetMethod</a></emu-xref>(<var>handler</var>, <code>"isExtensible"</code>).</li><li>If <var>trap</var> is <emu-val>undefined</emu-val>, then<ol><li>Return ? <var>target</var>.[[IsExtensible]]().</li></ol></li><li>Let <var>booleanTrapResult</var> be <emu-xref aoid="ToBoolean" id="_ref_2971"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="Call" id="_ref_2972"><a href="#sec-call">Call</a></emu-xref>(<var>trap</var>, <var>handler</var>, « <var>target</var> »)).</li><li>Let <var>targetResult</var> be ? <var>target</var>.[[IsExtensible]]().</li><li>If <emu-xref aoid="SameValue" id="_ref_2973"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>booleanTrapResult</var>, <var>targetResult</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return <var>booleanTrapResult</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>[[IsExtensible]] for proxy objects enforces the following invariants:</p>
<ul>
<li>
The result of [[IsExtensible]] is a Boolean value.
</li>
<li>
[[IsExtensible]] applied to the proxy object must return the
same value as [[IsExtensible]] applied to the proxy object's target
object with the same argument.
</li>
</ul>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-proxy-object-internal-methods-and-internal-slots-preventextensions">
<h1><span class="secnum">9.5.4</span>[[PreventExtensions]] ( )</h1>
<p>When the [[PreventExtensions]] internal method of a Proxy <emu-xref href="#exotic-object" id="_ref_2974"><a href="#exotic-object">exotic object</a></emu-xref> <var>O</var> is called, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>handler</var> be <var>O</var>.[[ProxyHandler]].</li><li>If <var>handler</var> is <emu-val>null</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li><emu-xref href="#assert" id="_ref_2975"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_2976"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>handler</var>) is Object.</li><li>Let <var>target</var> be <var>O</var>.[[ProxyTarget]].</li><li>Let <var>trap</var> be ?&nbsp;<emu-xref aoid="GetMethod" id="_ref_2977"><a href="#sec-getmethod">GetMethod</a></emu-xref>(<var>handler</var>, <code>"preventExtensions"</code>).</li><li>If <var>trap</var> is <emu-val>undefined</emu-val>, then<ol><li>Return ? <var>target</var>.[[PreventExtensions]]().</li></ol></li><li>Let <var>booleanTrapResult</var> be <emu-xref aoid="ToBoolean" id="_ref_2978"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="Call" id="_ref_2979"><a href="#sec-call">Call</a></emu-xref>(<var>trap</var>, <var>handler</var>, « <var>target</var> »)).</li><li>If <var>booleanTrapResult</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>targetIsExtensible</var> be ? <var>target</var>.[[IsExtensible]]().</li><li>If <var>targetIsExtensible</var> is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li></ol></li><li>Return <var>booleanTrapResult</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>[[PreventExtensions]] for proxy objects enforces the following invariants:</p>
<ul>
<li>
The result of [[PreventExtensions]] is a Boolean value.
</li>
<li>
[[PreventExtensions]] applied to the proxy object only returns <emu-val>true</emu-val> if [[IsExtensible]] applied to the proxy object's target object is <emu-val>false</emu-val>.
</li>
</ul>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-proxy-object-internal-methods-and-internal-slots-getownproperty-p">
<h1><span class="secnum">9.5.5</span>[[GetOwnProperty]] ( <var>P</var> )</h1>
<p>When the [[GetOwnProperty]] internal method of a Proxy <emu-xref href="#exotic-object" id="_ref_2980"><a href="#exotic-object">exotic object</a></emu-xref> <var>O</var> is called with property key <var>P</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2981"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPropertyKey" id="_ref_2982"><a href="#sec-ispropertykey">IsPropertyKey</a></emu-xref>(<var>P</var>) is <emu-val>true</emu-val>.</li><li>Let <var>handler</var> be <var>O</var>.[[ProxyHandler]].</li><li>If <var>handler</var> is <emu-val>null</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li><emu-xref href="#assert" id="_ref_2983"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_2984"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>handler</var>) is Object.</li><li>Let <var>target</var> be <var>O</var>.[[ProxyTarget]].</li><li>Let <var>trap</var> be ?&nbsp;<emu-xref aoid="GetMethod" id="_ref_2985"><a href="#sec-getmethod">GetMethod</a></emu-xref>(<var>handler</var>, <code>"getOwnPropertyDescriptor"</code>).</li><li>If <var>trap</var> is <emu-val>undefined</emu-val>, then<ol><li>Return ? <var>target</var>.[[GetOwnProperty]](<var>P</var>).</li></ol></li><li>Let <var>trapResultObj</var> be ?&nbsp;<emu-xref aoid="Call" id="_ref_2986"><a href="#sec-call">Call</a></emu-xref>(<var>trap</var>, <var>handler</var>, « <var>target</var>, <var>P</var> »).</li><li>If <emu-xref aoid="Type" id="_ref_2987"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>trapResultObj</var>) is neither Object nor Undefined, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>targetDesc</var> be ? <var>target</var>.[[GetOwnProperty]](<var>P</var>).</li><li>If <var>trapResultObj</var> is <emu-val>undefined</emu-val>, then<ol><li>If <var>targetDesc</var> is <emu-val>undefined</emu-val>, return <emu-val>undefined</emu-val>.</li><li>If <var>targetDesc</var>.[[Configurable]] is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>extensibleTarget</var> be ?&nbsp;<emu-xref aoid="IsExtensible" id="_ref_2988"><a href="#sec-isextensible-o">IsExtensible</a></emu-xref>(<var>target</var>).</li><li>If <var>extensibleTarget</var> is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return <emu-val>undefined</emu-val>.</li></ol></li><li>Let <var>extensibleTarget</var> be ?&nbsp;<emu-xref aoid="IsExtensible" id="_ref_2989"><a href="#sec-isextensible-o">IsExtensible</a></emu-xref>(<var>target</var>).</li><li>Let <var>resultDesc</var> be ?&nbsp;<emu-xref aoid="ToPropertyDescriptor" id="_ref_2990"><a href="#sec-topropertydescriptor">ToPropertyDescriptor</a></emu-xref>(<var>trapResultObj</var>).</li><li>Call <emu-xref aoid="CompletePropertyDescriptor" id="_ref_2991"><a href="#sec-completepropertydescriptor">CompletePropertyDescriptor</a></emu-xref>(<var>resultDesc</var>).</li><li>Let <var>valid</var> be <emu-xref aoid="IsCompatiblePropertyDescriptor" id="_ref_2992"><a href="#sec-iscompatiblepropertydescriptor">IsCompatiblePropertyDescriptor</a></emu-xref>(<var>extensibleTarget</var>, <var>resultDesc</var>, <var>targetDesc</var>).</li><li>If <var>valid</var> is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>resultDesc</var>.[[Configurable]] is <emu-val>false</emu-val>, then<ol><li>If <var>targetDesc</var> is <emu-val>undefined</emu-val> or <var>targetDesc</var>.[[Configurable]] is <emu-val>true</emu-val>, then<ol><li>Throw a <emu-val>TypeError</emu-val> exception.</li></ol></li></ol></li><li>Return <var>resultDesc</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>[[GetOwnProperty]] for proxy objects enforces the following invariants:</p>
<ul>
<li>
The result of [[GetOwnProperty]] must be either an Object or <emu-val>undefined</emu-val>.
</li>
<li>
A property cannot be reported as non-existent, if it exists as a non-configurable own property of the target object.
</li>
<li>
A property cannot be reported as non-existent, if it exists
as an own property of the target object and the target object is not
extensible.
</li>
<li>
A property cannot be reported as existent, if it does not
exist as an own property of the target object and the target object is
not extensible.
</li>
<li>
A property cannot be reported as non-configurable, if it
does not exist as an own property of the target object or if it exists
as a configurable own property of the target object.
</li>
</ul>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-proxy-object-internal-methods-and-internal-slots-defineownproperty-p-desc">
<h1><span class="secnum">9.5.6</span>[[DefineOwnProperty]] ( <var>P</var>, <var>Desc</var> )</h1>
<p>When the [[DefineOwnProperty]] internal method of a Proxy <emu-xref href="#exotic-object" id="_ref_2993"><a href="#exotic-object">exotic object</a></emu-xref> <var>O</var> is called with property key <var>P</var> and <emu-xref href="#sec-property-descriptor-specification-type" id="_ref_2994"><a href="#sec-property-descriptor-specification-type">Property Descriptor</a></emu-xref> <var>Desc</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_2995"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPropertyKey" id="_ref_2996"><a href="#sec-ispropertykey">IsPropertyKey</a></emu-xref>(<var>P</var>) is <emu-val>true</emu-val>.</li><li>Let <var>handler</var> be <var>O</var>.[[ProxyHandler]].</li><li>If <var>handler</var> is <emu-val>null</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li><emu-xref href="#assert" id="_ref_2997"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_2998"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>handler</var>) is Object.</li><li>Let <var>target</var> be <var>O</var>.[[ProxyTarget]].</li><li>Let <var>trap</var> be ?&nbsp;<emu-xref aoid="GetMethod" id="_ref_2999"><a href="#sec-getmethod">GetMethod</a></emu-xref>(<var>handler</var>, <code>"defineProperty"</code>).</li><li>If <var>trap</var> is <emu-val>undefined</emu-val>, then<ol><li>Return ? <var>target</var>.[[DefineOwnProperty]](<var>P</var>, <var>Desc</var>).</li></ol></li><li>Let <var>descObj</var> be <emu-xref aoid="FromPropertyDescriptor" id="_ref_3000"><a href="#sec-frompropertydescriptor">FromPropertyDescriptor</a></emu-xref>(<var>Desc</var>).</li><li>Let <var>booleanTrapResult</var> be <emu-xref aoid="ToBoolean" id="_ref_3001"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="Call" id="_ref_3002"><a href="#sec-call">Call</a></emu-xref>(<var>trap</var>, <var>handler</var>, « <var>target</var>, <var>P</var>, <var>descObj</var> »)).</li><li>If <var>booleanTrapResult</var> is <emu-val>false</emu-val>, return <emu-val>false</emu-val>.</li><li>Let <var>targetDesc</var> be ? <var>target</var>.[[GetOwnProperty]](<var>P</var>).</li><li>Let <var>extensibleTarget</var> be ?&nbsp;<emu-xref aoid="IsExtensible" id="_ref_3003"><a href="#sec-isextensible-o">IsExtensible</a></emu-xref>(<var>target</var>).</li><li>If <var>Desc</var> has a [[Configurable]] field and if <var>Desc</var>.[[Configurable]] is <emu-val>false</emu-val>, then<ol><li>Let <var>settingConfigFalse</var> be <emu-val>true</emu-val>.</li></ol></li><li>Else, let <var>settingConfigFalse</var> be <emu-val>false</emu-val>.</li><li>If <var>targetDesc</var> is <emu-val>undefined</emu-val>, then<ol><li>If <var>extensibleTarget</var> is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>settingConfigFalse</var> is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li></ol></li><li>Else <var>targetDesc</var> is not <emu-val>undefined</emu-val>,<ol><li>If <emu-xref aoid="IsCompatiblePropertyDescriptor" id="_ref_3004"><a href="#sec-iscompatiblepropertydescriptor">IsCompatiblePropertyDescriptor</a></emu-xref>(<var>extensibleTarget</var>, <var>Desc</var>, <var>targetDesc</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>settingConfigFalse</var> is <emu-val>true</emu-val> and <var>targetDesc</var>.[[Configurable]] is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li></ol></li><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>[[DefineOwnProperty]] for proxy objects enforces the following invariants:</p>
<ul>
<li>
The result of [[DefineOwnProperty]] is a Boolean value.
</li>
<li>
A property cannot be added, if the target object is not extensible.
</li>
<li>
A property cannot be non-configurable, unless there exists a
corresponding non-configurable own property of the target object.
</li>
<li>
If a property has a corresponding target object property then applying the <emu-xref href="#sec-property-descriptor-specification-type" id="_ref_3005"><a href="#sec-property-descriptor-specification-type">Property Descriptor</a></emu-xref> of the property to the target object using [[DefineOwnProperty]] will not throw an exception.
</li>
</ul>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-proxy-object-internal-methods-and-internal-slots-hasproperty-p">
<h1><span class="secnum">9.5.7</span>[[HasProperty]] ( <var>P</var> )</h1>
<p>When the [[HasProperty]] internal method of a Proxy <emu-xref href="#exotic-object" id="_ref_3006"><a href="#exotic-object">exotic object</a></emu-xref> <var>O</var> is called with property key <var>P</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_3007"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPropertyKey" id="_ref_3008"><a href="#sec-ispropertykey">IsPropertyKey</a></emu-xref>(<var>P</var>) is <emu-val>true</emu-val>.</li><li>Let <var>handler</var> be <var>O</var>.[[ProxyHandler]].</li><li>If <var>handler</var> is <emu-val>null</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li><emu-xref href="#assert" id="_ref_3009"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_3010"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>handler</var>) is Object.</li><li>Let <var>target</var> be <var>O</var>.[[ProxyTarget]].</li><li>Let <var>trap</var> be ?&nbsp;<emu-xref aoid="GetMethod" id="_ref_3011"><a href="#sec-getmethod">GetMethod</a></emu-xref>(<var>handler</var>, <code>"has"</code>).</li><li>If <var>trap</var> is <emu-val>undefined</emu-val>, then<ol><li>Return ? <var>target</var>.[[HasProperty]](<var>P</var>).</li></ol></li><li>Let <var>booleanTrapResult</var> be <emu-xref aoid="ToBoolean" id="_ref_3012"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="Call" id="_ref_3013"><a href="#sec-call">Call</a></emu-xref>(<var>trap</var>, <var>handler</var>, « <var>target</var>, <var>P</var> »)).</li><li>If <var>booleanTrapResult</var> is <emu-val>false</emu-val>, then<ol><li>Let <var>targetDesc</var> be ? <var>target</var>.[[GetOwnProperty]](<var>P</var>).</li><li>If <var>targetDesc</var> is not <emu-val>undefined</emu-val>, then<ol><li>If <var>targetDesc</var>.[[Configurable]] is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>extensibleTarget</var> be ?&nbsp;<emu-xref aoid="IsExtensible" id="_ref_3014"><a href="#sec-isextensible-o">IsExtensible</a></emu-xref>(<var>target</var>).</li><li>If <var>extensibleTarget</var> is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li></ol></li></ol></li><li>Return <var>booleanTrapResult</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>[[HasProperty]] for proxy objects enforces the following invariants:</p>
<ul>
<li>
The result of [[HasProperty]] is a Boolean value.
</li>
<li>
A property cannot be reported as non-existent, if it exists as a non-configurable own property of the target object.
</li>
<li>
A property cannot be reported as non-existent, if it exists
as an own property of the target object and the target object is not
extensible.
</li>
</ul>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-proxy-object-internal-methods-and-internal-slots-get-p-receiver">
<h1><span class="secnum">9.5.8</span>[[Get]] ( <var>P</var>, <var>Receiver</var> )</h1>
<p>When the [[Get]] internal method of a Proxy <emu-xref href="#exotic-object" id="_ref_3015"><a href="#exotic-object">exotic object</a></emu-xref> <var>O</var> is called with property key <var>P</var> and <emu-xref href="#sec-ecmascript-language-types" id="_ref_3016"><a href="#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref> <var>Receiver</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_3017"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPropertyKey" id="_ref_3018"><a href="#sec-ispropertykey">IsPropertyKey</a></emu-xref>(<var>P</var>) is <emu-val>true</emu-val>.</li><li>Let <var>handler</var> be <var>O</var>.[[ProxyHandler]].</li><li>If <var>handler</var> is <emu-val>null</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li><emu-xref href="#assert" id="_ref_3019"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_3020"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>handler</var>) is Object.</li><li>Let <var>target</var> be <var>O</var>.[[ProxyTarget]].</li><li>Let <var>trap</var> be ?&nbsp;<emu-xref aoid="GetMethod" id="_ref_3021"><a href="#sec-getmethod">GetMethod</a></emu-xref>(<var>handler</var>, <code>"get"</code>).</li><li>If <var>trap</var> is <emu-val>undefined</emu-val>, then<ol><li>Return ? <var>target</var>.[[Get]](<var>P</var>, <var>Receiver</var>).</li></ol></li><li>Let <var>trapResult</var> be ?&nbsp;<emu-xref aoid="Call" id="_ref_3022"><a href="#sec-call">Call</a></emu-xref>(<var>trap</var>, <var>handler</var>, « <var>target</var>, <var>P</var>, <var>Receiver</var> »).</li><li>Let <var>targetDesc</var> be ? <var>target</var>.[[GetOwnProperty]](<var>P</var>).</li><li>If <var>targetDesc</var> is not <emu-val>undefined</emu-val> and <var>targetDesc</var>.[[Configurable]] is <emu-val>false</emu-val>, then<ol><li>If <emu-xref aoid="IsDataDescriptor" id="_ref_3023"><a href="#sec-isdatadescriptor">IsDataDescriptor</a></emu-xref>(<var>targetDesc</var>) is <emu-val>true</emu-val> and <var>targetDesc</var>.[[Writable]] is <emu-val>false</emu-val>, then<ol><li>If <emu-xref aoid="SameValue" id="_ref_3024"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>trapResult</var>, <var>targetDesc</var>.[[Value]]) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li></ol></li><li>If <emu-xref aoid="IsAccessorDescriptor" id="_ref_3025"><a href="#sec-isaccessordescriptor">IsAccessorDescriptor</a></emu-xref>(<var>targetDesc</var>) is <emu-val>true</emu-val> and <var>targetDesc</var>.[[Get]] is <emu-val>undefined</emu-val>, then<ol><li>If <var>trapResult</var> is not <emu-val>undefined</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li></ol></li></ol></li><li>Return <var>trapResult</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>[[Get]] for proxy objects enforces the following invariants:</p>
<ul>
<li>
The value reported for a property must be the same as the
value of the corresponding target object property if the target object
property is a non-writable, non-configurable own <emu-xref href="#sec-object-type" id="_ref_3026"><a href="#sec-object-type">data property</a></emu-xref>.
</li>
<li>
The value reported for a property must be <emu-val>undefined</emu-val> if the corresponding target object property is a non-configurable own <emu-xref href="#sec-object-type" id="_ref_3027"><a href="#sec-object-type">accessor property</a></emu-xref> that has <emu-val>undefined</emu-val> as its [[Get]] attribute.
</li>
</ul>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-proxy-object-internal-methods-and-internal-slots-set-p-v-receiver">
<h1><span class="secnum">9.5.9</span>[[Set]] ( <var>P</var>, <var>V</var>, <var>Receiver</var> )</h1>
<p>When the [[Set]] internal method of a Proxy <emu-xref href="#exotic-object" id="_ref_3028"><a href="#exotic-object">exotic object</a></emu-xref> <var>O</var> is called with property key <var>P</var>, value <var>V</var>, and <emu-xref href="#sec-ecmascript-language-types" id="_ref_3029"><a href="#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref> <var>Receiver</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_3030"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPropertyKey" id="_ref_3031"><a href="#sec-ispropertykey">IsPropertyKey</a></emu-xref>(<var>P</var>) is <emu-val>true</emu-val>.</li><li>Let <var>handler</var> be <var>O</var>.[[ProxyHandler]].</li><li>If <var>handler</var> is <emu-val>null</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li><emu-xref href="#assert" id="_ref_3032"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_3033"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>handler</var>) is Object.</li><li>Let <var>target</var> be <var>O</var>.[[ProxyTarget]].</li><li>Let <var>trap</var> be ?&nbsp;<emu-xref aoid="GetMethod" id="_ref_3034"><a href="#sec-getmethod">GetMethod</a></emu-xref>(<var>handler</var>, <code>"set"</code>).</li><li>If <var>trap</var> is <emu-val>undefined</emu-val>, then<ol><li>Return ? <var>target</var>.[[Set]](<var>P</var>, <var>V</var>, <var>Receiver</var>).</li></ol></li><li>Let <var>booleanTrapResult</var> be <emu-xref aoid="ToBoolean" id="_ref_3035"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="Call" id="_ref_3036"><a href="#sec-call">Call</a></emu-xref>(<var>trap</var>, <var>handler</var>, « <var>target</var>, <var>P</var>, <var>V</var>, <var>Receiver</var> »)).</li><li>If <var>booleanTrapResult</var> is <emu-val>false</emu-val>, return <emu-val>false</emu-val>.</li><li>Let <var>targetDesc</var> be ? <var>target</var>.[[GetOwnProperty]](<var>P</var>).</li><li>If <var>targetDesc</var> is not <emu-val>undefined</emu-val> and <var>targetDesc</var>.[[Configurable]] is <emu-val>false</emu-val>, then<ol><li>If <emu-xref aoid="IsDataDescriptor" id="_ref_3037"><a href="#sec-isdatadescriptor">IsDataDescriptor</a></emu-xref>(<var>targetDesc</var>) is <emu-val>true</emu-val> and <var>targetDesc</var>.[[Writable]] is <emu-val>false</emu-val>, then<ol><li>If <emu-xref aoid="SameValue" id="_ref_3038"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>V</var>, <var>targetDesc</var>.[[Value]]) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li></ol></li><li>If <emu-xref aoid="IsAccessorDescriptor" id="_ref_3039"><a href="#sec-isaccessordescriptor">IsAccessorDescriptor</a></emu-xref>(<var>targetDesc</var>) is <emu-val>true</emu-val>, then<ol><li>If <var>targetDesc</var>.[[Set]] is <emu-val>undefined</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li></ol></li></ol></li><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>[[Set]] for proxy objects enforces the following invariants:</p>
<ul>
<li>
The result of [[Set]] is a Boolean value.
</li>
<li>
Cannot change the value of a property to be different from
the value of the corresponding target object property if the
corresponding target object property is a non-writable, non-configurable
own <emu-xref href="#sec-object-type" id="_ref_3040"><a href="#sec-object-type">data property</a></emu-xref>.
</li>
<li>
Cannot set the value of a property if the corresponding target object property is a non-configurable own <emu-xref href="#sec-object-type" id="_ref_3041"><a href="#sec-object-type">accessor property</a></emu-xref> that has <emu-val>undefined</emu-val> as its [[Set]] attribute.
</li>
</ul>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-proxy-object-internal-methods-and-internal-slots-delete-p">
<h1><span class="secnum">9.5.10</span>[[Delete]] ( <var>P</var> )</h1>
<p>When the [[Delete]] internal method of a Proxy <emu-xref href="#exotic-object" id="_ref_3042"><a href="#exotic-object">exotic object</a></emu-xref> <var>O</var> is called with property key <var>P</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_3043"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPropertyKey" id="_ref_3044"><a href="#sec-ispropertykey">IsPropertyKey</a></emu-xref>(<var>P</var>) is <emu-val>true</emu-val>.</li><li>Let <var>handler</var> be <var>O</var>.[[ProxyHandler]].</li><li>If <var>handler</var> is <emu-val>null</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li><emu-xref href="#assert" id="_ref_3045"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_3046"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>handler</var>) is Object.</li><li>Let <var>target</var> be <var>O</var>.[[ProxyTarget]].</li><li>Let <var>trap</var> be ?&nbsp;<emu-xref aoid="GetMethod" id="_ref_3047"><a href="#sec-getmethod">GetMethod</a></emu-xref>(<var>handler</var>, <code>"deleteProperty"</code>).</li><li>If <var>trap</var> is <emu-val>undefined</emu-val>, then<ol><li>Return ? <var>target</var>.[[Delete]](<var>P</var>).</li></ol></li><li>Let <var>booleanTrapResult</var> be <emu-xref aoid="ToBoolean" id="_ref_3048"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="Call" id="_ref_3049"><a href="#sec-call">Call</a></emu-xref>(<var>trap</var>, <var>handler</var>, « <var>target</var>, <var>P</var> »)).</li><li>If <var>booleanTrapResult</var> is <emu-val>false</emu-val>, return <emu-val>false</emu-val>.</li><li>Let <var>targetDesc</var> be ? <var>target</var>.[[GetOwnProperty]](<var>P</var>).</li><li>If <var>targetDesc</var> is <emu-val>undefined</emu-val>, return <emu-val>true</emu-val>.</li><li>If <var>targetDesc</var>.[[Configurable]] is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>[[Delete]] for proxy objects enforces the following invariants:</p>
<ul>
<li>
The result of [[Delete]] is a Boolean value.
</li>
<li>
A property cannot be reported as deleted, if it exists as a non-configurable own property of the target object.
</li>
</ul>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-proxy-object-internal-methods-and-internal-slots-ownpropertykeys">
<h1><span class="secnum">9.5.11</span>[[OwnPropertyKeys]] ( )</h1>
<p>When the [[OwnPropertyKeys]] internal method of a Proxy <emu-xref href="#exotic-object" id="_ref_3050"><a href="#exotic-object">exotic object</a></emu-xref> <var>O</var> is called, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>handler</var> be <var>O</var>.[[ProxyHandler]].</li><li>If <var>handler</var> is <emu-val>null</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li><emu-xref href="#assert" id="_ref_3051"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_3052"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>handler</var>) is Object.</li><li>Let <var>target</var> be <var>O</var>.[[ProxyTarget]].</li><li>Let <var>trap</var> be ?&nbsp;<emu-xref aoid="GetMethod" id="_ref_3053"><a href="#sec-getmethod">GetMethod</a></emu-xref>(<var>handler</var>, <code>"ownKeys"</code>).</li><li>If <var>trap</var> is <emu-val>undefined</emu-val>, then<ol><li>Return ? <var>target</var>.[[OwnPropertyKeys]]().</li></ol></li><li>Let <var>trapResultArray</var> be ?&nbsp;<emu-xref aoid="Call" id="_ref_3054"><a href="#sec-call">Call</a></emu-xref>(<var>trap</var>, <var>handler</var>, « <var>target</var> »).</li><li>Let <var>trapResult</var> be ?&nbsp;<emu-xref aoid="CreateListFromArrayLike" id="_ref_3055"><a href="#sec-createlistfromarraylike">CreateListFromArrayLike</a></emu-xref>(<var>trapResultArray</var>, « String, Symbol »).</li><li>If <var>trapResult</var> contains any duplicate entries, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>extensibleTarget</var> be ?&nbsp;<emu-xref aoid="IsExtensible" id="_ref_3056"><a href="#sec-isextensible-o">IsExtensible</a></emu-xref>(<var>target</var>).</li><li>Let <var>targetKeys</var> be ? <var>target</var>.[[OwnPropertyKeys]]().</li><li><emu-xref href="#assert" id="_ref_3057"><a href="#assert">Assert</a></emu-xref>: <var>targetKeys</var> is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3058"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing only String and Symbol values.</li><li><emu-xref href="#assert" id="_ref_3059"><a href="#assert">Assert</a></emu-xref>: <var>targetKeys</var> contains no duplicate entries.</li><li>Let <var>targetConfigurableKeys</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3060"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>targetNonconfigurableKeys</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3061"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>For each element <var>key</var> of <var>targetKeys</var>, do<ol><li>Let <var>desc</var> be ? <var>target</var>.[[GetOwnProperty]](<var>key</var>).</li><li>If <var>desc</var> is not <emu-val>undefined</emu-val> and <var>desc</var>.[[Configurable]] is <emu-val>false</emu-val>, then<ol><li>Append <var>key</var> as an element of <var>targetNonconfigurableKeys</var>.</li></ol></li><li>Else,<ol><li>Append <var>key</var> as an element of <var>targetConfigurableKeys</var>.</li></ol></li></ol></li><li>If <var>extensibleTarget</var> is <emu-val>true</emu-val> and <var>targetNonconfigurableKeys</var> is empty, then<ol><li>Return <var>trapResult</var>.</li></ol></li><li>Let <var>uncheckedResultKeys</var> be a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3062"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> which is a copy of <var>trapResult</var>.</li><li>For each <var>key</var> that is an element of <var>targetNonconfigurableKeys</var>, do<ol><li>If <var>key</var> is not an element of <var>uncheckedResultKeys</var>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Remove <var>key</var> from <var>uncheckedResultKeys</var>.</li></ol></li><li>If <var>extensibleTarget</var> is <emu-val>true</emu-val>, return <var>trapResult</var>.</li><li>For each <var>key</var> that is an element of <var>targetConfigurableKeys</var>, do<ol><li>If <var>key</var> is not an element of <var>uncheckedResultKeys</var>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Remove <var>key</var> from <var>uncheckedResultKeys</var>.</li></ol></li><li>If <var>uncheckedResultKeys</var> is not empty, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return <var>trapResult</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>[[OwnPropertyKeys]] for proxy objects enforces the following invariants:</p>
<ul>
<li>
The result of [[OwnPropertyKeys]] is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3063"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li>
<li>
The returned <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3064"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> contains no duplicate entries.
</li>
<li>
The Type of each result <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3065"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> element is either String or Symbol.
</li>
<li>
The result <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3066"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> must contain the keys of all non-configurable own properties of the target object.
</li>
<li>
If the target object is not extensible, then the result <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3067"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> must contain all the keys of the own properties of the target object and no other values.
</li>
</ul>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-proxy-object-internal-methods-and-internal-slots-call-thisargument-argumentslist">
<h1><span class="secnum">9.5.12</span>[[Call]] ( <var>thisArgument</var>, <var>argumentsList</var> )</h1>
<p>The [[Call]] internal method of a Proxy <emu-xref href="#exotic-object" id="_ref_3068"><a href="#exotic-object">exotic object</a></emu-xref> <var>O</var> is called with parameters <var>thisArgument</var> and <var>argumentsList</var>, a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3069"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of ECMAScript language values. The following steps are taken:</p>
<emu-alg><ol><li>Let <var>handler</var> be <var>O</var>.[[ProxyHandler]].</li><li>If <var>handler</var> is <emu-val>null</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li><emu-xref href="#assert" id="_ref_3070"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_3071"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>handler</var>) is Object.</li><li>Let <var>target</var> be <var>O</var>.[[ProxyTarget]].</li><li>Let <var>trap</var> be ?&nbsp;<emu-xref aoid="GetMethod" id="_ref_3072"><a href="#sec-getmethod">GetMethod</a></emu-xref>(<var>handler</var>, <code>"apply"</code>).</li><li>If <var>trap</var> is <emu-val>undefined</emu-val>, then<ol><li>Return ?&nbsp;<emu-xref aoid="Call" id="_ref_3073"><a href="#sec-call">Call</a></emu-xref>(<var>target</var>, <var>thisArgument</var>, <var>argumentsList</var>).</li></ol></li><li>Let <var>argArray</var> be <emu-xref aoid="CreateArrayFromList" id="_ref_3074"><a href="#sec-createarrayfromlist">CreateArrayFromList</a></emu-xref>(<var>argumentsList</var>).</li><li>Return ?&nbsp;<emu-xref aoid="Call" id="_ref_3075"><a href="#sec-call">Call</a></emu-xref>(<var>trap</var>, <var>handler</var>, « <var>target</var>, <var>thisArgument</var>, <var>argArray</var> »).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>A Proxy <emu-xref href="#exotic-object" id="_ref_3076"><a href="#exotic-object">exotic object</a></emu-xref>
only has a [[Call]] internal method if the initial value of its
[[ProxyTarget]] internal slot is an object that has a [[Call]] internal
method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-proxy-object-internal-methods-and-internal-slots-construct-argumentslist-newtarget">
<h1><span class="secnum">9.5.13</span>[[Construct]] ( <var>argumentsList</var>, <var>newTarget</var> )</h1>
<p>The [[Construct]] internal method of a Proxy <emu-xref href="#exotic-object" id="_ref_3077"><a href="#exotic-object">exotic object</a></emu-xref> <var>O</var> is called with parameters <var>argumentsList</var> which is a possibly empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3078"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of ECMAScript language values and <var>newTarget</var>. The following steps are taken:</p>
<emu-alg><ol><li>Let <var>handler</var> be <var>O</var>.[[ProxyHandler]].</li><li>If <var>handler</var> is <emu-val>null</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li><emu-xref href="#assert" id="_ref_3079"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_3080"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>handler</var>) is Object.</li><li>Let <var>target</var> be <var>O</var>.[[ProxyTarget]].</li><li><emu-xref href="#assert" id="_ref_3081"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsConstructor" id="_ref_3082"><a href="#sec-isconstructor">IsConstructor</a></emu-xref>(<var>target</var>) is <emu-val>true</emu-val>.</li><li>Let <var>trap</var> be ?&nbsp;<emu-xref aoid="GetMethod" id="_ref_3083"><a href="#sec-getmethod">GetMethod</a></emu-xref>(<var>handler</var>, <code>"construct"</code>).</li><li>If <var>trap</var> is <emu-val>undefined</emu-val>, then<ol><li>Return ?&nbsp;<emu-xref aoid="Construct" id="_ref_3084"><a href="#sec-construct">Construct</a></emu-xref>(<var>target</var>, <var>argumentsList</var>, <var>newTarget</var>).</li></ol></li><li>Let <var>argArray</var> be <emu-xref aoid="CreateArrayFromList" id="_ref_3085"><a href="#sec-createarrayfromlist">CreateArrayFromList</a></emu-xref>(<var>argumentsList</var>).</li><li>Let <var>newObj</var> be ?&nbsp;<emu-xref aoid="Call" id="_ref_3086"><a href="#sec-call">Call</a></emu-xref>(<var>trap</var>, <var>handler</var>, « <var>target</var>, <var>argArray</var>, <var>newTarget</var> »).</li><li>If <emu-xref aoid="Type" id="_ref_3087"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>newObj</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return <var>newObj</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>A Proxy <emu-xref href="#exotic-object" id="_ref_3088"><a href="#exotic-object">exotic object</a></emu-xref>
only has a [[Construct]] internal method if the initial value of its
[[ProxyTarget]] internal slot is an object that has a [[Construct]]
internal method.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>[[Construct]] for proxy objects enforces the following invariants:</p>
<ul>
<li>
The result of [[Construct]] must be an Object.
</li>
</ul>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-proxycreate" aoid="ProxyCreate">
<h1><span class="secnum">9.5.14</span>ProxyCreate ( <var>target</var>, <var>handler</var> )</h1>
<p>The abstract operation ProxyCreate with arguments <var>target</var> and <var>handler</var> is used to specify the creation of new Proxy exotic objects. It performs the following steps:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_3089"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>target</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>target</var> is a Proxy <emu-xref href="#exotic-object" id="_ref_3090"><a href="#exotic-object">exotic object</a></emu-xref> and <var>target</var>.[[ProxyHandler]] is <emu-val>null</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <emu-xref aoid="Type" id="_ref_3091"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>handler</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>handler</var> is a Proxy <emu-xref href="#exotic-object" id="_ref_3092"><a href="#exotic-object">exotic object</a></emu-xref> and <var>handler</var>.[[ProxyHandler]] is <emu-val>null</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>P</var> be a newly created object.</li><li>Set <var>P</var>'s essential internal methods (except for [[Call]] and [[Construct]]) to the definitions specified in <emu-xref href="#sec-proxy-object-internal-methods-and-internal-slots" id="_ref_248"><a href="#sec-proxy-object-internal-methods-and-internal-slots">9.5</a></emu-xref>.</li><li>If <emu-xref aoid="IsCallable" id="_ref_3093"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>target</var>) is <emu-val>true</emu-val>, then<ol><li>Set <var>P</var>.[[Call]] as specified in <emu-xref href="#sec-proxy-object-internal-methods-and-internal-slots-call-thisargument-argumentslist" id="_ref_249"><a href="#sec-proxy-object-internal-methods-and-internal-slots-call-thisargument-argumentslist">9.5.12</a></emu-xref>.</li><li>If <emu-xref aoid="IsConstructor" id="_ref_3094"><a href="#sec-isconstructor">IsConstructor</a></emu-xref>(<var>target</var>) is <emu-val>true</emu-val>, then<ol><li>Set <var>P</var>.[[Construct]] as specified in <emu-xref href="#sec-proxy-object-internal-methods-and-internal-slots-construct-argumentslist-newtarget" id="_ref_250"><a href="#sec-proxy-object-internal-methods-and-internal-slots-construct-argumentslist-newtarget">9.5.13</a></emu-xref>.</li></ol></li></ol></li><li>Set <var>P</var>.[[ProxyTarget]] to <var>target</var>.</li><li>Set <var>P</var>.[[ProxyHandler]] to <var>handler</var>.</li><li>Return <var>P</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-ecmascript-language-source-code">
<h1><span class="secnum">10</span>ECMAScript Language: Source Code</h1>
<emu-clause id="sec-source-text">
<h1><span class="secnum">10.1</span>Source Text</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="SourceCharacter" type="lexical" id="prod-SourceCharacter">
<emu-nt><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="c64b38bd"><emu-gprose>any Unicode code point</emu-gprose></emu-rhs>
</emu-production></emu-grammar>
<p>ECMAScript code is expressed using Unicode. ECMAScript source
text is a sequence of code points. All Unicode code point values from
U+0000 to U+10FFFF, including surrogate code points, may occur in source
text where permitted by the ECMAScript grammars. The actual encodings
used to store and interchange ECMAScript source text is not relevant to
this specification. Regardless of the external source text encoding, a
conforming ECMAScript implementation processes the source text as if it
was an equivalent sequence of <emu-nt id="_ref_9095"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt> values, each <emu-nt id="_ref_9096"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt>
being a Unicode code point. Conforming ECMAScript implementations are
not required to perform any normalization of source text, or behave as
though they were performing normalization of source text.</p>
<p>The components of a combining character sequence are treated as
individual Unicode code points even though a user might think of the
whole sequence as a single character.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>In string literals, regular expression literals, template
literals and identifiers, any Unicode code point may also be expressed
using Unicode escape sequences that explicitly express a code point's
numeric value. Within a comment, such an escape sequence is effectively
ignored as part of the comment.</p>
<p>ECMAScript differs from the Java programming language in the
behaviour of Unicode escape sequences. In a Java program, if the Unicode
escape sequence <code>\u000A</code>, for example, occurs within a
single-line comment, it is interpreted as a line terminator (Unicode
code point U+000A is LINE FEED (LF)) and therefore the next code point
is not part of the comment. Similarly, if the Unicode escape sequence <code>\u000A</code>
occurs within a string literal in a Java program, it is likewise
interpreted as a line terminator, which is not allowed within a string
literal—one must write <code>\n</code> instead of <code>\u000A</code> to
cause a LINE FEED (LF) to be part of the String value of a string
literal. In an ECMAScript program, a Unicode escape sequence occurring
within a comment is never interpreted and therefore cannot contribute to
termination of the comment. Similarly, a Unicode escape sequence
occurring within a string literal in an ECMAScript program always
contributes to the literal and is never interpreted as a line terminator
or as a code point that might terminate the string literal.</p>
</div></emu-note>
<emu-clause id="sec-utf16encoding" aoid="UTF16Encoding">
<h1><span class="secnum">10.1.1</span>Static Semantics: UTF16Encoding ( <var>cp</var> )</h1>
<p>The UTF16Encoding of a numeric code point value, <var>cp</var>, is determined as follows:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_3095"><a href="#assert">Assert</a></emu-xref>: 0 ≤ <var>cp</var> ≤ 0x10FFFF.</li><li>If <var>cp</var> ≤ 0xFFFF, return <var>cp</var>.</li><li>Let <var>cu1</var> be <emu-xref aoid="floor" id="_ref_3096"><a href="#eqn-floor">floor</a></emu-xref>((<var>cp</var> - 0x10000) / 0x400) + 0xD800.</li><li>Let <var>cu2</var> be ((<var>cp</var> - 0x10000) <emu-xref aoid="modulo" id="_ref_3097"><a href="#eqn-modulo">modulo</a></emu-xref> 0x400) + 0xDC00.</li><li>Return the code unit sequence consisting of <var>cu1</var> followed by <var>cu2</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-utf16decode" aoid="UTF16Decode">
<h1><span class="secnum">10.1.2</span>Static Semantics: UTF16Decode ( <var>lead</var>, <var>trail</var> )</h1>
<p>Two code units, <var>lead</var> and <var>trail</var>, that form a UTF-16 <emu-xref href="#surrogate-pair" id="_ref_251"><a href="#surrogate-pair">surrogate pair</a></emu-xref> are converted to a code point by performing the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_3098"><a href="#assert">Assert</a></emu-xref>: <var>lead</var> is a <emu-xref href="#leading-surrogate" id="_ref_252"><a href="#leading-surrogate">leading surrogate</a></emu-xref> and <var>trail</var> is a <emu-xref href="#trailing-surrogate" id="_ref_253"><a href="#trailing-surrogate">trailing surrogate</a></emu-xref>.</li><li>Let <var>cp</var> be (<var>lead</var> - 0xD800) × 0x400 + (<var>trail</var> - 0xDC00) + 0x10000.</li><li>Return the code point <var>cp</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-types-of-source-code">
<h1><span class="secnum">10.2</span>Types of Source Code</h1>
<p>There are four types of ECMAScript code:</p>
<ul>
<li>
<em>Global code</em> is source text that is treated as an ECMAScript <emu-nt id="_ref_9097"><a href="#prod-Script">Script</a></emu-nt>. The global code of a particular <emu-nt id="_ref_9098"><a href="#prod-Script">Script</a></emu-nt> does not include any source text that is parsed as part of a <emu-nt id="_ref_9099"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>, <emu-nt id="_ref_9100"><a href="#prod-FunctionExpression">FunctionExpression</a></emu-nt>, <emu-nt id="_ref_9101"><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a></emu-nt>, <emu-nt id="_ref_9102"><a href="#prod-GeneratorExpression">GeneratorExpression</a></emu-nt>, <emu-nt id="_ref_9103"><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt>, <emu-nt id="_ref_9104"><a href="#prod-AsyncFunctionExpression">AsyncFunctionExpression</a></emu-nt>, <emu-nt id="_ref_9105"><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt>, <emu-nt id="_ref_9106"><a href="#prod-AsyncGeneratorExpression">AsyncGeneratorExpression</a></emu-nt>, <emu-nt id="_ref_9107"><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt>, <emu-nt id="_ref_9108"><a href="#prod-ArrowFunction">ArrowFunction</a></emu-nt>, <emu-nt id="_ref_9109"><a href="#prod-AsyncArrowFunction">AsyncArrowFunction</a></emu-nt>, <emu-nt id="_ref_9110"><a href="#prod-ClassDeclaration">ClassDeclaration</a></emu-nt>, or <emu-nt id="_ref_9111"><a href="#prod-ClassExpression">ClassExpression</a></emu-nt>.
</li>
<li>
<em>Eval code</em> is the source text supplied to the built-in <code>eval</code> function. More precisely, if the parameter to the built-in <code>eval</code> function is a String, it is treated as an ECMAScript <emu-nt id="_ref_9112"><a href="#prod-Script">Script</a></emu-nt>. The eval code for a particular invocation of <code>eval</code> is the global code portion of that <emu-nt id="_ref_9113"><a href="#prod-Script">Script</a></emu-nt>.
</li>
<li>
<em>Function code</em> is source text that is parsed to supply the value of the [[ECMAScriptCode]] and [[FormalParameters]] internal slots (see <emu-xref href="#sec-ecmascript-function-objects" id="_ref_254"><a href="#sec-ecmascript-function-objects">9.2</a></emu-xref>) of an ECMAScript <emu-xref href="#function-object" id="_ref_3099"><a href="#function-object">function object</a></emu-xref>.
The function code of a particular ECMAScript function does not include
any source text that is parsed as the function code of a nested <emu-nt id="_ref_9114"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>, <emu-nt id="_ref_9115"><a href="#prod-FunctionExpression">FunctionExpression</a></emu-nt>, <emu-nt id="_ref_9116"><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a></emu-nt>, <emu-nt id="_ref_9117"><a href="#prod-GeneratorExpression">GeneratorExpression</a></emu-nt>, <emu-nt id="_ref_9118"><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt>, <emu-nt id="_ref_9119"><a href="#prod-AsyncFunctionExpression">AsyncFunctionExpression</a></emu-nt>, <emu-nt id="_ref_9120"><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt>, <emu-nt id="_ref_9121"><a href="#prod-AsyncGeneratorExpression">AsyncGeneratorExpression</a></emu-nt>, <emu-nt id="_ref_9122"><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt>, <emu-nt id="_ref_9123"><a href="#prod-ArrowFunction">ArrowFunction</a></emu-nt>, <emu-nt id="_ref_9124"><a href="#prod-AsyncArrowFunction">AsyncArrowFunction</a></emu-nt>, <emu-nt id="_ref_9125"><a href="#prod-ClassDeclaration">ClassDeclaration</a></emu-nt>, or <emu-nt id="_ref_9126"><a href="#prod-ClassExpression">ClassExpression</a></emu-nt>.
</li>
<li>
<em>Module code</em> is source text that is code that is provided as a <emu-nt id="_ref_9127"><a href="#prod-ModuleBody">ModuleBody</a></emu-nt>.
It is the code that is directly evaluated when a module is initialized.
The module code of a particular module does not include any source text
that is parsed as part of a nested <emu-nt id="_ref_9128"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>, <emu-nt id="_ref_9129"><a href="#prod-FunctionExpression">FunctionExpression</a></emu-nt>, <emu-nt id="_ref_9130"><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a></emu-nt>, <emu-nt id="_ref_9131"><a href="#prod-GeneratorExpression">GeneratorExpression</a></emu-nt>, <emu-nt id="_ref_9132"><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt>, <emu-nt id="_ref_9133"><a href="#prod-AsyncFunctionExpression">AsyncFunctionExpression</a></emu-nt>, <emu-nt id="_ref_9134"><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt>, <emu-nt id="_ref_9135"><a href="#prod-AsyncGeneratorExpression">AsyncGeneratorExpression</a></emu-nt>, <emu-nt id="_ref_9136"><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt>, <emu-nt id="_ref_9137"><a href="#prod-ArrowFunction">ArrowFunction</a></emu-nt>, <emu-nt id="_ref_9138"><a href="#prod-AsyncArrowFunction">AsyncArrowFunction</a></emu-nt>, <emu-nt id="_ref_9139"><a href="#prod-ClassDeclaration">ClassDeclaration</a></emu-nt>, or <emu-nt id="_ref_9140"><a href="#prod-ClassExpression">ClassExpression</a></emu-nt>.
</li>
</ul>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Function code is generally provided as the bodies of Function Definitions (<emu-xref href="#sec-function-definitions" id="_ref_255"><a href="#sec-function-definitions">14.1</a></emu-xref>), Arrow Function Definitions (<emu-xref href="#sec-arrow-function-definitions" id="_ref_256"><a href="#sec-arrow-function-definitions">14.2</a></emu-xref>), Method Definitions (<emu-xref href="#sec-method-definitions" id="_ref_257"><a href="#sec-method-definitions">14.3</a></emu-xref>), Generator Function Definitions (<emu-xref href="#sec-generator-function-definitions" id="_ref_258"><a href="#sec-generator-function-definitions">14.4</a></emu-xref>), Async Function Definitions (<emu-xref href="#sec-async-function-definitions" id="_ref_259"><a href="#sec-async-function-definitions">14.7</a></emu-xref>), Async Generator Function Definitions (<emu-xref href="#sec-async-generator-function-definitions" id="_ref_260"><a href="#sec-async-generator-function-definitions">14.5</a></emu-xref>), and Async Arrow Functions (<emu-xref href="#sec-async-arrow-function-definitions" id="_ref_261"><a href="#sec-async-arrow-function-definitions">14.8</a></emu-xref>). Function code is also derived from the arguments to the <code>Function</code> <emu-xref href="#constructor" id="_ref_3100"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-function-p1-p2-pn-body" id="_ref_262"><a href="#sec-function-p1-p2-pn-body">19.2.1.1</a></emu-xref>), the <code>GeneratorFunction</code> <emu-xref href="#constructor" id="_ref_3101"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-generatorfunction" id="_ref_263"><a href="#sec-generatorfunction">25.2.1.1</a></emu-xref>), and the <code>AsyncFunction</code> <emu-xref href="#constructor" id="_ref_3102"><a href="#constructor">constructor</a></emu-xref> (<emu-xref href="#sec-async-function-constructor-arguments" id="_ref_264"><a href="#sec-async-function-constructor-arguments">25.7.1.1</a></emu-xref>).</p>
</div></emu-note>
<emu-clause id="sec-strict-mode-code">
<h1><span class="secnum">10.2.1</span>Strict Mode Code</h1>
<p>An ECMAScript <emu-nt id="_ref_9141"><a href="#prod-Script">Script</a></emu-nt> syntactic unit may be processed using either unrestricted or strict mode syntax and semantics. Code is interpreted as <dfn>strict mode code</dfn> in the following situations:</p>
<ul>
<li>
Global code is strict mode code if it begins with a <emu-xref href="#directive-prologue" id="_ref_3103"><a href="#directive-prologue">Directive Prologue</a></emu-xref> that contains a <emu-xref href="#use-strict-directive" id="_ref_3104"><a href="#use-strict-directive">Use Strict Directive</a></emu-xref>.
</li>
<li>
Module code is always strict mode code.
</li>
<li>
All parts of a <emu-nt id="_ref_9142"><a href="#prod-ClassDeclaration">ClassDeclaration</a></emu-nt> or a <emu-nt id="_ref_9143"><a href="#prod-ClassExpression">ClassExpression</a></emu-nt> are strict mode code.
</li>
<li>
Eval code is strict mode code if it begins with a <emu-xref href="#directive-prologue" id="_ref_3105"><a href="#directive-prologue">Directive Prologue</a></emu-xref> that contains a <emu-xref href="#use-strict-directive" id="_ref_3106"><a href="#use-strict-directive">Use Strict Directive</a></emu-xref> or if the call to <code>eval</code> is a <emu-xref href="#sec-function-calls-runtime-semantics-evaluation" id="_ref_3107"><a href="#sec-function-calls-runtime-semantics-evaluation">direct eval</a></emu-xref> that is contained in strict mode code.
</li>
<li>
Function code is strict mode code if the associated <emu-nt id="_ref_9144"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>, <emu-nt id="_ref_9145"><a href="#prod-FunctionExpression">FunctionExpression</a></emu-nt>, <emu-nt id="_ref_9146"><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a></emu-nt>, <emu-nt id="_ref_9147"><a href="#prod-GeneratorExpression">GeneratorExpression</a></emu-nt>, <emu-nt id="_ref_9148"><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt>, <emu-nt id="_ref_9149"><a href="#prod-AsyncFunctionExpression">AsyncFunctionExpression</a></emu-nt>, <emu-nt id="_ref_9150"><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt>, <emu-nt id="_ref_9151"><a href="#prod-AsyncGeneratorExpression">AsyncGeneratorExpression</a></emu-nt>, <emu-nt id="_ref_9152"><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt>, <emu-nt id="_ref_9153"><a href="#prod-ArrowFunction">ArrowFunction</a></emu-nt>, or <emu-nt id="_ref_9154"><a href="#prod-AsyncArrowFunction">AsyncArrowFunction</a></emu-nt>
is contained in strict mode code or if the code that produces the value
of the function's [[ECMAScriptCode]] internal slot begins with a <emu-xref href="#directive-prologue" id="_ref_3108"><a href="#directive-prologue">Directive Prologue</a></emu-xref> that contains a <emu-xref href="#use-strict-directive" id="_ref_3109"><a href="#use-strict-directive">Use Strict Directive</a></emu-xref>.
</li>
<li>
Function code that is supplied as the arguments to the built-in <code>Function</code>, <code>Generator</code>, <code>AsyncFunction</code>, and <code>AsyncGenerator</code> constructors is strict mode code if the last argument is a String that when processed is a <emu-nt id="_ref_9155"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt> that begins with a <emu-xref href="#directive-prologue" id="_ref_3110"><a href="#directive-prologue">Directive Prologue</a></emu-xref> that contains a <emu-xref href="#use-strict-directive" id="_ref_3111"><a href="#use-strict-directive">Use Strict Directive</a></emu-xref>.
</li>
</ul>
<p>ECMAScript code that is not strict mode code is called <dfn id="non-strict-code">non-strict code</dfn>.</p>
</emu-clause>
<emu-clause id="sec-non-ecmascript-functions">
<h1><span class="secnum">10.2.2</span>Non-ECMAScript Functions</h1>
<p>An ECMAScript implementation may support the evaluation of
function exotic objects whose evaluative behaviour is expressed in some
implementation-defined form of executable code other than via ECMAScript
code. Whether a <emu-xref href="#function-object" id="_ref_3112"><a href="#function-object">function object</a></emu-xref>
is an ECMAScript code function or a non-ECMAScript function is not
semantically observable from the perspective of an ECMAScript code
function that calls or is called by such a non-ECMAScript function.</p>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-ecmascript-language-lexical-grammar">
<h1><span class="secnum">11</span>ECMAScript Language: Lexical Grammar</h1>
<p>The source text of an ECMAScript <emu-nt id="_ref_9156"><a href="#prod-Script">Script</a></emu-nt> or <emu-nt id="_ref_9157"><a href="#prod-Module">Module</a></emu-nt>
is first converted into a sequence of input elements, which are tokens,
line terminators, comments, or white space. The source text is scanned
from left to right, repeatedly taking the longest possible sequence of
code points as the next input element.</p>
<p>There are several situations where the identification of lexical
input elements is sensitive to the syntactic grammar context that is
consuming the input elements. This requires multiple goal symbols for
the lexical grammar. The <emu-nt id="_ref_9158"><a href="#prod-InputElementRegExpOrTemplateTail">InputElementRegExpOrTemplateTail</a></emu-nt> goal is used in syntactic grammar contexts where a <emu-nt id="_ref_9159"><a href="#prod-RegularExpressionLiteral">RegularExpressionLiteral</a></emu-nt>, a <emu-nt id="_ref_9160"><a href="#prod-TemplateMiddle">TemplateMiddle</a></emu-nt>, or a <emu-nt id="_ref_9161"><a href="#prod-TemplateTail">TemplateTail</a></emu-nt> is permitted. The <emu-nt id="_ref_9162"><a href="#prod-InputElementRegExp">InputElementRegExp</a></emu-nt> <emu-xref href="#sec-context-free-grammars" id="_ref_3113"><a href="#sec-context-free-grammars">goal symbol</a></emu-xref> is used in all syntactic grammar contexts where a <emu-nt id="_ref_9163"><a href="#prod-RegularExpressionLiteral">RegularExpressionLiteral</a></emu-nt> is permitted but neither a <emu-nt id="_ref_9164"><a href="#prod-TemplateMiddle">TemplateMiddle</a></emu-nt>, nor a <emu-nt id="_ref_9165"><a href="#prod-TemplateTail">TemplateTail</a></emu-nt> is permitted. The <emu-nt id="_ref_9166"><a href="#prod-InputElementTemplateTail">InputElementTemplateTail</a></emu-nt> goal is used in all syntactic grammar contexts where a <emu-nt id="_ref_9167"><a href="#prod-TemplateMiddle">TemplateMiddle</a></emu-nt> or a <emu-nt id="_ref_9168"><a href="#prod-TemplateTail">TemplateTail</a></emu-nt> is permitted but a <emu-nt id="_ref_9169"><a href="#prod-RegularExpressionLiteral">RegularExpressionLiteral</a></emu-nt> is not permitted. In all other contexts, <emu-nt id="_ref_9170"><a href="#prod-InputElementDiv">InputElementDiv</a></emu-nt> is used as the lexical <emu-xref href="#sec-context-free-grammars" id="_ref_3114"><a href="#sec-context-free-grammars">goal symbol</a></emu-xref>.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The use of multiple lexical goals ensures that there are no
lexical ambiguities that would affect automatic semicolon insertion. For
example, there are no syntactic grammar contexts where both a leading
division or division-assignment, and a leading <emu-nt id="_ref_9171"><a href="#prod-RegularExpressionLiteral">RegularExpressionLiteral</a></emu-nt> are permitted. This is not affected by semicolon insertion (see <emu-xref href="#sec-automatic-semicolon-insertion" id="_ref_265"><a href="#sec-automatic-semicolon-insertion">11.9</a></emu-xref>); in examples such as the following:</p>
<pre><code class="javascript hljs">a = b
/hi/g.exec(c).map(d);</code></pre>
<p>where the first non-whitespace, non-comment code point after a <emu-nt id="_ref_9172"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> is U+002F (SOLIDUS) and the syntactic context allows division or division-assignment, no semicolon is inserted at the <emu-nt id="_ref_9173"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt>. That is, the above example is interpreted in the same way as:</p>
<pre><code class="javascript hljs">a = b / hi / g.exec(c).map(d);</code></pre>
</div></emu-note>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="InputElementDiv" type="lexical" id="prod-InputElementDiv">
<emu-nt><a href="#prod-InputElementDiv">InputElementDiv</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="1424dc49"><emu-nt id="_ref_9174"><a href="#prod-WhiteSpace">WhiteSpace</a></emu-nt></emu-rhs>
<emu-rhs a="3b331ccd"><emu-nt id="_ref_9175"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt></emu-rhs>
<emu-rhs a="153d7a58"><emu-nt id="_ref_9176"><a href="#prod-Comment">Comment</a></emu-nt></emu-rhs>
<emu-rhs a="83158895"><emu-nt id="_ref_9177"><a href="#prod-CommonToken">CommonToken</a></emu-nt></emu-rhs>
<emu-rhs a="28035084"><emu-nt id="_ref_9178"><a href="#prod-DivPunctuator">DivPunctuator</a></emu-nt></emu-rhs>
<emu-rhs a="121314a7"><emu-nt id="_ref_9179"><a href="#prod-RightBracePunctuator">RightBracePunctuator</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="InputElementRegExp" type="lexical" id="prod-InputElementRegExp">
<emu-nt><a href="#prod-InputElementRegExp">InputElementRegExp</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="1424dc49"><emu-nt id="_ref_9180"><a href="#prod-WhiteSpace">WhiteSpace</a></emu-nt></emu-rhs>
<emu-rhs a="3b331ccd"><emu-nt id="_ref_9181"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt></emu-rhs>
<emu-rhs a="153d7a58"><emu-nt id="_ref_9182"><a href="#prod-Comment">Comment</a></emu-nt></emu-rhs>
<emu-rhs a="83158895"><emu-nt id="_ref_9183"><a href="#prod-CommonToken">CommonToken</a></emu-nt></emu-rhs>
<emu-rhs a="121314a7"><emu-nt id="_ref_9184"><a href="#prod-RightBracePunctuator">RightBracePunctuator</a></emu-nt></emu-rhs>
<emu-rhs a="31b672e8"><emu-nt id="_ref_9185"><a href="#prod-RegularExpressionLiteral">RegularExpressionLiteral</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="InputElementRegExpOrTemplateTail" type="lexical" id="prod-InputElementRegExpOrTemplateTail">
<emu-nt><a href="#prod-InputElementRegExpOrTemplateTail">InputElementRegExpOrTemplateTail</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="1424dc49"><emu-nt id="_ref_9186"><a href="#prod-WhiteSpace">WhiteSpace</a></emu-nt></emu-rhs>
<emu-rhs a="3b331ccd"><emu-nt id="_ref_9187"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt></emu-rhs>
<emu-rhs a="153d7a58"><emu-nt id="_ref_9188"><a href="#prod-Comment">Comment</a></emu-nt></emu-rhs>
<emu-rhs a="83158895"><emu-nt id="_ref_9189"><a href="#prod-CommonToken">CommonToken</a></emu-nt></emu-rhs>
<emu-rhs a="31b672e8"><emu-nt id="_ref_9190"><a href="#prod-RegularExpressionLiteral">RegularExpressionLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="62ae6eb9"><emu-nt id="_ref_9191"><a href="#prod-TemplateSubstitutionTail">TemplateSubstitutionTail</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="InputElementTemplateTail" type="lexical" id="prod-InputElementTemplateTail">
<emu-nt><a href="#prod-InputElementTemplateTail">InputElementTemplateTail</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="1424dc49"><emu-nt id="_ref_9192"><a href="#prod-WhiteSpace">WhiteSpace</a></emu-nt></emu-rhs>
<emu-rhs a="3b331ccd"><emu-nt id="_ref_9193"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt></emu-rhs>
<emu-rhs a="153d7a58"><emu-nt id="_ref_9194"><a href="#prod-Comment">Comment</a></emu-nt></emu-rhs>
<emu-rhs a="83158895"><emu-nt id="_ref_9195"><a href="#prod-CommonToken">CommonToken</a></emu-nt></emu-rhs>
<emu-rhs a="28035084"><emu-nt id="_ref_9196"><a href="#prod-DivPunctuator">DivPunctuator</a></emu-nt></emu-rhs>
<emu-rhs a="62ae6eb9"><emu-nt id="_ref_9197"><a href="#prod-TemplateSubstitutionTail">TemplateSubstitutionTail</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-clause id="sec-unicode-format-control-characters">
<h1><span class="secnum">11.1</span>Unicode Format-Control Characters</h1>
<p>The Unicode format-control characters (i.e., the characters in
category “Cf” in the Unicode Character Database such as LEFT-TO-RIGHT
MARK or RIGHT-TO-LEFT MARK) are control codes used to control the
formatting of a range of text in the absence of higher-level protocols
for this (such as mark-up languages).</p>
<p>It is useful to allow format-control characters in source text to
facilitate editing and display. All format control characters may be
used within comments, and within string literals, template literals, and
regular expression literals.</p>
<p>U+200C (ZERO WIDTH NON-JOINER) and U+200D (ZERO WIDTH JOINER) are
format-control characters that are used to make necessary distinctions
when forming words or phrases in certain languages. In ECMAScript source
text these code points may also be used in an <emu-nt id="_ref_9198"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt> after the first character.</p>
<p>U+FEFF (ZERO WIDTH NO-BREAK SPACE) is a format-control character
used primarily at the start of a text to mark it as Unicode and to allow
detection of the text's encoding and byte order. &lt;ZWNBSP&gt;
characters intended for this purpose can sometimes also appear after the
start of a text, for example as a result of concatenating files. In
ECMAScript source text &lt;ZWNBSP&gt; code points are treated as white
space characters (see <emu-xref href="#sec-white-space" id="_ref_266"><a href="#sec-white-space">11.2</a></emu-xref>).</p>
<p>The special treatment of certain format-control characters
outside of comments, string literals, and regular expression literals is
summarized in <emu-xref href="#table-31" id="_ref_267"><a href="#table-31">Table 31</a></emu-xref>.</p>
<emu-table id="table-31" caption="Format-Control Code Point Usage"><figure><figcaption>Table 31: Format-Control Code Point Usage</figcaption>
<table>
<tbody>
<tr>
<th>
Code Point
</th>
<th>
Name
</th>
<th>
Abbreviation
</th>
<th>
Usage
</th>
</tr>
<tr>
<td>
<code>U+200C</code>
</td>
<td>
ZERO WIDTH NON-JOINER
</td>
<td>
&lt;ZWNJ&gt;
</td>
<td>
<emu-nt id="_ref_9199"><a href="#prod-IdentifierPart">IdentifierPart</a></emu-nt>
</td>
</tr>
<tr>
<td>
<code>U+200D</code>
</td>
<td>
ZERO WIDTH JOINER
</td>
<td>
&lt;ZWJ&gt;
</td>
<td>
<emu-nt id="_ref_9200"><a href="#prod-IdentifierPart">IdentifierPart</a></emu-nt>
</td>
</tr>
<tr>
<td>
<code>U+FEFF</code>
</td>
<td>
ZERO WIDTH NO-BREAK SPACE
</td>
<td>
&lt;ZWNBSP&gt;
</td>
<td>
<emu-nt id="_ref_9201"><a href="#prod-WhiteSpace">WhiteSpace</a></emu-nt>
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
</emu-clause>
<emu-clause id="sec-white-space">
<h1><span class="secnum">11.2</span>White Space</h1>
<p>White space code points are used to improve source text
readability and to separate tokens (indivisible lexical units) from each
other, but are otherwise insignificant. White space code points may
occur between any two tokens and at the start or end of input. White
space code points may occur within a <emu-nt id="_ref_9202"><a href="#prod-StringLiteral">StringLiteral</a></emu-nt>, a <emu-nt id="_ref_9203"><a href="#prod-RegularExpressionLiteral">RegularExpressionLiteral</a></emu-nt>, a <emu-nt id="_ref_9204"><a href="#prod-Template">Template</a></emu-nt>, or a <emu-nt id="_ref_9205"><a href="#prod-TemplateSubstitutionTail">TemplateSubstitutionTail</a></emu-nt> where they are considered significant code points forming part of a literal value. They may also occur within a <emu-nt id="_ref_9206"><a href="#prod-Comment">Comment</a></emu-nt>, but cannot appear within any other kind of token.</p>
<p>The ECMAScript white space code points are listed in <emu-xref href="#table-32" id="_ref_268"><a href="#table-32">Table 32</a></emu-xref>.</p>
<emu-table id="table-32" caption="White Space Code Points"><figure><figcaption>Table 32: White Space Code Points</figcaption>
<table>
<tbody>
<tr>
<th>
Code Point
</th>
<th>
Name
</th>
<th>
Abbreviation
</th>
</tr>
<tr>
<td>
<code>U+0009</code>
</td>
<td>
CHARACTER TABULATION
</td>
<td>
&lt;TAB&gt;
</td>
</tr>
<tr>
<td>
<code>U+000B</code>
</td>
<td>
LINE TABULATION
</td>
<td>
&lt;VT&gt;
</td>
</tr>
<tr>
<td>
<code>U+000C</code>
</td>
<td>
FORM FEED (FF)
</td>
<td>
&lt;FF&gt;
</td>
</tr>
<tr>
<td>
<code>U+0020</code>
</td>
<td>
SPACE
</td>
<td>
&lt;SP&gt;
</td>
</tr>
<tr>
<td>
<code>U+00A0</code>
</td>
<td>
NO-BREAK SPACE
</td>
<td>
&lt;NBSP&gt;
</td>
</tr>
<tr>
<td>
<code>U+FEFF</code>
</td>
<td>
ZERO WIDTH NO-BREAK SPACE
</td>
<td>
&lt;ZWNBSP&gt;
</td>
</tr>
<tr>
<td>
Other category “Zs”
</td>
<td>
Any other Unicode “Space_Separator” code point
</td>
<td>
&lt;USP&gt;
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<p>ECMAScript implementations must recognize as <emu-nt id="_ref_9207"><a href="#prod-WhiteSpace">WhiteSpace</a></emu-nt> code points listed in the “Space_Separator” (“Zs”) category.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Other than for the code points listed in <emu-xref href="#table-32" id="_ref_269"><a href="#table-32">Table 32</a></emu-xref>, ECMAScript <emu-nt id="_ref_9208"><a href="#prod-WhiteSpace">WhiteSpace</a></emu-nt>
intentionally excludes all code points that have the Unicode
“White_Space” property but which are not classified in category
“Space_Separator” (“Zs”).</p>
</div></emu-note>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="WhiteSpace" type="lexical" id="prod-WhiteSpace">
<emu-nt><a href="#prod-WhiteSpace">WhiteSpace</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="819ea3fd"><emu-gprose>&lt;TAB&gt;</emu-gprose></emu-rhs>
<emu-rhs a="156dc7da"><emu-gprose>&lt;VT&gt;</emu-gprose></emu-rhs>
<emu-rhs a="77b516c0"><emu-gprose>&lt;FF&gt;</emu-gprose></emu-rhs>
<emu-rhs a="6a85afed"><emu-gprose>&lt;SP&gt;</emu-gprose></emu-rhs>
<emu-rhs a="63dd44af"><emu-gprose>&lt;NBSP&gt;</emu-gprose></emu-rhs>
<emu-rhs a="b09e901a"><emu-gprose>&lt;ZWNBSP&gt;</emu-gprose></emu-rhs>
<emu-rhs a="e7de22a4"><emu-gprose>&lt;USP&gt;</emu-gprose></emu-rhs>
</emu-production></emu-grammar>
</emu-clause>
<emu-clause id="sec-line-terminators">
<h1><span class="secnum">11.3</span>Line Terminators</h1>
<p>Like white space code points, line terminator code points are
used to improve source text readability and to separate tokens
(indivisible lexical units) from each other. However, unlike white space
code points, line terminators have some influence over the behaviour of
the syntactic grammar. In general, line terminators may occur between
any two tokens, but there are a few places where they are forbidden by
the syntactic grammar. Line terminators also affect the process of
automatic semicolon insertion (<emu-xref href="#sec-automatic-semicolon-insertion" id="_ref_270"><a href="#sec-automatic-semicolon-insertion">11.9</a></emu-xref>). A line terminator cannot occur within any token except a <emu-nt id="_ref_9209"><a href="#prod-StringLiteral">StringLiteral</a></emu-nt>, <emu-nt id="_ref_9210"><a href="#prod-Template">Template</a></emu-nt>, or <emu-nt id="_ref_9211"><a href="#prod-TemplateSubstitutionTail">TemplateSubstitutionTail</a></emu-nt>. &lt;LF&gt; and &lt;CR&gt; line terminators cannot occur within a <emu-nt id="_ref_9212"><a href="#prod-StringLiteral">StringLiteral</a></emu-nt> token except as part of a <emu-nt id="_ref_9213"><a href="#prod-LineContinuation">LineContinuation</a></emu-nt>.</p>
<p>A line terminator can occur within a <emu-nt id="_ref_9214"><a href="#prod-MultiLineComment">MultiLineComment</a></emu-nt> but cannot occur within a <emu-nt id="_ref_9215"><a href="#prod-SingleLineComment">SingleLineComment</a></emu-nt>.</p>
<p>Line terminators are included in the set of white space code points that are matched by the <code>\s</code> class in regular expressions.</p>
<p>The ECMAScript line terminator code points are listed in <emu-xref href="#table-33" id="_ref_271"><a href="#table-33">Table 33</a></emu-xref>.</p>
<emu-table id="table-33" caption="Line Terminator Code Points"><figure><figcaption>Table 33: Line Terminator Code Points</figcaption>
<table>
<tbody>
<tr>
<th>
Code Point
</th>
<th>
Unicode Name
</th>
<th>
Abbreviation
</th>
</tr>
<tr>
<td>
<code>U+000A</code>
</td>
<td>
LINE FEED (LF)
</td>
<td>
&lt;LF&gt;
</td>
</tr>
<tr>
<td>
<code>U+000D</code>
</td>
<td>
CARRIAGE RETURN (CR)
</td>
<td>
&lt;CR&gt;
</td>
</tr>
<tr>
<td>
<code>U+2028</code>
</td>
<td>
LINE SEPARATOR
</td>
<td>
&lt;LS&gt;
</td>
</tr>
<tr>
<td>
<code>U+2029</code>
</td>
<td>
PARAGRAPH SEPARATOR
</td>
<td>
&lt;PS&gt;
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<p>Only the Unicode code points in <emu-xref href="#table-33" id="_ref_272"><a href="#table-33">Table 33</a></emu-xref>
are treated as line terminators. Other new line or line breaking
Unicode code points are not treated as line terminators but are treated
as white space if they meet the requirements listed in <emu-xref href="#table-32" id="_ref_273"><a href="#table-32">Table 32</a></emu-xref>. The sequence &lt;CR&gt;&lt;LF&gt; is commonly used as a line terminator. It should be considered a single <emu-nt id="_ref_9216"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt> for the purpose of reporting line numbers.</p>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="LineTerminator" type="lexical" id="prod-LineTerminator">
<emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="df188a5e"><emu-gprose>&lt;LF&gt;</emu-gprose></emu-rhs>
<emu-rhs a="6bb44f60"><emu-gprose>&lt;CR&gt;</emu-gprose></emu-rhs>
<emu-rhs a="85df8467"><emu-gprose>&lt;LS&gt;</emu-gprose></emu-rhs>
<emu-rhs a="be2ab9fa"><emu-gprose>&lt;PS&gt;</emu-gprose></emu-rhs>
</emu-production>
<emu-production name="LineTerminatorSequence" type="lexical" id="prod-LineTerminatorSequence">
<emu-nt><a href="#prod-LineTerminatorSequence">LineTerminatorSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="df188a5e"><emu-gprose>&lt;LF&gt;</emu-gprose></emu-rhs>
<emu-rhs a="64077750"><emu-gprose>&lt;CR&gt;</emu-gprose><emu-gann>[lookahead ≠ <emu-gprose>&lt;LF&gt;</emu-gprose>]</emu-gann></emu-rhs>
<emu-rhs a="85df8467"><emu-gprose>&lt;LS&gt;</emu-gprose></emu-rhs>
<emu-rhs a="be2ab9fa"><emu-gprose>&lt;PS&gt;</emu-gprose></emu-rhs>
<emu-rhs a="253de229"><emu-gprose>&lt;CR&gt;</emu-gprose><emu-gprose>&lt;LF&gt;</emu-gprose></emu-rhs>
</emu-production></emu-grammar>
</emu-clause>
<emu-clause id="sec-comments">
<h1><span class="secnum">11.4</span>Comments</h1>
<p>Comments can be either single or multi-line. Multi-line comments cannot nest.</p>
<p>Because a single-line comment can contain any Unicode code point except a <emu-nt id="_ref_9217"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt>
code point, and because of the general rule that a token is always as
long as possible, a single-line comment always consists of all code
points from the <code>//</code> marker to the end of the line. However, the <emu-nt id="_ref_9218"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt>
at the end of the line is not considered to be part of the single-line
comment; it is recognized separately by the lexical grammar and becomes
part of the stream of input elements for the syntactic grammar. This
point is very important, because it implies that the presence or absence
of single-line comments does not affect the process of automatic
semicolon insertion (see <emu-xref href="#sec-automatic-semicolon-insertion" id="_ref_274"><a href="#sec-automatic-semicolon-insertion">11.9</a></emu-xref>).</p>
<p>Comments behave like white space and are discarded except that, if a <emu-nt id="_ref_9219"><a href="#prod-MultiLineComment">MultiLineComment</a></emu-nt> contains a line terminator code point, then the entire comment is considered to be a <emu-nt id="_ref_9220"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> for purposes of parsing by the syntactic grammar.</p>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="Comment" type="lexical" id="prod-Comment">
<emu-nt><a href="#prod-Comment">Comment</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="b221187a"><emu-nt id="_ref_9221"><a href="#prod-MultiLineComment">MultiLineComment</a></emu-nt></emu-rhs>
<emu-rhs a="49272b29"><emu-nt id="_ref_9222"><a href="#prod-SingleLineComment">SingleLineComment</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="MultiLineComment" type="lexical" id="prod-MultiLineComment">
<emu-nt><a href="#prod-MultiLineComment">MultiLineComment</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="1e164ceb"><emu-t>/*</emu-t><emu-nt optional="" id="_ref_9223"><a href="#prod-MultiLineCommentChars">MultiLineCommentChars</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>*/</emu-t></emu-rhs>
</emu-production>
<emu-production name="MultiLineCommentChars" type="lexical" id="prod-MultiLineCommentChars">
<emu-nt><a href="#prod-MultiLineCommentChars">MultiLineCommentChars</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="24a6effb"><emu-nt id="_ref_9224"><a href="#prod-MultiLineNotAsteriskChar">MultiLineNotAsteriskChar</a></emu-nt><emu-nt optional="" id="_ref_9225"><a href="#prod-MultiLineCommentChars">MultiLineCommentChars</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="6fcb6b58"><emu-t>*</emu-t><emu-nt optional="" id="_ref_9226"><a href="#prod-PostAsteriskCommentChars">PostAsteriskCommentChars</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="PostAsteriskCommentChars" type="lexical" id="prod-PostAsteriskCommentChars">
<emu-nt><a href="#prod-PostAsteriskCommentChars">PostAsteriskCommentChars</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="25615007"><emu-nt id="_ref_9227"><a href="#prod-MultiLineNotForwardSlashOrAsteriskChar">MultiLineNotForwardSlashOrAsteriskChar</a></emu-nt><emu-nt optional="" id="_ref_9228"><a href="#prod-MultiLineCommentChars">MultiLineCommentChars</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="6fcb6b58"><emu-t>*</emu-t><emu-nt optional="" id="_ref_9229"><a href="#prod-PostAsteriskCommentChars">PostAsteriskCommentChars</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="MultiLineNotAsteriskChar" type="lexical" id="prod-MultiLineNotAsteriskChar">
<emu-nt><a href="#prod-MultiLineNotAsteriskChar">MultiLineNotAsteriskChar</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="9452de17"><emu-nt id="_ref_9230"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-gmod>but not <emu-t>*</emu-t></emu-gmod></emu-rhs>
</emu-production>
<emu-production name="MultiLineNotForwardSlashOrAsteriskChar" type="lexical" id="prod-MultiLineNotForwardSlashOrAsteriskChar">
<emu-nt><a href="#prod-MultiLineNotForwardSlashOrAsteriskChar">MultiLineNotForwardSlashOrAsteriskChar</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="1dd7e7ae"><emu-nt id="_ref_9231"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-gmod>but not one of <emu-t>/</emu-t> or <emu-t>*</emu-t></emu-gmod></emu-rhs>
</emu-production>
<emu-production name="SingleLineComment" type="lexical" id="prod-SingleLineComment">
<emu-nt><a href="#prod-SingleLineComment">SingleLineComment</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="53edd61c"><emu-t>//</emu-t><emu-nt optional="" id="_ref_9232"><a href="#prod-SingleLineCommentChars">SingleLineCommentChars</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="SingleLineCommentChars" type="lexical" id="prod-SingleLineCommentChars">
<emu-nt><a href="#prod-SingleLineCommentChars">SingleLineCommentChars</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="4521d447"><emu-nt id="_ref_9233"><a href="#prod-SingleLineCommentChar">SingleLineCommentChar</a></emu-nt><emu-nt optional="" id="_ref_9234"><a href="#prod-SingleLineCommentChars">SingleLineCommentChars</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="SingleLineCommentChar" type="lexical" id="prod-SingleLineCommentChar">
<emu-nt><a href="#prod-SingleLineCommentChar">SingleLineCommentChar</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="2d5bdfa7"><emu-nt id="_ref_9235"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-gmod>but not <emu-nt id="_ref_9236"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt></emu-gmod></emu-rhs>
</emu-production></emu-grammar>
</emu-clause>
<emu-clause id="sec-tokens">
<h1><span class="secnum">11.5</span>Tokens</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="CommonToken" type="lexical" id="prod-CommonToken">
<emu-nt><a href="#prod-CommonToken">CommonToken</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="0ebb31e2"><emu-nt id="_ref_9237"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
<emu-rhs a="ee18f3d6"><emu-nt id="_ref_9238"><a href="#prod-Punctuator">Punctuator</a></emu-nt></emu-rhs>
<emu-rhs a="a548b407"><emu-nt id="_ref_9239"><a href="#prod-NumericLiteral">NumericLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="5c74e54d"><emu-nt id="_ref_9240"><a href="#prod-StringLiteral">StringLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="3ec1ae06"><emu-nt id="_ref_9241"><a href="#prod-Template">Template</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <emu-nt id="_ref_9242"><a href="#prod-DivPunctuator">DivPunctuator</a></emu-nt>, <emu-nt id="_ref_9243"><a href="#prod-RegularExpressionLiteral">RegularExpressionLiteral</a></emu-nt>, <emu-nt id="_ref_9244"><a href="#prod-RightBracePunctuator">RightBracePunctuator</a></emu-nt>, and <emu-nt id="_ref_9245"><a href="#prod-TemplateSubstitutionTail">TemplateSubstitutionTail</a></emu-nt> productions derive additional tokens that are not included in the <emu-nt id="_ref_9246"><a href="#prod-CommonToken">CommonToken</a></emu-nt> production.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-names-and-keywords">
<h1><span class="secnum">11.6</span>Names and Keywords</h1>
<p><emu-nt id="_ref_9247"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt> and <emu-nt id="_ref_9248"><a href="#prod-ReservedWord">ReservedWord</a></emu-nt>
are tokens that are interpreted according to the Default Identifier
Syntax given in Unicode Standard Annex #31, Identifier and Pattern
Syntax, with some small modifications. <emu-nt id="_ref_9249"><a href="#prod-ReservedWord">ReservedWord</a></emu-nt> is an enumerated subset of <emu-nt id="_ref_9250"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt>. The syntactic grammar defines <emu-nt id="_ref_9251"><a href="#prod-Identifier">Identifier</a></emu-nt> as an <emu-nt id="_ref_9252"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt> that is not a <emu-nt id="_ref_9253"><a href="#prod-ReservedWord">ReservedWord</a></emu-nt>.
The Unicode identifier grammar is based on character properties
specified by the Unicode Standard. The Unicode code points in the
specified categories in the latest version of the Unicode standard must
be treated as in those categories by all conforming ECMAScript
implementations. ECMAScript implementations may recognize identifier
code points defined in later editions of the Unicode Standard.</p>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>This standard specifies specific code point additions: U+0024 (DOLLAR SIGN) and U+005F (LOW LINE) are permitted anywhere in an <emu-nt id="_ref_9254"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt>,
and the code points U+200C (ZERO WIDTH NON-JOINER) and U+200D (ZERO
WIDTH JOINER) are permitted anywhere after the first code point of an <emu-nt id="_ref_9255"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt>.</p>
</div></emu-note>
<p>Unicode escape sequences are permitted in an <emu-nt id="_ref_9256"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt>, where they contribute a single Unicode code point to the <emu-nt id="_ref_9257"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt>. The code point is expressed by the <emu-nt id="_ref_9258"><a href="#prod-CodePoint">CodePoint</a></emu-nt> of the <emu-nt id="_ref_9259"><a href="#prod-UnicodeEscapeSequence">UnicodeEscapeSequence</a></emu-nt> (see <emu-xref href="#sec-literals-string-literals" id="_ref_275"><a href="#sec-literals-string-literals">11.8.4</a></emu-xref>). The <code>\</code> preceding the <emu-nt id="_ref_9260"><a href="#prod-UnicodeEscapeSequence">UnicodeEscapeSequence</a></emu-nt> and the <code>u</code> and <code>{ }</code> code units, if they appear, do not contribute code points to the <emu-nt id="_ref_9261"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt>. A <emu-nt id="_ref_9262"><a href="#prod-UnicodeEscapeSequence">UnicodeEscapeSequence</a></emu-nt> cannot be used to put a code point into an <emu-nt id="_ref_9263"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt> that would otherwise be illegal. In other words, if a <code>\</code> <emu-nt id="_ref_9264"><a href="#prod-UnicodeEscapeSequence">UnicodeEscapeSequence</a></emu-nt> sequence were replaced by the <emu-nt id="_ref_9265"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt> it contributes, the result must still be a valid <emu-nt id="_ref_9266"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt> that has the exact same sequence of <emu-nt id="_ref_9267"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt> elements as the original <emu-nt id="_ref_9268"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt>. All interpretations of <emu-nt id="_ref_9269"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt>
within this specification are based upon their actual code points
regardless of whether or not an escape sequence was used to contribute
any particular code point.</p>
<p>Two <emu-nt id="_ref_9270"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt>s that are canonically equivalent according to the Unicode standard are <em>not</em> equal unless, after replacement of each <emu-nt id="_ref_9271"><a href="#prod-UnicodeEscapeSequence">UnicodeEscapeSequence</a></emu-nt>, they are represented by the exact same sequence of code points.</p>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="IdentifierName" type="lexical" id="prod-IdentifierName">
<emu-nt><a href="#prod-IdentifierName">IdentifierName</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="434685ab"><emu-nt id="_ref_9272"><a href="#prod-IdentifierStart">IdentifierStart</a></emu-nt></emu-rhs>
<emu-rhs a="700c1cee"><emu-nt id="_ref_9273"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt><emu-nt id="_ref_9274"><a href="#prod-IdentifierPart">IdentifierPart</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="IdentifierStart" type="lexical" id="prod-IdentifierStart">
<emu-nt><a href="#prod-IdentifierStart">IdentifierStart</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="0862e30c"><emu-nt id="_ref_9275"><a href="#prod-UnicodeIDStart">UnicodeIDStart</a></emu-nt></emu-rhs>
<emu-rhs a="1262cc92"><emu-t>$</emu-t></emu-rhs>
<emu-rhs a="07564b94"><emu-t>_</emu-t></emu-rhs>
<emu-rhs a="6fbc8b19"><emu-t>\</emu-t><emu-nt id="_ref_9276"><a href="#prod-UnicodeEscapeSequence">UnicodeEscapeSequence</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="IdentifierPart" type="lexical" id="prod-IdentifierPart">
<emu-nt><a href="#prod-IdentifierPart">IdentifierPart</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="364ac675"><emu-nt id="_ref_9277"><a href="#prod-UnicodeIDContinue">UnicodeIDContinue</a></emu-nt></emu-rhs>
<emu-rhs a="1262cc92"><emu-t>$</emu-t></emu-rhs>
<emu-rhs a="6fbc8b19"><emu-t>\</emu-t><emu-nt id="_ref_9278"><a href="#prod-UnicodeEscapeSequence">UnicodeEscapeSequence</a></emu-nt></emu-rhs>
<emu-rhs a="a321d28b"><emu-gprose>&lt;ZWNJ&gt;</emu-gprose></emu-rhs>
<emu-rhs a="9543f0aa"><emu-gprose>&lt;ZWJ&gt;</emu-gprose></emu-rhs>
</emu-production>
<emu-production name="UnicodeIDStart" type="lexical" id="prod-UnicodeIDStart">
<emu-nt><a href="#prod-UnicodeIDStart">UnicodeIDStart</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="e41f30c8"><emu-gprose>any Unicode code point with the Unicode property “ID_Start”</emu-gprose></emu-rhs>
</emu-production>
<emu-production name="UnicodeIDContinue" type="lexical" id="prod-UnicodeIDContinue">
<emu-nt><a href="#prod-UnicodeIDContinue">UnicodeIDContinue</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="db14546f"><emu-gprose>any Unicode code point with the Unicode property “ID_Continue”</emu-gprose></emu-rhs>
</emu-production></emu-grammar>
<p>The definitions of the nonterminal <emu-nt id="_ref_9279"><a href="#prod-UnicodeEscapeSequence">UnicodeEscapeSequence</a></emu-nt> is given in <emu-xref href="#sec-literals-string-literals" id="_ref_276"><a href="#sec-literals-string-literals">11.8.4</a></emu-xref>.</p>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The nonterminal <emu-nt id="_ref_9280"><a href="#prod-IdentifierPart">IdentifierPart</a></emu-nt> derives <code>_</code> via <emu-nt id="_ref_9281"><a href="#prod-UnicodeIDContinue">UnicodeIDContinue</a></emu-nt>.</p>
</div></emu-note>
<emu-note><span class="note">Note 3</span><div class="note-contents">
<p>The sets of code points with Unicode properties “ID_Start” and
“ID_Continue” include, respectively, the code points with Unicode
properties “Other_ID_Start” and “Other_ID_Continue”.</p>
</div></emu-note>
<emu-clause id="sec-identifier-names">
<h1><span class="secnum">11.6.1</span>Identifier Names</h1>
<emu-clause id="sec-identifier-names-static-semantics-early-errors">
<h1><span class="secnum">11.6.1.1</span>Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="IdentifierStart" type="lexical" collapsed="">
<emu-nt><a href="#prod-IdentifierStart">IdentifierStart</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="6fbc8b19"><emu-t>\</emu-t><emu-nt id="_ref_9282"><a href="#prod-UnicodeEscapeSequence">UnicodeEscapeSequence</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if SV(<emu-nt id="_ref_9283"><a href="#prod-UnicodeEscapeSequence">UnicodeEscapeSequence</a></emu-nt>) is none of <code>"$"</code>, or <code>"_"</code>, or the <emu-xref aoid="UTF16Encoding" id="_ref_3115"><a href="#sec-utf16encoding">UTF16Encoding</a></emu-xref> of a code point matched by the <emu-nt id="_ref_9284"><a href="#prod-UnicodeIDStart">UnicodeIDStart</a></emu-nt> lexical grammar production.
</li>
</ul>
<emu-grammar><emu-production name="IdentifierPart" type="lexical" collapsed="">
<emu-nt><a href="#prod-IdentifierPart">IdentifierPart</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="6fbc8b19"><emu-t>\</emu-t><emu-nt id="_ref_9285"><a href="#prod-UnicodeEscapeSequence">UnicodeEscapeSequence</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if SV(<emu-nt id="_ref_9286"><a href="#prod-UnicodeEscapeSequence">UnicodeEscapeSequence</a></emu-nt>) is none of <code>"$"</code>, or <code>"_"</code>, or the <emu-xref aoid="UTF16Encoding" id="_ref_3116"><a href="#sec-utf16encoding">UTF16Encoding</a></emu-xref> of either &lt;ZWNJ&gt; or &lt;ZWJ&gt;, or the <emu-xref aoid="UTF16Encoding" id="_ref_3117"><a href="#sec-utf16encoding">UTF16Encoding</a></emu-xref> of a Unicode code point that would be matched by the <emu-nt id="_ref_9287"><a href="#prod-UnicodeIDContinue">UnicodeIDContinue</a></emu-nt> lexical grammar production.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-identifier-names-static-semantics-stringvalue">
<h1><span class="secnum">11.6.1.2</span>Static Semantics: StringValue</h1>
<emu-see-also-para op="StringValue"></emu-see-also-para>
<emu-grammar><emu-production name="IdentifierName" type="lexical">
<emu-nt><a href="#prod-IdentifierName">IdentifierName</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="434685ab"><emu-nt id="_ref_9288"><a href="#prod-IdentifierStart">IdentifierStart</a></emu-nt></emu-rhs>
<emu-rhs a="700c1cee"><emu-nt id="_ref_9289"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt><emu-nt id="_ref_9290"><a href="#prod-IdentifierPart">IdentifierPart</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the String value consisting of the sequence of code units corresponding to <emu-nt id="_ref_9291"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt>. In determining the sequence any occurrences of <code>\</code> <emu-nt id="_ref_9292"><a href="#prod-UnicodeEscapeSequence">UnicodeEscapeSequence</a></emu-nt> are first replaced with the code point represented by the <emu-nt id="_ref_9293"><a href="#prod-UnicodeEscapeSequence">UnicodeEscapeSequence</a></emu-nt> and then the code points of the entire <emu-nt id="_ref_9294"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt> are converted to code units by <emu-xref aoid="UTF16Encoding" id="_ref_3118"><a href="#sec-utf16encoding">UTF16Encoding</a></emu-xref> each code point.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-reserved-words">
<h1><span class="secnum">11.6.2</span>Reserved Words</h1>
<p>A reserved word is an <emu-nt id="_ref_9295"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt> that cannot be used as an <emu-nt id="_ref_9296"><a href="#prod-Identifier">Identifier</a></emu-nt>.</p>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="ReservedWord" type="lexical" id="prod-ReservedWord">
<emu-nt><a href="#prod-ReservedWord">ReservedWord</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="a3926e03"><emu-nt id="_ref_9297"><a href="#prod-Keyword">Keyword</a></emu-nt></emu-rhs>
<emu-rhs a="9d71bdc1"><emu-nt id="_ref_9298"><a href="#prod-FutureReservedWord">FutureReservedWord</a></emu-nt></emu-rhs>
<emu-rhs a="54f84188"><emu-nt id="_ref_9299"><a href="#prod-NullLiteral">NullLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="3508e1fd"><emu-nt id="_ref_9300"><a href="#prod-BooleanLiteral">BooleanLiteral</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <emu-nt id="_ref_9301"><a href="#prod-ReservedWord">ReservedWord</a></emu-nt> definitions are specified as literal sequences of specific <emu-nt id="_ref_9302"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt> elements. A code point in a <emu-nt id="_ref_9303"><a href="#prod-ReservedWord">ReservedWord</a></emu-nt> cannot be expressed by a <code>\</code> <emu-nt id="_ref_9304"><a href="#prod-UnicodeEscapeSequence">UnicodeEscapeSequence</a></emu-nt>.</p>
</div></emu-note>
<emu-clause id="sec-keywords">
<h1><span class="secnum">11.6.2.1</span>Keywords</h1>
<p>The following tokens are ECMAScript keywords and may not be used as <emu-nt id="_ref_9305"><a href="#prod-Identifier">Identifier</a></emu-nt>s in ECMAScript programs.</p>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="Keyword" type="lexical" oneof="" id="prod-Keyword">
<emu-nt><a href="#prod-Keyword">Keyword</a></emu-nt><emu-geq>::</emu-geq><emu-oneof>one of</emu-oneof><emu-rhs><emu-t>await</emu-t><emu-t>break</emu-t><emu-t>case</emu-t><emu-t>catch</emu-t><emu-t>class</emu-t><emu-t>const</emu-t><emu-t>continue</emu-t><emu-t>debugger</emu-t><emu-t>default</emu-t><emu-t>delete</emu-t><emu-t>do</emu-t><emu-t>else</emu-t><emu-t>export</emu-t><emu-t>extends</emu-t><emu-t>finally</emu-t><emu-t>for</emu-t><emu-t>function</emu-t><emu-t>if</emu-t><emu-t>import</emu-t><emu-t>in</emu-t><emu-t>instanceof</emu-t><emu-t>new</emu-t><emu-t>return</emu-t><emu-t>super</emu-t><emu-t>switch</emu-t><emu-t>this</emu-t><emu-t>throw</emu-t><emu-t>try</emu-t><emu-t>typeof</emu-t><emu-t>var</emu-t><emu-t>void</emu-t><emu-t>while</emu-t><emu-t>with</emu-t><emu-t>yield</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>In some contexts <code>yield</code> and <code>await</code> are given the semantics of an <emu-nt id="_ref_9306"><a href="#prod-Identifier">Identifier</a></emu-nt>. See <emu-xref href="#sec-identifiers-static-semantics-early-errors" id="_ref_277"><a href="#sec-identifiers-static-semantics-early-errors">12.1.1</a></emu-xref>. In <emu-xref href="#sec-strict-mode-code" id="_ref_3119"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, <code>let</code> and <code>static</code> are treated as reserved words through static semantic restrictions (see <emu-xref href="#sec-identifiers-static-semantics-early-errors" id="_ref_278"><a href="#sec-identifiers-static-semantics-early-errors">12.1.1</a></emu-xref>, <emu-xref href="#sec-let-and-const-declarations-static-semantics-early-errors" id="_ref_279"><a href="#sec-let-and-const-declarations-static-semantics-early-errors">13.3.1.1</a></emu-xref>, <emu-xref href="#sec-for-in-and-for-of-statements-static-semantics-early-errors" id="_ref_280"><a href="#sec-for-in-and-for-of-statements-static-semantics-early-errors">13.7.5.1</a></emu-xref>, and <emu-xref href="#sec-class-definitions-static-semantics-early-errors" id="_ref_281"><a href="#sec-class-definitions-static-semantics-early-errors">14.6.1</a></emu-xref>) rather than the lexical grammar.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-future-reserved-words">
<h1><span class="secnum">11.6.2.2</span>Future Reserved Words</h1>
<p>The following tokens are reserved for use as keywords in future language extensions.</p>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="FutureReservedWord" type="lexical" id="prod-FutureReservedWord">
<emu-nt><a href="#prod-FutureReservedWord">FutureReservedWord</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="4fb2fe95"><emu-t>enum</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Use of the following tokens within <emu-xref href="#sec-strict-mode-code" id="_ref_3120"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref> is also reserved. That usage is restricted using static semantic restrictions (see <emu-xref href="#sec-identifiers-static-semantics-early-errors" id="_ref_282"><a href="#sec-identifiers-static-semantics-early-errors">12.1.1</a></emu-xref>) rather than the lexical grammar:</p>
<figure>
<table class="lightweight-table">
<tbody>
<tr>
<td>
<code>implements</code>
</td>
<td>
<code>package</code>
</td>
<td>
<code>protected</code>
</td>
<td>
</td>
</tr>
<tr>
<td>
<code>interface</code>
</td>
<td>
<code>private</code>
</td>
<td>
<code>public</code>
</td>
<td>
</td>
</tr>
</tbody>
</table>
</figure>
</div></emu-note>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-punctuators">
<h1><span class="secnum">11.7</span>Punctuators</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="Punctuator" type="lexical" oneof="" id="prod-Punctuator">
<emu-nt><a href="#prod-Punctuator">Punctuator</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>.</emu-t><emu-t>...</emu-t><emu-t>;</emu-t><emu-t>,</emu-t><emu-t>&lt;</emu-t><emu-t>&gt;</emu-t><emu-t>&lt;=</emu-t><emu-t>&gt;=</emu-t><emu-t>==</emu-t><emu-t>!=</emu-t><emu-t>===</emu-t><emu-t>!==</emu-t><emu-t>+</emu-t><emu-t>-</emu-t><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-t>~</emu-t><emu-t>&amp;&amp;</emu-t><emu-t>||</emu-t><emu-t>?</emu-t><emu-t>:</emu-t><emu-t>=</emu-t><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>=&gt;</emu-t></emu-rhs>
</emu-production>
<emu-production name="DivPunctuator" type="lexical" id="prod-DivPunctuator">
<emu-nt><a href="#prod-DivPunctuator">DivPunctuator</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="d3fd5f53"><emu-t>/</emu-t></emu-rhs>
<emu-rhs a="2e077fe3"><emu-t>/=</emu-t></emu-rhs>
</emu-production>
<emu-production name="RightBracePunctuator" type="lexical" id="prod-RightBracePunctuator">
<emu-nt><a href="#prod-RightBracePunctuator">RightBracePunctuator</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="255cb7fd"><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
</emu-clause>
<emu-clause id="sec-ecmascript-language-lexical-grammar-literals">
<h1><span class="secnum">11.8</span>Literals</h1>
<emu-clause id="sec-null-literals">
<h1><span class="secnum">11.8.1</span>Null Literals</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="NullLiteral" type="lexical" id="prod-NullLiteral">
<emu-nt><a href="#prod-NullLiteral">NullLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="77b50868"><emu-t>null</emu-t></emu-rhs>
</emu-production></emu-grammar>
</emu-clause>
<emu-clause id="sec-boolean-literals">
<h1><span class="secnum">11.8.2</span>Boolean Literals</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="BooleanLiteral" type="lexical" id="prod-BooleanLiteral">
<emu-nt><a href="#prod-BooleanLiteral">BooleanLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="fa30b8c6"><emu-t>true</emu-t></emu-rhs>
<emu-rhs a="23d2c69d"><emu-t>false</emu-t></emu-rhs>
</emu-production></emu-grammar>
</emu-clause>
<emu-clause id="sec-literals-numeric-literals">
<h1><span class="secnum">11.8.3</span>Numeric Literals</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="NumericLiteral" type="lexical" id="prod-NumericLiteral">
<emu-nt><a href="#prod-NumericLiteral">NumericLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="18c0356f"><emu-nt id="_ref_9307"><a href="#prod-DecimalLiteral">DecimalLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="d3d71ddd"><emu-nt id="_ref_9308"><a href="#prod-BinaryIntegerLiteral">BinaryIntegerLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="832f57ee"><emu-nt id="_ref_9309"><a href="#prod-OctalIntegerLiteral">OctalIntegerLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="1d0c4a66"><emu-nt id="_ref_9310"><a href="#prod-HexIntegerLiteral">HexIntegerLiteral</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="DecimalLiteral" type="lexical" id="prod-DecimalLiteral">
<emu-nt><a href="#prod-DecimalLiteral">DecimalLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="fb5198a6"><emu-nt id="_ref_9311"><a href="#prod-DecimalIntegerLiteral">DecimalIntegerLiteral</a></emu-nt><emu-t>.</emu-t><emu-nt optional="" id="_ref_9312"><a href="#prod-DecimalDigits">DecimalDigits</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt optional="" id="_ref_9313"><a href="#prod-ExponentPart">ExponentPart</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="5cf3aa35"><emu-t>.</emu-t><emu-nt id="_ref_9314"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-nt optional="" id="_ref_9315"><a href="#prod-ExponentPart">ExponentPart</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="13dbaf21"><emu-nt id="_ref_9316"><a href="#prod-DecimalIntegerLiteral">DecimalIntegerLiteral</a></emu-nt><emu-nt optional="" id="_ref_9317"><a href="#prod-ExponentPart">ExponentPart</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="DecimalIntegerLiteral" type="lexical" id="prod-DecimalIntegerLiteral">
<emu-nt><a href="#prod-DecimalIntegerLiteral">DecimalIntegerLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5259a431"><emu-t>0</emu-t></emu-rhs>
<emu-rhs a="2353f0a3"><emu-nt id="_ref_9318"><a href="#prod-NonZeroDigit">NonZeroDigit</a></emu-nt><emu-nt optional="" id="_ref_9319"><a href="#prod-DecimalDigits">DecimalDigits</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="DecimalDigits" type="lexical" id="prod-DecimalDigits">
<emu-nt><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="b3831ee0"><emu-nt id="_ref_9320"><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt></emu-rhs>
<emu-rhs a="9f250657"><emu-nt id="_ref_9321"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-nt id="_ref_9322"><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="DecimalDigit" type="lexical" oneof="" id="prod-DecimalDigit">
<emu-nt><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt><emu-geq>::</emu-geq><emu-oneof>one of</emu-oneof><emu-rhs><emu-t>0</emu-t><emu-t>1</emu-t><emu-t>2</emu-t><emu-t>3</emu-t><emu-t>4</emu-t><emu-t>5</emu-t><emu-t>6</emu-t><emu-t>7</emu-t><emu-t>8</emu-t><emu-t>9</emu-t></emu-rhs>
</emu-production>
<emu-production name="NonZeroDigit" type="lexical" oneof="" id="prod-NonZeroDigit">
<emu-nt><a href="#prod-NonZeroDigit">NonZeroDigit</a></emu-nt><emu-geq>::</emu-geq><emu-oneof>one of</emu-oneof><emu-rhs><emu-t>1</emu-t><emu-t>2</emu-t><emu-t>3</emu-t><emu-t>4</emu-t><emu-t>5</emu-t><emu-t>6</emu-t><emu-t>7</emu-t><emu-t>8</emu-t><emu-t>9</emu-t></emu-rhs>
</emu-production>
<emu-production name="ExponentPart" type="lexical" id="prod-ExponentPart">
<emu-nt><a href="#prod-ExponentPart">ExponentPart</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="7f837518"><emu-nt id="_ref_9323"><a href="#prod-ExponentIndicator">ExponentIndicator</a></emu-nt><emu-nt id="_ref_9324"><a href="#prod-SignedInteger">SignedInteger</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ExponentIndicator" type="lexical" oneof="" id="prod-ExponentIndicator">
<emu-nt><a href="#prod-ExponentIndicator">ExponentIndicator</a></emu-nt><emu-geq>::</emu-geq><emu-oneof>one of</emu-oneof><emu-rhs><emu-t>e</emu-t><emu-t>E</emu-t></emu-rhs>
</emu-production>
<emu-production name="SignedInteger" type="lexical" id="prod-SignedInteger">
<emu-nt><a href="#prod-SignedInteger">SignedInteger</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="6d7b4e5f"><emu-nt id="_ref_9325"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt></emu-rhs>
<emu-rhs a="3bd7fe57"><emu-t>+</emu-t><emu-nt id="_ref_9326"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt></emu-rhs>
<emu-rhs a="58000348"><emu-t>-</emu-t><emu-nt id="_ref_9327"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="BinaryIntegerLiteral" type="lexical" id="prod-BinaryIntegerLiteral">
<emu-nt><a href="#prod-BinaryIntegerLiteral">BinaryIntegerLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="600d7817"><emu-t>0b</emu-t><emu-nt id="_ref_9328"><a href="#prod-BinaryDigits">BinaryDigits</a></emu-nt></emu-rhs>
<emu-rhs a="7c1f17d9"><emu-t>0B</emu-t><emu-nt id="_ref_9329"><a href="#prod-BinaryDigits">BinaryDigits</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="BinaryDigits" type="lexical" id="prod-BinaryDigits">
<emu-nt><a href="#prod-BinaryDigits">BinaryDigits</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="e5f1ee23"><emu-nt id="_ref_9330"><a href="#prod-BinaryDigit">BinaryDigit</a></emu-nt></emu-rhs>
<emu-rhs a="82aa7443"><emu-nt id="_ref_9331"><a href="#prod-BinaryDigits">BinaryDigits</a></emu-nt><emu-nt id="_ref_9332"><a href="#prod-BinaryDigit">BinaryDigit</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="BinaryDigit" type="lexical" oneof="" id="prod-BinaryDigit">
<emu-nt><a href="#prod-BinaryDigit">BinaryDigit</a></emu-nt><emu-geq>::</emu-geq><emu-oneof>one of</emu-oneof><emu-rhs><emu-t>0</emu-t><emu-t>1</emu-t></emu-rhs>
</emu-production>
<emu-production name="OctalIntegerLiteral" type="lexical" id="prod-OctalIntegerLiteral">
<emu-nt><a href="#prod-OctalIntegerLiteral">OctalIntegerLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="a8056cb0"><emu-t>0o</emu-t><emu-nt id="_ref_9333"><a href="#prod-OctalDigits">OctalDigits</a></emu-nt></emu-rhs>
<emu-rhs a="3a3652fa"><emu-t>0O</emu-t><emu-nt id="_ref_9334"><a href="#prod-OctalDigits">OctalDigits</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="OctalDigits" type="lexical" id="prod-OctalDigits">
<emu-nt><a href="#prod-OctalDigits">OctalDigits</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="99bc1d53"><emu-nt id="_ref_9335"><a href="#prod-OctalDigit">OctalDigit</a></emu-nt></emu-rhs>
<emu-rhs a="37a295fe"><emu-nt id="_ref_9336"><a href="#prod-OctalDigits">OctalDigits</a></emu-nt><emu-nt id="_ref_9337"><a href="#prod-OctalDigit">OctalDigit</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="OctalDigit" type="lexical" oneof="" id="prod-OctalDigit">
<emu-nt><a href="#prod-OctalDigit">OctalDigit</a></emu-nt><emu-geq>::</emu-geq><emu-oneof>one of</emu-oneof><emu-rhs><emu-t>0</emu-t><emu-t>1</emu-t><emu-t>2</emu-t><emu-t>3</emu-t><emu-t>4</emu-t><emu-t>5</emu-t><emu-t>6</emu-t><emu-t>7</emu-t></emu-rhs>
</emu-production>
<emu-production name="HexIntegerLiteral" type="lexical" id="prod-HexIntegerLiteral">
<emu-nt><a href="#prod-HexIntegerLiteral">HexIntegerLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="cf154180"><emu-t>0x</emu-t><emu-nt id="_ref_9338"><a href="#prod-HexDigits">HexDigits</a></emu-nt></emu-rhs>
<emu-rhs a="9ef756f3"><emu-t>0X</emu-t><emu-nt id="_ref_9339"><a href="#prod-HexDigits">HexDigits</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="HexDigits" type="lexical" id="prod-HexDigits">
<emu-nt><a href="#prod-HexDigits">HexDigits</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="a0c48a71"><emu-nt id="_ref_9340"><a href="#prod-HexDigit">HexDigit</a></emu-nt></emu-rhs>
<emu-rhs a="c8221899"><emu-nt id="_ref_9341"><a href="#prod-HexDigits">HexDigits</a></emu-nt><emu-nt id="_ref_9342"><a href="#prod-HexDigit">HexDigit</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="HexDigit" type="lexical" oneof="" id="prod-HexDigit">
<emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-geq>::</emu-geq><emu-oneof>one of</emu-oneof><emu-rhs><emu-t>0</emu-t><emu-t>1</emu-t><emu-t>2</emu-t><emu-t>3</emu-t><emu-t>4</emu-t><emu-t>5</emu-t><emu-t>6</emu-t><emu-t>7</emu-t><emu-t>8</emu-t><emu-t>9</emu-t><emu-t>a</emu-t><emu-t>b</emu-t><emu-t>c</emu-t><emu-t>d</emu-t><emu-t>e</emu-t><emu-t>f</emu-t><emu-t>A</emu-t><emu-t>B</emu-t><emu-t>C</emu-t><emu-t>D</emu-t><emu-t>E</emu-t><emu-t>F</emu-t></emu-rhs>
</emu-production></emu-grammar>
<p>The <emu-nt id="_ref_9343"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt> immediately following a <emu-nt id="_ref_9344"><a href="#prod-NumericLiteral">NumericLiteral</a></emu-nt> must not be an <emu-nt id="_ref_9345"><a href="#prod-IdentifierStart">IdentifierStart</a></emu-nt> or <emu-nt id="_ref_9346"><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt>.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>For example: <code>3in</code> is an error and not the two input elements <code>3</code> and <code>in</code>.</p>
</div></emu-note>
<p>A conforming implementation, when processing <emu-xref href="#sec-strict-mode-code" id="_ref_3121"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, must not extend, as described in <emu-xref href="#sec-additional-syntax-numeric-literals" id="_ref_283"><a href="#sec-additional-syntax-numeric-literals">B.1.1</a></emu-xref>, the syntax of <emu-nt id="_ref_9347"><a href="#prod-NumericLiteral">NumericLiteral</a></emu-nt> to include <emu-xref href="#prod-annexB-LegacyOctalIntegerLiteral" id="_ref_284"><a href="#prod-annexB-LegacyOctalIntegerLiteral"><emu-nt>LegacyOctalIntegerLiteral</emu-nt></a></emu-xref>, nor extend the syntax of <emu-nt id="_ref_9348"><a href="#prod-DecimalIntegerLiteral">DecimalIntegerLiteral</a></emu-nt> to include <emu-xref href="#prod-annexB-NonOctalDecimalIntegerLiteral" id="_ref_285"><a href="#prod-annexB-NonOctalDecimalIntegerLiteral"><emu-nt>NonOctalDecimalIntegerLiteral</emu-nt></a></emu-xref>.</p>
<emu-clause id="sec-static-semantics-mv">
<h1><span class="secnum">11.8.3.1</span>Static Semantics: MV</h1>
<p>A numeric literal stands for a value of the Number type. This
value is determined in two steps: first, a mathematical value (MV) is
derived from the literal; second, this mathematical value is rounded as
described below.</p>
<ul>
<li>
The MV of <emu-grammar><emu-production name="NumericLiteral" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-NumericLiteral">NumericLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="18c0356f"><emu-nt id="_ref_9349"><a href="#prod-DecimalLiteral">DecimalLiteral</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_9350"><a href="#prod-DecimalLiteral">DecimalLiteral</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="NumericLiteral" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-NumericLiteral">NumericLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="d3d71ddd"><emu-nt id="_ref_9351"><a href="#prod-BinaryIntegerLiteral">BinaryIntegerLiteral</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_9352"><a href="#prod-BinaryIntegerLiteral">BinaryIntegerLiteral</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="NumericLiteral" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-NumericLiteral">NumericLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="832f57ee"><emu-nt id="_ref_9353"><a href="#prod-OctalIntegerLiteral">OctalIntegerLiteral</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_9354"><a href="#prod-OctalIntegerLiteral">OctalIntegerLiteral</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="NumericLiteral" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-NumericLiteral">NumericLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="1d0c4a66"><emu-nt id="_ref_9355"><a href="#prod-HexIntegerLiteral">HexIntegerLiteral</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_9356"><a href="#prod-HexIntegerLiteral">HexIntegerLiteral</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="DecimalLiteral" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-DecimalLiteral">DecimalLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="bf0728f3"><emu-nt id="_ref_9357"><a href="#prod-DecimalIntegerLiteral">DecimalIntegerLiteral</a></emu-nt><emu-t>.</emu-t></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_9358"><a href="#prod-DecimalIntegerLiteral">DecimalIntegerLiteral</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="DecimalLiteral" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-DecimalLiteral">DecimalLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="8af49841"><emu-nt id="_ref_9359"><a href="#prod-DecimalIntegerLiteral">DecimalIntegerLiteral</a></emu-nt><emu-t>.</emu-t><emu-nt id="_ref_9360"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_9361"><a href="#prod-DecimalIntegerLiteral">DecimalIntegerLiteral</a></emu-nt> plus (the MV of <emu-nt id="_ref_9362"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt> × 10<sup>-<var>n</var></sup>), where <var>n</var> is the number of code points in <emu-nt id="_ref_9363"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="DecimalLiteral" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-DecimalLiteral">DecimalLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="971b5362"><emu-nt id="_ref_9364"><a href="#prod-DecimalIntegerLiteral">DecimalIntegerLiteral</a></emu-nt><emu-t>.</emu-t><emu-nt id="_ref_9365"><a href="#prod-ExponentPart">ExponentPart</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_9366"><a href="#prod-DecimalIntegerLiteral">DecimalIntegerLiteral</a></emu-nt> × 10<sup><var>e</var></sup>, where <var>e</var> is the MV of <emu-nt id="_ref_9367"><a href="#prod-ExponentPart">ExponentPart</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="DecimalLiteral" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-DecimalLiteral">DecimalLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="ef115d8a"><emu-nt id="_ref_9368"><a href="#prod-DecimalIntegerLiteral">DecimalIntegerLiteral</a></emu-nt><emu-t>.</emu-t><emu-nt id="_ref_9369"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-nt id="_ref_9370"><a href="#prod-ExponentPart">ExponentPart</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is (the MV of <emu-nt id="_ref_9371"><a href="#prod-DecimalIntegerLiteral">DecimalIntegerLiteral</a></emu-nt> plus (the MV of <emu-nt id="_ref_9372"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt> × 10<sup>-<var>n</var></sup>)) × 10<sup><var>e</var></sup>, where <var>n</var> is the number of code points in <emu-nt id="_ref_9373"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt> and <var>e</var> is the MV of <emu-nt id="_ref_9374"><a href="#prod-ExponentPart">ExponentPart</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="DecimalLiteral" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-DecimalLiteral">DecimalLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="c1f33372"><emu-t>.</emu-t><emu-nt id="_ref_9375"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_9376"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt> × 10<sup>-<var>n</var></sup>, where <var>n</var> is the number of code points in <emu-nt id="_ref_9377"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="DecimalLiteral" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-DecimalLiteral">DecimalLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="0cd5f3c3"><emu-t>.</emu-t><emu-nt id="_ref_9378"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-nt id="_ref_9379"><a href="#prod-ExponentPart">ExponentPart</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_9380"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt> × 10<sup><var>e</var> - <var>n</var></sup>, where <var>n</var> is the number of code points in <emu-nt id="_ref_9381"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt> and <var>e</var> is the MV of <emu-nt id="_ref_9382"><a href="#prod-ExponentPart">ExponentPart</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="DecimalLiteral" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-DecimalLiteral">DecimalLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="b404bcda"><emu-nt id="_ref_9383"><a href="#prod-DecimalIntegerLiteral">DecimalIntegerLiteral</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_9384"><a href="#prod-DecimalIntegerLiteral">DecimalIntegerLiteral</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="DecimalLiteral" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-DecimalLiteral">DecimalLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="6d1f87c1"><emu-nt id="_ref_9385"><a href="#prod-DecimalIntegerLiteral">DecimalIntegerLiteral</a></emu-nt><emu-nt id="_ref_9386"><a href="#prod-ExponentPart">ExponentPart</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_9387"><a href="#prod-DecimalIntegerLiteral">DecimalIntegerLiteral</a></emu-nt> × 10<sup><var>e</var></sup>, where <var>e</var> is the MV of <emu-nt id="_ref_9388"><a href="#prod-ExponentPart">ExponentPart</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="DecimalIntegerLiteral" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-DecimalIntegerLiteral">DecimalIntegerLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5259a431"><emu-t>0</emu-t></emu-rhs>
</emu-production></emu-grammar> is 0.
</li>
<li>
The MV of <emu-grammar><emu-production name="DecimalIntegerLiteral" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-DecimalIntegerLiteral">DecimalIntegerLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="d4c393e5"><emu-nt id="_ref_9389"><a href="#prod-NonZeroDigit">NonZeroDigit</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_9390"><a href="#prod-NonZeroDigit">NonZeroDigit</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="DecimalIntegerLiteral" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-DecimalIntegerLiteral">DecimalIntegerLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="3f4b150f"><emu-nt id="_ref_9391"><a href="#prod-NonZeroDigit">NonZeroDigit</a></emu-nt><emu-nt id="_ref_9392"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is (the MV of <emu-nt id="_ref_9393"><a href="#prod-NonZeroDigit">NonZeroDigit</a></emu-nt> × 10<sup><var>n</var></sup>) plus the MV of <emu-nt id="_ref_9394"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt>, where <var>n</var> is the number of code points in <emu-nt id="_ref_9395"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="DecimalDigits" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="b3831ee0"><emu-nt id="_ref_9396"><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_9397"><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="DecimalDigits" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="9f250657"><emu-nt id="_ref_9398"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-nt id="_ref_9399"><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is (the MV of <emu-nt id="_ref_9400"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt> × 10) plus the MV of <emu-nt id="_ref_9401"><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="ExponentPart" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-ExponentPart">ExponentPart</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="7f837518"><emu-nt id="_ref_9402"><a href="#prod-ExponentIndicator">ExponentIndicator</a></emu-nt><emu-nt id="_ref_9403"><a href="#prod-SignedInteger">SignedInteger</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_9404"><a href="#prod-SignedInteger">SignedInteger</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="SignedInteger" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-SignedInteger">SignedInteger</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="6d7b4e5f"><emu-nt id="_ref_9405"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_9406"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="SignedInteger" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-SignedInteger">SignedInteger</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="3bd7fe57"><emu-t>+</emu-t><emu-nt id="_ref_9407"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_9408"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="SignedInteger" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-SignedInteger">SignedInteger</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="58000348"><emu-t>-</emu-t><emu-nt id="_ref_9409"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the negative of the MV of <emu-nt id="_ref_9410"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="DecimalDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5259a431"><emu-t>0</emu-t></emu-rhs>
</emu-production></emu-grammar> or of <emu-grammar><emu-production name="HexDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5259a431"><emu-t>0</emu-t></emu-rhs>
</emu-production></emu-grammar> or of <emu-grammar><emu-production name="OctalDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-OctalDigit">OctalDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5259a431"><emu-t>0</emu-t></emu-rhs>
</emu-production></emu-grammar> or of <emu-grammar><emu-production name="BinaryDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-BinaryDigit">BinaryDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5259a431"><emu-t>0</emu-t></emu-rhs>
</emu-production></emu-grammar> is 0.
</li>
<li>
The MV of <emu-grammar><emu-production name="DecimalDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="292aa5dd"><emu-t>1</emu-t></emu-rhs>
</emu-production></emu-grammar> or of <emu-grammar><emu-production name="NonZeroDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-NonZeroDigit">NonZeroDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="292aa5dd"><emu-t>1</emu-t></emu-rhs>
</emu-production></emu-grammar> or of <emu-grammar><emu-production name="HexDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="292aa5dd"><emu-t>1</emu-t></emu-rhs>
</emu-production></emu-grammar> or of <emu-grammar><emu-production name="OctalDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-OctalDigit">OctalDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="292aa5dd"><emu-t>1</emu-t></emu-rhs>
</emu-production></emu-grammar> or of <emu-grammar><emu-production name="BinaryDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-BinaryDigit">BinaryDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="292aa5dd"><emu-t>1</emu-t></emu-rhs>
</emu-production></emu-grammar> is 1.
</li>
<li>
The MV of <emu-grammar><emu-production name="DecimalDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5ca73105"><emu-t>2</emu-t></emu-rhs>
</emu-production></emu-grammar> or of <emu-grammar><emu-production name="NonZeroDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-NonZeroDigit">NonZeroDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5ca73105"><emu-t>2</emu-t></emu-rhs>
</emu-production></emu-grammar> or of <emu-grammar><emu-production name="HexDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5ca73105"><emu-t>2</emu-t></emu-rhs>
</emu-production></emu-grammar> or of <emu-grammar><emu-production name="OctalDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-OctalDigit">OctalDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5ca73105"><emu-t>2</emu-t></emu-rhs>
</emu-production></emu-grammar> is 2.
</li>
<li>
The MV of <emu-grammar><emu-production name="DecimalDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="ec6bb6b2"><emu-t>3</emu-t></emu-rhs>
</emu-production></emu-grammar> or of <emu-grammar><emu-production name="NonZeroDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-NonZeroDigit">NonZeroDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="ec6bb6b2"><emu-t>3</emu-t></emu-rhs>
</emu-production></emu-grammar> or of <emu-grammar><emu-production name="HexDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="ec6bb6b2"><emu-t>3</emu-t></emu-rhs>
</emu-production></emu-grammar> or of <emu-grammar><emu-production name="OctalDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-OctalDigit">OctalDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="ec6bb6b2"><emu-t>3</emu-t></emu-rhs>
</emu-production></emu-grammar> is 3.
</li>
<li>
The MV of <emu-grammar><emu-production name="DecimalDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="58ec4a73"><emu-t>4</emu-t></emu-rhs>
</emu-production></emu-grammar> or of <emu-grammar><emu-production name="NonZeroDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-NonZeroDigit">NonZeroDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="58ec4a73"><emu-t>4</emu-t></emu-rhs>
</emu-production></emu-grammar> or of <emu-grammar><emu-production name="HexDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="58ec4a73"><emu-t>4</emu-t></emu-rhs>
</emu-production></emu-grammar> or of <emu-grammar><emu-production name="OctalDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-OctalDigit">OctalDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="58ec4a73"><emu-t>4</emu-t></emu-rhs>
</emu-production></emu-grammar> is 4.
</li>
<li>
The MV of <emu-grammar><emu-production name="DecimalDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="8fcdef77"><emu-t>5</emu-t></emu-rhs>
</emu-production></emu-grammar> or of <emu-grammar><emu-production name="NonZeroDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-NonZeroDigit">NonZeroDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="8fcdef77"><emu-t>5</emu-t></emu-rhs>
</emu-production></emu-grammar> or of <emu-grammar><emu-production name="HexDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="8fcdef77"><emu-t>5</emu-t></emu-rhs>
</emu-production></emu-grammar> or of <emu-grammar><emu-production name="OctalDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-OctalDigit">OctalDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="8fcdef77"><emu-t>5</emu-t></emu-rhs>
</emu-production></emu-grammar> is 5.
</li>
<li>
The MV of <emu-grammar><emu-production name="DecimalDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="0b64877d"><emu-t>6</emu-t></emu-rhs>
</emu-production></emu-grammar> or of <emu-grammar><emu-production name="NonZeroDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-NonZeroDigit">NonZeroDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="0b64877d"><emu-t>6</emu-t></emu-rhs>
</emu-production></emu-grammar> or of <emu-grammar><emu-production name="HexDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="0b64877d"><emu-t>6</emu-t></emu-rhs>
</emu-production></emu-grammar> or of <emu-grammar><emu-production name="OctalDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-OctalDigit">OctalDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="0b64877d"><emu-t>6</emu-t></emu-rhs>
</emu-production></emu-grammar> is 6.
</li>
<li>
The MV of <emu-grammar><emu-production name="DecimalDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="ea5e07a4"><emu-t>7</emu-t></emu-rhs>
</emu-production></emu-grammar> or of <emu-grammar><emu-production name="NonZeroDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-NonZeroDigit">NonZeroDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="ea5e07a4"><emu-t>7</emu-t></emu-rhs>
</emu-production></emu-grammar> or of <emu-grammar><emu-production name="HexDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="ea5e07a4"><emu-t>7</emu-t></emu-rhs>
</emu-production></emu-grammar> or of <emu-grammar><emu-production name="OctalDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-OctalDigit">OctalDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="ea5e07a4"><emu-t>7</emu-t></emu-rhs>
</emu-production></emu-grammar> is 7.
</li>
<li>
The MV of <emu-grammar><emu-production name="DecimalDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="7a5bd8c3"><emu-t>8</emu-t></emu-rhs>
</emu-production></emu-grammar> or of <emu-grammar><emu-production name="NonZeroDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-NonZeroDigit">NonZeroDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="7a5bd8c3"><emu-t>8</emu-t></emu-rhs>
</emu-production></emu-grammar> or of <emu-grammar><emu-production name="HexDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="7a5bd8c3"><emu-t>8</emu-t></emu-rhs>
</emu-production></emu-grammar> is 8.
</li>
<li>
The MV of <emu-grammar><emu-production name="DecimalDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="163f4308"><emu-t>9</emu-t></emu-rhs>
</emu-production></emu-grammar> or of <emu-grammar><emu-production name="NonZeroDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-NonZeroDigit">NonZeroDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="163f4308"><emu-t>9</emu-t></emu-rhs>
</emu-production></emu-grammar> or of <emu-grammar><emu-production name="HexDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="163f4308"><emu-t>9</emu-t></emu-rhs>
</emu-production></emu-grammar> is 9.
</li>
<li>
The MV of <emu-grammar><emu-production name="HexDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="a61fcfde"><emu-t>a</emu-t></emu-rhs>
</emu-production></emu-grammar> or of <emu-grammar><emu-production name="HexDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="9d7d0fdb"><emu-t>A</emu-t></emu-rhs>
</emu-production></emu-grammar> is 10.
</li>
<li>
The MV of <emu-grammar><emu-production name="HexDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="0185ce89"><emu-t>b</emu-t></emu-rhs>
</emu-production></emu-grammar> or of <emu-grammar><emu-production name="HexDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="0a26d628"><emu-t>B</emu-t></emu-rhs>
</emu-production></emu-grammar> is 11.
</li>
<li>
The MV of <emu-grammar><emu-production name="HexDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="d594c144"><emu-t>c</emu-t></emu-rhs>
</emu-production></emu-grammar> or of <emu-grammar><emu-production name="HexDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5f87cc5b"><emu-t>C</emu-t></emu-rhs>
</emu-production></emu-grammar> is 12.
</li>
<li>
The MV of <emu-grammar><emu-production name="HexDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="f0f32729"><emu-t>d</emu-t></emu-rhs>
</emu-production></emu-grammar> or of <emu-grammar><emu-production name="HexDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="919b1483"><emu-t>D</emu-t></emu-rhs>
</emu-production></emu-grammar> is 13.
</li>
<li>
The MV of <emu-grammar><emu-production name="HexDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="0d7c9fba"><emu-t>e</emu-t></emu-rhs>
</emu-production></emu-grammar> or of <emu-grammar><emu-production name="HexDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="b15f6792"><emu-t>E</emu-t></emu-rhs>
</emu-production></emu-grammar> is 14.
</li>
<li>
The MV of <emu-grammar><emu-production name="HexDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="4068cae7"><emu-t>f</emu-t></emu-rhs>
</emu-production></emu-grammar> or of <emu-grammar><emu-production name="HexDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="0d544f70"><emu-t>F</emu-t></emu-rhs>
</emu-production></emu-grammar> is 15.
</li>
<li>
The MV of <emu-grammar><emu-production name="BinaryIntegerLiteral" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-BinaryIntegerLiteral">BinaryIntegerLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="600d7817"><emu-t>0b</emu-t><emu-nt id="_ref_9411"><a href="#prod-BinaryDigits">BinaryDigits</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_9412"><a href="#prod-BinaryDigits">BinaryDigits</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="BinaryIntegerLiteral" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-BinaryIntegerLiteral">BinaryIntegerLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="7c1f17d9"><emu-t>0B</emu-t><emu-nt id="_ref_9413"><a href="#prod-BinaryDigits">BinaryDigits</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_9414"><a href="#prod-BinaryDigits">BinaryDigits</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="BinaryDigits" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-BinaryDigits">BinaryDigits</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="e5f1ee23"><emu-nt id="_ref_9415"><a href="#prod-BinaryDigit">BinaryDigit</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_9416"><a href="#prod-BinaryDigit">BinaryDigit</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="BinaryDigits" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-BinaryDigits">BinaryDigits</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="82aa7443"><emu-nt id="_ref_9417"><a href="#prod-BinaryDigits">BinaryDigits</a></emu-nt><emu-nt id="_ref_9418"><a href="#prod-BinaryDigit">BinaryDigit</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is (the MV of <emu-nt id="_ref_9419"><a href="#prod-BinaryDigits">BinaryDigits</a></emu-nt> × 2) plus the MV of <emu-nt id="_ref_9420"><a href="#prod-BinaryDigit">BinaryDigit</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="OctalIntegerLiteral" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-OctalIntegerLiteral">OctalIntegerLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="a8056cb0"><emu-t>0o</emu-t><emu-nt id="_ref_9421"><a href="#prod-OctalDigits">OctalDigits</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_9422"><a href="#prod-OctalDigits">OctalDigits</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="OctalIntegerLiteral" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-OctalIntegerLiteral">OctalIntegerLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="3a3652fa"><emu-t>0O</emu-t><emu-nt id="_ref_9423"><a href="#prod-OctalDigits">OctalDigits</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_9424"><a href="#prod-OctalDigits">OctalDigits</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="OctalDigits" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-OctalDigits">OctalDigits</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="99bc1d53"><emu-nt id="_ref_9425"><a href="#prod-OctalDigit">OctalDigit</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_9426"><a href="#prod-OctalDigit">OctalDigit</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="OctalDigits" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-OctalDigits">OctalDigits</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="37a295fe"><emu-nt id="_ref_9427"><a href="#prod-OctalDigits">OctalDigits</a></emu-nt><emu-nt id="_ref_9428"><a href="#prod-OctalDigit">OctalDigit</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is (the MV of <emu-nt id="_ref_9429"><a href="#prod-OctalDigits">OctalDigits</a></emu-nt> × 8) plus the MV of <emu-nt id="_ref_9430"><a href="#prod-OctalDigit">OctalDigit</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="HexIntegerLiteral" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-HexIntegerLiteral">HexIntegerLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="cf154180"><emu-t>0x</emu-t><emu-nt id="_ref_9431"><a href="#prod-HexDigits">HexDigits</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_9432"><a href="#prod-HexDigits">HexDigits</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="HexIntegerLiteral" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-HexIntegerLiteral">HexIntegerLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="9ef756f3"><emu-t>0X</emu-t><emu-nt id="_ref_9433"><a href="#prod-HexDigits">HexDigits</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_9434"><a href="#prod-HexDigits">HexDigits</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="HexDigits" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-HexDigits">HexDigits</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="a0c48a71"><emu-nt id="_ref_9435"><a href="#prod-HexDigit">HexDigit</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_9436"><a href="#prod-HexDigit">HexDigit</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="HexDigits" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-HexDigits">HexDigits</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="c8221899"><emu-nt id="_ref_9437"><a href="#prod-HexDigits">HexDigits</a></emu-nt><emu-nt id="_ref_9438"><a href="#prod-HexDigit">HexDigit</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is (the MV of <emu-nt id="_ref_9439"><a href="#prod-HexDigits">HexDigits</a></emu-nt> × 16) plus the MV of <emu-nt id="_ref_9440"><a href="#prod-HexDigit">HexDigit</a></emu-nt>.
</li>
</ul>
<p>Once the exact MV for a numeric literal has been determined,
it is then rounded to a value of the Number type. If the MV is 0, then
the rounded value is <emu-val>+0</emu-val>; otherwise, the rounded value must be the Number value for the MV (as specified in <emu-xref href="#sec-ecmascript-language-types-number-type" id="_ref_286"><a href="#sec-ecmascript-language-types-number-type">6.1.6</a></emu-xref>), unless the literal is a <emu-nt id="_ref_9441"><a href="#prod-DecimalLiteral">DecimalLiteral</a></emu-nt>
and the literal has more than 20 significant digits, in which case the
Number value may be either the Number value for the MV of a literal
produced by replacing each significant digit after the 20th with a <code>0</code> digit or the Number value for the MV of a literal produced by replacing each significant digit after the 20th with a <code>0</code> digit and then incrementing the literal at the 20th significant digit position. A digit is <em>significant</em> if it is not part of an <emu-nt id="_ref_9442"><a href="#prod-ExponentPart">ExponentPart</a></emu-nt> and</p>
<ul>
<li>
it is not <code>0</code>; or
</li>
<li>
there is a nonzero digit to its left and there is a nonzero digit, not in the <emu-nt id="_ref_9443"><a href="#prod-ExponentPart">ExponentPart</a></emu-nt>, to its right.
</li>
</ul>
</emu-clause>
</emu-clause>
<emu-clause id="sec-literals-string-literals">
<h1><span class="secnum">11.8.4</span>String Literals</h1>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>A string literal is zero or more Unicode code points enclosed
in single or double quotes. Unicode code points may also be represented
by an escape sequence. All code points may appear literally in a string
literal except for the closing quote code points, U+005C (REVERSE
SOLIDUS), U+000D (CARRIAGE RETURN), and U+000A (LINE FEED). Any code
points may appear in the form of an escape sequence. String literals
evaluate to ECMAScript String values. When generating these String
values Unicode code points are UTF-16 encoded as defined in <emu-xref href="#sec-utf16encoding" id="_ref_287"><a href="#sec-utf16encoding">10.1.1</a></emu-xref>.
Code points belonging to the Basic Multilingual Plane are encoded as a
single code unit element of the string. All other code points are
encoded as two code unit elements of the string.</p>
</div></emu-note>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="StringLiteral" type="lexical" id="prod-StringLiteral">
<emu-nt><a href="#prod-StringLiteral">StringLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="15d8b1f1"><emu-t>"</emu-t><emu-nt optional="" id="_ref_9444"><a href="#prod-DoubleStringCharacters">DoubleStringCharacters</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>"</emu-t></emu-rhs>
<emu-rhs a="82ecb3d9"><emu-t>'</emu-t><emu-nt optional="" id="_ref_9445"><a href="#prod-SingleStringCharacters">SingleStringCharacters</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>'</emu-t></emu-rhs>
</emu-production>
<emu-production name="DoubleStringCharacters" type="lexical" id="prod-DoubleStringCharacters">
<emu-nt><a href="#prod-DoubleStringCharacters">DoubleStringCharacters</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="8bdabc77"><emu-nt id="_ref_9446"><a href="#prod-DoubleStringCharacter">DoubleStringCharacter</a></emu-nt><emu-nt optional="" id="_ref_9447"><a href="#prod-DoubleStringCharacters">DoubleStringCharacters</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="SingleStringCharacters" type="lexical" id="prod-SingleStringCharacters">
<emu-nt><a href="#prod-SingleStringCharacters">SingleStringCharacters</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="17d28457"><emu-nt id="_ref_9448"><a href="#prod-SingleStringCharacter">SingleStringCharacter</a></emu-nt><emu-nt optional="" id="_ref_9449"><a href="#prod-SingleStringCharacters">SingleStringCharacters</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="DoubleStringCharacter" type="lexical" id="prod-DoubleStringCharacter">
<emu-nt><a href="#prod-DoubleStringCharacter">DoubleStringCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="a87f95ed"><emu-nt id="_ref_9450"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-gmod>but not one of <emu-t>"</emu-t> or <emu-t>\</emu-t> or <emu-nt id="_ref_9451"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt></emu-gmod></emu-rhs>
<emu-rhs a="85df8467"><emu-gprose>&lt;LS&gt;</emu-gprose></emu-rhs>
<emu-rhs a="be2ab9fa"><emu-gprose>&lt;PS&gt;</emu-gprose></emu-rhs>
<emu-rhs a="ea7d8d26"><emu-t>\</emu-t><emu-nt id="_ref_9452"><a href="#prod-EscapeSequence">EscapeSequence</a></emu-nt></emu-rhs>
<emu-rhs a="00992933"><emu-nt id="_ref_9453"><a href="#prod-LineContinuation">LineContinuation</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="SingleStringCharacter" type="lexical" id="prod-SingleStringCharacter">
<emu-nt><a href="#prod-SingleStringCharacter">SingleStringCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5ea9e1d2"><emu-nt id="_ref_9454"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-gmod>but not one of <emu-t>'</emu-t> or <emu-t>\</emu-t> or <emu-nt id="_ref_9455"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt></emu-gmod></emu-rhs>
<emu-rhs a="85df8467"><emu-gprose>&lt;LS&gt;</emu-gprose></emu-rhs>
<emu-rhs a="be2ab9fa"><emu-gprose>&lt;PS&gt;</emu-gprose></emu-rhs>
<emu-rhs a="ea7d8d26"><emu-t>\</emu-t><emu-nt id="_ref_9456"><a href="#prod-EscapeSequence">EscapeSequence</a></emu-nt></emu-rhs>
<emu-rhs a="00992933"><emu-nt id="_ref_9457"><a href="#prod-LineContinuation">LineContinuation</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="LineContinuation" type="lexical" id="prod-LineContinuation">
<emu-nt><a href="#prod-LineContinuation">LineContinuation</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="c4893d63"><emu-t>\</emu-t><emu-nt id="_ref_9458"><a href="#prod-LineTerminatorSequence">LineTerminatorSequence</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="EscapeSequence" type="lexical" id="prod-EscapeSequence">
<emu-nt><a href="#prod-EscapeSequence">EscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="e9e86f07"><emu-nt id="_ref_9459"><a href="#prod-CharacterEscapeSequence">CharacterEscapeSequence</a></emu-nt></emu-rhs>
<emu-rhs a="6964a19d"><emu-t>0</emu-t><emu-gann>[lookahead ∉ <emu-nt id="_ref_9460"><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt>]</emu-gann></emu-rhs>
<emu-rhs a="a8071b85"><emu-nt id="_ref_9461"><a href="#prod-HexEscapeSequence">HexEscapeSequence</a></emu-nt></emu-rhs>
<emu-rhs a="44bd6f55"><emu-nt id="_ref_9462"><a href="#prod-UnicodeEscapeSequence">UnicodeEscapeSequence</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<p>A conforming implementation, when processing <emu-xref href="#sec-strict-mode-code" id="_ref_3122"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, must not extend the syntax of <emu-nt id="_ref_9463"><a href="#prod-EscapeSequence">EscapeSequence</a></emu-nt> to include <emu-xref href="#prod-annexB-LegacyOctalEscapeSequence" id="_ref_288"><a href="#prod-annexB-LegacyOctalEscapeSequence"><emu-nt>LegacyOctalEscapeSequence</emu-nt></a></emu-xref> as described in <emu-xref href="#sec-additional-syntax-string-literals" id="_ref_289"><a href="#sec-additional-syntax-string-literals">B.1.2</a></emu-xref>.</p>
<emu-grammar type="definition"><emu-production name="CharacterEscapeSequence" type="lexical" id="prod-CharacterEscapeSequence">
<emu-nt><a href="#prod-CharacterEscapeSequence">CharacterEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="7444838f"><emu-nt id="_ref_9464"><a href="#prod-SingleEscapeCharacter">SingleEscapeCharacter</a></emu-nt></emu-rhs>
<emu-rhs a="b7980a98"><emu-nt id="_ref_9465"><a href="#prod-NonEscapeCharacter">NonEscapeCharacter</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="SingleEscapeCharacter" type="lexical" oneof="" id="prod-SingleEscapeCharacter">
<emu-nt><a href="#prod-SingleEscapeCharacter">SingleEscapeCharacter</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>b</emu-t><emu-t>f</emu-t><emu-t>n</emu-t><emu-t>r</emu-t><emu-t>t</emu-t><emu-t>v</emu-t></emu-rhs>
</emu-production>
<emu-production name="NonEscapeCharacter" type="lexical" id="prod-NonEscapeCharacter">
<emu-nt><a href="#prod-NonEscapeCharacter">NonEscapeCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="1bac6127"><emu-nt id="_ref_9466"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-gmod>but not one of <emu-nt id="_ref_9467"><a href="#prod-EscapeCharacter">EscapeCharacter</a></emu-nt> or <emu-nt id="_ref_9468"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt></emu-gmod></emu-rhs>
</emu-production>
<emu-production name="EscapeCharacter" type="lexical" id="prod-EscapeCharacter">
<emu-nt><a href="#prod-EscapeCharacter">EscapeCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="7444838f"><emu-nt id="_ref_9469"><a href="#prod-SingleEscapeCharacter">SingleEscapeCharacter</a></emu-nt></emu-rhs>
<emu-rhs a="b3831ee0"><emu-nt id="_ref_9470"><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt></emu-rhs>
<emu-rhs a="150383a9"><emu-t>x</emu-t></emu-rhs>
<emu-rhs a="8c2e6655"><emu-t>u</emu-t></emu-rhs>
</emu-production>
<emu-production name="HexEscapeSequence" type="lexical" id="prod-HexEscapeSequence">
<emu-nt><a href="#prod-HexEscapeSequence">HexEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="d8ef973c"><emu-t>x</emu-t><emu-nt id="_ref_9471"><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-nt id="_ref_9472"><a href="#prod-HexDigit">HexDigit</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="UnicodeEscapeSequence" type="lexical" id="prod-UnicodeEscapeSequence">
<emu-nt><a href="#prod-UnicodeEscapeSequence">UnicodeEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="8072ad8d"><emu-t>u</emu-t><emu-nt id="_ref_9473"><a href="#prod-Hex4Digits">Hex4Digits</a></emu-nt></emu-rhs>
<emu-rhs a="b98063ef"><emu-t>u{</emu-t><emu-nt id="_ref_9474"><a href="#prod-CodePoint">CodePoint</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="Hex4Digits" type="lexical" id="prod-Hex4Digits">
<emu-nt><a href="#prod-Hex4Digits">Hex4Digits</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="0ba8de61"><emu-nt id="_ref_9475"><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-nt id="_ref_9476"><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-nt id="_ref_9477"><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-nt id="_ref_9478"><a href="#prod-HexDigit">HexDigit</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<p>The definition of the nonterminal <emu-nt id="_ref_9479"><a href="#prod-HexDigit">HexDigit</a></emu-nt> is given in <emu-xref href="#sec-literals-numeric-literals" id="_ref_290"><a href="#sec-literals-numeric-literals">11.8.3</a></emu-xref>. <emu-nt id="_ref_9480"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt> is defined in <emu-xref href="#sec-source-text" id="_ref_291"><a href="#sec-source-text">10.1</a></emu-xref>.</p>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>&lt;LF&gt; and &lt;CR&gt; cannot appear in a string literal, except as part of a <emu-nt id="_ref_9481"><a href="#prod-LineContinuation">LineContinuation</a></emu-nt>
to produce the empty code points sequence. The proper way to include
either in the String value of a string literal is to use an escape
sequence such as <code>\n</code> or <code>\u000A</code>.</p>
</div></emu-note>
<emu-clause id="sec-string-literals-static-semantics-stringvalue">
<h1><span class="secnum">11.8.4.1</span>Static Semantics: StringValue</h1>
<emu-see-also-para op="StringValue"></emu-see-also-para>
<emu-grammar><emu-production name="StringLiteral" type="lexical">
<emu-nt><a href="#prod-StringLiteral">StringLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="15d8b1f1"><emu-t>"</emu-t><emu-nt optional="" id="_ref_9482"><a href="#prod-DoubleStringCharacters">DoubleStringCharacters</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>"</emu-t></emu-rhs>
<emu-rhs a="82ecb3d9"><emu-t>'</emu-t><emu-nt optional="" id="_ref_9483"><a href="#prod-SingleStringCharacters">SingleStringCharacters</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>Return the String value whose code units are the SV of this <emu-nt id="_ref_9484"><a href="#prod-StringLiteral">StringLiteral</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-static-semantics-sv">
<h1><span class="secnum">11.8.4.2</span>Static Semantics: SV</h1>
<p>A string literal stands for a value of the String type. The
String value (SV) of the literal is described in terms of code unit
values contributed by the various parts of the string literal. As part
of this process, some Unicode code points within the string literal are
interpreted as having a mathematical value (MV), as described below or
in <emu-xref href="#sec-literals-numeric-literals" id="_ref_292"><a href="#sec-literals-numeric-literals">11.8.3</a></emu-xref>.</p>
<ul>
<li>
The SV of <emu-grammar><emu-production name="StringLiteral" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-StringLiteral">StringLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="a2dff6c6"><emu-t>"</emu-t><emu-t>"</emu-t></emu-rhs>
</emu-production></emu-grammar> is the empty code unit sequence.
</li>
<li>
The SV of <emu-grammar><emu-production name="StringLiteral" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-StringLiteral">StringLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="74786b0a"><emu-t>'</emu-t><emu-t>'</emu-t></emu-rhs>
</emu-production></emu-grammar> is the empty code unit sequence.
</li>
<li>
The SV of <emu-grammar><emu-production name="StringLiteral" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-StringLiteral">StringLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="e7eba5c6"><emu-t>"</emu-t><emu-nt id="_ref_9485"><a href="#prod-DoubleStringCharacters">DoubleStringCharacters</a></emu-nt><emu-t>"</emu-t></emu-rhs>
</emu-production></emu-grammar> is the SV of <emu-nt id="_ref_9486"><a href="#prod-DoubleStringCharacters">DoubleStringCharacters</a></emu-nt>.
</li>
<li>
The SV of <emu-grammar><emu-production name="StringLiteral" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-StringLiteral">StringLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="314db585"><emu-t>'</emu-t><emu-nt id="_ref_9487"><a href="#prod-SingleStringCharacters">SingleStringCharacters</a></emu-nt><emu-t>'</emu-t></emu-rhs>
</emu-production></emu-grammar> is the SV of <emu-nt id="_ref_9488"><a href="#prod-SingleStringCharacters">SingleStringCharacters</a></emu-nt>.
</li>
<li>
The SV of <emu-grammar><emu-production name="DoubleStringCharacters" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-DoubleStringCharacters">DoubleStringCharacters</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="b3d57705"><emu-nt id="_ref_9489"><a href="#prod-DoubleStringCharacter">DoubleStringCharacter</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is a sequence of up to two code units that is the SV of <emu-nt id="_ref_9490"><a href="#prod-DoubleStringCharacter">DoubleStringCharacter</a></emu-nt>.
</li>
<li>
The SV of <emu-grammar><emu-production name="DoubleStringCharacters" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-DoubleStringCharacters">DoubleStringCharacters</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="9b3f247e"><emu-nt id="_ref_9491"><a href="#prod-DoubleStringCharacter">DoubleStringCharacter</a></emu-nt><emu-nt id="_ref_9492"><a href="#prod-DoubleStringCharacters">DoubleStringCharacters</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is a sequence of up to two code units that is the SV of <emu-nt id="_ref_9493"><a href="#prod-DoubleStringCharacter">DoubleStringCharacter</a></emu-nt> followed by the code units of the SV of <emu-nt id="_ref_9494"><a href="#prod-DoubleStringCharacters">DoubleStringCharacters</a></emu-nt> in order.
</li>
<li>
The SV of <emu-grammar><emu-production name="SingleStringCharacters" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-SingleStringCharacters">SingleStringCharacters</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="1b4d0b3a"><emu-nt id="_ref_9495"><a href="#prod-SingleStringCharacter">SingleStringCharacter</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is a sequence of up to two code units that is the SV of <emu-nt id="_ref_9496"><a href="#prod-SingleStringCharacter">SingleStringCharacter</a></emu-nt>.
</li>
<li>
The SV of <emu-grammar><emu-production name="SingleStringCharacters" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-SingleStringCharacters">SingleStringCharacters</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="89ebe999"><emu-nt id="_ref_9497"><a href="#prod-SingleStringCharacter">SingleStringCharacter</a></emu-nt><emu-nt id="_ref_9498"><a href="#prod-SingleStringCharacters">SingleStringCharacters</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is a sequence of up to two code units that is the SV of <emu-nt id="_ref_9499"><a href="#prod-SingleStringCharacter">SingleStringCharacter</a></emu-nt> followed by the code units of the SV of <emu-nt id="_ref_9500"><a href="#prod-SingleStringCharacters">SingleStringCharacters</a></emu-nt> in order.
</li>
<li>
The SV of <emu-grammar><emu-production name="DoubleStringCharacter" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-DoubleStringCharacter">DoubleStringCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="a87f95ed"><emu-nt id="_ref_9501"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-gmod>but not one of <emu-t>"</emu-t> or <emu-t>\</emu-t> or <emu-nt id="_ref_9502"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt></emu-gmod></emu-rhs>
</emu-production></emu-grammar> is the <emu-xref aoid="UTF16Encoding" id="_ref_3123"><a href="#sec-utf16encoding">UTF16Encoding</a></emu-xref> of the code point value of <emu-nt id="_ref_9503"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt>.
</li>
<li>
The SV of <emu-grammar><emu-production name="DoubleStringCharacter" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-DoubleStringCharacter">DoubleStringCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="85df8467"><emu-gprose>&lt;LS&gt;</emu-gprose></emu-rhs>
</emu-production></emu-grammar> is the code unit 0x2028 (LINE SEPARATOR).
</li>
<li>
The SV of <emu-grammar><emu-production name="DoubleStringCharacter" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-DoubleStringCharacter">DoubleStringCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="be2ab9fa"><emu-gprose>&lt;PS&gt;</emu-gprose></emu-rhs>
</emu-production></emu-grammar> is the code unit 0x2029 (PARAGRAPH SEPARATOR).
</li>
<li>
The SV of <emu-grammar><emu-production name="DoubleStringCharacter" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-DoubleStringCharacter">DoubleStringCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="ea7d8d26"><emu-t>\</emu-t><emu-nt id="_ref_9504"><a href="#prod-EscapeSequence">EscapeSequence</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the SV of the <emu-nt id="_ref_9505"><a href="#prod-EscapeSequence">EscapeSequence</a></emu-nt>.
</li>
<li>
The SV of <emu-grammar><emu-production name="DoubleStringCharacter" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-DoubleStringCharacter">DoubleStringCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="00992933"><emu-nt id="_ref_9506"><a href="#prod-LineContinuation">LineContinuation</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the empty code unit sequence.
</li>
<li>
The SV of <emu-grammar><emu-production name="SingleStringCharacter" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-SingleStringCharacter">SingleStringCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5ea9e1d2"><emu-nt id="_ref_9507"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-gmod>but not one of <emu-t>'</emu-t> or <emu-t>\</emu-t> or <emu-nt id="_ref_9508"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt></emu-gmod></emu-rhs>
</emu-production></emu-grammar> is the <emu-xref aoid="UTF16Encoding" id="_ref_3124"><a href="#sec-utf16encoding">UTF16Encoding</a></emu-xref> of the code point value of <emu-nt id="_ref_9509"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt>.
</li>
<li>
The SV of <emu-grammar><emu-production name="SingleStringCharacter" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-SingleStringCharacter">SingleStringCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="85df8467"><emu-gprose>&lt;LS&gt;</emu-gprose></emu-rhs>
</emu-production></emu-grammar> is the code unit 0x2028 (LINE SEPARATOR).
</li>
<li>
The SV of <emu-grammar><emu-production name="SingleStringCharacter" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-SingleStringCharacter">SingleStringCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="be2ab9fa"><emu-gprose>&lt;PS&gt;</emu-gprose></emu-rhs>
</emu-production></emu-grammar> is the code unit 0x2029 (PARAGRAPH SEPARATOR).
</li>
<li>
The SV of <emu-grammar><emu-production name="SingleStringCharacter" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-SingleStringCharacter">SingleStringCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="ea7d8d26"><emu-t>\</emu-t><emu-nt id="_ref_9510"><a href="#prod-EscapeSequence">EscapeSequence</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the SV of the <emu-nt id="_ref_9511"><a href="#prod-EscapeSequence">EscapeSequence</a></emu-nt>.
</li>
<li>
The SV of <emu-grammar><emu-production name="SingleStringCharacter" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-SingleStringCharacter">SingleStringCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="00992933"><emu-nt id="_ref_9512"><a href="#prod-LineContinuation">LineContinuation</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the empty code unit sequence.
</li>
<li>
The SV of <emu-grammar><emu-production name="EscapeSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-EscapeSequence">EscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="e9e86f07"><emu-nt id="_ref_9513"><a href="#prod-CharacterEscapeSequence">CharacterEscapeSequence</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the SV of the <emu-nt id="_ref_9514"><a href="#prod-CharacterEscapeSequence">CharacterEscapeSequence</a></emu-nt>.
</li>
<li>
The SV of <emu-grammar><emu-production name="EscapeSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-EscapeSequence">EscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5259a431"><emu-t>0</emu-t></emu-rhs>
</emu-production></emu-grammar> is the code unit 0x0000 (NULL).
</li>
<li>
The SV of <emu-grammar><emu-production name="EscapeSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-EscapeSequence">EscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="a8071b85"><emu-nt id="_ref_9515"><a href="#prod-HexEscapeSequence">HexEscapeSequence</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the SV of the <emu-nt id="_ref_9516"><a href="#prod-HexEscapeSequence">HexEscapeSequence</a></emu-nt>.
</li>
<li>
The SV of <emu-grammar><emu-production name="EscapeSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-EscapeSequence">EscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="44bd6f55"><emu-nt id="_ref_9517"><a href="#prod-UnicodeEscapeSequence">UnicodeEscapeSequence</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the SV of the <emu-nt id="_ref_9518"><a href="#prod-UnicodeEscapeSequence">UnicodeEscapeSequence</a></emu-nt>.
</li>
<li>
The SV of <emu-grammar><emu-production name="CharacterEscapeSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-CharacterEscapeSequence">CharacterEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="7444838f"><emu-nt id="_ref_9519"><a href="#prod-SingleEscapeCharacter">SingleEscapeCharacter</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the code unit whose value is determined by the <emu-nt id="_ref_9520"><a href="#prod-SingleEscapeCharacter">SingleEscapeCharacter</a></emu-nt> according to <emu-xref href="#table-34" id="_ref_293"><a href="#table-34">Table 34</a></emu-xref>.
</li>
</ul>
<emu-table id="table-34" caption="String Single Character Escape Sequences"><figure><figcaption>Table 34: String Single Character Escape Sequences</figcaption>
<table>
<tbody>
<tr>
<th>
Escape Sequence
</th>
<th>
Code Unit Value
</th>
<th>
Unicode Character Name
</th>
<th>
Symbol
</th>
</tr>
<tr>
<td>
<code>\b</code>
</td>
<td>
<code>0x0008</code>
</td>
<td>
BACKSPACE
</td>
<td>
&lt;BS&gt;
</td>
</tr>
<tr>
<td>
<code>\t</code>
</td>
<td>
<code>0x0009</code>
</td>
<td>
CHARACTER TABULATION
</td>
<td>
&lt;HT&gt;
</td>
</tr>
<tr>
<td>
<code>\n</code>
</td>
<td>
<code>0x000A</code>
</td>
<td>
LINE FEED (LF)
</td>
<td>
&lt;LF&gt;
</td>
</tr>
<tr>
<td>
<code>\v</code>
</td>
<td>
<code>0x000B</code>
</td>
<td>
LINE TABULATION
</td>
<td>
&lt;VT&gt;
</td>
</tr>
<tr>
<td>
<code>\f</code>
</td>
<td>
<code>0x000C</code>
</td>
<td>
FORM FEED (FF)
</td>
<td>
&lt;FF&gt;
</td>
</tr>
<tr>
<td>
<code>\r</code>
</td>
<td>
<code>0x000D</code>
</td>
<td>
CARRIAGE RETURN (CR)
</td>
<td>
&lt;CR&gt;
</td>
</tr>
<tr>
<td>
<code>\"</code>
</td>
<td>
<code>0x0022</code>
</td>
<td>
QUOTATION MARK
</td>
<td>
<code>"</code>
</td>
</tr>
<tr>
<td>
<code>\'</code>
</td>
<td>
<code>0x0027</code>
</td>
<td>
APOSTROPHE
</td>
<td>
<code>'</code>
</td>
</tr>
<tr>
<td>
<code>\\</code>
</td>
<td>
<code>0x005C</code>
</td>
<td>
REVERSE SOLIDUS
</td>
<td>
<code>\</code>
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<ul>
<li>
The SV of <emu-grammar><emu-production name="CharacterEscapeSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-CharacterEscapeSequence">CharacterEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="b7980a98"><emu-nt id="_ref_9521"><a href="#prod-NonEscapeCharacter">NonEscapeCharacter</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the SV of the <emu-nt id="_ref_9522"><a href="#prod-NonEscapeCharacter">NonEscapeCharacter</a></emu-nt>.
</li>
<li>
The SV of <emu-grammar><emu-production name="NonEscapeCharacter" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-NonEscapeCharacter">NonEscapeCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="1bac6127"><emu-nt id="_ref_9523"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-gmod>but not one of <emu-nt id="_ref_9524"><a href="#prod-EscapeCharacter">EscapeCharacter</a></emu-nt> or <emu-nt id="_ref_9525"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt></emu-gmod></emu-rhs>
</emu-production></emu-grammar> is the <emu-xref aoid="UTF16Encoding" id="_ref_3125"><a href="#sec-utf16encoding">UTF16Encoding</a></emu-xref> of the code point value of <emu-nt id="_ref_9526"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt>.
</li>
<li>
The SV of <emu-grammar><emu-production name="HexEscapeSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-HexEscapeSequence">HexEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="d8ef973c"><emu-t>x</emu-t><emu-nt id="_ref_9527"><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-nt id="_ref_9528"><a href="#prod-HexDigit">HexDigit</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the code unit whose value is (16 times the MV of the first <emu-nt id="_ref_9529"><a href="#prod-HexDigit">HexDigit</a></emu-nt>) plus the MV of the second <emu-nt id="_ref_9530"><a href="#prod-HexDigit">HexDigit</a></emu-nt>.
</li>
<li>
The SV of <emu-grammar><emu-production name="UnicodeEscapeSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-UnicodeEscapeSequence">UnicodeEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="8072ad8d"><emu-t>u</emu-t><emu-nt id="_ref_9531"><a href="#prod-Hex4Digits">Hex4Digits</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the SV of <emu-nt id="_ref_9532"><a href="#prod-Hex4Digits">Hex4Digits</a></emu-nt>.
</li>
<li>
The SV of <emu-grammar><emu-production name="Hex4Digits" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-Hex4Digits">Hex4Digits</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="0ba8de61"><emu-nt id="_ref_9533"><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-nt id="_ref_9534"><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-nt id="_ref_9535"><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-nt id="_ref_9536"><a href="#prod-HexDigit">HexDigit</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the code unit whose value is (0x1000 times the MV of the first <emu-nt id="_ref_9537"><a href="#prod-HexDigit">HexDigit</a></emu-nt>) plus (0x100 times the MV of the second <emu-nt id="_ref_9538"><a href="#prod-HexDigit">HexDigit</a></emu-nt>) plus (0x10 times the MV of the third <emu-nt id="_ref_9539"><a href="#prod-HexDigit">HexDigit</a></emu-nt>) plus the MV of the fourth <emu-nt id="_ref_9540"><a href="#prod-HexDigit">HexDigit</a></emu-nt>.
</li>
<li>
The SV of <emu-grammar><emu-production name="UnicodeEscapeSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-UnicodeEscapeSequence">UnicodeEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="b98063ef"><emu-t>u{</emu-t><emu-nt id="_ref_9541"><a href="#prod-CodePoint">CodePoint</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar> is the <emu-xref aoid="UTF16Encoding" id="_ref_3126"><a href="#sec-utf16encoding">UTF16Encoding</a></emu-xref> of the MV of <emu-nt id="_ref_9542"><a href="#prod-CodePoint">CodePoint</a></emu-nt>.
</li>
</ul>
</emu-clause>
</emu-clause>
<emu-clause id="sec-literals-regular-expression-literals">
<h1><span class="secnum">11.8.5</span>Regular Expression Literals</h1>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>A regular expression literal is an input element that is converted to a RegExp object (see <emu-xref href="#sec-regexp-regular-expression-objects" id="_ref_294"><a href="#sec-regexp-regular-expression-objects">21.2</a></emu-xref>)
each time the literal is evaluated. Two regular expression literals in a
program evaluate to regular expression objects that never compare as <code>===</code> to each other even if the two literals' contents are identical. A RegExp object may also be created at runtime by <code>new RegExp</code> or calling the <code>RegExp</code> <emu-xref href="#constructor" id="_ref_3127"><a href="#constructor">constructor</a></emu-xref> as a function (see <emu-xref href="#sec-regexp-constructor" id="_ref_295"><a href="#sec-regexp-constructor">21.2.3</a></emu-xref>).</p>
</div></emu-note>
<p>The productions below describe the syntax for a regular
expression literal and are used by the input element scanner to find the
end of the regular expression literal. The source text comprising the <emu-nt id="_ref_9543"><a href="#prod-RegularExpressionBody">RegularExpressionBody</a></emu-nt> and the <emu-nt id="_ref_9544"><a href="#prod-RegularExpressionFlags">RegularExpressionFlags</a></emu-nt> are subsequently parsed again using the more stringent ECMAScript Regular Expression grammar (<emu-xref href="#sec-patterns" id="_ref_296"><a href="#sec-patterns">21.2.1</a></emu-xref>).</p>
<p>An implementation may extend the ECMAScript Regular Expression grammar defined in <emu-xref href="#sec-patterns" id="_ref_297"><a href="#sec-patterns">21.2.1</a></emu-xref>, but it must not extend the <emu-nt id="_ref_9545"><a href="#prod-RegularExpressionBody">RegularExpressionBody</a></emu-nt> and <emu-nt id="_ref_9546"><a href="#prod-RegularExpressionFlags">RegularExpressionFlags</a></emu-nt> productions defined below or the productions used by these productions.</p>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="RegularExpressionLiteral" type="lexical" id="prod-RegularExpressionLiteral">
<emu-nt><a href="#prod-RegularExpressionLiteral">RegularExpressionLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5778053b"><emu-t>/</emu-t><emu-nt id="_ref_9547"><a href="#prod-RegularExpressionBody">RegularExpressionBody</a></emu-nt><emu-t>/</emu-t><emu-nt id="_ref_9548"><a href="#prod-RegularExpressionFlags">RegularExpressionFlags</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="RegularExpressionBody" type="lexical" id="prod-RegularExpressionBody">
<emu-nt><a href="#prod-RegularExpressionBody">RegularExpressionBody</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="bba7969e"><emu-nt id="_ref_9549"><a href="#prod-RegularExpressionFirstChar">RegularExpressionFirstChar</a></emu-nt><emu-nt id="_ref_9550"><a href="#prod-RegularExpressionChars">RegularExpressionChars</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="RegularExpressionChars" type="lexical" id="prod-RegularExpressionChars">
<emu-nt><a href="#prod-RegularExpressionChars">RegularExpressionChars</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></emu-rhs>
<emu-rhs a="a9881cec"><emu-nt id="_ref_9551"><a href="#prod-RegularExpressionChars">RegularExpressionChars</a></emu-nt><emu-nt id="_ref_9552"><a href="#prod-RegularExpressionChar">RegularExpressionChar</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="RegularExpressionFirstChar" type="lexical" id="prod-RegularExpressionFirstChar">
<emu-nt><a href="#prod-RegularExpressionFirstChar">RegularExpressionFirstChar</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="da1b0c0a"><emu-nt id="_ref_9553"><a href="#prod-RegularExpressionNonTerminator">RegularExpressionNonTerminator</a></emu-nt><emu-gmod>but not one of <emu-t>*</emu-t> or <emu-t>\</emu-t> or <emu-t>/</emu-t> or <emu-t>[</emu-t></emu-gmod></emu-rhs>
<emu-rhs a="9c9579a7"><emu-nt id="_ref_9554"><a href="#prod-RegularExpressionBackslashSequence">RegularExpressionBackslashSequence</a></emu-nt></emu-rhs>
<emu-rhs a="5cc6858e"><emu-nt id="_ref_9555"><a href="#prod-RegularExpressionClass">RegularExpressionClass</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="RegularExpressionChar" type="lexical" id="prod-RegularExpressionChar">
<emu-nt><a href="#prod-RegularExpressionChar">RegularExpressionChar</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="f0c3ff14"><emu-nt id="_ref_9556"><a href="#prod-RegularExpressionNonTerminator">RegularExpressionNonTerminator</a></emu-nt><emu-gmod>but not one of <emu-t>\</emu-t> or <emu-t>/</emu-t> or <emu-t>[</emu-t></emu-gmod></emu-rhs>
<emu-rhs a="9c9579a7"><emu-nt id="_ref_9557"><a href="#prod-RegularExpressionBackslashSequence">RegularExpressionBackslashSequence</a></emu-nt></emu-rhs>
<emu-rhs a="5cc6858e"><emu-nt id="_ref_9558"><a href="#prod-RegularExpressionClass">RegularExpressionClass</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="RegularExpressionBackslashSequence" type="lexical" id="prod-RegularExpressionBackslashSequence">
<emu-nt><a href="#prod-RegularExpressionBackslashSequence">RegularExpressionBackslashSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="d7656bad"><emu-t>\</emu-t><emu-nt id="_ref_9559"><a href="#prod-RegularExpressionNonTerminator">RegularExpressionNonTerminator</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="RegularExpressionNonTerminator" type="lexical" id="prod-RegularExpressionNonTerminator">
<emu-nt><a href="#prod-RegularExpressionNonTerminator">RegularExpressionNonTerminator</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="2d5bdfa7"><emu-nt id="_ref_9560"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-gmod>but not <emu-nt id="_ref_9561"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt></emu-gmod></emu-rhs>
</emu-production>
<emu-production name="RegularExpressionClass" type="lexical" id="prod-RegularExpressionClass">
<emu-nt><a href="#prod-RegularExpressionClass">RegularExpressionClass</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="4c1bc40a"><emu-t>[</emu-t><emu-nt id="_ref_9562"><a href="#prod-RegularExpressionClassChars">RegularExpressionClassChars</a></emu-nt><emu-t>]</emu-t></emu-rhs>
</emu-production>
<emu-production name="RegularExpressionClassChars" type="lexical" id="prod-RegularExpressionClassChars">
<emu-nt><a href="#prod-RegularExpressionClassChars">RegularExpressionClassChars</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></emu-rhs>
<emu-rhs a="76bdcb05"><emu-nt id="_ref_9563"><a href="#prod-RegularExpressionClassChars">RegularExpressionClassChars</a></emu-nt><emu-nt id="_ref_9564"><a href="#prod-RegularExpressionClassChar">RegularExpressionClassChar</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="RegularExpressionClassChar" type="lexical" id="prod-RegularExpressionClassChar">
<emu-nt><a href="#prod-RegularExpressionClassChar">RegularExpressionClassChar</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="7fd10851"><emu-nt id="_ref_9565"><a href="#prod-RegularExpressionNonTerminator">RegularExpressionNonTerminator</a></emu-nt><emu-gmod>but not one of <emu-t>]</emu-t> or <emu-t>\</emu-t></emu-gmod></emu-rhs>
<emu-rhs a="9c9579a7"><emu-nt id="_ref_9566"><a href="#prod-RegularExpressionBackslashSequence">RegularExpressionBackslashSequence</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="RegularExpressionFlags" type="lexical" id="prod-RegularExpressionFlags">
<emu-nt><a href="#prod-RegularExpressionFlags">RegularExpressionFlags</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></emu-rhs>
<emu-rhs a="fceefdcd"><emu-nt id="_ref_9567"><a href="#prod-RegularExpressionFlags">RegularExpressionFlags</a></emu-nt><emu-nt id="_ref_9568"><a href="#prod-IdentifierPart">IdentifierPart</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>Regular expression literals may not be empty; instead of
representing an empty regular expression literal, the code unit sequence
<code>//</code> starts a single-line comment. To specify an empty regular expression, use: <code>/(?:)/</code>.</p>
</div></emu-note>
<emu-clause id="sec-literals-regular-expression-literals-static-semantics-early-errors">
<h1><span class="secnum">11.8.5.1</span>Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="RegularExpressionFlags" type="lexical" collapsed="">
<emu-nt><a href="#prod-RegularExpressionFlags">RegularExpressionFlags</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="fceefdcd"><emu-nt id="_ref_9569"><a href="#prod-RegularExpressionFlags">RegularExpressionFlags</a></emu-nt><emu-nt id="_ref_9570"><a href="#prod-IdentifierPart">IdentifierPart</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if <emu-nt id="_ref_9571"><a href="#prod-IdentifierPart">IdentifierPart</a></emu-nt> contains a Unicode escape sequence.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-static-semantics-bodytext">
<h1><span class="secnum">11.8.5.2</span>Static Semantics: BodyText</h1>
<emu-grammar><emu-production name="RegularExpressionLiteral" type="lexical" collapsed="">
<emu-nt><a href="#prod-RegularExpressionLiteral">RegularExpressionLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5778053b"><emu-t>/</emu-t><emu-nt id="_ref_9572"><a href="#prod-RegularExpressionBody">RegularExpressionBody</a></emu-nt><emu-t>/</emu-t><emu-nt id="_ref_9573"><a href="#prod-RegularExpressionFlags">RegularExpressionFlags</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the source text that was recognized as <emu-nt id="_ref_9574"><a href="#prod-RegularExpressionBody">RegularExpressionBody</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-static-semantics-flagtext">
<h1><span class="secnum">11.8.5.3</span>Static Semantics: FlagText</h1>
<emu-grammar><emu-production name="RegularExpressionLiteral" type="lexical" collapsed="">
<emu-nt><a href="#prod-RegularExpressionLiteral">RegularExpressionLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5778053b"><emu-t>/</emu-t><emu-nt id="_ref_9575"><a href="#prod-RegularExpressionBody">RegularExpressionBody</a></emu-nt><emu-t>/</emu-t><emu-nt id="_ref_9576"><a href="#prod-RegularExpressionFlags">RegularExpressionFlags</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the source text that was recognized as <emu-nt id="_ref_9577"><a href="#prod-RegularExpressionFlags">RegularExpressionFlags</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-template-literal-lexical-components">
<h1><span class="secnum">11.8.6</span>Template Literal Lexical Components</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="Template" type="lexical" id="prod-Template">
<emu-nt><a href="#prod-Template">Template</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="7bf3ad2b"><emu-nt id="_ref_9578"><a href="#prod-NoSubstitutionTemplate">NoSubstitutionTemplate</a></emu-nt></emu-rhs>
<emu-rhs a="ab9a4b96"><emu-nt id="_ref_9579"><a href="#prod-TemplateHead">TemplateHead</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="NoSubstitutionTemplate" type="lexical" id="prod-NoSubstitutionTemplate">
<emu-nt><a href="#prod-NoSubstitutionTemplate">NoSubstitutionTemplate</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="056f5c6b"><emu-t>`</emu-t><emu-nt optional="" id="_ref_9580"><a href="#prod-TemplateCharacters">TemplateCharacters</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>`</emu-t></emu-rhs>
</emu-production>
<emu-production name="TemplateHead" type="lexical" id="prod-TemplateHead">
<emu-nt><a href="#prod-TemplateHead">TemplateHead</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="bfb172fc"><emu-t>`</emu-t><emu-nt optional="" id="_ref_9581"><a href="#prod-TemplateCharacters">TemplateCharacters</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>${</emu-t></emu-rhs>
</emu-production>
<emu-production name="TemplateSubstitutionTail" type="lexical" id="prod-TemplateSubstitutionTail">
<emu-nt><a href="#prod-TemplateSubstitutionTail">TemplateSubstitutionTail</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="ccbc035d"><emu-nt id="_ref_9582"><a href="#prod-TemplateMiddle">TemplateMiddle</a></emu-nt></emu-rhs>
<emu-rhs a="57fe6188"><emu-nt id="_ref_9583"><a href="#prod-TemplateTail">TemplateTail</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="TemplateMiddle" type="lexical" id="prod-TemplateMiddle">
<emu-nt><a href="#prod-TemplateMiddle">TemplateMiddle</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="37635b4e"><emu-t>}</emu-t><emu-nt optional="" id="_ref_9584"><a href="#prod-TemplateCharacters">TemplateCharacters</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>${</emu-t></emu-rhs>
</emu-production>
<emu-production name="TemplateTail" type="lexical" id="prod-TemplateTail">
<emu-nt><a href="#prod-TemplateTail">TemplateTail</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="fcef5bc0"><emu-t>}</emu-t><emu-nt optional="" id="_ref_9585"><a href="#prod-TemplateCharacters">TemplateCharacters</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>`</emu-t></emu-rhs>
</emu-production>
<emu-production name="TemplateCharacters" type="lexical" id="prod-TemplateCharacters">
<emu-nt><a href="#prod-TemplateCharacters">TemplateCharacters</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="f8c26ac5"><emu-nt id="_ref_9586"><a href="#prod-TemplateCharacter">TemplateCharacter</a></emu-nt><emu-nt optional="" id="_ref_9587"><a href="#prod-TemplateCharacters">TemplateCharacters</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="TemplateCharacter" type="lexical" id="prod-TemplateCharacter">
<emu-nt><a href="#prod-TemplateCharacter">TemplateCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="03c3b542"><emu-t>$</emu-t><emu-gann>[lookahead ≠ <emu-t>{</emu-t>]</emu-gann></emu-rhs>
<emu-rhs a="ea7d8d26"><emu-t>\</emu-t><emu-nt id="_ref_9588"><a href="#prod-EscapeSequence">EscapeSequence</a></emu-nt></emu-rhs>
<emu-rhs a="68cad9cc"><emu-t>\</emu-t><emu-nt id="_ref_9589"><a href="#prod-NotEscapeSequence">NotEscapeSequence</a></emu-nt></emu-rhs>
<emu-rhs a="00992933"><emu-nt id="_ref_9590"><a href="#prod-LineContinuation">LineContinuation</a></emu-nt></emu-rhs>
<emu-rhs a="544825da"><emu-nt id="_ref_9591"><a href="#prod-LineTerminatorSequence">LineTerminatorSequence</a></emu-nt></emu-rhs>
<emu-rhs a="4c80ea41"><emu-nt id="_ref_9592"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-gmod>but not one of <emu-t>`</emu-t> or <emu-t>\</emu-t> or <emu-t>$</emu-t> or <emu-nt id="_ref_9593"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt></emu-gmod></emu-rhs>
</emu-production>
<emu-production name="NotEscapeSequence" type="lexical" id="prod-NotEscapeSequence">
<emu-nt><a href="#prod-NotEscapeSequence">NotEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="c247e196"><emu-t>0</emu-t><emu-nt id="_ref_9594"><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt></emu-rhs>
<emu-rhs a="372f5e0d"><emu-nt id="_ref_9595"><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt><emu-gmod>but not <emu-t>0</emu-t></emu-gmod></emu-rhs>
<emu-rhs a="e6c4f6ee"><emu-t>x</emu-t><emu-gann>[lookahead ∉ <emu-nt id="_ref_9596"><a href="#prod-HexDigit">HexDigit</a></emu-nt>]</emu-gann></emu-rhs>
<emu-rhs a="92cdf202"><emu-t>x</emu-t><emu-nt id="_ref_9597"><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-gann>[lookahead ∉ <emu-nt id="_ref_9598"><a href="#prod-HexDigit">HexDigit</a></emu-nt>]</emu-gann></emu-rhs>
<emu-rhs a="a16001b3"><emu-t>u</emu-t><emu-gann>[lookahead ∉ <emu-nt id="_ref_9599"><a href="#prod-HexDigit">HexDigit</a></emu-nt>]</emu-gann><emu-gann>[lookahead ≠ <emu-t>{</emu-t>]</emu-gann></emu-rhs>
<emu-rhs a="f7d3e8d4"><emu-t>u</emu-t><emu-nt id="_ref_9600"><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-gann>[lookahead ∉ <emu-nt id="_ref_9601"><a href="#prod-HexDigit">HexDigit</a></emu-nt>]</emu-gann></emu-rhs>
<emu-rhs a="4ea47d3d"><emu-t>u</emu-t><emu-nt id="_ref_9602"><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-nt id="_ref_9603"><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-gann>[lookahead ∉ <emu-nt id="_ref_9604"><a href="#prod-HexDigit">HexDigit</a></emu-nt>]</emu-gann></emu-rhs>
<emu-rhs a="45170c27"><emu-t>u</emu-t><emu-nt id="_ref_9605"><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-nt id="_ref_9606"><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-nt id="_ref_9607"><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-gann>[lookahead ∉ <emu-nt id="_ref_9608"><a href="#prod-HexDigit">HexDigit</a></emu-nt>]</emu-gann></emu-rhs>
<emu-rhs a="5427e268"><emu-t>u</emu-t><emu-t>{</emu-t><emu-gann>[lookahead ∉ <emu-nt id="_ref_9609"><a href="#prod-HexDigit">HexDigit</a></emu-nt>]</emu-gann></emu-rhs>
<emu-rhs a="0c957f40"><emu-t>u</emu-t><emu-t>{</emu-t><emu-nt id="_ref_9610"><a href="#prod-NotCodePoint">NotCodePoint</a></emu-nt><emu-gann>[lookahead ∉ <emu-nt id="_ref_9611"><a href="#prod-HexDigit">HexDigit</a></emu-nt>]</emu-gann></emu-rhs>
<emu-rhs a="ab5a798c"><emu-t>u</emu-t><emu-t>{</emu-t><emu-nt id="_ref_9612"><a href="#prod-CodePoint">CodePoint</a></emu-nt><emu-gann>[lookahead ∉ <emu-nt id="_ref_9613"><a href="#prod-HexDigit">HexDigit</a></emu-nt>]</emu-gann><emu-gann>[lookahead ≠ <emu-t>}</emu-t>]</emu-gann></emu-rhs>
</emu-production>
<emu-production name="NotCodePoint" type="lexical" id="prod-NotCodePoint">
<emu-nt><a href="#prod-NotCodePoint">NotCodePoint</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5aeddbfc"><emu-nt id="_ref_9614"><a href="#prod-HexDigits">HexDigits</a></emu-nt><emu-gmod>but only if MV of <emu-nt id="_ref_9615"><a href="#prod-HexDigits">HexDigits</a></emu-nt> &gt; 0x10FFFF </emu-gmod></emu-rhs>
</emu-production>
<emu-production name="CodePoint" type="lexical" id="prod-CodePoint">
<emu-nt><a href="#prod-CodePoint">CodePoint</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="deeeb60d"><emu-nt id="_ref_9616"><a href="#prod-HexDigits">HexDigits</a></emu-nt><emu-gmod>but only if MV of <emu-nt id="_ref_9617"><a href="#prod-HexDigits">HexDigits</a></emu-nt> ≤ 0x10FFFF </emu-gmod></emu-rhs>
</emu-production></emu-grammar>
<p>A conforming implementation must not use the extended definition of <emu-nt id="_ref_9618"><a href="#prod-EscapeSequence">EscapeSequence</a></emu-nt> described in <emu-xref href="#sec-additional-syntax-string-literals" id="_ref_298"><a href="#sec-additional-syntax-string-literals">B.1.2</a></emu-xref> when parsing a <emu-nt id="_ref_9619"><a href="#prod-TemplateCharacter">TemplateCharacter</a></emu-nt>.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p><emu-nt id="_ref_9620"><a href="#prod-TemplateSubstitutionTail">TemplateSubstitutionTail</a></emu-nt> is used by the <emu-nt id="_ref_9621"><a href="#prod-InputElementTemplateTail">InputElementTemplateTail</a></emu-nt> alternative lexical goal.</p>
</div></emu-note>
<emu-clause id="sec-static-semantics-tv-and-trv">
<h1><span class="secnum">11.8.6.1</span>Static Semantics: TV and TRV</h1>
<p>A template literal component is interpreted as a sequence of
Unicode code points. The Template Value (TV) of a literal component is
described in terms of code unit values (SV, <emu-xref href="#sec-literals-string-literals" id="_ref_299"><a href="#sec-literals-string-literals">11.8.4</a></emu-xref>)
contributed by the various parts of the template literal component. As
part of this process, some Unicode code points within the template
component are interpreted as having a mathematical value (MV, <emu-xref href="#sec-literals-numeric-literals" id="_ref_300"><a href="#sec-literals-numeric-literals">11.8.3</a></emu-xref>).
In determining a TV, escape sequences are replaced by the UTF-16 code
unit(s) of the Unicode code point represented by the escape sequence.
The Template Raw Value (TRV) is similar to a Template Value with the
difference that in TRVs escape sequences are interpreted literally.</p>
<ul>
<li>
The TV and TRV of <emu-grammar><emu-production name="NoSubstitutionTemplate" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-NoSubstitutionTemplate">NoSubstitutionTemplate</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="7718e620"><emu-t>`</emu-t><emu-t>`</emu-t></emu-rhs>
</emu-production></emu-grammar> is the empty code unit sequence.
</li>
<li>
The TV and TRV of <emu-grammar><emu-production name="TemplateHead" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-TemplateHead">TemplateHead</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="25732601"><emu-t>`</emu-t><emu-t>${</emu-t></emu-rhs>
</emu-production></emu-grammar> is the empty code unit sequence.
</li>
<li>
The TV and TRV of <emu-grammar><emu-production name="TemplateMiddle" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-TemplateMiddle">TemplateMiddle</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="046dadff"><emu-t>}</emu-t><emu-t>${</emu-t></emu-rhs>
</emu-production></emu-grammar> is the empty code unit sequence.
</li>
<li>
The TV and TRV of <emu-grammar><emu-production name="TemplateTail" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-TemplateTail">TemplateTail</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="7a8ba1d2"><emu-t>}</emu-t><emu-t>`</emu-t></emu-rhs>
</emu-production></emu-grammar> is the empty code unit sequence.
</li>
<li>
The TV of <emu-grammar><emu-production name="NoSubstitutionTemplate" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-NoSubstitutionTemplate">NoSubstitutionTemplate</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="2d6bd81e"><emu-t>`</emu-t><emu-nt id="_ref_9622"><a href="#prod-TemplateCharacters">TemplateCharacters</a></emu-nt><emu-t>`</emu-t></emu-rhs>
</emu-production></emu-grammar> is the TV of <emu-nt id="_ref_9623"><a href="#prod-TemplateCharacters">TemplateCharacters</a></emu-nt>.
</li>
<li>
The TV of <emu-grammar><emu-production name="TemplateHead" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-TemplateHead">TemplateHead</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5451d6b2"><emu-t>`</emu-t><emu-nt id="_ref_9624"><a href="#prod-TemplateCharacters">TemplateCharacters</a></emu-nt><emu-t>${</emu-t></emu-rhs>
</emu-production></emu-grammar> is the TV of <emu-nt id="_ref_9625"><a href="#prod-TemplateCharacters">TemplateCharacters</a></emu-nt>.
</li>
<li>
The TV of <emu-grammar><emu-production name="TemplateMiddle" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-TemplateMiddle">TemplateMiddle</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="b95ec100"><emu-t>}</emu-t><emu-nt id="_ref_9626"><a href="#prod-TemplateCharacters">TemplateCharacters</a></emu-nt><emu-t>${</emu-t></emu-rhs>
</emu-production></emu-grammar> is the TV of <emu-nt id="_ref_9627"><a href="#prod-TemplateCharacters">TemplateCharacters</a></emu-nt>.
</li>
<li>
The TV of <emu-grammar><emu-production name="TemplateTail" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-TemplateTail">TemplateTail</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="ab941abd"><emu-t>}</emu-t><emu-nt id="_ref_9628"><a href="#prod-TemplateCharacters">TemplateCharacters</a></emu-nt><emu-t>`</emu-t></emu-rhs>
</emu-production></emu-grammar> is the TV of <emu-nt id="_ref_9629"><a href="#prod-TemplateCharacters">TemplateCharacters</a></emu-nt>.
</li>
<li>
The TV of <emu-grammar><emu-production name="TemplateCharacters" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-TemplateCharacters">TemplateCharacters</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="feb9caa8"><emu-nt id="_ref_9630"><a href="#prod-TemplateCharacter">TemplateCharacter</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the TV of <emu-nt id="_ref_9631"><a href="#prod-TemplateCharacter">TemplateCharacter</a></emu-nt>.
</li>
<li>
The TV of <emu-grammar><emu-production name="TemplateCharacters" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-TemplateCharacters">TemplateCharacters</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5f9e47ad"><emu-nt id="_ref_9632"><a href="#prod-TemplateCharacter">TemplateCharacter</a></emu-nt><emu-nt id="_ref_9633"><a href="#prod-TemplateCharacters">TemplateCharacters</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is <emu-val>undefined</emu-val> if either the TV of <emu-nt id="_ref_9634"><a href="#prod-TemplateCharacter">TemplateCharacter</a></emu-nt> is <emu-val>undefined</emu-val> or the TV of <emu-nt id="_ref_9635"><a href="#prod-TemplateCharacters">TemplateCharacters</a></emu-nt> is <emu-val>undefined</emu-val>. Otherwise, it is a sequence consisting of the code units of the TV of <emu-nt id="_ref_9636"><a href="#prod-TemplateCharacter">TemplateCharacter</a></emu-nt> followed by the code units of the TV of <emu-nt id="_ref_9637"><a href="#prod-TemplateCharacters">TemplateCharacters</a></emu-nt>.
</li>
<li>
The TV of <emu-grammar><emu-production name="TemplateCharacter" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-TemplateCharacter">TemplateCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="4c80ea41"><emu-nt id="_ref_9638"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-gmod>but not one of <emu-t>`</emu-t> or <emu-t>\</emu-t> or <emu-t>$</emu-t> or <emu-nt id="_ref_9639"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt></emu-gmod></emu-rhs>
</emu-production></emu-grammar> is the <emu-xref aoid="UTF16Encoding" id="_ref_3128"><a href="#sec-utf16encoding">UTF16Encoding</a></emu-xref> of the code point value of <emu-nt id="_ref_9640"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt>.
</li>
<li>
The TV of <emu-grammar><emu-production name="TemplateCharacter" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-TemplateCharacter">TemplateCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="1262cc92"><emu-t>$</emu-t></emu-rhs>
</emu-production></emu-grammar> is the code unit 0x0024 (DOLLAR SIGN).
</li>
<li>
The TV of <emu-grammar><emu-production name="TemplateCharacter" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-TemplateCharacter">TemplateCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="ea7d8d26"><emu-t>\</emu-t><emu-nt id="_ref_9641"><a href="#prod-EscapeSequence">EscapeSequence</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the SV of <emu-nt id="_ref_9642"><a href="#prod-EscapeSequence">EscapeSequence</a></emu-nt>.
</li>
<li>
The TV of <emu-grammar><emu-production name="TemplateCharacter" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-TemplateCharacter">TemplateCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="68cad9cc"><emu-t>\</emu-t><emu-nt id="_ref_9643"><a href="#prod-NotEscapeSequence">NotEscapeSequence</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is <emu-val>undefined</emu-val>.
</li>
<li>
The TV of <emu-grammar><emu-production name="TemplateCharacter" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-TemplateCharacter">TemplateCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="00992933"><emu-nt id="_ref_9644"><a href="#prod-LineContinuation">LineContinuation</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the TV of <emu-nt id="_ref_9645"><a href="#prod-LineContinuation">LineContinuation</a></emu-nt>.
</li>
<li>
The TV of <emu-grammar><emu-production name="TemplateCharacter" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-TemplateCharacter">TemplateCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="544825da"><emu-nt id="_ref_9646"><a href="#prod-LineTerminatorSequence">LineTerminatorSequence</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the TRV of <emu-nt id="_ref_9647"><a href="#prod-LineTerminatorSequence">LineTerminatorSequence</a></emu-nt>.
</li>
<li>
The TV of <emu-grammar><emu-production name="LineContinuation" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-LineContinuation">LineContinuation</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="c4893d63"><emu-t>\</emu-t><emu-nt id="_ref_9648"><a href="#prod-LineTerminatorSequence">LineTerminatorSequence</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the empty code unit sequence.
</li>
<li>
The TRV of <emu-grammar><emu-production name="NoSubstitutionTemplate" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-NoSubstitutionTemplate">NoSubstitutionTemplate</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="2d6bd81e"><emu-t>`</emu-t><emu-nt id="_ref_9649"><a href="#prod-TemplateCharacters">TemplateCharacters</a></emu-nt><emu-t>`</emu-t></emu-rhs>
</emu-production></emu-grammar> is the TRV of <emu-nt id="_ref_9650"><a href="#prod-TemplateCharacters">TemplateCharacters</a></emu-nt>.
</li>
<li>
The TRV of <emu-grammar><emu-production name="TemplateHead" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-TemplateHead">TemplateHead</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5451d6b2"><emu-t>`</emu-t><emu-nt id="_ref_9651"><a href="#prod-TemplateCharacters">TemplateCharacters</a></emu-nt><emu-t>${</emu-t></emu-rhs>
</emu-production></emu-grammar> is the TRV of <emu-nt id="_ref_9652"><a href="#prod-TemplateCharacters">TemplateCharacters</a></emu-nt>.
</li>
<li>
The TRV of <emu-grammar><emu-production name="TemplateMiddle" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-TemplateMiddle">TemplateMiddle</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="b95ec100"><emu-t>}</emu-t><emu-nt id="_ref_9653"><a href="#prod-TemplateCharacters">TemplateCharacters</a></emu-nt><emu-t>${</emu-t></emu-rhs>
</emu-production></emu-grammar> is the TRV of <emu-nt id="_ref_9654"><a href="#prod-TemplateCharacters">TemplateCharacters</a></emu-nt>.
</li>
<li>
The TRV of <emu-grammar><emu-production name="TemplateTail" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-TemplateTail">TemplateTail</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="ab941abd"><emu-t>}</emu-t><emu-nt id="_ref_9655"><a href="#prod-TemplateCharacters">TemplateCharacters</a></emu-nt><emu-t>`</emu-t></emu-rhs>
</emu-production></emu-grammar> is the TRV of <emu-nt id="_ref_9656"><a href="#prod-TemplateCharacters">TemplateCharacters</a></emu-nt>.
</li>
<li>
The TRV of <emu-grammar><emu-production name="TemplateCharacters" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-TemplateCharacters">TemplateCharacters</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="feb9caa8"><emu-nt id="_ref_9657"><a href="#prod-TemplateCharacter">TemplateCharacter</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the TRV of <emu-nt id="_ref_9658"><a href="#prod-TemplateCharacter">TemplateCharacter</a></emu-nt>.
</li>
<li>
The TRV of <emu-grammar><emu-production name="TemplateCharacters" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-TemplateCharacters">TemplateCharacters</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5f9e47ad"><emu-nt id="_ref_9659"><a href="#prod-TemplateCharacter">TemplateCharacter</a></emu-nt><emu-nt id="_ref_9660"><a href="#prod-TemplateCharacters">TemplateCharacters</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is a sequence consisting of the code units of the TRV of <emu-nt id="_ref_9661"><a href="#prod-TemplateCharacter">TemplateCharacter</a></emu-nt> followed by the code units of the TRV of <emu-nt id="_ref_9662"><a href="#prod-TemplateCharacters">TemplateCharacters</a></emu-nt>.
</li>
<li>
The TRV of <emu-grammar><emu-production name="TemplateCharacter" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-TemplateCharacter">TemplateCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="4c80ea41"><emu-nt id="_ref_9663"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-gmod>but not one of <emu-t>`</emu-t> or <emu-t>\</emu-t> or <emu-t>$</emu-t> or <emu-nt id="_ref_9664"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt></emu-gmod></emu-rhs>
</emu-production></emu-grammar> is the <emu-xref aoid="UTF16Encoding" id="_ref_3129"><a href="#sec-utf16encoding">UTF16Encoding</a></emu-xref> of the code point value of <emu-nt id="_ref_9665"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt>.
</li>
<li>
The TRV of <emu-grammar><emu-production name="TemplateCharacter" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-TemplateCharacter">TemplateCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="1262cc92"><emu-t>$</emu-t></emu-rhs>
</emu-production></emu-grammar> is the code unit 0x0024 (DOLLAR SIGN).
</li>
<li>
The TRV of <emu-grammar><emu-production name="TemplateCharacter" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-TemplateCharacter">TemplateCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="ea7d8d26"><emu-t>\</emu-t><emu-nt id="_ref_9666"><a href="#prod-EscapeSequence">EscapeSequence</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the sequence consisting of the code unit 0x005C (REVERSE SOLIDUS) followed by the code units of TRV of <emu-nt id="_ref_9667"><a href="#prod-EscapeSequence">EscapeSequence</a></emu-nt>.
</li>
<li>
The TRV of <emu-grammar><emu-production name="TemplateCharacter" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-TemplateCharacter">TemplateCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="68cad9cc"><emu-t>\</emu-t><emu-nt id="_ref_9668"><a href="#prod-NotEscapeSequence">NotEscapeSequence</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the sequence consisting of the code unit 0x005C (REVERSE SOLIDUS) followed by the code units of TRV of <emu-nt id="_ref_9669"><a href="#prod-NotEscapeSequence">NotEscapeSequence</a></emu-nt>.
</li>
<li>
The TRV of <emu-grammar><emu-production name="TemplateCharacter" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-TemplateCharacter">TemplateCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="00992933"><emu-nt id="_ref_9670"><a href="#prod-LineContinuation">LineContinuation</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the TRV of <emu-nt id="_ref_9671"><a href="#prod-LineContinuation">LineContinuation</a></emu-nt>.
</li>
<li>
The TRV of <emu-grammar><emu-production name="TemplateCharacter" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-TemplateCharacter">TemplateCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="544825da"><emu-nt id="_ref_9672"><a href="#prod-LineTerminatorSequence">LineTerminatorSequence</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the TRV of <emu-nt id="_ref_9673"><a href="#prod-LineTerminatorSequence">LineTerminatorSequence</a></emu-nt>.
</li>
<li>
The TRV of <emu-grammar><emu-production name="EscapeSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-EscapeSequence">EscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="e9e86f07"><emu-nt id="_ref_9674"><a href="#prod-CharacterEscapeSequence">CharacterEscapeSequence</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the TRV of the <emu-nt id="_ref_9675"><a href="#prod-CharacterEscapeSequence">CharacterEscapeSequence</a></emu-nt>.
</li>
<li>
The TRV of <emu-grammar><emu-production name="EscapeSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-EscapeSequence">EscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5259a431"><emu-t>0</emu-t></emu-rhs>
</emu-production></emu-grammar> is the code unit 0x0030 (DIGIT ZERO).
</li>
<li>
The TRV of <emu-grammar><emu-production name="EscapeSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-EscapeSequence">EscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="a8071b85"><emu-nt id="_ref_9676"><a href="#prod-HexEscapeSequence">HexEscapeSequence</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the TRV of the <emu-nt id="_ref_9677"><a href="#prod-HexEscapeSequence">HexEscapeSequence</a></emu-nt>.
</li>
<li>
The TRV of <emu-grammar><emu-production name="EscapeSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-EscapeSequence">EscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="44bd6f55"><emu-nt id="_ref_9678"><a href="#prod-UnicodeEscapeSequence">UnicodeEscapeSequence</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the TRV of the <emu-nt id="_ref_9679"><a href="#prod-UnicodeEscapeSequence">UnicodeEscapeSequence</a></emu-nt>.
</li>
<li>
The TRV of <emu-grammar><emu-production name="NotEscapeSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-NotEscapeSequence">NotEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="c247e196"><emu-t>0</emu-t><emu-nt id="_ref_9680"><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the sequence consisting of the code unit 0x0030 (DIGIT ZERO) followed by the code units of the TRV of <emu-nt id="_ref_9681"><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt>.
</li>
<li>
The TRV of <emu-grammar><emu-production name="NotEscapeSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-NotEscapeSequence">NotEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="e6c4f6ee"><emu-t>x</emu-t><emu-gann>[lookahead ∉ <emu-nt id="_ref_9682"><a href="#prod-HexDigit">HexDigit</a></emu-nt>]</emu-gann></emu-rhs>
</emu-production></emu-grammar> is the code unit 0x0078 (LATIN SMALL LETTER X).
</li>
<li>
The TRV of <emu-grammar><emu-production name="NotEscapeSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-NotEscapeSequence">NotEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="92cdf202"><emu-t>x</emu-t><emu-nt id="_ref_9683"><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-gann>[lookahead ∉ <emu-nt id="_ref_9684"><a href="#prod-HexDigit">HexDigit</a></emu-nt>]</emu-gann></emu-rhs>
</emu-production></emu-grammar> is the sequence consisting of the code unit 0x0078 (LATIN SMALL LETTER X) followed by the code units of the TRV of <emu-nt id="_ref_9685"><a href="#prod-HexDigit">HexDigit</a></emu-nt>.
</li>
<li>
The TRV of <emu-grammar><emu-production name="NotEscapeSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-NotEscapeSequence">NotEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="a16001b3"><emu-t>u</emu-t><emu-gann>[lookahead ∉ <emu-nt id="_ref_9686"><a href="#prod-HexDigit">HexDigit</a></emu-nt>]</emu-gann><emu-gann>[lookahead ≠ <emu-t>{</emu-t>]</emu-gann></emu-rhs>
</emu-production></emu-grammar> is the code unit 0x0075 (LATIN SMALL LETTER U).
</li>
<li>
The TRV of <emu-grammar><emu-production name="NotEscapeSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-NotEscapeSequence">NotEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="f7d3e8d4"><emu-t>u</emu-t><emu-nt id="_ref_9687"><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-gann>[lookahead ∉ <emu-nt id="_ref_9688"><a href="#prod-HexDigit">HexDigit</a></emu-nt>]</emu-gann></emu-rhs>
</emu-production></emu-grammar> is the sequence consisting of the code unit 0x0075 (LATIN SMALL LETTER U) followed by the code units of the TRV of <emu-nt id="_ref_9689"><a href="#prod-HexDigit">HexDigit</a></emu-nt>.
</li>
<li>
The TRV of <emu-grammar><emu-production name="NotEscapeSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-NotEscapeSequence">NotEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="4ea47d3d"><emu-t>u</emu-t><emu-nt id="_ref_9690"><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-nt id="_ref_9691"><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-gann>[lookahead ∉ <emu-nt id="_ref_9692"><a href="#prod-HexDigit">HexDigit</a></emu-nt>]</emu-gann></emu-rhs>
</emu-production></emu-grammar> is the sequence consisting of the code unit 0x0075 (LATIN SMALL LETTER U) followed by the code units of the TRV of the first <emu-nt id="_ref_9693"><a href="#prod-HexDigit">HexDigit</a></emu-nt> followed by the code units of the TRV of the second <emu-nt id="_ref_9694"><a href="#prod-HexDigit">HexDigit</a></emu-nt>.
</li>
<li>
The TRV of <emu-grammar><emu-production name="NotEscapeSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-NotEscapeSequence">NotEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="45170c27"><emu-t>u</emu-t><emu-nt id="_ref_9695"><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-nt id="_ref_9696"><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-nt id="_ref_9697"><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-gann>[lookahead ∉ <emu-nt id="_ref_9698"><a href="#prod-HexDigit">HexDigit</a></emu-nt>]</emu-gann></emu-rhs>
</emu-production></emu-grammar> is the sequence consisting of the code unit 0x0075 (LATIN SMALL LETTER U) followed by the code units of the TRV of the first <emu-nt id="_ref_9699"><a href="#prod-HexDigit">HexDigit</a></emu-nt> followed by the code units of the TRV of the second <emu-nt id="_ref_9700"><a href="#prod-HexDigit">HexDigit</a></emu-nt> followed by the code units of the TRV of the third <emu-nt id="_ref_9701"><a href="#prod-HexDigit">HexDigit</a></emu-nt>.
</li>
<li>
The TRV of <emu-grammar><emu-production name="NotEscapeSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-NotEscapeSequence">NotEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5427e268"><emu-t>u</emu-t><emu-t>{</emu-t><emu-gann>[lookahead ∉ <emu-nt id="_ref_9702"><a href="#prod-HexDigit">HexDigit</a></emu-nt>]</emu-gann></emu-rhs>
</emu-production></emu-grammar> is the sequence consisting of the code
unit 0x0075 (LATIN SMALL LETTER U) followed by the code unit 0x007B
(LEFT CURLY BRACKET).
</li>
<li>
The TRV of <emu-grammar><emu-production name="NotEscapeSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-NotEscapeSequence">NotEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="0c957f40"><emu-t>u</emu-t><emu-t>{</emu-t><emu-nt id="_ref_9703"><a href="#prod-NotCodePoint">NotCodePoint</a></emu-nt><emu-gann>[lookahead ∉ <emu-nt id="_ref_9704"><a href="#prod-HexDigit">HexDigit</a></emu-nt>]</emu-gann></emu-rhs>
</emu-production></emu-grammar> is the sequence consisting of the code
unit 0x0075 (LATIN SMALL LETTER U) followed by the code unit 0x007B
(LEFT CURLY BRACKET) followed by the code units of the TRV of <emu-nt id="_ref_9705"><a href="#prod-NotCodePoint">NotCodePoint</a></emu-nt>.
</li>
<li>
The TRV of <emu-grammar><emu-production name="NotEscapeSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-NotEscapeSequence">NotEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="ab5a798c"><emu-t>u</emu-t><emu-t>{</emu-t><emu-nt id="_ref_9706"><a href="#prod-CodePoint">CodePoint</a></emu-nt><emu-gann>[lookahead ∉ <emu-nt id="_ref_9707"><a href="#prod-HexDigit">HexDigit</a></emu-nt>]</emu-gann><emu-gann>[lookahead ≠ <emu-t>}</emu-t>]</emu-gann></emu-rhs>
</emu-production></emu-grammar> is the sequence consisting of the code
unit 0x0075 (LATIN SMALL LETTER U) followed by the code unit 0x007B
(LEFT CURLY BRACKET) followed by the code units of the TRV of <emu-nt id="_ref_9708"><a href="#prod-CodePoint">CodePoint</a></emu-nt>.
</li>
<li>
The TRV of <emu-grammar><emu-production name="DecimalDigit" type="lexical" oneof="" class=" inline">
<emu-nt><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt><emu-geq>::</emu-geq><emu-oneof>one of</emu-oneof><emu-rhs><emu-t>0</emu-t><emu-t>1</emu-t><emu-t>2</emu-t><emu-t>3</emu-t><emu-t>4</emu-t><emu-t>5</emu-t><emu-t>6</emu-t><emu-t>7</emu-t><emu-t>8</emu-t><emu-t>9</emu-t></emu-rhs>
</emu-production></emu-grammar> is the SV of the <emu-nt id="_ref_9709"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt> that is that single code point.
</li>
<li>
The TRV of <emu-grammar><emu-production name="CharacterEscapeSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-CharacterEscapeSequence">CharacterEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="7444838f"><emu-nt id="_ref_9710"><a href="#prod-SingleEscapeCharacter">SingleEscapeCharacter</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the TRV of the <emu-nt id="_ref_9711"><a href="#prod-SingleEscapeCharacter">SingleEscapeCharacter</a></emu-nt>.
</li>
<li>
The TRV of <emu-grammar><emu-production name="CharacterEscapeSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-CharacterEscapeSequence">CharacterEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="b7980a98"><emu-nt id="_ref_9712"><a href="#prod-NonEscapeCharacter">NonEscapeCharacter</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the SV of the <emu-nt id="_ref_9713"><a href="#prod-NonEscapeCharacter">NonEscapeCharacter</a></emu-nt>.
</li>
<li>
The TRV of <emu-grammar><emu-production name="SingleEscapeCharacter" type="lexical" oneof="" class=" inline">
<emu-nt><a href="#prod-SingleEscapeCharacter">SingleEscapeCharacter</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>b</emu-t><emu-t>f</emu-t><emu-t>n</emu-t><emu-t>r</emu-t><emu-t>t</emu-t><emu-t>v</emu-t></emu-rhs>
</emu-production></emu-grammar> is the SV of the <emu-nt id="_ref_9714"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt> that is that single code point.
</li>
<li>
The TRV of <emu-grammar><emu-production name="HexEscapeSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-HexEscapeSequence">HexEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="d8ef973c"><emu-t>x</emu-t><emu-nt id="_ref_9715"><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-nt id="_ref_9716"><a href="#prod-HexDigit">HexDigit</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the sequence consisting of the code unit 0x0078 (LATIN SMALL LETTER X) followed by TRV of the first <emu-nt id="_ref_9717"><a href="#prod-HexDigit">HexDigit</a></emu-nt> followed by the TRV of the second <emu-nt id="_ref_9718"><a href="#prod-HexDigit">HexDigit</a></emu-nt>.
</li>
<li>
The TRV of <emu-grammar><emu-production name="UnicodeEscapeSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-UnicodeEscapeSequence">UnicodeEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="8072ad8d"><emu-t>u</emu-t><emu-nt id="_ref_9719"><a href="#prod-Hex4Digits">Hex4Digits</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the sequence consisting of the code unit 0x0075 (LATIN SMALL LETTER U) followed by TRV of <emu-nt id="_ref_9720"><a href="#prod-Hex4Digits">Hex4Digits</a></emu-nt>.
</li>
<li>
The TRV of <emu-grammar><emu-production name="UnicodeEscapeSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-UnicodeEscapeSequence">UnicodeEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="b98063ef"><emu-t>u{</emu-t><emu-nt id="_ref_9721"><a href="#prod-CodePoint">CodePoint</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar> is the sequence consisting of the code
unit 0x0075 (LATIN SMALL LETTER U) followed by the code unit 0x007B
(LEFT CURLY BRACKET) followed by TRV of <emu-nt id="_ref_9722"><a href="#prod-CodePoint">CodePoint</a></emu-nt> followed by the code unit 0x007D (RIGHT CURLY BRACKET).
</li>
<li>
The TRV of <emu-grammar><emu-production name="Hex4Digits" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-Hex4Digits">Hex4Digits</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="0ba8de61"><emu-nt id="_ref_9723"><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-nt id="_ref_9724"><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-nt id="_ref_9725"><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-nt id="_ref_9726"><a href="#prod-HexDigit">HexDigit</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the sequence consisting of the TRV of the first <emu-nt id="_ref_9727"><a href="#prod-HexDigit">HexDigit</a></emu-nt> followed by the TRV of the second <emu-nt id="_ref_9728"><a href="#prod-HexDigit">HexDigit</a></emu-nt> followed by the TRV of the third <emu-nt id="_ref_9729"><a href="#prod-HexDigit">HexDigit</a></emu-nt> followed by the TRV of the fourth <emu-nt id="_ref_9730"><a href="#prod-HexDigit">HexDigit</a></emu-nt>.
</li>
<li>
The TRV of <emu-grammar><emu-production name="HexDigits" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-HexDigits">HexDigits</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="a0c48a71"><emu-nt id="_ref_9731"><a href="#prod-HexDigit">HexDigit</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the TRV of <emu-nt id="_ref_9732"><a href="#prod-HexDigit">HexDigit</a></emu-nt>.
</li>
<li>
The TRV of <emu-grammar><emu-production name="HexDigits" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-HexDigits">HexDigits</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="c8221899"><emu-nt id="_ref_9733"><a href="#prod-HexDigits">HexDigits</a></emu-nt><emu-nt id="_ref_9734"><a href="#prod-HexDigit">HexDigit</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the sequence consisting of TRV of <emu-nt id="_ref_9735"><a href="#prod-HexDigits">HexDigits</a></emu-nt> followed by TRV of <emu-nt id="_ref_9736"><a href="#prod-HexDigit">HexDigit</a></emu-nt>.
</li>
<li>
The TRV of a <emu-nt id="_ref_9737"><a href="#prod-HexDigit">HexDigit</a></emu-nt> is the SV of the <emu-nt id="_ref_9738"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt> that is that <emu-nt id="_ref_9739"><a href="#prod-HexDigit">HexDigit</a></emu-nt>.
</li>
<li>
The TRV of <emu-grammar><emu-production name="LineContinuation" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-LineContinuation">LineContinuation</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="c4893d63"><emu-t>\</emu-t><emu-nt id="_ref_9740"><a href="#prod-LineTerminatorSequence">LineTerminatorSequence</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the sequence consisting of the code unit 0x005C (REVERSE SOLIDUS) followed by the code units of TRV of <emu-nt id="_ref_9741"><a href="#prod-LineTerminatorSequence">LineTerminatorSequence</a></emu-nt>.
</li>
<li>
The TRV of <emu-grammar><emu-production name="LineTerminatorSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-LineTerminatorSequence">LineTerminatorSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="df188a5e"><emu-gprose>&lt;LF&gt;</emu-gprose></emu-rhs>
</emu-production></emu-grammar> is the code unit 0x000A (LINE FEED).
</li>
<li>
The TRV of <emu-grammar><emu-production name="LineTerminatorSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-LineTerminatorSequence">LineTerminatorSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="6bb44f60"><emu-gprose>&lt;CR&gt;</emu-gprose></emu-rhs>
</emu-production></emu-grammar> is the code unit 0x000A (LINE FEED).
</li>
<li>
The TRV of <emu-grammar><emu-production name="LineTerminatorSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-LineTerminatorSequence">LineTerminatorSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="85df8467"><emu-gprose>&lt;LS&gt;</emu-gprose></emu-rhs>
</emu-production></emu-grammar> is the code unit 0x2028 (LINE SEPARATOR).
</li>
<li>
The TRV of <emu-grammar><emu-production name="LineTerminatorSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-LineTerminatorSequence">LineTerminatorSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="be2ab9fa"><emu-gprose>&lt;PS&gt;</emu-gprose></emu-rhs>
</emu-production></emu-grammar> is the code unit 0x2029 (PARAGRAPH SEPARATOR).
</li>
<li>
The TRV of <emu-grammar><emu-production name="LineTerminatorSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-LineTerminatorSequence">LineTerminatorSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="253de229"><emu-gprose>&lt;CR&gt;</emu-gprose><emu-gprose>&lt;LF&gt;</emu-gprose></emu-rhs>
</emu-production></emu-grammar> is the sequence consisting of the code unit 0x000A (LINE FEED).
</li>
</ul>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>TV excludes the code units of <emu-nt id="_ref_9742"><a href="#prod-LineContinuation">LineContinuation</a></emu-nt> while TRV includes them. &lt;CR&gt;&lt;LF&gt; and &lt;CR&gt; <emu-nt id="_ref_9743"><a href="#prod-LineTerminatorSequence">LineTerminatorSequence</a></emu-nt>s are normalized to &lt;LF&gt; for both TV and TRV. An explicit <emu-nt id="_ref_9744"><a href="#prod-EscapeSequence">EscapeSequence</a></emu-nt> is needed to include a &lt;CR&gt; or &lt;CR&gt;&lt;LF&gt; sequence.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-automatic-semicolon-insertion">
<h1><span class="secnum">11.9</span>Automatic Semicolon Insertion</h1>
<p>Most ECMAScript statements and declarations must be terminated
with a semicolon. Such semicolons may always appear explicitly in the
source text. For convenience, however, such semicolons may be omitted
from the source text in certain situations. These situations are
described by saying that semicolons are automatically inserted into the
source code token stream in those situations.</p>
<emu-clause id="sec-rules-of-automatic-semicolon-insertion" namespace="asi-rules">
<h1><span class="secnum">11.9.1</span>Rules of Automatic Semicolon Insertion</h1>
<p>In the following rules, “token” means the actual recognized lexical token determined using the current lexical <emu-xref href="#sec-context-free-grammars" id="_ref_8633"><a href="#sec-context-free-grammars">goal symbol</a></emu-xref> as described in clause <emu-xref href="#sec-ecmascript-language-lexical-grammar" id="_ref_301"><a href="#sec-ecmascript-language-lexical-grammar">11</a></emu-xref>.</p>
<p>There are three basic rules of semicolon insertion:</p>
<ol>
<li>
<p>When, as the source text is parsed from left to right, a token (called the <em>offending token</em>)
is encountered that is not allowed by any production of the grammar,
then a semicolon is automatically inserted before the offending token if
one or more of the following conditions is true:</p>
<ul>
<li>
The offending token is separated from the previous token by at least one <emu-nt id="_ref_9745"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt>.
</li>
<li>
The offending token is <code>}</code>.
</li>
<li>
The previous token is <code>)</code> and the inserted semicolon would then be parsed as the terminating semicolon of a do-while statement (<emu-xref href="#sec-do-while-statement" id="_ref_302"><a href="#sec-do-while-statement">13.7.2</a></emu-xref>).
</li>
</ul>
</li>
<li>
When, as the source text is parsed from left to right, the end
of the input stream of tokens is encountered and the parser is unable
to parse the input token stream as a single instance of the goal
nonterminal, then a semicolon is automatically inserted at the end of
the input stream.
</li>
<li>
When, as the source text is parsed from left to right, a token
is encountered that is allowed by some production of the grammar, but
the production is a <em>restricted production</em> and the token would be the first token for a terminal or nonterminal immediately following the annotation “[no <emu-nt id="_ref_9746"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt>
here]” within the restricted production (and therefore such a token is
called a restricted token), and the restricted token is separated from
the previous token by at least one <emu-nt id="_ref_9747"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt>, then a semicolon is automatically inserted before the restricted token.
</li>
</ol>
<p>However, there is an additional overriding condition on the
preceding rules: a semicolon is never inserted automatically if the
semicolon would then be parsed as an empty statement or if that
semicolon would become one of the two semicolons in the header of a <code>for</code> statement (see <emu-xref href="#sec-for-statement" id="_ref_303"><a href="#sec-for-statement">13.7.4</a></emu-xref>).</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The following are the only restricted productions in the grammar:</p>
<emu-grammar><emu-production name="UpdateExpression" params="Yield, Await" id="prod-asi-rules-UpdateExpression">
<emu-nt params="Yield, Await"><a href="#prod-asi-rules-UpdateExpression">UpdateExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1063e6f2"><emu-nt params="?Yield, ?Await" id="_ref_9748"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-gann>[no <emu-nt id="_ref_9749"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-t>++</emu-t></emu-rhs>
<emu-rhs a="c40a0c36"><emu-nt params="?Yield, ?Await" id="_ref_9750"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-gann>[no <emu-nt id="_ref_9751"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-t>--</emu-t></emu-rhs>
</emu-production>
<emu-production name="ContinueStatement" params="Yield, Await" id="prod-asi-rules-ContinueStatement">
<emu-nt params="Yield, Await"><a href="#prod-asi-rules-ContinueStatement">ContinueStatement</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e903cf81"><emu-t>continue</emu-t><emu-t>;</emu-t></emu-rhs>
<emu-rhs a="14858b1f"><emu-t>continue</emu-t><emu-gann>[no <emu-nt id="_ref_9752"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-nt params="?Yield, ?Await" id="_ref_9753"><a href="#prod-LabelIdentifier">LabelIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production>
<emu-production name="BreakStatement" params="Yield, Await" id="prod-asi-rules-BreakStatement">
<emu-nt params="Yield, Await"><a href="#prod-asi-rules-BreakStatement">BreakStatement</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b65229e7"><emu-t>break</emu-t><emu-t>;</emu-t></emu-rhs>
<emu-rhs a="9c83b42f"><emu-t>break</emu-t><emu-gann>[no <emu-nt id="_ref_9754"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-nt params="?Yield, ?Await" id="_ref_9755"><a href="#prod-LabelIdentifier">LabelIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production>
<emu-production name="ReturnStatement" params="Yield, Await" id="prod-asi-rules-ReturnStatement">
<emu-nt params="Yield, Await"><a href="#prod-asi-rules-ReturnStatement">ReturnStatement</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0b293381"><emu-t>return</emu-t><emu-t>;</emu-t></emu-rhs>
<emu-rhs a="b7205f0d"><emu-t>return</emu-t><emu-gann>[no <emu-nt id="_ref_9756"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-nt params="+In, ?Yield, ?Await" id="_ref_9757"><a href="#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-production name="ThrowStatement" params="Yield, Await" id="prod-asi-rules-ThrowStatement">
<emu-nt params="Yield, Await"><a href="#prod-asi-rules-ThrowStatement">ThrowStatement</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="abf0986c"><emu-t>throw</emu-t><emu-gann>[no <emu-nt id="_ref_9758"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-nt params="+In, ?Yield, ?Await" id="_ref_9759"><a href="#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-production name="ArrowFunction" params="In, Yield, Await" id="prod-asi-rules-ArrowFunction">
<emu-nt params="In, Yield, Await"><a href="#prod-asi-rules-ArrowFunction">ArrowFunction</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="bdca54b2"><emu-nt params="?Yield, ?Await" id="_ref_9760"><a href="#prod-ArrowParameters">ArrowParameters</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-gann>[no <emu-nt id="_ref_9761"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-t>=&gt;</emu-t><emu-nt params="?In" id="_ref_9762"><a href="#prod-ConciseBody">ConciseBody</a><emu-mods><emu-params>[?In]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="YieldExpression" params="In, Await" id="prod-asi-rules-YieldExpression">
<emu-nt params="In, Await"><a href="#prod-asi-rules-YieldExpression">YieldExpression</a><emu-mods><emu-params>[In, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="68b64d66"><emu-t>yield</emu-t><emu-gann>[no <emu-nt id="_ref_9763"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-nt params="?In, +Yield, ?Await" id="_ref_9764"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[?In, +Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="9ab6e2ea"><emu-t>yield</emu-t><emu-gann>[no <emu-nt id="_ref_9765"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-t>*</emu-t><emu-nt params="?In, +Yield, ?Await" id="_ref_9766"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[?In, +Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<p>The practical effect of these restricted productions is as follows:</p>
<ul>
<li>
When a <code>++</code> or <code>--</code> token is encountered where the parser would treat it as a postfix operator, and at least one <emu-nt id="_ref_9767"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> occurred between the preceding token and the <code>++</code> or <code>--</code> token, then a semicolon is automatically inserted before the <code>++</code> or <code>--</code> token.
</li>
<li>
When a <code>continue</code>, <code>break</code>, <code>return</code>, <code>throw</code>, or <code>yield</code> token is encountered and a <emu-nt id="_ref_9768"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> is encountered before the next token, a semicolon is automatically inserted after the <code>continue</code>, <code>break</code>, <code>return</code>, <code>throw</code>, or <code>yield</code> token.
</li>
</ul>
<p>The resulting practical advice to ECMAScript programmers is:</p>
<ul>
<li>
A postfix <code>++</code> or <code>--</code> operator should appear on the same line as its operand.
</li>
<li>
An <emu-nt id="_ref_9769"><a href="#prod-Expression">Expression</a></emu-nt> in a <code>return</code> or <code>throw</code> statement or an <emu-nt id="_ref_9770"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt> in a <code>yield</code> expression should start on the same line as the <code>return</code>, <code>throw</code>, or <code>yield</code> token.
</li>
<li>
A <emu-nt id="_ref_9771"><a href="#prod-LabelIdentifier">LabelIdentifier</a></emu-nt> in a <code>break</code> or <code>continue</code> statement should be on the same line as the <code>break</code> or <code>continue</code> token.
</li>
</ul>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-examples-of-automatic-semicolon-insertion">
<h1><span class="secnum">11.9.2</span>Examples of Automatic Semicolon Insertion</h1>
<p>The source</p>
<pre><code class="javascript hljs">{ <span class="hljs-number">1</span> <span class="hljs-number">2</span> } <span class="hljs-number">3</span></code></pre>
<p>is not a valid sentence in the ECMAScript grammar, even with the automatic semicolon insertion rules. In contrast, the source</p>
<pre><code class="javascript hljs">{ <span class="hljs-number">1</span>
<span class="hljs-number">2</span> } <span class="hljs-number">3</span></code></pre>
<p>is also not a valid ECMAScript sentence, but is transformed by automatic semicolon insertion into the following:</p>
<pre><code class="javascript hljs">{ <span class="hljs-number">1</span>
;<span class="hljs-number">2</span> ;} <span class="hljs-number">3</span>;</code></pre>
<p>which is a valid ECMAScript sentence.</p>
<p>The source</p>
<pre><code class="javascript hljs"><span class="hljs-keyword">for</span> (a; b
)</code></pre>
<p>is not a valid ECMAScript sentence and is not altered by
automatic semicolon insertion because the semicolon is needed for the
header of a <code>for</code> statement. Automatic semicolon insertion never inserts one of the two semicolons in the header of a <code>for</code> statement.</p>
<p>The source</p>
<pre><code class="javascript hljs"><span class="hljs-keyword">return</span>
a + b</code></pre>
<p>is transformed by automatic semicolon insertion into the following:</p>
<pre><code class="javascript hljs"><span class="hljs-keyword">return</span>;
a + b;</code></pre>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>The expression <code>a + b</code> is not treated as a value to be returned by the <code>return</code> statement, because a <emu-nt id="_ref_9772"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> separates it from the token <code>return</code>.</p>
</div></emu-note>
<p>The source</p>
<pre><code class="javascript hljs">a = b
++c</code></pre>
<p>is transformed by automatic semicolon insertion into the following:</p>
<pre><code class="javascript hljs">a = b;
++c;</code></pre>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The token <code>++</code> is not treated as a postfix operator applying to the variable <code>b</code>, because a <emu-nt id="_ref_9773"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> occurs between <code>b</code> and <code>++</code>.</p>
</div></emu-note>
<p>The source</p>
<pre><code class="javascript hljs"><span class="hljs-keyword">if</span> (a &gt; b)
<span class="hljs-keyword">else</span> c = d</code></pre>
<p>is not a valid ECMAScript sentence and is not altered by automatic semicolon insertion before the <code>else</code>
token, even though no production of the grammar applies at that point,
because an automatically inserted semicolon would then be parsed as an
empty statement.</p>
<p>The source</p>
<pre><code class="javascript hljs">a = b + c
(d + e).print()</code></pre>
<p>is <em>not</em> transformed by automatic semicolon insertion,
because the parenthesized expression that begins the second line can be
interpreted as an argument list for a function call:</p>
<pre><code class="javascript hljs">a = b + c(d + e).print()</code></pre>
<p>In the circumstance that an assignment statement must begin
with a left parenthesis, it is a good idea for the programmer to provide
an explicit semicolon at the end of the preceding statement rather than
to rely on automatic semicolon insertion.</p>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-ecmascript-language-expressions">
<h1><span class="secnum">12</span>ECMAScript Language: Expressions</h1>
<emu-clause id="sec-identifiers">
<h1><span class="secnum">12.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="#prod-IdentifierReference">IdentifierReference</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="06b6ace8"><emu-nt id="_ref_9774"><a href="#prod-Identifier">Identifier</a></emu-nt></emu-rhs>
<emu-rhs a="cce6c4d9" constraints="~Yield"><emu-constraints>[~Yield]</emu-constraints><emu-t>yield</emu-t></emu-rhs>
<emu-rhs a="7723c826" constraints="~Await"><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="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="06b6ace8"><emu-nt id="_ref_9775"><a href="#prod-Identifier">Identifier</a></emu-nt></emu-rhs>
<emu-rhs a="d1df3360"><emu-t>yield</emu-t></emu-rhs>
<emu-rhs a="857d4354"><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="#prod-LabelIdentifier">LabelIdentifier</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="06b6ace8"><emu-nt id="_ref_9776"><a href="#prod-Identifier">Identifier</a></emu-nt></emu-rhs>
<emu-rhs a="cce6c4d9" constraints="~Yield"><emu-constraints>[~Yield]</emu-constraints><emu-t>yield</emu-t></emu-rhs>
<emu-rhs a="7723c826" constraints="~Await"><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="#prod-Identifier">Identifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="bfa5c374"><emu-nt id="_ref_9777"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt><emu-gmod>but not <emu-nt id="_ref_9778"><a href="#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_9779"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt> in the grammar, and prohibited with <emu-xref href="#sec-static-semantic-rules" id="_ref_3130"><a href="#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">12.1.1</span>Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="BindingIdentifier" collapsed="">
<emu-nt><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="06b6ace8"><emu-nt id="_ref_9780"><a href="#prod-Identifier">Identifier</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if the code matched by this production is contained in <emu-xref href="#sec-strict-mode-code" id="_ref_3131"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref> and the StringValue of <emu-nt id="_ref_9781"><a href="#prod-Identifier">Identifier</a></emu-nt> is <code>"arguments"</code> or <code>"eval"</code>.
</li>
</ul>
<emu-grammar><emu-production name="IdentifierReference" collapsed="">
<emu-nt><a href="#prod-IdentifierReference">IdentifierReference</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d1df3360"><emu-t>yield</emu-t></emu-rhs>
</emu-production>
<emu-production name="BindingIdentifier" collapsed="">
<emu-nt><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d1df3360"><emu-t>yield</emu-t></emu-rhs>
</emu-production>
<emu-production name="LabelIdentifier" collapsed="">
<emu-nt><a href="#prod-LabelIdentifier">LabelIdentifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d1df3360"><emu-t>yield</emu-t></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if the code matched by this production is contained in <emu-xref href="#sec-strict-mode-code" id="_ref_3132"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>.
</li>
</ul>
<emu-grammar><emu-production name="IdentifierReference" collapsed="">
<emu-nt><a href="#prod-IdentifierReference">IdentifierReference</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="857d4354"><emu-t>await</emu-t></emu-rhs>
</emu-production>
<emu-production name="BindingIdentifier" collapsed="">
<emu-nt><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="857d4354"><emu-t>await</emu-t></emu-rhs>
</emu-production>
<emu-production name="LabelIdentifier" collapsed="">
<emu-nt><a href="#prod-LabelIdentifier">LabelIdentifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="857d4354"><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_3133"><a href="#sec-context-free-grammars">goal symbol</a></emu-xref> of the syntactic grammar is <emu-nt id="_ref_9782"><a href="#prod-Module">Module</a></emu-nt>.
</li>
</ul>
<emu-grammar><emu-production name="BindingIdentifier" collapsed="">
<emu-nt><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d1df3360"><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" collapsed="">
<emu-nt><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="857d4354"><emu-t>await</emu-t></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if this production has an <sub>[<emu-xref aoid="Await" id="_ref_3134"><a href="#await">Await</a></emu-xref>]</sub> parameter.
</li>
</ul>
<emu-grammar><emu-production name="IdentifierReference" params="Yield, Await" collapsed="">
<emu-nt params="Yield, Await"><a href="#prod-IdentifierReference">IdentifierReference</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="06b6ace8"><emu-nt id="_ref_9783"><a href="#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="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="06b6ace8"><emu-nt id="_ref_9784"><a href="#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="#prod-LabelIdentifier">LabelIdentifier</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="06b6ace8"><emu-nt id="_ref_9785"><a href="#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 StringValue of <emu-nt id="_ref_9786"><a href="#prod-Identifier">Identifier</a></emu-nt> is <code>"yield"</code>.
</li>
<li>
It is a Syntax Error if this production has an <sub>[<emu-xref aoid="Await" id="_ref_3135"><a href="#await">Await</a></emu-xref>]</sub> parameter and StringValue of <emu-nt id="_ref_9787"><a href="#prod-Identifier">Identifier</a></emu-nt> is <code>"await"</code>.
</li>
</ul>
<emu-grammar><emu-production name="Identifier" collapsed="">
<emu-nt><a href="#prod-Identifier">Identifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="bfa5c374"><emu-nt id="_ref_9788"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt><emu-gmod>but not <emu-nt id="_ref_9789"><a href="#prod-ReservedWord">ReservedWord</a></emu-nt></emu-gmod></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if this phrase is contained in <emu-xref href="#sec-strict-mode-code" id="_ref_3136"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref> and the StringValue of <emu-nt id="_ref_9790"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt> is: <code>"implements"</code>, <code>"interface"</code>, <code>"let"</code>, <code>"package"</code>, <code>"private"</code>, <code>"protected"</code>, <code>"public"</code>, <code>"static"</code>, or <code>"yield"</code>.
</li>
<li>
It is a Syntax Error if the <emu-xref href="#sec-context-free-grammars" id="_ref_3137"><a href="#sec-context-free-grammars">goal symbol</a></emu-xref> of the syntactic grammar is <emu-nt id="_ref_9791"><a href="#prod-Module">Module</a></emu-nt> and the StringValue of <emu-nt id="_ref_9792"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt> is <code>"await"</code>.
</li>
<li>
It is a Syntax Error if StringValue of <emu-nt id="_ref_9793"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt> is the same String value as the StringValue of any <emu-nt id="_ref_9794"><a href="#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>StringValue of <emu-nt id="_ref_9795"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt> normalizes any Unicode escape sequences in <emu-nt id="_ref_9796"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt> hence such escapes cannot be used to write an <emu-nt id="_ref_9797"><a href="#prod-Identifier">Identifier</a></emu-nt> whose code point sequence is the same as a <emu-nt id="_ref_9798"><a href="#prod-ReservedWord">ReservedWord</a></emu-nt>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-identifiers-static-semantics-boundnames">
<h1><span class="secnum">12.1.2</span>Static Semantics: BoundNames</h1>
<emu-see-also-para op="BoundNames"></emu-see-also-para>
<emu-grammar><emu-production name="BindingIdentifier" collapsed="">
<emu-nt><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="06b6ace8"><emu-nt id="_ref_9799"><a href="#prod-Identifier">Identifier</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3138"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing the StringValue of <emu-nt id="_ref_9800"><a href="#prod-Identifier">Identifier</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="BindingIdentifier" collapsed="">
<emu-nt><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d1df3360"><emu-t>yield</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3139"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing <code>"yield"</code>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="BindingIdentifier" collapsed="">
<emu-nt><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="857d4354"><emu-t>await</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3140"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing <code>"await"</code>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause oldids="sec-identifiers-static-semantics-isvalidsimpleassignmenttarget" id="sec-identifiers-static-semantics-assignmenttargettype">
<span id="sec-identifiers-static-semantics-isvalidsimpleassignmenttarget"></span><h1><span class="secnum">12.1.3</span>Static Semantics: AssignmentTargetType</h1>
<emu-see-also-para op="AssignmentTargetType"></emu-see-also-para>
<emu-grammar><emu-production name="IdentifierReference" collapsed="">
<emu-nt><a href="#prod-IdentifierReference">IdentifierReference</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="06b6ace8"><emu-nt id="_ref_9801"><a href="#prod-Identifier">Identifier</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If this <emu-nt id="_ref_9802"><a href="#prod-IdentifierReference">IdentifierReference</a></emu-nt> is contained in <emu-xref href="#sec-strict-mode-code" id="_ref_3141"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref> and StringValue of <emu-nt id="_ref_9803"><a href="#prod-Identifier">Identifier</a></emu-nt> is <code>"eval"</code> or <code>"arguments"</code>, return <emu-const>strict</emu-const>.</li><li>Return <emu-const>simple</emu-const>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="IdentifierReference" collapsed="">
<emu-nt><a href="#prod-IdentifierReference">IdentifierReference</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d1df3360"><emu-t>yield</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-const>simple</emu-const>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="IdentifierReference" collapsed="">
<emu-nt><a href="#prod-IdentifierReference">IdentifierReference</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="857d4354"><emu-t>await</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-const>simple</emu-const>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-identifiers-static-semantics-stringvalue">
<h1><span class="secnum">12.1.4</span>Static Semantics: StringValue</h1>
<emu-see-also-para op="StringValue"></emu-see-also-para>
<emu-grammar><emu-production name="IdentifierReference" collapsed="">
<emu-nt><a href="#prod-IdentifierReference">IdentifierReference</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d1df3360"><emu-t>yield</emu-t></emu-rhs>
</emu-production>
<emu-production name="BindingIdentifier" collapsed="">
<emu-nt><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d1df3360"><emu-t>yield</emu-t></emu-rhs>
</emu-production>
<emu-production name="LabelIdentifier" collapsed="">
<emu-nt><a href="#prod-LabelIdentifier">LabelIdentifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d1df3360"><emu-t>yield</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <code>"yield"</code>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="IdentifierReference" collapsed="">
<emu-nt><a href="#prod-IdentifierReference">IdentifierReference</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="857d4354"><emu-t>await</emu-t></emu-rhs>
</emu-production>
<emu-production name="BindingIdentifier" collapsed="">
<emu-nt><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="857d4354"><emu-t>await</emu-t></emu-rhs>
</emu-production>
<emu-production name="LabelIdentifier" collapsed="">
<emu-nt><a href="#prod-LabelIdentifier">LabelIdentifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="857d4354"><emu-t>await</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <code>"await"</code>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="Identifier" collapsed="">
<emu-nt><a href="#prod-Identifier">Identifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="bfa5c374"><emu-nt id="_ref_9804"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt><emu-gmod>but not <emu-nt id="_ref_9805"><a href="#prod-ReservedWord">ReservedWord</a></emu-nt></emu-gmod></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the StringValue of <emu-nt id="_ref_9806"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-identifiers-runtime-semantics-bindinginitialization">
<h1><span class="secnum">12.1.5</span>Runtime Semantics: BindingInitialization</h1>
<p>With parameters <var>value</var> and <var>environment</var>.</p>
<emu-see-also-para op="BindingInitialization"></emu-see-also-para>
<emu-note><span class="note">Note</span><div class="note-contents">
<p><emu-val>undefined</emu-val> is passed for <var>environment</var> to indicate that a <emu-xref aoid="PutValue" id="_ref_3142"><a href="#sec-putvalue">PutValue</a></emu-xref> operation should be used to assign the initialization value. This is the case for <code>var</code> statements and formal parameter lists of some non-strict functions (See <emu-xref href="#sec-functiondeclarationinstantiation" id="_ref_304"><a href="#sec-functiondeclarationinstantiation">9.2.15</a></emu-xref>). In those cases a lexical binding is hoisted and preinitialized prior to evaluation of its initializer.</p>
</div></emu-note>
<emu-grammar><emu-production name="BindingIdentifier" collapsed="">
<emu-nt><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="06b6ace8"><emu-nt id="_ref_9807"><a href="#prod-Identifier">Identifier</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>name</var> be StringValue of <emu-nt id="_ref_9808"><a href="#prod-Identifier">Identifier</a></emu-nt>.</li><li>Return ?&nbsp;<emu-xref aoid="InitializeBoundName" id="_ref_3143"><a href="#sec-initializeboundname">InitializeBoundName</a></emu-xref>(<var>name</var>, <var>value</var>, <var>environment</var>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="BindingIdentifier" collapsed="">
<emu-nt><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d1df3360"><emu-t>yield</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="InitializeBoundName" id="_ref_3144"><a href="#sec-initializeboundname">InitializeBoundName</a></emu-xref>(<code>"yield"</code>, <var>value</var>, <var>environment</var>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="BindingIdentifier" collapsed="">
<emu-nt><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="857d4354"><emu-t>await</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="InitializeBoundName" id="_ref_3145"><a href="#sec-initializeboundname">InitializeBoundName</a></emu-xref>(<code>"await"</code>, <var>value</var>, <var>environment</var>).
</li></ol></emu-alg>
<emu-clause id="sec-initializeboundname" aoid="InitializeBoundName">
<h1><span class="secnum">12.1.5.1</span>Runtime Semantics: InitializeBoundName ( <var>name</var>, <var>value</var>, <var>environment</var> )</h1>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_3146"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_3147"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>name</var>) is String.</li><li>If <var>environment</var> is not <emu-val>undefined</emu-val>, then<ol><li>Let <var>env</var> be the <emu-xref href="#sec-lexical-environments" id="_ref_3148"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref> component of <var>environment</var>.</li><li>Perform <var>env</var>.InitializeBinding(<var>name</var>, <var>value</var>).</li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_3149"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-val>undefined</emu-val>).</li></ol></li><li>Else,<ol><li>Let <var>lhs</var> be <emu-xref aoid="ResolveBinding" id="_ref_3150"><a href="#sec-resolvebinding">ResolveBinding</a></emu-xref>(<var>name</var>).</li><li>Return ?&nbsp;<emu-xref aoid="PutValue" id="_ref_3151"><a href="#sec-putvalue">PutValue</a></emu-xref>(<var>lhs</var>, <var>value</var>).
</li></ol></li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-identifiers-runtime-semantics-evaluation">
<h1><span class="secnum">12.1.6</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="IdentifierReference" collapsed="">
<emu-nt><a href="#prod-IdentifierReference">IdentifierReference</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="06b6ace8"><emu-nt id="_ref_9809"><a href="#prod-Identifier">Identifier</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="ResolveBinding" id="_ref_3152"><a href="#sec-resolvebinding">ResolveBinding</a></emu-xref>(StringValue of <emu-nt id="_ref_9810"><a href="#prod-Identifier">Identifier</a></emu-nt>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="IdentifierReference" collapsed="">
<emu-nt><a href="#prod-IdentifierReference">IdentifierReference</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d1df3360"><emu-t>yield</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="ResolveBinding" id="_ref_3153"><a href="#sec-resolvebinding">ResolveBinding</a></emu-xref>(<code>"yield"</code>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="IdentifierReference" collapsed="">
<emu-nt><a href="#prod-IdentifierReference">IdentifierReference</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="857d4354"><emu-t>await</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="ResolveBinding" id="_ref_3154"><a href="#sec-resolvebinding">ResolveBinding</a></emu-xref>(<code>"await"</code>).
</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_9811"><a href="#prod-IdentifierReference">IdentifierReference</a></emu-nt> is always a value of type <emu-xref href="#sec-reference-specification-type" id="_ref_3155"><a href="#sec-reference-specification-type">Reference</a></emu-xref>.</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_3156"><a href="#non-strict-code">non-strict code</a></emu-xref>, the keyword <code>yield</code> may be used as an identifier. Evaluating the <emu-nt id="_ref_9812"><a href="#prod-IdentifierReference">IdentifierReference</a></emu-nt> resolves the binding of <code>yield</code> as if it was an <emu-nt id="_ref_9813"><a href="#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_3157"><a href="#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">12.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="#prod-PrimaryExpression">PrimaryExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8cee0c59"><emu-t>this</emu-t></emu-rhs>
<emu-rhs a="0e54a070"><emu-nt params="?Yield, ?Await" id="_ref_9814"><a href="#prod-IdentifierReference">IdentifierReference</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="92e97e03"><emu-nt id="_ref_9815"><a href="#prod-Literal">Literal</a></emu-nt></emu-rhs>
<emu-rhs a="2fcfe2d0"><emu-nt params="?Yield, ?Await" id="_ref_9816"><a href="#prod-ArrayLiteral">ArrayLiteral</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="ecf2121c"><emu-nt params="?Yield, ?Await" id="_ref_9817"><a href="#prod-ObjectLiteral">ObjectLiteral</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="242eeccd"><emu-nt id="_ref_9818"><a href="#prod-FunctionExpression">FunctionExpression</a></emu-nt></emu-rhs>
<emu-rhs a="2508abde"><emu-nt params="?Yield, ?Await" id="_ref_9819"><a href="#prod-ClassExpression">ClassExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="abb7f7f4"><emu-nt id="_ref_9820"><a href="#prod-GeneratorExpression">GeneratorExpression</a></emu-nt></emu-rhs>
<emu-rhs a="ad589bb4"><emu-nt id="_ref_9821"><a href="#prod-AsyncFunctionExpression">AsyncFunctionExpression</a></emu-nt></emu-rhs>
<emu-rhs a="3403ed46"><emu-nt id="_ref_9822"><a href="#prod-AsyncGeneratorExpression">AsyncGeneratorExpression</a></emu-nt></emu-rhs>
<emu-rhs a="31b672e8"><emu-nt id="_ref_9823"><a href="#prod-RegularExpressionLiteral">RegularExpressionLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="493a5b25"><emu-nt params="?Yield, ?Await, ~Tagged" id="_ref_9824"><a href="#prod-TemplateLiteral">TemplateLiteral</a><emu-mods><emu-params>[?Yield, ?Await, ~Tagged]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="parencover"><emu-nt params="?Yield, ?Await" id="_ref_9825"><a href="#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="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="103ea770"><emu-t>(</emu-t><emu-nt params="+In, ?Yield, ?Await" id="_ref_9826"><a href="#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="95866f7d"><emu-t>(</emu-t><emu-nt params="+In, ?Yield, ?Await" id="_ref_9827"><a href="#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="78e44c33"><emu-t>(</emu-t><emu-t>)</emu-t></emu-rhs>
<emu-rhs a="a62ae549"><emu-t>(</emu-t><emu-t>...</emu-t><emu-nt params="?Yield, ?Await" id="_ref_9828"><a href="#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="496a4160"><emu-t>(</emu-t><emu-t>...</emu-t><emu-nt params="?Yield, ?Await" id="_ref_9829"><a href="#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="db5a5b9b"><emu-t>(</emu-t><emu-nt params="+In, ?Yield, ?Await" id="_ref_9830"><a href="#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_9831"><a href="#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="a8ec9f3e"><emu-t>(</emu-t><emu-nt params="+In, ?Yield, ?Await" id="_ref_9832"><a href="#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_9833"><a href="#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="#prod-PrimaryExpression">PrimaryExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="29cadaef"><emu-nt params="?Yield, ?Await" id="_ref_9834"><a href="#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_9835"><a href="#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="#prod-ParenthesizedExpression">ParenthesizedExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="103ea770"><emu-t>(</emu-t><emu-nt params="+In, ?Yield, ?Await" id="_ref_9836"><a href="#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-primary-expression-semantics">
<h1><span class="secnum">12.2.1</span>Semantics</h1>
<emu-clause id="sec-static-semantics-coveredparenthesizedexpression">
<h1><span class="secnum">12.2.1.1</span>Static Semantics: CoveredParenthesizedExpression</h1>
<emu-grammar><emu-production name="CoverParenthesizedExpressionAndArrowParameterList" collapsed="">
<emu-nt><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4ba6ef9d"><emu-t>(</emu-t><emu-nt id="_ref_9837"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the <emu-nt id="_ref_9838"><a href="#prod-ParenthesizedExpression">ParenthesizedExpression</a></emu-nt> that is <emu-xref href="#sec-syntactic-grammar" id="_ref_3158"><a href="#sec-syntactic-grammar">covered</a></emu-xref> by <emu-nt id="_ref_9839"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-semantics-static-semantics-hasname">
<h1><span class="secnum">12.2.1.2</span>Static Semantics: HasName</h1>
<emu-see-also-para op="HasName"></emu-see-also-para>
<emu-grammar><emu-production name="PrimaryExpression" collapsed="">
<emu-nt><a href="#prod-PrimaryExpression">PrimaryExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cab6f5d7"><emu-nt id="_ref_9840"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>expr</var> be CoveredParenthesizedExpression of <emu-nt id="_ref_9841"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt>.</li><li>If IsFunctionDefinition of <var>expr</var> is <emu-val>false</emu-val>, return <emu-val>false</emu-val>.</li><li>Return HasName of <var>expr</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-semantics-static-semantics-isfunctiondefinition">
<h1><span class="secnum">12.2.1.3</span>Static Semantics: IsFunctionDefinition</h1>
<emu-see-also-para op="IsFunctionDefinition"></emu-see-also-para>
<emu-grammar><emu-production name="PrimaryExpression">
<emu-nt><a href="#prod-PrimaryExpression">PrimaryExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8cee0c59"><emu-t>this</emu-t></emu-rhs>
<emu-rhs a="2361f19d"><emu-nt id="_ref_9842"><a href="#prod-IdentifierReference">IdentifierReference</a></emu-nt></emu-rhs>
<emu-rhs a="92e97e03"><emu-nt id="_ref_9843"><a href="#prod-Literal">Literal</a></emu-nt></emu-rhs>
<emu-rhs a="1bf32393"><emu-nt id="_ref_9844"><a href="#prod-ArrayLiteral">ArrayLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="cd178913"><emu-nt id="_ref_9845"><a href="#prod-ObjectLiteral">ObjectLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="31b672e8"><emu-nt id="_ref_9846"><a href="#prod-RegularExpressionLiteral">RegularExpressionLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="d9922ce8"><emu-nt id="_ref_9847"><a href="#prod-TemplateLiteral">TemplateLiteral</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="PrimaryExpression" collapsed="">
<emu-nt><a href="#prod-PrimaryExpression">PrimaryExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cab6f5d7"><emu-nt id="_ref_9848"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>expr</var> be CoveredParenthesizedExpression of <emu-nt id="_ref_9849"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt>.</li><li>Return IsFunctionDefinition of <var>expr</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-semantics-static-semantics-isidentifierref">
<h1><span class="secnum">12.2.1.4</span>Static Semantics: IsIdentifierRef</h1>
<emu-see-also-para op="IsIdentifierRef"></emu-see-also-para>
<emu-grammar><emu-production name="PrimaryExpression" collapsed="">
<emu-nt><a href="#prod-PrimaryExpression">PrimaryExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="2361f19d"><emu-nt id="_ref_9850"><a href="#prod-IdentifierReference">IdentifierReference</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="PrimaryExpression">
<emu-nt><a href="#prod-PrimaryExpression">PrimaryExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8cee0c59"><emu-t>this</emu-t></emu-rhs>
<emu-rhs a="92e97e03"><emu-nt id="_ref_9851"><a href="#prod-Literal">Literal</a></emu-nt></emu-rhs>
<emu-rhs a="1bf32393"><emu-nt id="_ref_9852"><a href="#prod-ArrayLiteral">ArrayLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="cd178913"><emu-nt id="_ref_9853"><a href="#prod-ObjectLiteral">ObjectLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="242eeccd"><emu-nt id="_ref_9854"><a href="#prod-FunctionExpression">FunctionExpression</a></emu-nt></emu-rhs>
<emu-rhs a="d8ce6db1"><emu-nt id="_ref_9855"><a href="#prod-ClassExpression">ClassExpression</a></emu-nt></emu-rhs>
<emu-rhs a="abb7f7f4"><emu-nt id="_ref_9856"><a href="#prod-GeneratorExpression">GeneratorExpression</a></emu-nt></emu-rhs>
<emu-rhs a="ad589bb4"><emu-nt id="_ref_9857"><a href="#prod-AsyncFunctionExpression">AsyncFunctionExpression</a></emu-nt></emu-rhs>
<emu-rhs a="3403ed46"><emu-nt id="_ref_9858"><a href="#prod-AsyncGeneratorExpression">AsyncGeneratorExpression</a></emu-nt></emu-rhs>
<emu-rhs a="31b672e8"><emu-nt id="_ref_9859"><a href="#prod-RegularExpressionLiteral">RegularExpressionLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="d9922ce8"><emu-nt id="_ref_9860"><a href="#prod-TemplateLiteral">TemplateLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="cab6f5d7"><emu-nt id="_ref_9861"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause oldids="sec-semantics-static-semantics-isvalidsimpleassignmenttarget" id="sec-semantics-static-semantics-assignmenttargettype">
<span id="sec-semantics-static-semantics-isvalidsimpleassignmenttarget"></span><h1><span class="secnum">12.2.1.5</span>Static Semantics: AssignmentTargetType</h1>
<emu-see-also-para op="AssignmentTargetType"></emu-see-also-para>
<emu-grammar><emu-production name="PrimaryExpression">
<emu-nt><a href="#prod-PrimaryExpression">PrimaryExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8cee0c59"><emu-t>this</emu-t></emu-rhs>
<emu-rhs a="92e97e03"><emu-nt id="_ref_9862"><a href="#prod-Literal">Literal</a></emu-nt></emu-rhs>
<emu-rhs a="1bf32393"><emu-nt id="_ref_9863"><a href="#prod-ArrayLiteral">ArrayLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="cd178913"><emu-nt id="_ref_9864"><a href="#prod-ObjectLiteral">ObjectLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="242eeccd"><emu-nt id="_ref_9865"><a href="#prod-FunctionExpression">FunctionExpression</a></emu-nt></emu-rhs>
<emu-rhs a="d8ce6db1"><emu-nt id="_ref_9866"><a href="#prod-ClassExpression">ClassExpression</a></emu-nt></emu-rhs>
<emu-rhs a="abb7f7f4"><emu-nt id="_ref_9867"><a href="#prod-GeneratorExpression">GeneratorExpression</a></emu-nt></emu-rhs>
<emu-rhs a="ad589bb4"><emu-nt id="_ref_9868"><a href="#prod-AsyncFunctionExpression">AsyncFunctionExpression</a></emu-nt></emu-rhs>
<emu-rhs a="3403ed46"><emu-nt id="_ref_9869"><a href="#prod-AsyncGeneratorExpression">AsyncGeneratorExpression</a></emu-nt></emu-rhs>
<emu-rhs a="31b672e8"><emu-nt id="_ref_9870"><a href="#prod-RegularExpressionLiteral">RegularExpressionLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="d9922ce8"><emu-nt id="_ref_9871"><a href="#prod-TemplateLiteral">TemplateLiteral</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-const>invalid</emu-const>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="PrimaryExpression" collapsed="">
<emu-nt><a href="#prod-PrimaryExpression">PrimaryExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cab6f5d7"><emu-nt id="_ref_9872"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>expr</var> be CoveredParenthesizedExpression of <emu-nt id="_ref_9873"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt>.</li><li>Return AssignmentTargetType of <var>expr</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-this-keyword">
<h1><span class="secnum">12.2.2</span>The <code>this</code> Keyword</h1>
<emu-clause id="sec-this-keyword-runtime-semantics-evaluation">
<h1><span class="secnum">12.2.2.1</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="PrimaryExpression" collapsed="">
<emu-nt><a href="#prod-PrimaryExpression">PrimaryExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8cee0c59"><emu-t>this</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="ResolveThisBinding" id="_ref_3159"><a href="#sec-resolvethisbinding">ResolveThisBinding</a></emu-xref>().
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-identifier-reference">
<h1><span class="secnum">12.2.3</span>Identifier Reference</h1>
<p>See <emu-xref href="#sec-identifiers" id="_ref_305"><a href="#sec-identifiers">12.1</a></emu-xref> for <emu-nt id="_ref_9874"><a href="#prod-IdentifierReference">IdentifierReference</a></emu-nt>.</p>
</emu-clause>
<emu-clause id="sec-primary-expression-literals">
<h1><span class="secnum">12.2.4</span>Literals</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="Literal" id="prod-Literal">
<emu-nt><a href="#prod-Literal">Literal</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="54f84188"><emu-nt id="_ref_9875"><a href="#prod-NullLiteral">NullLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="3508e1fd"><emu-nt id="_ref_9876"><a href="#prod-BooleanLiteral">BooleanLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="a548b407"><emu-nt id="_ref_9877"><a href="#prod-NumericLiteral">NumericLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="5c74e54d"><emu-nt id="_ref_9878"><a href="#prod-StringLiteral">StringLiteral</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-clause id="sec-literals-runtime-semantics-evaluation">
<h1><span class="secnum">12.2.4.1</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="Literal" collapsed="">
<emu-nt><a href="#prod-Literal">Literal</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="54f84188"><emu-nt id="_ref_9879"><a href="#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="#prod-Literal">Literal</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="3508e1fd"><emu-nt id="_ref_9880"><a href="#prod-BooleanLiteral">BooleanLiteral</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <emu-nt id="_ref_9881"><a href="#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_9882"><a href="#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="#prod-Literal">Literal</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a548b407"><emu-nt id="_ref_9883"><a href="#prod-NumericLiteral">NumericLiteral</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the number whose value is MV of <emu-nt id="_ref_9884"><a href="#prod-NumericLiteral">NumericLiteral</a></emu-nt> as defined in <emu-xref href="#sec-literals-numeric-literals" id="_ref_306"><a href="#sec-literals-numeric-literals">11.8.3</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="Literal" collapsed="">
<emu-nt><a href="#prod-Literal">Literal</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5c74e54d"><emu-nt id="_ref_9885"><a href="#prod-StringLiteral">StringLiteral</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the StringValue of <emu-nt id="_ref_9886"><a href="#prod-StringLiteral">StringLiteral</a></emu-nt> as defined in <emu-xref href="#sec-string-literals-static-semantics-stringvalue" id="_ref_307"><a href="#sec-string-literals-static-semantics-stringvalue">11.8.4.1</a></emu-xref>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-array-initializer">
<h1><span class="secnum">12.2.5</span>Array Initializer</h1>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>An <emu-nt id="_ref_9887"><a href="#prod-ArrayLiteral">ArrayLiteral</a></emu-nt>
is an expression describing the initialization of an Array object,
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_9888"><a href="#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="#prod-ArrayLiteral">ArrayLiteral</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="906e476b"><emu-t>[</emu-t><emu-nt optional="" id="_ref_9889"><a href="#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>]</emu-t></emu-rhs>
<emu-rhs a="5d65623a"><emu-t>[</emu-t><emu-nt params="?Yield, ?Await" id="_ref_9890"><a href="#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="14bb78d1"><emu-t>[</emu-t><emu-nt params="?Yield, ?Await" id="_ref_9891"><a href="#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_9892"><a href="#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="#prod-ElementList">ElementList</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="306f3a14"><emu-nt optional="" id="_ref_9893"><a href="#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt params="+In, ?Yield, ?Await" id="_ref_9894"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="05939ab1"><emu-nt optional="" id="_ref_9895"><a href="#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt params="?Yield, ?Await" id="_ref_9896"><a href="#prod-SpreadElement">SpreadElement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="e9492888"><emu-nt params="?Yield, ?Await" id="_ref_9897"><a href="#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_9898"><a href="#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt params="+In, ?Yield, ?Await" id="_ref_9899"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="9cd00eda"><emu-nt params="?Yield, ?Await" id="_ref_9900"><a href="#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_9901"><a href="#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt params="?Yield, ?Await" id="_ref_9902"><a href="#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="#prod-Elision">Elision</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="9471f753"><emu-t>,</emu-t></emu-rhs>
<emu-rhs a="806d0124"><emu-nt id="_ref_9903"><a href="#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="#prod-SpreadElement">SpreadElement</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b623b4c8"><emu-t>...</emu-t><emu-nt params="+In, ?Yield, ?Await" id="_ref_9904"><a href="#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-static-semantics-elisionwidth">
<h1><span class="secnum">12.2.5.1</span>Static Semantics: ElisionWidth</h1>
<emu-grammar><emu-production name="Elision" collapsed="">
<emu-nt><a href="#prod-Elision">Elision</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="9471f753"><emu-t>,</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the numeric value 1.
</li></ol></emu-alg>
<emu-grammar><emu-production name="Elision" collapsed="">
<emu-nt><a href="#prod-Elision">Elision</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="806d0124"><emu-nt id="_ref_9905"><a href="#prod-Elision">Elision</a></emu-nt><emu-t>,</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>preceding</var> be the ElisionWidth of <emu-nt id="_ref_9906"><a href="#prod-Elision">Elision</a></emu-nt>.</li><li>Return <var>preceding</var> + 1.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-runtime-semantics-arrayaccumulation">
<h1><span class="secnum">12.2.5.2</span>Runtime Semantics: ArrayAccumulation</h1>
<p>With parameters <var>array</var> and <var>nextIndex</var>.</p>
<emu-grammar><emu-production name="ElementList" collapsed="">
<emu-nt><a href="#prod-ElementList">ElementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d806b57a"><emu-nt optional="" id="_ref_9907"><a href="#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt id="_ref_9908"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>padding</var> be the ElisionWidth of <emu-nt id="_ref_9909"><a href="#prod-Elision">Elision</a></emu-nt>; if <emu-nt id="_ref_9910"><a href="#prod-Elision">Elision</a></emu-nt> is not present, use the numeric value zero.</li><li>Let <var>initResult</var> be the result of evaluating <emu-nt id="_ref_9911"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Let <var>initValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3160"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>initResult</var>).</li><li>Let <var>created</var> be <emu-xref aoid="CreateDataProperty" id="_ref_3161"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>array</var>, <emu-xref aoid="ToString" id="_ref_3162"><a href="#sec-tostring">ToString</a></emu-xref>(<emu-xref aoid="ToUint32" id="_ref_3163"><a href="#sec-touint32">ToUint32</a></emu-xref>(<var>nextIndex</var> + <var>padding</var>)), <var>initValue</var>).</li><li><emu-xref href="#assert" id="_ref_3164"><a href="#assert">Assert</a></emu-xref>: <var>created</var> is <emu-val>true</emu-val>.</li><li>Return <var>nextIndex</var> + <var>padding</var> + 1.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ElementList" collapsed="">
<emu-nt><a href="#prod-ElementList">ElementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="141a73d1"><emu-nt optional="" id="_ref_9912"><a href="#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt id="_ref_9913"><a href="#prod-SpreadElement">SpreadElement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>padding</var> be the ElisionWidth of <emu-nt id="_ref_9914"><a href="#prod-Elision">Elision</a></emu-nt>; if <emu-nt id="_ref_9915"><a href="#prod-Elision">Elision</a></emu-nt> is not present, use the numeric value zero.</li><li>Return the result of performing ArrayAccumulation for <emu-nt id="_ref_9916"><a href="#prod-SpreadElement">SpreadElement</a></emu-nt> with arguments <var>array</var> and <var>nextIndex</var> + <var>padding</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ElementList" collapsed="">
<emu-nt><a href="#prod-ElementList">ElementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="fd2af9b1"><emu-nt id="_ref_9917"><a href="#prod-ElementList">ElementList</a></emu-nt><emu-t>,</emu-t><emu-nt optional="" id="_ref_9918"><a href="#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt id="_ref_9919"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>postIndex</var> be the result of performing ArrayAccumulation for <emu-nt id="_ref_9920"><a href="#prod-ElementList">ElementList</a></emu-nt> with arguments <var>array</var> and <var>nextIndex</var>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3165"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>postIndex</var>).</li><li>Let <var>padding</var> be the ElisionWidth of <emu-nt id="_ref_9921"><a href="#prod-Elision">Elision</a></emu-nt>; if <emu-nt id="_ref_9922"><a href="#prod-Elision">Elision</a></emu-nt> is not present, use the numeric value zero.</li><li>Let <var>initResult</var> be the result of evaluating <emu-nt id="_ref_9923"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Let <var>initValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3166"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>initResult</var>).</li><li>Let <var>created</var> be <emu-xref aoid="CreateDataProperty" id="_ref_3167"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>array</var>, <emu-xref aoid="ToString" id="_ref_3168"><a href="#sec-tostring">ToString</a></emu-xref>(<emu-xref aoid="ToUint32" id="_ref_3169"><a href="#sec-touint32">ToUint32</a></emu-xref>(<var>postIndex</var> + <var>padding</var>)), <var>initValue</var>).</li><li><emu-xref href="#assert" id="_ref_3170"><a href="#assert">Assert</a></emu-xref>: <var>created</var> is <emu-val>true</emu-val>.</li><li>Return <var>postIndex</var> + <var>padding</var> + 1.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ElementList" collapsed="">
<emu-nt><a href="#prod-ElementList">ElementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6a579a6a"><emu-nt id="_ref_9924"><a href="#prod-ElementList">ElementList</a></emu-nt><emu-t>,</emu-t><emu-nt optional="" id="_ref_9925"><a href="#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt id="_ref_9926"><a href="#prod-SpreadElement">SpreadElement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>postIndex</var> be the result of performing ArrayAccumulation for <emu-nt id="_ref_9927"><a href="#prod-ElementList">ElementList</a></emu-nt> with arguments <var>array</var> and <var>nextIndex</var>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3171"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>postIndex</var>).</li><li>Let <var>padding</var> be the ElisionWidth of <emu-nt id="_ref_9928"><a href="#prod-Elision">Elision</a></emu-nt>; if <emu-nt id="_ref_9929"><a href="#prod-Elision">Elision</a></emu-nt> is not present, use the numeric value zero.</li><li>Return the result of performing ArrayAccumulation for <emu-nt id="_ref_9930"><a href="#prod-SpreadElement">SpreadElement</a></emu-nt> with arguments <var>array</var> and <var>postIndex</var> + <var>padding</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="SpreadElement" collapsed="">
<emu-nt><a href="#prod-SpreadElement">SpreadElement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5bb8853e"><emu-t>...</emu-t><emu-nt id="_ref_9931"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>spreadRef</var> be the result of evaluating <emu-nt id="_ref_9932"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Let <var>spreadObj</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3172"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>spreadRef</var>).</li><li>Let <var>iteratorRecord</var> be ?&nbsp;<emu-xref aoid="GetIterator" id="_ref_3173"><a href="#sec-getiterator">GetIterator</a></emu-xref>(<var>spreadObj</var>).</li><li>Repeat,<ol><li>Let <var>next</var> be ?&nbsp;<emu-xref aoid="IteratorStep" id="_ref_3174"><a href="#sec-iteratorstep">IteratorStep</a></emu-xref>(<var>iteratorRecord</var>).</li><li>If <var>next</var> is <emu-val>false</emu-val>, return <var>nextIndex</var>.</li><li>Let <var>nextValue</var> be ?&nbsp;<emu-xref aoid="IteratorValue" id="_ref_3175"><a href="#sec-iteratorvalue">IteratorValue</a></emu-xref>(<var>next</var>).</li><li>Let <var>status</var> be <emu-xref aoid="CreateDataProperty" id="_ref_3176"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>array</var>, <emu-xref aoid="ToString" id="_ref_3177"><a href="#sec-tostring">ToString</a></emu-xref>(<emu-xref aoid="ToUint32" id="_ref_3178"><a href="#sec-touint32">ToUint32</a></emu-xref>(<var>nextIndex</var>)), <var>nextValue</var>).</li><li><emu-xref href="#assert" id="_ref_3179"><a href="#assert">Assert</a></emu-xref>: <var>status</var> is <emu-val>true</emu-val>.</li><li>Increase <var>nextIndex</var> by 1.
</li></ol></li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p><emu-xref aoid="CreateDataProperty" id="_ref_3180"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>
is used to ensure that own properties are defined for the array even if
the standard built-in Array prototype object has been modified in a
manner that would preclude the creation of new own properties using
[[Set]].</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-array-initializer-runtime-semantics-evaluation">
<h1><span class="secnum">12.2.5.3</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="ArrayLiteral" collapsed="">
<emu-nt><a href="#prod-ArrayLiteral">ArrayLiteral</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="906e476b"><emu-t>[</emu-t><emu-nt optional="" id="_ref_9933"><a href="#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_3181"><a href="#sec-arraycreate">ArrayCreate</a></emu-xref>(0).</li><li>Let <var>pad</var> be the ElisionWidth of <emu-nt id="_ref_9934"><a href="#prod-Elision">Elision</a></emu-nt>; if <emu-nt id="_ref_9935"><a href="#prod-Elision">Elision</a></emu-nt> is not present, use the numeric value zero.</li><li>Perform <emu-xref aoid="Set" id="_ref_3182"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>array</var>, <code>"length"</code>, <emu-xref aoid="ToUint32" id="_ref_3183"><a href="#sec-touint32">ToUint32</a></emu-xref>(<var>pad</var>), <emu-val>false</emu-val>).</li><li>NOTE: The above Set cannot fail because of the nature of the object returned by <emu-xref aoid="ArrayCreate" id="_ref_3184"><a href="#sec-arraycreate">ArrayCreate</a></emu-xref>.</li><li>Return <var>array</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ArrayLiteral" collapsed="">
<emu-nt><a href="#prod-ArrayLiteral">ArrayLiteral</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0aa8c9b8"><emu-t>[</emu-t><emu-nt id="_ref_9936"><a href="#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_3185"><a href="#sec-arraycreate">ArrayCreate</a></emu-xref>(0).</li><li>Let <var>len</var> be the result of performing ArrayAccumulation for <emu-nt id="_ref_9937"><a href="#prod-ElementList">ElementList</a></emu-nt> with arguments <var>array</var> and 0.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3186"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>len</var>).</li><li>Perform <emu-xref aoid="Set" id="_ref_3187"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>array</var>, <code>"length"</code>, <emu-xref aoid="ToUint32" id="_ref_3188"><a href="#sec-touint32">ToUint32</a></emu-xref>(<var>len</var>), <emu-val>false</emu-val>).</li><li>NOTE: The above Set cannot fail because of the nature of the object returned by <emu-xref aoid="ArrayCreate" id="_ref_3189"><a href="#sec-arraycreate">ArrayCreate</a></emu-xref>.</li><li>Return <var>array</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ArrayLiteral" collapsed="">
<emu-nt><a href="#prod-ArrayLiteral">ArrayLiteral</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c8973de1"><emu-t>[</emu-t><emu-nt id="_ref_9938"><a href="#prod-ElementList">ElementList</a></emu-nt><emu-t>,</emu-t><emu-nt optional="" id="_ref_9939"><a href="#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_3190"><a href="#sec-arraycreate">ArrayCreate</a></emu-xref>(0).</li><li>Let <var>len</var> be the result of performing ArrayAccumulation for <emu-nt id="_ref_9940"><a href="#prod-ElementList">ElementList</a></emu-nt> with arguments <var>array</var> and 0.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3191"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>len</var>).</li><li>Let <var>padding</var> be the ElisionWidth of <emu-nt id="_ref_9941"><a href="#prod-Elision">Elision</a></emu-nt>; if <emu-nt id="_ref_9942"><a href="#prod-Elision">Elision</a></emu-nt> is not present, use the numeric value zero.</li><li>Perform <emu-xref aoid="Set" id="_ref_3192"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>array</var>, <code>"length"</code>, <emu-xref aoid="ToUint32" id="_ref_3193"><a href="#sec-touint32">ToUint32</a></emu-xref>(<var>padding</var> + <var>len</var>), <emu-val>false</emu-val>).</li><li>NOTE: The above Set cannot fail because of the nature of the object returned by <emu-xref aoid="ArrayCreate" id="_ref_3194"><a href="#sec-arraycreate">ArrayCreate</a></emu-xref>.</li><li>Return <var>array</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-object-initializer">
<h1><span class="secnum">12.2.6</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 property keys 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="#prod-ObjectLiteral">ObjectLiteral</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><emu-t>{</emu-t><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="4200417f"><emu-t>{</emu-t><emu-nt params="?Yield, ?Await" id="_ref_9943"><a href="#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="0731c59c"><emu-t>{</emu-t><emu-nt params="?Yield, ?Await" id="_ref_9944"><a href="#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="#prod-PropertyDefinitionList">PropertyDefinitionList</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="9b4b46b6"><emu-nt params="?Yield, ?Await" id="_ref_9945"><a href="#prod-PropertyDefinition">PropertyDefinition</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="afd4e913"><emu-nt params="?Yield, ?Await" id="_ref_9946"><a href="#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_9947"><a href="#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="#prod-PropertyDefinition">PropertyDefinition</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0e54a070"><emu-nt params="?Yield, ?Await" id="_ref_9948"><a href="#prod-IdentifierReference">IdentifierReference</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="68f5ac08"><emu-nt params="?Yield, ?Await" id="_ref_9949"><a href="#prod-CoverInitializedName">CoverInitializedName</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="e73ae371"><emu-nt params="?Yield, ?Await" id="_ref_9950"><a href="#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_9951"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="91edbff4"><emu-nt params="?Yield, ?Await" id="_ref_9952"><a href="#prod-MethodDefinition">MethodDefinition</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="b623b4c8"><emu-t>...</emu-t><emu-nt params="+In, ?Yield, ?Await" id="_ref_9953"><a href="#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="#prod-PropertyName">PropertyName</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e71e2304"><emu-nt id="_ref_9954"><a href="#prod-LiteralPropertyName">LiteralPropertyName</a></emu-nt></emu-rhs>
<emu-rhs a="5f44b65f"><emu-nt params="?Yield, ?Await" id="_ref_9955"><a href="#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="#prod-LiteralPropertyName">LiteralPropertyName</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0ebb31e2"><emu-nt id="_ref_9956"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
<emu-rhs a="5c74e54d"><emu-nt id="_ref_9957"><a href="#prod-StringLiteral">StringLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="a548b407"><emu-nt id="_ref_9958"><a href="#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="#prod-ComputedPropertyName">ComputedPropertyName</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e3cff7e5"><emu-t>[</emu-t><emu-nt params="+In, ?Yield, ?Await" id="_ref_9959"><a href="#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="#prod-CoverInitializedName">CoverInitializedName</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="85c0d9fd"><emu-nt params="?Yield, ?Await" id="_ref_9960"><a href="#prod-IdentifierReference">IdentifierReference</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt params="+In, ?Yield, ?Await" id="_ref_9961"><a href="#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="#prod-Initializer">Initializer</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="dc616ce5"><emu-t>=</emu-t><emu-nt params="?In, ?Yield, ?Await" id="_ref_9962"><a href="#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_9963"><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt> is defined in <emu-xref href="#sec-method-definitions" id="_ref_308"><a href="#sec-method-definitions">14.3</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_9964"><a href="#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> is used as a cover grammar for a more restricted secondary grammar. The <emu-nt id="_ref_9965"><a href="#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_9966"><a href="#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> is expected.</p>
</div></emu-note>
<emu-clause id="sec-object-initializer-static-semantics-early-errors">
<h1><span class="secnum">12.2.6.1</span>Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="PropertyDefinition" collapsed="">
<emu-nt><a href="#prod-PropertyDefinition">PropertyDefinition</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4bc22514"><emu-nt id="_ref_9967"><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if HasDirectSuper of <emu-nt id="_ref_9968"><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt> is <emu-val>true</emu-val>.
</li>
</ul>
<p>In addition to describing an actual object initializer the <emu-nt id="_ref_9969"><a href="#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> productions are also used as a cover grammar for <emu-nt id="_ref_9970"><a href="#prod-ObjectAssignmentPattern">ObjectAssignmentPattern</a></emu-nt> and may be recognized as part of a <emu-nt id="_ref_9971"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt>. When <emu-nt id="_ref_9972"><a href="#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> appears in a context where <emu-nt id="_ref_9973"><a href="#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_9974"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt> or <emu-nt id="_ref_9975"><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt>.</p>
<emu-grammar><emu-production name="PropertyDefinition" collapsed="">
<emu-nt><a href="#prod-PropertyDefinition">PropertyDefinition</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="df01ba41"><emu-nt id="_ref_9976"><a href="#prod-CoverInitializedName">CoverInitializedName</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
Always throw a Syntax Error if code matches this production.
</li>
</ul>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>This production exists so that <emu-nt id="_ref_9977"><a href="#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> can serve as a cover grammar for <emu-nt id="_ref_9978"><a href="#prod-ObjectAssignmentPattern">ObjectAssignmentPattern</a></emu-nt>. It cannot occur in an actual object initializer.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-object-initializer-static-semantics-computedpropertycontains">
<h1><span class="secnum">12.2.6.2</span>Static Semantics: ComputedPropertyContains</h1>
<p>With parameter <var>symbol</var>.</p>
<emu-see-also-para op="ComputedPropertyContains"></emu-see-also-para>
<emu-grammar><emu-production name="PropertyName" collapsed="">
<emu-nt><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e71e2304"><emu-nt id="_ref_9979"><a href="#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="#prod-PropertyName">PropertyName</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="34832631"><emu-nt id="_ref_9980"><a href="#prod-ComputedPropertyName">ComputedPropertyName</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the result of <emu-nt id="_ref_9981"><a href="#prod-ComputedPropertyName">ComputedPropertyName</a></emu-nt> Contains <var>symbol</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-object-initializer-static-semantics-contains">
<h1><span class="secnum">12.2.6.3</span>Static Semantics: Contains</h1>
<p>With parameter <var>symbol</var>.</p>
<emu-see-also-para op="Contains"></emu-see-also-para>
<emu-grammar><emu-production name="PropertyDefinition" collapsed="">
<emu-nt><a href="#prod-PropertyDefinition">PropertyDefinition</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4bc22514"><emu-nt id="_ref_9982"><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <var>symbol</var> is <emu-nt id="_ref_9983"><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt>, return <emu-val>true</emu-val>.</li><li>Return the result of ComputedPropertyContains for <emu-nt id="_ref_9984"><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt> with argument <var>symbol</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Static semantic rules that depend upon substructure generally do not look into function definitions.</p>
</div></emu-note>
<emu-grammar><emu-production name="LiteralPropertyName" collapsed="">
<emu-nt><a href="#prod-LiteralPropertyName">LiteralPropertyName</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0ebb31e2"><emu-nt id="_ref_9985"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <var>symbol</var> is a <emu-nt id="_ref_9986"><a href="#prod-ReservedWord">ReservedWord</a></emu-nt>, return <emu-val>false</emu-val>.</li><li>If <var>symbol</var> is an <emu-nt id="_ref_9987"><a href="#prod-Identifier">Identifier</a></emu-nt> and StringValue of <var>symbol</var> is the same value as the StringValue of <emu-nt id="_ref_9988"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt>, return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-static-semantics-iscomputedpropertykey">
<h1><span class="secnum">12.2.6.4</span>Static Semantics: IsComputedPropertyKey</h1>
<emu-grammar><emu-production name="PropertyName" collapsed="">
<emu-nt><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e71e2304"><emu-nt id="_ref_9989"><a href="#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="#prod-PropertyName">PropertyName</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="34832631"><emu-nt id="_ref_9990"><a href="#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-object-initializer-static-semantics-propname">
<h1><span class="secnum">12.2.6.5</span>Static Semantics: PropName</h1>
<emu-see-also-para op="PropName"></emu-see-also-para>
<emu-grammar><emu-production name="PropertyDefinition" collapsed="">
<emu-nt><a href="#prod-PropertyDefinition">PropertyDefinition</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="2361f19d"><emu-nt id="_ref_9991"><a href="#prod-IdentifierReference">IdentifierReference</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return StringValue of <emu-nt id="_ref_9992"><a href="#prod-IdentifierReference">IdentifierReference</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="PropertyDefinition" collapsed="">
<emu-nt><a href="#prod-PropertyDefinition">PropertyDefinition</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5bb8853e"><emu-t>...</emu-t><emu-nt id="_ref_9993"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-const>empty</emu-const>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="PropertyDefinition" collapsed="">
<emu-nt><a href="#prod-PropertyDefinition">PropertyDefinition</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f2d90b76"><emu-nt id="_ref_9994"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>:</emu-t><emu-nt id="_ref_9995"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return PropName of <emu-nt id="_ref_9996"><a href="#prod-PropertyName">PropertyName</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="LiteralPropertyName" collapsed="">
<emu-nt><a href="#prod-LiteralPropertyName">LiteralPropertyName</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0ebb31e2"><emu-nt id="_ref_9997"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return StringValue of <emu-nt id="_ref_9998"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="LiteralPropertyName" collapsed="">
<emu-nt><a href="#prod-LiteralPropertyName">LiteralPropertyName</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5c74e54d"><emu-nt id="_ref_9999"><a href="#prod-StringLiteral">StringLiteral</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the String value whose code units are the SV of the <emu-nt id="_ref_10000"><a href="#prod-StringLiteral">StringLiteral</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="LiteralPropertyName" collapsed="">
<emu-nt><a href="#prod-LiteralPropertyName">LiteralPropertyName</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a548b407"><emu-nt id="_ref_10001"><a href="#prod-NumericLiteral">NumericLiteral</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>nbr</var> be the result of forming the value of the <emu-nt id="_ref_10002"><a href="#prod-NumericLiteral">NumericLiteral</a></emu-nt>.</li><li>Return !&nbsp;<emu-xref aoid="ToString" id="_ref_3195"><a href="#sec-tostring">ToString</a></emu-xref>(<var>nbr</var>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="ComputedPropertyName" collapsed="">
<emu-nt><a href="#prod-ComputedPropertyName">ComputedPropertyName</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="2ed5550b"><emu-t>[</emu-t><emu-nt id="_ref_10003"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>]</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-const>empty</emu-const>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-static-semantics-propertynamelist">
<h1><span class="secnum">12.2.6.6</span>Static Semantics: PropertyNameList</h1>
<emu-grammar><emu-production name="PropertyDefinitionList" collapsed="">
<emu-nt><a href="#prod-PropertyDefinitionList">PropertyDefinitionList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="671a051b"><emu-nt id="_ref_10004"><a href="#prod-PropertyDefinition">PropertyDefinition</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If PropName of <emu-nt id="_ref_10005"><a href="#prod-PropertyDefinition">PropertyDefinition</a></emu-nt> is <emu-const>empty</emu-const>, return a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3196"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Return a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3197"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing PropName of <emu-nt id="_ref_10006"><a href="#prod-PropertyDefinition">PropertyDefinition</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="PropertyDefinitionList" collapsed="">
<emu-nt><a href="#prod-PropertyDefinitionList">PropertyDefinitionList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="3152d601"><emu-nt id="_ref_10007"><a href="#prod-PropertyDefinitionList">PropertyDefinitionList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_10008"><a href="#prod-PropertyDefinition">PropertyDefinition</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>list</var> be PropertyNameList of <emu-nt id="_ref_10009"><a href="#prod-PropertyDefinitionList">PropertyDefinitionList</a></emu-nt>.</li><li>If PropName of <emu-nt id="_ref_10010"><a href="#prod-PropertyDefinition">PropertyDefinition</a></emu-nt> is <emu-const>empty</emu-const>, return <var>list</var>.</li><li>Append PropName of <emu-nt id="_ref_10011"><a href="#prod-PropertyDefinition">PropertyDefinition</a></emu-nt> to the end of <var>list</var>.</li><li>Return <var>list</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-object-initializer-runtime-semantics-evaluation">
<h1><span class="secnum">12.2.6.7</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="ObjectLiteral" collapsed="">
<emu-nt><a href="#prod-ObjectLiteral">ObjectLiteral</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><emu-t>{</emu-t><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-xref aoid="ObjectCreate" id="_ref_3198"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_3199"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="ObjectLiteral">
<emu-nt><a href="#prod-ObjectLiteral">ObjectLiteral</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1bef8ed3"><emu-t>{</emu-t><emu-nt id="_ref_10012"><a href="#prod-PropertyDefinitionList">PropertyDefinitionList</a></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="8703527f"><emu-t>{</emu-t><emu-nt id="_ref_10013"><a href="#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="ObjectCreate" id="_ref_3200"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_3201"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>).</li><li>Perform ? PropertyDefinitionEvaluation of <emu-nt id="_ref_10014"><a href="#prod-PropertyDefinitionList">PropertyDefinitionList</a></emu-nt> with arguments <var>obj</var> and <emu-val>true</emu-val>.</li><li>Return <var>obj</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="LiteralPropertyName" collapsed="">
<emu-nt><a href="#prod-LiteralPropertyName">LiteralPropertyName</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0ebb31e2"><emu-nt id="_ref_10015"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return StringValue of <emu-nt id="_ref_10016"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="LiteralPropertyName" collapsed="">
<emu-nt><a href="#prod-LiteralPropertyName">LiteralPropertyName</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5c74e54d"><emu-nt id="_ref_10017"><a href="#prod-StringLiteral">StringLiteral</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the String value whose code units are the SV of the <emu-nt id="_ref_10018"><a href="#prod-StringLiteral">StringLiteral</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="LiteralPropertyName" collapsed="">
<emu-nt><a href="#prod-LiteralPropertyName">LiteralPropertyName</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a548b407"><emu-nt id="_ref_10019"><a href="#prod-NumericLiteral">NumericLiteral</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>nbr</var> be the result of forming the value of the <emu-nt id="_ref_10020"><a href="#prod-NumericLiteral">NumericLiteral</a></emu-nt>.</li><li>Return !&nbsp;<emu-xref aoid="ToString" id="_ref_3202"><a href="#sec-tostring">ToString</a></emu-xref>(<var>nbr</var>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="ComputedPropertyName" collapsed="">
<emu-nt><a href="#prod-ComputedPropertyName">ComputedPropertyName</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="2ed5550b"><emu-t>[</emu-t><emu-nt id="_ref_10021"><a href="#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 the result of evaluating <emu-nt id="_ref_10022"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Let <var>propName</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3203"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>exprValue</var>).</li><li>Return ?&nbsp;<emu-xref aoid="ToPropertyKey" id="_ref_3204"><a href="#sec-topropertykey">ToPropertyKey</a></emu-xref>(<var>propName</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-object-initializer-runtime-semantics-propertydefinitionevaluation">
<h1><span class="secnum">12.2.6.8</span>Runtime Semantics: PropertyDefinitionEvaluation</h1>
<p>With parameters <var>object</var> and <var>enumerable</var>.</p>
<emu-see-also-para op="PropertyDefinitionEvaluation"></emu-see-also-para>
<emu-grammar><emu-production name="PropertyDefinitionList" collapsed="">
<emu-nt><a href="#prod-PropertyDefinitionList">PropertyDefinitionList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="3152d601"><emu-nt id="_ref_10023"><a href="#prod-PropertyDefinitionList">PropertyDefinitionList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_10024"><a href="#prod-PropertyDefinition">PropertyDefinition</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Perform ? PropertyDefinitionEvaluation of <emu-nt id="_ref_10025"><a href="#prod-PropertyDefinitionList">PropertyDefinitionList</a></emu-nt> with arguments <var>object</var> and <var>enumerable</var>.</li><li>Return the result of performing PropertyDefinitionEvaluation of <emu-nt id="_ref_10026"><a href="#prod-PropertyDefinition">PropertyDefinition</a></emu-nt> with arguments <var>object</var> and <var>enumerable</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="PropertyDefinition" collapsed="">
<emu-nt><a href="#prod-PropertyDefinition">PropertyDefinition</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5bb8853e"><emu-t>...</emu-t><emu-nt id="_ref_10027"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>exprValue</var> be the result of evaluating <emu-nt id="_ref_10028"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Let <var>fromValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3205"><a href="#sec-getvalue">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_3206"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Return ?&nbsp;<emu-xref aoid="CopyDataProperties" id="_ref_3207"><a href="#sec-copydataproperties">CopyDataProperties</a></emu-xref>(<var>object</var>, <var>fromValue</var>, <var>excludedNames</var>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="PropertyDefinition" collapsed="">
<emu-nt><a href="#prod-PropertyDefinition">PropertyDefinition</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="2361f19d"><emu-nt id="_ref_10029"><a href="#prod-IdentifierReference">IdentifierReference</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>propName</var> be StringValue of <emu-nt id="_ref_10030"><a href="#prod-IdentifierReference">IdentifierReference</a></emu-nt>.</li><li>Let <var>exprValue</var> be the result of evaluating <emu-nt id="_ref_10031"><a href="#prod-IdentifierReference">IdentifierReference</a></emu-nt>.</li><li>Let <var>propValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3208"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>exprValue</var>).</li><li><emu-xref href="#assert" id="_ref_3209"><a href="#assert">Assert</a></emu-xref>: <var>enumerable</var> is <emu-val>true</emu-val>.</li><li><emu-xref href="#assert" id="_ref_3210"><a href="#assert">Assert</a></emu-xref>: <var>object</var> is an ordinary, extensible object with no non-configurable properties.</li><li>Return !&nbsp;<emu-xref aoid="CreateDataPropertyOrThrow" id="_ref_3211"><a href="#sec-createdatapropertyorthrow">CreateDataPropertyOrThrow</a></emu-xref>(<var>object</var>, <var>propName</var>, <var>propValue</var>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="PropertyDefinition" collapsed="">
<emu-nt><a href="#prod-PropertyDefinition">PropertyDefinition</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f2d90b76"><emu-nt id="_ref_10032"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>:</emu-t><emu-nt id="_ref_10033"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>propKey</var> be the result of evaluating <emu-nt id="_ref_10034"><a href="#prod-PropertyName">PropertyName</a></emu-nt>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3212"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>propKey</var>).</li><li>If <emu-xref aoid="IsAnonymousFunctionDefinition" id="_ref_3213"><a href="#sec-isanonymousfunctiondefinition">IsAnonymousFunctionDefinition</a></emu-xref>(<emu-nt id="_ref_10035"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>) is <emu-val>true</emu-val>, then<ol><li>Let <var>propValue</var> be the result of performing NamedEvaluation for <emu-nt id="_ref_10036"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt> with argument <var>propKey</var>.</li></ol></li><li>Else,<ol><li>Let <var>exprValueRef</var> be the result of evaluating <emu-nt id="_ref_10037"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Let <var>propValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3214"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>exprValueRef</var>).</li></ol></li><li><emu-xref href="#assert" id="_ref_3215"><a href="#assert">Assert</a></emu-xref>: <var>enumerable</var> is <emu-val>true</emu-val>.</li><li><emu-xref href="#assert" id="_ref_3216"><a href="#assert">Assert</a></emu-xref>: <var>object</var> is an ordinary, extensible object with no non-configurable properties.</li><li>Return !&nbsp;<emu-xref aoid="CreateDataPropertyOrThrow" id="_ref_3217"><a href="#sec-createdatapropertyorthrow">CreateDataPropertyOrThrow</a></emu-xref>(<var>object</var>, <var>propKey</var>, <var>propValue</var>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>An alternative semantics for this production is given in <emu-xref href="#sec-__proto__-property-names-in-object-initializers" id="_ref_309"><a href="#sec-__proto__-property-names-in-object-initializers">B.3.1</a></emu-xref>.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-function-defining-expressions">
<h1><span class="secnum">12.2.7</span>Function Defining Expressions</h1>
<p>See <emu-xref href="#sec-function-definitions" id="_ref_310"><a href="#sec-function-definitions">14.1</a></emu-xref> for <emu-grammar><emu-production name="PrimaryExpression" collapsed="" class=" inline">
<emu-nt><a href="#prod-PrimaryExpression">PrimaryExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="242eeccd"><emu-nt id="_ref_10038"><a href="#prod-FunctionExpression">FunctionExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>.</p>
<p>See <emu-xref href="#sec-generator-function-definitions" id="_ref_311"><a href="#sec-generator-function-definitions">14.4</a></emu-xref> for <emu-grammar><emu-production name="PrimaryExpression" collapsed="" class=" inline">
<emu-nt><a href="#prod-PrimaryExpression">PrimaryExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="abb7f7f4"><emu-nt id="_ref_10039"><a href="#prod-GeneratorExpression">GeneratorExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>.</p>
<p>See <emu-xref href="#sec-class-definitions" id="_ref_312"><a href="#sec-class-definitions">14.6</a></emu-xref> for <emu-grammar><emu-production name="PrimaryExpression" collapsed="" class=" inline">
<emu-nt><a href="#prod-PrimaryExpression">PrimaryExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d8ce6db1"><emu-nt id="_ref_10040"><a href="#prod-ClassExpression">ClassExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>.</p>
<p>See <emu-xref href="#sec-async-function-definitions" id="_ref_313"><a href="#sec-async-function-definitions">14.7</a></emu-xref> for <emu-grammar><emu-production name="PrimaryExpression" collapsed="" class=" inline">
<emu-nt><a href="#prod-PrimaryExpression">PrimaryExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ad589bb4"><emu-nt id="_ref_10041"><a href="#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_314"><a href="#sec-async-generator-function-definitions">14.5</a></emu-xref> for <emu-grammar><emu-production name="PrimaryExpression" collapsed="" class=" inline">
<emu-nt><a href="#prod-PrimaryExpression">PrimaryExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="3403ed46"><emu-nt id="_ref_10042"><a href="#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">12.2.8</span>Regular Expression Literals</h1>
<h2>Syntax</h2>
<p>See <emu-xref href="#sec-literals-regular-expression-literals" id="_ref_315"><a href="#sec-literals-regular-expression-literals">11.8.5</a></emu-xref>.</p>
<emu-clause id="sec-primary-expression-regular-expression-literals-static-semantics-early-errors">
<h1><span class="secnum">12.2.8.1</span>Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="PrimaryExpression" collapsed="">
<emu-nt><a href="#prod-PrimaryExpression">PrimaryExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="31b672e8"><emu-nt id="_ref_10043"><a href="#prod-RegularExpressionLiteral">RegularExpressionLiteral</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if BodyText of <emu-nt id="_ref_10044"><a href="#prod-RegularExpressionLiteral">RegularExpressionLiteral</a></emu-nt> cannot be recognized using the <emu-xref href="#sec-context-free-grammars" id="_ref_3218"><a href="#sec-context-free-grammars">goal symbol</a></emu-xref> <emu-nt id="_ref_10045"><a href="#prod-Pattern">Pattern</a></emu-nt> of the ECMAScript RegExp grammar specified in <emu-xref href="#sec-patterns" id="_ref_316"><a href="#sec-patterns">21.2.1</a></emu-xref>.
</li>
<li>
It is a Syntax Error if FlagText of <emu-nt id="_ref_10046"><a href="#prod-RegularExpressionLiteral">RegularExpressionLiteral</a></emu-nt> contains any code points other than <code>"g"</code>, <code>"i"</code>, <code>"m"</code>, <code>"s"</code>, <code>"u"</code>, or <code>"y"</code>, or if it contains the same code point more than once.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-regular-expression-literals-runtime-semantics-evaluation">
<h1><span class="secnum">12.2.8.2</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="PrimaryExpression" collapsed="">
<emu-nt><a href="#prod-PrimaryExpression">PrimaryExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="31b672e8"><emu-nt id="_ref_10047"><a href="#prod-RegularExpressionLiteral">RegularExpressionLiteral</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>pattern</var> be the String value consisting of the <emu-xref aoid="UTF16Encoding" id="_ref_3219"><a href="#sec-utf16encoding">UTF16Encoding</a></emu-xref> of each code point of BodyText of <emu-nt id="_ref_10048"><a href="#prod-RegularExpressionLiteral">RegularExpressionLiteral</a></emu-nt>.</li><li>Let <var>flags</var> be the String value consisting of the <emu-xref aoid="UTF16Encoding" id="_ref_3220"><a href="#sec-utf16encoding">UTF16Encoding</a></emu-xref> of each code point of FlagText of <emu-nt id="_ref_10049"><a href="#prod-RegularExpressionLiteral">RegularExpressionLiteral</a></emu-nt>.</li><li>Return <emu-xref aoid="RegExpCreate" id="_ref_3221"><a href="#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">12.2.9</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="#prod-TemplateLiteral">TemplateLiteral</a><emu-mods><emu-params>[Yield, Await, Tagged]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="7bf3ad2b"><emu-nt id="_ref_10050"><a href="#prod-NoSubstitutionTemplate">NoSubstitutionTemplate</a></emu-nt></emu-rhs>
<emu-rhs a="f1a0e47a"><emu-nt params="?Yield, ?Await, ?Tagged" id="_ref_10051"><a href="#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="#prod-SubstitutionTemplate">SubstitutionTemplate</a><emu-mods><emu-params>[Yield, Await, Tagged]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="069aff93"><emu-nt id="_ref_10052"><a href="#prod-TemplateHead">TemplateHead</a></emu-nt><emu-nt params="+In, ?Yield, ?Await" id="_ref_10053"><a href="#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_10054"><a href="#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="#prod-TemplateSpans">TemplateSpans</a><emu-mods><emu-params>[Yield, Await, Tagged]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="57fe6188"><emu-nt id="_ref_10055"><a href="#prod-TemplateTail">TemplateTail</a></emu-nt></emu-rhs>
<emu-rhs a="de941338"><emu-nt params="?Yield, ?Await, ?Tagged" id="_ref_10056"><a href="#prod-TemplateMiddleList">TemplateMiddleList</a><emu-mods><emu-params>[?Yield, ?Await, ?Tagged]</emu-params></emu-mods></emu-nt><emu-nt id="_ref_10057"><a href="#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="#prod-TemplateMiddleList">TemplateMiddleList</a><emu-mods><emu-params>[Yield, Await, Tagged]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="db7fc148"><emu-nt id="_ref_10058"><a href="#prod-TemplateMiddle">TemplateMiddle</a></emu-nt><emu-nt params="+In, ?Yield, ?Await" id="_ref_10059"><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="6dd46bd2"><emu-nt params="?Yield, ?Await, ?Tagged" id="_ref_10060"><a href="#prod-TemplateMiddleList">TemplateMiddleList</a><emu-mods><emu-params>[?Yield, ?Await, ?Tagged]</emu-params></emu-mods></emu-nt><emu-nt id="_ref_10061"><a href="#prod-TemplateMiddle">TemplateMiddle</a></emu-nt><emu-nt params="+In, ?Yield, ?Await" id="_ref_10062"><a href="#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">12.2.9.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="#prod-TemplateLiteral">TemplateLiteral</a><emu-mods><emu-params>[Yield, Await, Tagged]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="7bf3ad2b"><emu-nt id="_ref_10063"><a href="#prod-NoSubstitutionTemplate">NoSubstitutionTemplate</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if the number of elements in the result of TemplateStrings of <emu-nt id="_ref_10064"><a href="#prod-TemplateLiteral">TemplateLiteral</a></emu-nt> with argument <emu-val>false</emu-val> is greater than 2<sup>32</sup> - 1.
</li>
<li>
It is a Syntax Error if the <sub>[Tagged]</sub> parameter was not set and <emu-nt id="_ref_10065"><a href="#prod-NoSubstitutionTemplate">NoSubstitutionTemplate</a></emu-nt> Contains <emu-nt id="_ref_10066"><a href="#prod-NotEscapeSequence">NotEscapeSequence</a></emu-nt>.
</li>
</ul>
<emu-grammar><emu-production name="SubstitutionTemplate" params="Yield, Await, Tagged" collapsed="">
<emu-nt params="Yield, Await, Tagged"><a href="#prod-SubstitutionTemplate">SubstitutionTemplate</a><emu-mods><emu-params>[Yield, Await, Tagged]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="069aff93"><emu-nt id="_ref_10067"><a href="#prod-TemplateHead">TemplateHead</a></emu-nt><emu-nt params="+In, ?Yield, ?Await" id="_ref_10068"><a href="#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_10069"><a href="#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_10070"><a href="#prod-TemplateHead">TemplateHead</a></emu-nt> Contains <emu-nt id="_ref_10071"><a href="#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="#prod-TemplateSpans">TemplateSpans</a><emu-mods><emu-params>[Yield, Await, Tagged]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="57fe6188"><emu-nt id="_ref_10072"><a href="#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_10073"><a href="#prod-TemplateTail">TemplateTail</a></emu-nt> Contains <emu-nt id="_ref_10074"><a href="#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="#prod-TemplateMiddleList">TemplateMiddleList</a><emu-mods><emu-params>[Yield, Await, Tagged]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="db7fc148"><emu-nt id="_ref_10075"><a href="#prod-TemplateMiddle">TemplateMiddle</a></emu-nt><emu-nt params="+In, ?Yield, ?Await" id="_ref_10076"><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="6dd46bd2"><emu-nt params="?Yield, ?Await, ?Tagged" id="_ref_10077"><a href="#prod-TemplateMiddleList">TemplateMiddleList</a><emu-mods><emu-params>[?Yield, ?Await, ?Tagged]</emu-params></emu-mods></emu-nt><emu-nt id="_ref_10078"><a href="#prod-TemplateMiddle">TemplateMiddle</a></emu-nt><emu-nt params="+In, ?Yield, ?Await" id="_ref_10079"><a href="#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_10080"><a href="#prod-TemplateMiddle">TemplateMiddle</a></emu-nt> Contains <emu-nt id="_ref_10081"><a href="#prod-NotEscapeSequence">NotEscapeSequence</a></emu-nt>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-static-semantics-templatestrings">
<h1><span class="secnum">12.2.9.2</span>Static Semantics: TemplateStrings</h1>
<p>With parameter <var>raw</var>.</p>
<emu-grammar><emu-production name="TemplateLiteral" collapsed="">
<emu-nt><a href="#prod-TemplateLiteral">TemplateLiteral</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="7bf3ad2b"><emu-nt id="_ref_10082"><a href="#prod-NoSubstitutionTemplate">NoSubstitutionTemplate</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <var>raw</var> is <emu-val>false</emu-val>, then<ol><li>Let <var>string</var> be the TV of <emu-nt id="_ref_10083"><a href="#prod-NoSubstitutionTemplate">NoSubstitutionTemplate</a></emu-nt>.</li></ol></li><li>Else,<ol><li>Let <var>string</var> be the TRV of <emu-nt id="_ref_10084"><a href="#prod-NoSubstitutionTemplate">NoSubstitutionTemplate</a></emu-nt>.</li></ol></li><li>Return a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3222"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing the single element, <var>string</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="SubstitutionTemplate" collapsed="">
<emu-nt><a href="#prod-SubstitutionTemplate">SubstitutionTemplate</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="be95cc40"><emu-nt id="_ref_10085"><a href="#prod-TemplateHead">TemplateHead</a></emu-nt><emu-nt id="_ref_10086"><a href="#prod-Expression">Expression</a></emu-nt><emu-nt id="_ref_10087"><a href="#prod-TemplateSpans">TemplateSpans</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <var>raw</var> is <emu-val>false</emu-val>, then<ol><li>Let <var>head</var> be the TV of <emu-nt id="_ref_10088"><a href="#prod-TemplateHead">TemplateHead</a></emu-nt>.</li></ol></li><li>Else,<ol><li>Let <var>head</var> be the TRV of <emu-nt id="_ref_10089"><a href="#prod-TemplateHead">TemplateHead</a></emu-nt>.</li></ol></li><li>Let <var>tail</var> be TemplateStrings of <emu-nt id="_ref_10090"><a href="#prod-TemplateSpans">TemplateSpans</a></emu-nt> with argument <var>raw</var>.</li><li>Return a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3223"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing <var>head</var> followed by the elements, in order, of <var>tail</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="TemplateSpans" collapsed="">
<emu-nt><a href="#prod-TemplateSpans">TemplateSpans</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="57fe6188"><emu-nt id="_ref_10091"><a href="#prod-TemplateTail">TemplateTail</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <var>raw</var> is <emu-val>false</emu-val>, then<ol><li>Let <var>tail</var> be the TV of <emu-nt id="_ref_10092"><a href="#prod-TemplateTail">TemplateTail</a></emu-nt>.</li></ol></li><li>Else,<ol><li>Let <var>tail</var> be the TRV of <emu-nt id="_ref_10093"><a href="#prod-TemplateTail">TemplateTail</a></emu-nt>.</li></ol></li><li>Return a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3224"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing the single element, <var>tail</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="TemplateSpans" collapsed="">
<emu-nt><a href="#prod-TemplateSpans">TemplateSpans</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b0b4f425"><emu-nt id="_ref_10094"><a href="#prod-TemplateMiddleList">TemplateMiddleList</a></emu-nt><emu-nt id="_ref_10095"><a href="#prod-TemplateTail">TemplateTail</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>middle</var> be TemplateStrings of <emu-nt id="_ref_10096"><a href="#prod-TemplateMiddleList">TemplateMiddleList</a></emu-nt> with argument <var>raw</var>.</li><li>If <var>raw</var> is <emu-val>false</emu-val>, then<ol><li>Let <var>tail</var> be the TV of <emu-nt id="_ref_10097"><a href="#prod-TemplateTail">TemplateTail</a></emu-nt>.</li></ol></li><li>Else,<ol><li>Let <var>tail</var> be the TRV of <emu-nt id="_ref_10098"><a href="#prod-TemplateTail">TemplateTail</a></emu-nt>.</li></ol></li><li>Return a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3225"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing the elements, in order, of <var>middle</var> followed by <var>tail</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="TemplateMiddleList" collapsed="">
<emu-nt><a href="#prod-TemplateMiddleList">TemplateMiddleList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="dc7ec961"><emu-nt id="_ref_10099"><a href="#prod-TemplateMiddle">TemplateMiddle</a></emu-nt><emu-nt id="_ref_10100"><a href="#prod-Expression">Expression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <var>raw</var> is <emu-val>false</emu-val>, then<ol><li>Let <var>string</var> be the TV of <emu-nt id="_ref_10101"><a href="#prod-TemplateMiddle">TemplateMiddle</a></emu-nt>.</li></ol></li><li>Else,<ol><li>Let <var>string</var> be the TRV of <emu-nt id="_ref_10102"><a href="#prod-TemplateMiddle">TemplateMiddle</a></emu-nt>.</li></ol></li><li>Return a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3226"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing the single element, <var>string</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="TemplateMiddleList" collapsed="">
<emu-nt><a href="#prod-TemplateMiddleList">TemplateMiddleList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="47acf041"><emu-nt id="_ref_10103"><a href="#prod-TemplateMiddleList">TemplateMiddleList</a></emu-nt><emu-nt id="_ref_10104"><a href="#prod-TemplateMiddle">TemplateMiddle</a></emu-nt><emu-nt id="_ref_10105"><a href="#prod-Expression">Expression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>front</var> be TemplateStrings of <emu-nt id="_ref_10106"><a href="#prod-TemplateMiddleList">TemplateMiddleList</a></emu-nt> with argument <var>raw</var>.</li><li>If <var>raw</var> is <emu-val>false</emu-val>, then<ol><li>Let <var>last</var> be the TV of <emu-nt id="_ref_10107"><a href="#prod-TemplateMiddle">TemplateMiddle</a></emu-nt>.</li></ol></li><li>Else,<ol><li>Let <var>last</var> be the TRV of <emu-nt id="_ref_10108"><a href="#prod-TemplateMiddle">TemplateMiddle</a></emu-nt>.</li></ol></li><li>Append <var>last</var> as the last element of the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3227"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> <var>front</var>.</li><li>Return <var>front</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-template-literals-runtime-semantics-argumentlistevaluation">
<h1><span class="secnum">12.2.9.3</span>Runtime Semantics: ArgumentListEvaluation</h1>
<emu-see-also-para op="ArgumentListEvaluation"></emu-see-also-para>
<emu-grammar><emu-production name="TemplateLiteral" collapsed="">
<emu-nt><a href="#prod-TemplateLiteral">TemplateLiteral</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="7bf3ad2b"><emu-nt id="_ref_10109"><a href="#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_10110"><a href="#prod-TemplateLiteral">TemplateLiteral</a></emu-nt>.</li><li>Let <var>siteObj</var> be <emu-xref aoid="GetTemplateObject" id="_ref_3228"><a href="#sec-gettemplateobject">GetTemplateObject</a></emu-xref>(<var>templateLiteral</var>).</li><li>Return a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3229"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing the one element which is <var>siteObj</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="SubstitutionTemplate" collapsed="">
<emu-nt><a href="#prod-SubstitutionTemplate">SubstitutionTemplate</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="be95cc40"><emu-nt id="_ref_10111"><a href="#prod-TemplateHead">TemplateHead</a></emu-nt><emu-nt id="_ref_10112"><a href="#prod-Expression">Expression</a></emu-nt><emu-nt id="_ref_10113"><a href="#prod-TemplateSpans">TemplateSpans</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>templateLiteral</var> be this <emu-nt id="_ref_10114"><a href="#prod-TemplateLiteral">TemplateLiteral</a></emu-nt>.</li><li>Let <var>siteObj</var> be <emu-xref aoid="GetTemplateObject" id="_ref_3230"><a href="#sec-gettemplateobject">GetTemplateObject</a></emu-xref>(<var>templateLiteral</var>).</li><li>Let <var>firstSubRef</var> be the result of evaluating <emu-nt id="_ref_10115"><a href="#prod-Expression">Expression</a></emu-nt>.</li><li>Let <var>firstSub</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3231"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>firstSubRef</var>).</li><li>Let <var>restSub</var> be SubstitutionEvaluation of <emu-nt id="_ref_10116"><a href="#prod-TemplateSpans">TemplateSpans</a></emu-nt>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3232"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>restSub</var>).</li><li><emu-xref href="#assert" id="_ref_3233"><a href="#assert">Assert</a></emu-xref>: <var>restSub</var> is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3234"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Return a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3235"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> whose first element is <var>siteObj</var>, whose second elements is <var>firstSub</var>, and whose subsequent elements are the elements of <var>restSub</var>, in order. <var>restSub</var> may contain no elements.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-gettemplateobject" aoid="GetTemplateObject">
<h1><span class="secnum">12.2.9.4</span>Runtime Semantics: GetTemplateObject ( <var>templateLiteral</var> )</h1>
<p>The abstract operation GetTemplateObject is called with a <emu-xref href="#sec-syntactic-grammar" id="_ref_3236"><a href="#sec-syntactic-grammar">Parse Node</a></emu-xref>, <var>templateLiteral</var>, as an argument. It performs the following steps:</p>
<emu-alg><ol><li>Let <var>rawStrings</var> be TemplateStrings of <var>templateLiteral</var> with argument <emu-val>true</emu-val>.</li><li>Let <var>realm</var> be <emu-xref href="#current-realm" id="_ref_3237"><a href="#current-realm">the current Realm Record</a></emu-xref>.</li><li>Let <var>templateRegistry</var> be <var>realm</var>.[[TemplateMap]].</li><li>For each element <var>e</var> of <var>templateRegistry</var>, do<ol><li>If <var>e</var>.[[Site]] is <emu-xref href="#sec-syntactic-grammar" id="_ref_3238"><a href="#sec-syntactic-grammar">the same Parse Node</a></emu-xref> as <var>templateLiteral</var>, then<ol><li>Return <var>e</var>.[[Array]].</li></ol></li></ol></li><li>Let <var>cookedStrings</var> be TemplateStrings 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_3239"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> <var>cookedStrings</var>.</li><li><emu-xref href="#assert" id="_ref_3240"><a href="#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_3241"><a href="#sec-arraycreate">ArrayCreate</a></emu-xref>(<var>count</var>).</li><li>Let <var>rawObj</var> be !&nbsp;<emu-xref aoid="ArrayCreate" id="_ref_3242"><a href="#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_3243"><a href="#sec-tostring">ToString</a></emu-xref>(<var>index</var>).</li><li>Let <var>cookedValue</var> be the String value <var>cookedStrings</var>[<var>index</var>].</li><li>Call <var>template</var>.[[DefineOwnProperty]](<var>prop</var>, PropertyDescriptor { [[Value]]: <var>cookedValue</var>, [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>true</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }).</li><li>Let <var>rawValue</var> be the String value <var>rawStrings</var>[<var>index</var>].</li><li>Call <var>rawObj</var>.[[DefineOwnProperty]](<var>prop</var>, PropertyDescriptor { [[Value]]: <var>rawValue</var>, [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>true</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }).</li><li>Increase <var>index</var> by 1.</li></ol></li><li>Perform <emu-xref aoid="SetIntegrityLevel" id="_ref_3244"><a href="#sec-setintegritylevel">SetIntegrityLevel</a></emu-xref>(<var>rawObj</var>, <code>"frozen"</code>).</li><li>Call <var>template</var>.[[DefineOwnProperty]](<code>"raw"</code>, PropertyDescriptor { [[Value]]: <var>rawObj</var>, [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }).</li><li>Perform <emu-xref aoid="SetIntegrityLevel" id="_ref_3245"><a href="#sec-setintegritylevel">SetIntegrityLevel</a></emu-xref>(<var>template</var>, <code>"frozen"</code>).</li><li>Append the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3246"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Site]]: <var>templateLiteral</var>, [[Array]]: <var>template</var> } to <var>templateRegistry</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_3247"><a href="#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_10117"><a href="#prod-TemplateLiteral">TemplateLiteral</a></emu-nt> in the program code of a <emu-xref href="#realm" id="_ref_3248"><a href="#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_317"><a href="#sec-template-literals-runtime-semantics-evaluation">12.2.9.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_10118"><a href="#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">
<h1><span class="secnum">12.2.9.5</span>Runtime Semantics: SubstitutionEvaluation</h1>
<emu-grammar><emu-production name="TemplateSpans" collapsed="">
<emu-nt><a href="#prod-TemplateSpans">TemplateSpans</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="57fe6188"><emu-nt id="_ref_10119"><a href="#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_3249"><a href="#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="#prod-TemplateSpans">TemplateSpans</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b0b4f425"><emu-nt id="_ref_10120"><a href="#prod-TemplateMiddleList">TemplateMiddleList</a></emu-nt><emu-nt id="_ref_10121"><a href="#prod-TemplateTail">TemplateTail</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the result of SubstitutionEvaluation of <emu-nt id="_ref_10122"><a href="#prod-TemplateMiddleList">TemplateMiddleList</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="TemplateMiddleList" collapsed="">
<emu-nt><a href="#prod-TemplateMiddleList">TemplateMiddleList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="dc7ec961"><emu-nt id="_ref_10123"><a href="#prod-TemplateMiddle">TemplateMiddle</a></emu-nt><emu-nt id="_ref_10124"><a href="#prod-Expression">Expression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>subRef</var> be the result of evaluating <emu-nt id="_ref_10125"><a href="#prod-Expression">Expression</a></emu-nt>.</li><li>Let <var>sub</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3250"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>subRef</var>).</li><li>Return a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3251"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing only <var>sub</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="TemplateMiddleList" collapsed="">
<emu-nt><a href="#prod-TemplateMiddleList">TemplateMiddleList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="47acf041"><emu-nt id="_ref_10126"><a href="#prod-TemplateMiddleList">TemplateMiddleList</a></emu-nt><emu-nt id="_ref_10127"><a href="#prod-TemplateMiddle">TemplateMiddle</a></emu-nt><emu-nt id="_ref_10128"><a href="#prod-Expression">Expression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>preceding</var> be the result of SubstitutionEvaluation of <emu-nt id="_ref_10129"><a href="#prod-TemplateMiddleList">TemplateMiddleList</a></emu-nt>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3252"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>preceding</var>).</li><li>Let <var>nextRef</var> be the result of evaluating <emu-nt id="_ref_10130"><a href="#prod-Expression">Expression</a></emu-nt>.</li><li>Let <var>next</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3253"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>nextRef</var>).</li><li>Append <var>next</var> as the last element of the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3254"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> <var>preceding</var>.</li><li>Return <var>preceding</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-template-literals-runtime-semantics-evaluation">
<h1><span class="secnum">12.2.9.6</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="TemplateLiteral" collapsed="">
<emu-nt><a href="#prod-TemplateLiteral">TemplateLiteral</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="7bf3ad2b"><emu-nt id="_ref_10131"><a href="#prod-NoSubstitutionTemplate">NoSubstitutionTemplate</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the String value whose code units are the elements of the TV of <emu-nt id="_ref_10132"><a href="#prod-NoSubstitutionTemplate">NoSubstitutionTemplate</a></emu-nt> as defined in <emu-xref href="#sec-template-literal-lexical-components" id="_ref_318"><a href="#sec-template-literal-lexical-components">11.8.6</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="SubstitutionTemplate" collapsed="">
<emu-nt><a href="#prod-SubstitutionTemplate">SubstitutionTemplate</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="be95cc40"><emu-nt id="_ref_10133"><a href="#prod-TemplateHead">TemplateHead</a></emu-nt><emu-nt id="_ref_10134"><a href="#prod-Expression">Expression</a></emu-nt><emu-nt id="_ref_10135"><a href="#prod-TemplateSpans">TemplateSpans</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>head</var> be the TV of <emu-nt id="_ref_10136"><a href="#prod-TemplateHead">TemplateHead</a></emu-nt> as defined in <emu-xref href="#sec-template-literal-lexical-components" id="_ref_319"><a href="#sec-template-literal-lexical-components">11.8.6</a></emu-xref>.</li><li>Let <var>subRef</var> be the result of evaluating <emu-nt id="_ref_10137"><a href="#prod-Expression">Expression</a></emu-nt>.</li><li>Let <var>sub</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3255"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>subRef</var>).</li><li>Let <var>middle</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_3256"><a href="#sec-tostring">ToString</a></emu-xref>(<var>sub</var>).</li><li>Let <var>tail</var> be the result of evaluating <emu-nt id="_ref_10138"><a href="#prod-TemplateSpans">TemplateSpans</a></emu-nt>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3257"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>tail</var>).</li><li>Return the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_3258"><a href="#sec-ecmascript-language-types-string-type">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_10139"><a href="#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="#prod-TemplateSpans">TemplateSpans</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="57fe6188"><emu-nt id="_ref_10140"><a href="#prod-TemplateTail">TemplateTail</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>tail</var> be the TV of <emu-nt id="_ref_10141"><a href="#prod-TemplateTail">TemplateTail</a></emu-nt> as defined in <emu-xref href="#sec-template-literal-lexical-components" id="_ref_320"><a href="#sec-template-literal-lexical-components">11.8.6</a></emu-xref>.</li><li>Return the String value consisting of the code units of <var>tail</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="TemplateSpans" collapsed="">
<emu-nt><a href="#prod-TemplateSpans">TemplateSpans</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b0b4f425"><emu-nt id="_ref_10142"><a href="#prod-TemplateMiddleList">TemplateMiddleList</a></emu-nt><emu-nt id="_ref_10143"><a href="#prod-TemplateTail">TemplateTail</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>head</var> be the result of evaluating <emu-nt id="_ref_10144"><a href="#prod-TemplateMiddleList">TemplateMiddleList</a></emu-nt>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3259"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>head</var>).</li><li>Let <var>tail</var> be the TV of <emu-nt id="_ref_10145"><a href="#prod-TemplateTail">TemplateTail</a></emu-nt> as defined in <emu-xref href="#sec-template-literal-lexical-components" id="_ref_321"><a href="#sec-template-literal-lexical-components">11.8.6</a></emu-xref>.</li><li>Return the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_3260"><a href="#sec-ecmascript-language-types-string-type">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="#prod-TemplateMiddleList">TemplateMiddleList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="dc7ec961"><emu-nt id="_ref_10146"><a href="#prod-TemplateMiddle">TemplateMiddle</a></emu-nt><emu-nt id="_ref_10147"><a href="#prod-Expression">Expression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>head</var> be the TV of <emu-nt id="_ref_10148"><a href="#prod-TemplateMiddle">TemplateMiddle</a></emu-nt> as defined in <emu-xref href="#sec-template-literal-lexical-components" id="_ref_322"><a href="#sec-template-literal-lexical-components">11.8.6</a></emu-xref>.</li><li>Let <var>subRef</var> be the result of evaluating <emu-nt id="_ref_10149"><a href="#prod-Expression">Expression</a></emu-nt>.</li><li>Let <var>sub</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3261"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>subRef</var>).</li><li>Let <var>middle</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_3262"><a href="#sec-tostring">ToString</a></emu-xref>(<var>sub</var>).</li><li>Return the sequence of code units consisting of the code units of <var>head</var> followed by the elements of <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_10150"><a href="#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="#prod-TemplateMiddleList">TemplateMiddleList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="47acf041"><emu-nt id="_ref_10151"><a href="#prod-TemplateMiddleList">TemplateMiddleList</a></emu-nt><emu-nt id="_ref_10152"><a href="#prod-TemplateMiddle">TemplateMiddle</a></emu-nt><emu-nt id="_ref_10153"><a href="#prod-Expression">Expression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>rest</var> be the result of evaluating <emu-nt id="_ref_10154"><a href="#prod-TemplateMiddleList">TemplateMiddleList</a></emu-nt>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3263"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>rest</var>).</li><li>Let <var>middle</var> be the TV of <emu-nt id="_ref_10155"><a href="#prod-TemplateMiddle">TemplateMiddle</a></emu-nt> as defined in <emu-xref href="#sec-template-literal-lexical-components" id="_ref_323"><a href="#sec-template-literal-lexical-components">11.8.6</a></emu-xref>.</li><li>Let <var>subRef</var> be the result of evaluating <emu-nt id="_ref_10156"><a href="#prod-Expression">Expression</a></emu-nt>.</li><li>Let <var>sub</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3264"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>subRef</var>).</li><li>Let <var>last</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_3265"><a href="#sec-tostring">ToString</a></emu-xref>(<var>sub</var>).</li><li>Return the sequence of code units consisting of the elements of <var>rest</var> followed by the code units of <var>middle</var> followed by the elements of <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_10157"><a href="#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">12.2.10</span>The Grouping Operator</h1>
<emu-clause id="sec-grouping-operator-static-semantics-early-errors">
<h1><span class="secnum">12.2.10.1</span>Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="PrimaryExpression" collapsed="">
<emu-nt><a href="#prod-PrimaryExpression">PrimaryExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cab6f5d7"><emu-nt id="_ref_10158"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if <emu-nt id="_ref_10159"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt> is not <emu-xref href="#sec-syntactic-grammar" id="_ref_3266"><a href="#sec-syntactic-grammar">covering</a></emu-xref> a <emu-nt id="_ref_10160"><a href="#prod-ParenthesizedExpression">ParenthesizedExpression</a></emu-nt>.
</li>
<li>
All Early Error rules for <emu-nt id="_ref_10161"><a href="#prod-ParenthesizedExpression">ParenthesizedExpression</a></emu-nt> and its derived productions also apply to CoveredParenthesizedExpression of <emu-nt id="_ref_10162"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-grouping-operator-static-semantics-isfunctiondefinition">
<h1><span class="secnum">12.2.10.2</span>Static Semantics: IsFunctionDefinition</h1>
<emu-see-also-para op="IsFunctionDefinition"></emu-see-also-para>
<emu-grammar><emu-production name="ParenthesizedExpression" collapsed="">
<emu-nt><a href="#prod-ParenthesizedExpression">ParenthesizedExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4ba6ef9d"><emu-t>(</emu-t><emu-nt id="_ref_10163"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return IsFunctionDefinition of <emu-nt id="_ref_10164"><a href="#prod-Expression">Expression</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause oldids="sec-grouping-operator-static-semantics-isvalidsimpleassignmenttarget" id="sec-grouping-operator-static-semantics-assignmenttargettype">
<span id="sec-grouping-operator-static-semantics-isvalidsimpleassignmenttarget"></span><h1><span class="secnum">12.2.10.3</span>Static Semantics: AssignmentTargetType</h1>
<emu-see-also-para op="AssignmentTargetType"></emu-see-also-para>
<emu-grammar><emu-production name="ParenthesizedExpression" collapsed="">
<emu-nt><a href="#prod-ParenthesizedExpression">ParenthesizedExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4ba6ef9d"><emu-t>(</emu-t><emu-nt id="_ref_10165"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return AssignmentTargetType of <emu-nt id="_ref_10166"><a href="#prod-Expression">Expression</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-grouping-operator-runtime-semantics-namedevaluation">
<h1><span class="secnum">12.2.10.4</span>Runtime Semantics: NamedEvaluation</h1>
<p>With parameter <var>name</var>.</p>
<emu-grammar><emu-production name="PrimaryExpression" collapsed="">
<emu-nt><a href="#prod-PrimaryExpression">PrimaryExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cab6f5d7"><emu-nt id="_ref_10167"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>expr</var> be CoveredParenthesizedExpression of <emu-nt id="_ref_10168"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt>.</li><li>Return the result of performing NamedEvaluation for <var>expr</var> with argument <var>name</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ParenthesizedExpression" collapsed="">
<emu-nt><a href="#prod-ParenthesizedExpression">ParenthesizedExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4ba6ef9d"><emu-t>(</emu-t><emu-nt id="_ref_10169"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_3267"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsAnonymousFunctionDefinition" id="_ref_3268"><a href="#sec-isanonymousfunctiondefinition">IsAnonymousFunctionDefinition</a></emu-xref>(<emu-nt id="_ref_10170"><a href="#prod-Expression">Expression</a></emu-nt>) is <emu-val>true</emu-val>.</li><li>Return the result of performing NamedEvaluation for <emu-nt id="_ref_10171"><a href="#prod-Expression">Expression</a></emu-nt> with argument <var>name</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-grouping-operator-runtime-semantics-evaluation">
<h1><span class="secnum">12.2.10.5</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="PrimaryExpression" collapsed="">
<emu-nt><a href="#prod-PrimaryExpression">PrimaryExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cab6f5d7"><emu-nt id="_ref_10172"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>expr</var> be CoveredParenthesizedExpression of <emu-nt id="_ref_10173"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt>.</li><li>Return the result of evaluating <var>expr</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ParenthesizedExpression" collapsed="">
<emu-nt><a href="#prod-ParenthesizedExpression">ParenthesizedExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4ba6ef9d"><emu-t>(</emu-t><emu-nt id="_ref_10174"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the result of evaluating <emu-nt id="_ref_10175"><a href="#prod-Expression">Expression</a></emu-nt>. This may be of type <emu-xref href="#sec-reference-specification-type" id="_ref_3269"><a href="#sec-reference-specification-type">Reference</a></emu-xref>.
</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_3270"><a href="#sec-getvalue">GetValue</a></emu-xref> to the result of evaluating <emu-nt id="_ref_10176"><a href="#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">12.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="#prod-MemberExpression">MemberExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="669d9e8f"><emu-nt params="?Yield, ?Await" id="_ref_10177"><a href="#prod-PrimaryExpression">PrimaryExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="46700b57"><emu-nt params="?Yield, ?Await" id="_ref_10178"><a href="#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_10179"><a href="#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="fea749a8"><emu-nt params="?Yield, ?Await" id="_ref_10180"><a href="#prod-MemberExpression">MemberExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>.</emu-t><emu-nt id="_ref_10181"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
<emu-rhs a="e3a714cc"><emu-nt params="?Yield, ?Await" id="_ref_10182"><a href="#prod-MemberExpression">MemberExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt params="?Yield, ?Await, +Tagged" id="_ref_10183"><a href="#prod-TemplateLiteral">TemplateLiteral</a><emu-mods><emu-params>[?Yield, ?Await, +Tagged]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="83d44750"><emu-nt params="?Yield, ?Await" id="_ref_10184"><a href="#prod-SuperProperty">SuperProperty</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="c81ee20f"><emu-nt id="_ref_10185"><a href="#prod-MetaProperty">MetaProperty</a></emu-nt></emu-rhs>
<emu-rhs a="b8554289"><emu-t>new</emu-t><emu-nt params="?Yield, ?Await" id="_ref_10186"><a href="#prod-MemberExpression">MemberExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt params="?Yield, ?Await" id="_ref_10187"><a href="#prod-Arguments">Arguments</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="SuperProperty" params="Yield, Await" id="prod-SuperProperty">
<emu-nt params="Yield, Await"><a href="#prod-SuperProperty">SuperProperty</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="7f66819f"><emu-t>super</emu-t><emu-t>[</emu-t><emu-nt params="+In, ?Yield, ?Await" id="_ref_10188"><a href="#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="f690ec4a"><emu-t>super</emu-t><emu-t>.</emu-t><emu-nt id="_ref_10189"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="MetaProperty" id="prod-MetaProperty">
<emu-nt><a href="#prod-MetaProperty">MetaProperty</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="733bdb20"><emu-nt id="_ref_10190"><a href="#prod-NewTarget">NewTarget</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="NewTarget" id="prod-NewTarget">
<emu-nt><a href="#prod-NewTarget">NewTarget</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d2de213d"><emu-t>new</emu-t><emu-t>.</emu-t><emu-t>target</emu-t></emu-rhs>
</emu-production>
<emu-production name="NewExpression" params="Yield, Await" id="prod-NewExpression">
<emu-nt params="Yield, Await"><a href="#prod-NewExpression">NewExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="55b72ef4"><emu-nt params="?Yield, ?Await" id="_ref_10191"><a href="#prod-MemberExpression">MemberExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="8b27ffb1"><emu-t>new</emu-t><emu-nt params="?Yield, ?Await" id="_ref_10192"><a href="#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="#prod-CallExpression">CallExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="callcover"><emu-nt params="?Yield, ?Await" id="_ref_10193"><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="e5c60d05"><emu-nt params="?Yield, ?Await" id="_ref_10194"><a href="#prod-SuperCall">SuperCall</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="cd0d9a85"><emu-nt params="?Yield, ?Await" id="_ref_10195"><a href="#prod-CallExpression">CallExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt params="?Yield, ?Await" id="_ref_10196"><a href="#prod-Arguments">Arguments</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="24037841"><emu-nt params="?Yield, ?Await" id="_ref_10197"><a href="#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_10198"><a href="#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="f1fcc490"><emu-nt params="?Yield, ?Await" id="_ref_10199"><a href="#prod-CallExpression">CallExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>.</emu-t><emu-nt id="_ref_10200"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
<emu-rhs a="5c4dd808"><emu-nt params="?Yield, ?Await" id="_ref_10201"><a href="#prod-CallExpression">CallExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt params="?Yield, ?Await, +Tagged" id="_ref_10202"><a href="#prod-TemplateLiteral">TemplateLiteral</a><emu-mods><emu-params>[?Yield, ?Await, +Tagged]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="SuperCall" params="Yield, Await" id="prod-SuperCall">
<emu-nt params="Yield, Await"><a href="#prod-SuperCall">SuperCall</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6b5bb3dd"><emu-t>super</emu-t><emu-nt params="?Yield, ?Await" id="_ref_10203"><a href="#prod-Arguments">Arguments</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="Arguments" params="Yield, Await" id="prod-Arguments">
<emu-nt params="Yield, Await"><a href="#prod-Arguments">Arguments</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="78e44c33"><emu-t>(</emu-t><emu-t>)</emu-t></emu-rhs>
<emu-rhs a="668c9409"><emu-t>(</emu-t><emu-nt params="?Yield, ?Await" id="_ref_10204"><a href="#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="c520166a"><emu-t>(</emu-t><emu-nt params="?Yield, ?Await" id="_ref_10205"><a href="#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="#prod-ArgumentList">ArgumentList</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8f532861"><emu-nt params="+In, ?Yield, ?Await" id="_ref_10206"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="b623b4c8"><emu-t>...</emu-t><emu-nt params="+In, ?Yield, ?Await" id="_ref_10207"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="2ab72a4a"><emu-nt params="?Yield, ?Await" id="_ref_10208"><a href="#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_10209"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="d6f13c65"><emu-nt params="?Yield, ?Await" id="_ref_10210"><a href="#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_10211"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="LeftHandSideExpression" params="Yield, Await" id="prod-LeftHandSideExpression">
<emu-nt params="Yield, Await"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a89347cc"><emu-nt params="?Yield, ?Await" id="_ref_10212"><a href="#prod-NewExpression">NewExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="8699f68d"><emu-nt params="?Yield, ?Await" id="_ref_10213"><a href="#prod-CallExpression">CallExpression</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 <emu-grammar><emu-production name="CallExpression" collapsed="" class=" inline">
<emu-nt><a href="#prod-CallExpression">CallExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ec98fef7"><emu-nt id="_ref_10214"><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> the interpretation of <emu-nt id="_ref_10215"><a href="#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="#prod-CallMemberExpression">CallMemberExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f747be5d"><emu-nt params="?Yield, ?Await" id="_ref_10216"><a href="#prod-MemberExpression">MemberExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt params="?Yield, ?Await" id="_ref_10217"><a href="#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">12.3.1</span>Static Semantics</h1>
<emu-clause id="sec-left-hand-side-expressions-static-semantics-coveredcallexpression">
<h1><span class="secnum">12.3.1.1</span>Static Semantics: CoveredCallExpression</h1>
<emu-grammar><emu-production name="CallExpression" collapsed="">
<emu-nt><a href="#prod-CallExpression">CallExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ec98fef7"><emu-nt id="_ref_10218"><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the <emu-nt id="_ref_10219"><a href="#prod-CallMemberExpression">CallMemberExpression</a></emu-nt> that is <emu-xref href="#sec-syntactic-grammar" id="_ref_3271"><a href="#sec-syntactic-grammar">covered</a></emu-xref> by <emu-nt id="_ref_10220"><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-static-semantics-static-semantics-contains">
<h1><span class="secnum">12.3.1.2</span>Static Semantics: Contains</h1>
<p>With parameter <var>symbol</var>.</p>
<emu-see-also-para op="Contains"></emu-see-also-para>
<emu-grammar><emu-production name="MemberExpression" collapsed="">
<emu-nt><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="7eb6e3f7"><emu-nt id="_ref_10221"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-t>.</emu-t><emu-nt id="_ref_10222"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <emu-nt id="_ref_10223"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt> Contains <var>symbol</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>If <var>symbol</var> is a <emu-nt id="_ref_10224"><a href="#prod-ReservedWord">ReservedWord</a></emu-nt>, return <emu-val>false</emu-val>.</li><li>If <var>symbol</var> is an <emu-nt id="_ref_10225"><a href="#prod-Identifier">Identifier</a></emu-nt> and StringValue of <var>symbol</var> is the same value as the StringValue of <emu-nt id="_ref_10226"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt>, return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="SuperProperty" collapsed="">
<emu-nt><a href="#prod-SuperProperty">SuperProperty</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f690ec4a"><emu-t>super</emu-t><emu-t>.</emu-t><emu-nt id="_ref_10227"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <var>symbol</var> is the <emu-nt id="_ref_10228"><a href="#prod-ReservedWord">ReservedWord</a></emu-nt> <code>super</code>, return <emu-val>true</emu-val>.</li><li>If <var>symbol</var> is a <emu-nt id="_ref_10229"><a href="#prod-ReservedWord">ReservedWord</a></emu-nt>, return <emu-val>false</emu-val>.</li><li>If <var>symbol</var> is an <emu-nt id="_ref_10230"><a href="#prod-Identifier">Identifier</a></emu-nt> and StringValue of <var>symbol</var> is the same value as the StringValue of <emu-nt id="_ref_10231"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt>, return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="CallExpression" collapsed="">
<emu-nt><a href="#prod-CallExpression">CallExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="bba9526d"><emu-nt id="_ref_10232"><a href="#prod-CallExpression">CallExpression</a></emu-nt><emu-t>.</emu-t><emu-nt id="_ref_10233"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <emu-nt id="_ref_10234"><a href="#prod-CallExpression">CallExpression</a></emu-nt> Contains <var>symbol</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>If <var>symbol</var> is a <emu-nt id="_ref_10235"><a href="#prod-ReservedWord">ReservedWord</a></emu-nt>, return <emu-val>false</emu-val>.</li><li>If <var>symbol</var> is an <emu-nt id="_ref_10236"><a href="#prod-Identifier">Identifier</a></emu-nt> and StringValue of <var>symbol</var> is the same value as the StringValue of <emu-nt id="_ref_10237"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt>, return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-static-semantics-static-semantics-isfunctiondefinition">
<h1><span class="secnum">12.3.1.3</span>Static Semantics: IsFunctionDefinition</h1>
<emu-see-also-para op="IsFunctionDefinition"></emu-see-also-para>
<emu-grammar><emu-production name="MemberExpression">
<emu-nt><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6bbe1777"><emu-nt id="_ref_10238"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-t>[</emu-t><emu-nt id="_ref_10239"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>]</emu-t></emu-rhs>
<emu-rhs a="7eb6e3f7"><emu-nt id="_ref_10240"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-t>.</emu-t><emu-nt id="_ref_10241"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
<emu-rhs a="149e7618"><emu-nt id="_ref_10242"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-nt id="_ref_10243"><a href="#prod-TemplateLiteral">TemplateLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="5f8b7394"><emu-nt id="_ref_10244"><a href="#prod-SuperProperty">SuperProperty</a></emu-nt></emu-rhs>
<emu-rhs a="c81ee20f"><emu-nt id="_ref_10245"><a href="#prod-MetaProperty">MetaProperty</a></emu-nt></emu-rhs>
<emu-rhs a="705abe84"><emu-t>new</emu-t><emu-nt id="_ref_10246"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-nt id="_ref_10247"><a href="#prod-Arguments">Arguments</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="NewExpression">
<emu-nt><a href="#prod-NewExpression">NewExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e753fad7"><emu-t>new</emu-t><emu-nt id="_ref_10248"><a href="#prod-NewExpression">NewExpression</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="LeftHandSideExpression">
<emu-nt><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8bc7444f"><emu-nt id="_ref_10249"><a href="#prod-CallExpression">CallExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-static-semantics-static-semantics-isdestructuring">
<h1><span class="secnum">12.3.1.4</span>Static Semantics: IsDestructuring</h1>
<emu-see-also-para op="IsDestructuring"></emu-see-also-para>
<emu-grammar><emu-production name="MemberExpression" collapsed="">
<emu-nt><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8ef72f7a"><emu-nt id="_ref_10250"><a href="#prod-PrimaryExpression">PrimaryExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <emu-nt id="_ref_10251"><a href="#prod-PrimaryExpression">PrimaryExpression</a></emu-nt> is either an <emu-nt id="_ref_10252"><a href="#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> or an <emu-nt id="_ref_10253"><a href="#prod-ArrayLiteral">ArrayLiteral</a></emu-nt>, return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="MemberExpression">
<emu-nt><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6bbe1777"><emu-nt id="_ref_10254"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-t>[</emu-t><emu-nt id="_ref_10255"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>]</emu-t></emu-rhs>
<emu-rhs a="7eb6e3f7"><emu-nt id="_ref_10256"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-t>.</emu-t><emu-nt id="_ref_10257"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
<emu-rhs a="149e7618"><emu-nt id="_ref_10258"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-nt id="_ref_10259"><a href="#prod-TemplateLiteral">TemplateLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="5f8b7394"><emu-nt id="_ref_10260"><a href="#prod-SuperProperty">SuperProperty</a></emu-nt></emu-rhs>
<emu-rhs a="c81ee20f"><emu-nt id="_ref_10261"><a href="#prod-MetaProperty">MetaProperty</a></emu-nt></emu-rhs>
<emu-rhs a="705abe84"><emu-t>new</emu-t><emu-nt id="_ref_10262"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-nt id="_ref_10263"><a href="#prod-Arguments">Arguments</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="NewExpression">
<emu-nt><a href="#prod-NewExpression">NewExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e753fad7"><emu-t>new</emu-t><emu-nt id="_ref_10264"><a href="#prod-NewExpression">NewExpression</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="LeftHandSideExpression">
<emu-nt><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8bc7444f"><emu-nt id="_ref_10265"><a href="#prod-CallExpression">CallExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-static-semantics-static-semantics-isidentifierref">
<h1><span class="secnum">12.3.1.5</span>Static Semantics: IsIdentifierRef</h1>
<emu-see-also-para op="IsIdentifierRef"></emu-see-also-para>
<emu-grammar><emu-production name="MemberExpression">
<emu-nt><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6bbe1777"><emu-nt id="_ref_10266"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-t>[</emu-t><emu-nt id="_ref_10267"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>]</emu-t></emu-rhs>
<emu-rhs a="7eb6e3f7"><emu-nt id="_ref_10268"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-t>.</emu-t><emu-nt id="_ref_10269"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
<emu-rhs a="149e7618"><emu-nt id="_ref_10270"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-nt id="_ref_10271"><a href="#prod-TemplateLiteral">TemplateLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="5f8b7394"><emu-nt id="_ref_10272"><a href="#prod-SuperProperty">SuperProperty</a></emu-nt></emu-rhs>
<emu-rhs a="c81ee20f"><emu-nt id="_ref_10273"><a href="#prod-MetaProperty">MetaProperty</a></emu-nt></emu-rhs>
<emu-rhs a="705abe84"><emu-t>new</emu-t><emu-nt id="_ref_10274"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-nt id="_ref_10275"><a href="#prod-Arguments">Arguments</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="NewExpression">
<emu-nt><a href="#prod-NewExpression">NewExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e753fad7"><emu-t>new</emu-t><emu-nt id="_ref_10276"><a href="#prod-NewExpression">NewExpression</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="LeftHandSideExpression">
<emu-nt><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8bc7444f"><emu-nt id="_ref_10277"><a href="#prod-CallExpression">CallExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause oldids="sec-static-semantics-static-semantics-isvalidsimpleassignmenttarget" id="sec-static-semantics-static-semantics-assignmenttargettype">
<span id="sec-static-semantics-static-semantics-isvalidsimpleassignmenttarget"></span><h1><span class="secnum">12.3.1.6</span>Static Semantics: AssignmentTargetType</h1>
<emu-see-also-para op="AssignmentTargetType"></emu-see-also-para>
<emu-grammar><emu-production name="CallExpression">
<emu-nt><a href="#prod-CallExpression">CallExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d94d9445"><emu-nt id="_ref_10278"><a href="#prod-CallExpression">CallExpression</a></emu-nt><emu-t>[</emu-t><emu-nt id="_ref_10279"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>]</emu-t></emu-rhs>
<emu-rhs a="bba9526d"><emu-nt id="_ref_10280"><a href="#prod-CallExpression">CallExpression</a></emu-nt><emu-t>.</emu-t><emu-nt id="_ref_10281"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="MemberExpression">
<emu-nt><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6bbe1777"><emu-nt id="_ref_10282"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-t>[</emu-t><emu-nt id="_ref_10283"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>]</emu-t></emu-rhs>
<emu-rhs a="7eb6e3f7"><emu-nt id="_ref_10284"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-t>.</emu-t><emu-nt id="_ref_10285"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
<emu-rhs a="5f8b7394"><emu-nt id="_ref_10286"><a href="#prod-SuperProperty">SuperProperty</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-const>simple</emu-const>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="CallExpression">
<emu-nt><a href="#prod-CallExpression">CallExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ec98fef7"><emu-nt id="_ref_10287"><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt></emu-rhs>
<emu-rhs a="949290c3"><emu-nt id="_ref_10288"><a href="#prod-SuperCall">SuperCall</a></emu-nt></emu-rhs>
<emu-rhs a="42e81a1c"><emu-nt id="_ref_10289"><a href="#prod-CallExpression">CallExpression</a></emu-nt><emu-nt id="_ref_10290"><a href="#prod-Arguments">Arguments</a></emu-nt></emu-rhs>
<emu-rhs a="adcef8e1"><emu-nt id="_ref_10291"><a href="#prod-CallExpression">CallExpression</a></emu-nt><emu-nt id="_ref_10292"><a href="#prod-TemplateLiteral">TemplateLiteral</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="NewExpression">
<emu-nt><a href="#prod-NewExpression">NewExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e753fad7"><emu-t>new</emu-t><emu-nt id="_ref_10293"><a href="#prod-NewExpression">NewExpression</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="MemberExpression">
<emu-nt><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="149e7618"><emu-nt id="_ref_10294"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-nt id="_ref_10295"><a href="#prod-TemplateLiteral">TemplateLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="705abe84"><emu-t>new</emu-t><emu-nt id="_ref_10296"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-nt id="_ref_10297"><a href="#prod-Arguments">Arguments</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="NewTarget">
<emu-nt><a href="#prod-NewTarget">NewTarget</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d2de213d"><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-const>invalid</emu-const>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-property-accessors">
<h1><span class="secnum">12.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_10298"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt> <code>.</code> <emu-nt id="_ref_10299"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt>
<br>
<emu-nt id="_ref_10300"><a href="#prod-CallExpression">CallExpression</a></emu-nt> <code>.</code> <emu-nt id="_ref_10301"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt>
</div>
<p>or the bracket notation:</p>
<div class="rhs">
<emu-nt id="_ref_10302"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt> <code>[</code> <emu-nt id="_ref_10303"><a href="#prod-Expression">Expression</a></emu-nt> <code>]</code>
<br>
<emu-nt id="_ref_10304"><a href="#prod-CallExpression">CallExpression</a></emu-nt> <code>[</code> <emu-nt id="_ref_10305"><a href="#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_10306"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt> <code>.</code> <emu-nt id="_ref_10307"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt>
</div>
<p>is identical in its behaviour to</p>
<div class="rhs">
<emu-nt id="_ref_10308"><a href="#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_10309"><a href="#prod-CallExpression">CallExpression</a></emu-nt> <code>.</code> <emu-nt id="_ref_10310"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt>
</div>
<p>is identical in its behaviour to</p>
<div class="rhs">
<emu-nt id="_ref_10311"><a href="#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 result of evaluating StringValue of <emu-nt id="_ref_10312"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt>.</p>
</div></emu-note>
<emu-clause id="sec-property-accessors-runtime-semantics-evaluation">
<h1><span class="secnum">12.3.2.1</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="MemberExpression" collapsed="">
<emu-nt><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6bbe1777"><emu-nt id="_ref_10313"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-t>[</emu-t><emu-nt id="_ref_10314"><a href="#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 the result of evaluating <emu-nt id="_ref_10315"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt>.</li><li>Let <var>baseValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3272"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>baseReference</var>).</li><li>Let <var>propertyNameReference</var> be the result of evaluating <emu-nt id="_ref_10316"><a href="#prod-Expression">Expression</a></emu-nt>.</li><li>Let <var>propertyNameValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3273"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>propertyNameReference</var>).</li><li>Let <var>bv</var> be ?&nbsp;<emu-xref aoid="RequireObjectCoercible" id="_ref_3274"><a href="#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<var>baseValue</var>).</li><li>Let <var>propertyKey</var> be ?&nbsp;<emu-xref aoid="ToPropertyKey" id="_ref_3275"><a href="#sec-topropertykey">ToPropertyKey</a></emu-xref>(<var>propertyNameValue</var>).</li><li>If the code matched by this <emu-nt id="_ref_10317"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt> is <emu-xref href="#sec-strict-mode-code" id="_ref_3276"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, let <var>strict</var> be <emu-val>true</emu-val>, else let <var>strict</var> be <emu-val>false</emu-val>.</li><li>Return a value of type <emu-xref href="#sec-reference-specification-type" id="_ref_3277"><a href="#sec-reference-specification-type">Reference</a></emu-xref> whose base value component is <var>bv</var>, whose referenced name component is <var>propertyKey</var>, and whose strict reference flag is <var>strict</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="MemberExpression" collapsed="">
<emu-nt><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="7eb6e3f7"><emu-nt id="_ref_10318"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-t>.</emu-t><emu-nt id="_ref_10319"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>baseReference</var> be the result of evaluating <emu-nt id="_ref_10320"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt>.</li><li>Let <var>baseValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3278"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>baseReference</var>).</li><li>Let <var>bv</var> be ?&nbsp;<emu-xref aoid="RequireObjectCoercible" id="_ref_3279"><a href="#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<var>baseValue</var>).</li><li>Let <var>propertyNameString</var> be StringValue of <emu-nt id="_ref_10321"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt>.</li><li>If the code matched by this <emu-nt id="_ref_10322"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt> is <emu-xref href="#sec-strict-mode-code" id="_ref_3280"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, let <var>strict</var> be <emu-val>true</emu-val>, else let <var>strict</var> be <emu-val>false</emu-val>.</li><li>Return a value of type <emu-xref href="#sec-reference-specification-type" id="_ref_3281"><a href="#sec-reference-specification-type">Reference</a></emu-xref> whose base value component is <var>bv</var>, whose referenced name component is <var>propertyNameString</var>, and whose strict reference flag is <var>strict</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="CallExpression" collapsed="">
<emu-nt><a href="#prod-CallExpression">CallExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d94d9445"><emu-nt id="_ref_10323"><a href="#prod-CallExpression">CallExpression</a></emu-nt><emu-t>[</emu-t><emu-nt id="_ref_10324"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>]</emu-t></emu-rhs>
</emu-production></emu-grammar>
<p>Is evaluated in exactly the same manner as <emu-grammar><emu-production name="MemberExpression" collapsed="" class=" inline">
<emu-nt><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6bbe1777"><emu-nt id="_ref_10325"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-t>[</emu-t><emu-nt id="_ref_10326"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>]</emu-t></emu-rhs>
</emu-production></emu-grammar> except that the contained <emu-nt id="_ref_10327"><a href="#prod-CallExpression">CallExpression</a></emu-nt> is evaluated in step 1.</p>
<emu-grammar><emu-production name="CallExpression" collapsed="">
<emu-nt><a href="#prod-CallExpression">CallExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="bba9526d"><emu-nt id="_ref_10328"><a href="#prod-CallExpression">CallExpression</a></emu-nt><emu-t>.</emu-t><emu-nt id="_ref_10329"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<p>Is evaluated in exactly the same manner as <emu-grammar><emu-production name="MemberExpression" collapsed="" class=" inline">
<emu-nt><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="7eb6e3f7"><emu-nt id="_ref_10330"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-t>.</emu-t><emu-nt id="_ref_10331"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> except that the contained <emu-nt id="_ref_10332"><a href="#prod-CallExpression">CallExpression</a></emu-nt> is evaluated in step 1.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-new-operator">
<h1><span class="secnum">12.3.3</span>The <code>new</code> Operator</h1>
<emu-clause id="sec-new-operator-runtime-semantics-evaluation">
<h1><span class="secnum">12.3.3.1</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="NewExpression" collapsed="">
<emu-nt><a href="#prod-NewExpression">NewExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e753fad7"><emu-t>new</emu-t><emu-nt id="_ref_10333"><a href="#prod-NewExpression">NewExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="EvaluateNew" id="_ref_3282"><a href="#sec-evaluatenew">EvaluateNew</a></emu-xref>(<emu-nt id="_ref_10334"><a href="#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="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="705abe84"><emu-t>new</emu-t><emu-nt id="_ref_10335"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-nt id="_ref_10336"><a href="#prod-Arguments">Arguments</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="EvaluateNew" id="_ref_3283"><a href="#sec-evaluatenew">EvaluateNew</a></emu-xref>(<emu-nt id="_ref_10337"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt>, <emu-nt id="_ref_10338"><a href="#prod-Arguments">Arguments</a></emu-nt>).
</li></ol></emu-alg>
<emu-clause id="sec-evaluatenew" aoid="EvaluateNew">
<h1><span class="secnum">12.3.3.1.1</span>Runtime Semantics: EvaluateNew ( <var>constructExpr</var>, <var>arguments</var> )</h1>
<p>The abstract operation EvaluateNew with arguments <var>constructExpr</var>, and <var>arguments</var> performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_3284"><a href="#assert">Assert</a></emu-xref>: <var>constructExpr</var> is either a <emu-nt id="_ref_10339"><a href="#prod-NewExpression">NewExpression</a></emu-nt> or a <emu-nt id="_ref_10340"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt>.</li><li><emu-xref href="#assert" id="_ref_3285"><a href="#assert">Assert</a></emu-xref>: <var>arguments</var> is either <emu-const>empty</emu-const> or an <emu-nt id="_ref_10341"><a href="#prod-Arguments">Arguments</a></emu-nt>.</li><li>Let <var>ref</var> be the result of evaluating <var>constructExpr</var>.</li><li>Let <var>constructor</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3286"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>ref</var>).</li><li>If <var>arguments</var> is <emu-const>empty</emu-const>, let <var>argList</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3287"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Else,<ol><li>Let <var>argList</var> be ArgumentListEvaluation of <var>arguments</var>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3288"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>argList</var>).</li></ol></li><li>If <emu-xref aoid="IsConstructor" id="_ref_3289"><a href="#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_3290"><a href="#sec-construct">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">12.3.4</span>Function Calls</h1>
<emu-clause id="sec-function-calls-runtime-semantics-evaluation">
<h1><span class="secnum">12.3.4.1</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="CallExpression" collapsed="">
<emu-nt><a href="#prod-CallExpression">CallExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ec98fef7"><emu-nt id="_ref_10342"><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>expr</var> be CoveredCallExpression of <emu-nt id="_ref_10343"><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt>.</li><li>Let <var>memberExpr</var> be the <emu-nt id="_ref_10344"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt> of <var>expr</var>.</li><li>Let <var>arguments</var> be the <emu-nt id="_ref_10345"><a href="#prod-Arguments">Arguments</a></emu-nt> of <var>expr</var>.</li><li>Let <var>ref</var> be the result of evaluating <var>memberExpr</var>.</li><li>Let <var>func</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3291"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>ref</var>).</li><li>If <emu-xref aoid="Type" id="_ref_3292"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>ref</var>) is <emu-xref href="#sec-reference-specification-type" id="_ref_3293"><a href="#sec-reference-specification-type">Reference</a></emu-xref> and <emu-xref aoid="IsPropertyReference" id="_ref_3294"><a href="#sec-ispropertyreference">IsPropertyReference</a></emu-xref>(<var>ref</var>) is <emu-val>false</emu-val> and <emu-xref aoid="GetReferencedName" id="_ref_3295"><a href="#sec-getreferencedname">GetReferencedName</a></emu-xref>(<var>ref</var>) is <code>"eval"</code>, then<ol><li>If <emu-xref aoid="SameValue" id="_ref_3296"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>func</var>, <emu-xref href="#sec-eval-x" id="_ref_3297"><a href="#sec-eval-x">%eval%</a></emu-xref>) is <emu-val>true</emu-val>, then<ol><li>Let <var>argList</var> be ? ArgumentListEvaluation of <var>arguments</var>.</li><li>If <var>argList</var> has no elements, return <emu-val>undefined</emu-val>.</li><li>Let <var>evalText</var> be the first element of <var>argList</var>.</li><li>If the source code matching this <emu-nt id="_ref_10346"><a href="#prod-CallExpression">CallExpression</a></emu-nt> is <emu-xref href="#sec-strict-mode-code" id="_ref_3298"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, let <var>strictCaller</var> be <emu-val>true</emu-val>. Otherwise let <var>strictCaller</var> be <emu-val>false</emu-val>.</li><li>Let <var>evalRealm</var> be <emu-xref href="#current-realm" id="_ref_3299"><a href="#current-realm">the current Realm Record</a></emu-xref>.</li><li>Perform ?&nbsp;<emu-xref aoid="HostEnsureCanCompileStrings" id="_ref_3300"><a href="#sec-hostensurecancompilestrings">HostEnsureCanCompileStrings</a></emu-xref>(<var>evalRealm</var>, <var>evalRealm</var>).</li><li>Return ?&nbsp;<emu-xref aoid="PerformEval" id="_ref_3301"><a href="#sec-performeval">PerformEval</a></emu-xref>(<var>evalText</var>, <var>evalRealm</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_10347"><a href="#prod-CallExpression">CallExpression</a></emu-nt>.</li><li>Let <var>tailCall</var> be <emu-xref aoid="IsInTailPosition" id="_ref_3302"><a href="#sec-isintailposition">IsInTailPosition</a></emu-xref>(<var>thisCall</var>).</li><li>Return ?&nbsp;<emu-xref aoid="EvaluateCall" id="_ref_3303"><a href="#sec-evaluatecall">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_10348"><a href="#prod-CallExpression">CallExpression</a></emu-nt> evaluation that executes step 6.a.vii is a <dfn>direct eval</dfn>.</p>
<emu-grammar><emu-production name="CallExpression" collapsed="">
<emu-nt><a href="#prod-CallExpression">CallExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="42e81a1c"><emu-nt id="_ref_10349"><a href="#prod-CallExpression">CallExpression</a></emu-nt><emu-nt id="_ref_10350"><a href="#prod-Arguments">Arguments</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>ref</var> be the result of evaluating <emu-nt id="_ref_10351"><a href="#prod-CallExpression">CallExpression</a></emu-nt>.</li><li>Let <var>func</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3304"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>ref</var>).</li><li>Let <var>thisCall</var> be this <emu-nt id="_ref_10352"><a href="#prod-CallExpression">CallExpression</a></emu-nt>.</li><li>Let <var>tailCall</var> be <emu-xref aoid="IsInTailPosition" id="_ref_3305"><a href="#sec-isintailposition">IsInTailPosition</a></emu-xref>(<var>thisCall</var>).</li><li>Return ?&nbsp;<emu-xref aoid="EvaluateCall" id="_ref_3306"><a href="#sec-evaluatecall">EvaluateCall</a></emu-xref>(<var>func</var>, <var>ref</var>, <emu-nt id="_ref_10353"><a href="#prod-Arguments">Arguments</a></emu-nt>, <var>tailCall</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-evaluatecall" aoid="EvaluateCall" oldids="sec-evaluatedirectcall">
<span id="sec-evaluatedirectcall"></span><h1><span class="secnum">12.3.4.2</span>Runtime Semantics: EvaluateCall ( <var>func</var>, <var>ref</var>, <var>arguments</var>, <var>tailPosition</var> )</h1>
<p>The abstract operation EvaluateCall takes as arguments a value <var>func</var>, a value <var>ref</var>, a <emu-xref href="#sec-syntactic-grammar" id="_ref_3307"><a href="#sec-syntactic-grammar">Parse Node</a></emu-xref> <var>arguments</var>, and a Boolean argument <var>tailPosition</var>. It performs the following steps:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_3308"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>ref</var>) is <emu-xref href="#sec-reference-specification-type" id="_ref_3309"><a href="#sec-reference-specification-type">Reference</a></emu-xref>, then<ol><li>If <emu-xref aoid="IsPropertyReference" id="_ref_3310"><a href="#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_3311"><a href="#sec-getthisvalue">GetThisValue</a></emu-xref>(<var>ref</var>).</li></ol></li><li>Else the base of <var>ref</var> is an <emu-xref href="#sec-environment-records" id="_ref_3312"><a href="#sec-environment-records">Environment Record</a></emu-xref>,<ol><li>Let <var>refEnv</var> be <emu-xref aoid="GetBase" id="_ref_3313"><a href="#sec-getbase">GetBase</a></emu-xref>(<var>ref</var>).</li><li>Let <var>thisValue</var> be <var>refEnv</var>.WithBaseObject().</li></ol></li></ol></li><li>Else <emu-xref aoid="Type" id="_ref_3314"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>ref</var>) is not <emu-xref href="#sec-reference-specification-type" id="_ref_3315"><a href="#sec-reference-specification-type">Reference</a></emu-xref>,<ol><li>Let <var>thisValue</var> be <emu-val>undefined</emu-val>.</li></ol></li><li>Let <var>argList</var> be ArgumentListEvaluation of <var>arguments</var>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3316"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>argList</var>).</li><li>If <emu-xref aoid="Type" id="_ref_3317"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>func</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <emu-xref aoid="IsCallable" id="_ref_3318"><a href="#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_3319"><a href="#sec-preparefortailcall">PrepareForTailCall</a></emu-xref>().</li><li>Let <var>result</var> be <emu-xref aoid="Call" id="_ref_3320"><a href="#sec-call">Call</a></emu-xref>(<var>func</var>, <var>thisValue</var>, <var>argList</var>).</li><li><emu-xref href="#assert" id="_ref_3321"><a href="#assert">Assert</a></emu-xref>: If <var>tailPosition</var> is <emu-val>true</emu-val>, the above call will not return here, but instead evaluation will continue as if the following return has already occurred.</li><li><emu-xref href="#assert" id="_ref_3322"><a href="#assert">Assert</a></emu-xref>: If <var>result</var> is not an <emu-xref href="#sec-completion-record-specification-type" id="_ref_3323"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, then <emu-xref aoid="Type" id="_ref_3324"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>result</var>) is an <emu-xref href="#sec-ecmascript-language-types" id="_ref_3325"><a href="#sec-ecmascript-language-types">ECMAScript language type</a></emu-xref>.</li><li>Return <var>result</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-super-keyword">
<h1><span class="secnum">12.3.5</span>The <code>super</code> Keyword</h1>
<emu-clause id="sec-super-keyword-runtime-semantics-evaluation">
<h1><span class="secnum">12.3.5.1</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="SuperProperty" collapsed="">
<emu-nt><a href="#prod-SuperProperty">SuperProperty</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b698f30f"><emu-t>super</emu-t><emu-t>[</emu-t><emu-nt id="_ref_10354"><a href="#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_3326"><a href="#sec-getthisenvironment">GetThisEnvironment</a></emu-xref>().</li><li>Let <var>actualThis</var> be ? <var>env</var>.GetThisBinding().</li><li>Let <var>propertyNameReference</var> be the result of evaluating <emu-nt id="_ref_10355"><a href="#prod-Expression">Expression</a></emu-nt>.</li><li>Let <var>propertyNameValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3327"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>propertyNameReference</var>).</li><li>Let <var>propertyKey</var> be ?&nbsp;<emu-xref aoid="ToPropertyKey" id="_ref_3328"><a href="#sec-topropertykey">ToPropertyKey</a></emu-xref>(<var>propertyNameValue</var>).</li><li>If the code matched by this <emu-nt id="_ref_10356"><a href="#prod-SuperProperty">SuperProperty</a></emu-nt> is <emu-xref href="#sec-strict-mode-code" id="_ref_3329"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, let <var>strict</var> be <emu-val>true</emu-val>, else let <var>strict</var> be <emu-val>false</emu-val>.</li><li>Return ?&nbsp;<emu-xref aoid="MakeSuperPropertyReference" id="_ref_3330"><a href="#sec-makesuperpropertyreference">MakeSuperPropertyReference</a></emu-xref>(<var>actualThis</var>, <var>propertyKey</var>, <var>strict</var>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="SuperProperty" collapsed="">
<emu-nt><a href="#prod-SuperProperty">SuperProperty</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f690ec4a"><emu-t>super</emu-t><emu-t>.</emu-t><emu-nt id="_ref_10357"><a href="#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_3331"><a href="#sec-getthisenvironment">GetThisEnvironment</a></emu-xref>().</li><li>Let <var>actualThis</var> be ? <var>env</var>.GetThisBinding().</li><li>Let <var>propertyKey</var> be StringValue of <emu-nt id="_ref_10358"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt>.</li><li>If the code matched by this <emu-nt id="_ref_10359"><a href="#prod-SuperProperty">SuperProperty</a></emu-nt> is <emu-xref href="#sec-strict-mode-code" id="_ref_3332"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, let <var>strict</var> be <emu-val>true</emu-val>, else let <var>strict</var> be <emu-val>false</emu-val>.</li><li>Return ?&nbsp;<emu-xref aoid="MakeSuperPropertyReference" id="_ref_3333"><a href="#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="#prod-SuperCall">SuperCall</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a833032f"><emu-t>super</emu-t><emu-nt id="_ref_10360"><a href="#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_3334"><a href="#sec-getnewtarget">GetNewTarget</a></emu-xref>().</li><li><emu-xref href="#assert" id="_ref_3335"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_3336"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>newTarget</var>) is Object.</li><li>Let <var>func</var> be ?&nbsp;<emu-xref aoid="GetSuperConstructor" id="_ref_3337"><a href="#sec-getsuperconstructor">GetSuperConstructor</a></emu-xref>().</li><li>Let <var>argList</var> be ArgumentListEvaluation of <emu-nt id="_ref_10361"><a href="#prod-Arguments">Arguments</a></emu-nt>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3338"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>argList</var>).</li><li>Let <var>result</var> be ?&nbsp;<emu-xref aoid="Construct" id="_ref_3339"><a href="#sec-construct">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_3340"><a href="#sec-getthisenvironment">GetThisEnvironment</a></emu-xref>().</li><li>Return ? <var>thisER</var>.BindThisValue(<var>result</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-getsuperconstructor" aoid="GetSuperConstructor">
<h1><span class="secnum">12.3.5.2</span>Runtime Semantics: GetSuperConstructor ( )</h1>
<p>The abstract operation GetSuperConstructor performs the following steps:</p>
<emu-alg><ol><li>Let <var>envRec</var> be <emu-xref aoid="GetThisEnvironment" id="_ref_3341"><a href="#sec-getthisenvironment">GetThisEnvironment</a></emu-xref>().</li><li><emu-xref href="#assert" id="_ref_3342"><a href="#assert">Assert</a></emu-xref>: <var>envRec</var> is a <emu-xref href="#sec-function-environment-records" id="_ref_3343"><a href="#sec-function-environment-records">function Environment Record</a></emu-xref>.</li><li>Let <var>activeFunction</var> be <var>envRec</var>.[[FunctionObject]].</li><li><emu-xref href="#assert" id="_ref_3344"><a href="#assert">Assert</a></emu-xref>: <var>activeFunction</var> is an ECMAScript <emu-xref href="#function-object" id="_ref_3345"><a href="#function-object">function object</a></emu-xref>.</li><li>Let <var>superConstructor</var> be ! <var>activeFunction</var>.[[GetPrototypeOf]]().</li><li>If <emu-xref aoid="IsConstructor" id="_ref_3346"><a href="#sec-isconstructor">IsConstructor</a></emu-xref>(<var>superConstructor</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return <var>superConstructor</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-makesuperpropertyreference" aoid="MakeSuperPropertyReference">
<h1><span class="secnum">12.3.5.3</span>Runtime Semantics: MakeSuperPropertyReference ( <var>actualThis</var>, <var>propertyKey</var>, <var>strict</var> )</h1>
<p>The abstract operation MakeSuperPropertyReference with arguments <var>actualThis</var>, <var>propertyKey</var>, and <var>strict</var> performs the following steps:</p>
<emu-alg><ol><li>Let <var>env</var> be <emu-xref aoid="GetThisEnvironment" id="_ref_3347"><a href="#sec-getthisenvironment">GetThisEnvironment</a></emu-xref>().</li><li><emu-xref href="#assert" id="_ref_3348"><a href="#assert">Assert</a></emu-xref>: <var>env</var>.HasSuperBinding() is <emu-val>true</emu-val>.</li><li>Let <var>baseValue</var> be ? <var>env</var>.GetSuperBase().</li><li>Let <var>bv</var> be ?&nbsp;<emu-xref aoid="RequireObjectCoercible" id="_ref_3349"><a href="#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<var>baseValue</var>).</li><li>Return a value of type <emu-xref href="#sec-reference-specification-type" id="_ref_3350"><a href="#sec-reference-specification-type">Reference</a></emu-xref> that is a <emu-xref href="#super-reference" id="_ref_3351"><a href="#super-reference">Super Reference</a></emu-xref> whose base value component is <var>bv</var>, whose referenced name component is <var>propertyKey</var>, whose thisValue component is <var>actualThis</var>, and whose strict reference flag is <var>strict</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-argument-lists">
<h1><span class="secnum">12.3.6</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_3352"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of values.</p>
</div></emu-note>
<emu-clause id="sec-argument-lists-runtime-semantics-argumentlistevaluation">
<h1><span class="secnum">12.3.6.1</span>Runtime Semantics: ArgumentListEvaluation</h1>
<emu-see-also-para op="ArgumentListEvaluation"></emu-see-also-para>
<emu-grammar><emu-production name="Arguments" collapsed="">
<emu-nt><a href="#prod-Arguments">Arguments</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="78e44c33"><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_3353"><a href="#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="#prod-ArgumentList">ArgumentList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d4fc7da4"><emu-nt id="_ref_10362"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>ref</var> be the result of evaluating <emu-nt id="_ref_10363"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Let <var>arg</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3354"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>ref</var>).</li><li>Return a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3355"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> whose sole item is <var>arg</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ArgumentList" collapsed="">
<emu-nt><a href="#prod-ArgumentList">ArgumentList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5bb8853e"><emu-t>...</emu-t><emu-nt id="_ref_10364"><a href="#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_3356"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>spreadRef</var> be the result of evaluating <emu-nt id="_ref_10365"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Let <var>spreadObj</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3357"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>spreadRef</var>).</li><li>Let <var>iteratorRecord</var> be ?&nbsp;<emu-xref aoid="GetIterator" id="_ref_3358"><a href="#sec-getiterator">GetIterator</a></emu-xref>(<var>spreadObj</var>).</li><li>Repeat,<ol><li>Let <var>next</var> be ?&nbsp;<emu-xref aoid="IteratorStep" id="_ref_3359"><a href="#sec-iteratorstep">IteratorStep</a></emu-xref>(<var>iteratorRecord</var>).</li><li>If <var>next</var> is <emu-val>false</emu-val>, return <var>list</var>.</li><li>Let <var>nextArg</var> be ?&nbsp;<emu-xref aoid="IteratorValue" id="_ref_3360"><a href="#sec-iteratorvalue">IteratorValue</a></emu-xref>(<var>next</var>).</li><li>Append <var>nextArg</var> as the last element of <var>list</var>.
</li></ol></li></ol></emu-alg>
<emu-grammar><emu-production name="ArgumentList" collapsed="">
<emu-nt><a href="#prod-ArgumentList">ArgumentList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="7ff23fee"><emu-nt id="_ref_10366"><a href="#prod-ArgumentList">ArgumentList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_10367"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>precedingArgs</var> be ArgumentListEvaluation of <emu-nt id="_ref_10368"><a href="#prod-ArgumentList">ArgumentList</a></emu-nt>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3361"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>precedingArgs</var>).</li><li>Let <var>ref</var> be the result of evaluating <emu-nt id="_ref_10369"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Let <var>arg</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3362"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>ref</var>).</li><li>Append <var>arg</var> to the end of <var>precedingArgs</var>.</li><li>Return <var>precedingArgs</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ArgumentList" collapsed="">
<emu-nt><a href="#prod-ArgumentList">ArgumentList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="678ad0f9"><emu-nt id="_ref_10370"><a href="#prod-ArgumentList">ArgumentList</a></emu-nt><emu-t>,</emu-t><emu-t>...</emu-t><emu-nt id="_ref_10371"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>precedingArgs</var> be ArgumentListEvaluation of <emu-nt id="_ref_10372"><a href="#prod-ArgumentList">ArgumentList</a></emu-nt>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3363"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>precedingArgs</var>).</li><li>Let <var>spreadRef</var> be the result of evaluating <emu-nt id="_ref_10373"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Let <var>iteratorRecord</var> be ?&nbsp;<emu-xref aoid="GetIterator" id="_ref_3364"><a href="#sec-getiterator">GetIterator</a></emu-xref>(? <emu-xref aoid="GetValue" id="_ref_3365"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>spreadRef</var>)).</li><li>Repeat,<ol><li>Let <var>next</var> be ?&nbsp;<emu-xref aoid="IteratorStep" id="_ref_3366"><a href="#sec-iteratorstep">IteratorStep</a></emu-xref>(<var>iteratorRecord</var>).</li><li>If <var>next</var> is <emu-val>false</emu-val>, return <var>precedingArgs</var>.</li><li>Let <var>nextArg</var> be ?&nbsp;<emu-xref aoid="IteratorValue" id="_ref_3367"><a href="#sec-iteratorvalue">IteratorValue</a></emu-xref>(<var>next</var>).</li><li>Append <var>nextArg</var> as the last element of <var>precedingArgs</var>.
</li></ol></li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-tagged-templates">
<h1><span class="secnum">12.3.7</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_10374"><a href="#prod-TemplateLiteral">TemplateLiteral</a></emu-nt> (<emu-xref href="#sec-template-literals" id="_ref_324"><a href="#sec-template-literals">12.2.9</a></emu-xref>). The actual arguments include a template object (<emu-xref href="#sec-gettemplateobject" id="_ref_325"><a href="#sec-gettemplateobject">12.2.9.4</a></emu-xref>) and the values produced by evaluating the expressions embedded within the <emu-nt id="_ref_10375"><a href="#prod-TemplateLiteral">TemplateLiteral</a></emu-nt>.</p>
</div></emu-note>
<emu-clause id="sec-tagged-templates-runtime-semantics-evaluation">
<h1><span class="secnum">12.3.7.1</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="MemberExpression" collapsed="">
<emu-nt><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="149e7618"><emu-nt id="_ref_10376"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-nt id="_ref_10377"><a href="#prod-TemplateLiteral">TemplateLiteral</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>tagRef</var> be the result of evaluating <emu-nt id="_ref_10378"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt>.</li><li>Let <var>tagFunc</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3368"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>tagRef</var>).</li><li>Let <var>thisCall</var> be this <emu-nt id="_ref_10379"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt>.</li><li>Let <var>tailCall</var> be <emu-xref aoid="IsInTailPosition" id="_ref_3369"><a href="#sec-isintailposition">IsInTailPosition</a></emu-xref>(<var>thisCall</var>).</li><li>Return ?&nbsp;<emu-xref aoid="EvaluateCall" id="_ref_3370"><a href="#sec-evaluatecall">EvaluateCall</a></emu-xref>(<var>tagFunc</var>, <var>tagRef</var>, <emu-nt id="_ref_10380"><a href="#prod-TemplateLiteral">TemplateLiteral</a></emu-nt>, <var>tailCall</var>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="CallExpression" collapsed="">
<emu-nt><a href="#prod-CallExpression">CallExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="adcef8e1"><emu-nt id="_ref_10381"><a href="#prod-CallExpression">CallExpression</a></emu-nt><emu-nt id="_ref_10382"><a href="#prod-TemplateLiteral">TemplateLiteral</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>tagRef</var> be the result of evaluating <emu-nt id="_ref_10383"><a href="#prod-CallExpression">CallExpression</a></emu-nt>.</li><li>Let <var>tagFunc</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3371"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>tagRef</var>).</li><li>Let <var>thisCall</var> be this <emu-nt id="_ref_10384"><a href="#prod-CallExpression">CallExpression</a></emu-nt>.</li><li>Let <var>tailCall</var> be <emu-xref aoid="IsInTailPosition" id="_ref_3372"><a href="#sec-isintailposition">IsInTailPosition</a></emu-xref>(<var>thisCall</var>).</li><li>Return ?&nbsp;<emu-xref aoid="EvaluateCall" id="_ref_3373"><a href="#sec-evaluatecall">EvaluateCall</a></emu-xref>(<var>tagFunc</var>, <var>tagRef</var>, <emu-nt id="_ref_10385"><a href="#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">12.3.8</span>Meta Properties</h1>
<emu-clause id="sec-meta-properties-runtime-semantics-evaluation">
<h1><span class="secnum">12.3.8.1</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="NewTarget" collapsed="">
<emu-nt><a href="#prod-NewTarget">NewTarget</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d2de213d"><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_3374"><a href="#sec-getnewtarget">GetNewTarget</a></emu-xref>().
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-update-expressions">
<h1><span class="secnum">12.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="#prod-UpdateExpression">UpdateExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b7b08c84"><emu-nt params="?Yield, ?Await" id="_ref_10386"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="1063e6f2"><emu-nt params="?Yield, ?Await" id="_ref_10387"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-gann>[no <emu-nt id="_ref_10388"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-t>++</emu-t></emu-rhs>
<emu-rhs a="c40a0c36"><emu-nt params="?Yield, ?Await" id="_ref_10389"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-gann>[no <emu-nt id="_ref_10390"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-t>--</emu-t></emu-rhs>
<emu-rhs a="e14f8c68"><emu-t>++</emu-t><emu-nt params="?Yield, ?Await" id="_ref_10391"><a href="#prod-UnaryExpression">UnaryExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="994b46fb"><emu-t>--</emu-t><emu-nt params="?Yield, ?Await" id="_ref_10392"><a href="#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">12.4.1</span>Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="UpdateExpression">
<emu-nt><a href="#prod-UpdateExpression">UpdateExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8bf8e31b"><emu-nt id="_ref_10393"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>++</emu-t></emu-rhs>
<emu-rhs a="8d1d2d72"><emu-nt id="_ref_10394"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>--</emu-t></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is an early <emu-xref href="#sec-reference-specification-type" id="_ref_3375"><a href="#sec-reference-specification-type">Reference</a></emu-xref> Error if AssignmentTargetType of <emu-nt id="_ref_10395"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is <emu-const>invalid</emu-const>.
</li>
<li>
It is an early Syntax Error if AssignmentTargetType of <emu-nt id="_ref_10396"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is <emu-const>strict</emu-const>.
</li>
</ul>
<emu-grammar><emu-production name="UpdateExpression">
<emu-nt><a href="#prod-UpdateExpression">UpdateExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5701b162"><emu-t>++</emu-t><emu-nt id="_ref_10397"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
<emu-rhs a="3a745559"><emu-t>--</emu-t><emu-nt id="_ref_10398"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is an early <emu-xref href="#sec-reference-specification-type" id="_ref_3376"><a href="#sec-reference-specification-type">Reference</a></emu-xref> Error if AssignmentTargetType of <emu-nt id="_ref_10399"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt> is <emu-const>invalid</emu-const>.
</li>
<li>
It is an early Syntax Error if AssignmentTargetType of <emu-nt id="_ref_10400"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt> is <emu-const>strict</emu-const>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-update-expressions-static-semantics-isfunctiondefinition">
<h1><span class="secnum">12.4.2</span>Static Semantics: IsFunctionDefinition</h1>
<emu-see-also-para op="IsFunctionDefinition"></emu-see-also-para>
<emu-grammar><emu-production name="UpdateExpression">
<emu-nt><a href="#prod-UpdateExpression">UpdateExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8bf8e31b"><emu-nt id="_ref_10401"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>++</emu-t></emu-rhs>
<emu-rhs a="8d1d2d72"><emu-nt id="_ref_10402"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>--</emu-t></emu-rhs>
<emu-rhs a="5701b162"><emu-t>++</emu-t><emu-nt id="_ref_10403"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
<emu-rhs a="3a745559"><emu-t>--</emu-t><emu-nt id="_ref_10404"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause oldids="sec-update-expressions-static-semantics-isvalidsimpleassignmenttarget" id="sec-update-expressions-static-semantics-assignmenttargettype">
<span id="sec-update-expressions-static-semantics-isvalidsimpleassignmenttarget"></span><h1><span class="secnum">12.4.3</span>Static Semantics: AssignmentTargetType</h1>
<emu-see-also-para op="AssignmentTargetType"></emu-see-also-para>
<emu-grammar><emu-production name="UpdateExpression">
<emu-nt><a href="#prod-UpdateExpression">UpdateExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8bf8e31b"><emu-nt id="_ref_10405"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>++</emu-t></emu-rhs>
<emu-rhs a="8d1d2d72"><emu-nt id="_ref_10406"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>--</emu-t></emu-rhs>
<emu-rhs a="5701b162"><emu-t>++</emu-t><emu-nt id="_ref_10407"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
<emu-rhs a="3a745559"><emu-t>--</emu-t><emu-nt id="_ref_10408"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-const>invalid</emu-const>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-postfix-increment-operator">
<h1><span class="secnum">12.4.4</span>Postfix Increment Operator</h1>
<emu-clause id="sec-postfix-increment-operator-runtime-semantics-evaluation">
<h1><span class="secnum">12.4.4.1</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="UpdateExpression" collapsed="">
<emu-nt><a href="#prod-UpdateExpression">UpdateExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8bf8e31b"><emu-nt id="_ref_10409"><a href="#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 the result of evaluating <emu-nt id="_ref_10410"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>.</li><li>Let <var>oldValue</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_3377"><a href="#sec-tonumber">ToNumber</a></emu-xref>(? <emu-xref aoid="GetValue" id="_ref_3378"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>lhs</var>)).</li><li>Let <var>newValue</var> be the result of adding the value 1 to <var>oldValue</var>, using the same rules as for the <code>+</code> operator (see <emu-xref href="#sec-applying-the-additive-operators-to-numbers" id="_ref_326"><a href="#sec-applying-the-additive-operators-to-numbers">12.8.5</a></emu-xref>).</li><li>Perform ?&nbsp;<emu-xref aoid="PutValue" id="_ref_3379"><a href="#sec-putvalue">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">12.4.5</span>Postfix Decrement Operator</h1>
<emu-clause id="sec-postfix-decrement-operator-runtime-semantics-evaluation">
<h1><span class="secnum">12.4.5.1</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="UpdateExpression" collapsed="">
<emu-nt><a href="#prod-UpdateExpression">UpdateExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8d1d2d72"><emu-nt id="_ref_10411"><a href="#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 the result of evaluating <emu-nt id="_ref_10412"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>.</li><li>Let <var>oldValue</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_3380"><a href="#sec-tonumber">ToNumber</a></emu-xref>(? <emu-xref aoid="GetValue" id="_ref_3381"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>lhs</var>)).</li><li>Let <var>newValue</var> be the result of subtracting the value 1 from <var>oldValue</var>, using the same rules as for the <code>-</code> operator (see <emu-xref href="#sec-applying-the-additive-operators-to-numbers" id="_ref_327"><a href="#sec-applying-the-additive-operators-to-numbers">12.8.5</a></emu-xref>).</li><li>Perform ?&nbsp;<emu-xref aoid="PutValue" id="_ref_3382"><a href="#sec-putvalue">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">12.4.6</span>Prefix Increment Operator</h1>
<emu-clause id="sec-prefix-increment-operator-runtime-semantics-evaluation">
<h1><span class="secnum">12.4.6.1</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="UpdateExpression" collapsed="">
<emu-nt><a href="#prod-UpdateExpression">UpdateExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5701b162"><emu-t>++</emu-t><emu-nt id="_ref_10413"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>expr</var> be the result of evaluating <emu-nt id="_ref_10414"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt>.</li><li>Let <var>oldValue</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_3383"><a href="#sec-tonumber">ToNumber</a></emu-xref>(? <emu-xref aoid="GetValue" id="_ref_3384"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>expr</var>)).</li><li>Let <var>newValue</var> be the result of adding the value 1 to <var>oldValue</var>, using the same rules as for the <code>+</code> operator (see <emu-xref href="#sec-applying-the-additive-operators-to-numbers" id="_ref_328"><a href="#sec-applying-the-additive-operators-to-numbers">12.8.5</a></emu-xref>).</li><li>Perform ?&nbsp;<emu-xref aoid="PutValue" id="_ref_3385"><a href="#sec-putvalue">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">12.4.7</span>Prefix Decrement Operator</h1>
<emu-clause id="sec-prefix-decrement-operator-runtime-semantics-evaluation">
<h1><span class="secnum">12.4.7.1</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="UpdateExpression" collapsed="">
<emu-nt><a href="#prod-UpdateExpression">UpdateExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="3a745559"><emu-t>--</emu-t><emu-nt id="_ref_10415"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>expr</var> be the result of evaluating <emu-nt id="_ref_10416"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt>.</li><li>Let <var>oldValue</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_3386"><a href="#sec-tonumber">ToNumber</a></emu-xref>(? <emu-xref aoid="GetValue" id="_ref_3387"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>expr</var>)).</li><li>Let <var>newValue</var> be the result of subtracting the value 1 from <var>oldValue</var>, using the same rules as for the <code>-</code> operator (see <emu-xref href="#sec-applying-the-additive-operators-to-numbers" id="_ref_329"><a href="#sec-applying-the-additive-operators-to-numbers">12.8.5</a></emu-xref>).</li><li>Perform ?&nbsp;<emu-xref aoid="PutValue" id="_ref_3388"><a href="#sec-putvalue">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">12.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="#prod-UnaryExpression">UnaryExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="9511ff89"><emu-nt params="?Yield, ?Await" id="_ref_10417"><a href="#prod-UpdateExpression">UpdateExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="a87e936a"><emu-t>delete</emu-t><emu-nt params="?Yield, ?Await" id="_ref_10418"><a href="#prod-UnaryExpression">UnaryExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="7774f70f"><emu-t>void</emu-t><emu-nt params="?Yield, ?Await" id="_ref_10419"><a href="#prod-UnaryExpression">UnaryExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="693155d5"><emu-t>typeof</emu-t><emu-nt params="?Yield, ?Await" id="_ref_10420"><a href="#prod-UnaryExpression">UnaryExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="d735fe16"><emu-t>+</emu-t><emu-nt params="?Yield, ?Await" id="_ref_10421"><a href="#prod-UnaryExpression">UnaryExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="2de86f5f"><emu-t>-</emu-t><emu-nt params="?Yield, ?Await" id="_ref_10422"><a href="#prod-UnaryExpression">UnaryExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="995c05b5"><emu-t>~</emu-t><emu-nt params="?Yield, ?Await" id="_ref_10423"><a href="#prod-UnaryExpression">UnaryExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="0a6edf36"><emu-t>!</emu-t><emu-nt params="?Yield, ?Await" id="_ref_10424"><a href="#prod-UnaryExpression">UnaryExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="0c541d06" constraints="+Await"><emu-constraints>[+Await]</emu-constraints><emu-nt params="?Yield" id="_ref_10425"><a href="#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-unary-operators-static-semantics-isfunctiondefinition">
<h1><span class="secnum">12.5.1</span>Static Semantics: IsFunctionDefinition</h1>
<emu-see-also-para op="IsFunctionDefinition"></emu-see-also-para>
<emu-grammar><emu-production name="UnaryExpression">
<emu-nt><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="bfdc08c3"><emu-t>delete</emu-t><emu-nt id="_ref_10426"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
<emu-rhs a="e5d8038f"><emu-t>void</emu-t><emu-nt id="_ref_10427"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
<emu-rhs a="ab1a2cb9"><emu-t>typeof</emu-t><emu-nt id="_ref_10428"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
<emu-rhs a="3b49039a"><emu-t>+</emu-t><emu-nt id="_ref_10429"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
<emu-rhs a="a03cca5c"><emu-t>-</emu-t><emu-nt id="_ref_10430"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
<emu-rhs a="07d36a79"><emu-t>~</emu-t><emu-nt id="_ref_10431"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
<emu-rhs a="b8b0af72"><emu-t>!</emu-t><emu-nt id="_ref_10432"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
<emu-rhs a="48794e9a"><emu-nt id="_ref_10433"><a href="#prod-AwaitExpression">AwaitExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause oldids="sec-unary-operators-static-semantics-isvalidsimpleassignmenttarget" id="sec-unary-operators-static-semantics-assignmenttargettype">
<span id="sec-unary-operators-static-semantics-isvalidsimpleassignmenttarget"></span><h1><span class="secnum">12.5.2</span>Static Semantics: AssignmentTargetType</h1>
<emu-see-also-para op="AssignmentTargetType"></emu-see-also-para>
<emu-grammar><emu-production name="UnaryExpression">
<emu-nt><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="bfdc08c3"><emu-t>delete</emu-t><emu-nt id="_ref_10434"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
<emu-rhs a="e5d8038f"><emu-t>void</emu-t><emu-nt id="_ref_10435"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
<emu-rhs a="ab1a2cb9"><emu-t>typeof</emu-t><emu-nt id="_ref_10436"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
<emu-rhs a="3b49039a"><emu-t>+</emu-t><emu-nt id="_ref_10437"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
<emu-rhs a="a03cca5c"><emu-t>-</emu-t><emu-nt id="_ref_10438"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
<emu-rhs a="07d36a79"><emu-t>~</emu-t><emu-nt id="_ref_10439"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
<emu-rhs a="b8b0af72"><emu-t>!</emu-t><emu-nt id="_ref_10440"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
<emu-rhs a="48794e9a"><emu-nt id="_ref_10441"><a href="#prod-AwaitExpression">AwaitExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-const>invalid</emu-const>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-delete-operator">
<h1><span class="secnum">12.5.3</span>The <code>delete</code> Operator</h1>
<emu-clause id="sec-delete-operator-static-semantics-early-errors">
<h1><span class="secnum">12.5.3.1</span>Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="UnaryExpression" collapsed="">
<emu-nt><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="bfdc08c3"><emu-t>delete</emu-t><emu-nt id="_ref_10442"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if the <emu-nt id="_ref_10443"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt> is contained in <emu-xref href="#sec-strict-mode-code" id="_ref_3389"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref> and the derived <emu-nt id="_ref_10444"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt> is <emu-grammar><emu-production name="PrimaryExpression" collapsed="" class=" inline">
<emu-nt><a href="#prod-PrimaryExpression">PrimaryExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="2361f19d"><emu-nt id="_ref_10445"><a href="#prod-IdentifierReference">IdentifierReference</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>.
</li>
<li>
<p>It is a Syntax Error if the derived <emu-nt id="_ref_10446"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt> is
<br>
<emu-grammar><emu-production name="PrimaryExpression" collapsed="" class=" inline">
<emu-nt><a href="#prod-PrimaryExpression">PrimaryExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cab6f5d7"><emu-nt id="_ref_10447"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<br>
and <emu-nt id="_ref_10448"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt> ultimately derives a phrase that, if used in place of <emu-nt id="_ref_10449"><a href="#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 early errors because of recursive application of the first rule.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-delete-operator-runtime-semantics-evaluation">
<h1><span class="secnum">12.5.3.2</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="UnaryExpression" collapsed="">
<emu-nt><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="bfdc08c3"><emu-t>delete</emu-t><emu-nt id="_ref_10450"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>ref</var> be the result of evaluating <emu-nt id="_ref_10451"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3390"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>ref</var>).</li><li>If <emu-xref aoid="Type" id="_ref_3391"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>ref</var>) is not <emu-xref href="#sec-reference-specification-type" id="_ref_3392"><a href="#sec-reference-specification-type">Reference</a></emu-xref>, return <emu-val>true</emu-val>.</li><li>If <emu-xref aoid="IsUnresolvableReference" id="_ref_3393"><a href="#sec-isunresolvablereference">IsUnresolvableReference</a></emu-xref>(<var>ref</var>) is <emu-val>true</emu-val>, then<ol><li><emu-xref href="#assert" id="_ref_3394"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsStrictReference" id="_ref_3395"><a href="#sec-isstrictreference">IsStrictReference</a></emu-xref>(<var>ref</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_3396"><a href="#sec-ispropertyreference">IsPropertyReference</a></emu-xref>(<var>ref</var>) is <emu-val>true</emu-val>, then<ol><li>If <emu-xref aoid="IsSuperReference" id="_ref_3397"><a href="#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>Let <var>baseObj</var> be !&nbsp;<emu-xref aoid="ToObject" id="_ref_3398"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-xref aoid="GetBase" id="_ref_3399"><a href="#sec-getbase">GetBase</a></emu-xref>(<var>ref</var>)).</li><li>Let <var>deleteStatus</var> be ? <var>baseObj</var>.[[Delete]](<emu-xref aoid="GetReferencedName" id="_ref_3400"><a href="#sec-getreferencedname">GetReferencedName</a></emu-xref>(<var>ref</var>)).</li><li>If <var>deleteStatus</var> is <emu-val>false</emu-val> and <emu-xref aoid="IsStrictReference" id="_ref_3401"><a href="#sec-isstrictreference">IsStrictReference</a></emu-xref>(<var>ref</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>Else <var>ref</var> is a <emu-xref href="#sec-reference-specification-type" id="_ref_3402"><a href="#sec-reference-specification-type">Reference</a></emu-xref> to an <emu-xref href="#sec-environment-records" id="_ref_3403"><a href="#sec-environment-records">Environment Record</a></emu-xref> binding,<ol><li>Let <var>bindings</var> be <emu-xref aoid="GetBase" id="_ref_3404"><a href="#sec-getbase">GetBase</a></emu-xref>(<var>ref</var>).</li><li>Return ? <var>bindings</var>.DeleteBinding(<emu-xref aoid="GetReferencedName" id="_ref_3405"><a href="#sec-getreferencedname">GetReferencedName</a></emu-xref>(<var>ref</var>)).
</li></ol></li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>When a <code>delete</code> operator occurs within <emu-xref href="#sec-strict-mode-code" id="_ref_3406"><a href="#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_10452"><a href="#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_3407"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref> and the property to be deleted has the attribute { [[Configurable]]: <emu-val>false</emu-val> }, a <emu-val>TypeError</emu-val> exception is thrown.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-void-operator">
<h1><span class="secnum">12.5.4</span>The <code>void</code> Operator</h1>
<emu-clause id="sec-void-operator-runtime-semantics-evaluation">
<h1><span class="secnum">12.5.4.1</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="UnaryExpression" collapsed="">
<emu-nt><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e5d8038f"><emu-t>void</emu-t><emu-nt id="_ref_10453"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>expr</var> be the result of evaluating <emu-nt id="_ref_10454"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt>.</li><li>Perform ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3408"><a href="#sec-getvalue">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_3409"><a href="#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">12.5.5</span>The <code>typeof</code> Operator</h1>
<emu-clause id="sec-typeof-operator-runtime-semantics-evaluation">
<h1><span class="secnum">12.5.5.1</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="UnaryExpression" collapsed="">
<emu-nt><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ab1a2cb9"><emu-t>typeof</emu-t><emu-nt id="_ref_10455"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>val</var> be the result of evaluating <emu-nt id="_ref_10456"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt>.</li><li>If <emu-xref aoid="Type" id="_ref_3410"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>val</var>) is <emu-xref href="#sec-reference-specification-type" id="_ref_3411"><a href="#sec-reference-specification-type">Reference</a></emu-xref>, then<ol><li>If <emu-xref aoid="IsUnresolvableReference" id="_ref_3412"><a href="#sec-isunresolvablereference">IsUnresolvableReference</a></emu-xref>(<var>val</var>) is <emu-val>true</emu-val>, return <code>"undefined"</code>.</li></ol></li><li>Set <var>val</var> to ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3413"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>val</var>).</li><li>Return a String according to <emu-xref href="#table-35" id="_ref_330"><a href="#table-35">Table 35</a></emu-xref>.
</li></ol></emu-alg>
<emu-table id="table-35" caption="typeof Operator Results"><figure><figcaption>Table 35: typeof Operator Results</figcaption>
<table>
<tbody>
<tr>
<th>
Type of <var>val</var>
</th>
<th>
Result
</th>
</tr>
<tr>
<td>
Undefined
</td>
<td>
<code>"undefined"</code>
</td>
</tr>
<tr>
<td>
Null
</td>
<td>
<code>"object"</code>
</td>
</tr>
<tr>
<td>
Boolean
</td>
<td>
<code>"boolean"</code>
</td>
</tr>
<tr>
<td>
Number
</td>
<td>
<code>"number"</code>
</td>
</tr>
<tr>
<td>
String
</td>
<td>
<code>"string"</code>
</td>
</tr>
<tr>
<td>
Symbol
</td>
<td>
<code>"symbol"</code>
</td>
</tr>
<tr>
<td>
Object (ordinary and does not implement [[Call]])
</td>
<td>
<code>"object"</code>
</td>
</tr>
<tr>
<td>
Object (standard exotic and does not implement [[Call]])
</td>
<td>
<code>"object"</code>
</td>
</tr>
<tr>
<td>
Object (implements [[Call]])
</td>
<td>
<code>"function"</code>
</td>
</tr>
<tr>
<td>
Object (non-standard exotic and does not implement [[Call]])
</td>
<td>
Implementation-defined. Must not be <code>"undefined"</code>, <code>"boolean"</code>, <code>"function"</code>, <code>"number"</code>, <code>"symbol"</code>, or <code>"string"</code>.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Implementations are discouraged from defining new <code>typeof</code> result values for non-standard exotic objects. If possible <code>"object"</code> should be used for such objects.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-unary-plus-operator">
<h1><span class="secnum">12.5.6</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 Number type.</p>
</div></emu-note>
<emu-clause id="sec-unary-plus-operator-runtime-semantics-evaluation">
<h1><span class="secnum">12.5.6.1</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="UnaryExpression" collapsed="">
<emu-nt><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="3b49039a"><emu-t>+</emu-t><emu-nt id="_ref_10457"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>expr</var> be the result of evaluating <emu-nt id="_ref_10458"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt>.</li><li>Return ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_3414"><a href="#sec-tonumber">ToNumber</a></emu-xref>(? <emu-xref aoid="GetValue" id="_ref_3415"><a href="#sec-getvalue">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">12.5.7</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 Number type and then negates it. Negating <emu-val>+0</emu-val> produces <emu-val>-0</emu-val>, and negating <emu-val>-0</emu-val> produces <emu-val>+0</emu-val>.</p>
</div></emu-note>
<emu-clause id="sec-unary-minus-operator-runtime-semantics-evaluation">
<h1><span class="secnum">12.5.7.1</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="UnaryExpression" collapsed="">
<emu-nt><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a03cca5c"><emu-t>-</emu-t><emu-nt id="_ref_10459"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>expr</var> be the result of evaluating <emu-nt id="_ref_10460"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt>.</li><li>Let <var>oldValue</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_3416"><a href="#sec-tonumber">ToNumber</a></emu-xref>(? <emu-xref aoid="GetValue" id="_ref_3417"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>expr</var>)).</li><li>If <var>oldValue</var> is <emu-val>NaN</emu-val>, return <emu-val>NaN</emu-val>.</li><li>Return the result of negating <var>oldValue</var>; that is, compute a Number with the same magnitude but opposite sign.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-bitwise-not-operator">
<h1><span class="secnum">12.5.8</span>Bitwise NOT Operator ( <code>~</code> )</h1>
<emu-clause id="sec-bitwise-not-operator-runtime-semantics-evaluation">
<h1><span class="secnum">12.5.8.1</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="UnaryExpression" collapsed="">
<emu-nt><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="07d36a79"><emu-t>~</emu-t><emu-nt id="_ref_10461"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>expr</var> be the result of evaluating <emu-nt id="_ref_10462"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt>.</li><li>Let <var>oldValue</var> be ?&nbsp;<emu-xref aoid="ToInt32" id="_ref_3418"><a href="#sec-toint32">ToInt32</a></emu-xref>(? <emu-xref aoid="GetValue" id="_ref_3419"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>expr</var>)).</li><li>Return the result of applying bitwise complement to <var>oldValue</var>. The result is a signed 32-bit integer.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-logical-not-operator">
<h1><span class="secnum">12.5.9</span>Logical NOT Operator ( <code>!</code> )</h1>
<emu-clause id="sec-logical-not-operator-runtime-semantics-evaluation">
<h1><span class="secnum">12.5.9.1</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="UnaryExpression" collapsed="">
<emu-nt><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b8b0af72"><emu-t>!</emu-t><emu-nt id="_ref_10463"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>expr</var> be the result of evaluating <emu-nt id="_ref_10464"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt>.</li><li>Let <var>oldValue</var> be <emu-xref aoid="ToBoolean" id="_ref_3420"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="GetValue" id="_ref_3421"><a href="#sec-getvalue">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">12.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="#prod-ExponentiationExpression">ExponentiationExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f16b387c"><emu-nt params="?Yield, ?Await" id="_ref_10465"><a href="#prod-UnaryExpression">UnaryExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="48e152b6"><emu-nt params="?Yield, ?Await" id="_ref_10466"><a href="#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_10467"><a href="#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-static-semantics-isfunctiondefinition">
<h1><span class="secnum">12.6.1</span>Static Semantics: IsFunctionDefinition</h1>
<emu-see-also-para op="IsFunctionDefinition"></emu-see-also-para>
<emu-grammar><emu-production name="ExponentiationExpression">
<emu-nt><a href="#prod-ExponentiationExpression">ExponentiationExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d1905fcc"><emu-nt id="_ref_10468"><a href="#prod-UpdateExpression">UpdateExpression</a></emu-nt><emu-t>**</emu-t><emu-nt id="_ref_10469"><a href="#prod-ExponentiationExpression">ExponentiationExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause oldids="sec-exp-operator-static-semantics-isvalidsimpleassignmenttarget" id="sec-exp-operator-static-semantics-assignmenttargettype">
<span id="sec-exp-operator-static-semantics-isvalidsimpleassignmenttarget"></span><h1><span class="secnum">12.6.2</span>Static Semantics: AssignmentTargetType</h1>
<emu-see-also-para op="AssignmentTargetType"></emu-see-also-para>
<emu-grammar><emu-production name="ExponentiationExpression">
<emu-nt><a href="#prod-ExponentiationExpression">ExponentiationExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d1905fcc"><emu-nt id="_ref_10470"><a href="#prod-UpdateExpression">UpdateExpression</a></emu-nt><emu-t>**</emu-t><emu-nt id="_ref_10471"><a href="#prod-ExponentiationExpression">ExponentiationExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-const>invalid</emu-const>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-exp-operator-runtime-semantics-evaluation">
<h1><span class="secnum">12.6.3</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="ExponentiationExpression" collapsed="">
<emu-nt><a href="#prod-ExponentiationExpression">ExponentiationExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d1905fcc"><emu-nt id="_ref_10472"><a href="#prod-UpdateExpression">UpdateExpression</a></emu-nt><emu-t>**</emu-t><emu-nt id="_ref_10473"><a href="#prod-ExponentiationExpression">ExponentiationExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>left</var> be the result of evaluating <emu-nt id="_ref_10474"><a href="#prod-UpdateExpression">UpdateExpression</a></emu-nt>.</li><li>Let <var>leftValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3422"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>left</var>).</li><li>Let <var>right</var> be the result of evaluating <emu-nt id="_ref_10475"><a href="#prod-ExponentiationExpression">ExponentiationExpression</a></emu-nt>.</li><li>Let <var>rightValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3423"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>right</var>).</li><li>Let <var>base</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_3424"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>leftValue</var>).</li><li>Let <var>exponent</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_3425"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>rightValue</var>).</li><li>Return the result of <emu-xref href="#sec-applying-the-exp-operator" title="" id="_ref_331"><a href="#sec-applying-the-exp-operator">Applying the ** operator</a></emu-xref> with <var>base</var> and <var>exponent</var> as specified in <emu-xref href="#sec-applying-the-exp-operator" id="_ref_332"><a href="#sec-applying-the-exp-operator">12.6.4</a></emu-xref>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-applying-the-exp-operator">
<h1><span class="secnum">12.6.4</span>Applying the <code>**</code> Operator</h1>
<p>
Returns an implementation-dependent approximation of the result of raising <var>base</var> to the power <var>exponent</var>.
</p>
<ul>
<li>If <var>exponent</var> is <emu-val>NaN</emu-val>, the result is <emu-val>NaN</emu-val>.</li>
<li>If <var>exponent</var> is <emu-val>+0</emu-val>, the result is 1, even if <var>base</var> is <emu-val>NaN</emu-val>.</li>
<li>If <var>exponent</var> is <emu-val>-0</emu-val>, the result is 1, even if <var>base</var> is <emu-val>NaN</emu-val>.</li>
<li>If <var>base</var> is <emu-val>NaN</emu-val> and <var>exponent</var> is nonzero, the result is <emu-val>NaN</emu-val>.</li>
<li>If <emu-xref aoid="abs" id="_ref_3426"><a href="#eqn-abs">abs</a></emu-xref>(<var>base</var>) &gt; 1 and <var>exponent</var> is <emu-val>+∞</emu-val>, the result is <emu-val>+∞</emu-val>.</li>
<li>If <emu-xref aoid="abs" id="_ref_3427"><a href="#eqn-abs">abs</a></emu-xref>(<var>base</var>) &gt; 1 and <var>exponent</var> is <emu-val>-∞</emu-val>, the result is <emu-val>+0</emu-val>.</li>
<li>If <emu-xref aoid="abs" id="_ref_3428"><a href="#eqn-abs">abs</a></emu-xref>(<var>base</var>) is 1 and <var>exponent</var> is <emu-val>+∞</emu-val>, the result is <emu-val>NaN</emu-val>.</li>
<li>If <emu-xref aoid="abs" id="_ref_3429"><a href="#eqn-abs">abs</a></emu-xref>(<var>base</var>) is 1 and <var>exponent</var> is <emu-val>-∞</emu-val>, the result is <emu-val>NaN</emu-val>.</li>
<li>If <emu-xref aoid="abs" id="_ref_3430"><a href="#eqn-abs">abs</a></emu-xref>(<var>base</var>) &lt; 1 and <var>exponent</var> is <emu-val>+∞</emu-val>, the result is <emu-val>+0</emu-val>.</li>
<li>If <emu-xref aoid="abs" id="_ref_3431"><a href="#eqn-abs">abs</a></emu-xref>(<var>base</var>) &lt; 1 and <var>exponent</var> is <emu-val>-∞</emu-val>, the result is <emu-val>+∞</emu-val>.</li>
<li>If <var>base</var> is <emu-val>+∞</emu-val> and <var>exponent</var> &gt; 0, the result is <emu-val>+∞</emu-val>.</li>
<li>If <var>base</var> is <emu-val>+∞</emu-val> and <var>exponent</var> &lt; 0, the result is <emu-val>+0</emu-val>.</li>
<li>If <var>base</var> is <emu-val>-∞</emu-val> and <var>exponent</var> &gt; 0 and <var>exponent</var> is an odd integer, the result is <emu-val>-∞</emu-val>.</li>
<li>If <var>base</var> is <emu-val>-∞</emu-val> and <var>exponent</var> &gt; 0 and <var>exponent</var> is not an odd integer, the result is <emu-val>+∞</emu-val>.</li>
<li>If <var>base</var> is <emu-val>-∞</emu-val> and <var>exponent</var> &lt; 0 and <var>exponent</var> is an odd integer, the result is <emu-val>-0</emu-val>.</li>
<li>If <var>base</var> is <emu-val>-∞</emu-val> and <var>exponent</var> &lt; 0 and <var>exponent</var> is not an odd integer, the result is <emu-val>+0</emu-val>.</li>
<li>If <var>base</var> is <emu-val>+0</emu-val> and <var>exponent</var> &gt; 0, the result is <emu-val>+0</emu-val>.</li>
<li>If <var>base</var> is <emu-val>+0</emu-val> and <var>exponent</var> &lt; 0, the result is <emu-val>+∞</emu-val>.</li>
<li>If <var>base</var> is <emu-val>-0</emu-val> and <var>exponent</var> &gt; 0 and <var>exponent</var> is an odd integer, the result is <emu-val>-0</emu-val>.</li>
<li>If <var>base</var> is <emu-val>-0</emu-val> and <var>exponent</var> &gt; 0 and <var>exponent</var> is not an odd integer, the result is <emu-val>+0</emu-val>.</li>
<li>If <var>base</var> is <emu-val>-0</emu-val> and <var>exponent</var> &lt; 0 and <var>exponent</var> is an odd integer, the result is <emu-val>-∞</emu-val>.</li>
<li>If <var>base</var> is <emu-val>-0</emu-val> and <var>exponent</var> &lt; 0 and <var>exponent</var> is not an odd integer, the result is <emu-val>+∞</emu-val>.</li>
<li>If <var>base</var> &lt; 0 and <var>base</var> is finite and <var>exponent</var> is finite and <var>exponent</var> is not an integer, the result is <emu-val>NaN</emu-val>.</li>
</ul>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The result of <var>base</var> <code>**</code> <var>exponent</var> when <var>base</var> is <emu-val>1</emu-val> or <emu-val>-1</emu-val> and <var>exponent</var> is <emu-val>+Infinity</emu-val> or <emu-val>-Infinity</emu-val> differs from IEEE 754-2008. The first edition of ECMAScript specified a result of <emu-val>NaN</emu-val> for this operation, whereas later versions of IEEE 754-2008 specified <emu-val>1</emu-val>. The historical ECMAScript behaviour is preserved for compatibility reasons.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-multiplicative-operators">
<h1><span class="secnum">12.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="#prod-MultiplicativeExpression">MultiplicativeExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="677909b0"><emu-nt params="?Yield, ?Await" id="_ref_10476"><a href="#prod-ExponentiationExpression">ExponentiationExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="c0a3a33f"><emu-nt params="?Yield, ?Await" id="_ref_10477"><a href="#prod-MultiplicativeExpression">MultiplicativeExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt id="_ref_10478"><a href="#prod-MultiplicativeOperator">MultiplicativeOperator</a></emu-nt><emu-nt params="?Yield, ?Await" id="_ref_10479"><a href="#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="#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-clause id="sec-multiplicative-operators-static-semantics-isfunctiondefinition">
<h1><span class="secnum">12.7.1</span>Static Semantics: IsFunctionDefinition</h1>
<emu-see-also-para op="IsFunctionDefinition"></emu-see-also-para>
<emu-grammar><emu-production name="MultiplicativeExpression" collapsed="">
<emu-nt><a href="#prod-MultiplicativeExpression">MultiplicativeExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="fb9fe2a0"><emu-nt id="_ref_10480"><a href="#prod-MultiplicativeExpression">MultiplicativeExpression</a></emu-nt><emu-nt id="_ref_10481"><a href="#prod-MultiplicativeOperator">MultiplicativeOperator</a></emu-nt><emu-nt id="_ref_10482"><a href="#prod-ExponentiationExpression">ExponentiationExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause oldids="sec-multiplicative-operators-static-semantics-isvalidsimpleassignmenttarget" id="sec-multiplicative-operators-static-semantics-assignmenttargettype">
<span id="sec-multiplicative-operators-static-semantics-isvalidsimpleassignmenttarget"></span><h1><span class="secnum">12.7.2</span>Static Semantics: AssignmentTargetType</h1>
<emu-see-also-para op="AssignmentTargetType"></emu-see-also-para>
<emu-grammar><emu-production name="MultiplicativeExpression" collapsed="">
<emu-nt><a href="#prod-MultiplicativeExpression">MultiplicativeExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="fb9fe2a0"><emu-nt id="_ref_10483"><a href="#prod-MultiplicativeExpression">MultiplicativeExpression</a></emu-nt><emu-nt id="_ref_10484"><a href="#prod-MultiplicativeOperator">MultiplicativeOperator</a></emu-nt><emu-nt id="_ref_10485"><a href="#prod-ExponentiationExpression">ExponentiationExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-const>invalid</emu-const>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-multiplicative-operators-runtime-semantics-evaluation">
<h1><span class="secnum">12.7.3</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="MultiplicativeExpression" collapsed="">
<emu-nt><a href="#prod-MultiplicativeExpression">MultiplicativeExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="fb9fe2a0"><emu-nt id="_ref_10486"><a href="#prod-MultiplicativeExpression">MultiplicativeExpression</a></emu-nt><emu-nt id="_ref_10487"><a href="#prod-MultiplicativeOperator">MultiplicativeOperator</a></emu-nt><emu-nt id="_ref_10488"><a href="#prod-ExponentiationExpression">ExponentiationExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>left</var> be the result of evaluating <emu-nt id="_ref_10489"><a href="#prod-MultiplicativeExpression">MultiplicativeExpression</a></emu-nt>.</li><li>Let <var>leftValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3432"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>left</var>).</li><li>Let <var>right</var> be the result of evaluating <emu-nt id="_ref_10490"><a href="#prod-ExponentiationExpression">ExponentiationExpression</a></emu-nt>.</li><li>Let <var>rightValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3433"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>right</var>).</li><li>Let <var>lnum</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_3434"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>leftValue</var>).</li><li>Let <var>rnum</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_3435"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>rightValue</var>).</li><li>Return the result of applying the <emu-nt id="_ref_10491"><a href="#prod-MultiplicativeOperator">MultiplicativeOperator</a></emu-nt> (<code>*</code>, <code>/</code>, or <code>%</code>) to <var>lnum</var> and <var>rnum</var> as specified in <emu-xref href="#sec-applying-the-mul-operator" id="_ref_333"><a href="#sec-applying-the-mul-operator">12.7.3.1</a></emu-xref>, <emu-xref href="#sec-applying-the-div-operator" id="_ref_334"><a href="#sec-applying-the-div-operator">12.7.3.2</a></emu-xref>, or <emu-xref href="#sec-applying-the-mod-operator" id="_ref_335"><a href="#sec-applying-the-mod-operator">12.7.3.3</a></emu-xref>.
</li></ol></emu-alg>
<emu-clause id="sec-applying-the-mul-operator">
<h1><span class="secnum">12.7.3.1</span>Applying the <code>*</code> Operator</h1>
<p>The <code>*</code> <emu-nt id="_ref_10492"><a href="#prod-MultiplicativeOperator">MultiplicativeOperator</a></emu-nt>
performs multiplication, producing the product of its operands.
Multiplication is commutative. Multiplication is not always associative
in ECMAScript, because of finite precision.</p>
<p>The result of a floating-point multiplication is governed by the rules of IEEE 754-2008 binary double-precision arithmetic:</p>
<ul>
<li>
If either operand is <emu-val>NaN</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
<li>
The sign of the result is positive if both operands have the
same sign, negative if the operands have different signs.
</li>
<li>
Multiplication of an infinity by a zero results in <emu-val>NaN</emu-val>.
</li>
<li>
Multiplication of an infinity by an infinity results in an
infinity. The sign is determined by the rule already stated above.
</li>
<li>
Multiplication of an infinity by a finite nonzero value
results in a signed infinity. The sign is determined by the rule already
stated above.
</li>
<li>
In the remaining cases, where neither an infinity nor <emu-val>NaN</emu-val>
is involved, the product is computed and rounded to the nearest
representable value using IEEE 754-2008 round to nearest, ties to even
mode. If the magnitude is too large to represent, the result is then an
infinity of appropriate sign. If the magnitude is too small to
represent, the result is then a zero of appropriate sign. The ECMAScript
language requires support of gradual underflow as defined by IEEE
754-2008.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-applying-the-div-operator">
<h1><span class="secnum">12.7.3.2</span>Applying the <code>/</code> Operator</h1>
<p>The <code>/</code> <emu-nt id="_ref_10493"><a href="#prod-MultiplicativeOperator">MultiplicativeOperator</a></emu-nt>
performs division, producing the quotient of its operands. The left
operand is the dividend and the right operand is the divisor. ECMAScript
does not perform integer division. The operands and result of all
division operations are double-precision floating-point numbers. The
result of division is determined by the specification of IEEE 754-2008
arithmetic:</p>
<ul>
<li>
If either operand is <emu-val>NaN</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
<li>
The sign of the result is positive if both operands have the
same sign, negative if the operands have different signs.
</li>
<li>
Division of an infinity by an infinity results in <emu-val>NaN</emu-val>.
</li>
<li>
Division of an infinity by a zero results in an infinity. The sign is determined by the rule already stated above.
</li>
<li>
Division of an infinity by a nonzero finite value results in
a signed infinity. The sign is determined by the rule already stated
above.
</li>
<li>
Division of a finite value by an infinity results in zero. The sign is determined by the rule already stated above.
</li>
<li>
Division of a zero by a zero results in <emu-val>NaN</emu-val>; division of zero by any other finite value results in zero, with the sign determined by the rule already stated above.
</li>
<li>
Division of a nonzero finite value by a zero results in a
signed infinity. The sign is determined by the rule already stated
above.
</li>
<li>
In the remaining cases, where neither an infinity, nor a zero, nor <emu-val>NaN</emu-val>
is involved, the quotient is computed and rounded to the nearest
representable value using IEEE 754-2008 round to nearest, ties to even
mode. If the magnitude is too large to represent, the operation
overflows; the result is then an infinity of appropriate sign. If the
magnitude is too small to represent, the operation underflows and the
result is a zero of the appropriate sign. The ECMAScript language
requires support of gradual underflow as defined by IEEE 754-2008.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-applying-the-mod-operator">
<h1><span class="secnum">12.7.3.3</span>Applying the <code>%</code> Operator</h1>
<p>The <code>%</code> <emu-nt id="_ref_10494"><a href="#prod-MultiplicativeOperator">MultiplicativeOperator</a></emu-nt>
yields the remainder of its operands from an implied division; the left
operand is the dividend and the right operand is the divisor.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>In C and C++, the remainder operator accepts only integral operands; in ECMAScript, it also accepts floating-point operands.</p>
</div></emu-note>
<p>The result of a floating-point remainder operation as computed by the <code>%</code>
operator is not the same as the “remainder” operation defined by IEEE
754-2008. The IEEE 754-2008 “remainder” operation computes the remainder
from a rounding division, not a truncating division, and so its
behaviour is not analogous to that of the usual integer remainder
operator. Instead the ECMAScript language defines <code>%</code> on
floating-point operations to behave in a manner analogous to that of the
Java integer remainder operator; this may be compared with the C
library function fmod.</p>
<p>The result of an ECMAScript floating-point remainder operation is determined by the rules of IEEE arithmetic:</p>
<ul>
<li>
If either operand is <emu-val>NaN</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
<li>
The sign of the result equals the sign of the dividend.
</li>
<li>
If the dividend is an infinity, or the divisor is a zero, or both, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If the dividend is finite and the divisor is an infinity, the result equals the dividend.
</li>
<li>
If the dividend is a zero and the divisor is nonzero and finite, the result is the same as the dividend.
</li>
<li>
In the remaining cases, where neither an infinity, nor a zero, nor <emu-val>NaN</emu-val>
is involved, the floating-point remainder r from a dividend n and a
divisor d is defined by the mathematical relation r = n - (d × q) where q
is an integer that is negative only if n/d is negative and positive
only if n/d is positive, and whose magnitude is as large as possible
without exceeding the magnitude of the true mathematical quotient of n
and d. r is computed and rounded to the nearest representable value
using IEEE 754-2008 round to nearest, ties to even mode.
</li>
</ul>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-additive-operators">
<h1><span class="secnum">12.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="#prod-AdditiveExpression">AdditiveExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f6af3d13"><emu-nt params="?Yield, ?Await" id="_ref_10495"><a href="#prod-MultiplicativeExpression">MultiplicativeExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="79f3759c"><emu-nt params="?Yield, ?Await" id="_ref_10496"><a href="#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_10497"><a href="#prod-MultiplicativeExpression">MultiplicativeExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="e309a7b9"><emu-nt params="?Yield, ?Await" id="_ref_10498"><a href="#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_10499"><a href="#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-additive-operators-static-semantics-isfunctiondefinition">
<h1><span class="secnum">12.8.1</span>Static Semantics: IsFunctionDefinition</h1>
<emu-see-also-para op="IsFunctionDefinition"></emu-see-also-para>
<emu-grammar><emu-production name="AdditiveExpression">
<emu-nt><a href="#prod-AdditiveExpression">AdditiveExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0e497b17"><emu-nt id="_ref_10500"><a href="#prod-AdditiveExpression">AdditiveExpression</a></emu-nt><emu-t>+</emu-t><emu-nt id="_ref_10501"><a href="#prod-MultiplicativeExpression">MultiplicativeExpression</a></emu-nt></emu-rhs>
<emu-rhs a="ee054414"><emu-nt id="_ref_10502"><a href="#prod-AdditiveExpression">AdditiveExpression</a></emu-nt><emu-t>-</emu-t><emu-nt id="_ref_10503"><a href="#prod-MultiplicativeExpression">MultiplicativeExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause oldids="sec-additive-operators-static-semantics-isvalidsimpleassignmenttarget" id="sec-additive-operators-static-semantics-assignmenttargettype">
<span id="sec-additive-operators-static-semantics-isvalidsimpleassignmenttarget"></span><h1><span class="secnum">12.8.2</span>Static Semantics: AssignmentTargetType</h1>
<emu-see-also-para op="AssignmentTargetType"></emu-see-also-para>
<emu-grammar><emu-production name="AdditiveExpression">
<emu-nt><a href="#prod-AdditiveExpression">AdditiveExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0e497b17"><emu-nt id="_ref_10504"><a href="#prod-AdditiveExpression">AdditiveExpression</a></emu-nt><emu-t>+</emu-t><emu-nt id="_ref_10505"><a href="#prod-MultiplicativeExpression">MultiplicativeExpression</a></emu-nt></emu-rhs>
<emu-rhs a="ee054414"><emu-nt id="_ref_10506"><a href="#prod-AdditiveExpression">AdditiveExpression</a></emu-nt><emu-t>-</emu-t><emu-nt id="_ref_10507"><a href="#prod-MultiplicativeExpression">MultiplicativeExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-const>invalid</emu-const>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-addition-operator-plus">
<h1><span class="secnum">12.8.3</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">
<h1><span class="secnum">12.8.3.1</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="AdditiveExpression" collapsed="">
<emu-nt><a href="#prod-AdditiveExpression">AdditiveExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0e497b17"><emu-nt id="_ref_10508"><a href="#prod-AdditiveExpression">AdditiveExpression</a></emu-nt><emu-t>+</emu-t><emu-nt id="_ref_10509"><a href="#prod-MultiplicativeExpression">MultiplicativeExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>lref</var> be the result of evaluating <emu-nt id="_ref_10510"><a href="#prod-AdditiveExpression">AdditiveExpression</a></emu-nt>.</li><li>Let <var>lval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3436"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>lref</var>).</li><li>Let <var>rref</var> be the result of evaluating <emu-nt id="_ref_10511"><a href="#prod-MultiplicativeExpression">MultiplicativeExpression</a></emu-nt>.</li><li>Let <var>rval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3437"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>rref</var>).</li><li>Let <var>lprim</var> be ?&nbsp;<emu-xref aoid="ToPrimitive" id="_ref_3438"><a href="#sec-toprimitive">ToPrimitive</a></emu-xref>(<var>lval</var>).</li><li>Let <var>rprim</var> be ?&nbsp;<emu-xref aoid="ToPrimitive" id="_ref_3439"><a href="#sec-toprimitive">ToPrimitive</a></emu-xref>(<var>rval</var>).</li><li>If <emu-xref aoid="Type" id="_ref_3440"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>lprim</var>) is String or <emu-xref aoid="Type" id="_ref_3441"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>rprim</var>) is String, then<ol><li>Let <var>lstr</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_3442"><a href="#sec-tostring">ToString</a></emu-xref>(<var>lprim</var>).</li><li>Let <var>rstr</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_3443"><a href="#sec-tostring">ToString</a></emu-xref>(<var>rprim</var>).</li><li>Return the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_3444"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>lstr</var> and <var>rstr</var>.</li></ol></li><li>Let <var>lnum</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_3445"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>lprim</var>).</li><li>Let <var>rnum</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_3446"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>rprim</var>).</li><li>Return the result of applying the addition operation to <var>lnum</var> and <var>rnum</var>. See the Note below <emu-xref href="#sec-applying-the-additive-operators-to-numbers" id="_ref_336"><a href="#sec-applying-the-additive-operators-to-numbers">12.8.5</a></emu-xref>.
</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_3447"><a href="#sec-toprimitive">ToPrimitive</a></emu-xref>
in steps 5 and 6. All standard objects except Date objects handle the
absence of a hint as if the hint Number were given; Date objects handle
the absence of a hint as if the hint String were given. Exotic objects
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 7 differs from step 3 of the <emu-xref aoid="Abstract Relational Comparison" id="_ref_3448"><a href="#sec-abstract-relational-comparison">Abstract Relational Comparison</a></emu-xref> algorithm, by using the logical-or operation instead of the logical-and operation.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-subtraction-operator-minus">
<h1><span class="secnum">12.8.4</span>The Subtraction Operator ( <code>-</code> )</h1>
<emu-clause id="sec-subtraction-operator-minus-runtime-semantics-evaluation">
<h1><span class="secnum">12.8.4.1</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="AdditiveExpression" collapsed="">
<emu-nt><a href="#prod-AdditiveExpression">AdditiveExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ee054414"><emu-nt id="_ref_10512"><a href="#prod-AdditiveExpression">AdditiveExpression</a></emu-nt><emu-t>-</emu-t><emu-nt id="_ref_10513"><a href="#prod-MultiplicativeExpression">MultiplicativeExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>lref</var> be the result of evaluating <emu-nt id="_ref_10514"><a href="#prod-AdditiveExpression">AdditiveExpression</a></emu-nt>.</li><li>Let <var>lval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3449"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>lref</var>).</li><li>Let <var>rref</var> be the result of evaluating <emu-nt id="_ref_10515"><a href="#prod-MultiplicativeExpression">MultiplicativeExpression</a></emu-nt>.</li><li>Let <var>rval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3450"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>rref</var>).</li><li>Let <var>lnum</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_3451"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>lval</var>).</li><li>Let <var>rnum</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_3452"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>rval</var>).</li><li>Return the result of applying the subtraction operation to <var>lnum</var> and <var>rnum</var>. See the note below <emu-xref href="#sec-applying-the-additive-operators-to-numbers" id="_ref_337"><a href="#sec-applying-the-additive-operators-to-numbers">12.8.5</a></emu-xref>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-applying-the-additive-operators-to-numbers">
<h1><span class="secnum">12.8.5</span>Applying the Additive Operators to Numbers</h1>
<p>The <code>+</code> operator performs addition when applied to two operands of numeric type, producing the sum of the operands. The <code>-</code> operator performs subtraction, producing the difference of two numeric operands.</p>
<p>Addition is a commutative operation, but not always associative.</p>
<p>The result of an addition is determined using the rules of IEEE 754-2008 binary double-precision arithmetic:</p>
<ul>
<li>
If either operand is <emu-val>NaN</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
<li>
The sum of two infinities of opposite sign is <emu-val>NaN</emu-val>.
</li>
<li>
The sum of two infinities of the same sign is the infinity of that sign.
</li>
<li>
The sum of an infinity and a finite value is equal to the infinite operand.
</li>
<li>
The sum of two negative zeroes is <emu-val>-0</emu-val>. The sum of two positive zeroes, or of two zeroes of opposite sign, is <emu-val>+0</emu-val>.
</li>
<li>
The sum of a zero and a nonzero finite value is equal to the nonzero operand.
</li>
<li>
The sum of two nonzero finite values of the same magnitude and opposite sign is <emu-val>+0</emu-val>.
</li>
<li>
In the remaining cases, where neither an infinity, nor a zero, nor <emu-val>NaN</emu-val>
is involved, and the operands have the same sign or have different
magnitudes, the sum is computed and rounded to the nearest representable
value using IEEE 754-2008 round to nearest, ties to even mode. If the
magnitude is too large to represent, the operation overflows and the
result is then an infinity of appropriate sign. The ECMAScript language
requires support of gradual underflow as defined by IEEE 754-2008.
</li>
</ul>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <code>-</code> operator performs subtraction when applied
to two operands of numeric type, producing the difference of its
operands; the left operand is the minuend and the right operand is the
subtrahend. Given numeric operands <code>a</code> and <code>b</code>, it is always the case that <code>a - b</code> produces the same result as <code>a + (-b)</code>.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-bitwise-shift-operators">
<h1><span class="secnum">12.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="#prod-ShiftExpression">ShiftExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e6661e6a"><emu-nt params="?Yield, ?Await" id="_ref_10516"><a href="#prod-AdditiveExpression">AdditiveExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="211de3c8"><emu-nt params="?Yield, ?Await" id="_ref_10517"><a href="#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_10518"><a href="#prod-AdditiveExpression">AdditiveExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="0c11aafb"><emu-nt params="?Yield, ?Await" id="_ref_10519"><a href="#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_10520"><a href="#prod-AdditiveExpression">AdditiveExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="cb144d91"><emu-nt params="?Yield, ?Await" id="_ref_10521"><a href="#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_10522"><a href="#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-bitwise-shift-operators-static-semantics-isfunctiondefinition">
<h1><span class="secnum">12.9.1</span>Static Semantics: IsFunctionDefinition</h1>
<emu-see-also-para op="IsFunctionDefinition"></emu-see-also-para>
<emu-grammar><emu-production name="ShiftExpression">
<emu-nt><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b46f532a"><emu-nt id="_ref_10523"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt><emu-t>&lt;&lt;</emu-t><emu-nt id="_ref_10524"><a href="#prod-AdditiveExpression">AdditiveExpression</a></emu-nt></emu-rhs>
<emu-rhs a="548327f3"><emu-nt id="_ref_10525"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt><emu-t>&gt;&gt;</emu-t><emu-nt id="_ref_10526"><a href="#prod-AdditiveExpression">AdditiveExpression</a></emu-nt></emu-rhs>
<emu-rhs a="37f16eac"><emu-nt id="_ref_10527"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt><emu-t>&gt;&gt;&gt;</emu-t><emu-nt id="_ref_10528"><a href="#prod-AdditiveExpression">AdditiveExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause oldids="sec-bitwise-shift-operators-static-semantics-isvalidsimpleassignmenttarget" id="sec-bitwise-shift-operators-static-semantics-assignmenttargettype">
<span id="sec-bitwise-shift-operators-static-semantics-isvalidsimpleassignmenttarget"></span><h1><span class="secnum">12.9.2</span>Static Semantics: AssignmentTargetType</h1>
<emu-see-also-para op="AssignmentTargetType"></emu-see-also-para>
<emu-grammar><emu-production name="ShiftExpression">
<emu-nt><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b46f532a"><emu-nt id="_ref_10529"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt><emu-t>&lt;&lt;</emu-t><emu-nt id="_ref_10530"><a href="#prod-AdditiveExpression">AdditiveExpression</a></emu-nt></emu-rhs>
<emu-rhs a="548327f3"><emu-nt id="_ref_10531"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt><emu-t>&gt;&gt;</emu-t><emu-nt id="_ref_10532"><a href="#prod-AdditiveExpression">AdditiveExpression</a></emu-nt></emu-rhs>
<emu-rhs a="37f16eac"><emu-nt id="_ref_10533"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt><emu-t>&gt;&gt;&gt;</emu-t><emu-nt id="_ref_10534"><a href="#prod-AdditiveExpression">AdditiveExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-const>invalid</emu-const>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-left-shift-operator">
<h1><span class="secnum">12.9.3</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">
<h1><span class="secnum">12.9.3.1</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="ShiftExpression" collapsed="">
<emu-nt><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b46f532a"><emu-nt id="_ref_10535"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt><emu-t>&lt;&lt;</emu-t><emu-nt id="_ref_10536"><a href="#prod-AdditiveExpression">AdditiveExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>lref</var> be the result of evaluating <emu-nt id="_ref_10537"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt>.</li><li>Let <var>lval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3453"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>lref</var>).</li><li>Let <var>rref</var> be the result of evaluating <emu-nt id="_ref_10538"><a href="#prod-AdditiveExpression">AdditiveExpression</a></emu-nt>.</li><li>Let <var>rval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3454"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>rref</var>).</li><li>Let <var>lnum</var> be ?&nbsp;<emu-xref aoid="ToInt32" id="_ref_3455"><a href="#sec-toint32">ToInt32</a></emu-xref>(<var>lval</var>).</li><li>Let <var>rnum</var> be ?&nbsp;<emu-xref aoid="ToUint32" id="_ref_3456"><a href="#sec-touint32">ToUint32</a></emu-xref>(<var>rval</var>).</li><li>Let <var>shiftCount</var> be the result of masking out all but the least significant 5 bits of <var>rnum</var>, that is, compute <var>rnum</var> &amp; 0x1F.</li><li>Return the result of left shifting <var>lnum</var> by <var>shiftCount</var> bits. The result is a signed 32-bit integer.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-signed-right-shift-operator">
<h1><span class="secnum">12.9.4</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">
<h1><span class="secnum">12.9.4.1</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="ShiftExpression" collapsed="">
<emu-nt><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="548327f3"><emu-nt id="_ref_10539"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt><emu-t>&gt;&gt;</emu-t><emu-nt id="_ref_10540"><a href="#prod-AdditiveExpression">AdditiveExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>lref</var> be the result of evaluating <emu-nt id="_ref_10541"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt>.</li><li>Let <var>lval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3457"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>lref</var>).</li><li>Let <var>rref</var> be the result of evaluating <emu-nt id="_ref_10542"><a href="#prod-AdditiveExpression">AdditiveExpression</a></emu-nt>.</li><li>Let <var>rval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3458"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>rref</var>).</li><li>Let <var>lnum</var> be ?&nbsp;<emu-xref aoid="ToInt32" id="_ref_3459"><a href="#sec-toint32">ToInt32</a></emu-xref>(<var>lval</var>).</li><li>Let <var>rnum</var> be ?&nbsp;<emu-xref aoid="ToUint32" id="_ref_3460"><a href="#sec-touint32">ToUint32</a></emu-xref>(<var>rval</var>).</li><li>Let <var>shiftCount</var> be the result of masking out all but the least significant 5 bits of <var>rnum</var>, that is, compute <var>rnum</var> &amp; 0x1F.</li><li>Return the result of performing a sign-extending right shift of <var>lnum</var> by <var>shiftCount</var> bits. The most significant bit is propagated. The result is a signed 32-bit integer.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-unsigned-right-shift-operator">
<h1><span class="secnum">12.9.5</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">
<h1><span class="secnum">12.9.5.1</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="ShiftExpression" collapsed="">
<emu-nt><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="37f16eac"><emu-nt id="_ref_10543"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt><emu-t>&gt;&gt;&gt;</emu-t><emu-nt id="_ref_10544"><a href="#prod-AdditiveExpression">AdditiveExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>lref</var> be the result of evaluating <emu-nt id="_ref_10545"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt>.</li><li>Let <var>lval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3461"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>lref</var>).</li><li>Let <var>rref</var> be the result of evaluating <emu-nt id="_ref_10546"><a href="#prod-AdditiveExpression">AdditiveExpression</a></emu-nt>.</li><li>Let <var>rval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3462"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>rref</var>).</li><li>Let <var>lnum</var> be ?&nbsp;<emu-xref aoid="ToUint32" id="_ref_3463"><a href="#sec-touint32">ToUint32</a></emu-xref>(<var>lval</var>).</li><li>Let <var>rnum</var> be ?&nbsp;<emu-xref aoid="ToUint32" id="_ref_3464"><a href="#sec-touint32">ToUint32</a></emu-xref>(<var>rval</var>).</li><li>Let <var>shiftCount</var> be the result of masking out all but the least significant 5 bits of <var>rnum</var>, that is, compute <var>rnum</var> &amp; 0x1F.</li><li>Return the result of performing a zero-filling right shift of <var>lnum</var> by <var>shiftCount</var> bits. Vacated bits are filled with zero. The result is an unsigned 32-bit integer.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-relational-operators">
<h1><span class="secnum">12.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="#prod-RelationalExpression">RelationalExpression</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="12fcef98"><emu-nt params="?Yield, ?Await" id="_ref_10547"><a href="#prod-ShiftExpression">ShiftExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="4699dc26"><emu-nt params="?In, ?Yield, ?Await" id="_ref_10548"><a href="#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_10549"><a href="#prod-ShiftExpression">ShiftExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="e2226dd2"><emu-nt params="?In, ?Yield, ?Await" id="_ref_10550"><a href="#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_10551"><a href="#prod-ShiftExpression">ShiftExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="45a2035d"><emu-nt params="?In, ?Yield, ?Await" id="_ref_10552"><a href="#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_10553"><a href="#prod-ShiftExpression">ShiftExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="b8dbaec1"><emu-nt params="?In, ?Yield, ?Await" id="_ref_10554"><a href="#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_10555"><a href="#prod-ShiftExpression">ShiftExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="8a60d81a"><emu-nt params="?In, ?Yield, ?Await" id="_ref_10556"><a href="#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_10557"><a href="#prod-ShiftExpression">ShiftExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="b629d07c" constraints="+In"><emu-constraints>[+In]</emu-constraints><emu-nt params="+In, ?Yield, ?Await" id="_ref_10558"><a href="#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_10559"><a href="#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-static-semantics-isfunctiondefinition">
<h1><span class="secnum">12.10.1</span>Static Semantics: IsFunctionDefinition</h1>
<emu-see-also-para op="IsFunctionDefinition"></emu-see-also-para>
<emu-grammar><emu-production name="RelationalExpression">
<emu-nt><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d216c92a"><emu-nt id="_ref_10560"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt><emu-t>&lt;</emu-t><emu-nt id="_ref_10561"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt></emu-rhs>
<emu-rhs a="1998981b"><emu-nt id="_ref_10562"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt><emu-t>&gt;</emu-t><emu-nt id="_ref_10563"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt></emu-rhs>
<emu-rhs a="29c91375"><emu-nt id="_ref_10564"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt><emu-t>&lt;=</emu-t><emu-nt id="_ref_10565"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt></emu-rhs>
<emu-rhs a="ddc529a7"><emu-nt id="_ref_10566"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt><emu-t>&gt;=</emu-t><emu-nt id="_ref_10567"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt></emu-rhs>
<emu-rhs a="d440bdac"><emu-nt id="_ref_10568"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt><emu-t>instanceof</emu-t><emu-nt id="_ref_10569"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt></emu-rhs>
<emu-rhs a="f66b493e"><emu-nt id="_ref_10570"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt><emu-t>in</emu-t><emu-nt id="_ref_10571"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause oldids="sec-relational-operators-static-semantics-isvalidsimpleassignmenttarget" id="sec-relational-operators-static-semantics-assignmenttargettype">
<span id="sec-relational-operators-static-semantics-isvalidsimpleassignmenttarget"></span><h1><span class="secnum">12.10.2</span>Static Semantics: AssignmentTargetType</h1>
<emu-see-also-para op="AssignmentTargetType"></emu-see-also-para>
<emu-grammar><emu-production name="RelationalExpression">
<emu-nt><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d216c92a"><emu-nt id="_ref_10572"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt><emu-t>&lt;</emu-t><emu-nt id="_ref_10573"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt></emu-rhs>
<emu-rhs a="1998981b"><emu-nt id="_ref_10574"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt><emu-t>&gt;</emu-t><emu-nt id="_ref_10575"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt></emu-rhs>
<emu-rhs a="29c91375"><emu-nt id="_ref_10576"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt><emu-t>&lt;=</emu-t><emu-nt id="_ref_10577"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt></emu-rhs>
<emu-rhs a="ddc529a7"><emu-nt id="_ref_10578"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt><emu-t>&gt;=</emu-t><emu-nt id="_ref_10579"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt></emu-rhs>
<emu-rhs a="d440bdac"><emu-nt id="_ref_10580"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt><emu-t>instanceof</emu-t><emu-nt id="_ref_10581"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt></emu-rhs>
<emu-rhs a="f66b493e"><emu-nt id="_ref_10582"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt><emu-t>in</emu-t><emu-nt id="_ref_10583"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-const>invalid</emu-const>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-relational-operators-runtime-semantics-evaluation">
<h1><span class="secnum">12.10.3</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="RelationalExpression" collapsed="">
<emu-nt><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d216c92a"><emu-nt id="_ref_10584"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt><emu-t>&lt;</emu-t><emu-nt id="_ref_10585"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>lref</var> be the result of evaluating <emu-nt id="_ref_10586"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt>.</li><li>Let <var>lval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3465"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>lref</var>).</li><li>Let <var>rref</var> be the result of evaluating <emu-nt id="_ref_10587"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt>.</li><li>Let <var>rval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3466"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>rref</var>).</li><li>Let <var>r</var> be the result of performing <emu-xref aoid="Abstract Relational Comparison" id="_ref_3467"><a href="#sec-abstract-relational-comparison">Abstract Relational Comparison</a></emu-xref> <var>lval</var> &lt; <var>rval</var>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3468"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>r</var>).</li><li>If <var>r</var> is <emu-val>undefined</emu-val>, return <emu-val>false</emu-val>. Otherwise, return <var>r</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="RelationalExpression" collapsed="">
<emu-nt><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1998981b"><emu-nt id="_ref_10588"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt><emu-t>&gt;</emu-t><emu-nt id="_ref_10589"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>lref</var> be the result of evaluating <emu-nt id="_ref_10590"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt>.</li><li>Let <var>lval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3469"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>lref</var>).</li><li>Let <var>rref</var> be the result of evaluating <emu-nt id="_ref_10591"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt>.</li><li>Let <var>rval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3470"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>rref</var>).</li><li>Let <var>r</var> be the result of performing <emu-xref aoid="Abstract Relational Comparison" id="_ref_3471"><a href="#sec-abstract-relational-comparison">Abstract Relational Comparison</a></emu-xref> <var>rval</var> &lt; <var>lval</var> with <var>LeftFirst</var> equal to <emu-val>false</emu-val>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3472"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>r</var>).</li><li>If <var>r</var> is <emu-val>undefined</emu-val>, return <emu-val>false</emu-val>. Otherwise, return <var>r</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="RelationalExpression" collapsed="">
<emu-nt><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="29c91375"><emu-nt id="_ref_10592"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt><emu-t>&lt;=</emu-t><emu-nt id="_ref_10593"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>lref</var> be the result of evaluating <emu-nt id="_ref_10594"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt>.</li><li>Let <var>lval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3473"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>lref</var>).</li><li>Let <var>rref</var> be the result of evaluating <emu-nt id="_ref_10595"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt>.</li><li>Let <var>rval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3474"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>rref</var>).</li><li>Let <var>r</var> be the result of performing <emu-xref aoid="Abstract Relational Comparison" id="_ref_3475"><a href="#sec-abstract-relational-comparison">Abstract Relational Comparison</a></emu-xref> <var>rval</var> &lt; <var>lval</var> with <var>LeftFirst</var> equal to <emu-val>false</emu-val>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3476"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>r</var>).</li><li>If <var>r</var> is <emu-val>true</emu-val> or <emu-val>undefined</emu-val>, return <emu-val>false</emu-val>. Otherwise, return <emu-val>true</emu-val>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="RelationalExpression" collapsed="">
<emu-nt><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ddc529a7"><emu-nt id="_ref_10596"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt><emu-t>&gt;=</emu-t><emu-nt id="_ref_10597"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>lref</var> be the result of evaluating <emu-nt id="_ref_10598"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt>.</li><li>Let <var>lval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3477"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>lref</var>).</li><li>Let <var>rref</var> be the result of evaluating <emu-nt id="_ref_10599"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt>.</li><li>Let <var>rval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3478"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>rref</var>).</li><li>Let <var>r</var> be the result of performing <emu-xref aoid="Abstract Relational Comparison" id="_ref_3479"><a href="#sec-abstract-relational-comparison">Abstract Relational Comparison</a></emu-xref> <var>lval</var> &lt; <var>rval</var>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3480"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>r</var>).</li><li>If <var>r</var> is <emu-val>true</emu-val> or <emu-val>undefined</emu-val>, return <emu-val>false</emu-val>. Otherwise, return <emu-val>true</emu-val>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="RelationalExpression" collapsed="">
<emu-nt><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d440bdac"><emu-nt id="_ref_10600"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt><emu-t>instanceof</emu-t><emu-nt id="_ref_10601"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>lref</var> be the result of evaluating <emu-nt id="_ref_10602"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt>.</li><li>Let <var>lval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3481"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>lref</var>).</li><li>Let <var>rref</var> be the result of evaluating <emu-nt id="_ref_10603"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt>.</li><li>Let <var>rval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3482"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>rref</var>).</li><li>Return ?&nbsp;<emu-xref aoid="InstanceofOperator" id="_ref_3483"><a href="#sec-instanceofoperator">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="#prod-RelationalExpression">RelationalExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f66b493e"><emu-nt id="_ref_10604"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt><emu-t>in</emu-t><emu-nt id="_ref_10605"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>lref</var> be the result of evaluating <emu-nt id="_ref_10606"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt>.</li><li>Let <var>lval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3484"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>lref</var>).</li><li>Let <var>rref</var> be the result of evaluating <emu-nt id="_ref_10607"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt>.</li><li>Let <var>rval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3485"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>rref</var>).</li><li>If <emu-xref aoid="Type" id="_ref_3486"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>rval</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return ?&nbsp;<emu-xref aoid="HasProperty" id="_ref_3487"><a href="#sec-hasproperty">HasProperty</a></emu-xref>(<var>rval</var>, <emu-xref aoid="ToPropertyKey" id="_ref_3488"><a href="#sec-topropertykey">ToPropertyKey</a></emu-xref>(<var>lval</var>)).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-instanceofoperator" aoid="InstanceofOperator">
<h1><span class="secnum">12.10.4</span>Runtime Semantics: InstanceofOperator ( <var>V</var>, <var>target</var> )</h1>
<p>The abstract operation InstanceofOperator(<var>V</var>, <var>target</var>) implements the generic algorithm for determining if ECMAScript value <var>V</var> is an instance of object <var>target</var> either by consulting <var>target</var>'s @@hasinstance method or, if absent, determining whether the value of <var>target</var>'s <code>prototype</code> property is present in <var>V</var>'s prototype chain. This abstract operation performs the following steps:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_3489"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>target</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>instOfHandler</var> be ?&nbsp;<emu-xref aoid="GetMethod" id="_ref_3490"><a href="#sec-getmethod">GetMethod</a></emu-xref>(<var>target</var>, @@hasInstance).</li><li>If <var>instOfHandler</var> is not <emu-val>undefined</emu-val>, then<ol><li>Return <emu-xref aoid="ToBoolean" id="_ref_3491"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="Call" id="_ref_3492"><a href="#sec-call">Call</a></emu-xref>(<var>instOfHandler</var>, <var>target</var>, « <var>V</var> »)).</li></ol></li><li>If <emu-xref aoid="IsCallable" id="_ref_3493"><a href="#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>Return ?&nbsp;<emu-xref aoid="OrdinaryHasInstance" id="_ref_3494"><a href="#sec-ordinaryhasinstance">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 4 and 5 provide compatibility with previous editions of ECMAScript that did not use a @@hasInstance method to define the <code>instanceof</code> operator semantics. If an object does not define or inherit @@hasInstance 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">12.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="#prod-EqualityExpression">EqualityExpression</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="9280448d"><emu-nt params="?In, ?Yield, ?Await" id="_ref_10608"><a href="#prod-RelationalExpression">RelationalExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="8d7a6c47"><emu-nt params="?In, ?Yield, ?Await" id="_ref_10609"><a href="#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_10610"><a href="#prod-RelationalExpression">RelationalExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="20f203e6"><emu-nt params="?In, ?Yield, ?Await" id="_ref_10611"><a href="#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_10612"><a href="#prod-RelationalExpression">RelationalExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="17b08b45"><emu-nt params="?In, ?Yield, ?Await" id="_ref_10613"><a href="#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_10614"><a href="#prod-RelationalExpression">RelationalExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="9f9056ff"><emu-nt params="?In, ?Yield, ?Await" id="_ref_10615"><a href="#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_10616"><a href="#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-static-semantics-isfunctiondefinition">
<h1><span class="secnum">12.11.1</span>Static Semantics: IsFunctionDefinition</h1>
<emu-see-also-para op="IsFunctionDefinition"></emu-see-also-para>
<emu-grammar><emu-production name="EqualityExpression">
<emu-nt><a href="#prod-EqualityExpression">EqualityExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="757a342c"><emu-nt id="_ref_10617"><a href="#prod-EqualityExpression">EqualityExpression</a></emu-nt><emu-t>==</emu-t><emu-nt id="_ref_10618"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt></emu-rhs>
<emu-rhs a="70ddad59"><emu-nt id="_ref_10619"><a href="#prod-EqualityExpression">EqualityExpression</a></emu-nt><emu-t>!=</emu-t><emu-nt id="_ref_10620"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt></emu-rhs>
<emu-rhs a="e0753bf6"><emu-nt id="_ref_10621"><a href="#prod-EqualityExpression">EqualityExpression</a></emu-nt><emu-t>===</emu-t><emu-nt id="_ref_10622"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt></emu-rhs>
<emu-rhs a="2113edaf"><emu-nt id="_ref_10623"><a href="#prod-EqualityExpression">EqualityExpression</a></emu-nt><emu-t>!==</emu-t><emu-nt id="_ref_10624"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause oldids="sec-equality-operators-static-semantics-isvalidsimpleassignmenttarget" id="sec-equality-operators-static-semantics-assignmenttargettype">
<span id="sec-equality-operators-static-semantics-isvalidsimpleassignmenttarget"></span><h1><span class="secnum">12.11.2</span>Static Semantics: AssignmentTargetType</h1>
<emu-see-also-para op="AssignmentTargetType"></emu-see-also-para>
<emu-grammar><emu-production name="EqualityExpression">
<emu-nt><a href="#prod-EqualityExpression">EqualityExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="757a342c"><emu-nt id="_ref_10625"><a href="#prod-EqualityExpression">EqualityExpression</a></emu-nt><emu-t>==</emu-t><emu-nt id="_ref_10626"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt></emu-rhs>
<emu-rhs a="70ddad59"><emu-nt id="_ref_10627"><a href="#prod-EqualityExpression">EqualityExpression</a></emu-nt><emu-t>!=</emu-t><emu-nt id="_ref_10628"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt></emu-rhs>
<emu-rhs a="e0753bf6"><emu-nt id="_ref_10629"><a href="#prod-EqualityExpression">EqualityExpression</a></emu-nt><emu-t>===</emu-t><emu-nt id="_ref_10630"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt></emu-rhs>
<emu-rhs a="2113edaf"><emu-nt id="_ref_10631"><a href="#prod-EqualityExpression">EqualityExpression</a></emu-nt><emu-t>!==</emu-t><emu-nt id="_ref_10632"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-const>invalid</emu-const>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-equality-operators-runtime-semantics-evaluation">
<h1><span class="secnum">12.11.3</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="EqualityExpression" collapsed="">
<emu-nt><a href="#prod-EqualityExpression">EqualityExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="757a342c"><emu-nt id="_ref_10633"><a href="#prod-EqualityExpression">EqualityExpression</a></emu-nt><emu-t>==</emu-t><emu-nt id="_ref_10634"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>lref</var> be the result of evaluating <emu-nt id="_ref_10635"><a href="#prod-EqualityExpression">EqualityExpression</a></emu-nt>.</li><li>Let <var>lval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3495"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>lref</var>).</li><li>Let <var>rref</var> be the result of evaluating <emu-nt id="_ref_10636"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt>.</li><li>Let <var>rval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3496"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>rref</var>).</li><li>Return the result of performing <emu-xref aoid="Abstract Equality Comparison" id="_ref_3497"><a href="#sec-abstract-equality-comparison">Abstract Equality Comparison</a></emu-xref> <var>rval</var> == <var>lval</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="EqualityExpression" collapsed="">
<emu-nt><a href="#prod-EqualityExpression">EqualityExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="70ddad59"><emu-nt id="_ref_10637"><a href="#prod-EqualityExpression">EqualityExpression</a></emu-nt><emu-t>!=</emu-t><emu-nt id="_ref_10638"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>lref</var> be the result of evaluating <emu-nt id="_ref_10639"><a href="#prod-EqualityExpression">EqualityExpression</a></emu-nt>.</li><li>Let <var>lval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3498"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>lref</var>).</li><li>Let <var>rref</var> be the result of evaluating <emu-nt id="_ref_10640"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt>.</li><li>Let <var>rval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3499"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>rref</var>).</li><li>Let <var>r</var> be the result of performing <emu-xref aoid="Abstract Equality Comparison" id="_ref_3500"><a href="#sec-abstract-equality-comparison">Abstract Equality Comparison</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>. Otherwise, return <emu-val>true</emu-val>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="EqualityExpression" collapsed="">
<emu-nt><a href="#prod-EqualityExpression">EqualityExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e0753bf6"><emu-nt id="_ref_10641"><a href="#prod-EqualityExpression">EqualityExpression</a></emu-nt><emu-t>===</emu-t><emu-nt id="_ref_10642"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>lref</var> be the result of evaluating <emu-nt id="_ref_10643"><a href="#prod-EqualityExpression">EqualityExpression</a></emu-nt>.</li><li>Let <var>lval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3501"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>lref</var>).</li><li>Let <var>rref</var> be the result of evaluating <emu-nt id="_ref_10644"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt>.</li><li>Let <var>rval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3502"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>rref</var>).</li><li>Return the result of performing <emu-xref aoid="Strict Equality Comparison" id="_ref_3503"><a href="#sec-strict-equality-comparison">Strict Equality Comparison</a></emu-xref> <var>rval</var> === <var>lval</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="EqualityExpression" collapsed="">
<emu-nt><a href="#prod-EqualityExpression">EqualityExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="2113edaf"><emu-nt id="_ref_10645"><a href="#prod-EqualityExpression">EqualityExpression</a></emu-nt><emu-t>!==</emu-t><emu-nt id="_ref_10646"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>lref</var> be the result of evaluating <emu-nt id="_ref_10647"><a href="#prod-EqualityExpression">EqualityExpression</a></emu-nt>.</li><li>Let <var>lval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3504"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>lref</var>).</li><li>Let <var>rref</var> be the result of evaluating <emu-nt id="_ref_10648"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt>.</li><li>Let <var>rval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3505"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>rref</var>).</li><li>Let <var>r</var> be the result of performing <emu-xref aoid="Strict Equality Comparison" id="_ref_3506"><a href="#sec-strict-equality-comparison">Strict Equality Comparison</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>. Otherwise, return <emu-val>true</emu-val>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>Given the above definition of equality:</p>
<ul>
<li>
String comparison can be forced by: <code>"" + a == "" + b</code>.
</li>
<li>
Numeric comparison can be forced by: <code>+a == +b</code>.
</li>
<li>
Boolean comparison can be forced by: <code>!a == !b</code>.
</li>
</ul>
</div></emu-note>
<emu-note><span class="note">Note 2</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 3</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 4</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">12.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="#prod-BitwiseANDExpression">BitwiseANDExpression</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5c5abb87"><emu-nt params="?In, ?Yield, ?Await" id="_ref_10649"><a href="#prod-EqualityExpression">EqualityExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="969f6da7"><emu-nt params="?In, ?Yield, ?Await" id="_ref_10650"><a href="#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_10651"><a href="#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="#prod-BitwiseXORExpression">BitwiseXORExpression</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a8caf125"><emu-nt params="?In, ?Yield, ?Await" id="_ref_10652"><a href="#prod-BitwiseANDExpression">BitwiseANDExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="d7124a93"><emu-nt params="?In, ?Yield, ?Await" id="_ref_10653"><a href="#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_10654"><a href="#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="#prod-BitwiseORExpression">BitwiseORExpression</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="24ec6c16"><emu-nt params="?In, ?Yield, ?Await" id="_ref_10655"><a href="#prod-BitwiseXORExpression">BitwiseXORExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="ad046143"><emu-nt params="?In, ?Yield, ?Await" id="_ref_10656"><a href="#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_10657"><a href="#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-static-semantics-isfunctiondefinition">
<h1><span class="secnum">12.12.1</span>Static Semantics: IsFunctionDefinition</h1>
<emu-see-also-para op="IsFunctionDefinition"></emu-see-also-para>
<emu-grammar><emu-production name="BitwiseANDExpression" collapsed="">
<emu-nt><a href="#prod-BitwiseANDExpression">BitwiseANDExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a90dedc2"><emu-nt id="_ref_10658"><a href="#prod-BitwiseANDExpression">BitwiseANDExpression</a></emu-nt><emu-t>&amp;</emu-t><emu-nt id="_ref_10659"><a href="#prod-EqualityExpression">EqualityExpression</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="BitwiseXORExpression" collapsed="">
<emu-nt><a href="#prod-BitwiseXORExpression">BitwiseXORExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b463172c"><emu-nt id="_ref_10660"><a href="#prod-BitwiseXORExpression">BitwiseXORExpression</a></emu-nt><emu-t>^</emu-t><emu-nt id="_ref_10661"><a href="#prod-BitwiseANDExpression">BitwiseANDExpression</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="BitwiseORExpression" collapsed="">
<emu-nt><a href="#prod-BitwiseORExpression">BitwiseORExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="016dfa90"><emu-nt id="_ref_10662"><a href="#prod-BitwiseORExpression">BitwiseORExpression</a></emu-nt><emu-t>|</emu-t><emu-nt id="_ref_10663"><a href="#prod-BitwiseXORExpression">BitwiseXORExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause oldids="sec-binary-bitwise-operators-static-semantics-isvalidsimpleassignmenttarget" id="sec-binary-bitwise-operators-static-semantics-assignmenttargettype">
<span id="sec-binary-bitwise-operators-static-semantics-isvalidsimpleassignmenttarget"></span><h1><span class="secnum">12.12.2</span>Static Semantics: AssignmentTargetType</h1>
<emu-see-also-para op="AssignmentTargetType"></emu-see-also-para>
<emu-grammar><emu-production name="BitwiseANDExpression" collapsed="">
<emu-nt><a href="#prod-BitwiseANDExpression">BitwiseANDExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a90dedc2"><emu-nt id="_ref_10664"><a href="#prod-BitwiseANDExpression">BitwiseANDExpression</a></emu-nt><emu-t>&amp;</emu-t><emu-nt id="_ref_10665"><a href="#prod-EqualityExpression">EqualityExpression</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="BitwiseXORExpression" collapsed="">
<emu-nt><a href="#prod-BitwiseXORExpression">BitwiseXORExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b463172c"><emu-nt id="_ref_10666"><a href="#prod-BitwiseXORExpression">BitwiseXORExpression</a></emu-nt><emu-t>^</emu-t><emu-nt id="_ref_10667"><a href="#prod-BitwiseANDExpression">BitwiseANDExpression</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="BitwiseORExpression" collapsed="">
<emu-nt><a href="#prod-BitwiseORExpression">BitwiseORExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="016dfa90"><emu-nt id="_ref_10668"><a href="#prod-BitwiseORExpression">BitwiseORExpression</a></emu-nt><emu-t>|</emu-t><emu-nt id="_ref_10669"><a href="#prod-BitwiseXORExpression">BitwiseXORExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-const>invalid</emu-const>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-binary-bitwise-operators-runtime-semantics-evaluation">
<h1><span class="secnum">12.12.3</span>Runtime Semantics: Evaluation</h1>
<p>The production <emu-grammar type="example"><emu-production name="A" collapsed="" id="prod-A" class=" inline">
<emu-nt><a href="#prod-A">A</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="262863af"><emu-nt id="_ref_10670"><a href="#prod-A">A</a></emu-nt><emu-t placeholder="">@</emu-t><emu-nt>B</emu-nt></emu-rhs>
</emu-production></emu-grammar>, where @ is one of the bitwise operators in the productions above, is evaluated as follows:</p>
<emu-alg><ol><li>Let <var>lref</var> be the result of evaluating <var>A</var>.</li><li>Let <var>lval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3507"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>lref</var>).</li><li>Let <var>rref</var> be the result of evaluating <var>B</var>.</li><li>Let <var>rval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3508"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>rref</var>).</li><li>Let <var>lnum</var> be ?&nbsp;<emu-xref aoid="ToInt32" id="_ref_3509"><a href="#sec-toint32">ToInt32</a></emu-xref>(<var>lval</var>).</li><li>Let <var>rnum</var> be ?&nbsp;<emu-xref aoid="ToInt32" id="_ref_3510"><a href="#sec-toint32">ToInt32</a></emu-xref>(<var>rval</var>).</li><li>Return the result of applying the bitwise operator @ to <var>lnum</var> and <var>rnum</var>. The result is a signed 32-bit integer.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-binary-logical-operators">
<h1><span class="secnum">12.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="#prod-LogicalANDExpression">LogicalANDExpression</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0bfde639"><emu-nt params="?In, ?Yield, ?Await" id="_ref_10671"><a href="#prod-BitwiseORExpression">BitwiseORExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="1a88a9db"><emu-nt params="?In, ?Yield, ?Await" id="_ref_10672"><a href="#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_10673"><a href="#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="#prod-LogicalORExpression">LogicalORExpression</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b886f268"><emu-nt params="?In, ?Yield, ?Await" id="_ref_10674"><a href="#prod-LogicalANDExpression">LogicalANDExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="276ba099"><emu-nt params="?In, ?Yield, ?Await" id="_ref_10675"><a href="#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_10676"><a href="#prod-LogicalANDExpression">LogicalANDExpression</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-static-semantics-isfunctiondefinition">
<h1><span class="secnum">12.13.1</span>Static Semantics: IsFunctionDefinition</h1>
<emu-see-also-para op="IsFunctionDefinition"></emu-see-also-para>
<emu-grammar><emu-production name="LogicalANDExpression" collapsed="">
<emu-nt><a href="#prod-LogicalANDExpression">LogicalANDExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="2186e2aa"><emu-nt id="_ref_10677"><a href="#prod-LogicalANDExpression">LogicalANDExpression</a></emu-nt><emu-t>&amp;&amp;</emu-t><emu-nt id="_ref_10678"><a href="#prod-BitwiseORExpression">BitwiseORExpression</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="LogicalORExpression" collapsed="">
<emu-nt><a href="#prod-LogicalORExpression">LogicalORExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b6453dd9"><emu-nt id="_ref_10679"><a href="#prod-LogicalORExpression">LogicalORExpression</a></emu-nt><emu-t>||</emu-t><emu-nt id="_ref_10680"><a href="#prod-LogicalANDExpression">LogicalANDExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause oldids="sec-binary-logical-operators-static-semantics-isvalidsimpleassignmenttarget" id="sec-binary-logical-operators-static-semantics-assignmenttargettype">
<span id="sec-binary-logical-operators-static-semantics-isvalidsimpleassignmenttarget"></span><h1><span class="secnum">12.13.2</span>Static Semantics: AssignmentTargetType</h1>
<emu-see-also-para op="AssignmentTargetType"></emu-see-also-para>
<emu-grammar><emu-production name="LogicalANDExpression" collapsed="">
<emu-nt><a href="#prod-LogicalANDExpression">LogicalANDExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="2186e2aa"><emu-nt id="_ref_10681"><a href="#prod-LogicalANDExpression">LogicalANDExpression</a></emu-nt><emu-t>&amp;&amp;</emu-t><emu-nt id="_ref_10682"><a href="#prod-BitwiseORExpression">BitwiseORExpression</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="LogicalORExpression" collapsed="">
<emu-nt><a href="#prod-LogicalORExpression">LogicalORExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b6453dd9"><emu-nt id="_ref_10683"><a href="#prod-LogicalORExpression">LogicalORExpression</a></emu-nt><emu-t>||</emu-t><emu-nt id="_ref_10684"><a href="#prod-LogicalANDExpression">LogicalANDExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-const>invalid</emu-const>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-binary-logical-operators-runtime-semantics-evaluation">
<h1><span class="secnum">12.13.3</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="LogicalANDExpression" collapsed="">
<emu-nt><a href="#prod-LogicalANDExpression">LogicalANDExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="2186e2aa"><emu-nt id="_ref_10685"><a href="#prod-LogicalANDExpression">LogicalANDExpression</a></emu-nt><emu-t>&amp;&amp;</emu-t><emu-nt id="_ref_10686"><a href="#prod-BitwiseORExpression">BitwiseORExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>lref</var> be the result of evaluating <emu-nt id="_ref_10687"><a href="#prod-LogicalANDExpression">LogicalANDExpression</a></emu-nt>.</li><li>Let <var>lval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3511"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>lref</var>).</li><li>Let <var>lbool</var> be <emu-xref aoid="ToBoolean" id="_ref_3512"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(<var>lval</var>).</li><li>If <var>lbool</var> is <emu-val>false</emu-val>, return <var>lval</var>.</li><li>Let <var>rref</var> be the result of evaluating <emu-nt id="_ref_10688"><a href="#prod-BitwiseORExpression">BitwiseORExpression</a></emu-nt>.</li><li>Return ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3513"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>rref</var>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="LogicalORExpression" collapsed="">
<emu-nt><a href="#prod-LogicalORExpression">LogicalORExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b6453dd9"><emu-nt id="_ref_10689"><a href="#prod-LogicalORExpression">LogicalORExpression</a></emu-nt><emu-t>||</emu-t><emu-nt id="_ref_10690"><a href="#prod-LogicalANDExpression">LogicalANDExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>lref</var> be the result of evaluating <emu-nt id="_ref_10691"><a href="#prod-LogicalORExpression">LogicalORExpression</a></emu-nt>.</li><li>Let <var>lval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3514"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>lref</var>).</li><li>Let <var>lbool</var> be <emu-xref aoid="ToBoolean" id="_ref_3515"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(<var>lval</var>).</li><li>If <var>lbool</var> is <emu-val>true</emu-val>, return <var>lval</var>.</li><li>Let <var>rref</var> be the result of evaluating <emu-nt id="_ref_10692"><a href="#prod-LogicalANDExpression">LogicalANDExpression</a></emu-nt>.</li><li>Return ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3516"><a href="#sec-getvalue">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">12.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="#prod-ConditionalExpression">ConditionalExpression</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="71405bab"><emu-nt params="?In, ?Yield, ?Await" id="_ref_10693"><a href="#prod-LogicalORExpression">LogicalORExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="aa7f1805"><emu-nt params="?In, ?Yield, ?Await" id="_ref_10694"><a href="#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_10695"><a href="#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_10696"><a href="#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_10697"><a href="#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_10698"><a href="#prod-Expression">Expression</a></emu-nt> but restrict the third expression to be a <emu-nt id="_ref_10699"><a href="#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-static-semantics-isfunctiondefinition">
<h1><span class="secnum">12.14.1</span>Static Semantics: IsFunctionDefinition</h1>
<emu-see-also-para op="IsFunctionDefinition"></emu-see-also-para>
<emu-grammar><emu-production name="ConditionalExpression" collapsed="">
<emu-nt><a href="#prod-ConditionalExpression">ConditionalExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="42ec48bb"><emu-nt id="_ref_10700"><a href="#prod-LogicalORExpression">LogicalORExpression</a></emu-nt><emu-t>?</emu-t><emu-nt id="_ref_10701"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>:</emu-t><emu-nt id="_ref_10702"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause oldids="sec-conditional-operator-static-semantics-isvalidsimpleassignmenttarget" id="sec-conditional-operator-static-semantics-assignmenttargettype">
<span id="sec-conditional-operator-static-semantics-isvalidsimpleassignmenttarget"></span><h1><span class="secnum">12.14.2</span>Static Semantics: AssignmentTargetType</h1>
<emu-see-also-para op="AssignmentTargetType"></emu-see-also-para>
<emu-grammar><emu-production name="ConditionalExpression" collapsed="">
<emu-nt><a href="#prod-ConditionalExpression">ConditionalExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="42ec48bb"><emu-nt id="_ref_10703"><a href="#prod-LogicalORExpression">LogicalORExpression</a></emu-nt><emu-t>?</emu-t><emu-nt id="_ref_10704"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>:</emu-t><emu-nt id="_ref_10705"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-const>invalid</emu-const>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-conditional-operator-runtime-semantics-evaluation">
<h1><span class="secnum">12.14.3</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="ConditionalExpression" collapsed="">
<emu-nt><a href="#prod-ConditionalExpression">ConditionalExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="42ec48bb"><emu-nt id="_ref_10706"><a href="#prod-LogicalORExpression">LogicalORExpression</a></emu-nt><emu-t>?</emu-t><emu-nt id="_ref_10707"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>:</emu-t><emu-nt id="_ref_10708"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>lref</var> be the result of evaluating <emu-nt id="_ref_10709"><a href="#prod-LogicalORExpression">LogicalORExpression</a></emu-nt>.</li><li>Let <var>lval</var> be <emu-xref aoid="ToBoolean" id="_ref_3517"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="GetValue" id="_ref_3518"><a href="#sec-getvalue">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 the result of evaluating the first <emu-nt id="_ref_10710"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Return ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3519"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>trueRef</var>).</li></ol></li><li>Else,<ol><li>Let <var>falseRef</var> be the result of evaluating the second <emu-nt id="_ref_10711"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Return ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3520"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>falseRef</var>).
</li></ol></li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-assignment-operators">
<h1><span class="secnum">12.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="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="82aa12dc"><emu-nt params="?In, ?Yield, ?Await" id="_ref_10712"><a href="#prod-ConditionalExpression">ConditionalExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="5d4d9305" constraints="+Yield"><emu-constraints>[+Yield]</emu-constraints><emu-nt params="?In, ?Await" id="_ref_10713"><a href="#prod-YieldExpression">YieldExpression</a><emu-mods><emu-params>[?In, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="336dea1a"><emu-nt params="?In, ?Yield, ?Await" id="_ref_10714"><a href="#prod-ArrowFunction">ArrowFunction</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="de1f51e8"><emu-nt params="?In, ?Yield, ?Await" id="_ref_10715"><a href="#prod-AsyncArrowFunction">AsyncArrowFunction</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="assignment"><emu-nt params="?Yield, ?Await" id="_ref_10716"><a href="#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_10717"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="dc2bc97e"><emu-nt params="?Yield, ?Await" id="_ref_10718"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt id="_ref_10719"><a href="#prod-AssignmentOperator">AssignmentOperator</a></emu-nt><emu-nt params="?In, ?Yield, ?Await" id="_ref_10720"><a href="#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="#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">12.15.1</span>Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="AssignmentExpression" collapsed="">
<emu-nt><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8a33cee0"><emu-nt id="_ref_10721"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>=</emu-t><emu-nt id="_ref_10722"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if <emu-nt id="_ref_10723"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is either an <emu-nt id="_ref_10724"><a href="#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> or an <emu-nt id="_ref_10725"><a href="#prod-ArrayLiteral">ArrayLiteral</a></emu-nt> and <emu-nt id="_ref_10726"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is not <emu-xref href="#sec-syntactic-grammar" id="_ref_3521"><a href="#sec-syntactic-grammar">covering</a></emu-xref> an <emu-nt id="_ref_10727"><a href="#prod-AssignmentPattern">AssignmentPattern</a></emu-nt>.
</li>
<li>
It is an early <emu-xref href="#sec-reference-specification-type" id="_ref_3522"><a href="#sec-reference-specification-type">Reference</a></emu-xref> Error if <emu-nt id="_ref_10728"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is neither an <emu-nt id="_ref_10729"><a href="#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> nor an <emu-nt id="_ref_10730"><a href="#prod-ArrayLiteral">ArrayLiteral</a></emu-nt> and AssignmentTargetType of <emu-nt id="_ref_10731"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is <emu-const>invalid</emu-const>.
</li>
<li>
It is an early Syntax Error if <emu-nt id="_ref_10732"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is neither an <emu-nt id="_ref_10733"><a href="#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> nor an <emu-nt id="_ref_10734"><a href="#prod-ArrayLiteral">ArrayLiteral</a></emu-nt> and AssignmentTargetType of <emu-nt id="_ref_10735"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is <emu-const>strict</emu-const>.
</li>
</ul>
<emu-grammar><emu-production name="AssignmentExpression" collapsed="">
<emu-nt><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5f3a8747"><emu-nt id="_ref_10736"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-nt id="_ref_10737"><a href="#prod-AssignmentOperator">AssignmentOperator</a></emu-nt><emu-nt id="_ref_10738"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is an early <emu-xref href="#sec-reference-specification-type" id="_ref_3523"><a href="#sec-reference-specification-type">Reference</a></emu-xref> Error if AssignmentTargetType of <emu-nt id="_ref_10739"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is <emu-const>invalid</emu-const>.
</li>
<li>
It is an early Syntax Error if AssignmentTargetType of <emu-nt id="_ref_10740"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is <emu-const>strict</emu-const>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-assignment-operators-static-semantics-isfunctiondefinition">
<h1><span class="secnum">12.15.2</span>Static Semantics: IsFunctionDefinition</h1>
<emu-see-also-para op="IsFunctionDefinition"></emu-see-also-para>
<emu-grammar><emu-production name="AssignmentExpression">
<emu-nt><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="2bdf3b10"><emu-nt id="_ref_10741"><a href="#prod-ArrowFunction">ArrowFunction</a></emu-nt></emu-rhs>
<emu-rhs a="6b79045b"><emu-nt id="_ref_10742"><a href="#prod-AsyncArrowFunction">AsyncArrowFunction</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="AssignmentExpression">
<emu-nt><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5202c84b"><emu-nt id="_ref_10743"><a href="#prod-YieldExpression">YieldExpression</a></emu-nt></emu-rhs>
<emu-rhs a="8a33cee0"><emu-nt id="_ref_10744"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>=</emu-t><emu-nt id="_ref_10745"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
<emu-rhs a="5f3a8747"><emu-nt id="_ref_10746"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-nt id="_ref_10747"><a href="#prod-AssignmentOperator">AssignmentOperator</a></emu-nt><emu-nt id="_ref_10748"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause oldids="sec-assignment-operators-static-semantics-isvalidsimpleassignmenttarget" id="sec-assignment-operators-static-semantics-assignmenttargettype">
<span id="sec-assignment-operators-static-semantics-isvalidsimpleassignmenttarget"></span><h1><span class="secnum">12.15.3</span>Static Semantics: AssignmentTargetType</h1>
<emu-see-also-para op="AssignmentTargetType"></emu-see-also-para>
<emu-grammar><emu-production name="AssignmentExpression">
<emu-nt><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5202c84b"><emu-nt id="_ref_10749"><a href="#prod-YieldExpression">YieldExpression</a></emu-nt></emu-rhs>
<emu-rhs a="2bdf3b10"><emu-nt id="_ref_10750"><a href="#prod-ArrowFunction">ArrowFunction</a></emu-nt></emu-rhs>
<emu-rhs a="6b79045b"><emu-nt id="_ref_10751"><a href="#prod-AsyncArrowFunction">AsyncArrowFunction</a></emu-nt></emu-rhs>
<emu-rhs a="8a33cee0"><emu-nt id="_ref_10752"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>=</emu-t><emu-nt id="_ref_10753"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
<emu-rhs a="5f3a8747"><emu-nt id="_ref_10754"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-nt id="_ref_10755"><a href="#prod-AssignmentOperator">AssignmentOperator</a></emu-nt><emu-nt id="_ref_10756"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-const>invalid</emu-const>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-assignment-operators-runtime-semantics-evaluation">
<h1><span class="secnum">12.15.4</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="AssignmentExpression" collapsed="">
<emu-nt><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8a33cee0"><emu-nt id="_ref_10757"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>=</emu-t><emu-nt id="_ref_10758"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <emu-nt id="_ref_10759"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is neither an <emu-nt id="_ref_10760"><a href="#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> nor an <emu-nt id="_ref_10761"><a href="#prod-ArrayLiteral">ArrayLiteral</a></emu-nt>, then<ol><li>Let <var>lref</var> be the result of evaluating <emu-nt id="_ref_10762"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3524"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>lref</var>).</li><li>If <emu-xref aoid="IsAnonymousFunctionDefinition" id="_ref_3525"><a href="#sec-isanonymousfunctiondefinition">IsAnonymousFunctionDefinition</a></emu-xref>(<emu-nt id="_ref_10763"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>) and IsIdentifierRef of <emu-nt id="_ref_10764"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> are both <emu-val>true</emu-val>, then<ol><li>Let <var>rval</var> be the result of performing NamedEvaluation for <emu-nt id="_ref_10765"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt> with argument <emu-xref aoid="GetReferencedName" id="_ref_3526"><a href="#sec-getreferencedname">GetReferencedName</a></emu-xref>(<var>lref</var>).</li></ol></li><li>Else,<ol><li>Let <var>rref</var> be the result of evaluating <emu-nt id="_ref_10766"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Let <var>rval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3527"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>rref</var>).</li></ol></li><li>Perform ?&nbsp;<emu-xref aoid="PutValue" id="_ref_3528"><a href="#sec-putvalue">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_10767"><a href="#prod-AssignmentPattern">AssignmentPattern</a></emu-nt> that is <emu-xref href="#sec-syntactic-grammar" id="_ref_3529"><a href="#sec-syntactic-grammar">covered</a></emu-xref> by <emu-nt id="_ref_10768"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>.</li><li>Let <var>rref</var> be the result of evaluating <emu-nt id="_ref_10769"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Let <var>rval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3530"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>rref</var>).</li><li>Perform ? DestructuringAssignmentEvaluation of <var>assignmentPattern</var> using <var>rval</var> as the argument.</li><li>Return <var>rval</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="AssignmentExpression" collapsed="">
<emu-nt><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5f3a8747"><emu-nt id="_ref_10770"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-nt id="_ref_10771"><a href="#prod-AssignmentOperator">AssignmentOperator</a></emu-nt><emu-nt id="_ref_10772"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>lref</var> be the result of evaluating <emu-nt id="_ref_10773"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>.</li><li>Let <var>lval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3531"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>lref</var>).</li><li>Let <var>rref</var> be the result of evaluating <emu-nt id="_ref_10774"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Let <var>rval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3532"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>rref</var>).</li><li>Let <var>op</var> be the <code>@</code> where <emu-nt id="_ref_10775"><a href="#prod-AssignmentOperator">AssignmentOperator</a></emu-nt> is <code>@=</code>.</li><li>Let <var>r</var> be the result of applying <var>op</var> to <var>lval</var> and <var>rval</var> as if evaluating the expression <var>lval</var> <var>op</var> <var>rval</var>.</li><li>Perform ?&nbsp;<emu-xref aoid="PutValue" id="_ref_3533"><a href="#sec-putvalue">PutValue</a></emu-xref>(<var>lref</var>, <var>r</var>).</li><li>Return <var>r</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>When an assignment occurs within <emu-xref href="#sec-strict-mode-code" id="_ref_3534"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, it is a runtime error if <var>lref</var> in step 1.f of the first algorithm or step 7 of the second algorithm it is an unresolvable reference. If it is, a <emu-val>ReferenceError</emu-val> exception is thrown. The <emu-nt id="_ref_10776"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> also may not be a reference to a <emu-xref href="#sec-object-type" id="_ref_3535"><a href="#sec-object-type">data property</a></emu-xref> with the attribute value { [[Writable]]: <emu-val>false</emu-val> }, to an <emu-xref href="#sec-object-type" id="_ref_3536"><a href="#sec-object-type">accessor property</a></emu-xref> with the attribute value { [[Set]]: <emu-val>undefined</emu-val> }, nor to a non-existent property of an object for which the <emu-xref aoid="IsExtensible" id="_ref_3537"><a href="#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-destructuring-assignment">
<h1><span class="secnum">12.15.5</span>Destructuring Assignment</h1>
<h2>Supplemental Syntax</h2>
<p>In certain circumstances when processing an instance of the production <emu-grammar><emu-production name="AssignmentExpression" collapsed="" class=" inline">
<emu-nt><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8a33cee0"><emu-nt id="_ref_10777"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>=</emu-t><emu-nt id="_ref_10778"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> the following grammar is used to refine the interpretation of <emu-nt id="_ref_10779"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>.</p>
<emu-grammar type="definition"><emu-production name="AssignmentPattern" params="Yield, Await" id="prod-AssignmentPattern">
<emu-nt params="Yield, Await"><a href="#prod-AssignmentPattern">AssignmentPattern</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ed6d3857"><emu-nt params="?Yield, ?Await" id="_ref_10780"><a href="#prod-ObjectAssignmentPattern">ObjectAssignmentPattern</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="4b6571dd"><emu-nt params="?Yield, ?Await" id="_ref_10781"><a href="#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="#prod-ObjectAssignmentPattern">ObjectAssignmentPattern</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><emu-t>{</emu-t><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="6cdfdd77"><emu-t>{</emu-t><emu-nt params="?Yield, ?Await" id="_ref_10782"><a href="#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="a1f0237d"><emu-t>{</emu-t><emu-nt params="?Yield, ?Await" id="_ref_10783"><a href="#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="740e1b2f"><emu-t>{</emu-t><emu-nt params="?Yield, ?Await" id="_ref_10784"><a href="#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_10785"><a href="#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="#prod-ArrayAssignmentPattern">ArrayAssignmentPattern</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4b8cdf0a"><emu-t>[</emu-t><emu-nt optional="" id="_ref_10786"><a href="#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt params="?Yield, ?Await" optional="" id="_ref_10787"><a href="#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="9852bd8c"><emu-t>[</emu-t><emu-nt params="?Yield, ?Await" id="_ref_10788"><a href="#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="01eac6e6"><emu-t>[</emu-t><emu-nt params="?Yield, ?Await" id="_ref_10789"><a href="#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_10790"><a href="#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt params="?Yield, ?Await" optional="" id="_ref_10791"><a href="#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="#prod-AssignmentRestProperty">AssignmentRestProperty</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="9e521814"><emu-t>...</emu-t><emu-nt params="?Yield, ?Await" id="_ref_10792"><a href="#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="#prod-AssignmentPropertyList">AssignmentPropertyList</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0fb6d7ae"><emu-nt params="?Yield, ?Await" id="_ref_10793"><a href="#prod-AssignmentProperty">AssignmentProperty</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="37340e0a"><emu-nt params="?Yield, ?Await" id="_ref_10794"><a href="#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_10795"><a href="#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="#prod-AssignmentElementList">AssignmentElementList</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e75e8ef0"><emu-nt params="?Yield, ?Await" id="_ref_10796"><a href="#prod-AssignmentElisionElement">AssignmentElisionElement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="6d59619d"><emu-nt params="?Yield, ?Await" id="_ref_10797"><a href="#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_10798"><a href="#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="#prod-AssignmentElisionElement">AssignmentElisionElement</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="72fd00bc"><emu-nt optional="" id="_ref_10799"><a href="#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt params="?Yield, ?Await" id="_ref_10800"><a href="#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="#prod-AssignmentProperty">AssignmentProperty</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c02b6a90"><emu-nt params="?Yield, ?Await" id="_ref_10801"><a href="#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_10802"><a href="#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="37ae7a6f"><emu-nt params="?Yield, ?Await" id="_ref_10803"><a href="#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_10804"><a href="#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="#prod-AssignmentElement">AssignmentElement</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8c5631c8"><emu-nt params="?Yield, ?Await" id="_ref_10805"><a href="#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_10806"><a href="#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="#prod-AssignmentRestElement">AssignmentRestElement</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="9e521814"><emu-t>...</emu-t><emu-nt params="?Yield, ?Await" id="_ref_10807"><a href="#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="#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b7b08c84"><emu-nt params="?Yield, ?Await" id="_ref_10808"><a href="#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">12.15.5.1</span>Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="AssignmentProperty" collapsed="">
<emu-nt><a href="#prod-AssignmentProperty">AssignmentProperty</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c55f7708"><emu-nt id="_ref_10809"><a href="#prod-IdentifierReference">IdentifierReference</a></emu-nt><emu-nt optional="" id="_ref_10810"><a href="#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 AssignmentTargetType of <emu-nt id="_ref_10811"><a href="#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="#prod-AssignmentRestProperty">AssignmentRestProperty</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cf470c76"><emu-t>...</emu-t><emu-nt id="_ref_10812"><a href="#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if <emu-nt id="_ref_10813"><a href="#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt> is an <emu-nt id="_ref_10814"><a href="#prod-ArrayLiteral">ArrayLiteral</a></emu-nt> or an <emu-nt id="_ref_10815"><a href="#prod-ObjectLiteral">ObjectLiteral</a></emu-nt>.
</li>
</ul>
<emu-grammar><emu-production name="DestructuringAssignmentTarget" collapsed="">
<emu-nt><a href="#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="825a817a"><emu-nt id="_ref_10816"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if <emu-nt id="_ref_10817"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is either an <emu-nt id="_ref_10818"><a href="#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> or an <emu-nt id="_ref_10819"><a href="#prod-ArrayLiteral">ArrayLiteral</a></emu-nt> and if <emu-nt id="_ref_10820"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is not <emu-xref href="#sec-syntactic-grammar" id="_ref_3538"><a href="#sec-syntactic-grammar">covering</a></emu-xref> an <emu-nt id="_ref_10821"><a href="#prod-AssignmentPattern">AssignmentPattern</a></emu-nt>.
</li>
<li>
It is a Syntax Error if <emu-nt id="_ref_10822"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is neither an <emu-nt id="_ref_10823"><a href="#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> nor an <emu-nt id="_ref_10824"><a href="#prod-ArrayLiteral">ArrayLiteral</a></emu-nt> and AssignmentTargetType(<emu-nt id="_ref_10825"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>) is not <emu-const>simple</emu-const>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-runtime-semantics-destructuringassignmentevaluation">
<h1><span class="secnum">12.15.5.2</span>Runtime Semantics: DestructuringAssignmentEvaluation</h1>
<p>With parameter <var>value</var>.</p>
<emu-grammar><emu-production name="ObjectAssignmentPattern" collapsed="">
<emu-nt><a href="#prod-ObjectAssignmentPattern">ObjectAssignmentPattern</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><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_3539"><a href="#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<var>value</var>).</li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_3540"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="ObjectAssignmentPattern">
<emu-nt><a href="#prod-ObjectAssignmentPattern">ObjectAssignmentPattern</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="02d75808"><emu-t>{</emu-t><emu-nt id="_ref_10826"><a href="#prod-AssignmentPropertyList">AssignmentPropertyList</a></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="831120ec"><emu-t>{</emu-t><emu-nt id="_ref_10827"><a href="#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_3541"><a href="#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<var>value</var>).</li><li>Perform ? PropertyDestructuringAssignmentEvaluation for <emu-nt id="_ref_10828"><a href="#prod-AssignmentPropertyList">AssignmentPropertyList</a></emu-nt> using <var>value</var> as the argument.</li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_3542"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="ArrayAssignmentPattern" collapsed="">
<emu-nt><a href="#prod-ArrayAssignmentPattern">ArrayAssignmentPattern</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="99d85234"><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_3543"><a href="#sec-getiterator">GetIterator</a></emu-xref>(<var>value</var>).</li><li>Return ?&nbsp;<emu-xref aoid="IteratorClose" id="_ref_3544"><a href="#sec-iteratorclose">IteratorClose</a></emu-xref>(<var>iteratorRecord</var>, <emu-xref aoid="NormalCompletion" id="_ref_3545"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>)).
</li></ol></emu-alg>
<emu-grammar><emu-production name="ArrayAssignmentPattern" collapsed="">
<emu-nt><a href="#prod-ArrayAssignmentPattern">ArrayAssignmentPattern</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="31ffe6b2"><emu-t>[</emu-t><emu-nt id="_ref_10829"><a href="#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_3546"><a href="#sec-getiterator">GetIterator</a></emu-xref>(<var>value</var>).</li><li>Let <var>result</var> be the result of performing IteratorDestructuringAssignmentEvaluation of <emu-nt id="_ref_10830"><a href="#prod-Elision">Elision</a></emu-nt> with <var>iteratorRecord</var> as the argument.</li><li>If <var>iteratorRecord</var>.[[Done]] is <emu-val>false</emu-val>, return ?&nbsp;<emu-xref aoid="IteratorClose" id="_ref_3547"><a href="#sec-iteratorclose">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="#prod-ArrayAssignmentPattern">ArrayAssignmentPattern</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="72641904"><emu-t>[</emu-t><emu-nt optional="" id="_ref_10831"><a href="#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt id="_ref_10832"><a href="#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_3548"><a href="#sec-getiterator">GetIterator</a></emu-xref>(<var>value</var>).</li><li>If <emu-nt id="_ref_10833"><a href="#prod-Elision">Elision</a></emu-nt> is present, then<ol><li>Let <var>status</var> be the result of performing IteratorDestructuringAssignmentEvaluation of <emu-nt id="_ref_10834"><a href="#prod-Elision">Elision</a></emu-nt> with <var>iteratorRecord</var> as the argument.</li><li>If <var>status</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_3549"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, then<ol><li><emu-xref href="#assert" id="_ref_3550"><a href="#assert">Assert</a></emu-xref>: <var>iteratorRecord</var>.[[Done]] is <emu-val>true</emu-val>.</li><li>Return <emu-xref aoid="Completion" id="_ref_3551"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>status</var>).</li></ol></li></ol></li><li>Let <var>result</var> be the result of performing IteratorDestructuringAssignmentEvaluation of <emu-nt id="_ref_10835"><a href="#prod-AssignmentRestElement">AssignmentRestElement</a></emu-nt> with <var>iteratorRecord</var> as the argument.</li><li>If <var>iteratorRecord</var>.[[Done]] is <emu-val>false</emu-val>, return ?&nbsp;<emu-xref aoid="IteratorClose" id="_ref_3552"><a href="#sec-iteratorclose">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="#prod-ArrayAssignmentPattern">ArrayAssignmentPattern</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="815ecab3"><emu-t>[</emu-t><emu-nt id="_ref_10836"><a href="#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_3553"><a href="#sec-getiterator">GetIterator</a></emu-xref>(<var>value</var>).</li><li>Let <var>result</var> be the result of performing IteratorDestructuringAssignmentEvaluation of <emu-nt id="_ref_10837"><a href="#prod-AssignmentElementList">AssignmentElementList</a></emu-nt> using <var>iteratorRecord</var> as the argument.</li><li>If <var>iteratorRecord</var>.[[Done]] is <emu-val>false</emu-val>, return ?&nbsp;<emu-xref aoid="IteratorClose" id="_ref_3554"><a href="#sec-iteratorclose">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="#prod-ArrayAssignmentPattern">ArrayAssignmentPattern</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cd334403"><emu-t>[</emu-t><emu-nt id="_ref_10838"><a href="#prod-AssignmentElementList">AssignmentElementList</a></emu-nt><emu-t>,</emu-t><emu-nt optional="" id="_ref_10839"><a href="#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt optional="" id="_ref_10840"><a href="#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_3555"><a href="#sec-getiterator">GetIterator</a></emu-xref>(<var>value</var>).</li><li>Let <var>status</var> be the result of performing IteratorDestructuringAssignmentEvaluation of <emu-nt id="_ref_10841"><a href="#prod-AssignmentElementList">AssignmentElementList</a></emu-nt> using <var>iteratorRecord</var> as the argument.</li><li>If <var>status</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_3556"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, then<ol><li>If <var>iteratorRecord</var>.[[Done]] is <emu-val>false</emu-val>, return ?&nbsp;<emu-xref aoid="IteratorClose" id="_ref_3557"><a href="#sec-iteratorclose">IteratorClose</a></emu-xref>(<var>iteratorRecord</var>, <var>status</var>).</li><li>Return <emu-xref aoid="Completion" id="_ref_3558"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>status</var>).</li></ol></li><li>If <emu-nt id="_ref_10842"><a href="#prod-Elision">Elision</a></emu-nt> is present, then<ol><li>Set <var>status</var> to the result of performing IteratorDestructuringAssignmentEvaluation of <emu-nt id="_ref_10843"><a href="#prod-Elision">Elision</a></emu-nt> with <var>iteratorRecord</var> as the argument.</li><li>If <var>status</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_3559"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, then<ol><li><emu-xref href="#assert" id="_ref_3560"><a href="#assert">Assert</a></emu-xref>: <var>iteratorRecord</var>.[[Done]] is <emu-val>true</emu-val>.</li><li>Return <emu-xref aoid="Completion" id="_ref_3561"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>status</var>).</li></ol></li></ol></li><li>If <emu-nt id="_ref_10844"><a href="#prod-AssignmentRestElement">AssignmentRestElement</a></emu-nt> is present, then<ol><li>Set <var>status</var> to the result of performing IteratorDestructuringAssignmentEvaluation of <emu-nt id="_ref_10845"><a href="#prod-AssignmentRestElement">AssignmentRestElement</a></emu-nt> with <var>iteratorRecord</var> as the argument.</li></ol></li><li>If <var>iteratorRecord</var>.[[Done]] is <emu-val>false</emu-val>, return ?&nbsp;<emu-xref aoid="IteratorClose" id="_ref_3562"><a href="#sec-iteratorclose">IteratorClose</a></emu-xref>(<var>iteratorRecord</var>, <var>status</var>).</li><li>Return <emu-xref aoid="Completion" id="_ref_3563"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>status</var>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="ObjectAssignmentPattern" collapsed="">
<emu-nt><a href="#prod-ObjectAssignmentPattern">ObjectAssignmentPattern</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d3f69c83"><emu-t>{</emu-t><emu-nt id="_ref_10846"><a href="#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_3564"><a href="#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_3565"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Return the result of performing RestDestructuringAssignmentEvaluation of <emu-nt id="_ref_10847"><a href="#prod-AssignmentRestProperty">AssignmentRestProperty</a></emu-nt> with <var>value</var> and <var>excludedNames</var> as the arguments.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ObjectAssignmentPattern" collapsed="">
<emu-nt><a href="#prod-ObjectAssignmentPattern">ObjectAssignmentPattern</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b3c2d7a5"><emu-t>{</emu-t><emu-nt id="_ref_10848"><a href="#prod-AssignmentPropertyList">AssignmentPropertyList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_10849"><a href="#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_3566"><a href="#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<var>value</var>).</li><li>Let <var>excludedNames</var> be the result of performing ? PropertyDestructuringAssignmentEvaluation for <emu-nt id="_ref_10850"><a href="#prod-AssignmentPropertyList">AssignmentPropertyList</a></emu-nt> using <var>value</var> as the argument.</li><li>Return the result of performing RestDestructuringAssignmentEvaluation of <emu-nt id="_ref_10851"><a href="#prod-AssignmentRestProperty">AssignmentRestProperty</a></emu-nt> with <var>value</var> and <var>excludedNames</var> as the arguments.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-runtime-semantics-propertydestructuringassignmentevaluation">
<h1><span class="secnum">12.15.5.3</span>Runtime Semantics: PropertyDestructuringAssignmentEvaluation</h1>
<p>With parameter <var>value</var>.</p>
<emu-note><span class="note">Note</span><div class="note-contents">The following operations collect a list of all destructured property names.</div></emu-note>
<emu-grammar><emu-production name="AssignmentPropertyList" collapsed="">
<emu-nt><a href="#prod-AssignmentPropertyList">AssignmentPropertyList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c3680459"><emu-nt id="_ref_10852"><a href="#prod-AssignmentPropertyList">AssignmentPropertyList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_10853"><a href="#prod-AssignmentProperty">AssignmentProperty</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>propertyNames</var> be the result of performing ? PropertyDestructuringAssignmentEvaluation for <emu-nt id="_ref_10854"><a href="#prod-AssignmentPropertyList">AssignmentPropertyList</a></emu-nt> using <var>value</var> as the argument.</li><li>Let <var>nextNames</var> be the result of performing ? PropertyDestructuringAssignmentEvaluation for <emu-nt id="_ref_10855"><a href="#prod-AssignmentProperty">AssignmentProperty</a></emu-nt> using <var>value</var> as the argument.</li><li>Append each item in <var>nextNames</var> to the end of <var>propertyNames</var>.</li><li>Return <var>propertyNames</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="AssignmentProperty" collapsed="">
<emu-nt><a href="#prod-AssignmentProperty">AssignmentProperty</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c55f7708"><emu-nt id="_ref_10856"><a href="#prod-IdentifierReference">IdentifierReference</a></emu-nt><emu-nt optional="" id="_ref_10857"><a href="#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 StringValue of <emu-nt id="_ref_10858"><a href="#prod-IdentifierReference">IdentifierReference</a></emu-nt>.</li><li>Let <var>lref</var> be ?&nbsp;<emu-xref aoid="ResolveBinding" id="_ref_3567"><a href="#sec-resolvebinding">ResolveBinding</a></emu-xref>(<var>P</var>).</li><li>Let <var>v</var> be ?&nbsp;<emu-xref aoid="GetV" id="_ref_3568"><a href="#sec-getv">GetV</a></emu-xref>(<var>value</var>, <var>P</var>).</li><li>If <emu-nt optional="" id="_ref_10859"><a href="#prod-Initializer">Initializer</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt> is present and <var>v</var> is <emu-val>undefined</emu-val>, then<ol><li>If <emu-xref aoid="IsAnonymousFunctionDefinition" id="_ref_3569"><a href="#sec-isanonymousfunctiondefinition">IsAnonymousFunctionDefinition</a></emu-xref>(<emu-nt id="_ref_10860"><a href="#prod-Initializer">Initializer</a></emu-nt>) is <emu-val>true</emu-val>, then<ol><li>Set <var>v</var> to the result of performing NamedEvaluation for <emu-nt id="_ref_10861"><a href="#prod-Initializer">Initializer</a></emu-nt> with argument <var>P</var>.</li></ol></li><li>Else,<ol><li>Let <var>defaultValue</var> be the result of evaluating <emu-nt id="_ref_10862"><a href="#prod-Initializer">Initializer</a></emu-nt>.</li><li>Set <var>v</var> to ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3570"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>defaultValue</var>).</li></ol></li></ol></li><li>Perform ?&nbsp;<emu-xref aoid="PutValue" id="_ref_3571"><a href="#sec-putvalue">PutValue</a></emu-xref>(<var>lref</var>, <var>v</var>).</li><li>Return a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3572"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing <var>P</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="AssignmentProperty" collapsed="">
<emu-nt><a href="#prod-AssignmentProperty">AssignmentProperty</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c9ac8882"><emu-nt id="_ref_10863"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>:</emu-t><emu-nt id="_ref_10864"><a href="#prod-AssignmentElement">AssignmentElement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>name</var> be the result of evaluating <emu-nt id="_ref_10865"><a href="#prod-PropertyName">PropertyName</a></emu-nt>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3573"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>name</var>).</li><li>Perform ? KeyedDestructuringAssignmentEvaluation of <emu-nt id="_ref_10866"><a href="#prod-AssignmentElement">AssignmentElement</a></emu-nt> with <var>value</var> and <var>name</var> as the arguments.</li><li>Return a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3574"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing <var>name</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-runtime-semantics-restdestructuringassignmentevaluation">
<h1><span class="secnum">12.15.5.4</span>Runtime Semantics: RestDestructuringAssignmentEvaluation</h1>
<p>With parameters <var>value</var> and <var>excludedNames</var>.</p>
<emu-grammar><emu-production name="AssignmentRestProperty" collapsed="">
<emu-nt><a href="#prod-AssignmentRestProperty">AssignmentRestProperty</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cf470c76"><emu-t>...</emu-t><emu-nt id="_ref_10867"><a href="#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>lref</var> be the result of evaluating <emu-nt id="_ref_10868"><a href="#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3575"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>lref</var>).</li><li>Let <var>restObj</var> be <emu-xref aoid="ObjectCreate" id="_ref_3576"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_3577"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>).</li><li>Perform ?&nbsp;<emu-xref aoid="CopyDataProperties" id="_ref_3578"><a href="#sec-copydataproperties">CopyDataProperties</a></emu-xref>(<var>restObj</var>, <var>value</var>, <var>excludedNames</var>).</li><li>Return <emu-xref aoid="PutValue" id="_ref_3579"><a href="#sec-putvalue">PutValue</a></emu-xref>(<var>lref</var>, <var>restObj</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-runtime-semantics-iteratordestructuringassignmentevaluation">
<h1><span class="secnum">12.15.5.5</span>Runtime Semantics: IteratorDestructuringAssignmentEvaluation</h1>
<p>With parameter <var>iteratorRecord</var>.</p>
<emu-grammar><emu-production name="AssignmentElementList" collapsed="">
<emu-nt><a href="#prod-AssignmentElementList">AssignmentElementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e2bbd46c"><emu-nt id="_ref_10869"><a href="#prod-AssignmentElisionElement">AssignmentElisionElement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the result of performing IteratorDestructuringAssignmentEvaluation of <emu-nt id="_ref_10870"><a href="#prod-AssignmentElisionElement">AssignmentElisionElement</a></emu-nt> using <var>iteratorRecord</var> as the argument.
</li></ol></emu-alg>
<emu-grammar><emu-production name="AssignmentElementList" collapsed="">
<emu-nt><a href="#prod-AssignmentElementList">AssignmentElementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="bdc5c277"><emu-nt id="_ref_10871"><a href="#prod-AssignmentElementList">AssignmentElementList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_10872"><a href="#prod-AssignmentElisionElement">AssignmentElisionElement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Perform ? IteratorDestructuringAssignmentEvaluation of <emu-nt id="_ref_10873"><a href="#prod-AssignmentElementList">AssignmentElementList</a></emu-nt> using <var>iteratorRecord</var> as the argument.</li><li>Return the result of performing IteratorDestructuringAssignmentEvaluation of <emu-nt id="_ref_10874"><a href="#prod-AssignmentElisionElement">AssignmentElisionElement</a></emu-nt> using <var>iteratorRecord</var> as the argument.
</li></ol></emu-alg>
<emu-grammar><emu-production name="AssignmentElisionElement" collapsed="">
<emu-nt><a href="#prod-AssignmentElisionElement">AssignmentElisionElement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="816d4abc"><emu-nt id="_ref_10875"><a href="#prod-AssignmentElement">AssignmentElement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the result of performing IteratorDestructuringAssignmentEvaluation of <emu-nt id="_ref_10876"><a href="#prod-AssignmentElement">AssignmentElement</a></emu-nt> with <var>iteratorRecord</var> as the argument.
</li></ol></emu-alg>
<emu-grammar><emu-production name="AssignmentElisionElement" collapsed="">
<emu-nt><a href="#prod-AssignmentElisionElement">AssignmentElisionElement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="696f42ef"><emu-nt id="_ref_10877"><a href="#prod-Elision">Elision</a></emu-nt><emu-nt id="_ref_10878"><a href="#prod-AssignmentElement">AssignmentElement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Perform ? IteratorDestructuringAssignmentEvaluation of <emu-nt id="_ref_10879"><a href="#prod-Elision">Elision</a></emu-nt> with <var>iteratorRecord</var> as the argument.</li><li>Return the result of performing IteratorDestructuringAssignmentEvaluation of <emu-nt id="_ref_10880"><a href="#prod-AssignmentElement">AssignmentElement</a></emu-nt> with <var>iteratorRecord</var> as the argument.
</li></ol></emu-alg>
<emu-grammar><emu-production name="Elision" collapsed="">
<emu-nt><a href="#prod-Elision">Elision</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="9471f753"><emu-t>,</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <var>iteratorRecord</var>.[[Done]] is <emu-val>false</emu-val>, then<ol><li>Let <var>next</var> be <emu-xref aoid="IteratorStep" id="_ref_3580"><a href="#sec-iteratorstep">IteratorStep</a></emu-xref>(<var>iteratorRecord</var>).</li><li>If <var>next</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_3581"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, set <var>iteratorRecord</var>.[[Done]] to <emu-val>true</emu-val>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3582"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>next</var>).</li><li>If <var>next</var> is <emu-val>false</emu-val>, set <var>iteratorRecord</var>.[[Done]] to <emu-val>true</emu-val>.</li></ol></li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_3583"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="Elision" collapsed="">
<emu-nt><a href="#prod-Elision">Elision</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="806d0124"><emu-nt id="_ref_10881"><a href="#prod-Elision">Elision</a></emu-nt><emu-t>,</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Perform ? IteratorDestructuringAssignmentEvaluation of <emu-nt id="_ref_10882"><a href="#prod-Elision">Elision</a></emu-nt> with <var>iteratorRecord</var> as the argument.</li><li>If <var>iteratorRecord</var>.[[Done]] is <emu-val>false</emu-val>, then<ol><li>Let <var>next</var> be <emu-xref aoid="IteratorStep" id="_ref_3584"><a href="#sec-iteratorstep">IteratorStep</a></emu-xref>(<var>iteratorRecord</var>).</li><li>If <var>next</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_3585"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, set <var>iteratorRecord</var>.[[Done]] to <emu-val>true</emu-val>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3586"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>next</var>).</li><li>If <var>next</var> is <emu-val>false</emu-val>, set <var>iteratorRecord</var>.[[Done]] to <emu-val>true</emu-val>.</li></ol></li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_3587"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="AssignmentElement" collapsed="">
<emu-nt><a href="#prod-AssignmentElement">AssignmentElement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a73ccacf"><emu-nt id="_ref_10883"><a href="#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt><emu-nt optional="" id="_ref_10884"><a href="#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_10885"><a href="#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt> is neither an <emu-nt id="_ref_10886"><a href="#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> nor an <emu-nt id="_ref_10887"><a href="#prod-ArrayLiteral">ArrayLiteral</a></emu-nt>, then<ol><li>Let <var>lref</var> be the result of evaluating <emu-nt id="_ref_10888"><a href="#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3588"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>lref</var>).</li></ol></li><li>If <var>iteratorRecord</var>.[[Done]] is <emu-val>false</emu-val>, then<ol><li>Let <var>next</var> be <emu-xref aoid="IteratorStep" id="_ref_3589"><a href="#sec-iteratorstep">IteratorStep</a></emu-xref>(<var>iteratorRecord</var>).</li><li>If <var>next</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_3590"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, set <var>iteratorRecord</var>.[[Done]] to <emu-val>true</emu-val>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3591"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>next</var>).</li><li>If <var>next</var> is <emu-val>false</emu-val>, set <var>iteratorRecord</var>.[[Done]] to <emu-val>true</emu-val>.</li><li>Else,<ol><li>Let <var>value</var> be <emu-xref aoid="IteratorValue" id="_ref_3592"><a href="#sec-iteratorvalue">IteratorValue</a></emu-xref>(<var>next</var>).</li><li>If <var>value</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_3593"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, set <var>iteratorRecord</var>.[[Done]] to <emu-val>true</emu-val>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3594"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>value</var>).</li></ol></li></ol></li><li>If <var>iteratorRecord</var>.[[Done]] is <emu-val>true</emu-val>, let <var>value</var> be <emu-val>undefined</emu-val>.</li><li>If <emu-nt id="_ref_10889"><a href="#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_3595"><a href="#sec-isanonymousfunctiondefinition">IsAnonymousFunctionDefinition</a></emu-xref>(<emu-nt id="_ref_10890"><a href="#prod-Initializer">Initializer</a></emu-nt>) and IsIdentifierRef of <emu-nt id="_ref_10891"><a href="#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt> are both <emu-val>true</emu-val>, then<ol><li>Let <var>v</var> be the result of performing NamedEvaluation for <emu-nt id="_ref_10892"><a href="#prod-Initializer">Initializer</a></emu-nt> with argument <emu-xref aoid="GetReferencedName" id="_ref_3596"><a href="#sec-getreferencedname">GetReferencedName</a></emu-xref>(<var>lref</var>).</li></ol></li><li>Else,<ol><li>Let <var>defaultValue</var> be the result of evaluating <emu-nt id="_ref_10893"><a href="#prod-Initializer">Initializer</a></emu-nt>.</li><li>Let <var>v</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3597"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>defaultValue</var>).</li></ol></li></ol></li><li>Else, let <var>v</var> be <var>value</var>.</li><li>If <emu-nt id="_ref_10894"><a href="#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt> is an <emu-nt id="_ref_10895"><a href="#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> or an <emu-nt id="_ref_10896"><a href="#prod-ArrayLiteral">ArrayLiteral</a></emu-nt>, then<ol><li>Let <var>nestedAssignmentPattern</var> be the <emu-nt id="_ref_10897"><a href="#prod-AssignmentPattern">AssignmentPattern</a></emu-nt> that is <emu-xref href="#sec-syntactic-grammar" id="_ref_3598"><a href="#sec-syntactic-grammar">covered</a></emu-xref> by <emu-nt id="_ref_10898"><a href="#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt>.</li><li>Return the result of performing DestructuringAssignmentEvaluation of <var>nestedAssignmentPattern</var> with <var>v</var> as the argument.</li></ol></li><li>Return ?&nbsp;<emu-xref aoid="PutValue" id="_ref_3599"><a href="#sec-putvalue">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_10899"><a href="#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt> that is not a destructuring pattern prior to accessing the iterator or evaluating the <emu-nt id="_ref_10900"><a href="#prod-Initializer">Initializer</a></emu-nt>.</p>
</div></emu-note>
<emu-grammar><emu-production name="AssignmentRestElement" collapsed="">
<emu-nt><a href="#prod-AssignmentRestElement">AssignmentRestElement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cf470c76"><emu-t>...</emu-t><emu-nt id="_ref_10901"><a href="#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <emu-nt id="_ref_10902"><a href="#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt> is neither an <emu-nt id="_ref_10903"><a href="#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> nor an <emu-nt id="_ref_10904"><a href="#prod-ArrayLiteral">ArrayLiteral</a></emu-nt>, then<ol><li>Let <var>lref</var> be the result of evaluating <emu-nt id="_ref_10905"><a href="#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3600"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>lref</var>).</li></ol></li><li>Let <var>A</var> be !&nbsp;<emu-xref aoid="ArrayCreate" id="_ref_3601"><a href="#sec-arraycreate">ArrayCreate</a></emu-xref>(0).</li><li>Let <var>n</var> be 0.</li><li>Repeat, while <var>iteratorRecord</var>.[[Done]] is <emu-val>false</emu-val>,<ol><li>Let <var>next</var> be <emu-xref aoid="IteratorStep" id="_ref_3602"><a href="#sec-iteratorstep">IteratorStep</a></emu-xref>(<var>iteratorRecord</var>).</li><li>If <var>next</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_3603"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, set <var>iteratorRecord</var>.[[Done]] to <emu-val>true</emu-val>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3604"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>next</var>).</li><li>If <var>next</var> is <emu-val>false</emu-val>, set <var>iteratorRecord</var>.[[Done]] to <emu-val>true</emu-val>.</li><li>Else,<ol><li>Let <var>nextValue</var> be <emu-xref aoid="IteratorValue" id="_ref_3605"><a href="#sec-iteratorvalue">IteratorValue</a></emu-xref>(<var>next</var>).</li><li>If <var>nextValue</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_3606"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, set <var>iteratorRecord</var>.[[Done]] to <emu-val>true</emu-val>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3607"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>nextValue</var>).</li><li>Let <var>status</var> be <emu-xref aoid="CreateDataProperty" id="_ref_3608"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>A</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_3609"><a href="#sec-tostring">ToString</a></emu-xref>(<var>n</var>), <var>nextValue</var>).</li><li><emu-xref href="#assert" id="_ref_3610"><a href="#assert">Assert</a></emu-xref>: <var>status</var> is <emu-val>true</emu-val>.</li><li>Increment <var>n</var> by 1.</li></ol></li></ol></li><li>If <emu-nt id="_ref_10906"><a href="#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt> is neither an <emu-nt id="_ref_10907"><a href="#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> nor an <emu-nt id="_ref_10908"><a href="#prod-ArrayLiteral">ArrayLiteral</a></emu-nt>, then<ol><li>Return ?&nbsp;<emu-xref aoid="PutValue" id="_ref_3611"><a href="#sec-putvalue">PutValue</a></emu-xref>(<var>lref</var>, <var>A</var>).</li></ol></li><li>Let <var>nestedAssignmentPattern</var> be the <emu-nt id="_ref_10909"><a href="#prod-AssignmentPattern">AssignmentPattern</a></emu-nt> that is <emu-xref href="#sec-syntactic-grammar" id="_ref_3612"><a href="#sec-syntactic-grammar">covered</a></emu-xref> by <emu-nt id="_ref_10910"><a href="#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt>.</li><li>Return the result of performing DestructuringAssignmentEvaluation of <var>nestedAssignmentPattern</var> with <var>A</var> as the argument.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-runtime-semantics-keyeddestructuringassignmentevaluation">
<h1><span class="secnum">12.15.5.6</span>Runtime Semantics: KeyedDestructuringAssignmentEvaluation</h1>
<p>With parameters <var>value</var> and <var>propertyName</var>.</p>
<emu-grammar><emu-production name="AssignmentElement" collapsed="">
<emu-nt><a href="#prod-AssignmentElement">AssignmentElement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a73ccacf"><emu-nt id="_ref_10911"><a href="#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt><emu-nt optional="" id="_ref_10912"><a href="#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_10913"><a href="#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt> is neither an <emu-nt id="_ref_10914"><a href="#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> nor an <emu-nt id="_ref_10915"><a href="#prod-ArrayLiteral">ArrayLiteral</a></emu-nt>, then<ol><li>Let <var>lref</var> be the result of evaluating <emu-nt id="_ref_10916"><a href="#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3613"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>lref</var>).</li></ol></li><li>Let <var>v</var> be ?&nbsp;<emu-xref aoid="GetV" id="_ref_3614"><a href="#sec-getv">GetV</a></emu-xref>(<var>value</var>, <var>propertyName</var>).</li><li>If <emu-nt id="_ref_10917"><a href="#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_3615"><a href="#sec-isanonymousfunctiondefinition">IsAnonymousFunctionDefinition</a></emu-xref>(<emu-nt id="_ref_10918"><a href="#prod-Initializer">Initializer</a></emu-nt>) and IsIdentifierRef of <emu-nt id="_ref_10919"><a href="#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt> are both <emu-val>true</emu-val>, then<ol><li>Let <var>rhsValue</var> be the result of performing NamedEvaluation for <emu-nt id="_ref_10920"><a href="#prod-Initializer">Initializer</a></emu-nt> with argument <emu-xref aoid="GetReferencedName" id="_ref_3616"><a href="#sec-getreferencedname">GetReferencedName</a></emu-xref>(<var>lref</var>).</li></ol></li><li>Else,<ol><li>Let <var>defaultValue</var> be the result of evaluating <emu-nt id="_ref_10921"><a href="#prod-Initializer">Initializer</a></emu-nt>.</li><li>Let <var>rhsValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3617"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>defaultValue</var>).</li></ol></li></ol></li><li>Else, let <var>rhsValue</var> be <var>v</var>.</li><li>If <emu-nt id="_ref_10922"><a href="#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt> is an <emu-nt id="_ref_10923"><a href="#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> or an <emu-nt id="_ref_10924"><a href="#prod-ArrayLiteral">ArrayLiteral</a></emu-nt>, then<ol><li>Let <var>assignmentPattern</var> be the <emu-nt id="_ref_10925"><a href="#prod-AssignmentPattern">AssignmentPattern</a></emu-nt> that is <emu-xref href="#sec-syntactic-grammar" id="_ref_3618"><a href="#sec-syntactic-grammar">covered</a></emu-xref> by <emu-nt id="_ref_10926"><a href="#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt>.</li><li>Return the result of performing DestructuringAssignmentEvaluation of <var>assignmentPattern</var> with <var>rhsValue</var> as the argument.</li></ol></li><li>Return ?&nbsp;<emu-xref aoid="PutValue" id="_ref_3619"><a href="#sec-putvalue">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">12.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="#prod-Expression">Expression</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0d38e21c"><emu-nt params="?In, ?Yield, ?Await" id="_ref_10927"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="a2892296"><emu-nt params="?In, ?Yield, ?Await" id="_ref_10928"><a href="#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_10929"><a href="#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-static-semantics-isfunctiondefinition">
<h1><span class="secnum">12.16.1</span>Static Semantics: IsFunctionDefinition</h1>
<emu-see-also-para op="IsFunctionDefinition"></emu-see-also-para>
<emu-grammar><emu-production name="Expression" collapsed="">
<emu-nt><a href="#prod-Expression">Expression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0b039a65"><emu-nt id="_ref_10930"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_10931"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause oldids="sec-comma-operator-static-semantics-isvalidsimpleassignmenttarget" id="sec-comma-operator-static-semantics-assignmenttargettype">
<span id="sec-comma-operator-static-semantics-isvalidsimpleassignmenttarget"></span><h1><span class="secnum">12.16.2</span>Static Semantics: AssignmentTargetType</h1>
<emu-see-also-para op="AssignmentTargetType"></emu-see-also-para>
<emu-grammar><emu-production name="Expression" collapsed="">
<emu-nt><a href="#prod-Expression">Expression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0b039a65"><emu-nt id="_ref_10932"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_10933"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-const>invalid</emu-const>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-comma-operator-runtime-semantics-evaluation">
<h1><span class="secnum">12.16.3</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="Expression" collapsed="">
<emu-nt><a href="#prod-Expression">Expression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0b039a65"><emu-nt id="_ref_10934"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_10935"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>lref</var> be the result of evaluating <emu-nt id="_ref_10936"><a href="#prod-Expression">Expression</a></emu-nt>.</li><li>Perform ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3620"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>lref</var>).</li><li>Let <var>rref</var> be the result of evaluating <emu-nt id="_ref_10937"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Return ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3621"><a href="#sec-getvalue">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_3622"><a href="#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>
<emu-clause id="sec-ecmascript-language-statements-and-declarations">
<h1><span class="secnum">13</span>ECMAScript Language: Statements and Declarations</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="Statement" params="Yield, Await, Return" id="prod-Statement">
<emu-nt params="Yield, Await, Return"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="2adcd2a4"><emu-nt params="?Yield, ?Await, ?Return" id="_ref_10938"><a href="#prod-BlockStatement">BlockStatement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="5ee32ad5"><emu-nt params="?Yield, ?Await" id="_ref_10939"><a href="#prod-VariableStatement">VariableStatement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="7338aabb"><emu-nt id="_ref_10940"><a href="#prod-EmptyStatement">EmptyStatement</a></emu-nt></emu-rhs>
<emu-rhs a="bede12e3"><emu-nt params="?Yield, ?Await" id="_ref_10941"><a href="#prod-ExpressionStatement">ExpressionStatement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="54fbebf5"><emu-nt params="?Yield, ?Await, ?Return" id="_ref_10942"><a href="#prod-IfStatement">IfStatement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="de4c2686"><emu-nt params="?Yield, ?Await, ?Return" id="_ref_10943"><a href="#prod-BreakableStatement">BreakableStatement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="9255e61d"><emu-nt params="?Yield, ?Await" id="_ref_10944"><a href="#prod-ContinueStatement">ContinueStatement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="bd34fe33"><emu-nt params="?Yield, ?Await" id="_ref_10945"><a href="#prod-BreakStatement">BreakStatement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="d52ac8c3" constraints="+Return"><emu-constraints>[+Return]</emu-constraints><emu-nt params="?Yield, ?Await" id="_ref_10946"><a href="#prod-ReturnStatement">ReturnStatement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="fc61098c"><emu-nt params="?Yield, ?Await, ?Return" id="_ref_10947"><a href="#prod-WithStatement">WithStatement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="f74fe0ab"><emu-nt params="?Yield, ?Await, ?Return" id="_ref_10948"><a href="#prod-LabelledStatement">LabelledStatement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="ba418235"><emu-nt params="?Yield, ?Await" id="_ref_10949"><a href="#prod-ThrowStatement">ThrowStatement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="67b4bc29"><emu-nt params="?Yield, ?Await, ?Return" id="_ref_10950"><a href="#prod-TryStatement">TryStatement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="21212edb"><emu-nt id="_ref_10951"><a href="#prod-DebuggerStatement">DebuggerStatement</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="Declaration" params="Yield, Await" id="prod-Declaration">
<emu-nt params="Yield, Await"><a href="#prod-Declaration">Declaration</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8ba1ebe9"><emu-nt params="?Yield, ?Await, ~Default" id="_ref_10952"><a href="#prod-HoistableDeclaration">HoistableDeclaration</a><emu-mods><emu-params>[?Yield, ?Await, ~Default]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="245487bb"><emu-nt params="?Yield, ?Await, ~Default" id="_ref_10953"><a href="#prod-ClassDeclaration">ClassDeclaration</a><emu-mods><emu-params>[?Yield, ?Await, ~Default]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="0e5e6549"><emu-nt params="+In, ?Yield, ?Await" id="_ref_10954"><a href="#prod-LexicalDeclaration">LexicalDeclaration</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="HoistableDeclaration" params="Yield, Await, Default" id="prod-HoistableDeclaration">
<emu-nt params="Yield, Await, Default"><a href="#prod-HoistableDeclaration">HoistableDeclaration</a><emu-mods><emu-params>[Yield, Await, Default]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="3e6d6242"><emu-nt params="?Yield, ?Await, ?Default" id="_ref_10955"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a><emu-mods><emu-params>[?Yield, ?Await, ?Default]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="ac7a805c"><emu-nt params="?Yield, ?Await, ?Default" id="_ref_10956"><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a><emu-mods><emu-params>[?Yield, ?Await, ?Default]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="dcd16328"><emu-nt params="?Yield, ?Await, ?Default" id="_ref_10957"><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a><emu-mods><emu-params>[?Yield, ?Await, ?Default]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="13efd0a7"><emu-nt params="?Yield, ?Await, ?Default" id="_ref_10958"><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a><emu-mods><emu-params>[?Yield, ?Await, ?Default]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="BreakableStatement" params="Yield, Await, Return" id="prod-BreakableStatement">
<emu-nt params="Yield, Await, Return"><a href="#prod-BreakableStatement">BreakableStatement</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a0b98263"><emu-nt params="?Yield, ?Await, ?Return" id="_ref_10959"><a href="#prod-IterationStatement">IterationStatement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="b998d9bf"><emu-nt params="?Yield, ?Await, ?Return" id="_ref_10960"><a href="#prod-SwitchStatement">SwitchStatement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-clause id="sec-statement-semantics">
<h1><span class="secnum">13.1</span>Statement Semantics</h1>
<emu-clause id="sec-statement-semantics-static-semantics-containsduplicatelabels">
<h1><span class="secnum">13.1.1</span>Static Semantics: ContainsDuplicateLabels</h1>
<p>With parameter <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsDuplicateLabels"></emu-see-also-para>
<emu-grammar><emu-production name="Statement">
<emu-nt><a href="#prod-Statement">Statement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8b0c0df0"><emu-nt id="_ref_10961"><a href="#prod-VariableStatement">VariableStatement</a></emu-nt></emu-rhs>
<emu-rhs a="7338aabb"><emu-nt id="_ref_10962"><a href="#prod-EmptyStatement">EmptyStatement</a></emu-nt></emu-rhs>
<emu-rhs a="82c424b7"><emu-nt id="_ref_10963"><a href="#prod-ExpressionStatement">ExpressionStatement</a></emu-nt></emu-rhs>
<emu-rhs a="1d7d329e"><emu-nt id="_ref_10964"><a href="#prod-ContinueStatement">ContinueStatement</a></emu-nt></emu-rhs>
<emu-rhs a="ab8baff9"><emu-nt id="_ref_10965"><a href="#prod-BreakStatement">BreakStatement</a></emu-nt></emu-rhs>
<emu-rhs a="aa6f7913"><emu-nt id="_ref_10966"><a href="#prod-ReturnStatement">ReturnStatement</a></emu-nt></emu-rhs>
<emu-rhs a="867b4090"><emu-nt id="_ref_10967"><a href="#prod-ThrowStatement">ThrowStatement</a></emu-nt></emu-rhs>
<emu-rhs a="21212edb"><emu-nt id="_ref_10968"><a href="#prod-DebuggerStatement">DebuggerStatement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-statement-semantics-static-semantics-containsundefinedbreaktarget">
<h1><span class="secnum">13.1.2</span>Static Semantics: ContainsUndefinedBreakTarget</h1>
<p>With parameter <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsUndefinedBreakTarget"></emu-see-also-para>
<emu-grammar><emu-production name="Statement">
<emu-nt><a href="#prod-Statement">Statement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8b0c0df0"><emu-nt id="_ref_10969"><a href="#prod-VariableStatement">VariableStatement</a></emu-nt></emu-rhs>
<emu-rhs a="7338aabb"><emu-nt id="_ref_10970"><a href="#prod-EmptyStatement">EmptyStatement</a></emu-nt></emu-rhs>
<emu-rhs a="82c424b7"><emu-nt id="_ref_10971"><a href="#prod-ExpressionStatement">ExpressionStatement</a></emu-nt></emu-rhs>
<emu-rhs a="1d7d329e"><emu-nt id="_ref_10972"><a href="#prod-ContinueStatement">ContinueStatement</a></emu-nt></emu-rhs>
<emu-rhs a="aa6f7913"><emu-nt id="_ref_10973"><a href="#prod-ReturnStatement">ReturnStatement</a></emu-nt></emu-rhs>
<emu-rhs a="867b4090"><emu-nt id="_ref_10974"><a href="#prod-ThrowStatement">ThrowStatement</a></emu-nt></emu-rhs>
<emu-rhs a="21212edb"><emu-nt id="_ref_10975"><a href="#prod-DebuggerStatement">DebuggerStatement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-statement-semantics-static-semantics-containsundefinedcontinuetarget">
<h1><span class="secnum">13.1.3</span>Static Semantics: ContainsUndefinedContinueTarget</h1>
<p>With parameters <var>iterationSet</var> and <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsUndefinedContinueTarget"></emu-see-also-para>
<emu-grammar><emu-production name="Statement">
<emu-nt><a href="#prod-Statement">Statement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8b0c0df0"><emu-nt id="_ref_10976"><a href="#prod-VariableStatement">VariableStatement</a></emu-nt></emu-rhs>
<emu-rhs a="7338aabb"><emu-nt id="_ref_10977"><a href="#prod-EmptyStatement">EmptyStatement</a></emu-nt></emu-rhs>
<emu-rhs a="82c424b7"><emu-nt id="_ref_10978"><a href="#prod-ExpressionStatement">ExpressionStatement</a></emu-nt></emu-rhs>
<emu-rhs a="ab8baff9"><emu-nt id="_ref_10979"><a href="#prod-BreakStatement">BreakStatement</a></emu-nt></emu-rhs>
<emu-rhs a="aa6f7913"><emu-nt id="_ref_10980"><a href="#prod-ReturnStatement">ReturnStatement</a></emu-nt></emu-rhs>
<emu-rhs a="867b4090"><emu-nt id="_ref_10981"><a href="#prod-ThrowStatement">ThrowStatement</a></emu-nt></emu-rhs>
<emu-rhs a="21212edb"><emu-nt id="_ref_10982"><a href="#prod-DebuggerStatement">DebuggerStatement</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="BreakableStatement" collapsed="">
<emu-nt><a href="#prod-BreakableStatement">BreakableStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="28c5e5e3"><emu-nt id="_ref_10983"><a href="#prod-IterationStatement">IterationStatement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>newIterationSet</var> be a copy of <var>iterationSet</var> with all the elements of <var>labelSet</var> appended.</li><li>Return ContainsUndefinedContinueTarget of <emu-nt id="_ref_10984"><a href="#prod-IterationStatement">IterationStatement</a></emu-nt> with arguments <var>newIterationSet</var> and « ».
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-static-semantics-declarationpart">
<h1><span class="secnum">13.1.4</span>Static Semantics: DeclarationPart</h1>
<emu-grammar><emu-production name="HoistableDeclaration" collapsed="">
<emu-nt><a href="#prod-HoistableDeclaration">HoistableDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="fa7a943c"><emu-nt id="_ref_10985"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-nt id="_ref_10986"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="HoistableDeclaration" collapsed="">
<emu-nt><a href="#prod-HoistableDeclaration">HoistableDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4776666d"><emu-nt id="_ref_10987"><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-nt id="_ref_10988"><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="HoistableDeclaration" collapsed="">
<emu-nt><a href="#prod-HoistableDeclaration">HoistableDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5e2f896a"><emu-nt id="_ref_10989"><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-nt id="_ref_10990"><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="HoistableDeclaration" collapsed="">
<emu-nt><a href="#prod-HoistableDeclaration">HoistableDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="9f7e77a7"><emu-nt id="_ref_10991"><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-nt id="_ref_10992"><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="Declaration" collapsed="">
<emu-nt><a href="#prod-Declaration">Declaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6f02b7cd"><emu-nt id="_ref_10993"><a href="#prod-ClassDeclaration">ClassDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-nt id="_ref_10994"><a href="#prod-ClassDeclaration">ClassDeclaration</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="Declaration" collapsed="">
<emu-nt><a href="#prod-Declaration">Declaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8f102805"><emu-nt id="_ref_10995"><a href="#prod-LexicalDeclaration">LexicalDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-nt id="_ref_10996"><a href="#prod-LexicalDeclaration">LexicalDeclaration</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-statement-semantics-static-semantics-vardeclarednames">
<h1><span class="secnum">13.1.5</span>Static Semantics: VarDeclaredNames</h1>
<emu-see-also-para op="VarDeclaredNames"></emu-see-also-para>
<emu-grammar><emu-production name="Statement">
<emu-nt><a href="#prod-Statement">Statement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="7338aabb"><emu-nt id="_ref_10997"><a href="#prod-EmptyStatement">EmptyStatement</a></emu-nt></emu-rhs>
<emu-rhs a="82c424b7"><emu-nt id="_ref_10998"><a href="#prod-ExpressionStatement">ExpressionStatement</a></emu-nt></emu-rhs>
<emu-rhs a="1d7d329e"><emu-nt id="_ref_10999"><a href="#prod-ContinueStatement">ContinueStatement</a></emu-nt></emu-rhs>
<emu-rhs a="ab8baff9"><emu-nt id="_ref_11000"><a href="#prod-BreakStatement">BreakStatement</a></emu-nt></emu-rhs>
<emu-rhs a="aa6f7913"><emu-nt id="_ref_11001"><a href="#prod-ReturnStatement">ReturnStatement</a></emu-nt></emu-rhs>
<emu-rhs a="867b4090"><emu-nt id="_ref_11002"><a href="#prod-ThrowStatement">ThrowStatement</a></emu-nt></emu-rhs>
<emu-rhs a="21212edb"><emu-nt id="_ref_11003"><a href="#prod-DebuggerStatement">DebuggerStatement</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_3623"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-statement-semantics-static-semantics-varscopeddeclarations">
<h1><span class="secnum">13.1.6</span>Static Semantics: VarScopedDeclarations</h1>
<emu-see-also-para op="VarScopedDeclarations"></emu-see-also-para>
<emu-grammar><emu-production name="Statement">
<emu-nt><a href="#prod-Statement">Statement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="7338aabb"><emu-nt id="_ref_11004"><a href="#prod-EmptyStatement">EmptyStatement</a></emu-nt></emu-rhs>
<emu-rhs a="82c424b7"><emu-nt id="_ref_11005"><a href="#prod-ExpressionStatement">ExpressionStatement</a></emu-nt></emu-rhs>
<emu-rhs a="1d7d329e"><emu-nt id="_ref_11006"><a href="#prod-ContinueStatement">ContinueStatement</a></emu-nt></emu-rhs>
<emu-rhs a="ab8baff9"><emu-nt id="_ref_11007"><a href="#prod-BreakStatement">BreakStatement</a></emu-nt></emu-rhs>
<emu-rhs a="aa6f7913"><emu-nt id="_ref_11008"><a href="#prod-ReturnStatement">ReturnStatement</a></emu-nt></emu-rhs>
<emu-rhs a="867b4090"><emu-nt id="_ref_11009"><a href="#prod-ThrowStatement">ThrowStatement</a></emu-nt></emu-rhs>
<emu-rhs a="21212edb"><emu-nt id="_ref_11010"><a href="#prod-DebuggerStatement">DebuggerStatement</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_3624"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-statement-semantics-runtime-semantics-labelledevaluation">
<h1><span class="secnum">13.1.7</span>Runtime Semantics: LabelledEvaluation</h1>
<p>With parameter <var>labelSet</var>.</p>
<emu-see-also-para op="LabelledEvaluation"></emu-see-also-para>
<emu-grammar><emu-production name="BreakableStatement" collapsed="">
<emu-nt><a href="#prod-BreakableStatement">BreakableStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="28c5e5e3"><emu-nt id="_ref_11011"><a href="#prod-IterationStatement">IterationStatement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>stmtResult</var> be the result of performing LabelledEvaluation of <emu-nt id="_ref_11012"><a href="#prod-IterationStatement">IterationStatement</a></emu-nt> with argument <var>labelSet</var>.</li><li>If <var>stmtResult</var>.[[Type]] is <emu-const>break</emu-const>, then<ol><li>If <var>stmtResult</var>.[[Target]] is <emu-const>empty</emu-const>, then<ol><li>If <var>stmtResult</var>.[[Value]] is <emu-const>empty</emu-const>, set <var>stmtResult</var> to <emu-xref aoid="NormalCompletion" id="_ref_3625"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-val>undefined</emu-val>).</li><li>Else, set <var>stmtResult</var> to <emu-xref aoid="NormalCompletion" id="_ref_3626"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<var>stmtResult</var>.[[Value]]).</li></ol></li></ol></li><li>Return <emu-xref aoid="Completion" id="_ref_3627"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>stmtResult</var>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="BreakableStatement" collapsed="">
<emu-nt><a href="#prod-BreakableStatement">BreakableStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="9ee88ef9"><emu-nt id="_ref_11013"><a href="#prod-SwitchStatement">SwitchStatement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>stmtResult</var> be the result of evaluating <emu-nt id="_ref_11014"><a href="#prod-SwitchStatement">SwitchStatement</a></emu-nt>.</li><li>If <var>stmtResult</var>.[[Type]] is <emu-const>break</emu-const>, then<ol><li>If <var>stmtResult</var>.[[Target]] is <emu-const>empty</emu-const>, then<ol><li>If <var>stmtResult</var>.[[Value]] is <emu-const>empty</emu-const>, set <var>stmtResult</var> to <emu-xref aoid="NormalCompletion" id="_ref_3628"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-val>undefined</emu-val>).</li><li>Else, set <var>stmtResult</var> to <emu-xref aoid="NormalCompletion" id="_ref_3629"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<var>stmtResult</var>.[[Value]]).</li></ol></li></ol></li><li>Return <emu-xref aoid="Completion" id="_ref_3630"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>stmtResult</var>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>A <emu-nt id="_ref_11015"><a href="#prod-BreakableStatement">BreakableStatement</a></emu-nt> is one that can be exited via an unlabelled <emu-nt id="_ref_11016"><a href="#prod-BreakStatement">BreakStatement</a></emu-nt>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-statement-semantics-runtime-semantics-evaluation">
<h1><span class="secnum">13.1.8</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="HoistableDeclaration">
<emu-nt><a href="#prod-HoistableDeclaration">HoistableDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4776666d"><emu-nt id="_ref_11017"><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a></emu-nt></emu-rhs>
<emu-rhs a="5e2f896a"><emu-nt id="_ref_11018"><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt></emu-rhs>
<emu-rhs a="9f7e77a7"><emu-nt id="_ref_11019"><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-xref aoid="NormalCompletion" id="_ref_3631"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="HoistableDeclaration" collapsed="">
<emu-nt><a href="#prod-HoistableDeclaration">HoistableDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="fa7a943c"><emu-nt id="_ref_11020"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the result of evaluating <emu-nt id="_ref_11021"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="BreakableStatement">
<emu-nt><a href="#prod-BreakableStatement">BreakableStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="28c5e5e3"><emu-nt id="_ref_11022"><a href="#prod-IterationStatement">IterationStatement</a></emu-nt></emu-rhs>
<emu-rhs a="9ee88ef9"><emu-nt id="_ref_11023"><a href="#prod-SwitchStatement">SwitchStatement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>newLabelSet</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3632"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Return the result of performing LabelledEvaluation of this <emu-nt id="_ref_11024"><a href="#prod-BreakableStatement">BreakableStatement</a></emu-nt> with argument <var>newLabelSet</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-block">
<h1><span class="secnum">13.2</span>Block</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="BlockStatement" params="Yield, Await, Return" id="prod-BlockStatement">
<emu-nt params="Yield, Await, Return"><a href="#prod-BlockStatement">BlockStatement</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cf0a5fc2"><emu-nt params="?Yield, ?Await, ?Return" id="_ref_11025"><a href="#prod-Block">Block</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="Block" params="Yield, Await, Return" id="prod-Block">
<emu-nt params="Yield, Await, Return"><a href="#prod-Block">Block</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5228fd45"><emu-t>{</emu-t><emu-nt params="?Yield, ?Await, ?Return" optional="" id="_ref_11026"><a href="#prod-StatementList">StatementList</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="StatementList" params="Yield, Await, Return" id="prod-StatementList">
<emu-nt params="Yield, Await, Return"><a href="#prod-StatementList">StatementList</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="39651bc0"><emu-nt params="?Yield, ?Await, ?Return" id="_ref_11027"><a href="#prod-StatementListItem">StatementListItem</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="db572542"><emu-nt params="?Yield, ?Await, ?Return" id="_ref_11028"><a href="#prod-StatementList">StatementList</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt><emu-nt params="?Yield, ?Await, ?Return" id="_ref_11029"><a href="#prod-StatementListItem">StatementListItem</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="StatementListItem" params="Yield, Await, Return" id="prod-StatementListItem">
<emu-nt params="Yield, Await, Return"><a href="#prod-StatementListItem">StatementListItem</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4843d33f"><emu-nt params="?Yield, ?Await, ?Return" id="_ref_11030"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="31391311"><emu-nt params="?Yield, ?Await" id="_ref_11031"><a href="#prod-Declaration">Declaration</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-clause id="sec-block-static-semantics-early-errors">
<h1><span class="secnum">13.2.1</span>Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="Block" collapsed="">
<emu-nt><a href="#prod-Block">Block</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6782c9a7"><emu-t>{</emu-t><emu-nt id="_ref_11032"><a href="#prod-StatementList">StatementList</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if the LexicallyDeclaredNames of <emu-nt id="_ref_11033"><a href="#prod-StatementList">StatementList</a></emu-nt> contains any duplicate entries.
</li>
<li>
It is a Syntax Error if any element of the LexicallyDeclaredNames of <emu-nt id="_ref_11034"><a href="#prod-StatementList">StatementList</a></emu-nt> also occurs in the VarDeclaredNames of <emu-nt id="_ref_11035"><a href="#prod-StatementList">StatementList</a></emu-nt>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-block-static-semantics-containsduplicatelabels">
<h1><span class="secnum">13.2.2</span>Static Semantics: ContainsDuplicateLabels</h1>
<p>With parameter <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsDuplicateLabels"></emu-see-also-para>
<emu-grammar><emu-production name="Block" collapsed="">
<emu-nt><a href="#prod-Block">Block</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><emu-t>{</emu-t><emu-t>}</emu-t></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="StatementList" collapsed="">
<emu-nt><a href="#prod-StatementList">StatementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0db4597a"><emu-nt id="_ref_11036"><a href="#prod-StatementList">StatementList</a></emu-nt><emu-nt id="_ref_11037"><a href="#prod-StatementListItem">StatementListItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>hasDuplicates</var> be ContainsDuplicateLabels of <emu-nt id="_ref_11038"><a href="#prod-StatementList">StatementList</a></emu-nt> with argument <var>labelSet</var>.</li><li>If <var>hasDuplicates</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return ContainsDuplicateLabels of <emu-nt id="_ref_11039"><a href="#prod-StatementListItem">StatementListItem</a></emu-nt> with argument <var>labelSet</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="StatementListItem" collapsed="">
<emu-nt><a href="#prod-StatementListItem">StatementListItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d6f37721"><emu-nt id="_ref_11040"><a href="#prod-Declaration">Declaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-block-static-semantics-containsundefinedbreaktarget">
<h1><span class="secnum">13.2.3</span>Static Semantics: ContainsUndefinedBreakTarget</h1>
<p>With parameter <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsUndefinedBreakTarget"></emu-see-also-para>
<emu-grammar><emu-production name="Block" collapsed="">
<emu-nt><a href="#prod-Block">Block</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><emu-t>{</emu-t><emu-t>}</emu-t></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="StatementList" collapsed="">
<emu-nt><a href="#prod-StatementList">StatementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0db4597a"><emu-nt id="_ref_11041"><a href="#prod-StatementList">StatementList</a></emu-nt><emu-nt id="_ref_11042"><a href="#prod-StatementListItem">StatementListItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>hasUndefinedLabels</var> be ContainsUndefinedBreakTarget of <emu-nt id="_ref_11043"><a href="#prod-StatementList">StatementList</a></emu-nt> with argument <var>labelSet</var>.</li><li>If <var>hasUndefinedLabels</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return ContainsUndefinedBreakTarget of <emu-nt id="_ref_11044"><a href="#prod-StatementListItem">StatementListItem</a></emu-nt> with argument <var>labelSet</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="StatementListItem" collapsed="">
<emu-nt><a href="#prod-StatementListItem">StatementListItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d6f37721"><emu-nt id="_ref_11045"><a href="#prod-Declaration">Declaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-block-static-semantics-containsundefinedcontinuetarget">
<h1><span class="secnum">13.2.4</span>Static Semantics: ContainsUndefinedContinueTarget</h1>
<p>With parameters <var>iterationSet</var> and <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsUndefinedContinueTarget"></emu-see-also-para>
<emu-grammar><emu-production name="Block" collapsed="">
<emu-nt><a href="#prod-Block">Block</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><emu-t>{</emu-t><emu-t>}</emu-t></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="StatementList" collapsed="">
<emu-nt><a href="#prod-StatementList">StatementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0db4597a"><emu-nt id="_ref_11046"><a href="#prod-StatementList">StatementList</a></emu-nt><emu-nt id="_ref_11047"><a href="#prod-StatementListItem">StatementListItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>hasUndefinedLabels</var> be ContainsUndefinedContinueTarget of <emu-nt id="_ref_11048"><a href="#prod-StatementList">StatementList</a></emu-nt> with arguments <var>iterationSet</var> and « ».</li><li>If <var>hasUndefinedLabels</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return ContainsUndefinedContinueTarget of <emu-nt id="_ref_11049"><a href="#prod-StatementListItem">StatementListItem</a></emu-nt> with arguments <var>iterationSet</var> and « ».
</li></ol></emu-alg>
<emu-grammar><emu-production name="StatementListItem" collapsed="">
<emu-nt><a href="#prod-StatementListItem">StatementListItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d6f37721"><emu-nt id="_ref_11050"><a href="#prod-Declaration">Declaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-block-static-semantics-lexicallydeclarednames">
<h1><span class="secnum">13.2.5</span>Static Semantics: LexicallyDeclaredNames</h1>
<emu-see-also-para op="LexicallyDeclaredNames"></emu-see-also-para>
<emu-grammar><emu-production name="Block" collapsed="">
<emu-nt><a href="#prod-Block">Block</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><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_3633"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="StatementList" collapsed="">
<emu-nt><a href="#prod-StatementList">StatementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0db4597a"><emu-nt id="_ref_11051"><a href="#prod-StatementList">StatementList</a></emu-nt><emu-nt id="_ref_11052"><a href="#prod-StatementListItem">StatementListItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>names</var> be LexicallyDeclaredNames of <emu-nt id="_ref_11053"><a href="#prod-StatementList">StatementList</a></emu-nt>.</li><li>Append to <var>names</var> the elements of the LexicallyDeclaredNames of <emu-nt id="_ref_11054"><a href="#prod-StatementListItem">StatementListItem</a></emu-nt>.</li><li>Return <var>names</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="StatementListItem" collapsed="">
<emu-nt><a href="#prod-StatementListItem">StatementListItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a72ca256"><emu-nt id="_ref_11055"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <emu-nt id="_ref_11056"><a href="#prod-Statement">Statement</a></emu-nt> is <emu-grammar><emu-production name="Statement" collapsed="" class=" inline">
<emu-nt><a href="#prod-Statement">Statement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="08827f68"><emu-nt id="_ref_11057"><a href="#prod-LabelledStatement">LabelledStatement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> , return LexicallyDeclaredNames of <emu-nt id="_ref_11058"><a href="#prod-LabelledStatement">LabelledStatement</a></emu-nt>.</li><li>Return a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3634"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="StatementListItem" collapsed="">
<emu-nt><a href="#prod-StatementListItem">StatementListItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d6f37721"><emu-nt id="_ref_11059"><a href="#prod-Declaration">Declaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the BoundNames of <emu-nt id="_ref_11060"><a href="#prod-Declaration">Declaration</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-block-static-semantics-lexicallyscopeddeclarations">
<h1><span class="secnum">13.2.6</span>Static Semantics: LexicallyScopedDeclarations</h1>
<emu-see-also-para op="LexicallyScopedDeclarations"></emu-see-also-para>
<emu-grammar><emu-production name="StatementList" collapsed="">
<emu-nt><a href="#prod-StatementList">StatementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0db4597a"><emu-nt id="_ref_11061"><a href="#prod-StatementList">StatementList</a></emu-nt><emu-nt id="_ref_11062"><a href="#prod-StatementListItem">StatementListItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>declarations</var> be LexicallyScopedDeclarations of <emu-nt id="_ref_11063"><a href="#prod-StatementList">StatementList</a></emu-nt>.</li><li>Append to <var>declarations</var> the elements of the LexicallyScopedDeclarations of <emu-nt id="_ref_11064"><a href="#prod-StatementListItem">StatementListItem</a></emu-nt>.</li><li>Return <var>declarations</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="StatementListItem" collapsed="">
<emu-nt><a href="#prod-StatementListItem">StatementListItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a72ca256"><emu-nt id="_ref_11065"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <emu-nt id="_ref_11066"><a href="#prod-Statement">Statement</a></emu-nt> is <emu-grammar><emu-production name="Statement" collapsed="" class=" inline">
<emu-nt><a href="#prod-Statement">Statement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="08827f68"><emu-nt id="_ref_11067"><a href="#prod-LabelledStatement">LabelledStatement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> , return LexicallyScopedDeclarations of <emu-nt id="_ref_11068"><a href="#prod-LabelledStatement">LabelledStatement</a></emu-nt>.</li><li>Return a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3635"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="StatementListItem" collapsed="">
<emu-nt><a href="#prod-StatementListItem">StatementListItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d6f37721"><emu-nt id="_ref_11069"><a href="#prod-Declaration">Declaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3636"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing DeclarationPart of <emu-nt id="_ref_11070"><a href="#prod-Declaration">Declaration</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-block-static-semantics-toplevellexicallydeclarednames">
<h1><span class="secnum">13.2.7</span>Static Semantics: TopLevelLexicallyDeclaredNames</h1>
<emu-see-also-para op="TopLevelLexicallyDeclaredNames"></emu-see-also-para>
<emu-grammar><emu-production name="StatementList" collapsed="">
<emu-nt><a href="#prod-StatementList">StatementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0db4597a"><emu-nt id="_ref_11071"><a href="#prod-StatementList">StatementList</a></emu-nt><emu-nt id="_ref_11072"><a href="#prod-StatementListItem">StatementListItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>names</var> be TopLevelLexicallyDeclaredNames of <emu-nt id="_ref_11073"><a href="#prod-StatementList">StatementList</a></emu-nt>.</li><li>Append to <var>names</var> the elements of the TopLevelLexicallyDeclaredNames of <emu-nt id="_ref_11074"><a href="#prod-StatementListItem">StatementListItem</a></emu-nt>.</li><li>Return <var>names</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="StatementListItem" collapsed="">
<emu-nt><a href="#prod-StatementListItem">StatementListItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a72ca256"><emu-nt id="_ref_11075"><a href="#prod-Statement">Statement</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_3637"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="StatementListItem" collapsed="">
<emu-nt><a href="#prod-StatementListItem">StatementListItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d6f37721"><emu-nt id="_ref_11076"><a href="#prod-Declaration">Declaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <emu-nt id="_ref_11077"><a href="#prod-Declaration">Declaration</a></emu-nt> is <emu-grammar><emu-production name="Declaration" collapsed="" class=" inline">
<emu-nt><a href="#prod-Declaration">Declaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="62452cb6"><emu-nt id="_ref_11078"><a href="#prod-HoistableDeclaration">HoistableDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> , then<ol><li>Return « ».</li></ol></li><li>Return the BoundNames of <emu-nt id="_ref_11079"><a href="#prod-Declaration">Declaration</a></emu-nt>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>At the top level of a function, or script, function
declarations are treated like var declarations rather than like lexical
declarations.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-block-static-semantics-toplevellexicallyscopeddeclarations">
<h1><span class="secnum">13.2.8</span>Static Semantics: TopLevelLexicallyScopedDeclarations</h1>
<emu-see-also-para op="TopLevelLexicallyScopedDeclarations"></emu-see-also-para>
<emu-grammar><emu-production name="Block" collapsed="">
<emu-nt><a href="#prod-Block">Block</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><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_3638"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="StatementList" collapsed="">
<emu-nt><a href="#prod-StatementList">StatementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0db4597a"><emu-nt id="_ref_11080"><a href="#prod-StatementList">StatementList</a></emu-nt><emu-nt id="_ref_11081"><a href="#prod-StatementListItem">StatementListItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>declarations</var> be TopLevelLexicallyScopedDeclarations of <emu-nt id="_ref_11082"><a href="#prod-StatementList">StatementList</a></emu-nt>.</li><li>Append to <var>declarations</var> the elements of the TopLevelLexicallyScopedDeclarations of <emu-nt id="_ref_11083"><a href="#prod-StatementListItem">StatementListItem</a></emu-nt>.</li><li>Return <var>declarations</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="StatementListItem" collapsed="">
<emu-nt><a href="#prod-StatementListItem">StatementListItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a72ca256"><emu-nt id="_ref_11084"><a href="#prod-Statement">Statement</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_3639"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="StatementListItem" collapsed="">
<emu-nt><a href="#prod-StatementListItem">StatementListItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d6f37721"><emu-nt id="_ref_11085"><a href="#prod-Declaration">Declaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <emu-nt id="_ref_11086"><a href="#prod-Declaration">Declaration</a></emu-nt> is <emu-grammar><emu-production name="Declaration" collapsed="" class=" inline">
<emu-nt><a href="#prod-Declaration">Declaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="62452cb6"><emu-nt id="_ref_11087"><a href="#prod-HoistableDeclaration">HoistableDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> , then<ol><li>Return « ».</li></ol></li><li>Return a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3640"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing <emu-nt id="_ref_11088"><a href="#prod-Declaration">Declaration</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-block-static-semantics-toplevelvardeclarednames">
<h1><span class="secnum">13.2.9</span>Static Semantics: TopLevelVarDeclaredNames</h1>
<emu-see-also-para op="TopLevelVarDeclaredNames"></emu-see-also-para>
<emu-grammar><emu-production name="Block" collapsed="">
<emu-nt><a href="#prod-Block">Block</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><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_3641"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="StatementList" collapsed="">
<emu-nt><a href="#prod-StatementList">StatementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0db4597a"><emu-nt id="_ref_11089"><a href="#prod-StatementList">StatementList</a></emu-nt><emu-nt id="_ref_11090"><a href="#prod-StatementListItem">StatementListItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>names</var> be TopLevelVarDeclaredNames of <emu-nt id="_ref_11091"><a href="#prod-StatementList">StatementList</a></emu-nt>.</li><li>Append to <var>names</var> the elements of the TopLevelVarDeclaredNames of <emu-nt id="_ref_11092"><a href="#prod-StatementListItem">StatementListItem</a></emu-nt>.</li><li>Return <var>names</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="StatementListItem" collapsed="">
<emu-nt><a href="#prod-StatementListItem">StatementListItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d6f37721"><emu-nt id="_ref_11093"><a href="#prod-Declaration">Declaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <emu-nt id="_ref_11094"><a href="#prod-Declaration">Declaration</a></emu-nt> is <emu-grammar><emu-production name="Declaration" collapsed="" class=" inline">
<emu-nt><a href="#prod-Declaration">Declaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="62452cb6"><emu-nt id="_ref_11095"><a href="#prod-HoistableDeclaration">HoistableDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> , then<ol><li>Return the BoundNames of <emu-nt id="_ref_11096"><a href="#prod-HoistableDeclaration">HoistableDeclaration</a></emu-nt>.</li></ol></li><li>Return a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3642"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="StatementListItem" collapsed="">
<emu-nt><a href="#prod-StatementListItem">StatementListItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a72ca256"><emu-nt id="_ref_11097"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <emu-nt id="_ref_11098"><a href="#prod-Statement">Statement</a></emu-nt> is <emu-grammar><emu-production name="Statement" collapsed="" class=" inline">
<emu-nt><a href="#prod-Statement">Statement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="08827f68"><emu-nt id="_ref_11099"><a href="#prod-LabelledStatement">LabelledStatement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> , return TopLevelVarDeclaredNames of <emu-nt id="_ref_11100"><a href="#prod-Statement">Statement</a></emu-nt>.</li><li>Return VarDeclaredNames of <emu-nt id="_ref_11101"><a href="#prod-Statement">Statement</a></emu-nt>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>At the top level of a function or script, inner function declarations are treated like var declarations.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-block-static-semantics-toplevelvarscopeddeclarations">
<h1><span class="secnum">13.2.10</span>Static Semantics: TopLevelVarScopedDeclarations</h1>
<emu-see-also-para op="TopLevelVarScopedDeclarations"></emu-see-also-para>
<emu-grammar><emu-production name="Block" collapsed="">
<emu-nt><a href="#prod-Block">Block</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><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_3643"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="StatementList" collapsed="">
<emu-nt><a href="#prod-StatementList">StatementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0db4597a"><emu-nt id="_ref_11102"><a href="#prod-StatementList">StatementList</a></emu-nt><emu-nt id="_ref_11103"><a href="#prod-StatementListItem">StatementListItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>declarations</var> be TopLevelVarScopedDeclarations of <emu-nt id="_ref_11104"><a href="#prod-StatementList">StatementList</a></emu-nt>.</li><li>Append to <var>declarations</var> the elements of the TopLevelVarScopedDeclarations of <emu-nt id="_ref_11105"><a href="#prod-StatementListItem">StatementListItem</a></emu-nt>.</li><li>Return <var>declarations</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="StatementListItem" collapsed="">
<emu-nt><a href="#prod-StatementListItem">StatementListItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a72ca256"><emu-nt id="_ref_11106"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <emu-nt id="_ref_11107"><a href="#prod-Statement">Statement</a></emu-nt> is <emu-grammar><emu-production name="Statement" collapsed="" class=" inline">
<emu-nt><a href="#prod-Statement">Statement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="08827f68"><emu-nt id="_ref_11108"><a href="#prod-LabelledStatement">LabelledStatement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> , return TopLevelVarScopedDeclarations of <emu-nt id="_ref_11109"><a href="#prod-Statement">Statement</a></emu-nt>.</li><li>Return VarScopedDeclarations of <emu-nt id="_ref_11110"><a href="#prod-Statement">Statement</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="StatementListItem" collapsed="">
<emu-nt><a href="#prod-StatementListItem">StatementListItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d6f37721"><emu-nt id="_ref_11111"><a href="#prod-Declaration">Declaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <emu-nt id="_ref_11112"><a href="#prod-Declaration">Declaration</a></emu-nt> is <emu-grammar><emu-production name="Declaration" collapsed="" class=" inline">
<emu-nt><a href="#prod-Declaration">Declaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="62452cb6"><emu-nt id="_ref_11113"><a href="#prod-HoistableDeclaration">HoistableDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> , then<ol><li>Let <var>declaration</var> be DeclarationPart of <emu-nt id="_ref_11114"><a href="#prod-HoistableDeclaration">HoistableDeclaration</a></emu-nt>.</li><li>Return « <var>declaration</var> ».</li></ol></li><li>Return a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3644"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-block-static-semantics-vardeclarednames">
<h1><span class="secnum">13.2.11</span>Static Semantics: VarDeclaredNames</h1>
<emu-see-also-para op="VarDeclaredNames"></emu-see-also-para>
<emu-grammar><emu-production name="Block" collapsed="">
<emu-nt><a href="#prod-Block">Block</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><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_3645"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="StatementList" collapsed="">
<emu-nt><a href="#prod-StatementList">StatementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0db4597a"><emu-nt id="_ref_11115"><a href="#prod-StatementList">StatementList</a></emu-nt><emu-nt id="_ref_11116"><a href="#prod-StatementListItem">StatementListItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>names</var> be VarDeclaredNames of <emu-nt id="_ref_11117"><a href="#prod-StatementList">StatementList</a></emu-nt>.</li><li>Append to <var>names</var> the elements of the VarDeclaredNames of <emu-nt id="_ref_11118"><a href="#prod-StatementListItem">StatementListItem</a></emu-nt>.</li><li>Return <var>names</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="StatementListItem" collapsed="">
<emu-nt><a href="#prod-StatementListItem">StatementListItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d6f37721"><emu-nt id="_ref_11119"><a href="#prod-Declaration">Declaration</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_3646"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-block-static-semantics-varscopeddeclarations">
<h1><span class="secnum">13.2.12</span>Static Semantics: VarScopedDeclarations</h1>
<emu-see-also-para op="VarScopedDeclarations"></emu-see-also-para>
<emu-grammar><emu-production name="Block" collapsed="">
<emu-nt><a href="#prod-Block">Block</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><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_3647"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="StatementList" collapsed="">
<emu-nt><a href="#prod-StatementList">StatementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0db4597a"><emu-nt id="_ref_11120"><a href="#prod-StatementList">StatementList</a></emu-nt><emu-nt id="_ref_11121"><a href="#prod-StatementListItem">StatementListItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>declarations</var> be VarScopedDeclarations of <emu-nt id="_ref_11122"><a href="#prod-StatementList">StatementList</a></emu-nt>.</li><li>Append to <var>declarations</var> the elements of the VarScopedDeclarations of <emu-nt id="_ref_11123"><a href="#prod-StatementListItem">StatementListItem</a></emu-nt>.</li><li>Return <var>declarations</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="StatementListItem" collapsed="">
<emu-nt><a href="#prod-StatementListItem">StatementListItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d6f37721"><emu-nt id="_ref_11124"><a href="#prod-Declaration">Declaration</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_3648"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-block-runtime-semantics-evaluation">
<h1><span class="secnum">13.2.13</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="Block" collapsed="">
<emu-nt><a href="#prod-Block">Block</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><emu-t>{</emu-t><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-xref aoid="NormalCompletion" id="_ref_3649"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="Block" collapsed="">
<emu-nt><a href="#prod-Block">Block</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6782c9a7"><emu-t>{</emu-t><emu-nt id="_ref_11125"><a href="#prod-StatementList">StatementList</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>oldEnv</var> be the <emu-xref href="#running-execution-context" id="_ref_3650"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment.</li><li>Let <var>blockEnv</var> be <emu-xref aoid="NewDeclarativeEnvironment" id="_ref_3651"><a href="#sec-newdeclarativeenvironment">NewDeclarativeEnvironment</a></emu-xref>(<var>oldEnv</var>).</li><li>Perform <emu-xref aoid="BlockDeclarationInstantiation" id="_ref_3652"><a href="#sec-blockdeclarationinstantiation">BlockDeclarationInstantiation</a></emu-xref>(<emu-nt id="_ref_11126"><a href="#prod-StatementList">StatementList</a></emu-nt>, <var>blockEnv</var>).</li><li>Set the <emu-xref href="#running-execution-context" id="_ref_3653"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment to <var>blockEnv</var>.</li><li>Let <var>blockValue</var> be the result of evaluating <emu-nt id="_ref_11127"><a href="#prod-StatementList">StatementList</a></emu-nt>.</li><li>Set the <emu-xref href="#running-execution-context" id="_ref_3654"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment to <var>oldEnv</var>.</li><li>Return <var>blockValue</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>No matter how control leaves the <emu-nt id="_ref_11128"><a href="#prod-Block">Block</a></emu-nt> the LexicalEnvironment is always restored to its former state.</p>
</div></emu-note>
<emu-grammar><emu-production name="StatementList" collapsed="">
<emu-nt><a href="#prod-StatementList">StatementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0db4597a"><emu-nt id="_ref_11129"><a href="#prod-StatementList">StatementList</a></emu-nt><emu-nt id="_ref_11130"><a href="#prod-StatementListItem">StatementListItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>sl</var> be the result of evaluating <emu-nt id="_ref_11131"><a href="#prod-StatementList">StatementList</a></emu-nt>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3655"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>sl</var>).</li><li>Let <var>s</var> be the result of evaluating <emu-nt id="_ref_11132"><a href="#prod-StatementListItem">StatementListItem</a></emu-nt>.</li><li>Return <emu-xref aoid="Completion" id="_ref_3656"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<emu-xref aoid="UpdateEmpty" id="_ref_3657"><a href="#sec-updateempty">UpdateEmpty</a></emu-xref>(<var>s</var>, <var>sl</var>)).
</li></ol></emu-alg>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The value of a <emu-nt id="_ref_11133"><a href="#prod-StatementList">StatementList</a></emu-nt> is the value of the last value-producing item in the <emu-nt id="_ref_11134"><a href="#prod-StatementList">StatementList</a></emu-nt>. For example, the following calls to the <code>eval</code> function all return the value 1:</p>
<pre><code class="javascript hljs"><span class="hljs-built_in">eval</span>(<span class="hljs-string">"1;;;;;"</span>)
<span class="hljs-built_in">eval</span>(<span class="hljs-string">"1;{}"</span>)
<span class="hljs-built_in">eval</span>(<span class="hljs-string">"1;var a;"</span>)</code></pre>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-blockdeclarationinstantiation" aoid="BlockDeclarationInstantiation">
<h1><span class="secnum">13.2.14</span>Runtime Semantics: BlockDeclarationInstantiation ( <var>code</var>, <var>env</var> )</h1>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>When a <emu-nt id="_ref_11135"><a href="#prod-Block">Block</a></emu-nt> or <emu-nt id="_ref_11136"><a href="#prod-CaseBlock">CaseBlock</a></emu-nt> is evaluated a new declarative <emu-xref href="#sec-environment-records" id="_ref_3658"><a href="#sec-environment-records">Environment Record</a></emu-xref>
is created and bindings for each block scoped variable, constant,
function, or class declared in the block are instantiated in the <emu-xref href="#sec-environment-records" id="_ref_3659"><a href="#sec-environment-records">Environment Record</a></emu-xref>.</p>
</div></emu-note>
<p>BlockDeclarationInstantiation is performed as follows using arguments <var>code</var> and <var>env</var>. <var>code</var> is the <emu-xref href="#sec-syntactic-grammar" id="_ref_3660"><a href="#sec-syntactic-grammar">Parse Node</a></emu-xref> corresponding to the body of the block. <var>env</var> is the <emu-xref href="#sec-lexical-environments" id="_ref_3661"><a href="#sec-lexical-environments">Lexical Environment</a></emu-xref> in which bindings are to be created.</p>
<!--
WARNING: If you add, remove, rename, or repurpose any variable names
within this algorithm, you may need to update
#sec-web-compat-blockdeclarationinstantiation accordingly.
-->
<emu-alg><ol><li>Let <var>envRec</var> be <var>env</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_3662"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref>.</li><li><emu-xref href="#assert" id="_ref_3663"><a href="#assert">Assert</a></emu-xref>: <var>envRec</var> is a declarative <emu-xref href="#sec-environment-records" id="_ref_3664"><a href="#sec-environment-records">Environment Record</a></emu-xref>.</li><li>Let <var>declarations</var> be the LexicallyScopedDeclarations of <var>code</var>.</li><li>For each element <var>d</var> in <var>declarations</var>, do<ol><li>For each element <var>dn</var> of the BoundNames of <var>d</var>, do<ol><li>If IsConstantDeclaration of <var>d</var> is <emu-val>true</emu-val>, then<ol><li>Perform ! <var>envRec</var>.CreateImmutableBinding(<var>dn</var>, <emu-val>true</emu-val>).</li></ol></li><li>Else,<ol><li>Perform ! <var>envRec</var>.CreateMutableBinding(<var>dn</var>, <emu-val>false</emu-val>).</li></ol></li></ol></li><li>If <var>d</var> is a <emu-nt id="_ref_11137"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>, a <emu-nt id="_ref_11138"><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a></emu-nt>, an <emu-nt id="_ref_11139"><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt>, or an <emu-nt id="_ref_11140"><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt>, then<ol><li>Let <var>fn</var> be the sole element of the BoundNames of <var>d</var>.</li><li>Let <var>fo</var> be the result of performing InstantiateFunctionObject for <var>d</var> with argument <var>env</var>.</li><li>Perform <var>envRec</var>.InitializeBinding(<var>fn</var>, <var>fo</var>).
</li></ol></li></ol></li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-declarations-and-the-variable-statement">
<h1><span class="secnum">13.3</span>Declarations and the Variable Statement</h1>
<emu-clause id="sec-let-and-const-declarations">
<h1><span class="secnum">13.3.1</span>Let and Const Declarations</h1>
<emu-note><span class="note">Note</span><div class="note-contents">
<p><code>let</code> and <code>const</code> declarations define variables that are scoped to the <emu-xref href="#running-execution-context" id="_ref_3665"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment. The variables are created when their containing <emu-xref href="#sec-lexical-environments" id="_ref_3666"><a href="#sec-lexical-environments">Lexical Environment</a></emu-xref> is instantiated but may not be accessed in any way until the variable's <emu-nt id="_ref_11141"><a href="#prod-LexicalBinding">LexicalBinding</a></emu-nt> is evaluated. A variable defined by a <emu-nt id="_ref_11142"><a href="#prod-LexicalBinding">LexicalBinding</a></emu-nt> with an <emu-nt id="_ref_11143"><a href="#prod-Initializer">Initializer</a></emu-nt> is assigned the value of its <emu-nt id="_ref_11144"><a href="#prod-Initializer">Initializer</a></emu-nt>'s <emu-nt id="_ref_11145"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt> when the <emu-nt id="_ref_11146"><a href="#prod-LexicalBinding">LexicalBinding</a></emu-nt> is evaluated, not when the variable is created. If a <emu-nt id="_ref_11147"><a href="#prod-LexicalBinding">LexicalBinding</a></emu-nt> in a <code>let</code> declaration does not have an <emu-nt id="_ref_11148"><a href="#prod-Initializer">Initializer</a></emu-nt> the variable is assigned the value <emu-val>undefined</emu-val> when the <emu-nt id="_ref_11149"><a href="#prod-LexicalBinding">LexicalBinding</a></emu-nt> is evaluated.</p>
</div></emu-note>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="LexicalDeclaration" params="In, Yield, Await" id="prod-LexicalDeclaration">
<emu-nt params="In, Yield, Await"><a href="#prod-LexicalDeclaration">LexicalDeclaration</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8d299b81"><emu-nt id="_ref_11150"><a href="#prod-LetOrConst">LetOrConst</a></emu-nt><emu-nt params="?In, ?Yield, ?Await" id="_ref_11151"><a href="#prod-BindingList">BindingList</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="LetOrConst" id="prod-LetOrConst">
<emu-nt><a href="#prod-LetOrConst">LetOrConst</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="940c6b54"><emu-t>let</emu-t></emu-rhs>
<emu-rhs a="36233f0f"><emu-t>const</emu-t></emu-rhs>
</emu-production>
<emu-production name="BindingList" params="In, Yield, Await" id="prod-BindingList">
<emu-nt params="In, Yield, Await"><a href="#prod-BindingList">BindingList</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="35e0fa1e"><emu-nt params="?In, ?Yield, ?Await" id="_ref_11152"><a href="#prod-LexicalBinding">LexicalBinding</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="1435fb35"><emu-nt params="?In, ?Yield, ?Await" id="_ref_11153"><a href="#prod-BindingList">BindingList</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_11154"><a href="#prod-LexicalBinding">LexicalBinding</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="LexicalBinding" params="In, Yield, Await" id="prod-LexicalBinding">
<emu-nt params="In, Yield, Await"><a href="#prod-LexicalBinding">LexicalBinding</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8eeb7c11"><emu-nt params="?Yield, ?Await" id="_ref_11155"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt params="?In, ?Yield, ?Await" optional="" id="_ref_11156"><a href="#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="49d70a55"><emu-nt params="?Yield, ?Await" id="_ref_11157"><a href="#prod-BindingPattern">BindingPattern</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt params="?In, ?Yield, ?Await" id="_ref_11158"><a href="#prod-Initializer">Initializer</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-clause id="sec-let-and-const-declarations-static-semantics-early-errors">
<h1><span class="secnum">13.3.1.1</span>Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="LexicalDeclaration" collapsed="">
<emu-nt><a href="#prod-LexicalDeclaration">LexicalDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0dea8409"><emu-nt id="_ref_11159"><a href="#prod-LetOrConst">LetOrConst</a></emu-nt><emu-nt id="_ref_11160"><a href="#prod-BindingList">BindingList</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if the BoundNames of <emu-nt id="_ref_11161"><a href="#prod-BindingList">BindingList</a></emu-nt> contains <code>"let"</code>.
</li>
<li>
It is a Syntax Error if the BoundNames of <emu-nt id="_ref_11162"><a href="#prod-BindingList">BindingList</a></emu-nt> contains any duplicate entries.
</li>
</ul>
<emu-grammar><emu-production name="LexicalBinding" collapsed="">
<emu-nt><a href="#prod-LexicalBinding">LexicalBinding</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0b9344a8"><emu-nt id="_ref_11163"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-nt optional="" id="_ref_11164"><a href="#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 <emu-nt id="_ref_11165"><a href="#prod-Initializer">Initializer</a></emu-nt> is not present and IsConstantDeclaration of the <emu-nt id="_ref_11166"><a href="#prod-LexicalDeclaration">LexicalDeclaration</a></emu-nt> containing this <emu-nt id="_ref_11167"><a href="#prod-LexicalBinding">LexicalBinding</a></emu-nt> is <emu-val>true</emu-val>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-let-and-const-declarations-static-semantics-boundnames">
<h1><span class="secnum">13.3.1.2</span>Static Semantics: BoundNames</h1>
<emu-see-also-para op="BoundNames"></emu-see-also-para>
<emu-grammar><emu-production name="LexicalDeclaration" collapsed="">
<emu-nt><a href="#prod-LexicalDeclaration">LexicalDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0dea8409"><emu-nt id="_ref_11168"><a href="#prod-LetOrConst">LetOrConst</a></emu-nt><emu-nt id="_ref_11169"><a href="#prod-BindingList">BindingList</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the BoundNames of <emu-nt id="_ref_11170"><a href="#prod-BindingList">BindingList</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="BindingList" collapsed="">
<emu-nt><a href="#prod-BindingList">BindingList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0ede34cd"><emu-nt id="_ref_11171"><a href="#prod-BindingList">BindingList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_11172"><a href="#prod-LexicalBinding">LexicalBinding</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>names</var> be the BoundNames of <emu-nt id="_ref_11173"><a href="#prod-BindingList">BindingList</a></emu-nt>.</li><li>Append to <var>names</var> the elements of the BoundNames of <emu-nt id="_ref_11174"><a href="#prod-LexicalBinding">LexicalBinding</a></emu-nt>.</li><li>Return <var>names</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="LexicalBinding" collapsed="">
<emu-nt><a href="#prod-LexicalBinding">LexicalBinding</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0b9344a8"><emu-nt id="_ref_11175"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-nt optional="" id="_ref_11176"><a href="#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>Return the BoundNames of <emu-nt id="_ref_11177"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="LexicalBinding" collapsed="">
<emu-nt><a href="#prod-LexicalBinding">LexicalBinding</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0ddd53e5"><emu-nt id="_ref_11178"><a href="#prod-BindingPattern">BindingPattern</a></emu-nt><emu-nt id="_ref_11179"><a href="#prod-Initializer">Initializer</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the BoundNames of <emu-nt id="_ref_11180"><a href="#prod-BindingPattern">BindingPattern</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-let-and-const-declarations-static-semantics-isconstantdeclaration">
<h1><span class="secnum">13.3.1.3</span>Static Semantics: IsConstantDeclaration</h1>
<emu-see-also-para op="IsConstantDeclaration"></emu-see-also-para>
<emu-grammar><emu-production name="LexicalDeclaration" collapsed="">
<emu-nt><a href="#prod-LexicalDeclaration">LexicalDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0dea8409"><emu-nt id="_ref_11181"><a href="#prod-LetOrConst">LetOrConst</a></emu-nt><emu-nt id="_ref_11182"><a href="#prod-BindingList">BindingList</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return IsConstantDeclaration of <emu-nt id="_ref_11183"><a href="#prod-LetOrConst">LetOrConst</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="LetOrConst" collapsed="">
<emu-nt><a href="#prod-LetOrConst">LetOrConst</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="940c6b54"><emu-t>let</emu-t></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="LetOrConst" collapsed="">
<emu-nt><a href="#prod-LetOrConst">LetOrConst</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="36233f0f"><emu-t>const</emu-t></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-let-and-const-declarations-runtime-semantics-evaluation">
<h1><span class="secnum">13.3.1.4</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="LexicalDeclaration" collapsed="">
<emu-nt><a href="#prod-LexicalDeclaration">LexicalDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0dea8409"><emu-nt id="_ref_11184"><a href="#prod-LetOrConst">LetOrConst</a></emu-nt><emu-nt id="_ref_11185"><a href="#prod-BindingList">BindingList</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>next</var> be the result of evaluating <emu-nt id="_ref_11186"><a href="#prod-BindingList">BindingList</a></emu-nt>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3667"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>next</var>).</li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_3668"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="BindingList" collapsed="">
<emu-nt><a href="#prod-BindingList">BindingList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0ede34cd"><emu-nt id="_ref_11187"><a href="#prod-BindingList">BindingList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_11188"><a href="#prod-LexicalBinding">LexicalBinding</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>next</var> be the result of evaluating <emu-nt id="_ref_11189"><a href="#prod-BindingList">BindingList</a></emu-nt>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3669"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>next</var>).</li><li>Return the result of evaluating <emu-nt id="_ref_11190"><a href="#prod-LexicalBinding">LexicalBinding</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="LexicalBinding" collapsed="">
<emu-nt><a href="#prod-LexicalBinding">LexicalBinding</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="50e97238"><emu-nt id="_ref_11191"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>lhs</var> be <emu-xref aoid="ResolveBinding" id="_ref_3670"><a href="#sec-resolvebinding">ResolveBinding</a></emu-xref>(StringValue of <emu-nt id="_ref_11192"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt>).</li><li>Return <emu-xref aoid="InitializeReferencedBinding" id="_ref_3671"><a href="#sec-initializereferencedbinding">InitializeReferencedBinding</a></emu-xref>(<var>lhs</var>, <emu-val>undefined</emu-val>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>A <emu-xref href="#sec-static-semantic-rules" id="_ref_3672"><a href="#sec-static-semantic-rules">static semantics</a></emu-xref> rule ensures that this form of <emu-nt id="_ref_11193"><a href="#prod-LexicalBinding">LexicalBinding</a></emu-nt> never occurs in a <code>const</code> declaration.</p>
</div></emu-note>
<emu-grammar><emu-production name="LexicalBinding" collapsed="">
<emu-nt><a href="#prod-LexicalBinding">LexicalBinding</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="89becb83"><emu-nt id="_ref_11194"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-nt id="_ref_11195"><a href="#prod-Initializer">Initializer</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>bindingId</var> be StringValue of <emu-nt id="_ref_11196"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt>.</li><li>Let <var>lhs</var> be <emu-xref aoid="ResolveBinding" id="_ref_3673"><a href="#sec-resolvebinding">ResolveBinding</a></emu-xref>(<var>bindingId</var>).</li><li>If <emu-xref aoid="IsAnonymousFunctionDefinition" id="_ref_3674"><a href="#sec-isanonymousfunctiondefinition">IsAnonymousFunctionDefinition</a></emu-xref>(<emu-nt id="_ref_11197"><a href="#prod-Initializer">Initializer</a></emu-nt>) is <emu-val>true</emu-val>, then<ol><li>Let <var>value</var> be the result of performing NamedEvaluation for <emu-nt id="_ref_11198"><a href="#prod-Initializer">Initializer</a></emu-nt> with argument <var>bindingId</var>.</li></ol></li><li>Else,<ol><li>Let <var>rhs</var> be the result of evaluating <emu-nt id="_ref_11199"><a href="#prod-Initializer">Initializer</a></emu-nt>.</li><li>Let <var>value</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3675"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>rhs</var>).</li></ol></li><li>Return <emu-xref aoid="InitializeReferencedBinding" id="_ref_3676"><a href="#sec-initializereferencedbinding">InitializeReferencedBinding</a></emu-xref>(<var>lhs</var>, <var>value</var>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="LexicalBinding" collapsed="">
<emu-nt><a href="#prod-LexicalBinding">LexicalBinding</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0ddd53e5"><emu-nt id="_ref_11200"><a href="#prod-BindingPattern">BindingPattern</a></emu-nt><emu-nt id="_ref_11201"><a href="#prod-Initializer">Initializer</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>rhs</var> be the result of evaluating <emu-nt id="_ref_11202"><a href="#prod-Initializer">Initializer</a></emu-nt>.</li><li>Let <var>value</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3677"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>rhs</var>).</li><li>Let <var>env</var> be the <emu-xref href="#running-execution-context" id="_ref_3678"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment.</li><li>Return the result of performing BindingInitialization for <emu-nt id="_ref_11203"><a href="#prod-BindingPattern">BindingPattern</a></emu-nt> using <var>value</var> and <var>env</var> as the arguments.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-variable-statement">
<h1><span class="secnum">13.3.2</span>Variable Statement</h1>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>A <code>var</code> statement declares variables that are scoped to the <emu-xref href="#running-execution-context" id="_ref_3679"><a href="#running-execution-context">running execution context</a></emu-xref>'s VariableEnvironment. Var variables are created when their containing <emu-xref href="#sec-lexical-environments" id="_ref_3680"><a href="#sec-lexical-environments">Lexical Environment</a></emu-xref> is instantiated and are initialized to <emu-val>undefined</emu-val> when created. Within the scope of any VariableEnvironment a common <emu-nt id="_ref_11204"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt> may appear in more than one <emu-nt id="_ref_11205"><a href="#prod-VariableDeclaration">VariableDeclaration</a></emu-nt> but those declarations collectively define only one variable. A variable defined by a <emu-nt id="_ref_11206"><a href="#prod-VariableDeclaration">VariableDeclaration</a></emu-nt> with an <emu-nt id="_ref_11207"><a href="#prod-Initializer">Initializer</a></emu-nt> is assigned the value of its <emu-nt id="_ref_11208"><a href="#prod-Initializer">Initializer</a></emu-nt>'s <emu-nt id="_ref_11209"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt> when the <emu-nt id="_ref_11210"><a href="#prod-VariableDeclaration">VariableDeclaration</a></emu-nt> is executed, not when the variable is created.</p>
</div></emu-note>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="VariableStatement" params="Yield, Await" id="prod-VariableStatement">
<emu-nt params="Yield, Await"><a href="#prod-VariableStatement">VariableStatement</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b41c0900"><emu-t>var</emu-t><emu-nt params="+In, ?Yield, ?Await" id="_ref_11211"><a href="#prod-VariableDeclarationList">VariableDeclarationList</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="VariableDeclarationList" params="In, Yield, Await" id="prod-VariableDeclarationList">
<emu-nt params="In, Yield, Await"><a href="#prod-VariableDeclarationList">VariableDeclarationList</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="3ece12c3"><emu-nt params="?In, ?Yield, ?Await" id="_ref_11212"><a href="#prod-VariableDeclaration">VariableDeclaration</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="c6c87748"><emu-nt params="?In, ?Yield, ?Await" id="_ref_11213"><a href="#prod-VariableDeclarationList">VariableDeclarationList</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_11214"><a href="#prod-VariableDeclaration">VariableDeclaration</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="VariableDeclaration" params="In, Yield, Await" id="prod-VariableDeclaration">
<emu-nt params="In, Yield, Await"><a href="#prod-VariableDeclaration">VariableDeclaration</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8eeb7c11"><emu-nt params="?Yield, ?Await" id="_ref_11215"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt params="?In, ?Yield, ?Await" optional="" id="_ref_11216"><a href="#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="49d70a55"><emu-nt params="?Yield, ?Await" id="_ref_11217"><a href="#prod-BindingPattern">BindingPattern</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt params="?In, ?Yield, ?Await" id="_ref_11218"><a href="#prod-Initializer">Initializer</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-clause id="sec-variable-statement-static-semantics-boundnames">
<h1><span class="secnum">13.3.2.1</span>Static Semantics: BoundNames</h1>
<emu-see-also-para op="BoundNames"></emu-see-also-para>
<emu-grammar><emu-production name="VariableDeclarationList" collapsed="">
<emu-nt><a href="#prod-VariableDeclarationList">VariableDeclarationList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a0057011"><emu-nt id="_ref_11219"><a href="#prod-VariableDeclarationList">VariableDeclarationList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_11220"><a href="#prod-VariableDeclaration">VariableDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>names</var> be BoundNames of <emu-nt id="_ref_11221"><a href="#prod-VariableDeclarationList">VariableDeclarationList</a></emu-nt>.</li><li>Append to <var>names</var> the elements of BoundNames of <emu-nt id="_ref_11222"><a href="#prod-VariableDeclaration">VariableDeclaration</a></emu-nt>.</li><li>Return <var>names</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="VariableDeclaration" collapsed="">
<emu-nt><a href="#prod-VariableDeclaration">VariableDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0b9344a8"><emu-nt id="_ref_11223"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-nt optional="" id="_ref_11224"><a href="#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>Return the BoundNames of <emu-nt id="_ref_11225"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="VariableDeclaration" collapsed="">
<emu-nt><a href="#prod-VariableDeclaration">VariableDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0ddd53e5"><emu-nt id="_ref_11226"><a href="#prod-BindingPattern">BindingPattern</a></emu-nt><emu-nt id="_ref_11227"><a href="#prod-Initializer">Initializer</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the BoundNames of <emu-nt id="_ref_11228"><a href="#prod-BindingPattern">BindingPattern</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-variable-statement-static-semantics-vardeclarednames">
<h1><span class="secnum">13.3.2.2</span>Static Semantics: VarDeclaredNames</h1>
<emu-see-also-para op="VarDeclaredNames"></emu-see-also-para>
<emu-grammar><emu-production name="VariableStatement" collapsed="">
<emu-nt><a href="#prod-VariableStatement">VariableStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="3347a1bd"><emu-t>var</emu-t><emu-nt id="_ref_11229"><a href="#prod-VariableDeclarationList">VariableDeclarationList</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return BoundNames of <emu-nt id="_ref_11230"><a href="#prod-VariableDeclarationList">VariableDeclarationList</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-variable-statement-static-semantics-varscopeddeclarations">
<h1><span class="secnum">13.3.2.3</span>Static Semantics: VarScopedDeclarations</h1>
<emu-see-also-para op="VarScopedDeclarations"></emu-see-also-para>
<emu-grammar><emu-production name="VariableDeclarationList" collapsed="">
<emu-nt><a href="#prod-VariableDeclarationList">VariableDeclarationList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="377a6210"><emu-nt id="_ref_11231"><a href="#prod-VariableDeclaration">VariableDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3681"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing <emu-nt id="_ref_11232"><a href="#prod-VariableDeclaration">VariableDeclaration</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="VariableDeclarationList" collapsed="">
<emu-nt><a href="#prod-VariableDeclarationList">VariableDeclarationList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a0057011"><emu-nt id="_ref_11233"><a href="#prod-VariableDeclarationList">VariableDeclarationList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_11234"><a href="#prod-VariableDeclaration">VariableDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>declarations</var> be VarScopedDeclarations of <emu-nt id="_ref_11235"><a href="#prod-VariableDeclarationList">VariableDeclarationList</a></emu-nt>.</li><li>Append <emu-nt id="_ref_11236"><a href="#prod-VariableDeclaration">VariableDeclaration</a></emu-nt> to <var>declarations</var>.</li><li>Return <var>declarations</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-variable-statement-runtime-semantics-evaluation">
<h1><span class="secnum">13.3.2.4</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="VariableStatement" collapsed="">
<emu-nt><a href="#prod-VariableStatement">VariableStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="3347a1bd"><emu-t>var</emu-t><emu-nt id="_ref_11237"><a href="#prod-VariableDeclarationList">VariableDeclarationList</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>next</var> be the result of evaluating <emu-nt id="_ref_11238"><a href="#prod-VariableDeclarationList">VariableDeclarationList</a></emu-nt>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3682"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>next</var>).</li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_3683"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="VariableDeclarationList" collapsed="">
<emu-nt><a href="#prod-VariableDeclarationList">VariableDeclarationList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a0057011"><emu-nt id="_ref_11239"><a href="#prod-VariableDeclarationList">VariableDeclarationList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_11240"><a href="#prod-VariableDeclaration">VariableDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>next</var> be the result of evaluating <emu-nt id="_ref_11241"><a href="#prod-VariableDeclarationList">VariableDeclarationList</a></emu-nt>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3684"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>next</var>).</li><li>Return the result of evaluating <emu-nt id="_ref_11242"><a href="#prod-VariableDeclaration">VariableDeclaration</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="VariableDeclaration" collapsed="">
<emu-nt><a href="#prod-VariableDeclaration">VariableDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="50e97238"><emu-nt id="_ref_11243"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-xref aoid="NormalCompletion" id="_ref_3685"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="VariableDeclaration" collapsed="">
<emu-nt><a href="#prod-VariableDeclaration">VariableDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="89becb83"><emu-nt id="_ref_11244"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-nt id="_ref_11245"><a href="#prod-Initializer">Initializer</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>bindingId</var> be StringValue of <emu-nt id="_ref_11246"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt>.</li><li>Let <var>lhs</var> be ?&nbsp;<emu-xref aoid="ResolveBinding" id="_ref_3686"><a href="#sec-resolvebinding">ResolveBinding</a></emu-xref>(<var>bindingId</var>).</li><li>If <emu-xref aoid="IsAnonymousFunctionDefinition" id="_ref_3687"><a href="#sec-isanonymousfunctiondefinition">IsAnonymousFunctionDefinition</a></emu-xref>(<emu-nt id="_ref_11247"><a href="#prod-Initializer">Initializer</a></emu-nt>) is <emu-val>true</emu-val>, then<ol><li>Let <var>value</var> be the result of performing NamedEvaluation for <emu-nt id="_ref_11248"><a href="#prod-Initializer">Initializer</a></emu-nt> with argument <var>bindingId</var>.</li></ol></li><li>Else,<ol><li>Let <var>rhs</var> be the result of evaluating <emu-nt id="_ref_11249"><a href="#prod-Initializer">Initializer</a></emu-nt>.</li><li>Let <var>value</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3688"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>rhs</var>).</li></ol></li><li>Return ?&nbsp;<emu-xref aoid="PutValue" id="_ref_3689"><a href="#sec-putvalue">PutValue</a></emu-xref>(<var>lhs</var>, <var>value</var>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>If a <emu-nt id="_ref_11250"><a href="#prod-VariableDeclaration">VariableDeclaration</a></emu-nt> is nested within a with statement and the <emu-nt id="_ref_11251"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt> in the <emu-nt id="_ref_11252"><a href="#prod-VariableDeclaration">VariableDeclaration</a></emu-nt> is the same as a <emu-xref href="#property-name" id="_ref_3690"><a href="#property-name">property name</a></emu-xref> of the binding object of the with statement's object <emu-xref href="#sec-environment-records" id="_ref_3691"><a href="#sec-environment-records">Environment Record</a></emu-xref>, then step 6 will assign <var>value</var> to the property instead of assigning to the VariableEnvironment binding of the <emu-nt id="_ref_11253"><a href="#prod-Identifier">Identifier</a></emu-nt>.</p>
</div></emu-note>
<emu-grammar><emu-production name="VariableDeclaration" collapsed="">
<emu-nt><a href="#prod-VariableDeclaration">VariableDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0ddd53e5"><emu-nt id="_ref_11254"><a href="#prod-BindingPattern">BindingPattern</a></emu-nt><emu-nt id="_ref_11255"><a href="#prod-Initializer">Initializer</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>rhs</var> be the result of evaluating <emu-nt id="_ref_11256"><a href="#prod-Initializer">Initializer</a></emu-nt>.</li><li>Let <var>rval</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3692"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>rhs</var>).</li><li>Return the result of performing BindingInitialization for <emu-nt id="_ref_11257"><a href="#prod-BindingPattern">BindingPattern</a></emu-nt> passing <var>rval</var> and <emu-val>undefined</emu-val> as arguments.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-destructuring-binding-patterns">
<h1><span class="secnum">13.3.3</span>Destructuring Binding Patterns</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="BindingPattern" params="Yield, Await" id="prod-BindingPattern">
<emu-nt params="Yield, Await"><a href="#prod-BindingPattern">BindingPattern</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="7d60f68c"><emu-nt params="?Yield, ?Await" id="_ref_11258"><a href="#prod-ObjectBindingPattern">ObjectBindingPattern</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="869ca7d6"><emu-nt params="?Yield, ?Await" id="_ref_11259"><a href="#prod-ArrayBindingPattern">ArrayBindingPattern</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ObjectBindingPattern" params="Yield, Await" id="prod-ObjectBindingPattern">
<emu-nt params="Yield, Await"><a href="#prod-ObjectBindingPattern">ObjectBindingPattern</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><emu-t>{</emu-t><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="539d4408"><emu-t>{</emu-t><emu-nt params="?Yield, ?Await" id="_ref_11260"><a href="#prod-BindingRestProperty">BindingRestProperty</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="b1dfec5e"><emu-t>{</emu-t><emu-nt params="?Yield, ?Await" id="_ref_11261"><a href="#prod-BindingPropertyList">BindingPropertyList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="f7cb1385"><emu-t>{</emu-t><emu-nt params="?Yield, ?Await" id="_ref_11262"><a href="#prod-BindingPropertyList">BindingPropertyList</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_11263"><a href="#prod-BindingRestProperty">BindingRestProperty</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="ArrayBindingPattern" params="Yield, Await" id="prod-ArrayBindingPattern">
<emu-nt params="Yield, Await"><a href="#prod-ArrayBindingPattern">ArrayBindingPattern</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f36c8065"><emu-t>[</emu-t><emu-nt optional="" id="_ref_11264"><a href="#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt params="?Yield, ?Await" optional="" id="_ref_11265"><a href="#prod-BindingRestElement">BindingRestElement</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="4f3da32d"><emu-t>[</emu-t><emu-nt params="?Yield, ?Await" id="_ref_11266"><a href="#prod-BindingElementList">BindingElementList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>]</emu-t></emu-rhs>
<emu-rhs a="799161ee"><emu-t>[</emu-t><emu-nt params="?Yield, ?Await" id="_ref_11267"><a href="#prod-BindingElementList">BindingElementList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>,</emu-t><emu-nt optional="" id="_ref_11268"><a href="#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt params="?Yield, ?Await" optional="" id="_ref_11269"><a href="#prod-BindingRestElement">BindingRestElement</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="BindingRestProperty" params="Yield, Await" id="prod-BindingRestProperty">
<emu-nt params="Yield, Await"><a href="#prod-BindingRestProperty">BindingRestProperty</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="34b0d77b"><emu-t>...</emu-t><emu-nt params="?Yield, ?Await" id="_ref_11270"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="BindingPropertyList" params="Yield, Await" id="prod-BindingPropertyList">
<emu-nt params="Yield, Await"><a href="#prod-BindingPropertyList">BindingPropertyList</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f1b6880e"><emu-nt params="?Yield, ?Await" id="_ref_11271"><a href="#prod-BindingProperty">BindingProperty</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="79695f7a"><emu-nt params="?Yield, ?Await" id="_ref_11272"><a href="#prod-BindingPropertyList">BindingPropertyList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>,</emu-t><emu-nt params="?Yield, ?Await" id="_ref_11273"><a href="#prod-BindingProperty">BindingProperty</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="BindingElementList" params="Yield, Await" id="prod-BindingElementList">
<emu-nt params="Yield, Await"><a href="#prod-BindingElementList">BindingElementList</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="2e96b0e0"><emu-nt params="?Yield, ?Await" id="_ref_11274"><a href="#prod-BindingElisionElement">BindingElisionElement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="e73f33c3"><emu-nt params="?Yield, ?Await" id="_ref_11275"><a href="#prod-BindingElementList">BindingElementList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>,</emu-t><emu-nt params="?Yield, ?Await" id="_ref_11276"><a href="#prod-BindingElisionElement">BindingElisionElement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="BindingElisionElement" params="Yield, Await" id="prod-BindingElisionElement">
<emu-nt params="Yield, Await"><a href="#prod-BindingElisionElement">BindingElisionElement</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e636dca9"><emu-nt optional="" id="_ref_11277"><a href="#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt params="?Yield, ?Await" id="_ref_11278"><a href="#prod-BindingElement">BindingElement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="BindingProperty" params="Yield, Await" id="prod-BindingProperty">
<emu-nt params="Yield, Await"><a href="#prod-BindingProperty">BindingProperty</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d3526702"><emu-nt params="?Yield, ?Await" id="_ref_11279"><a href="#prod-SingleNameBinding">SingleNameBinding</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="5c291273"><emu-nt params="?Yield, ?Await" id="_ref_11280"><a href="#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_11281"><a href="#prod-BindingElement">BindingElement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="BindingElement" params="Yield, Await" id="prod-BindingElement">
<emu-nt params="Yield, Await"><a href="#prod-BindingElement">BindingElement</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d3526702"><emu-nt params="?Yield, ?Await" id="_ref_11282"><a href="#prod-SingleNameBinding">SingleNameBinding</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="132bf94f"><emu-nt params="?Yield, ?Await" id="_ref_11283"><a href="#prod-BindingPattern">BindingPattern</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt params="+In, ?Yield, ?Await" optional="" id="_ref_11284"><a href="#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="SingleNameBinding" params="Yield, Await" id="prod-SingleNameBinding">
<emu-nt params="Yield, Await"><a href="#prod-SingleNameBinding">SingleNameBinding</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="306ee631"><emu-nt params="?Yield, ?Await" id="_ref_11285"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt params="+In, ?Yield, ?Await" optional="" id="_ref_11286"><a href="#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="BindingRestElement" params="Yield, Await" id="prod-BindingRestElement">
<emu-nt params="Yield, Await"><a href="#prod-BindingRestElement">BindingRestElement</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="34b0d77b"><emu-t>...</emu-t><emu-nt params="?Yield, ?Await" id="_ref_11287"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="2dbec6ac"><emu-t>...</emu-t><emu-nt params="?Yield, ?Await" id="_ref_11288"><a href="#prod-BindingPattern">BindingPattern</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-clause id="sec-destructuring-binding-patterns-static-semantics-boundnames">
<h1><span class="secnum">13.3.3.1</span>Static Semantics: BoundNames</h1>
<emu-see-also-para op="BoundNames"></emu-see-also-para>
<emu-grammar><emu-production name="ObjectBindingPattern" collapsed="">
<emu-nt><a href="#prod-ObjectBindingPattern">ObjectBindingPattern</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><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_3693"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ArrayBindingPattern" collapsed="">
<emu-nt><a href="#prod-ArrayBindingPattern">ArrayBindingPattern</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="906e476b"><emu-t>[</emu-t><emu-nt optional="" id="_ref_11289"><a href="#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>Return a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3694"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ArrayBindingPattern" collapsed="">
<emu-nt><a href="#prod-ArrayBindingPattern">ArrayBindingPattern</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0c457c16"><emu-t>[</emu-t><emu-nt optional="" id="_ref_11290"><a href="#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt id="_ref_11291"><a href="#prod-BindingRestElement">BindingRestElement</a></emu-nt><emu-t>]</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the BoundNames of <emu-nt id="_ref_11292"><a href="#prod-BindingRestElement">BindingRestElement</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ArrayBindingPattern" collapsed="">
<emu-nt><a href="#prod-ArrayBindingPattern">ArrayBindingPattern</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8f1a867e"><emu-t>[</emu-t><emu-nt id="_ref_11293"><a href="#prod-BindingElementList">BindingElementList</a></emu-nt><emu-t>,</emu-t><emu-nt optional="" id="_ref_11294"><a href="#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>Return the BoundNames of <emu-nt id="_ref_11295"><a href="#prod-BindingElementList">BindingElementList</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ArrayBindingPattern" collapsed="">
<emu-nt><a href="#prod-ArrayBindingPattern">ArrayBindingPattern</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ee591d49"><emu-t>[</emu-t><emu-nt id="_ref_11296"><a href="#prod-BindingElementList">BindingElementList</a></emu-nt><emu-t>,</emu-t><emu-nt optional="" id="_ref_11297"><a href="#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt id="_ref_11298"><a href="#prod-BindingRestElement">BindingRestElement</a></emu-nt><emu-t>]</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>names</var> be BoundNames of <emu-nt id="_ref_11299"><a href="#prod-BindingElementList">BindingElementList</a></emu-nt>.</li><li>Append to <var>names</var> the elements of BoundNames of <emu-nt id="_ref_11300"><a href="#prod-BindingRestElement">BindingRestElement</a></emu-nt>.</li><li>Return <var>names</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="BindingPropertyList" collapsed="">
<emu-nt><a href="#prod-BindingPropertyList">BindingPropertyList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0730de3b"><emu-nt id="_ref_11301"><a href="#prod-BindingPropertyList">BindingPropertyList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_11302"><a href="#prod-BindingProperty">BindingProperty</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>names</var> be BoundNames of <emu-nt id="_ref_11303"><a href="#prod-BindingPropertyList">BindingPropertyList</a></emu-nt>.</li><li>Append to <var>names</var> the elements of BoundNames of <emu-nt id="_ref_11304"><a href="#prod-BindingProperty">BindingProperty</a></emu-nt>.</li><li>Return <var>names</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="BindingElementList" collapsed="">
<emu-nt><a href="#prod-BindingElementList">BindingElementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1e2c0030"><emu-nt id="_ref_11305"><a href="#prod-BindingElementList">BindingElementList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_11306"><a href="#prod-BindingElisionElement">BindingElisionElement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>names</var> be BoundNames of <emu-nt id="_ref_11307"><a href="#prod-BindingElementList">BindingElementList</a></emu-nt>.</li><li>Append to <var>names</var> the elements of BoundNames of <emu-nt id="_ref_11308"><a href="#prod-BindingElisionElement">BindingElisionElement</a></emu-nt>.</li><li>Return <var>names</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="BindingElisionElement" collapsed="">
<emu-nt><a href="#prod-BindingElisionElement">BindingElisionElement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5a8f4d01"><emu-nt optional="" id="_ref_11309"><a href="#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt id="_ref_11310"><a href="#prod-BindingElement">BindingElement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return BoundNames of <emu-nt id="_ref_11311"><a href="#prod-BindingElement">BindingElement</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="BindingProperty" collapsed="">
<emu-nt><a href="#prod-BindingProperty">BindingProperty</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="987bd1c2"><emu-nt id="_ref_11312"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>:</emu-t><emu-nt id="_ref_11313"><a href="#prod-BindingElement">BindingElement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the BoundNames of <emu-nt id="_ref_11314"><a href="#prod-BindingElement">BindingElement</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="SingleNameBinding" collapsed="">
<emu-nt><a href="#prod-SingleNameBinding">SingleNameBinding</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0b9344a8"><emu-nt id="_ref_11315"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-nt optional="" id="_ref_11316"><a href="#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>Return the BoundNames of <emu-nt id="_ref_11317"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="BindingElement" collapsed="">
<emu-nt><a href="#prod-BindingElement">BindingElement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6875fa94"><emu-nt id="_ref_11318"><a href="#prod-BindingPattern">BindingPattern</a></emu-nt><emu-nt optional="" id="_ref_11319"><a href="#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>Return the BoundNames of <emu-nt id="_ref_11320"><a href="#prod-BindingPattern">BindingPattern</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-destructuring-binding-patterns-static-semantics-containsexpression">
<h1><span class="secnum">13.3.3.2</span>Static Semantics: ContainsExpression</h1>
<emu-see-also-para op="ContainsExpression"></emu-see-also-para>
<emu-grammar><emu-production name="ObjectBindingPattern" collapsed="">
<emu-nt><a href="#prod-ObjectBindingPattern">ObjectBindingPattern</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><emu-t>{</emu-t><emu-t>}</emu-t></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="ArrayBindingPattern" collapsed="">
<emu-nt><a href="#prod-ArrayBindingPattern">ArrayBindingPattern</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="906e476b"><emu-t>[</emu-t><emu-nt optional="" id="_ref_11321"><a href="#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>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ArrayBindingPattern" collapsed="">
<emu-nt><a href="#prod-ArrayBindingPattern">ArrayBindingPattern</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0c457c16"><emu-t>[</emu-t><emu-nt optional="" id="_ref_11322"><a href="#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt id="_ref_11323"><a href="#prod-BindingRestElement">BindingRestElement</a></emu-nt><emu-t>]</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ContainsExpression of <emu-nt id="_ref_11324"><a href="#prod-BindingRestElement">BindingRestElement</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ArrayBindingPattern" collapsed="">
<emu-nt><a href="#prod-ArrayBindingPattern">ArrayBindingPattern</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8f1a867e"><emu-t>[</emu-t><emu-nt id="_ref_11325"><a href="#prod-BindingElementList">BindingElementList</a></emu-nt><emu-t>,</emu-t><emu-nt optional="" id="_ref_11326"><a href="#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>Return ContainsExpression of <emu-nt id="_ref_11327"><a href="#prod-BindingElementList">BindingElementList</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ArrayBindingPattern" collapsed="">
<emu-nt><a href="#prod-ArrayBindingPattern">ArrayBindingPattern</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ee591d49"><emu-t>[</emu-t><emu-nt id="_ref_11328"><a href="#prod-BindingElementList">BindingElementList</a></emu-nt><emu-t>,</emu-t><emu-nt optional="" id="_ref_11329"><a href="#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt id="_ref_11330"><a href="#prod-BindingRestElement">BindingRestElement</a></emu-nt><emu-t>]</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>has</var> be ContainsExpression of <emu-nt id="_ref_11331"><a href="#prod-BindingElementList">BindingElementList</a></emu-nt>.</li><li>If <var>has</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return ContainsExpression of <emu-nt id="_ref_11332"><a href="#prod-BindingRestElement">BindingRestElement</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="BindingPropertyList" collapsed="">
<emu-nt><a href="#prod-BindingPropertyList">BindingPropertyList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0730de3b"><emu-nt id="_ref_11333"><a href="#prod-BindingPropertyList">BindingPropertyList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_11334"><a href="#prod-BindingProperty">BindingProperty</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>has</var> be ContainsExpression of <emu-nt id="_ref_11335"><a href="#prod-BindingPropertyList">BindingPropertyList</a></emu-nt>.</li><li>If <var>has</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return ContainsExpression of <emu-nt id="_ref_11336"><a href="#prod-BindingProperty">BindingProperty</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="BindingElementList" collapsed="">
<emu-nt><a href="#prod-BindingElementList">BindingElementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1e2c0030"><emu-nt id="_ref_11337"><a href="#prod-BindingElementList">BindingElementList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_11338"><a href="#prod-BindingElisionElement">BindingElisionElement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>has</var> be ContainsExpression of <emu-nt id="_ref_11339"><a href="#prod-BindingElementList">BindingElementList</a></emu-nt>.</li><li>If <var>has</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return ContainsExpression of <emu-nt id="_ref_11340"><a href="#prod-BindingElisionElement">BindingElisionElement</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="BindingElisionElement" collapsed="">
<emu-nt><a href="#prod-BindingElisionElement">BindingElisionElement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5a8f4d01"><emu-nt optional="" id="_ref_11341"><a href="#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt id="_ref_11342"><a href="#prod-BindingElement">BindingElement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ContainsExpression of <emu-nt id="_ref_11343"><a href="#prod-BindingElement">BindingElement</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="BindingProperty" collapsed="">
<emu-nt><a href="#prod-BindingProperty">BindingProperty</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="987bd1c2"><emu-nt id="_ref_11344"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>:</emu-t><emu-nt id="_ref_11345"><a href="#prod-BindingElement">BindingElement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>has</var> be IsComputedPropertyKey of <emu-nt id="_ref_11346"><a href="#prod-PropertyName">PropertyName</a></emu-nt>.</li><li>If <var>has</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return ContainsExpression of <emu-nt id="_ref_11347"><a href="#prod-BindingElement">BindingElement</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="BindingElement" collapsed="">
<emu-nt><a href="#prod-BindingElement">BindingElement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0ddd53e5"><emu-nt id="_ref_11348"><a href="#prod-BindingPattern">BindingPattern</a></emu-nt><emu-nt id="_ref_11349"><a href="#prod-Initializer">Initializer</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="SingleNameBinding" collapsed="">
<emu-nt><a href="#prod-SingleNameBinding">SingleNameBinding</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="50e97238"><emu-nt id="_ref_11350"><a href="#prod-BindingIdentifier">BindingIdentifier</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="SingleNameBinding" collapsed="">
<emu-nt><a href="#prod-SingleNameBinding">SingleNameBinding</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="89becb83"><emu-nt id="_ref_11351"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-nt id="_ref_11352"><a href="#prod-Initializer">Initializer</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="BindingRestElement" collapsed="">
<emu-nt><a href="#prod-BindingRestElement">BindingRestElement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="145844de"><emu-t>...</emu-t><emu-nt id="_ref_11353"><a href="#prod-BindingIdentifier">BindingIdentifier</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="BindingRestElement" collapsed="">
<emu-nt><a href="#prod-BindingRestElement">BindingRestElement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1e627394"><emu-t>...</emu-t><emu-nt id="_ref_11354"><a href="#prod-BindingPattern">BindingPattern</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ContainsExpression of <emu-nt id="_ref_11355"><a href="#prod-BindingPattern">BindingPattern</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-destructuring-binding-patterns-static-semantics-hasinitializer">
<h1><span class="secnum">13.3.3.3</span>Static Semantics: HasInitializer</h1>
<emu-see-also-para op="HasInitializer"></emu-see-also-para>
<emu-grammar><emu-production name="BindingElement" collapsed="">
<emu-nt><a href="#prod-BindingElement">BindingElement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="983adfc8"><emu-nt id="_ref_11356"><a href="#prod-BindingPattern">BindingPattern</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="BindingElement" collapsed="">
<emu-nt><a href="#prod-BindingElement">BindingElement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0ddd53e5"><emu-nt id="_ref_11357"><a href="#prod-BindingPattern">BindingPattern</a></emu-nt><emu-nt id="_ref_11358"><a href="#prod-Initializer">Initializer</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="SingleNameBinding" collapsed="">
<emu-nt><a href="#prod-SingleNameBinding">SingleNameBinding</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="50e97238"><emu-nt id="_ref_11359"><a href="#prod-BindingIdentifier">BindingIdentifier</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="SingleNameBinding" collapsed="">
<emu-nt><a href="#prod-SingleNameBinding">SingleNameBinding</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="89becb83"><emu-nt id="_ref_11360"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-nt id="_ref_11361"><a href="#prod-Initializer">Initializer</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-destructuring-binding-patterns-static-semantics-issimpleparameterlist">
<h1><span class="secnum">13.3.3.4</span>Static Semantics: IsSimpleParameterList</h1>
<emu-see-also-para op="IsSimpleParameterList"></emu-see-also-para>
<emu-grammar><emu-production name="BindingElement" collapsed="">
<emu-nt><a href="#prod-BindingElement">BindingElement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="983adfc8"><emu-nt id="_ref_11362"><a href="#prod-BindingPattern">BindingPattern</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="BindingElement" collapsed="">
<emu-nt><a href="#prod-BindingElement">BindingElement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0ddd53e5"><emu-nt id="_ref_11363"><a href="#prod-BindingPattern">BindingPattern</a></emu-nt><emu-nt id="_ref_11364"><a href="#prod-Initializer">Initializer</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="SingleNameBinding" collapsed="">
<emu-nt><a href="#prod-SingleNameBinding">SingleNameBinding</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="50e97238"><emu-nt id="_ref_11365"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="SingleNameBinding" collapsed="">
<emu-nt><a href="#prod-SingleNameBinding">SingleNameBinding</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="89becb83"><emu-nt id="_ref_11366"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-nt id="_ref_11367"><a href="#prod-Initializer">Initializer</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-destructuring-binding-patterns-runtime-semantics-bindinginitialization">
<h1><span class="secnum">13.3.3.5</span>Runtime Semantics: BindingInitialization</h1>
<p>With parameters <var>value</var> and <var>environment</var>.</p>
<emu-see-also-para op="BindingInitialization"></emu-see-also-para>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>When <emu-val>undefined</emu-val> is passed for <var>environment</var> it indicates that a <emu-xref aoid="PutValue" id="_ref_3695"><a href="#sec-putvalue">PutValue</a></emu-xref>
operation should be used to assign the initialization value. This is
the case for formal parameter lists of non-strict functions. In that
case the formal parameter bindings are preinitialized in order to deal
with the possibility of multiple parameters with the same name.</p>
</div></emu-note>
<emu-grammar><emu-production name="BindingPattern" collapsed="">
<emu-nt><a href="#prod-BindingPattern">BindingPattern</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="987dce43"><emu-nt id="_ref_11368"><a href="#prod-ObjectBindingPattern">ObjectBindingPattern</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Perform ?&nbsp;<emu-xref aoid="RequireObjectCoercible" id="_ref_3696"><a href="#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<var>value</var>).</li><li>Return the result of performing BindingInitialization for <emu-nt id="_ref_11369"><a href="#prod-ObjectBindingPattern">ObjectBindingPattern</a></emu-nt> using <var>value</var> and <var>environment</var> as arguments.
</li></ol></emu-alg>
<emu-grammar><emu-production name="BindingPattern" collapsed="">
<emu-nt><a href="#prod-BindingPattern">BindingPattern</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c638d53b"><emu-nt id="_ref_11370"><a href="#prod-ArrayBindingPattern">ArrayBindingPattern</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>iteratorRecord</var> be ?&nbsp;<emu-xref aoid="GetIterator" id="_ref_3697"><a href="#sec-getiterator">GetIterator</a></emu-xref>(<var>value</var>).</li><li>Let <var>result</var> be IteratorBindingInitialization for <emu-nt id="_ref_11371"><a href="#prod-ArrayBindingPattern">ArrayBindingPattern</a></emu-nt> using <var>iteratorRecord</var> and <var>environment</var> as arguments.</li><li>If <var>iteratorRecord</var>.[[Done]] is <emu-val>false</emu-val>, return ?&nbsp;<emu-xref aoid="IteratorClose" id="_ref_3698"><a href="#sec-iteratorclose">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="ObjectBindingPattern" collapsed="">
<emu-nt><a href="#prod-ObjectBindingPattern">ObjectBindingPattern</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><emu-t>{</emu-t><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-xref aoid="NormalCompletion" id="_ref_3699"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="ObjectBindingPattern">
<emu-nt><a href="#prod-ObjectBindingPattern">ObjectBindingPattern</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1a4e378e"><emu-t>{</emu-t><emu-nt id="_ref_11372"><a href="#prod-BindingPropertyList">BindingPropertyList</a></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="0f5529a6"><emu-t>{</emu-t><emu-nt id="_ref_11373"><a href="#prod-BindingPropertyList">BindingPropertyList</a></emu-nt><emu-t>,</emu-t><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Perform ? PropertyBindingInitialization for <emu-nt id="_ref_11374"><a href="#prod-BindingPropertyList">BindingPropertyList</a></emu-nt> using <var>value</var> and <var>environment</var> as the arguments.</li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_3700"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="ObjectBindingPattern" collapsed="">
<emu-nt><a href="#prod-ObjectBindingPattern">ObjectBindingPattern</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1131455e"><emu-t>{</emu-t><emu-nt id="_ref_11375"><a href="#prod-BindingRestProperty">BindingRestProperty</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>excludedNames</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3701"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Return the result of performing RestBindingInitialization of <emu-nt id="_ref_11376"><a href="#prod-BindingRestProperty">BindingRestProperty</a></emu-nt> with <var>value</var>, <var>environment</var>, and <var>excludedNames</var> as the arguments.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ObjectBindingPattern" collapsed="">
<emu-nt><a href="#prod-ObjectBindingPattern">ObjectBindingPattern</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ba52f35d"><emu-t>{</emu-t><emu-nt id="_ref_11377"><a href="#prod-BindingPropertyList">BindingPropertyList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_11378"><a href="#prod-BindingRestProperty">BindingRestProperty</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>excludedNames</var> be the result of performing ? PropertyBindingInitialization of <emu-nt id="_ref_11379"><a href="#prod-BindingPropertyList">BindingPropertyList</a></emu-nt> using <var>value</var> and <var>environment</var> as arguments.</li><li>Return the result of performing RestBindingInitialization of <emu-nt id="_ref_11380"><a href="#prod-BindingRestProperty">BindingRestProperty</a></emu-nt> with <var>value</var>, <var>environment</var>, and <var>excludedNames</var> as the arguments.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-destructuring-binding-patterns-runtime-semantics-propertybindinginitialization">
<h1><span class="secnum">13.3.3.6</span>Runtime Semantics: PropertyBindingInitialization</h1>
<p>With parameters <var>value</var> and <var>environment</var>.</p>
<emu-note><span class="note">Note</span><div class="note-contents">These collect a list of all bound property names rather than just empty completion.</div></emu-note>
<emu-grammar><emu-production name="BindingPropertyList" collapsed="">
<emu-nt><a href="#prod-BindingPropertyList">BindingPropertyList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0730de3b"><emu-nt id="_ref_11381"><a href="#prod-BindingPropertyList">BindingPropertyList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_11382"><a href="#prod-BindingProperty">BindingProperty</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>boundNames</var> be the result of performing ? PropertyBindingInitialization for <emu-nt id="_ref_11383"><a href="#prod-BindingPropertyList">BindingPropertyList</a></emu-nt> using <var>value</var> and <var>environment</var> as arguments.</li><li>Let <var>nextNames</var> be the result of performing ? PropertyBindingInitialization for <emu-nt id="_ref_11384"><a href="#prod-BindingProperty">BindingProperty</a></emu-nt> using <var>value</var> and <var>environment</var> as arguments.</li><li>Append each item in <var>nextNames</var> to the end of <var>boundNames</var>.</li><li>Return <var>boundNames</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="BindingProperty" collapsed="">
<emu-nt><a href="#prod-BindingProperty">BindingProperty</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="94e17c00"><emu-nt id="_ref_11385"><a href="#prod-SingleNameBinding">SingleNameBinding</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>name</var> be the string that is the only element of BoundNames of <emu-nt id="_ref_11386"><a href="#prod-SingleNameBinding">SingleNameBinding</a></emu-nt>.</li><li>Perform ? KeyedBindingInitialization for <emu-nt id="_ref_11387"><a href="#prod-SingleNameBinding">SingleNameBinding</a></emu-nt> using <var>value</var>, <var>environment</var>, and <var>name</var> as the arguments.</li><li>Return a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3702"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing <var>name</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="BindingProperty" collapsed="">
<emu-nt><a href="#prod-BindingProperty">BindingProperty</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="987bd1c2"><emu-nt id="_ref_11388"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>:</emu-t><emu-nt id="_ref_11389"><a href="#prod-BindingElement">BindingElement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>P</var> be the result of evaluating <emu-nt id="_ref_11390"><a href="#prod-PropertyName">PropertyName</a></emu-nt>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3703"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>P</var>).</li><li>Perform ? KeyedBindingInitialization of <emu-nt id="_ref_11391"><a href="#prod-BindingElement">BindingElement</a></emu-nt> with <var>value</var>, <var>environment</var>, and <var>P</var> as the arguments.</li><li>Return a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3704"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing <var>P</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-destructuring-binding-patterns-runtime-semantics-restbindinginitialization">
<h1><span class="secnum">13.3.3.7</span>Runtime Semantics: RestBindingInitialization</h1>
<p>With parameters <var>value</var>, <var>environment</var>, and <var>excludedNames</var>.</p>
<emu-grammar><emu-production name="BindingRestProperty" collapsed="">
<emu-nt><a href="#prod-BindingRestProperty">BindingRestProperty</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="145844de"><emu-t>...</emu-t><emu-nt id="_ref_11392"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>lhs</var> be ?&nbsp;<emu-xref aoid="ResolveBinding" id="_ref_3705"><a href="#sec-resolvebinding">ResolveBinding</a></emu-xref>(StringValue of <emu-nt id="_ref_11393"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt>, <var>environment</var>).</li><li>Let <var>restObj</var> be <emu-xref aoid="ObjectCreate" id="_ref_3706"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_3707"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>).</li><li>Perform ?&nbsp;<emu-xref aoid="CopyDataProperties" id="_ref_3708"><a href="#sec-copydataproperties">CopyDataProperties</a></emu-xref>(<var>restObj</var>, <var>value</var>, <var>excludedNames</var>).</li><li>If <var>environment</var> is <emu-val>undefined</emu-val>, return <emu-xref aoid="PutValue" id="_ref_3709"><a href="#sec-putvalue">PutValue</a></emu-xref>(<var>lhs</var>, <var>restObj</var>).</li><li>Return <emu-xref aoid="InitializeReferencedBinding" id="_ref_3710"><a href="#sec-initializereferencedbinding">InitializeReferencedBinding</a></emu-xref>(<var>lhs</var>, <var>restObj</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-destructuring-binding-patterns-runtime-semantics-iteratorbindinginitialization">
<h1><span class="secnum">13.3.3.8</span>Runtime Semantics: IteratorBindingInitialization</h1>
<p>With parameters <var>iteratorRecord</var> and <var>environment</var>.</p>
<emu-see-also-para op="IteratorBindingInitialization"></emu-see-also-para>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>When <emu-val>undefined</emu-val> is passed for <var>environment</var> it indicates that a <emu-xref aoid="PutValue" id="_ref_3711"><a href="#sec-putvalue">PutValue</a></emu-xref>
operation should be used to assign the initialization value. This is
the case for formal parameter lists of non-strict functions. In that
case the formal parameter bindings are preinitialized in order to deal
with the possibility of multiple parameters with the same name.</p>
</div></emu-note>
<emu-grammar><emu-production name="ArrayBindingPattern" collapsed="">
<emu-nt><a href="#prod-ArrayBindingPattern">ArrayBindingPattern</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="99d85234"><emu-t>[</emu-t><emu-t>]</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-xref aoid="NormalCompletion" id="_ref_3712"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="ArrayBindingPattern" collapsed="">
<emu-nt><a href="#prod-ArrayBindingPattern">ArrayBindingPattern</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="31ffe6b2"><emu-t>[</emu-t><emu-nt id="_ref_11394"><a href="#prod-Elision">Elision</a></emu-nt><emu-t>]</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the result of performing IteratorDestructuringAssignmentEvaluation of <emu-nt id="_ref_11395"><a href="#prod-Elision">Elision</a></emu-nt> with <var>iteratorRecord</var> as the argument.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ArrayBindingPattern" collapsed="">
<emu-nt><a href="#prod-ArrayBindingPattern">ArrayBindingPattern</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0c457c16"><emu-t>[</emu-t><emu-nt optional="" id="_ref_11396"><a href="#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt id="_ref_11397"><a href="#prod-BindingRestElement">BindingRestElement</a></emu-nt><emu-t>]</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <emu-nt id="_ref_11398"><a href="#prod-Elision">Elision</a></emu-nt> is present, then<ol><li>Perform ? IteratorDestructuringAssignmentEvaluation of <emu-nt id="_ref_11399"><a href="#prod-Elision">Elision</a></emu-nt> with <var>iteratorRecord</var> as the argument.</li></ol></li><li>Return the result of performing IteratorBindingInitialization for <emu-nt id="_ref_11400"><a href="#prod-BindingRestElement">BindingRestElement</a></emu-nt> with <var>iteratorRecord</var> and <var>environment</var> as arguments.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ArrayBindingPattern" collapsed="">
<emu-nt><a href="#prod-ArrayBindingPattern">ArrayBindingPattern</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1d096493"><emu-t>[</emu-t><emu-nt id="_ref_11401"><a href="#prod-BindingElementList">BindingElementList</a></emu-nt><emu-t>]</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the result of performing IteratorBindingInitialization for <emu-nt id="_ref_11402"><a href="#prod-BindingElementList">BindingElementList</a></emu-nt> with <var>iteratorRecord</var> and <var>environment</var> as arguments.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ArrayBindingPattern" collapsed="">
<emu-nt><a href="#prod-ArrayBindingPattern">ArrayBindingPattern</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a1cc102e"><emu-t>[</emu-t><emu-nt id="_ref_11403"><a href="#prod-BindingElementList">BindingElementList</a></emu-nt><emu-t>,</emu-t><emu-t>]</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the result of performing IteratorBindingInitialization for <emu-nt id="_ref_11404"><a href="#prod-BindingElementList">BindingElementList</a></emu-nt> with <var>iteratorRecord</var> and <var>environment</var> as arguments.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ArrayBindingPattern" collapsed="">
<emu-nt><a href="#prod-ArrayBindingPattern">ArrayBindingPattern</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="95b63a14"><emu-t>[</emu-t><emu-nt id="_ref_11405"><a href="#prod-BindingElementList">BindingElementList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_11406"><a href="#prod-Elision">Elision</a></emu-nt><emu-t>]</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Perform ? IteratorBindingInitialization for <emu-nt id="_ref_11407"><a href="#prod-BindingElementList">BindingElementList</a></emu-nt> with <var>iteratorRecord</var> and <var>environment</var> as arguments.</li><li>Return the result of performing IteratorDestructuringAssignmentEvaluation of <emu-nt id="_ref_11408"><a href="#prod-Elision">Elision</a></emu-nt> with <var>iteratorRecord</var> as the argument.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ArrayBindingPattern" collapsed="">
<emu-nt><a href="#prod-ArrayBindingPattern">ArrayBindingPattern</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ee591d49"><emu-t>[</emu-t><emu-nt id="_ref_11409"><a href="#prod-BindingElementList">BindingElementList</a></emu-nt><emu-t>,</emu-t><emu-nt optional="" id="_ref_11410"><a href="#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt id="_ref_11411"><a href="#prod-BindingRestElement">BindingRestElement</a></emu-nt><emu-t>]</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Perform ? IteratorBindingInitialization for <emu-nt id="_ref_11412"><a href="#prod-BindingElementList">BindingElementList</a></emu-nt> with <var>iteratorRecord</var> and <var>environment</var> as arguments.</li><li>If <emu-nt id="_ref_11413"><a href="#prod-Elision">Elision</a></emu-nt> is present, then<ol><li>Perform ? IteratorDestructuringAssignmentEvaluation of <emu-nt id="_ref_11414"><a href="#prod-Elision">Elision</a></emu-nt> with <var>iteratorRecord</var> as the argument.</li></ol></li><li>Return the result of performing IteratorBindingInitialization for <emu-nt id="_ref_11415"><a href="#prod-BindingRestElement">BindingRestElement</a></emu-nt> with <var>iteratorRecord</var> and <var>environment</var> as arguments.
</li></ol></emu-alg>
<emu-grammar><emu-production name="BindingElementList" collapsed="">
<emu-nt><a href="#prod-BindingElementList">BindingElementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6ab1e547"><emu-nt id="_ref_11416"><a href="#prod-BindingElisionElement">BindingElisionElement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the result of performing IteratorBindingInitialization for <emu-nt id="_ref_11417"><a href="#prod-BindingElisionElement">BindingElisionElement</a></emu-nt> with <var>iteratorRecord</var> and <var>environment</var> as arguments.
</li></ol></emu-alg>
<emu-grammar><emu-production name="BindingElementList" collapsed="">
<emu-nt><a href="#prod-BindingElementList">BindingElementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1e2c0030"><emu-nt id="_ref_11418"><a href="#prod-BindingElementList">BindingElementList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_11419"><a href="#prod-BindingElisionElement">BindingElisionElement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Perform ? IteratorBindingInitialization for <emu-nt id="_ref_11420"><a href="#prod-BindingElementList">BindingElementList</a></emu-nt> with <var>iteratorRecord</var> and <var>environment</var> as arguments.</li><li>Return the result of performing IteratorBindingInitialization for <emu-nt id="_ref_11421"><a href="#prod-BindingElisionElement">BindingElisionElement</a></emu-nt> using <var>iteratorRecord</var> and <var>environment</var> as arguments.
</li></ol></emu-alg>
<emu-grammar><emu-production name="BindingElisionElement" collapsed="">
<emu-nt><a href="#prod-BindingElisionElement">BindingElisionElement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="03366b31"><emu-nt id="_ref_11422"><a href="#prod-BindingElement">BindingElement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the result of performing IteratorBindingInitialization of <emu-nt id="_ref_11423"><a href="#prod-BindingElement">BindingElement</a></emu-nt> with <var>iteratorRecord</var> and <var>environment</var> as the arguments.
</li></ol></emu-alg>
<emu-grammar><emu-production name="BindingElisionElement" collapsed="">
<emu-nt><a href="#prod-BindingElisionElement">BindingElisionElement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b07fbefe"><emu-nt id="_ref_11424"><a href="#prod-Elision">Elision</a></emu-nt><emu-nt id="_ref_11425"><a href="#prod-BindingElement">BindingElement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Perform ? IteratorDestructuringAssignmentEvaluation of <emu-nt id="_ref_11426"><a href="#prod-Elision">Elision</a></emu-nt> with <var>iteratorRecord</var> as the argument.</li><li>Return the result of performing IteratorBindingInitialization of <emu-nt id="_ref_11427"><a href="#prod-BindingElement">BindingElement</a></emu-nt> with <var>iteratorRecord</var> and <var>environment</var> as the arguments.
</li></ol></emu-alg>
<emu-grammar><emu-production name="BindingElement" collapsed="">
<emu-nt><a href="#prod-BindingElement">BindingElement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="94e17c00"><emu-nt id="_ref_11428"><a href="#prod-SingleNameBinding">SingleNameBinding</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the result of performing IteratorBindingInitialization for <emu-nt id="_ref_11429"><a href="#prod-SingleNameBinding">SingleNameBinding</a></emu-nt> with <var>iteratorRecord</var> and <var>environment</var> as the arguments.
</li></ol></emu-alg>
<emu-grammar><emu-production name="SingleNameBinding" collapsed="">
<emu-nt><a href="#prod-SingleNameBinding">SingleNameBinding</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0b9344a8"><emu-nt id="_ref_11430"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-nt optional="" id="_ref_11431"><a href="#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>bindingId</var> be StringValue of <emu-nt id="_ref_11432"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt>.</li><li>Let <var>lhs</var> be ?&nbsp;<emu-xref aoid="ResolveBinding" id="_ref_3713"><a href="#sec-resolvebinding">ResolveBinding</a></emu-xref>(<var>bindingId</var>, <var>environment</var>).</li><li>If <var>iteratorRecord</var>.[[Done]] is <emu-val>false</emu-val>, then<ol><li>Let <var>next</var> be <emu-xref aoid="IteratorStep" id="_ref_3714"><a href="#sec-iteratorstep">IteratorStep</a></emu-xref>(<var>iteratorRecord</var>).</li><li>If <var>next</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_3715"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, set <var>iteratorRecord</var>.[[Done]] to <emu-val>true</emu-val>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3716"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>next</var>).</li><li>If <var>next</var> is <emu-val>false</emu-val>, set <var>iteratorRecord</var>.[[Done]] to <emu-val>true</emu-val>.</li><li>Else,<ol><li>Let <var>v</var> be <emu-xref aoid="IteratorValue" id="_ref_3717"><a href="#sec-iteratorvalue">IteratorValue</a></emu-xref>(<var>next</var>).</li><li>If <var>v</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_3718"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, set <var>iteratorRecord</var>.[[Done]] to <emu-val>true</emu-val>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3719"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>v</var>).</li></ol></li></ol></li><li>If <var>iteratorRecord</var>.[[Done]] is <emu-val>true</emu-val>, let <var>v</var> be <emu-val>undefined</emu-val>.</li><li>If <emu-nt id="_ref_11433"><a href="#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_3720"><a href="#sec-isanonymousfunctiondefinition">IsAnonymousFunctionDefinition</a></emu-xref>(<emu-nt id="_ref_11434"><a href="#prod-Initializer">Initializer</a></emu-nt>) is <emu-val>true</emu-val>, then<ol><li>Set <var>v</var> to the result of performing NamedEvaluation for <emu-nt id="_ref_11435"><a href="#prod-Initializer">Initializer</a></emu-nt> with argument <var>bindingId</var>.</li></ol></li><li>Else,<ol><li>Let <var>defaultValue</var> be the result of evaluating <emu-nt id="_ref_11436"><a href="#prod-Initializer">Initializer</a></emu-nt>.</li><li>Set <var>v</var> to ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3721"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>defaultValue</var>).</li></ol></li></ol></li><li>If <var>environment</var> is <emu-val>undefined</emu-val>, return ?&nbsp;<emu-xref aoid="PutValue" id="_ref_3722"><a href="#sec-putvalue">PutValue</a></emu-xref>(<var>lhs</var>, <var>v</var>).</li><li>Return <emu-xref aoid="InitializeReferencedBinding" id="_ref_3723"><a href="#sec-initializereferencedbinding">InitializeReferencedBinding</a></emu-xref>(<var>lhs</var>, <var>v</var>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="BindingElement" collapsed="">
<emu-nt><a href="#prod-BindingElement">BindingElement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6875fa94"><emu-nt id="_ref_11437"><a href="#prod-BindingPattern">BindingPattern</a></emu-nt><emu-nt optional="" id="_ref_11438"><a href="#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 <var>iteratorRecord</var>.[[Done]] is <emu-val>false</emu-val>, then<ol><li>Let <var>next</var> be <emu-xref aoid="IteratorStep" id="_ref_3724"><a href="#sec-iteratorstep">IteratorStep</a></emu-xref>(<var>iteratorRecord</var>).</li><li>If <var>next</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_3725"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, set <var>iteratorRecord</var>.[[Done]] to <emu-val>true</emu-val>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3726"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>next</var>).</li><li>If <var>next</var> is <emu-val>false</emu-val>, set <var>iteratorRecord</var>.[[Done]] to <emu-val>true</emu-val>.</li><li>Else,<ol><li>Let <var>v</var> be <emu-xref aoid="IteratorValue" id="_ref_3727"><a href="#sec-iteratorvalue">IteratorValue</a></emu-xref>(<var>next</var>).</li><li>If <var>v</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_3728"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, set <var>iteratorRecord</var>.[[Done]] to <emu-val>true</emu-val>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3729"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>v</var>).</li></ol></li></ol></li><li>If <var>iteratorRecord</var>.[[Done]] is <emu-val>true</emu-val>, let <var>v</var> be <emu-val>undefined</emu-val>.</li><li>If <emu-nt id="_ref_11439"><a href="#prod-Initializer">Initializer</a></emu-nt> is present and <var>v</var> is <emu-val>undefined</emu-val>, then<ol><li>Let <var>defaultValue</var> be the result of evaluating <emu-nt id="_ref_11440"><a href="#prod-Initializer">Initializer</a></emu-nt>.</li><li>Set <var>v</var> to ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3730"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>defaultValue</var>).</li></ol></li><li>Return the result of performing BindingInitialization of <emu-nt id="_ref_11441"><a href="#prod-BindingPattern">BindingPattern</a></emu-nt> with <var>v</var> and <var>environment</var> as the arguments.
</li></ol></emu-alg>
<emu-grammar><emu-production name="BindingRestElement" collapsed="">
<emu-nt><a href="#prod-BindingRestElement">BindingRestElement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="145844de"><emu-t>...</emu-t><emu-nt id="_ref_11442"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>lhs</var> be ?&nbsp;<emu-xref aoid="ResolveBinding" id="_ref_3731"><a href="#sec-resolvebinding">ResolveBinding</a></emu-xref>(StringValue of <emu-nt id="_ref_11443"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt>, <var>environment</var>).</li><li>Let <var>A</var> be !&nbsp;<emu-xref aoid="ArrayCreate" id="_ref_3732"><a href="#sec-arraycreate">ArrayCreate</a></emu-xref>(0).</li><li>Let <var>n</var> be 0.</li><li>Repeat,<ol><li>If <var>iteratorRecord</var>.[[Done]] is <emu-val>false</emu-val>, then<ol><li>Let <var>next</var> be <emu-xref aoid="IteratorStep" id="_ref_3733"><a href="#sec-iteratorstep">IteratorStep</a></emu-xref>(<var>iteratorRecord</var>).</li><li>If <var>next</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_3734"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, set <var>iteratorRecord</var>.[[Done]] to <emu-val>true</emu-val>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3735"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>next</var>).</li><li>If <var>next</var> is <emu-val>false</emu-val>, set <var>iteratorRecord</var>.[[Done]] to <emu-val>true</emu-val>.</li></ol></li><li>If <var>iteratorRecord</var>.[[Done]] is <emu-val>true</emu-val>, then<ol><li>If <var>environment</var> is <emu-val>undefined</emu-val>, return ?&nbsp;<emu-xref aoid="PutValue" id="_ref_3736"><a href="#sec-putvalue">PutValue</a></emu-xref>(<var>lhs</var>, <var>A</var>).</li><li>Return <emu-xref aoid="InitializeReferencedBinding" id="_ref_3737"><a href="#sec-initializereferencedbinding">InitializeReferencedBinding</a></emu-xref>(<var>lhs</var>, <var>A</var>).</li></ol></li><li>Let <var>nextValue</var> be <emu-xref aoid="IteratorValue" id="_ref_3738"><a href="#sec-iteratorvalue">IteratorValue</a></emu-xref>(<var>next</var>).</li><li>If <var>nextValue</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_3739"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, set <var>iteratorRecord</var>.[[Done]] to <emu-val>true</emu-val>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3740"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>nextValue</var>).</li><li>Let <var>status</var> be <emu-xref aoid="CreateDataProperty" id="_ref_3741"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>A</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_3742"><a href="#sec-tostring">ToString</a></emu-xref>(<var>n</var>), <var>nextValue</var>).</li><li><emu-xref href="#assert" id="_ref_3743"><a href="#assert">Assert</a></emu-xref>: <var>status</var> is <emu-val>true</emu-val>.</li><li>Increment <var>n</var> by 1.
</li></ol></li></ol></emu-alg>
<emu-grammar><emu-production name="BindingRestElement" collapsed="">
<emu-nt><a href="#prod-BindingRestElement">BindingRestElement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1e627394"><emu-t>...</emu-t><emu-nt id="_ref_11444"><a href="#prod-BindingPattern">BindingPattern</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>A</var> be !&nbsp;<emu-xref aoid="ArrayCreate" id="_ref_3744"><a href="#sec-arraycreate">ArrayCreate</a></emu-xref>(0).</li><li>Let <var>n</var> be 0.</li><li>Repeat,<ol><li>If <var>iteratorRecord</var>.[[Done]] is <emu-val>false</emu-val>, then<ol><li>Let <var>next</var> be <emu-xref aoid="IteratorStep" id="_ref_3745"><a href="#sec-iteratorstep">IteratorStep</a></emu-xref>(<var>iteratorRecord</var>).</li><li>If <var>next</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_3746"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, set <var>iteratorRecord</var>.[[Done]] to <emu-val>true</emu-val>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3747"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>next</var>).</li><li>If <var>next</var> is <emu-val>false</emu-val>, set <var>iteratorRecord</var>.[[Done]] to <emu-val>true</emu-val>.</li></ol></li><li>If <var>iteratorRecord</var>.[[Done]] is <emu-val>true</emu-val>, then<ol><li>Return the result of performing BindingInitialization of <emu-nt id="_ref_11445"><a href="#prod-BindingPattern">BindingPattern</a></emu-nt> with <var>A</var> and <var>environment</var> as the arguments.</li></ol></li><li>Let <var>nextValue</var> be <emu-xref aoid="IteratorValue" id="_ref_3748"><a href="#sec-iteratorvalue">IteratorValue</a></emu-xref>(<var>next</var>).</li><li>If <var>nextValue</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_3749"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, set <var>iteratorRecord</var>.[[Done]] to <emu-val>true</emu-val>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3750"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>nextValue</var>).</li><li>Let <var>status</var> be <emu-xref aoid="CreateDataProperty" id="_ref_3751"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>A</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_3752"><a href="#sec-tostring">ToString</a></emu-xref>(<var>n</var>), <var>nextValue</var>).</li><li><emu-xref href="#assert" id="_ref_3753"><a href="#assert">Assert</a></emu-xref>: <var>status</var> is <emu-val>true</emu-val>.</li><li>Increment <var>n</var> by 1.
</li></ol></li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-runtime-semantics-keyedbindinginitialization">
<h1><span class="secnum">13.3.3.9</span>Runtime Semantics: KeyedBindingInitialization</h1>
<p>With parameters <var>value</var>, <var>environment</var>, and <var>propertyName</var>.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>When <emu-val>undefined</emu-val> is passed for <var>environment</var> it indicates that a <emu-xref aoid="PutValue" id="_ref_3754"><a href="#sec-putvalue">PutValue</a></emu-xref>
operation should be used to assign the initialization value. This is
the case for formal parameter lists of non-strict functions. In that
case the formal parameter bindings are preinitialized in order to deal
with the possibility of multiple parameters with the same name.</p>
</div></emu-note>
<emu-grammar><emu-production name="BindingElement" collapsed="">
<emu-nt><a href="#prod-BindingElement">BindingElement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6875fa94"><emu-nt id="_ref_11446"><a href="#prod-BindingPattern">BindingPattern</a></emu-nt><emu-nt optional="" id="_ref_11447"><a href="#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>v</var> be ?&nbsp;<emu-xref aoid="GetV" id="_ref_3755"><a href="#sec-getv">GetV</a></emu-xref>(<var>value</var>, <var>propertyName</var>).</li><li>If <emu-nt id="_ref_11448"><a href="#prod-Initializer">Initializer</a></emu-nt> is present and <var>v</var> is <emu-val>undefined</emu-val>, then<ol><li>Let <var>defaultValue</var> be the result of evaluating <emu-nt id="_ref_11449"><a href="#prod-Initializer">Initializer</a></emu-nt>.</li><li>Set <var>v</var> to ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3756"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>defaultValue</var>).</li></ol></li><li>Return the result of performing BindingInitialization for <emu-nt id="_ref_11450"><a href="#prod-BindingPattern">BindingPattern</a></emu-nt> passing <var>v</var> and <var>environment</var> as arguments.
</li></ol></emu-alg>
<emu-grammar><emu-production name="SingleNameBinding" collapsed="">
<emu-nt><a href="#prod-SingleNameBinding">SingleNameBinding</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0b9344a8"><emu-nt id="_ref_11451"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-nt optional="" id="_ref_11452"><a href="#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>bindingId</var> be StringValue of <emu-nt id="_ref_11453"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt>.</li><li>Let <var>lhs</var> be ?&nbsp;<emu-xref aoid="ResolveBinding" id="_ref_3757"><a href="#sec-resolvebinding">ResolveBinding</a></emu-xref>(<var>bindingId</var>, <var>environment</var>).</li><li>Let <var>v</var> be ?&nbsp;<emu-xref aoid="GetV" id="_ref_3758"><a href="#sec-getv">GetV</a></emu-xref>(<var>value</var>, <var>propertyName</var>).</li><li>If <emu-nt id="_ref_11454"><a href="#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_3759"><a href="#sec-isanonymousfunctiondefinition">IsAnonymousFunctionDefinition</a></emu-xref>(<emu-nt id="_ref_11455"><a href="#prod-Initializer">Initializer</a></emu-nt>) is <emu-val>true</emu-val>, then<ol><li>Set <var>v</var> to the result of performing NamedEvaluation for <emu-nt id="_ref_11456"><a href="#prod-Initializer">Initializer</a></emu-nt> with argument <var>bindingId</var>.</li></ol></li><li>Else,<ol><li>Let <var>defaultValue</var> be the result of evaluating <emu-nt id="_ref_11457"><a href="#prod-Initializer">Initializer</a></emu-nt>.</li><li>Set <var>v</var> to ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3760"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>defaultValue</var>).</li></ol></li></ol></li><li>If <var>environment</var> is <emu-val>undefined</emu-val>, return ?&nbsp;<emu-xref aoid="PutValue" id="_ref_3761"><a href="#sec-putvalue">PutValue</a></emu-xref>(<var>lhs</var>, <var>v</var>).</li><li>Return <emu-xref aoid="InitializeReferencedBinding" id="_ref_3762"><a href="#sec-initializereferencedbinding">InitializeReferencedBinding</a></emu-xref>(<var>lhs</var>, <var>v</var>).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-empty-statement">
<h1><span class="secnum">13.4</span>Empty Statement</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="EmptyStatement" id="prod-EmptyStatement">
<emu-nt><a href="#prod-EmptyStatement">EmptyStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4a0dac03"><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-clause id="sec-empty-statement-runtime-semantics-evaluation">
<h1><span class="secnum">13.4.1</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="EmptyStatement" collapsed="">
<emu-nt><a href="#prod-EmptyStatement">EmptyStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4a0dac03"><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-xref aoid="NormalCompletion" id="_ref_3763"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-expression-statement">
<h1><span class="secnum">13.5</span>Expression Statement</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="ExpressionStatement" params="Yield, Await" id="prod-ExpressionStatement">
<emu-nt params="Yield, Await"><a href="#prod-ExpressionStatement">ExpressionStatement</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c38255ff"><emu-gann>[lookahead ∉ { <emu-t>{</emu-t>, <emu-t>function</emu-t>, <emu-t>async</emu-t>
<emu-gann>[no <emu-nt id="_ref_11458"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann>
<emu-t>function</emu-t>, <emu-t>class</emu-t>, <emu-t>let</emu-t>
<emu-t>[</emu-t> }]</emu-gann><emu-nt params="+In, ?Yield, ?Await" id="_ref_11459"><a href="#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-note><span class="note">Note</span><div class="note-contents">
<p>An <emu-nt id="_ref_11460"><a href="#prod-ExpressionStatement">ExpressionStatement</a></emu-nt> cannot start with a U+007B (LEFT CURLY BRACKET) because that might make it ambiguous with a <emu-nt id="_ref_11461"><a href="#prod-Block">Block</a></emu-nt>. An <emu-nt id="_ref_11462"><a href="#prod-ExpressionStatement">ExpressionStatement</a></emu-nt> cannot start with the <code>function</code> or <code>class</code> keywords because that would make it ambiguous with a <emu-nt id="_ref_11463"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>, a <emu-nt id="_ref_11464"><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a></emu-nt>, or a <emu-nt id="_ref_11465"><a href="#prod-ClassDeclaration">ClassDeclaration</a></emu-nt>. An <emu-nt id="_ref_11466"><a href="#prod-ExpressionStatement">ExpressionStatement</a></emu-nt> cannot start with <code>async function</code> because that would make it ambiguous with an <emu-nt id="_ref_11467"><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt> or a <emu-nt id="_ref_11468"><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt>. An <emu-nt id="_ref_11469"><a href="#prod-ExpressionStatement">ExpressionStatement</a></emu-nt> cannot start with the two token sequence <code>let [</code> because that would make it ambiguous with a <code>let</code> <emu-nt id="_ref_11470"><a href="#prod-LexicalDeclaration">LexicalDeclaration</a></emu-nt> whose first <emu-nt id="_ref_11471"><a href="#prod-LexicalBinding">LexicalBinding</a></emu-nt> was an <emu-nt id="_ref_11472"><a href="#prod-ArrayBindingPattern">ArrayBindingPattern</a></emu-nt>.</p>
</div></emu-note>
<emu-clause id="sec-expression-statement-runtime-semantics-evaluation">
<h1><span class="secnum">13.5.1</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="ExpressionStatement" collapsed="">
<emu-nt><a href="#prod-ExpressionStatement">ExpressionStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e2db439e"><emu-nt id="_ref_11473"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>exprRef</var> be the result of evaluating <emu-nt id="_ref_11474"><a href="#prod-Expression">Expression</a></emu-nt>.</li><li>Return ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3764"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>exprRef</var>).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-if-statement">
<h1><span class="secnum">13.6</span>The <code>if</code> Statement</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="IfStatement" params="Yield, Await, Return" id="prod-IfStatement">
<emu-nt params="Yield, Await, Return"><a href="#prod-IfStatement">IfStatement</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="19528ab2"><emu-t>if</emu-t><emu-t>(</emu-t><emu-nt params="+In, ?Yield, ?Await" id="_ref_11475"><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return" id="_ref_11476"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt><emu-t>else</emu-t><emu-nt params="?Yield, ?Await, ?Return" id="_ref_11477"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="80677404"><emu-t>if</emu-t><emu-t>(</emu-t><emu-nt params="+In, ?Yield, ?Await" id="_ref_11478"><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return" id="_ref_11479"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<p>Each <code>else</code> for which the choice of associated <code>if</code> is ambiguous shall be associated with the nearest possible <code>if</code> that would otherwise have no corresponding <code>else</code>.</p>
<emu-clause id="sec-if-statement-static-semantics-early-errors">
<h1><span class="secnum">13.6.1</span>Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="IfStatement">
<emu-nt><a href="#prod-IfStatement">IfStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="16e86a13"><emu-t>if</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11480"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11481"><a href="#prod-Statement">Statement</a></emu-nt><emu-t>else</emu-t><emu-nt id="_ref_11482"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="f6819570"><emu-t>if</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11483"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11484"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if <emu-xref aoid="IsLabelledFunction" id="_ref_3765"><a href="#sec-islabelledfunction">IsLabelledFunction</a></emu-xref>(<emu-nt id="_ref_11485"><a href="#prod-Statement">Statement</a></emu-nt>) is <emu-val>true</emu-val>.
</li>
</ul>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>It is only necessary to apply this rule if the extension specified in <emu-xref href="#sec-labelled-function-declarations" id="_ref_338"><a href="#sec-labelled-function-declarations">B.3.2</a></emu-xref> is implemented.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-if-statement-static-semantics-containsduplicatelabels">
<h1><span class="secnum">13.6.2</span>Static Semantics: ContainsDuplicateLabels</h1>
<p>With parameter <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsDuplicateLabels"></emu-see-also-para>
<emu-grammar><emu-production name="IfStatement" collapsed="">
<emu-nt><a href="#prod-IfStatement">IfStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="16e86a13"><emu-t>if</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11486"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11487"><a href="#prod-Statement">Statement</a></emu-nt><emu-t>else</emu-t><emu-nt id="_ref_11488"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>hasDuplicate</var> be ContainsDuplicateLabels of the first <emu-nt id="_ref_11489"><a href="#prod-Statement">Statement</a></emu-nt> with argument <var>labelSet</var>.</li><li>If <var>hasDuplicate</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return ContainsDuplicateLabels of the second <emu-nt id="_ref_11490"><a href="#prod-Statement">Statement</a></emu-nt> with argument <var>labelSet</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="IfStatement" collapsed="">
<emu-nt><a href="#prod-IfStatement">IfStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f6819570"><emu-t>if</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11491"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11492"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ContainsDuplicateLabels of <emu-nt id="_ref_11493"><a href="#prod-Statement">Statement</a></emu-nt> with argument <var>labelSet</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-if-statement-static-semantics-containsundefinedbreaktarget">
<h1><span class="secnum">13.6.3</span>Static Semantics: ContainsUndefinedBreakTarget</h1>
<p>With parameter <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsUndefinedBreakTarget"></emu-see-also-para>
<emu-grammar><emu-production name="IfStatement" collapsed="">
<emu-nt><a href="#prod-IfStatement">IfStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="16e86a13"><emu-t>if</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11494"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11495"><a href="#prod-Statement">Statement</a></emu-nt><emu-t>else</emu-t><emu-nt id="_ref_11496"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>hasUndefinedLabels</var> be ContainsUndefinedBreakTarget of the first <emu-nt id="_ref_11497"><a href="#prod-Statement">Statement</a></emu-nt> with argument <var>labelSet</var>.</li><li>If <var>hasUndefinedLabels</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return ContainsUndefinedBreakTarget of the second <emu-nt id="_ref_11498"><a href="#prod-Statement">Statement</a></emu-nt> with argument <var>labelSet</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="IfStatement" collapsed="">
<emu-nt><a href="#prod-IfStatement">IfStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f6819570"><emu-t>if</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11499"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11500"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ContainsUndefinedBreakTarget of <emu-nt id="_ref_11501"><a href="#prod-Statement">Statement</a></emu-nt> with argument <var>labelSet</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-if-statement-static-semantics-containsundefinedcontinuetarget">
<h1><span class="secnum">13.6.4</span>Static Semantics: ContainsUndefinedContinueTarget</h1>
<p>With parameters <var>iterationSet</var> and <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsUndefinedContinueTarget"></emu-see-also-para>
<emu-grammar><emu-production name="IfStatement" collapsed="">
<emu-nt><a href="#prod-IfStatement">IfStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="16e86a13"><emu-t>if</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11502"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11503"><a href="#prod-Statement">Statement</a></emu-nt><emu-t>else</emu-t><emu-nt id="_ref_11504"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>hasUndefinedLabels</var> be ContainsUndefinedContinueTarget of the first <emu-nt id="_ref_11505"><a href="#prod-Statement">Statement</a></emu-nt> with arguments <var>iterationSet</var> and « ».</li><li>If <var>hasUndefinedLabels</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return ContainsUndefinedContinueTarget of the second <emu-nt id="_ref_11506"><a href="#prod-Statement">Statement</a></emu-nt> with arguments <var>iterationSet</var> and « ».
</li></ol></emu-alg>
<emu-grammar><emu-production name="IfStatement" collapsed="">
<emu-nt><a href="#prod-IfStatement">IfStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f6819570"><emu-t>if</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11507"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11508"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ContainsUndefinedContinueTarget of <emu-nt id="_ref_11509"><a href="#prod-Statement">Statement</a></emu-nt> with arguments <var>iterationSet</var> and « ».
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-if-statement-static-semantics-vardeclarednames">
<h1><span class="secnum">13.6.5</span>Static Semantics: VarDeclaredNames</h1>
<emu-see-also-para op="VarDeclaredNames"></emu-see-also-para>
<emu-grammar><emu-production name="IfStatement" collapsed="">
<emu-nt><a href="#prod-IfStatement">IfStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="16e86a13"><emu-t>if</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11510"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11511"><a href="#prod-Statement">Statement</a></emu-nt><emu-t>else</emu-t><emu-nt id="_ref_11512"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>names</var> be VarDeclaredNames of the first <emu-nt id="_ref_11513"><a href="#prod-Statement">Statement</a></emu-nt>.</li><li>Append to <var>names</var> the elements of the VarDeclaredNames of the second <emu-nt id="_ref_11514"><a href="#prod-Statement">Statement</a></emu-nt>.</li><li>Return <var>names</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="IfStatement" collapsed="">
<emu-nt><a href="#prod-IfStatement">IfStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f6819570"><emu-t>if</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11515"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11516"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the VarDeclaredNames of <emu-nt id="_ref_11517"><a href="#prod-Statement">Statement</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-if-statement-static-semantics-varscopeddeclarations">
<h1><span class="secnum">13.6.6</span>Static Semantics: VarScopedDeclarations</h1>
<emu-see-also-para op="VarScopedDeclarations"></emu-see-also-para>
<emu-grammar><emu-production name="IfStatement" collapsed="">
<emu-nt><a href="#prod-IfStatement">IfStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="16e86a13"><emu-t>if</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11518"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11519"><a href="#prod-Statement">Statement</a></emu-nt><emu-t>else</emu-t><emu-nt id="_ref_11520"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>declarations</var> be VarScopedDeclarations of the first <emu-nt id="_ref_11521"><a href="#prod-Statement">Statement</a></emu-nt>.</li><li>Append to <var>declarations</var> the elements of the VarScopedDeclarations of the second <emu-nt id="_ref_11522"><a href="#prod-Statement">Statement</a></emu-nt>.</li><li>Return <var>declarations</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="IfStatement" collapsed="">
<emu-nt><a href="#prod-IfStatement">IfStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f6819570"><emu-t>if</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11523"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11524"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the VarScopedDeclarations of <emu-nt id="_ref_11525"><a href="#prod-Statement">Statement</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-if-statement-runtime-semantics-evaluation">
<h1><span class="secnum">13.6.7</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="IfStatement" collapsed="">
<emu-nt><a href="#prod-IfStatement">IfStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="16e86a13"><emu-t>if</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11526"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11527"><a href="#prod-Statement">Statement</a></emu-nt><emu-t>else</emu-t><emu-nt id="_ref_11528"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>exprRef</var> be the result of evaluating <emu-nt id="_ref_11529"><a href="#prod-Expression">Expression</a></emu-nt>.</li><li>Let <var>exprValue</var> be <emu-xref aoid="ToBoolean" id="_ref_3766"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="GetValue" id="_ref_3767"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>exprRef</var>)).</li><li>If <var>exprValue</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>stmtCompletion</var> be the result of evaluating the first <emu-nt id="_ref_11530"><a href="#prod-Statement">Statement</a></emu-nt>.</li></ol></li><li>Else,<ol><li>Let <var>stmtCompletion</var> be the result of evaluating the second <emu-nt id="_ref_11531"><a href="#prod-Statement">Statement</a></emu-nt>.</li></ol></li><li>Return <emu-xref aoid="Completion" id="_ref_3768"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<emu-xref aoid="UpdateEmpty" id="_ref_3769"><a href="#sec-updateempty">UpdateEmpty</a></emu-xref>(<var>stmtCompletion</var>, <emu-val>undefined</emu-val>)).
</li></ol></emu-alg>
<emu-grammar><emu-production name="IfStatement" collapsed="">
<emu-nt><a href="#prod-IfStatement">IfStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f6819570"><emu-t>if</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11532"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11533"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>exprRef</var> be the result of evaluating <emu-nt id="_ref_11534"><a href="#prod-Expression">Expression</a></emu-nt>.</li><li>Let <var>exprValue</var> be <emu-xref aoid="ToBoolean" id="_ref_3770"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="GetValue" id="_ref_3771"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>exprRef</var>)).</li><li>If <var>exprValue</var> is <emu-val>false</emu-val>, then<ol><li>Return <emu-xref aoid="NormalCompletion" id="_ref_3772"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-val>undefined</emu-val>).</li></ol></li><li>Else,<ol><li>Let <var>stmtCompletion</var> be the result of evaluating <emu-nt id="_ref_11535"><a href="#prod-Statement">Statement</a></emu-nt>.</li><li>Return <emu-xref aoid="Completion" id="_ref_3773"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<emu-xref aoid="UpdateEmpty" id="_ref_3774"><a href="#sec-updateempty">UpdateEmpty</a></emu-xref>(<var>stmtCompletion</var>, <emu-val>undefined</emu-val>)).
</li></ol></li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-iteration-statements">
<h1><span class="secnum">13.7</span>Iteration Statements</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="IterationStatement" params="Yield, Await, Return" id="prod-IterationStatement">
<emu-nt params="Yield, Await, Return"><a href="#prod-IterationStatement">IterationStatement</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1222a724"><emu-t>do</emu-t><emu-nt params="?Yield, ?Await, ?Return" id="_ref_11536"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt><emu-t>while</emu-t><emu-t>(</emu-t><emu-nt params="+In, ?Yield, ?Await" id="_ref_11537"><a href="#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="016716d1"><emu-t>while</emu-t><emu-t>(</emu-t><emu-nt params="+In, ?Yield, ?Await" id="_ref_11538"><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return" id="_ref_11539"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="ea6bc481"><emu-t>for</emu-t><emu-t>(</emu-t><emu-gann>[lookahead ∉ { <emu-t>let</emu-t>
<emu-t>[</emu-t> }]</emu-gann><emu-nt params="~In, ?Yield, ?Await" optional="" id="_ref_11540"><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[~In, ?Yield, ?Await]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt params="+In, ?Yield, ?Await" optional="" id="_ref_11541"><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt params="+In, ?Yield, ?Await" optional="" id="_ref_11542"><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return" id="_ref_11543"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="16b1d90d"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt params="~In, ?Yield, ?Await" id="_ref_11544"><a href="#prod-VariableDeclarationList">VariableDeclarationList</a><emu-mods><emu-params>[~In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt params="+In, ?Yield, ?Await" optional="" id="_ref_11545"><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt params="+In, ?Yield, ?Await" optional="" id="_ref_11546"><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return" id="_ref_11547"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="21b13ea3"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt params="~In, ?Yield, ?Await" id="_ref_11548"><a href="#prod-LexicalDeclaration">LexicalDeclaration</a><emu-mods><emu-params>[~In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt params="+In, ?Yield, ?Await" optional="" id="_ref_11549"><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt params="+In, ?Yield, ?Await" optional="" id="_ref_11550"><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return" id="_ref_11551"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="27f872b5"><emu-t>for</emu-t><emu-t>(</emu-t><emu-gann>[lookahead ∉ { <emu-t>let</emu-t>
<emu-t>[</emu-t> }]</emu-gann><emu-nt params="?Yield, ?Await" id="_ref_11552"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>in</emu-t><emu-nt params="+In, ?Yield, ?Await" id="_ref_11553"><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return" id="_ref_11554"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="ecc974b5"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt params="?Yield, ?Await" id="_ref_11555"><a href="#prod-ForBinding">ForBinding</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>in</emu-t><emu-nt params="+In, ?Yield, ?Await" id="_ref_11556"><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return" id="_ref_11557"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="cdc1d34b"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt params="?Yield, ?Await" id="_ref_11558"><a href="#prod-ForDeclaration">ForDeclaration</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>in</emu-t><emu-nt params="+In, ?Yield, ?Await" id="_ref_11559"><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return" id="_ref_11560"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="52724ca6"><emu-t>for</emu-t><emu-t>(</emu-t><emu-gann>[lookahead ≠ <emu-t>let</emu-t>]</emu-gann><emu-nt params="?Yield, ?Await" id="_ref_11561"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>of</emu-t><emu-nt params="+In, ?Yield, ?Await" id="_ref_11562"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return" id="_ref_11563"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="e7c9ffda"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt params="?Yield, ?Await" id="_ref_11564"><a href="#prod-ForBinding">ForBinding</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>of</emu-t><emu-nt params="+In, ?Yield, ?Await" id="_ref_11565"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return" id="_ref_11566"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="3df54906"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt params="?Yield, ?Await" id="_ref_11567"><a href="#prod-ForDeclaration">ForDeclaration</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>of</emu-t><emu-nt params="+In, ?Yield, ?Await" id="_ref_11568"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return" id="_ref_11569"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="38f44e29" constraints="+Await"><emu-constraints>[+Await]</emu-constraints><emu-t>for</emu-t><emu-t>await</emu-t><emu-t>(</emu-t><emu-gann>[lookahead ≠ <emu-t>let</emu-t>]</emu-gann><emu-nt params="?Yield, ?Await" id="_ref_11570"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>of</emu-t><emu-nt params="+In, ?Yield, ?Await" id="_ref_11571"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return" id="_ref_11572"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="f414a6ad" constraints="+Await"><emu-constraints>[+Await]</emu-constraints><emu-t>for</emu-t><emu-t>await</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt params="?Yield, ?Await" id="_ref_11573"><a href="#prod-ForBinding">ForBinding</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>of</emu-t><emu-nt params="+In, ?Yield, ?Await" id="_ref_11574"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return" id="_ref_11575"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="7f1080d7" constraints="+Await"><emu-constraints>[+Await]</emu-constraints><emu-t>for</emu-t><emu-t>await</emu-t><emu-t>(</emu-t><emu-nt params="?Yield, ?Await" id="_ref_11576"><a href="#prod-ForDeclaration">ForDeclaration</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>of</emu-t><emu-nt params="+In, ?Yield, ?Await" id="_ref_11577"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return" id="_ref_11578"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ForDeclaration" params="Yield, Await" id="prod-ForDeclaration">
<emu-nt params="Yield, Await"><a href="#prod-ForDeclaration">ForDeclaration</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="93a8bcaa"><emu-nt id="_ref_11579"><a href="#prod-LetOrConst">LetOrConst</a></emu-nt><emu-nt params="?Yield, ?Await" id="_ref_11580"><a href="#prod-ForBinding">ForBinding</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ForBinding" params="Yield, Await" id="prod-ForBinding">
<emu-nt params="Yield, Await"><a href="#prod-ForBinding">ForBinding</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="22bf917e"><emu-nt params="?Yield, ?Await" id="_ref_11581"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="9eb89dc1"><emu-nt params="?Yield, ?Await" id="_ref_11582"><a href="#prod-BindingPattern">BindingPattern</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</span><div class="note-contents">
<p>This section is extended by Annex <emu-xref href="#sec-initializers-in-forin-statement-heads" id="_ref_339"><a href="#sec-initializers-in-forin-statement-heads">B.3.6</a></emu-xref>.</p>
</div></emu-note>
<emu-clause id="sec-iteration-statements-semantics">
<h1><span class="secnum">13.7.1</span>Semantics</h1>
<emu-clause id="sec-semantics-static-semantics-early-errors">
<h1><span class="secnum">13.7.1.1</span>Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="IterationStatement">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="24e70caa"><emu-t>do</emu-t><emu-nt id="_ref_11583"><a href="#prod-Statement">Statement</a></emu-nt><emu-t>while</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11584"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-t>;</emu-t></emu-rhs>
<emu-rhs a="f7627bf3"><emu-t>while</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11585"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11586"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="fc33bcf0"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt optional="" id="_ref_11587"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_11588"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_11589"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11590"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="48e766b4"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_11591"><a href="#prod-VariableDeclarationList">VariableDeclarationList</a></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_11592"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_11593"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11594"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="93c07e45"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11595"><a href="#prod-LexicalDeclaration">LexicalDeclaration</a></emu-nt><emu-nt optional="" id="_ref_11596"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_11597"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11598"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="bf521b70"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11599"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>in</emu-t><emu-nt id="_ref_11600"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11601"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="ecf18944"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_11602"><a href="#prod-ForBinding">ForBinding</a></emu-nt><emu-t>in</emu-t><emu-nt id="_ref_11603"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11604"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="2590ad81"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11605"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt><emu-t>in</emu-t><emu-nt id="_ref_11606"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11607"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="8ea6608b"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11608"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11609"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11610"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="ee6f9a77"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_11611"><a href="#prod-ForBinding">ForBinding</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11612"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11613"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="6f7c3304"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11614"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11615"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11616"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="9a146e5f"><emu-t>for</emu-t><emu-t>await</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11617"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11618"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11619"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="7324ff96"><emu-t>for</emu-t><emu-t>await</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_11620"><a href="#prod-ForBinding">ForBinding</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11621"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11622"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="b80b6675"><emu-t>for</emu-t><emu-t>await</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11623"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11624"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11625"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if <emu-xref aoid="IsLabelledFunction" id="_ref_3775"><a href="#sec-islabelledfunction">IsLabelledFunction</a></emu-xref>(<emu-nt id="_ref_11626"><a href="#prod-Statement">Statement</a></emu-nt>) is <emu-val>true</emu-val>.
</li>
</ul>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>It is only necessary to apply this rule if the extension specified in <emu-xref href="#sec-labelled-function-declarations" id="_ref_340"><a href="#sec-labelled-function-declarations">B.3.2</a></emu-xref> is implemented.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-loopcontinues" aoid="LoopContinues">
<h1><span class="secnum">13.7.1.2</span>Runtime Semantics: LoopContinues ( <var>completion</var>, <var>labelSet</var> )</h1>
<p>The abstract operation LoopContinues with arguments <var>completion</var> and <var>labelSet</var> is defined by the following steps:</p>
<emu-alg><ol><li>If <var>completion</var>.[[Type]] is <emu-const>normal</emu-const>, return <emu-val>true</emu-val>.</li><li>If <var>completion</var>.[[Type]] is not <emu-const>continue</emu-const>, return <emu-val>false</emu-val>.</li><li>If <var>completion</var>.[[Target]] is <emu-const>empty</emu-const>, return <emu-val>true</emu-val>.</li><li>If <var>completion</var>.[[Target]] is an element of <var>labelSet</var>, return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Within the <emu-nt id="_ref_11627"><a href="#prod-Statement">Statement</a></emu-nt> part of an <emu-nt id="_ref_11628"><a href="#prod-IterationStatement">IterationStatement</a></emu-nt> a <emu-nt id="_ref_11629"><a href="#prod-ContinueStatement">ContinueStatement</a></emu-nt> may be used to begin a new iteration.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-do-while-statement">
<h1><span class="secnum">13.7.2</span>The <code>do</code>-<code>while</code> Statement</h1>
<emu-clause id="sec-do-while-statement-static-semantics-containsduplicatelabels">
<h1><span class="secnum">13.7.2.1</span>Static Semantics: ContainsDuplicateLabels</h1>
<p>With parameter <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsDuplicateLabels"></emu-see-also-para>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="24e70caa"><emu-t>do</emu-t><emu-nt id="_ref_11630"><a href="#prod-Statement">Statement</a></emu-nt><emu-t>while</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11631"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ContainsDuplicateLabels of <emu-nt id="_ref_11632"><a href="#prod-Statement">Statement</a></emu-nt> with argument <var>labelSet</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-do-while-statement-static-semantics-containsundefinedbreaktarget">
<h1><span class="secnum">13.7.2.2</span>Static Semantics: ContainsUndefinedBreakTarget</h1>
<p>With parameter <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsUndefinedBreakTarget"></emu-see-also-para>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="24e70caa"><emu-t>do</emu-t><emu-nt id="_ref_11633"><a href="#prod-Statement">Statement</a></emu-nt><emu-t>while</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11634"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ContainsUndefinedBreakTarget of <emu-nt id="_ref_11635"><a href="#prod-Statement">Statement</a></emu-nt> with argument <var>labelSet</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-do-while-statement-static-semantics-containsundefinedcontinuetarget">
<h1><span class="secnum">13.7.2.3</span>Static Semantics: ContainsUndefinedContinueTarget</h1>
<p>With parameters <var>iterationSet</var> and <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsUndefinedContinueTarget"></emu-see-also-para>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="24e70caa"><emu-t>do</emu-t><emu-nt id="_ref_11636"><a href="#prod-Statement">Statement</a></emu-nt><emu-t>while</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11637"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ContainsUndefinedContinueTarget of <emu-nt id="_ref_11638"><a href="#prod-Statement">Statement</a></emu-nt> with arguments <var>iterationSet</var> and « ».
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-do-while-statement-static-semantics-vardeclarednames">
<h1><span class="secnum">13.7.2.4</span>Static Semantics: VarDeclaredNames</h1>
<emu-see-also-para op="VarDeclaredNames"></emu-see-also-para>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="24e70caa"><emu-t>do</emu-t><emu-nt id="_ref_11639"><a href="#prod-Statement">Statement</a></emu-nt><emu-t>while</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11640"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the VarDeclaredNames of <emu-nt id="_ref_11641"><a href="#prod-Statement">Statement</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-do-while-statement-static-semantics-varscopeddeclarations">
<h1><span class="secnum">13.7.2.5</span>Static Semantics: VarScopedDeclarations</h1>
<emu-see-also-para op="VarScopedDeclarations"></emu-see-also-para>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="24e70caa"><emu-t>do</emu-t><emu-nt id="_ref_11642"><a href="#prod-Statement">Statement</a></emu-nt><emu-t>while</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11643"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the VarScopedDeclarations of <emu-nt id="_ref_11644"><a href="#prod-Statement">Statement</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-do-while-statement-runtime-semantics-labelledevaluation">
<h1><span class="secnum">13.7.2.6</span>Runtime Semantics: LabelledEvaluation</h1>
<p>With parameter <var>labelSet</var>.</p>
<emu-see-also-para op="LabelledEvaluation"></emu-see-also-para>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="24e70caa"><emu-t>do</emu-t><emu-nt id="_ref_11645"><a href="#prod-Statement">Statement</a></emu-nt><emu-t>while</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11646"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>V</var> be <emu-val>undefined</emu-val>.</li><li>Repeat,<ol><li>Let <var>stmtResult</var> be the result of evaluating <emu-nt id="_ref_11647"><a href="#prod-Statement">Statement</a></emu-nt>.</li><li>If <emu-xref aoid="LoopContinues" id="_ref_3776"><a href="#sec-loopcontinues">LoopContinues</a></emu-xref>(<var>stmtResult</var>, <var>labelSet</var>) is <emu-val>false</emu-val>, return <emu-xref aoid="Completion" id="_ref_3777"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<emu-xref aoid="UpdateEmpty" id="_ref_3778"><a href="#sec-updateempty">UpdateEmpty</a></emu-xref>(<var>stmtResult</var>, <var>V</var>)).</li><li>If <var>stmtResult</var>.[[Value]] is not <emu-const>empty</emu-const>, set <var>V</var> to <var>stmtResult</var>.[[Value]].</li><li>Let <var>exprRef</var> be the result of evaluating <emu-nt id="_ref_11648"><a href="#prod-Expression">Expression</a></emu-nt>.</li><li>Let <var>exprValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3779"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>exprRef</var>).</li><li>If <emu-xref aoid="ToBoolean" id="_ref_3780"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(<var>exprValue</var>) is <emu-val>false</emu-val>, return <emu-xref aoid="NormalCompletion" id="_ref_3781"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<var>V</var>).
</li></ol></li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-while-statement">
<h1><span class="secnum">13.7.3</span>The <code>while</code> Statement</h1>
<emu-clause id="sec-while-statement-static-semantics-containsduplicatelabels">
<h1><span class="secnum">13.7.3.1</span>Static Semantics: ContainsDuplicateLabels</h1>
<p>With parameter <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsDuplicateLabels"></emu-see-also-para>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f7627bf3"><emu-t>while</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11649"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11650"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ContainsDuplicateLabels of <emu-nt id="_ref_11651"><a href="#prod-Statement">Statement</a></emu-nt> with argument <var>labelSet</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-while-statement-static-semantics-containsundefinedbreaktarget">
<h1><span class="secnum">13.7.3.2</span>Static Semantics: ContainsUndefinedBreakTarget</h1>
<p>With parameter <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsUndefinedBreakTarget"></emu-see-also-para>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f7627bf3"><emu-t>while</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11652"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11653"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ContainsUndefinedBreakTarget of <emu-nt id="_ref_11654"><a href="#prod-Statement">Statement</a></emu-nt> with argument <var>labelSet</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-while-statement-static-semantics-containsundefinedcontinuetarget">
<h1><span class="secnum">13.7.3.3</span>Static Semantics: ContainsUndefinedContinueTarget</h1>
<p>With parameters <var>iterationSet</var> and <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsUndefinedContinueTarget"></emu-see-also-para>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f7627bf3"><emu-t>while</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11655"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11656"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ContainsUndefinedContinueTarget of <emu-nt id="_ref_11657"><a href="#prod-Statement">Statement</a></emu-nt> with arguments <var>iterationSet</var> and « ».
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-while-statement-static-semantics-vardeclarednames">
<h1><span class="secnum">13.7.3.4</span>Static Semantics: VarDeclaredNames</h1>
<emu-see-also-para op="VarDeclaredNames"></emu-see-also-para>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f7627bf3"><emu-t>while</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11658"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11659"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the VarDeclaredNames of <emu-nt id="_ref_11660"><a href="#prod-Statement">Statement</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-while-statement-static-semantics-varscopeddeclarations">
<h1><span class="secnum">13.7.3.5</span>Static Semantics: VarScopedDeclarations</h1>
<emu-see-also-para op="VarScopedDeclarations"></emu-see-also-para>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f7627bf3"><emu-t>while</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11661"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11662"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the VarScopedDeclarations of <emu-nt id="_ref_11663"><a href="#prod-Statement">Statement</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-while-statement-runtime-semantics-labelledevaluation">
<h1><span class="secnum">13.7.3.6</span>Runtime Semantics: LabelledEvaluation</h1>
<p>With parameter <var>labelSet</var>.</p>
<emu-see-also-para op="LabelledEvaluation"></emu-see-also-para>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f7627bf3"><emu-t>while</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11664"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11665"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>V</var> be <emu-val>undefined</emu-val>.</li><li>Repeat,<ol><li>Let <var>exprRef</var> be the result of evaluating <emu-nt id="_ref_11666"><a href="#prod-Expression">Expression</a></emu-nt>.</li><li>Let <var>exprValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3782"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>exprRef</var>).</li><li>If <emu-xref aoid="ToBoolean" id="_ref_3783"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(<var>exprValue</var>) is <emu-val>false</emu-val>, return <emu-xref aoid="NormalCompletion" id="_ref_3784"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<var>V</var>).</li><li>Let <var>stmtResult</var> be the result of evaluating <emu-nt id="_ref_11667"><a href="#prod-Statement">Statement</a></emu-nt>.</li><li>If <emu-xref aoid="LoopContinues" id="_ref_3785"><a href="#sec-loopcontinues">LoopContinues</a></emu-xref>(<var>stmtResult</var>, <var>labelSet</var>) is <emu-val>false</emu-val>, return <emu-xref aoid="Completion" id="_ref_3786"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<emu-xref aoid="UpdateEmpty" id="_ref_3787"><a href="#sec-updateempty">UpdateEmpty</a></emu-xref>(<var>stmtResult</var>, <var>V</var>)).</li><li>If <var>stmtResult</var>.[[Value]] is not <emu-const>empty</emu-const>, set <var>V</var> to <var>stmtResult</var>.[[Value]].
</li></ol></li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-for-statement">
<h1><span class="secnum">13.7.4</span>The <code>for</code> Statement</h1>
<emu-clause id="sec-for-statement-static-semantics-early-errors">
<h1><span class="secnum">13.7.4.1</span>Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="93c07e45"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11668"><a href="#prod-LexicalDeclaration">LexicalDeclaration</a></emu-nt><emu-nt optional="" id="_ref_11669"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_11670"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11671"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if any element of the BoundNames of <emu-nt id="_ref_11672"><a href="#prod-LexicalDeclaration">LexicalDeclaration</a></emu-nt> also occurs in the VarDeclaredNames of <emu-nt id="_ref_11673"><a href="#prod-Statement">Statement</a></emu-nt>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-for-statement-static-semantics-containsduplicatelabels">
<h1><span class="secnum">13.7.4.2</span>Static Semantics: ContainsDuplicateLabels</h1>
<p>With parameter <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsDuplicateLabels"></emu-see-also-para>
<emu-grammar><emu-production name="IterationStatement">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="fc33bcf0"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt optional="" id="_ref_11674"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_11675"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_11676"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11677"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="48e766b4"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_11678"><a href="#prod-VariableDeclarationList">VariableDeclarationList</a></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_11679"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_11680"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11681"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="93c07e45"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11682"><a href="#prod-LexicalDeclaration">LexicalDeclaration</a></emu-nt><emu-nt optional="" id="_ref_11683"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_11684"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11685"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ContainsDuplicateLabels of <emu-nt id="_ref_11686"><a href="#prod-Statement">Statement</a></emu-nt> with argument <var>labelSet</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-for-statement-static-semantics-containsundefinedbreaktarget">
<h1><span class="secnum">13.7.4.3</span>Static Semantics: ContainsUndefinedBreakTarget</h1>
<p>With parameter <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsUndefinedBreakTarget"></emu-see-also-para>
<emu-grammar><emu-production name="IterationStatement">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="fc33bcf0"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt optional="" id="_ref_11687"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_11688"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_11689"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11690"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="48e766b4"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_11691"><a href="#prod-VariableDeclarationList">VariableDeclarationList</a></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_11692"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_11693"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11694"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="93c07e45"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11695"><a href="#prod-LexicalDeclaration">LexicalDeclaration</a></emu-nt><emu-nt optional="" id="_ref_11696"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_11697"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11698"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ContainsUndefinedBreakTarget of <emu-nt id="_ref_11699"><a href="#prod-Statement">Statement</a></emu-nt> with argument <var>labelSet</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-for-statement-static-semantics-containsundefinedcontinuetarget">
<h1><span class="secnum">13.7.4.4</span>Static Semantics: ContainsUndefinedContinueTarget</h1>
<p>With parameters <var>iterationSet</var> and <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsUndefinedContinueTarget"></emu-see-also-para>
<emu-grammar><emu-production name="IterationStatement">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="fc33bcf0"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt optional="" id="_ref_11700"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_11701"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_11702"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11703"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="48e766b4"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_11704"><a href="#prod-VariableDeclarationList">VariableDeclarationList</a></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_11705"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_11706"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11707"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="93c07e45"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11708"><a href="#prod-LexicalDeclaration">LexicalDeclaration</a></emu-nt><emu-nt optional="" id="_ref_11709"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_11710"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11711"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ContainsUndefinedContinueTarget of <emu-nt id="_ref_11712"><a href="#prod-Statement">Statement</a></emu-nt> with arguments <var>iterationSet</var> and « ».
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-for-statement-static-semantics-vardeclarednames">
<h1><span class="secnum">13.7.4.5</span>Static Semantics: VarDeclaredNames</h1>
<emu-see-also-para op="VarDeclaredNames"></emu-see-also-para>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="fc33bcf0"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt optional="" id="_ref_11713"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_11714"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_11715"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11716"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the VarDeclaredNames of <emu-nt id="_ref_11717"><a href="#prod-Statement">Statement</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="48e766b4"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_11718"><a href="#prod-VariableDeclarationList">VariableDeclarationList</a></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_11719"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_11720"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11721"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>names</var> be BoundNames of <emu-nt id="_ref_11722"><a href="#prod-VariableDeclarationList">VariableDeclarationList</a></emu-nt>.</li><li>Append to <var>names</var> the elements of the VarDeclaredNames of <emu-nt id="_ref_11723"><a href="#prod-Statement">Statement</a></emu-nt>.</li><li>Return <var>names</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="93c07e45"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11724"><a href="#prod-LexicalDeclaration">LexicalDeclaration</a></emu-nt><emu-nt optional="" id="_ref_11725"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_11726"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11727"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the VarDeclaredNames of <emu-nt id="_ref_11728"><a href="#prod-Statement">Statement</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-for-statement-static-semantics-varscopeddeclarations">
<h1><span class="secnum">13.7.4.6</span>Static Semantics: VarScopedDeclarations</h1>
<emu-see-also-para op="VarScopedDeclarations"></emu-see-also-para>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="fc33bcf0"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt optional="" id="_ref_11729"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_11730"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_11731"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11732"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the VarScopedDeclarations of <emu-nt id="_ref_11733"><a href="#prod-Statement">Statement</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="48e766b4"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_11734"><a href="#prod-VariableDeclarationList">VariableDeclarationList</a></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_11735"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_11736"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11737"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>declarations</var> be VarScopedDeclarations of <emu-nt id="_ref_11738"><a href="#prod-VariableDeclarationList">VariableDeclarationList</a></emu-nt>.</li><li>Append to <var>declarations</var> the elements of the VarScopedDeclarations of <emu-nt id="_ref_11739"><a href="#prod-Statement">Statement</a></emu-nt>.</li><li>Return <var>declarations</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="93c07e45"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11740"><a href="#prod-LexicalDeclaration">LexicalDeclaration</a></emu-nt><emu-nt optional="" id="_ref_11741"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_11742"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11743"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the VarScopedDeclarations of <emu-nt id="_ref_11744"><a href="#prod-Statement">Statement</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-for-statement-runtime-semantics-labelledevaluation">
<h1><span class="secnum">13.7.4.7</span>Runtime Semantics: LabelledEvaluation</h1>
<p>With parameter <var>labelSet</var>.</p>
<emu-see-also-para op="LabelledEvaluation"></emu-see-also-para>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="fc33bcf0"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt optional="" id="_ref_11745"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_11746"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_11747"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11748"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If the first <emu-nt id="_ref_11749"><a href="#prod-Expression">Expression</a></emu-nt> is present, then<ol><li>Let <var>exprRef</var> be the result of evaluating the first <emu-nt id="_ref_11750"><a href="#prod-Expression">Expression</a></emu-nt>.</li><li>Perform ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3788"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>exprRef</var>).</li></ol></li><li>Return ?&nbsp;<emu-xref aoid="ForBodyEvaluation" id="_ref_3789"><a href="#sec-forbodyevaluation">ForBodyEvaluation</a></emu-xref>(the second <emu-nt id="_ref_11751"><a href="#prod-Expression">Expression</a></emu-nt>, the third <emu-nt id="_ref_11752"><a href="#prod-Expression">Expression</a></emu-nt>, <emu-nt id="_ref_11753"><a href="#prod-Statement">Statement</a></emu-nt>, « », <var>labelSet</var>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="48e766b4"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_11754"><a href="#prod-VariableDeclarationList">VariableDeclarationList</a></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_11755"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_11756"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11757"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>varDcl</var> be the result of evaluating <emu-nt id="_ref_11758"><a href="#prod-VariableDeclarationList">VariableDeclarationList</a></emu-nt>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_3790"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>varDcl</var>).</li><li>Return ?&nbsp;<emu-xref aoid="ForBodyEvaluation" id="_ref_3791"><a href="#sec-forbodyevaluation">ForBodyEvaluation</a></emu-xref>(the first <emu-nt id="_ref_11759"><a href="#prod-Expression">Expression</a></emu-nt>, the second <emu-nt id="_ref_11760"><a href="#prod-Expression">Expression</a></emu-nt>, <emu-nt id="_ref_11761"><a href="#prod-Statement">Statement</a></emu-nt>, « », <var>labelSet</var>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="93c07e45"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11762"><a href="#prod-LexicalDeclaration">LexicalDeclaration</a></emu-nt><emu-nt optional="" id="_ref_11763"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_11764"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11765"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>oldEnv</var> be the <emu-xref href="#running-execution-context" id="_ref_3792"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment.</li><li>Let <var>loopEnv</var> be <emu-xref aoid="NewDeclarativeEnvironment" id="_ref_3793"><a href="#sec-newdeclarativeenvironment">NewDeclarativeEnvironment</a></emu-xref>(<var>oldEnv</var>).</li><li>Let <var>loopEnvRec</var> be <var>loopEnv</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_3794"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref>.</li><li>Let <var>isConst</var> be the result of performing IsConstantDeclaration of <emu-nt id="_ref_11766"><a href="#prod-LexicalDeclaration">LexicalDeclaration</a></emu-nt>.</li><li>Let <var>boundNames</var> be the BoundNames of <emu-nt id="_ref_11767"><a href="#prod-LexicalDeclaration">LexicalDeclaration</a></emu-nt>.</li><li>For each element <var>dn</var> of <var>boundNames</var>, do<ol><li>If <var>isConst</var> is <emu-val>true</emu-val>, then<ol><li>Perform ! <var>loopEnvRec</var>.CreateImmutableBinding(<var>dn</var>, <emu-val>true</emu-val>).</li></ol></li><li>Else,<ol><li>Perform ! <var>loopEnvRec</var>.CreateMutableBinding(<var>dn</var>, <emu-val>false</emu-val>).</li></ol></li></ol></li><li>Set the <emu-xref href="#running-execution-context" id="_ref_3795"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment to <var>loopEnv</var>.</li><li>Let <var>forDcl</var> be the result of evaluating <emu-nt id="_ref_11768"><a href="#prod-LexicalDeclaration">LexicalDeclaration</a></emu-nt>.</li><li>If <var>forDcl</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_3796"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, then<ol><li>Set the <emu-xref href="#running-execution-context" id="_ref_3797"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment to <var>oldEnv</var>.</li><li>Return <emu-xref aoid="Completion" id="_ref_3798"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>forDcl</var>).</li></ol></li><li>If <var>isConst</var> is <emu-val>false</emu-val>, let <var>perIterationLets</var> be <var>boundNames</var>; otherwise let <var>perIterationLets</var> be « ».</li><li>Let <var>bodyResult</var> be <emu-xref aoid="ForBodyEvaluation" id="_ref_3799"><a href="#sec-forbodyevaluation">ForBodyEvaluation</a></emu-xref>(the first <emu-nt id="_ref_11769"><a href="#prod-Expression">Expression</a></emu-nt>, the second <emu-nt id="_ref_11770"><a href="#prod-Expression">Expression</a></emu-nt>, <emu-nt id="_ref_11771"><a href="#prod-Statement">Statement</a></emu-nt>, <var>perIterationLets</var>, <var>labelSet</var>).</li><li>Set the <emu-xref href="#running-execution-context" id="_ref_3800"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment to <var>oldEnv</var>.</li><li>Return <emu-xref aoid="Completion" id="_ref_3801"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>bodyResult</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-forbodyevaluation" aoid="ForBodyEvaluation">
<h1><span class="secnum">13.7.4.8</span>Runtime Semantics: ForBodyEvaluation ( <var>test</var>, <var>increment</var>, <var>stmt</var>, <var>perIterationBindings</var>, <var>labelSet</var> )</h1>
<p>The abstract operation ForBodyEvaluation with arguments <var>test</var>, <var>increment</var>, <var>stmt</var>, <var>perIterationBindings</var>, and <var>labelSet</var> is performed as follows:</p>
<emu-alg><ol><li>Let <var>V</var> be <emu-val>undefined</emu-val>.</li><li>Perform ?&nbsp;<emu-xref aoid="CreatePerIterationEnvironment" id="_ref_3802"><a href="#sec-createperiterationenvironment">CreatePerIterationEnvironment</a></emu-xref>(<var>perIterationBindings</var>).</li><li>Repeat,<ol><li>If <var>test</var> is not <emu-const>[empty]</emu-const>, then<ol><li>Let <var>testRef</var> be the result of evaluating <var>test</var>.</li><li>Let <var>testValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3803"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>testRef</var>).</li><li>If <emu-xref aoid="ToBoolean" id="_ref_3804"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(<var>testValue</var>) is <emu-val>false</emu-val>, return <emu-xref aoid="NormalCompletion" id="_ref_3805"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<var>V</var>).</li></ol></li><li>Let <var>result</var> be the result of evaluating <var>stmt</var>.</li><li>If <emu-xref aoid="LoopContinues" id="_ref_3806"><a href="#sec-loopcontinues">LoopContinues</a></emu-xref>(<var>result</var>, <var>labelSet</var>) is <emu-val>false</emu-val>, return <emu-xref aoid="Completion" id="_ref_3807"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<emu-xref aoid="UpdateEmpty" id="_ref_3808"><a href="#sec-updateempty">UpdateEmpty</a></emu-xref>(<var>result</var>, <var>V</var>)).</li><li>If <var>result</var>.[[Value]] is not <emu-const>empty</emu-const>, set <var>V</var> to <var>result</var>.[[Value]].</li><li>Perform ?&nbsp;<emu-xref aoid="CreatePerIterationEnvironment" id="_ref_3809"><a href="#sec-createperiterationenvironment">CreatePerIterationEnvironment</a></emu-xref>(<var>perIterationBindings</var>).</li><li>If <var>increment</var> is not <emu-const>[empty]</emu-const>, then<ol><li>Let <var>incRef</var> be the result of evaluating <var>increment</var>.</li><li>Perform ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3810"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>incRef</var>).
</li></ol></li></ol></li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-createperiterationenvironment" aoid="CreatePerIterationEnvironment">
<h1><span class="secnum">13.7.4.9</span>Runtime Semantics: CreatePerIterationEnvironment ( <var>perIterationBindings</var> )</h1>
<p>The abstract operation CreatePerIterationEnvironment with argument <var>perIterationBindings</var> is performed as follows:</p>
<emu-alg><ol><li>If <var>perIterationBindings</var> has any elements, then<ol><li>Let <var>lastIterationEnv</var> be the <emu-xref href="#running-execution-context" id="_ref_3811"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment.</li><li>Let <var>lastIterationEnvRec</var> be <var>lastIterationEnv</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_3812"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref>.</li><li>Let <var>outer</var> be <var>lastIterationEnv</var>'s outer environment reference.</li><li><emu-xref href="#assert" id="_ref_3813"><a href="#assert">Assert</a></emu-xref>: <var>outer</var> is not <emu-val>null</emu-val>.</li><li>Let <var>thisIterationEnv</var> be <emu-xref aoid="NewDeclarativeEnvironment" id="_ref_3814"><a href="#sec-newdeclarativeenvironment">NewDeclarativeEnvironment</a></emu-xref>(<var>outer</var>).</li><li>Let <var>thisIterationEnvRec</var> be <var>thisIterationEnv</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_3815"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref>.</li><li>For each element <var>bn</var> of <var>perIterationBindings</var>, do<ol><li>Perform ! <var>thisIterationEnvRec</var>.CreateMutableBinding(<var>bn</var>, <emu-val>false</emu-val>).</li><li>Let <var>lastValue</var> be ? <var>lastIterationEnvRec</var>.GetBindingValue(<var>bn</var>, <emu-val>true</emu-val>).</li><li>Perform <var>thisIterationEnvRec</var>.InitializeBinding(<var>bn</var>, <var>lastValue</var>).</li></ol></li><li>Set the <emu-xref href="#running-execution-context" id="_ref_3816"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment to <var>thisIterationEnv</var>.</li></ol></li><li>Return <emu-val>undefined</emu-val>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-for-in-and-for-of-statements">
<h1><span class="secnum">13.7.5</span>The <code>for</code>-<code>in</code>, <code>for</code>-<code>of</code>, and <code>for</code>-<code>await</code>-<code>of</code> Statements</h1>
<emu-clause id="sec-for-in-and-for-of-statements-static-semantics-early-errors">
<h1><span class="secnum">13.7.5.1</span>Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="IterationStatement">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="bf521b70"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11772"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>in</emu-t><emu-nt id="_ref_11773"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11774"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="8ea6608b"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11775"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11776"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11777"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="9a146e5f"><emu-t>for</emu-t><emu-t>await</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11778"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11779"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11780"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if <emu-nt id="_ref_11781"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is either an <emu-nt id="_ref_11782"><a href="#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> or an <emu-nt id="_ref_11783"><a href="#prod-ArrayLiteral">ArrayLiteral</a></emu-nt> and if <emu-nt id="_ref_11784"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is not <emu-xref href="#sec-syntactic-grammar" id="_ref_3817"><a href="#sec-syntactic-grammar">covering</a></emu-xref> an <emu-nt id="_ref_11785"><a href="#prod-AssignmentPattern">AssignmentPattern</a></emu-nt>.
</li>
</ul>
<p>If <emu-nt id="_ref_11786"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is either an <emu-nt id="_ref_11787"><a href="#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> or an <emu-nt id="_ref_11788"><a href="#prod-ArrayLiteral">ArrayLiteral</a></emu-nt> and if <emu-nt id="_ref_11789"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is <emu-xref href="#sec-syntactic-grammar" id="_ref_3818"><a href="#sec-syntactic-grammar">covering</a></emu-xref> an <emu-nt id="_ref_11790"><a href="#prod-AssignmentPattern">AssignmentPattern</a></emu-nt> then the following rules are not applied. Instead, the Early Error rules for <emu-nt id="_ref_11791"><a href="#prod-AssignmentPattern">AssignmentPattern</a></emu-nt> are used.</p>
<ul>
<li>
It is a Syntax Error if AssignmentTargetType of <emu-nt id="_ref_11792"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is not <emu-const>simple</emu-const>.
</li>
<li>
It is a Syntax Error if the <emu-nt id="_ref_11793"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is <emu-grammar><emu-production name="CoverParenthesizedExpressionAndArrowParameterList" collapsed="" class=" inline">
<emu-nt><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4ba6ef9d"><emu-t>(</emu-t><emu-nt id="_ref_11794"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t></emu-rhs>
</emu-production></emu-grammar> and <emu-nt id="_ref_11795"><a href="#prod-Expression">Expression</a></emu-nt> derives a phrase that would produce a Syntax Error according to these rules if that phrase were substituted for <emu-nt id="_ref_11796"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>. This rule is recursively applied.
</li>
</ul>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The last rule means that the other rules are applied even if parentheses surround <emu-nt id="_ref_11797"><a href="#prod-Expression">Expression</a></emu-nt>.</p>
</div></emu-note>
<emu-grammar><emu-production name="IterationStatement">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="2590ad81"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11798"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt><emu-t>in</emu-t><emu-nt id="_ref_11799"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11800"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="6f7c3304"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11801"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11802"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11803"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="b80b6675"><emu-t>for</emu-t><emu-t>await</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11804"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11805"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11806"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if the BoundNames of <emu-nt id="_ref_11807"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt> contains <code>"let"</code>.
</li>
<li>
It is a Syntax Error if any element of the BoundNames of <emu-nt id="_ref_11808"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt> also occurs in the VarDeclaredNames of <emu-nt id="_ref_11809"><a href="#prod-Statement">Statement</a></emu-nt>.
</li>
<li>
It is a Syntax Error if the BoundNames of <emu-nt id="_ref_11810"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt> contains any duplicate entries.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-for-in-and-for-of-statements-static-semantics-boundnames">
<h1><span class="secnum">13.7.5.2</span>Static Semantics: BoundNames</h1>
<emu-see-also-para op="BoundNames"></emu-see-also-para>
<emu-grammar><emu-production name="ForDeclaration" collapsed="">
<emu-nt><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d32d6fbc"><emu-nt id="_ref_11811"><a href="#prod-LetOrConst">LetOrConst</a></emu-nt><emu-nt id="_ref_11812"><a href="#prod-ForBinding">ForBinding</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the BoundNames of <emu-nt id="_ref_11813"><a href="#prod-ForBinding">ForBinding</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-for-in-and-for-of-statements-static-semantics-containsduplicatelabels">
<h1><span class="secnum">13.7.5.3</span>Static Semantics: ContainsDuplicateLabels</h1>
<p>With parameter <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsDuplicateLabels"></emu-see-also-para>
<emu-grammar><emu-production name="IterationStatement">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="bf521b70"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11814"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>in</emu-t><emu-nt id="_ref_11815"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11816"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="ecf18944"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_11817"><a href="#prod-ForBinding">ForBinding</a></emu-nt><emu-t>in</emu-t><emu-nt id="_ref_11818"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11819"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="2590ad81"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11820"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt><emu-t>in</emu-t><emu-nt id="_ref_11821"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11822"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="8ea6608b"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11823"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11824"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11825"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="ee6f9a77"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_11826"><a href="#prod-ForBinding">ForBinding</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11827"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11828"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="6f7c3304"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11829"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11830"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11831"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="9a146e5f"><emu-t>for</emu-t><emu-t>await</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11832"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11833"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11834"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="7324ff96"><emu-t>for</emu-t><emu-t>await</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_11835"><a href="#prod-ForBinding">ForBinding</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11836"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11837"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="b80b6675"><emu-t>for</emu-t><emu-t>await</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11838"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11839"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11840"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ContainsDuplicateLabels of <emu-nt id="_ref_11841"><a href="#prod-Statement">Statement</a></emu-nt> with argument <var>labelSet</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>This section is extended by Annex <emu-xref href="#sec-initializers-in-forin-statement-heads" id="_ref_341"><a href="#sec-initializers-in-forin-statement-heads">B.3.6</a></emu-xref>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-for-in-and-for-of-statements-static-semantics-containsundefinedbreaktarget">
<h1><span class="secnum">13.7.5.4</span>Static Semantics: ContainsUndefinedBreakTarget</h1>
<p>With parameter <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsUndefinedBreakTarget"></emu-see-also-para>
<emu-grammar><emu-production name="IterationStatement">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="bf521b70"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11842"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>in</emu-t><emu-nt id="_ref_11843"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11844"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="ecf18944"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_11845"><a href="#prod-ForBinding">ForBinding</a></emu-nt><emu-t>in</emu-t><emu-nt id="_ref_11846"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11847"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="2590ad81"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11848"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt><emu-t>in</emu-t><emu-nt id="_ref_11849"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11850"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="8ea6608b"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11851"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11852"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11853"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="ee6f9a77"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_11854"><a href="#prod-ForBinding">ForBinding</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11855"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11856"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="6f7c3304"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11857"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11858"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11859"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="9a146e5f"><emu-t>for</emu-t><emu-t>await</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11860"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11861"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11862"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="7324ff96"><emu-t>for</emu-t><emu-t>await</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_11863"><a href="#prod-ForBinding">ForBinding</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11864"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11865"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="b80b6675"><emu-t>for</emu-t><emu-t>await</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11866"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11867"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11868"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ContainsUndefinedBreakTarget of <emu-nt id="_ref_11869"><a href="#prod-Statement">Statement</a></emu-nt> with argument <var>labelSet</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>This section is extended by Annex <emu-xref href="#sec-initializers-in-forin-statement-heads" id="_ref_342"><a href="#sec-initializers-in-forin-statement-heads">B.3.6</a></emu-xref>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-for-in-and-for-of-statements-static-semantics-containsundefinedcontinuetarget">
<h1><span class="secnum">13.7.5.5</span>Static Semantics: ContainsUndefinedContinueTarget</h1>
<p>With parameters <var>iterationSet</var> and <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsUndefinedContinueTarget"></emu-see-also-para>
<emu-grammar><emu-production name="IterationStatement">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="bf521b70"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11870"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>in</emu-t><emu-nt id="_ref_11871"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11872"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="ecf18944"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_11873"><a href="#prod-ForBinding">ForBinding</a></emu-nt><emu-t>in</emu-t><emu-nt id="_ref_11874"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11875"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="2590ad81"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11876"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt><emu-t>in</emu-t><emu-nt id="_ref_11877"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11878"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="8ea6608b"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11879"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11880"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11881"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="ee6f9a77"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_11882"><a href="#prod-ForBinding">ForBinding</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11883"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11884"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="6f7c3304"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11885"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11886"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11887"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="9a146e5f"><emu-t>for</emu-t><emu-t>await</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11888"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11889"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11890"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="7324ff96"><emu-t>for</emu-t><emu-t>await</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_11891"><a href="#prod-ForBinding">ForBinding</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11892"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11893"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="b80b6675"><emu-t>for</emu-t><emu-t>await</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11894"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11895"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11896"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ContainsUndefinedContinueTarget of <emu-nt id="_ref_11897"><a href="#prod-Statement">Statement</a></emu-nt> with arguments <var>iterationSet</var> and « ».
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>This section is extended by Annex <emu-xref href="#sec-initializers-in-forin-statement-heads" id="_ref_343"><a href="#sec-initializers-in-forin-statement-heads">B.3.6</a></emu-xref>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-for-in-and-for-of-statements-static-semantics-isdestructuring">
<h1><span class="secnum">13.7.5.6</span>Static Semantics: IsDestructuring</h1>
<emu-see-also-para op="IsDestructuring"></emu-see-also-para>
<emu-grammar><emu-production name="ForDeclaration" collapsed="">
<emu-nt><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d32d6fbc"><emu-nt id="_ref_11898"><a href="#prod-LetOrConst">LetOrConst</a></emu-nt><emu-nt id="_ref_11899"><a href="#prod-ForBinding">ForBinding</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return IsDestructuring of <emu-nt id="_ref_11900"><a href="#prod-ForBinding">ForBinding</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ForBinding" collapsed="">
<emu-nt><a href="#prod-ForBinding">ForBinding</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="50e97238"><emu-nt id="_ref_11901"><a href="#prod-BindingIdentifier">BindingIdentifier</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="ForBinding" collapsed="">
<emu-nt><a href="#prod-ForBinding">ForBinding</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="983adfc8"><emu-nt id="_ref_11902"><a href="#prod-BindingPattern">BindingPattern</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>This section is extended by Annex <emu-xref href="#sec-initializers-in-forin-statement-heads" id="_ref_344"><a href="#sec-initializers-in-forin-statement-heads">B.3.6</a></emu-xref>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-for-in-and-for-of-statements-static-semantics-vardeclarednames">
<h1><span class="secnum">13.7.5.7</span>Static Semantics: VarDeclaredNames</h1>
<emu-see-also-para op="VarDeclaredNames"></emu-see-also-para>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="bf521b70"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11903"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>in</emu-t><emu-nt id="_ref_11904"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11905"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the VarDeclaredNames of <emu-nt id="_ref_11906"><a href="#prod-Statement">Statement</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ecf18944"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_11907"><a href="#prod-ForBinding">ForBinding</a></emu-nt><emu-t>in</emu-t><emu-nt id="_ref_11908"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11909"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>names</var> be the BoundNames of <emu-nt id="_ref_11910"><a href="#prod-ForBinding">ForBinding</a></emu-nt>.</li><li>Append to <var>names</var> the elements of the VarDeclaredNames of <emu-nt id="_ref_11911"><a href="#prod-Statement">Statement</a></emu-nt>.</li><li>Return <var>names</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="2590ad81"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11912"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt><emu-t>in</emu-t><emu-nt id="_ref_11913"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11914"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the VarDeclaredNames of <emu-nt id="_ref_11915"><a href="#prod-Statement">Statement</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="IterationStatement">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8ea6608b"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11916"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11917"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11918"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="9a146e5f"><emu-t>for</emu-t><emu-t>await</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11919"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11920"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11921"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the VarDeclaredNames of <emu-nt id="_ref_11922"><a href="#prod-Statement">Statement</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="IterationStatement">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ee6f9a77"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_11923"><a href="#prod-ForBinding">ForBinding</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11924"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11925"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="7324ff96"><emu-t>for</emu-t><emu-t>await</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_11926"><a href="#prod-ForBinding">ForBinding</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11927"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11928"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>names</var> be the BoundNames of <emu-nt id="_ref_11929"><a href="#prod-ForBinding">ForBinding</a></emu-nt>.</li><li>Append to <var>names</var> the elements of the VarDeclaredNames of <emu-nt id="_ref_11930"><a href="#prod-Statement">Statement</a></emu-nt>.</li><li>Return <var>names</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="IterationStatement">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6f7c3304"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11931"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11932"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11933"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="b80b6675"><emu-t>for</emu-t><emu-t>await</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11934"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11935"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11936"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the VarDeclaredNames of <emu-nt id="_ref_11937"><a href="#prod-Statement">Statement</a></emu-nt>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>This section is extended by Annex <emu-xref href="#sec-initializers-in-forin-statement-heads" id="_ref_345"><a href="#sec-initializers-in-forin-statement-heads">B.3.6</a></emu-xref>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-for-in-and-for-of-statements-static-semantics-varscopeddeclarations">
<h1><span class="secnum">13.7.5.8</span>Static Semantics: VarScopedDeclarations</h1>
<emu-see-also-para op="VarScopedDeclarations"></emu-see-also-para>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="bf521b70"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11938"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>in</emu-t><emu-nt id="_ref_11939"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11940"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the VarScopedDeclarations of <emu-nt id="_ref_11941"><a href="#prod-Statement">Statement</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ecf18944"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_11942"><a href="#prod-ForBinding">ForBinding</a></emu-nt><emu-t>in</emu-t><emu-nt id="_ref_11943"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11944"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>declarations</var> be a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3819"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing <emu-nt id="_ref_11945"><a href="#prod-ForBinding">ForBinding</a></emu-nt>.</li><li>Append to <var>declarations</var> the elements of the VarScopedDeclarations of <emu-nt id="_ref_11946"><a href="#prod-Statement">Statement</a></emu-nt>.</li><li>Return <var>declarations</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="IterationStatement">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="2590ad81"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11947"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt><emu-t>in</emu-t><emu-nt id="_ref_11948"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11949"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="9a146e5f"><emu-t>for</emu-t><emu-t>await</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11950"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11951"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11952"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the VarScopedDeclarations of <emu-nt id="_ref_11953"><a href="#prod-Statement">Statement</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="IterationStatement">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8ea6608b"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11954"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11955"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11956"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="7324ff96"><emu-t>for</emu-t><emu-t>await</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_11957"><a href="#prod-ForBinding">ForBinding</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11958"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11959"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the VarScopedDeclarations of <emu-nt id="_ref_11960"><a href="#prod-Statement">Statement</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="IterationStatement">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ee6f9a77"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_11961"><a href="#prod-ForBinding">ForBinding</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11962"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11963"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="7324ff96"><emu-t>for</emu-t><emu-t>await</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_11964"><a href="#prod-ForBinding">ForBinding</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11965"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11966"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>declarations</var> be a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3820"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing <emu-nt id="_ref_11967"><a href="#prod-ForBinding">ForBinding</a></emu-nt>.</li><li>Append to <var>declarations</var> the elements of the VarScopedDeclarations of <emu-nt id="_ref_11968"><a href="#prod-Statement">Statement</a></emu-nt>.</li><li>Return <var>declarations</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="IterationStatement">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6f7c3304"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11969"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11970"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11971"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="b80b6675"><emu-t>for</emu-t><emu-t>await</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11972"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_11973"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11974"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the VarScopedDeclarations of <emu-nt id="_ref_11975"><a href="#prod-Statement">Statement</a></emu-nt>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>This section is extended by Annex <emu-xref href="#sec-initializers-in-forin-statement-heads" id="_ref_346"><a href="#sec-initializers-in-forin-statement-heads">B.3.6</a></emu-xref>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-for-in-and-for-of-statements-runtime-semantics-bindinginitialization">
<h1><span class="secnum">13.7.5.9</span>Runtime Semantics: BindingInitialization</h1>
<p>With parameters <var>value</var> and <var>environment</var>.</p>
<emu-see-also-para op="BindingInitialization"></emu-see-also-para>
<emu-note><span class="note">Note</span><div class="note-contents">
<p><emu-val>undefined</emu-val> is passed for <var>environment</var> to indicate that a <emu-xref aoid="PutValue" id="_ref_3821"><a href="#sec-putvalue">PutValue</a></emu-xref> operation should be used to assign the initialization value. This is the case for <code>var</code> statements and the formal parameter lists of some non-strict functions (see <emu-xref href="#sec-functiondeclarationinstantiation" id="_ref_347"><a href="#sec-functiondeclarationinstantiation">9.2.15</a></emu-xref>). In those cases a lexical binding is hoisted and preinitialized prior to evaluation of its initializer.</p>
</div></emu-note>
<emu-grammar><emu-production name="ForDeclaration" collapsed="">
<emu-nt><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d32d6fbc"><emu-nt id="_ref_11976"><a href="#prod-LetOrConst">LetOrConst</a></emu-nt><emu-nt id="_ref_11977"><a href="#prod-ForBinding">ForBinding</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the result of performing BindingInitialization for <emu-nt id="_ref_11978"><a href="#prod-ForBinding">ForBinding</a></emu-nt> passing <var>value</var> and <var>environment</var> as the arguments.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-runtime-semantics-bindinginstantiation">
<h1><span class="secnum">13.7.5.10</span>Runtime Semantics: BindingInstantiation</h1>
<p>With parameter <var>environment</var>.</p>
<emu-grammar><emu-production name="ForDeclaration" collapsed="">
<emu-nt><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d32d6fbc"><emu-nt id="_ref_11979"><a href="#prod-LetOrConst">LetOrConst</a></emu-nt><emu-nt id="_ref_11980"><a href="#prod-ForBinding">ForBinding</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>envRec</var> be <var>environment</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_3822"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref>.</li><li><emu-xref href="#assert" id="_ref_3823"><a href="#assert">Assert</a></emu-xref>: <var>envRec</var> is a declarative <emu-xref href="#sec-environment-records" id="_ref_3824"><a href="#sec-environment-records">Environment Record</a></emu-xref>.</li><li>For each element <var>name</var> of the BoundNames of <emu-nt id="_ref_11981"><a href="#prod-ForBinding">ForBinding</a></emu-nt>, do<ol><li>If IsConstantDeclaration of <emu-nt id="_ref_11982"><a href="#prod-LetOrConst">LetOrConst</a></emu-nt> is <emu-val>true</emu-val>, then<ol><li>Perform ! <var>envRec</var>.CreateImmutableBinding(<var>name</var>, <emu-val>true</emu-val>).</li></ol></li><li>Else,<ol><li>Perform ! <var>envRec</var>.CreateMutableBinding(<var>name</var>, <emu-val>false</emu-val>).
</li></ol></li></ol></li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation">
<h1><span class="secnum">13.7.5.11</span>Runtime Semantics: LabelledEvaluation</h1>
<p>With parameter <var>labelSet</var>.</p>
<emu-see-also-para op="LabelledEvaluation"></emu-see-also-para>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="bf521b70"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11983"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>in</emu-t><emu-nt id="_ref_11984"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11985"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>keyResult</var> be ? <emu-xref aoid="ForIn/OfHeadEvaluation" id="_ref_3825"><a href="#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind">ForIn/OfHeadEvaluation</a></emu-xref>(« », <emu-nt id="_ref_11986"><a href="#prod-Expression">Expression</a></emu-nt>, <emu-const>enumerate</emu-const>).</li><li>Return ? <emu-xref aoid="ForIn/OfBodyEvaluation" id="_ref_3826"><a href="#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset">ForIn/OfBodyEvaluation</a></emu-xref>(<emu-nt id="_ref_11987"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>, <emu-nt id="_ref_11988"><a href="#prod-Statement">Statement</a></emu-nt>, <var>keyResult</var>, <emu-const>enumerate</emu-const>, <emu-const>assignment</emu-const>, <var>labelSet</var>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ecf18944"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_11989"><a href="#prod-ForBinding">ForBinding</a></emu-nt><emu-t>in</emu-t><emu-nt id="_ref_11990"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11991"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>keyResult</var> be ? <emu-xref aoid="ForIn/OfHeadEvaluation" id="_ref_3827"><a href="#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind">ForIn/OfHeadEvaluation</a></emu-xref>(« », <emu-nt id="_ref_11992"><a href="#prod-Expression">Expression</a></emu-nt>, <emu-const>enumerate</emu-const>).</li><li>Return ? <emu-xref aoid="ForIn/OfBodyEvaluation" id="_ref_3828"><a href="#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset">ForIn/OfBodyEvaluation</a></emu-xref>(<emu-nt id="_ref_11993"><a href="#prod-ForBinding">ForBinding</a></emu-nt>, <emu-nt id="_ref_11994"><a href="#prod-Statement">Statement</a></emu-nt>, <var>keyResult</var>, <emu-const>enumerate</emu-const>, <emu-const>varBinding</emu-const>, <var>labelSet</var>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="2590ad81"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_11995"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt><emu-t>in</emu-t><emu-nt id="_ref_11996"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_11997"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>keyResult</var> be ? <emu-xref aoid="ForIn/OfHeadEvaluation" id="_ref_3829"><a href="#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind">ForIn/OfHeadEvaluation</a></emu-xref>(BoundNames of <emu-nt id="_ref_11998"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt>, <emu-nt id="_ref_11999"><a href="#prod-Expression">Expression</a></emu-nt>, <emu-const>enumerate</emu-const>).</li><li>Return ? <emu-xref aoid="ForIn/OfBodyEvaluation" id="_ref_3830"><a href="#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset">ForIn/OfBodyEvaluation</a></emu-xref>(<emu-nt id="_ref_12000"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt>, <emu-nt id="_ref_12001"><a href="#prod-Statement">Statement</a></emu-nt>, <var>keyResult</var>, <emu-const>enumerate</emu-const>, <emu-const>lexicalBinding</emu-const>, <var>labelSet</var>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8ea6608b"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12002"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_12003"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_12004"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>keyResult</var> be ? <emu-xref aoid="ForIn/OfHeadEvaluation" id="_ref_3831"><a href="#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind">ForIn/OfHeadEvaluation</a></emu-xref>(« », <emu-nt id="_ref_12005"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>, <emu-const>iterate</emu-const>).</li><li>Return ? <emu-xref aoid="ForIn/OfBodyEvaluation" id="_ref_3832"><a href="#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset">ForIn/OfBodyEvaluation</a></emu-xref>(<emu-nt id="_ref_12006"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>, <emu-nt id="_ref_12007"><a href="#prod-Statement">Statement</a></emu-nt>, <var>keyResult</var>, <emu-const>iterate</emu-const>, <emu-const>assignment</emu-const>, <var>labelSet</var>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ee6f9a77"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_12008"><a href="#prod-ForBinding">ForBinding</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_12009"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_12010"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>keyResult</var> be ? <emu-xref aoid="ForIn/OfHeadEvaluation" id="_ref_3833"><a href="#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind">ForIn/OfHeadEvaluation</a></emu-xref>(« », <emu-nt id="_ref_12011"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>, <emu-const>iterate</emu-const>).</li><li>Return ? <emu-xref aoid="ForIn/OfBodyEvaluation" id="_ref_3834"><a href="#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset">ForIn/OfBodyEvaluation</a></emu-xref>(<emu-nt id="_ref_12012"><a href="#prod-ForBinding">ForBinding</a></emu-nt>, <emu-nt id="_ref_12013"><a href="#prod-Statement">Statement</a></emu-nt>, <var>keyResult</var>, <emu-const>iterate</emu-const>, <emu-const>varBinding</emu-const>, <var>labelSet</var>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6f7c3304"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12014"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_12015"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_12016"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>keyResult</var> be ? <emu-xref aoid="ForIn/OfHeadEvaluation" id="_ref_3835"><a href="#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind">ForIn/OfHeadEvaluation</a></emu-xref>(BoundNames of <emu-nt id="_ref_12017"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt>, <emu-nt id="_ref_12018"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>, <emu-const>iterate</emu-const>).</li><li>Return ? <emu-xref aoid="ForIn/OfBodyEvaluation" id="_ref_3836"><a href="#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset">ForIn/OfBodyEvaluation</a></emu-xref>(<emu-nt id="_ref_12019"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt>, <emu-nt id="_ref_12020"><a href="#prod-Statement">Statement</a></emu-nt>, <var>keyResult</var>, <emu-const>iterate</emu-const>, <emu-const>lexicalBinding</emu-const>, <var>labelSet</var>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="9a146e5f"><emu-t>for</emu-t><emu-t>await</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12021"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_12022"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_12023"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>keyResult</var> be ? <emu-xref aoid="ForIn/OfHeadEvaluation" id="_ref_3837"><a href="#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind">ForIn/OfHeadEvaluation</a></emu-xref>(« », <emu-nt id="_ref_12024"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>, <emu-const>async-iterate</emu-const>).</li><li>Return ? <emu-xref aoid="ForIn/OfBodyEvaluation" id="_ref_3838"><a href="#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset">ForIn/OfBodyEvaluation</a></emu-xref>(<emu-nt id="_ref_12025"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>, <emu-nt id="_ref_12026"><a href="#prod-Statement">Statement</a></emu-nt>, <var>keyResult</var>, <emu-const>iterate</emu-const>, <emu-const>assignment</emu-const>, <var>labelSet</var>, <emu-const>async</emu-const>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="7324ff96"><emu-t>for</emu-t><emu-t>await</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_12027"><a href="#prod-ForBinding">ForBinding</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_12028"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_12029"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>keyResult</var> be ? <emu-xref aoid="ForIn/OfHeadEvaluation" id="_ref_3839"><a href="#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind">ForIn/OfHeadEvaluation</a></emu-xref>(« », <emu-nt id="_ref_12030"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>, <emu-const>async-iterate</emu-const>).</li><li>Return ? <emu-xref aoid="ForIn/OfBodyEvaluation" id="_ref_3840"><a href="#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset">ForIn/OfBodyEvaluation</a></emu-xref>(<emu-nt id="_ref_12031"><a href="#prod-ForBinding">ForBinding</a></emu-nt>, <emu-nt id="_ref_12032"><a href="#prod-Statement">Statement</a></emu-nt>, <var>keyResult</var>, <emu-const>iterate</emu-const>, <emu-const>varBinding</emu-const>, <var>labelSet</var>, <emu-const>async</emu-const>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b80b6675"><emu-t>for</emu-t><emu-t>await</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12033"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_12034"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_12035"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>keyResult</var> be ? <emu-xref aoid="ForIn/OfHeadEvaluation" id="_ref_3841"><a href="#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind">ForIn/OfHeadEvaluation</a></emu-xref>(BoundNames of <emu-nt id="_ref_12036"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt>, <emu-nt id="_ref_12037"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>, <emu-const>async-iterate</emu-const>).</li><li>Return ? <emu-xref aoid="ForIn/OfBodyEvaluation" id="_ref_3842"><a href="#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset">ForIn/OfBodyEvaluation</a></emu-xref>(<emu-nt id="_ref_12038"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt>, <emu-nt id="_ref_12039"><a href="#prod-Statement">Statement</a></emu-nt>, <var>keyResult</var>, <emu-const>iterate</emu-const>, <emu-const>lexicalBinding</emu-const>, <var>labelSet</var>, <emu-const>async</emu-const>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>This section is extended by Annex <emu-xref href="#sec-initializers-in-forin-statement-heads" id="_ref_348"><a href="#sec-initializers-in-forin-statement-heads">B.3.6</a></emu-xref>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind" aoid="ForIn/OfHeadEvaluation">
<h1><span class="secnum">13.7.5.12</span>Runtime Semantics: ForIn/OfHeadEvaluation ( <var>TDZnames</var>, <var>expr</var>, <var>iterationKind</var> )</h1>
<p>The abstract operation ForIn/OfHeadEvaluation is called with arguments <var>TDZnames</var>, <var>expr</var>, and <var>iterationKind</var>. The value of <var>iterationKind</var> is either <emu-const>enumerate</emu-const>, <emu-const>iterate</emu-const>, or <emu-const>async-iterate</emu-const>.</p>
<emu-alg><ol><li>Let <var>oldEnv</var> be the <emu-xref href="#running-execution-context" id="_ref_3843"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment.</li><li>If <var>TDZnames</var> is not an empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3844"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>, then<ol><li><emu-xref href="#assert" id="_ref_3845"><a href="#assert">Assert</a></emu-xref>: <var>TDZnames</var> has no duplicate entries.</li><li>Let <var>TDZ</var> be <emu-xref aoid="NewDeclarativeEnvironment" id="_ref_3846"><a href="#sec-newdeclarativeenvironment">NewDeclarativeEnvironment</a></emu-xref>(<var>oldEnv</var>).</li><li>Let <var>TDZEnvRec</var> be <var>TDZ</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_3847"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref>.</li><li>For each string <var>name</var> in <var>TDZnames</var>, do<ol><li>Perform ! <var>TDZEnvRec</var>.CreateMutableBinding(<var>name</var>, <emu-val>false</emu-val>).</li></ol></li><li>Set the <emu-xref href="#running-execution-context" id="_ref_3848"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment to <var>TDZ</var>.</li></ol></li><li>Let <var>exprRef</var> be the result of evaluating <var>expr</var>.</li><li>Set the <emu-xref href="#running-execution-context" id="_ref_3849"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment to <var>oldEnv</var>.</li><li>Let <var>exprValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3850"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>exprRef</var>).</li><li>If <var>iterationKind</var> is <emu-const>enumerate</emu-const>, then<ol><li>If <var>exprValue</var> is <emu-val>undefined</emu-val> or <emu-val>null</emu-val>, then<ol><li>Return <emu-xref aoid="Completion" id="_ref_3851"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref> { [[Type]]: <emu-const>break</emu-const>, [[Value]]: <emu-const>empty</emu-const>, [[Target]]: <emu-const>empty</emu-const> }.</li></ol></li><li>Let <var>obj</var> be !&nbsp;<emu-xref aoid="ToObject" id="_ref_3852"><a href="#sec-toobject">ToObject</a></emu-xref>(<var>exprValue</var>).</li><li>Return ?&nbsp;<emu-xref aoid="EnumerateObjectProperties" id="_ref_3853"><a href="#sec-enumerate-object-properties">EnumerateObjectProperties</a></emu-xref>(<var>obj</var>).</li></ol></li><li>Else,<ol><li><emu-xref href="#assert" id="_ref_3854"><a href="#assert">Assert</a></emu-xref>: <var>iterationKind</var> is <emu-const>iterate</emu-const>.</li><li>If <var>iterationKind</var> is <emu-const>async-iterate</emu-const>, let <var>iteratorHint</var> be <emu-const>async</emu-const>.</li><li>Else, let <var>iteratorHint</var> be <emu-const>sync</emu-const>.</li><li>Return ?&nbsp;<emu-xref aoid="GetIterator" id="_ref_3855"><a href="#sec-getiterator">GetIterator</a></emu-xref>(<var>exprValue</var>, <var>iteratorHint</var>).
</li></ol></li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset" aoid="ForIn/OfBodyEvaluation">
<h1><span class="secnum">13.7.5.13</span>Runtime Semantics: ForIn/OfBodyEvaluation ( <var>lhs</var>, <var>stmt</var>, <var>iteratorRecord</var>, <var>iterationKind</var>, <var>lhsKind</var>, <var>labelSet</var> [ , <var>iteratorKind</var> ] )</h1>
<p>The abstract operation ForIn/OfBodyEvaluation is called with arguments <var>lhs</var>, <var>stmt</var>, <var>iteratorRecord</var>, <var>iterationKind</var>, <var>lhsKind</var>, <var>labelSet</var>, and optional argument <var>iteratorKind</var>. The value of <var>lhsKind</var> is either <emu-const>assignment</emu-const>, <emu-const>varBinding</emu-const> or <emu-const>lexicalBinding</emu-const>. The value of <var>iteratorKind</var> is either <emu-const>sync</emu-const> or <emu-const>async</emu-const>.</p>
<emu-alg><ol><li>If <var>iteratorKind</var> is not present, set <var>iteratorKind</var> to <emu-const>sync</emu-const>.</li><li>Let <var>oldEnv</var> be the <emu-xref href="#running-execution-context" id="_ref_3856"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment.</li><li>Let <var>V</var> be <emu-val>undefined</emu-val>.</li><li>Let <var>destructuring</var> be IsDestructuring of <var>lhs</var>.</li><li>If <var>destructuring</var> is <emu-val>true</emu-val> and if <var>lhsKind</var> is <emu-const>assignment</emu-const>, then<ol><li><emu-xref href="#assert" id="_ref_3857"><a href="#assert">Assert</a></emu-xref>: <var>lhs</var> is a <emu-nt id="_ref_12040"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>.</li><li>Let <var>assignmentPattern</var> be the <emu-nt id="_ref_12041"><a href="#prod-AssignmentPattern">AssignmentPattern</a></emu-nt> that is <emu-xref href="#sec-syntactic-grammar" id="_ref_3858"><a href="#sec-syntactic-grammar">covered</a></emu-xref> by <var>lhs</var>.</li></ol></li><li>Repeat,<ol><li>Let <var>nextResult</var> be ?&nbsp;<emu-xref aoid="Call" id="_ref_3859"><a href="#sec-call">Call</a></emu-xref>(<var>iteratorRecord</var>.[[NextMethod]], <var>iteratorRecord</var>.[[Iterator]], « »).</li><li>If <var>iteratorKind</var> is <emu-const>async</emu-const>, then set <var>nextResult</var> to ?&nbsp;<emu-xref aoid="Await" id="_ref_3860"><a href="#await">Await</a></emu-xref>(<var>nextResult</var>).</li><li>If <emu-xref aoid="Type" id="_ref_3861"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>nextResult</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>done</var> be ?&nbsp;<emu-xref aoid="IteratorComplete" id="_ref_3862"><a href="#sec-iteratorcomplete">IteratorComplete</a></emu-xref>(<var>nextResult</var>).</li><li>If <var>done</var> is <emu-val>true</emu-val>, return <emu-xref aoid="NormalCompletion" id="_ref_3863"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<var>V</var>).</li><li>Let <var>nextValue</var> be ?&nbsp;<emu-xref aoid="IteratorValue" id="_ref_3864"><a href="#sec-iteratorvalue">IteratorValue</a></emu-xref>(<var>nextResult</var>).</li><li>If <var>lhsKind</var> is either <emu-const>assignment</emu-const> or <emu-const>varBinding</emu-const>, then<ol><li>If <var>destructuring</var> is <emu-val>false</emu-val>, then<ol><li>Let <var>lhsRef</var> be the result of evaluating <var>lhs</var>. (It may be evaluated repeatedly.)</li></ol></li></ol></li><li>Else,<ol><li><emu-xref href="#assert" id="_ref_3865"><a href="#assert">Assert</a></emu-xref>: <var>lhsKind</var> is <emu-const>lexicalBinding</emu-const>.</li><li><emu-xref href="#assert" id="_ref_3866"><a href="#assert">Assert</a></emu-xref>: <var>lhs</var> is a <emu-nt id="_ref_12042"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt>.</li><li>Let <var>iterationEnv</var> be <emu-xref aoid="NewDeclarativeEnvironment" id="_ref_3867"><a href="#sec-newdeclarativeenvironment">NewDeclarativeEnvironment</a></emu-xref>(<var>oldEnv</var>).</li><li>Perform BindingInstantiation for <var>lhs</var> passing <var>iterationEnv</var> as the argument.</li><li>Set the <emu-xref href="#running-execution-context" id="_ref_3868"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment to <var>iterationEnv</var>.</li><li>If <var>destructuring</var> is <emu-val>false</emu-val>, then<ol><li><emu-xref href="#assert" id="_ref_3869"><a href="#assert">Assert</a></emu-xref>: <var>lhs</var> binds a single name.</li><li>Let <var>lhsName</var> be the sole element of BoundNames of <var>lhs</var>.</li><li>Let <var>lhsRef</var> be !&nbsp;<emu-xref aoid="ResolveBinding" id="_ref_3870"><a href="#sec-resolvebinding">ResolveBinding</a></emu-xref>(<var>lhsName</var>).</li></ol></li></ol></li><li>If <var>destructuring</var> is <emu-val>false</emu-val>, then<ol><li>If <var>lhsRef</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_3871"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, then<ol><li>Let <var>status</var> be <var>lhsRef</var>.</li></ol></li><li>Else if <var>lhsKind</var> is <emu-const>lexicalBinding</emu-const>, then<ol><li>Let <var>status</var> be <emu-xref aoid="InitializeReferencedBinding" id="_ref_3872"><a href="#sec-initializereferencedbinding">InitializeReferencedBinding</a></emu-xref>(<var>lhsRef</var>, <var>nextValue</var>).</li></ol></li><li>Else,<ol><li>Let <var>status</var> be <emu-xref aoid="PutValue" id="_ref_3873"><a href="#sec-putvalue">PutValue</a></emu-xref>(<var>lhsRef</var>, <var>nextValue</var>).</li></ol></li></ol></li><li>Else,<ol><li>If <var>lhsKind</var> is <emu-const>assignment</emu-const>, then<ol><li>Let <var>status</var> be the result of performing DestructuringAssignmentEvaluation of <var>assignmentPattern</var> using <var>nextValue</var> as the argument.</li></ol></li><li>Else if <var>lhsKind</var> is <emu-const>varBinding</emu-const>, then<ol><li><emu-xref href="#assert" id="_ref_3874"><a href="#assert">Assert</a></emu-xref>: <var>lhs</var> is a <emu-nt id="_ref_12043"><a href="#prod-ForBinding">ForBinding</a></emu-nt>.</li><li>Let <var>status</var> be the result of performing BindingInitialization for <var>lhs</var> passing <var>nextValue</var> and <emu-val>undefined</emu-val> as the arguments.</li></ol></li><li>Else,<ol><li><emu-xref href="#assert" id="_ref_3875"><a href="#assert">Assert</a></emu-xref>: <var>lhsKind</var> is <emu-const>lexicalBinding</emu-const>.</li><li><emu-xref href="#assert" id="_ref_3876"><a href="#assert">Assert</a></emu-xref>: <var>lhs</var> is a <emu-nt id="_ref_12044"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt>.</li><li>Let <var>status</var> be the result of performing BindingInitialization for <var>lhs</var> passing <var>nextValue</var> and <var>iterationEnv</var> as arguments.</li></ol></li></ol></li><li>If <var>status</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_3877"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, then<ol><li>Set the <emu-xref href="#running-execution-context" id="_ref_3878"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment to <var>oldEnv</var>.</li><li>If <var>iteratorKind</var> is <emu-const>async</emu-const>, return ?&nbsp;<emu-xref aoid="AsyncIteratorClose" id="_ref_3879"><a href="#sec-asynciteratorclose">AsyncIteratorClose</a></emu-xref>(<var>iteratorRecord</var>, <var>status</var>).</li><li>If <var>iterationKind</var> is <emu-const>enumerate</emu-const>, then<ol><li>Return <var>status</var>.</li></ol></li><li>Else,<ol><li><emu-xref href="#assert" id="_ref_3880"><a href="#assert">Assert</a></emu-xref>: <var>iterationKind</var> is <emu-const>iterate</emu-const>.</li><li>Return ?&nbsp;<emu-xref aoid="IteratorClose" id="_ref_3881"><a href="#sec-iteratorclose">IteratorClose</a></emu-xref>(<var>iteratorRecord</var>, <var>status</var>).</li></ol></li></ol></li><li>Let <var>result</var> be the result of evaluating <var>stmt</var>.</li><li>Set the <emu-xref href="#running-execution-context" id="_ref_3882"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment to <var>oldEnv</var>.</li><li>If <emu-xref aoid="LoopContinues" id="_ref_3883"><a href="#sec-loopcontinues">LoopContinues</a></emu-xref>(<var>result</var>, <var>labelSet</var>) is <emu-val>false</emu-val>, then<ol><li>If <var>iterationKind</var> is <emu-const>enumerate</emu-const>, then<ol><li>Return <emu-xref aoid="Completion" id="_ref_3884"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<emu-xref aoid="UpdateEmpty" id="_ref_3885"><a href="#sec-updateempty">UpdateEmpty</a></emu-xref>(<var>result</var>, <var>V</var>)).</li></ol></li><li>Else,<ol><li><emu-xref href="#assert" id="_ref_3886"><a href="#assert">Assert</a></emu-xref>: <var>iterationKind</var> is <emu-const>iterate</emu-const>.</li><li>Set <var>status</var> to <emu-xref aoid="UpdateEmpty" id="_ref_3887"><a href="#sec-updateempty">UpdateEmpty</a></emu-xref>(<var>result</var>, <var>V</var>).</li><li>If <var>iteratorKind</var> is <emu-const>async</emu-const>, return ?&nbsp;<emu-xref aoid="AsyncIteratorClose" id="_ref_3888"><a href="#sec-asynciteratorclose">AsyncIteratorClose</a></emu-xref>(<var>iteratorRecord</var>, <var>status</var>).</li><li>Return ?&nbsp;<emu-xref aoid="IteratorClose" id="_ref_3889"><a href="#sec-iteratorclose">IteratorClose</a></emu-xref>(<var>iteratorRecord</var>, <var>status</var>).</li></ol></li></ol></li><li>If <var>result</var>.[[Value]] is not <emu-const>empty</emu-const>, set <var>V</var> to <var>result</var>.[[Value]].
</li></ol></li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-for-in-and-for-of-statements-runtime-semantics-evaluation">
<h1><span class="secnum">13.7.5.14</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="ForBinding" collapsed="">
<emu-nt><a href="#prod-ForBinding">ForBinding</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="50e97238"><emu-nt id="_ref_12045"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>bindingId</var> be StringValue of <emu-nt id="_ref_12046"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt>.</li><li>Return ?&nbsp;<emu-xref aoid="ResolveBinding" id="_ref_3890"><a href="#sec-resolvebinding">ResolveBinding</a></emu-xref>(<var>bindingId</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-enumerate-object-properties" aoid="EnumerateObjectProperties">
<h1><span class="secnum">13.7.5.15</span>EnumerateObjectProperties ( <var>O</var> )</h1>
<p>When the abstract operation EnumerateObjectProperties is called with argument <var>O</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_3891"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_3892"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is Object.</li><li>Return an Iterator object (<emu-xref href="#sec-iterator-interface" id="_ref_349"><a href="#sec-iterator-interface">25.1.1.2</a></emu-xref>) whose <code>next</code> method iterates over all the String-valued keys of enumerable properties of <var>O</var>.
The iterator object is never directly accessible to ECMAScript code.
The mechanics and order of enumerating the properties is not specified
but must conform to the rules specified below.
</li></ol></emu-alg>
<p>The iterator's <code>throw</code> and <code>return</code> methods are <emu-val>null</emu-val> and are never invoked. The iterator's <code>next</code>
method processes object properties to determine whether the property
key should be returned as an iterator value. Returned property keys do
not include keys that are Symbols. Properties of the target object may
be deleted during enumeration. A property that is deleted before it is
processed by the iterator's <code>next</code> method is ignored. If new
properties are added to the target object during enumeration, the newly
added properties are not guaranteed to be processed in the active
enumeration. A <emu-xref href="#property-name" id="_ref_3893"><a href="#property-name">property name</a></emu-xref> will be returned by the iterator's <code>next</code> method at most once in any enumeration.</p>
<p>Enumerating the properties of the target object includes
enumerating properties of its prototype, and the prototype of the
prototype, and so on, recursively; but a property of a prototype is not
processed if it has the same name as a property that has already been
processed by the iterator's <code>next</code> method. The values of
[[Enumerable]] attributes are not considered when determining if a
property of a prototype object has already been processed. The
enumerable property names of prototype objects must be obtained by
invoking EnumerateObjectProperties passing the prototype object as the
argument. EnumerateObjectProperties must obtain the own property keys of
the target object by calling its [[OwnPropertyKeys]] internal method.
Property attributes of the target object must be obtained by calling its
[[GetOwnProperty]] internal method.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The following is an informative definition of an ECMAScript generator function that conforms to these rules:</p>
<pre><code class="javascript hljs"><span class="hljs-function"><span class="hljs-keyword">function</span>* <span class="hljs-title">EnumerateObjectProperties</span>(<span class="hljs-params">obj</span>) </span>{
<span class="hljs-keyword">const</span> visited = <span class="hljs-keyword">new</span> <span class="hljs-built_in">Set</span>();
<span class="hljs-keyword">for</span> (<span class="hljs-keyword">const</span> key <span class="hljs-keyword">of</span> <span class="hljs-built_in">Reflect</span>.ownKeys(obj)) {
<span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> key === <span class="hljs-string">"symbol"</span>) <span class="hljs-keyword">continue</span>;
<span class="hljs-keyword">const</span> desc = <span class="hljs-built_in">Reflect</span>.getOwnPropertyDescriptor(obj, key);
<span class="hljs-keyword">if</span> (desc) {
visited.add(key);
<span class="hljs-keyword">if</span> (desc.enumerable) <span class="hljs-keyword">yield</span> key;
}
}
<span class="hljs-keyword">const</span> proto = <span class="hljs-built_in">Reflect</span>.getPrototypeOf(obj);
<span class="hljs-keyword">if</span> (proto === <span class="hljs-literal">null</span>) <span class="hljs-keyword">return</span>;
<span class="hljs-keyword">for</span> (<span class="hljs-keyword">const</span> protoKey <span class="hljs-keyword">of</span> EnumerateObjectProperties(proto)) {
<span class="hljs-keyword">if</span> (!visited.has(protoKey)) <span class="hljs-keyword">yield</span> protoKey;
}
}</code></pre>
</div></emu-note>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-continue-statement">
<h1><span class="secnum">13.8</span>The <code>continue</code> Statement</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="ContinueStatement" params="Yield, Await" id="prod-ContinueStatement">
<emu-nt params="Yield, Await"><a href="#prod-ContinueStatement">ContinueStatement</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e903cf81"><emu-t>continue</emu-t><emu-t>;</emu-t></emu-rhs>
<emu-rhs a="14858b1f"><emu-t>continue</emu-t><emu-gann>[no <emu-nt id="_ref_12047"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-nt params="?Yield, ?Await" id="_ref_12048"><a href="#prod-LabelIdentifier">LabelIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-clause id="sec-continue-statement-static-semantics-early-errors">
<h1><span class="secnum">13.8.1</span>Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="ContinueStatement" collapsed="">
<emu-nt><a href="#prod-ContinueStatement">ContinueStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e903cf81"><emu-t>continue</emu-t><emu-t>;</emu-t></emu-rhs>
</emu-production>
<emu-production name="ContinueStatement" collapsed="">
<emu-nt><a href="#prod-ContinueStatement">ContinueStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5a1eea0d"><emu-t>continue</emu-t><emu-nt id="_ref_12049"><a href="#prod-LabelIdentifier">LabelIdentifier</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if this <emu-nt id="_ref_12050"><a href="#prod-ContinueStatement">ContinueStatement</a></emu-nt> is not nested, directly or indirectly (but not crossing function boundaries), within an <emu-nt id="_ref_12051"><a href="#prod-IterationStatement">IterationStatement</a></emu-nt>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-continue-statement-static-semantics-containsundefinedcontinuetarget">
<h1><span class="secnum">13.8.2</span>Static Semantics: ContainsUndefinedContinueTarget</h1>
<p>With parameters <var>iterationSet</var> and <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsUndefinedContinueTarget"></emu-see-also-para>
<emu-grammar><emu-production name="ContinueStatement" collapsed="">
<emu-nt><a href="#prod-ContinueStatement">ContinueStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e903cf81"><emu-t>continue</emu-t><emu-t>;</emu-t></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="ContinueStatement" collapsed="">
<emu-nt><a href="#prod-ContinueStatement">ContinueStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5a1eea0d"><emu-t>continue</emu-t><emu-nt id="_ref_12052"><a href="#prod-LabelIdentifier">LabelIdentifier</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If the StringValue of <emu-nt id="_ref_12053"><a href="#prod-LabelIdentifier">LabelIdentifier</a></emu-nt> is not an element of <var>iterationSet</var>, return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-continue-statement-runtime-semantics-evaluation">
<h1><span class="secnum">13.8.3</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="ContinueStatement" collapsed="">
<emu-nt><a href="#prod-ContinueStatement">ContinueStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e903cf81"><emu-t>continue</emu-t><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-xref aoid="Completion" id="_ref_3894"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref> { [[Type]]: <emu-const>continue</emu-const>, [[Value]]: <emu-const>empty</emu-const>, [[Target]]: <emu-const>empty</emu-const> }.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ContinueStatement" collapsed="">
<emu-nt><a href="#prod-ContinueStatement">ContinueStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5a1eea0d"><emu-t>continue</emu-t><emu-nt id="_ref_12054"><a href="#prod-LabelIdentifier">LabelIdentifier</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>label</var> be the StringValue of <emu-nt id="_ref_12055"><a href="#prod-LabelIdentifier">LabelIdentifier</a></emu-nt>.</li><li>Return <emu-xref aoid="Completion" id="_ref_3895"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref> { [[Type]]: <emu-const>continue</emu-const>, [[Value]]: <emu-const>empty</emu-const>, [[Target]]: <var>label</var> }.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-break-statement">
<h1><span class="secnum">13.9</span>The <code>break</code> Statement</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="BreakStatement" params="Yield, Await" id="prod-BreakStatement">
<emu-nt params="Yield, Await"><a href="#prod-BreakStatement">BreakStatement</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b65229e7"><emu-t>break</emu-t><emu-t>;</emu-t></emu-rhs>
<emu-rhs a="9c83b42f"><emu-t>break</emu-t><emu-gann>[no <emu-nt id="_ref_12056"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-nt params="?Yield, ?Await" id="_ref_12057"><a href="#prod-LabelIdentifier">LabelIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-clause id="sec-break-statement-static-semantics-early-errors">
<h1><span class="secnum">13.9.1</span>Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="BreakStatement" collapsed="">
<emu-nt><a href="#prod-BreakStatement">BreakStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b65229e7"><emu-t>break</emu-t><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if this <emu-nt id="_ref_12058"><a href="#prod-BreakStatement">BreakStatement</a></emu-nt> is not nested, directly or indirectly (but not crossing function boundaries), within an <emu-nt id="_ref_12059"><a href="#prod-IterationStatement">IterationStatement</a></emu-nt> or a <emu-nt id="_ref_12060"><a href="#prod-SwitchStatement">SwitchStatement</a></emu-nt>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-break-statement-static-semantics-containsundefinedbreaktarget">
<h1><span class="secnum">13.9.2</span>Static Semantics: ContainsUndefinedBreakTarget</h1>
<p>With parameter <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsUndefinedBreakTarget"></emu-see-also-para>
<emu-grammar><emu-production name="BreakStatement" collapsed="">
<emu-nt><a href="#prod-BreakStatement">BreakStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b65229e7"><emu-t>break</emu-t><emu-t>;</emu-t></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="BreakStatement" collapsed="">
<emu-nt><a href="#prod-BreakStatement">BreakStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="91c83ecb"><emu-t>break</emu-t><emu-nt id="_ref_12061"><a href="#prod-LabelIdentifier">LabelIdentifier</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If the StringValue of <emu-nt id="_ref_12062"><a href="#prod-LabelIdentifier">LabelIdentifier</a></emu-nt> is not an element of <var>labelSet</var>, return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-break-statement-runtime-semantics-evaluation">
<h1><span class="secnum">13.9.3</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="BreakStatement" collapsed="">
<emu-nt><a href="#prod-BreakStatement">BreakStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b65229e7"><emu-t>break</emu-t><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-xref aoid="Completion" id="_ref_3896"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref> { [[Type]]: <emu-const>break</emu-const>, [[Value]]: <emu-const>empty</emu-const>, [[Target]]: <emu-const>empty</emu-const> }.
</li></ol></emu-alg>
<emu-grammar><emu-production name="BreakStatement" collapsed="">
<emu-nt><a href="#prod-BreakStatement">BreakStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="91c83ecb"><emu-t>break</emu-t><emu-nt id="_ref_12063"><a href="#prod-LabelIdentifier">LabelIdentifier</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>label</var> be the StringValue of <emu-nt id="_ref_12064"><a href="#prod-LabelIdentifier">LabelIdentifier</a></emu-nt>.</li><li>Return <emu-xref aoid="Completion" id="_ref_3897"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref> { [[Type]]: <emu-const>break</emu-const>, [[Value]]: <emu-const>empty</emu-const>, [[Target]]: <var>label</var> }.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-return-statement">
<h1><span class="secnum">13.10</span>The <code>return</code> Statement</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="ReturnStatement" params="Yield, Await" id="prod-ReturnStatement">
<emu-nt params="Yield, Await"><a href="#prod-ReturnStatement">ReturnStatement</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0b293381"><emu-t>return</emu-t><emu-t>;</emu-t></emu-rhs>
<emu-rhs a="b7205f0d"><emu-t>return</emu-t><emu-gann>[no <emu-nt id="_ref_12065"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-nt params="+In, ?Yield, ?Await" id="_ref_12066"><a href="#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-note><span class="note">Note</span><div class="note-contents">
<p>A <code>return</code> statement causes a function to cease execution and, in most cases, returns a value to the caller. If <emu-nt id="_ref_12067"><a href="#prod-Expression">Expression</a></emu-nt> is omitted, the return value is <emu-val>undefined</emu-val>. Otherwise, the return value is the value of <emu-nt id="_ref_12068"><a href="#prod-Expression">Expression</a></emu-nt>. A <code>return</code> statement may not actually return a value to the caller depending on surrounding context. For example, in a <code>try</code> block, a <code>return</code> statement's completion record may be replaced with another completion record during evaluation of the <code>finally</code> block.</p>
</div></emu-note>
<emu-clause id="sec-return-statement-runtime-semantics-evaluation">
<h1><span class="secnum">13.10.1</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="ReturnStatement" collapsed="">
<emu-nt><a href="#prod-ReturnStatement">ReturnStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0b293381"><emu-t>return</emu-t><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-xref aoid="Completion" id="_ref_3898"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref> { [[Type]]: <emu-const>return</emu-const>, [[Value]]: <emu-val>undefined</emu-val>, [[Target]]: <emu-const>empty</emu-const> }.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ReturnStatement" collapsed="">
<emu-nt><a href="#prod-ReturnStatement">ReturnStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b4f7595f"><emu-t>return</emu-t><emu-nt id="_ref_12069"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>exprRef</var> be the result of evaluating <emu-nt id="_ref_12070"><a href="#prod-Expression">Expression</a></emu-nt>.</li><li>Let <var>exprValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3899"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>exprRef</var>).</li><li>If !&nbsp;<emu-xref aoid="GetGeneratorKind" id="_ref_3900"><a href="#sec-getgeneratorkind">GetGeneratorKind</a></emu-xref>() is <emu-const>async</emu-const>, set <var>exprValue</var> to ?&nbsp;<emu-xref aoid="Await" id="_ref_3901"><a href="#await">Await</a></emu-xref>(<var>exprValue</var>).</li><li>Return <emu-xref aoid="Completion" id="_ref_3902"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref> { [[Type]]: <emu-const>return</emu-const>, [[Value]]: <var>exprValue</var>, [[Target]]: <emu-const>empty</emu-const> }.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-with-statement">
<h1><span class="secnum">13.11</span>The <code>with</code> Statement</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="WithStatement" params="Yield, Await, Return" id="prod-WithStatement">
<emu-nt params="Yield, Await, Return"><a href="#prod-WithStatement">WithStatement</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="2ceedb70"><emu-t>with</emu-t><emu-t>(</emu-t><emu-nt params="+In, ?Yield, ?Await" id="_ref_12071"><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return" id="_ref_12072"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</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 <code>with</code> statement adds an object <emu-xref href="#sec-environment-records" id="_ref_3903"><a href="#sec-environment-records">Environment Record</a></emu-xref> for a computed object to the lexical environment of the <emu-xref href="#running-execution-context" id="_ref_3904"><a href="#running-execution-context">running execution context</a></emu-xref>. It then executes a statement using this augmented lexical environment. Finally, it restores the original lexical environment.</p>
</div></emu-note>
<emu-clause id="sec-with-statement-static-semantics-early-errors">
<h1><span class="secnum">13.11.1</span>Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="WithStatement" collapsed="">
<emu-nt><a href="#prod-WithStatement">WithStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="23bd2456"><emu-t>with</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12073"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_12074"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if the code that matches this production is contained in <emu-xref href="#sec-strict-mode-code" id="_ref_3905"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>.
</li>
<li>
It is a Syntax Error if <emu-xref aoid="IsLabelledFunction" id="_ref_3906"><a href="#sec-islabelledfunction">IsLabelledFunction</a></emu-xref>(<emu-nt id="_ref_12075"><a href="#prod-Statement">Statement</a></emu-nt>) is <emu-val>true</emu-val>.
</li>
</ul>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>It is only necessary to apply the second rule if the extension specified in <emu-xref href="#sec-labelled-function-declarations" id="_ref_350"><a href="#sec-labelled-function-declarations">B.3.2</a></emu-xref> is implemented.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-with-statement-static-semantics-containsduplicatelabels">
<h1><span class="secnum">13.11.2</span>Static Semantics: ContainsDuplicateLabels</h1>
<p>With parameter <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsDuplicateLabels"></emu-see-also-para>
<emu-grammar><emu-production name="WithStatement" collapsed="">
<emu-nt><a href="#prod-WithStatement">WithStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="23bd2456"><emu-t>with</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12076"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_12077"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ContainsDuplicateLabels of <emu-nt id="_ref_12078"><a href="#prod-Statement">Statement</a></emu-nt> with argument <var>labelSet</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-with-statement-static-semantics-containsundefinedbreaktarget">
<h1><span class="secnum">13.11.3</span>Static Semantics: ContainsUndefinedBreakTarget</h1>
<p>With parameter <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsUndefinedBreakTarget"></emu-see-also-para>
<emu-grammar><emu-production name="WithStatement" collapsed="">
<emu-nt><a href="#prod-WithStatement">WithStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="23bd2456"><emu-t>with</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12079"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_12080"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ContainsUndefinedBreakTarget of <emu-nt id="_ref_12081"><a href="#prod-Statement">Statement</a></emu-nt> with argument <var>labelSet</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-with-statement-static-semantics-containsundefinedcontinuetarget">
<h1><span class="secnum">13.11.4</span>Static Semantics: ContainsUndefinedContinueTarget</h1>
<p>With parameters <var>iterationSet</var> and <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsUndefinedContinueTarget"></emu-see-also-para>
<emu-grammar><emu-production name="WithStatement" collapsed="">
<emu-nt><a href="#prod-WithStatement">WithStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="23bd2456"><emu-t>with</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12082"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_12083"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ContainsUndefinedContinueTarget of <emu-nt id="_ref_12084"><a href="#prod-Statement">Statement</a></emu-nt> with arguments <var>iterationSet</var> and « ».
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-with-statement-static-semantics-vardeclarednames">
<h1><span class="secnum">13.11.5</span>Static Semantics: VarDeclaredNames</h1>
<emu-see-also-para op="VarDeclaredNames"></emu-see-also-para>
<emu-grammar><emu-production name="WithStatement" collapsed="">
<emu-nt><a href="#prod-WithStatement">WithStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="23bd2456"><emu-t>with</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12085"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_12086"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the VarDeclaredNames of <emu-nt id="_ref_12087"><a href="#prod-Statement">Statement</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-with-statement-static-semantics-varscopeddeclarations">
<h1><span class="secnum">13.11.6</span>Static Semantics: VarScopedDeclarations</h1>
<emu-see-also-para op="VarScopedDeclarations"></emu-see-also-para>
<emu-grammar><emu-production name="WithStatement" collapsed="">
<emu-nt><a href="#prod-WithStatement">WithStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="23bd2456"><emu-t>with</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12088"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_12089"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the VarScopedDeclarations of <emu-nt id="_ref_12090"><a href="#prod-Statement">Statement</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-with-statement-runtime-semantics-evaluation">
<h1><span class="secnum">13.11.7</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="WithStatement" collapsed="">
<emu-nt><a href="#prod-WithStatement">WithStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="23bd2456"><emu-t>with</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12091"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_12092"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>val</var> be the result of evaluating <emu-nt id="_ref_12093"><a href="#prod-Expression">Expression</a></emu-nt>.</li><li>Let <var>obj</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_3907"><a href="#sec-toobject">ToObject</a></emu-xref>(? <emu-xref aoid="GetValue" id="_ref_3908"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>val</var>)).</li><li>Let <var>oldEnv</var> be the <emu-xref href="#running-execution-context" id="_ref_3909"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment.</li><li>Let <var>newEnv</var> be <emu-xref aoid="NewObjectEnvironment" id="_ref_3910"><a href="#sec-newobjectenvironment">NewObjectEnvironment</a></emu-xref>(<var>obj</var>, <var>oldEnv</var>).</li><li>Set the <var>withEnvironment</var> flag of <var>newEnv</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_3911"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref> to <emu-val>true</emu-val>.</li><li>Set the <emu-xref href="#running-execution-context" id="_ref_3912"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment to <var>newEnv</var>.</li><li>Let <var>C</var> be the result of evaluating <emu-nt id="_ref_12094"><a href="#prod-Statement">Statement</a></emu-nt>.</li><li>Set the <emu-xref href="#running-execution-context" id="_ref_3913"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment to <var>oldEnv</var>.</li><li>Return <emu-xref aoid="Completion" id="_ref_3914"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<emu-xref aoid="UpdateEmpty" id="_ref_3915"><a href="#sec-updateempty">UpdateEmpty</a></emu-xref>(<var>C</var>, <emu-val>undefined</emu-val>)).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>No matter how control leaves the embedded <emu-nt id="_ref_12095"><a href="#prod-Statement">Statement</a></emu-nt>, whether normally or by some form of <emu-xref href="#sec-completion-record-specification-type" id="_ref_3916"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref> or exception, the LexicalEnvironment is always restored to its former state.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-switch-statement">
<h1><span class="secnum">13.12</span>The <code>switch</code> Statement</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="SwitchStatement" params="Yield, Await, Return" id="prod-SwitchStatement">
<emu-nt params="Yield, Await, Return"><a href="#prod-SwitchStatement">SwitchStatement</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="751972c0"><emu-t>switch</emu-t><emu-t>(</emu-t><emu-nt params="+In, ?Yield, ?Await" id="_ref_12096"><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return" id="_ref_12097"><a href="#prod-CaseBlock">CaseBlock</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="CaseBlock" params="Yield, Await, Return" id="prod-CaseBlock">
<emu-nt params="Yield, Await, Return"><a href="#prod-CaseBlock">CaseBlock</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="57e1f602"><emu-t>{</emu-t><emu-nt params="?Yield, ?Await, ?Return" optional="" id="_ref_12098"><a href="#prod-CaseClauses">CaseClauses</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="d34b22b4"><emu-t>{</emu-t><emu-nt params="?Yield, ?Await, ?Return" optional="" id="_ref_12099"><a href="#prod-CaseClauses">CaseClauses</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt params="?Yield, ?Await, ?Return" id="_ref_12100"><a href="#prod-DefaultClause">DefaultClause</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt><emu-nt params="?Yield, ?Await, ?Return" optional="" id="_ref_12101"><a href="#prod-CaseClauses">CaseClauses</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="CaseClauses" params="Yield, Await, Return" id="prod-CaseClauses">
<emu-nt params="Yield, Await, Return"><a href="#prod-CaseClauses">CaseClauses</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5cf2554e"><emu-nt params="?Yield, ?Await, ?Return" id="_ref_12102"><a href="#prod-CaseClause">CaseClause</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="f11e9d08"><emu-nt params="?Yield, ?Await, ?Return" id="_ref_12103"><a href="#prod-CaseClauses">CaseClauses</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt><emu-nt params="?Yield, ?Await, ?Return" id="_ref_12104"><a href="#prod-CaseClause">CaseClause</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="CaseClause" params="Yield, Await, Return" id="prod-CaseClause">
<emu-nt params="Yield, Await, Return"><a href="#prod-CaseClause">CaseClause</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ccfab6dd"><emu-t>case</emu-t><emu-nt params="+In, ?Yield, ?Await" id="_ref_12105"><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>:</emu-t><emu-nt params="?Yield, ?Await, ?Return" optional="" id="_ref_12106"><a href="#prod-StatementList">StatementList</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="DefaultClause" params="Yield, Await, Return" id="prod-DefaultClause">
<emu-nt params="Yield, Await, Return"><a href="#prod-DefaultClause">DefaultClause</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="74934b03"><emu-t>default</emu-t><emu-t>:</emu-t><emu-nt params="?Yield, ?Await, ?Return" optional="" id="_ref_12107"><a href="#prod-StatementList">StatementList</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-clause id="sec-switch-statement-static-semantics-early-errors">
<h1><span class="secnum">13.12.1</span>Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="SwitchStatement" collapsed="">
<emu-nt><a href="#prod-SwitchStatement">SwitchStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="515acffe"><emu-t>switch</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12108"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_12109"><a href="#prod-CaseBlock">CaseBlock</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if the LexicallyDeclaredNames of <emu-nt id="_ref_12110"><a href="#prod-CaseBlock">CaseBlock</a></emu-nt> contains any duplicate entries.
</li>
<li>
It is a Syntax Error if any element of the LexicallyDeclaredNames of <emu-nt id="_ref_12111"><a href="#prod-CaseBlock">CaseBlock</a></emu-nt> also occurs in the VarDeclaredNames of <emu-nt id="_ref_12112"><a href="#prod-CaseBlock">CaseBlock</a></emu-nt>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-switch-statement-static-semantics-containsduplicatelabels">
<h1><span class="secnum">13.12.2</span>Static Semantics: ContainsDuplicateLabels</h1>
<p>With parameter <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsDuplicateLabels"></emu-see-also-para>
<emu-grammar><emu-production name="SwitchStatement" collapsed="">
<emu-nt><a href="#prod-SwitchStatement">SwitchStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="515acffe"><emu-t>switch</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12113"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_12114"><a href="#prod-CaseBlock">CaseBlock</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ContainsDuplicateLabels of <emu-nt id="_ref_12115"><a href="#prod-CaseBlock">CaseBlock</a></emu-nt> with argument <var>labelSet</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="CaseBlock" collapsed="">
<emu-nt><a href="#prod-CaseBlock">CaseBlock</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><emu-t>{</emu-t><emu-t>}</emu-t></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="CaseBlock" collapsed="">
<emu-nt><a href="#prod-CaseBlock">CaseBlock</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="503b8396"><emu-t>{</emu-t><emu-nt optional="" id="_ref_12116"><a href="#prod-CaseClauses">CaseClauses</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt id="_ref_12117"><a href="#prod-DefaultClause">DefaultClause</a></emu-nt><emu-nt optional="" id="_ref_12118"><a href="#prod-CaseClauses">CaseClauses</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>If the first <emu-nt id="_ref_12119"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt> is present, then<ol><li>Let <var>hasDuplicates</var> be ContainsDuplicateLabels of the first <emu-nt id="_ref_12120"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt> with argument <var>labelSet</var>.</li><li>If <var>hasDuplicates</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li></ol></li><li>Let <var>hasDuplicates</var> be ContainsDuplicateLabels of <emu-nt id="_ref_12121"><a href="#prod-DefaultClause">DefaultClause</a></emu-nt> with argument <var>labelSet</var>.</li><li>If <var>hasDuplicates</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>If the second <emu-nt id="_ref_12122"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt> is not present, return <emu-val>false</emu-val>.</li><li>Return ContainsDuplicateLabels of the second <emu-nt id="_ref_12123"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt> with argument <var>labelSet</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="CaseClauses" collapsed="">
<emu-nt><a href="#prod-CaseClauses">CaseClauses</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="68374923"><emu-nt id="_ref_12124"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt><emu-nt id="_ref_12125"><a href="#prod-CaseClause">CaseClause</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>hasDuplicates</var> be ContainsDuplicateLabels of <emu-nt id="_ref_12126"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt> with argument <var>labelSet</var>.</li><li>If <var>hasDuplicates</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return ContainsDuplicateLabels of <emu-nt id="_ref_12127"><a href="#prod-CaseClause">CaseClause</a></emu-nt> with argument <var>labelSet</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="CaseClause" collapsed="">
<emu-nt><a href="#prod-CaseClause">CaseClause</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c76d0d30"><emu-t>case</emu-t><emu-nt id="_ref_12128"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>:</emu-t><emu-nt optional="" id="_ref_12129"><a href="#prod-StatementList">StatementList</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If the <emu-nt id="_ref_12130"><a href="#prod-StatementList">StatementList</a></emu-nt> is present, return ContainsDuplicateLabels of <emu-nt id="_ref_12131"><a href="#prod-StatementList">StatementList</a></emu-nt> with argument <var>labelSet</var>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="DefaultClause" collapsed="">
<emu-nt><a href="#prod-DefaultClause">DefaultClause</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6782073e"><emu-t>default</emu-t><emu-t>:</emu-t><emu-nt optional="" id="_ref_12132"><a href="#prod-StatementList">StatementList</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If the <emu-nt id="_ref_12133"><a href="#prod-StatementList">StatementList</a></emu-nt> is present, return ContainsDuplicateLabels of <emu-nt id="_ref_12134"><a href="#prod-StatementList">StatementList</a></emu-nt> with argument <var>labelSet</var>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-switch-statement-static-semantics-containsundefinedbreaktarget">
<h1><span class="secnum">13.12.3</span>Static Semantics: ContainsUndefinedBreakTarget</h1>
<p>With parameter <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsUndefinedBreakTarget"></emu-see-also-para>
<emu-grammar><emu-production name="SwitchStatement" collapsed="">
<emu-nt><a href="#prod-SwitchStatement">SwitchStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="515acffe"><emu-t>switch</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12135"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_12136"><a href="#prod-CaseBlock">CaseBlock</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ContainsUndefinedBreakTarget of <emu-nt id="_ref_12137"><a href="#prod-CaseBlock">CaseBlock</a></emu-nt> with argument <var>labelSet</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="CaseBlock" collapsed="">
<emu-nt><a href="#prod-CaseBlock">CaseBlock</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><emu-t>{</emu-t><emu-t>}</emu-t></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="CaseBlock" collapsed="">
<emu-nt><a href="#prod-CaseBlock">CaseBlock</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="503b8396"><emu-t>{</emu-t><emu-nt optional="" id="_ref_12138"><a href="#prod-CaseClauses">CaseClauses</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt id="_ref_12139"><a href="#prod-DefaultClause">DefaultClause</a></emu-nt><emu-nt optional="" id="_ref_12140"><a href="#prod-CaseClauses">CaseClauses</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>If the first <emu-nt id="_ref_12141"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt> is present, then<ol><li>Let <var>hasUndefinedLabels</var> be ContainsUndefinedBreakTarget of the first <emu-nt id="_ref_12142"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt> with argument <var>labelSet</var>.</li><li>If <var>hasUndefinedLabels</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li></ol></li><li>Let <var>hasUndefinedLabels</var> be ContainsUndefinedBreakTarget of <emu-nt id="_ref_12143"><a href="#prod-DefaultClause">DefaultClause</a></emu-nt> with argument <var>labelSet</var>.</li><li>If <var>hasUndefinedLabels</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>If the second <emu-nt id="_ref_12144"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt> is not present, return <emu-val>false</emu-val>.</li><li>Return ContainsUndefinedBreakTarget of the second <emu-nt id="_ref_12145"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt> with argument <var>labelSet</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="CaseClauses" collapsed="">
<emu-nt><a href="#prod-CaseClauses">CaseClauses</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="68374923"><emu-nt id="_ref_12146"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt><emu-nt id="_ref_12147"><a href="#prod-CaseClause">CaseClause</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>hasUndefinedLabels</var> be ContainsUndefinedBreakTarget of <emu-nt id="_ref_12148"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt> with argument <var>labelSet</var>.</li><li>If <var>hasUndefinedLabels</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return ContainsUndefinedBreakTarget of <emu-nt id="_ref_12149"><a href="#prod-CaseClause">CaseClause</a></emu-nt> with argument <var>labelSet</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="CaseClause" collapsed="">
<emu-nt><a href="#prod-CaseClause">CaseClause</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c76d0d30"><emu-t>case</emu-t><emu-nt id="_ref_12150"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>:</emu-t><emu-nt optional="" id="_ref_12151"><a href="#prod-StatementList">StatementList</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If the <emu-nt id="_ref_12152"><a href="#prod-StatementList">StatementList</a></emu-nt> is present, return ContainsUndefinedBreakTarget of <emu-nt id="_ref_12153"><a href="#prod-StatementList">StatementList</a></emu-nt> with argument <var>labelSet</var>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="DefaultClause" collapsed="">
<emu-nt><a href="#prod-DefaultClause">DefaultClause</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6782073e"><emu-t>default</emu-t><emu-t>:</emu-t><emu-nt optional="" id="_ref_12154"><a href="#prod-StatementList">StatementList</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If the <emu-nt id="_ref_12155"><a href="#prod-StatementList">StatementList</a></emu-nt> is present, return ContainsUndefinedBreakTarget of <emu-nt id="_ref_12156"><a href="#prod-StatementList">StatementList</a></emu-nt> with argument <var>labelSet</var>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-switch-statement-static-semantics-containsundefinedcontinuetarget">
<h1><span class="secnum">13.12.4</span>Static Semantics: ContainsUndefinedContinueTarget</h1>
<p>With parameters <var>iterationSet</var> and <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsUndefinedContinueTarget"></emu-see-also-para>
<emu-grammar><emu-production name="SwitchStatement" collapsed="">
<emu-nt><a href="#prod-SwitchStatement">SwitchStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="515acffe"><emu-t>switch</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12157"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_12158"><a href="#prod-CaseBlock">CaseBlock</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ContainsUndefinedContinueTarget of <emu-nt id="_ref_12159"><a href="#prod-CaseBlock">CaseBlock</a></emu-nt> with arguments <var>iterationSet</var> and « ».
</li></ol></emu-alg>
<emu-grammar><emu-production name="CaseBlock" collapsed="">
<emu-nt><a href="#prod-CaseBlock">CaseBlock</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><emu-t>{</emu-t><emu-t>}</emu-t></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="CaseBlock" collapsed="">
<emu-nt><a href="#prod-CaseBlock">CaseBlock</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="503b8396"><emu-t>{</emu-t><emu-nt optional="" id="_ref_12160"><a href="#prod-CaseClauses">CaseClauses</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt id="_ref_12161"><a href="#prod-DefaultClause">DefaultClause</a></emu-nt><emu-nt optional="" id="_ref_12162"><a href="#prod-CaseClauses">CaseClauses</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>If the first <emu-nt id="_ref_12163"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt> is present, then<ol><li>Let <var>hasUndefinedLabels</var> be ContainsUndefinedContinueTarget of the first <emu-nt id="_ref_12164"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt> with arguments <var>iterationSet</var> and « ».</li><li>If <var>hasUndefinedLabels</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li></ol></li><li>Let <var>hasUndefinedLabels</var> be ContainsUndefinedContinueTarget of <emu-nt id="_ref_12165"><a href="#prod-DefaultClause">DefaultClause</a></emu-nt> with arguments <var>iterationSet</var> and « ».</li><li>If <var>hasUndefinedLabels</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>If the second <emu-nt id="_ref_12166"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt> is not present, return <emu-val>false</emu-val>.</li><li>Return ContainsUndefinedContinueTarget of the second <emu-nt id="_ref_12167"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt> with arguments <var>iterationSet</var> and « ».
</li></ol></emu-alg>
<emu-grammar><emu-production name="CaseClauses" collapsed="">
<emu-nt><a href="#prod-CaseClauses">CaseClauses</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="68374923"><emu-nt id="_ref_12168"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt><emu-nt id="_ref_12169"><a href="#prod-CaseClause">CaseClause</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>hasUndefinedLabels</var> be ContainsUndefinedContinueTarget of <emu-nt id="_ref_12170"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt> with arguments <var>iterationSet</var> and « ».</li><li>If <var>hasUndefinedLabels</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return ContainsUndefinedContinueTarget of <emu-nt id="_ref_12171"><a href="#prod-CaseClause">CaseClause</a></emu-nt> with arguments <var>iterationSet</var> and « ».
</li></ol></emu-alg>
<emu-grammar><emu-production name="CaseClause" collapsed="">
<emu-nt><a href="#prod-CaseClause">CaseClause</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c76d0d30"><emu-t>case</emu-t><emu-nt id="_ref_12172"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>:</emu-t><emu-nt optional="" id="_ref_12173"><a href="#prod-StatementList">StatementList</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If the <emu-nt id="_ref_12174"><a href="#prod-StatementList">StatementList</a></emu-nt> is present, return ContainsUndefinedContinueTarget of <emu-nt id="_ref_12175"><a href="#prod-StatementList">StatementList</a></emu-nt> with arguments <var>iterationSet</var> and « ».</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="DefaultClause" collapsed="">
<emu-nt><a href="#prod-DefaultClause">DefaultClause</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6782073e"><emu-t>default</emu-t><emu-t>:</emu-t><emu-nt optional="" id="_ref_12176"><a href="#prod-StatementList">StatementList</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If the <emu-nt id="_ref_12177"><a href="#prod-StatementList">StatementList</a></emu-nt> is present, return ContainsUndefinedContinueTarget of <emu-nt id="_ref_12178"><a href="#prod-StatementList">StatementList</a></emu-nt> with arguments <var>iterationSet</var> and « ».</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-switch-statement-static-semantics-lexicallydeclarednames">
<h1><span class="secnum">13.12.5</span>Static Semantics: LexicallyDeclaredNames</h1>
<emu-see-also-para op="LexicallyDeclaredNames"></emu-see-also-para>
<emu-grammar><emu-production name="CaseBlock" collapsed="">
<emu-nt><a href="#prod-CaseBlock">CaseBlock</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><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_3917"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="CaseBlock" collapsed="">
<emu-nt><a href="#prod-CaseBlock">CaseBlock</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="503b8396"><emu-t>{</emu-t><emu-nt optional="" id="_ref_12179"><a href="#prod-CaseClauses">CaseClauses</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt id="_ref_12180"><a href="#prod-DefaultClause">DefaultClause</a></emu-nt><emu-nt optional="" id="_ref_12181"><a href="#prod-CaseClauses">CaseClauses</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>If the first <emu-nt id="_ref_12182"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt> is present, let <var>names</var> be the LexicallyDeclaredNames of the first <emu-nt id="_ref_12183"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt>.</li><li>Else, let <var>names</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3918"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Append to <var>names</var> the elements of the LexicallyDeclaredNames of the <emu-nt id="_ref_12184"><a href="#prod-DefaultClause">DefaultClause</a></emu-nt>.</li><li>If the second <emu-nt id="_ref_12185"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt> is not present, return <var>names</var>.</li><li>Return the result of appending to <var>names</var> the elements of the LexicallyDeclaredNames of the second <emu-nt id="_ref_12186"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="CaseClauses" collapsed="">
<emu-nt><a href="#prod-CaseClauses">CaseClauses</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="68374923"><emu-nt id="_ref_12187"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt><emu-nt id="_ref_12188"><a href="#prod-CaseClause">CaseClause</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>names</var> be LexicallyDeclaredNames of <emu-nt id="_ref_12189"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt>.</li><li>Append to <var>names</var> the elements of the LexicallyDeclaredNames of <emu-nt id="_ref_12190"><a href="#prod-CaseClause">CaseClause</a></emu-nt>.</li><li>Return <var>names</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="CaseClause" collapsed="">
<emu-nt><a href="#prod-CaseClause">CaseClause</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c76d0d30"><emu-t>case</emu-t><emu-nt id="_ref_12191"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>:</emu-t><emu-nt optional="" id="_ref_12192"><a href="#prod-StatementList">StatementList</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If the <emu-nt id="_ref_12193"><a href="#prod-StatementList">StatementList</a></emu-nt> is present, return the LexicallyDeclaredNames of <emu-nt id="_ref_12194"><a href="#prod-StatementList">StatementList</a></emu-nt>.</li><li>Return a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3919"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="DefaultClause" collapsed="">
<emu-nt><a href="#prod-DefaultClause">DefaultClause</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6782073e"><emu-t>default</emu-t><emu-t>:</emu-t><emu-nt optional="" id="_ref_12195"><a href="#prod-StatementList">StatementList</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If the <emu-nt id="_ref_12196"><a href="#prod-StatementList">StatementList</a></emu-nt> is present, return the LexicallyDeclaredNames of <emu-nt id="_ref_12197"><a href="#prod-StatementList">StatementList</a></emu-nt>.</li><li>Return a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3920"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-switch-statement-static-semantics-lexicallyscopeddeclarations">
<h1><span class="secnum">13.12.6</span>Static Semantics: LexicallyScopedDeclarations</h1>
<emu-see-also-para op="LexicallyScopedDeclarations"></emu-see-also-para>
<emu-grammar><emu-production name="CaseBlock" collapsed="">
<emu-nt><a href="#prod-CaseBlock">CaseBlock</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><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_3921"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="CaseBlock" collapsed="">
<emu-nt><a href="#prod-CaseBlock">CaseBlock</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="503b8396"><emu-t>{</emu-t><emu-nt optional="" id="_ref_12198"><a href="#prod-CaseClauses">CaseClauses</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt id="_ref_12199"><a href="#prod-DefaultClause">DefaultClause</a></emu-nt><emu-nt optional="" id="_ref_12200"><a href="#prod-CaseClauses">CaseClauses</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>If the first <emu-nt id="_ref_12201"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt> is present, let <var>declarations</var> be the LexicallyScopedDeclarations of the first <emu-nt id="_ref_12202"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt>.</li><li>Else, let <var>declarations</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3922"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Append to <var>declarations</var> the elements of the LexicallyScopedDeclarations of the <emu-nt id="_ref_12203"><a href="#prod-DefaultClause">DefaultClause</a></emu-nt>.</li><li>If the second <emu-nt id="_ref_12204"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt> is not present, return <var>declarations</var>.</li><li>Return the result of appending to <var>declarations</var> the elements of the LexicallyScopedDeclarations of the second <emu-nt id="_ref_12205"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="CaseClauses" collapsed="">
<emu-nt><a href="#prod-CaseClauses">CaseClauses</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="68374923"><emu-nt id="_ref_12206"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt><emu-nt id="_ref_12207"><a href="#prod-CaseClause">CaseClause</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>declarations</var> be LexicallyScopedDeclarations of <emu-nt id="_ref_12208"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt>.</li><li>Append to <var>declarations</var> the elements of the LexicallyScopedDeclarations of <emu-nt id="_ref_12209"><a href="#prod-CaseClause">CaseClause</a></emu-nt>.</li><li>Return <var>declarations</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="CaseClause" collapsed="">
<emu-nt><a href="#prod-CaseClause">CaseClause</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c76d0d30"><emu-t>case</emu-t><emu-nt id="_ref_12210"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>:</emu-t><emu-nt optional="" id="_ref_12211"><a href="#prod-StatementList">StatementList</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If the <emu-nt id="_ref_12212"><a href="#prod-StatementList">StatementList</a></emu-nt> is present, return the LexicallyScopedDeclarations of <emu-nt id="_ref_12213"><a href="#prod-StatementList">StatementList</a></emu-nt>.</li><li>Return a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3923"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="DefaultClause" collapsed="">
<emu-nt><a href="#prod-DefaultClause">DefaultClause</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6782073e"><emu-t>default</emu-t><emu-t>:</emu-t><emu-nt optional="" id="_ref_12214"><a href="#prod-StatementList">StatementList</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If the <emu-nt id="_ref_12215"><a href="#prod-StatementList">StatementList</a></emu-nt> is present, return the LexicallyScopedDeclarations of <emu-nt id="_ref_12216"><a href="#prod-StatementList">StatementList</a></emu-nt>.</li><li>Return a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3924"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-switch-statement-static-semantics-vardeclarednames">
<h1><span class="secnum">13.12.7</span>Static Semantics: VarDeclaredNames</h1>
<emu-see-also-para op="VarDeclaredNames"></emu-see-also-para>
<emu-grammar><emu-production name="SwitchStatement" collapsed="">
<emu-nt><a href="#prod-SwitchStatement">SwitchStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="515acffe"><emu-t>switch</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12217"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_12218"><a href="#prod-CaseBlock">CaseBlock</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the VarDeclaredNames of <emu-nt id="_ref_12219"><a href="#prod-CaseBlock">CaseBlock</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="CaseBlock" collapsed="">
<emu-nt><a href="#prod-CaseBlock">CaseBlock</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><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_3925"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="CaseBlock" collapsed="">
<emu-nt><a href="#prod-CaseBlock">CaseBlock</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="503b8396"><emu-t>{</emu-t><emu-nt optional="" id="_ref_12220"><a href="#prod-CaseClauses">CaseClauses</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt id="_ref_12221"><a href="#prod-DefaultClause">DefaultClause</a></emu-nt><emu-nt optional="" id="_ref_12222"><a href="#prod-CaseClauses">CaseClauses</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>If the first <emu-nt id="_ref_12223"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt> is present, let <var>names</var> be the VarDeclaredNames of the first <emu-nt id="_ref_12224"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt>.</li><li>Else, let <var>names</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3926"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Append to <var>names</var> the elements of the VarDeclaredNames of the <emu-nt id="_ref_12225"><a href="#prod-DefaultClause">DefaultClause</a></emu-nt>.</li><li>If the second <emu-nt id="_ref_12226"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt> is not present, return <var>names</var>.</li><li>Return the result of appending to <var>names</var> the elements of the VarDeclaredNames of the second <emu-nt id="_ref_12227"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="CaseClauses" collapsed="">
<emu-nt><a href="#prod-CaseClauses">CaseClauses</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="68374923"><emu-nt id="_ref_12228"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt><emu-nt id="_ref_12229"><a href="#prod-CaseClause">CaseClause</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>names</var> be VarDeclaredNames of <emu-nt id="_ref_12230"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt>.</li><li>Append to <var>names</var> the elements of the VarDeclaredNames of <emu-nt id="_ref_12231"><a href="#prod-CaseClause">CaseClause</a></emu-nt>.</li><li>Return <var>names</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="CaseClause" collapsed="">
<emu-nt><a href="#prod-CaseClause">CaseClause</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c76d0d30"><emu-t>case</emu-t><emu-nt id="_ref_12232"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>:</emu-t><emu-nt optional="" id="_ref_12233"><a href="#prod-StatementList">StatementList</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If the <emu-nt id="_ref_12234"><a href="#prod-StatementList">StatementList</a></emu-nt> is present, return the VarDeclaredNames of <emu-nt id="_ref_12235"><a href="#prod-StatementList">StatementList</a></emu-nt>.</li><li>Return a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3927"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="DefaultClause" collapsed="">
<emu-nt><a href="#prod-DefaultClause">DefaultClause</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6782073e"><emu-t>default</emu-t><emu-t>:</emu-t><emu-nt optional="" id="_ref_12236"><a href="#prod-StatementList">StatementList</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If the <emu-nt id="_ref_12237"><a href="#prod-StatementList">StatementList</a></emu-nt> is present, return the VarDeclaredNames of <emu-nt id="_ref_12238"><a href="#prod-StatementList">StatementList</a></emu-nt>.</li><li>Return a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3928"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-switch-statement-static-semantics-varscopeddeclarations">
<h1><span class="secnum">13.12.8</span>Static Semantics: VarScopedDeclarations</h1>
<emu-see-also-para op="VarScopedDeclarations"></emu-see-also-para>
<emu-grammar><emu-production name="SwitchStatement" collapsed="">
<emu-nt><a href="#prod-SwitchStatement">SwitchStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="515acffe"><emu-t>switch</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12239"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_12240"><a href="#prod-CaseBlock">CaseBlock</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the VarScopedDeclarations of <emu-nt id="_ref_12241"><a href="#prod-CaseBlock">CaseBlock</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="CaseBlock" collapsed="">
<emu-nt><a href="#prod-CaseBlock">CaseBlock</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><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_3929"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="CaseBlock" collapsed="">
<emu-nt><a href="#prod-CaseBlock">CaseBlock</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="503b8396"><emu-t>{</emu-t><emu-nt optional="" id="_ref_12242"><a href="#prod-CaseClauses">CaseClauses</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt id="_ref_12243"><a href="#prod-DefaultClause">DefaultClause</a></emu-nt><emu-nt optional="" id="_ref_12244"><a href="#prod-CaseClauses">CaseClauses</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>If the first <emu-nt id="_ref_12245"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt> is present, let <var>declarations</var> be the VarScopedDeclarations of the first <emu-nt id="_ref_12246"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt>.</li><li>Else, let <var>declarations</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3930"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Append to <var>declarations</var> the elements of the VarScopedDeclarations of the <emu-nt id="_ref_12247"><a href="#prod-DefaultClause">DefaultClause</a></emu-nt>.</li><li>If the second <emu-nt id="_ref_12248"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt> is not present, return <var>declarations</var>.</li><li>Return the result of appending to <var>declarations</var> the elements of the VarScopedDeclarations of the second <emu-nt id="_ref_12249"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="CaseClauses" collapsed="">
<emu-nt><a href="#prod-CaseClauses">CaseClauses</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="68374923"><emu-nt id="_ref_12250"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt><emu-nt id="_ref_12251"><a href="#prod-CaseClause">CaseClause</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>declarations</var> be VarScopedDeclarations of <emu-nt id="_ref_12252"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt>.</li><li>Append to <var>declarations</var> the elements of the VarScopedDeclarations of <emu-nt id="_ref_12253"><a href="#prod-CaseClause">CaseClause</a></emu-nt>.</li><li>Return <var>declarations</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="CaseClause" collapsed="">
<emu-nt><a href="#prod-CaseClause">CaseClause</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c76d0d30"><emu-t>case</emu-t><emu-nt id="_ref_12254"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>:</emu-t><emu-nt optional="" id="_ref_12255"><a href="#prod-StatementList">StatementList</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If the <emu-nt id="_ref_12256"><a href="#prod-StatementList">StatementList</a></emu-nt> is present, return the VarScopedDeclarations of <emu-nt id="_ref_12257"><a href="#prod-StatementList">StatementList</a></emu-nt>.</li><li>Return a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3931"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="DefaultClause" collapsed="">
<emu-nt><a href="#prod-DefaultClause">DefaultClause</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6782073e"><emu-t>default</emu-t><emu-t>:</emu-t><emu-nt optional="" id="_ref_12258"><a href="#prod-StatementList">StatementList</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If the <emu-nt id="_ref_12259"><a href="#prod-StatementList">StatementList</a></emu-nt> is present, return the VarScopedDeclarations of <emu-nt id="_ref_12260"><a href="#prod-StatementList">StatementList</a></emu-nt>.</li><li>Return a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3932"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-runtime-semantics-caseblockevaluation">
<h1><span class="secnum">13.12.9</span>Runtime Semantics: CaseBlockEvaluation</h1>
<p>With parameter <var>input</var>.</p>
<emu-grammar><emu-production name="CaseBlock" collapsed="">
<emu-nt><a href="#prod-CaseBlock">CaseBlock</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><emu-t>{</emu-t><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-xref aoid="NormalCompletion" id="_ref_3933"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-val>undefined</emu-val>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="CaseBlock" collapsed="">
<emu-nt><a href="#prod-CaseBlock">CaseBlock</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="11eac196"><emu-t>{</emu-t><emu-nt id="_ref_12261"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>V</var> be <emu-val>undefined</emu-val>.</li><li>Let <var>A</var> be the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3934"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of <emu-nt id="_ref_12262"><a href="#prod-CaseClause">CaseClause</a></emu-nt> items in <emu-nt id="_ref_12263"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt>, in source text order.</li><li>Let <var>found</var> be <emu-val>false</emu-val>.</li><li>For each <emu-nt id="_ref_12264"><a href="#prod-CaseClause">CaseClause</a></emu-nt> <var>C</var> in <var>A</var>, do<ol><li>If <var>found</var> is <emu-val>false</emu-val>, then<ol><li>Set <var>found</var> to ?&nbsp;<emu-xref aoid="CaseClauseIsSelected" id="_ref_3935"><a href="#sec-runtime-semantics-caseclauseisselected">CaseClauseIsSelected</a></emu-xref>(<var>C</var>, <var>input</var>).</li></ol></li><li>If <var>found</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>R</var> be the result of evaluating <var>C</var>.</li><li>If <var>R</var>.[[Value]] is not <emu-const>empty</emu-const>, set <var>V</var> to <var>R</var>.[[Value]].</li><li>If <var>R</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_3936"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, return <emu-xref aoid="Completion" id="_ref_3937"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<emu-xref aoid="UpdateEmpty" id="_ref_3938"><a href="#sec-updateempty">UpdateEmpty</a></emu-xref>(<var>R</var>, <var>V</var>)).</li></ol></li></ol></li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_3939"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<var>V</var>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="CaseBlock" collapsed="">
<emu-nt><a href="#prod-CaseBlock">CaseBlock</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="503b8396"><emu-t>{</emu-t><emu-nt optional="" id="_ref_12265"><a href="#prod-CaseClauses">CaseClauses</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt id="_ref_12266"><a href="#prod-DefaultClause">DefaultClause</a></emu-nt><emu-nt optional="" id="_ref_12267"><a href="#prod-CaseClauses">CaseClauses</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>V</var> be <emu-val>undefined</emu-val>.</li><li>If the first <emu-nt id="_ref_12268"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt> is present, then<ol><li>Let <var>A</var> be the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3940"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of <emu-nt id="_ref_12269"><a href="#prod-CaseClause">CaseClause</a></emu-nt> items in the first <emu-nt id="_ref_12270"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt>, in source text order.</li></ol></li><li>Else,<ol><li>Let <var>A</var> be « ».</li></ol></li><li>Let <var>found</var> be <emu-val>false</emu-val>.</li><li>For each <emu-nt id="_ref_12271"><a href="#prod-CaseClause">CaseClause</a></emu-nt> <var>C</var> in <var>A</var>, do<ol><li>If <var>found</var> is <emu-val>false</emu-val>, then<ol><li>Set <var>found</var> to ?&nbsp;<emu-xref aoid="CaseClauseIsSelected" id="_ref_3941"><a href="#sec-runtime-semantics-caseclauseisselected">CaseClauseIsSelected</a></emu-xref>(<var>C</var>, <var>input</var>).</li></ol></li><li>If <var>found</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>R</var> be the result of evaluating <var>C</var>.</li><li>If <var>R</var>.[[Value]] is not <emu-const>empty</emu-const>, set <var>V</var> to <var>R</var>.[[Value]].</li><li>If <var>R</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_3942"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, return <emu-xref aoid="Completion" id="_ref_3943"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<emu-xref aoid="UpdateEmpty" id="_ref_3944"><a href="#sec-updateempty">UpdateEmpty</a></emu-xref>(<var>R</var>, <var>V</var>)).</li></ol></li></ol></li><li>Let <var>foundInB</var> be <emu-val>false</emu-val>.</li><li>If the second <emu-nt id="_ref_12272"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt> is present, then<ol><li>Let <var>B</var> be the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3945"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of <emu-nt id="_ref_12273"><a href="#prod-CaseClause">CaseClause</a></emu-nt> items in the second <emu-nt id="_ref_12274"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt>, in source text order.</li></ol></li><li>Else,<ol><li>Let <var>B</var> be « ».</li></ol></li><li>If <var>found</var> is <emu-val>false</emu-val>, then<ol><li>For each <emu-nt id="_ref_12275"><a href="#prod-CaseClause">CaseClause</a></emu-nt> <var>C</var> in <var>B</var>, do<ol><li>If <var>foundInB</var> is <emu-val>false</emu-val>, then<ol><li>Set <var>foundInB</var> to ?&nbsp;<emu-xref aoid="CaseClauseIsSelected" id="_ref_3946"><a href="#sec-runtime-semantics-caseclauseisselected">CaseClauseIsSelected</a></emu-xref>(<var>C</var>, <var>input</var>).</li></ol></li><li>If <var>foundInB</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>R</var> be the result of evaluating <emu-nt id="_ref_12276"><a href="#prod-CaseClause">CaseClause</a></emu-nt> <var>C</var>.</li><li>If <var>R</var>.[[Value]] is not <emu-const>empty</emu-const>, set <var>V</var> to <var>R</var>.[[Value]].</li><li>If <var>R</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_3947"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, return <emu-xref aoid="Completion" id="_ref_3948"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<emu-xref aoid="UpdateEmpty" id="_ref_3949"><a href="#sec-updateempty">UpdateEmpty</a></emu-xref>(<var>R</var>, <var>V</var>)).</li></ol></li></ol></li></ol></li><li>If <var>foundInB</var> is <emu-val>true</emu-val>, return <emu-xref aoid="NormalCompletion" id="_ref_3950"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<var>V</var>).</li><li>Let <var>R</var> be the result of evaluating <emu-nt id="_ref_12277"><a href="#prod-DefaultClause">DefaultClause</a></emu-nt>.</li><li>If <var>R</var>.[[Value]] is not <emu-const>empty</emu-const>, set <var>V</var> to <var>R</var>.[[Value]].</li><li>If <var>R</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_3951"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, return <emu-xref aoid="Completion" id="_ref_3952"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<emu-xref aoid="UpdateEmpty" id="_ref_3953"><a href="#sec-updateempty">UpdateEmpty</a></emu-xref>(<var>R</var>, <var>V</var>)).</li><li>For each <emu-nt id="_ref_12278"><a href="#prod-CaseClause">CaseClause</a></emu-nt> <var>C</var> in <var>B</var> (NOTE: this is another complete iteration of the second <emu-nt id="_ref_12279"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt>), do<ol><li>Let <var>R</var> be the result of evaluating <emu-nt id="_ref_12280"><a href="#prod-CaseClause">CaseClause</a></emu-nt> <var>C</var>.</li><li>If <var>R</var>.[[Value]] is not <emu-const>empty</emu-const>, set <var>V</var> to <var>R</var>.[[Value]].</li><li>If <var>R</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_3954"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, return <emu-xref aoid="Completion" id="_ref_3955"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<emu-xref aoid="UpdateEmpty" id="_ref_3956"><a href="#sec-updateempty">UpdateEmpty</a></emu-xref>(<var>R</var>, <var>V</var>)).</li></ol></li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_3957"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<var>V</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-runtime-semantics-caseclauseisselected" aoid="CaseClauseIsSelected" oldids="sec-runtime-semantics-caseselectorevaluation">
<span id="sec-runtime-semantics-caseselectorevaluation"></span><h1><span class="secnum">13.12.10</span>Runtime Semantics: CaseClauseIsSelected ( <var>C</var>, <var>input</var> )</h1>
<p>The abstract operation CaseClauseIsSelected, given <emu-nt id="_ref_12281"><a href="#prod-CaseClause">CaseClause</a></emu-nt> <var>C</var> and value <var>input</var>, determines whether <var>C</var> matches <var>input</var>.</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_3958"><a href="#assert">Assert</a></emu-xref>: <var>C</var> is an instance of the production <emu-grammar><emu-production name="CaseClause" collapsed="" class=" inline">
<emu-nt><a href="#prod-CaseClause">CaseClause</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c76d0d30"><emu-t>case</emu-t><emu-nt id="_ref_12282"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>:</emu-t><emu-nt optional="" id="_ref_12283"><a href="#prod-StatementList">StatementList</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>.</li><li>Let <var>exprRef</var> be the result of evaluating the <emu-nt id="_ref_12284"><a href="#prod-Expression">Expression</a></emu-nt> of <var>C</var>.</li><li>Let <var>clauseSelector</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3959"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>exprRef</var>).</li><li>Return the result of performing <emu-xref aoid="Strict Equality Comparison" id="_ref_3960"><a href="#sec-strict-equality-comparison">Strict Equality Comparison</a></emu-xref> <var>input</var> === <var>clauseSelector</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>This operation does not execute <var>C</var>'s <emu-nt id="_ref_12285"><a href="#prod-StatementList">StatementList</a></emu-nt> (if any). The <emu-nt id="_ref_12286"><a href="#prod-CaseBlock">CaseBlock</a></emu-nt> algorithm uses its return value to determine which <emu-nt id="_ref_12287"><a href="#prod-StatementList">StatementList</a></emu-nt> to start executing.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-switch-statement-runtime-semantics-evaluation">
<h1><span class="secnum">13.12.11</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="SwitchStatement" collapsed="">
<emu-nt><a href="#prod-SwitchStatement">SwitchStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="515acffe"><emu-t>switch</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12288"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_12289"><a href="#prod-CaseBlock">CaseBlock</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>exprRef</var> be the result of evaluating <emu-nt id="_ref_12290"><a href="#prod-Expression">Expression</a></emu-nt>.</li><li>Let <var>switchValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3961"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>exprRef</var>).</li><li>Let <var>oldEnv</var> be the <emu-xref href="#running-execution-context" id="_ref_3962"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment.</li><li>Let <var>blockEnv</var> be <emu-xref aoid="NewDeclarativeEnvironment" id="_ref_3963"><a href="#sec-newdeclarativeenvironment">NewDeclarativeEnvironment</a></emu-xref>(<var>oldEnv</var>).</li><li>Perform <emu-xref aoid="BlockDeclarationInstantiation" id="_ref_3964"><a href="#sec-blockdeclarationinstantiation">BlockDeclarationInstantiation</a></emu-xref>(<emu-nt id="_ref_12291"><a href="#prod-CaseBlock">CaseBlock</a></emu-nt>, <var>blockEnv</var>).</li><li>Set the <emu-xref href="#running-execution-context" id="_ref_3965"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment to <var>blockEnv</var>.</li><li>Let <var>R</var> be the result of performing CaseBlockEvaluation of <emu-nt id="_ref_12292"><a href="#prod-CaseBlock">CaseBlock</a></emu-nt> with argument <var>switchValue</var>.</li><li>Set the <emu-xref href="#running-execution-context" id="_ref_3966"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment to <var>oldEnv</var>.</li><li>Return <var>R</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>No matter how control leaves the <emu-nt id="_ref_12293"><a href="#prod-SwitchStatement">SwitchStatement</a></emu-nt> the LexicalEnvironment is always restored to its former state.</p>
</div></emu-note>
<emu-grammar><emu-production name="CaseClause" collapsed="">
<emu-nt><a href="#prod-CaseClause">CaseClause</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0261b19a"><emu-t>case</emu-t><emu-nt id="_ref_12294"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>:</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-xref aoid="NormalCompletion" id="_ref_3967"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="CaseClause" collapsed="">
<emu-nt><a href="#prod-CaseClause">CaseClause</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="7849dc0f"><emu-t>case</emu-t><emu-nt id="_ref_12295"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>:</emu-t><emu-nt id="_ref_12296"><a href="#prod-StatementList">StatementList</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the result of evaluating <emu-nt id="_ref_12297"><a href="#prod-StatementList">StatementList</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="DefaultClause" collapsed="">
<emu-nt><a href="#prod-DefaultClause">DefaultClause</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b79ae3b1"><emu-t>default</emu-t><emu-t>:</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-xref aoid="NormalCompletion" id="_ref_3968"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="DefaultClause" collapsed="">
<emu-nt><a href="#prod-DefaultClause">DefaultClause</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a1d00856"><emu-t>default</emu-t><emu-t>:</emu-t><emu-nt id="_ref_12298"><a href="#prod-StatementList">StatementList</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the result of evaluating <emu-nt id="_ref_12299"><a href="#prod-StatementList">StatementList</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-labelled-statements">
<h1><span class="secnum">13.13</span>Labelled Statements</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="LabelledStatement" params="Yield, Await, Return" id="prod-LabelledStatement">
<emu-nt params="Yield, Await, Return"><a href="#prod-LabelledStatement">LabelledStatement</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="be1c4a00"><emu-nt params="?Yield, ?Await" id="_ref_12300"><a href="#prod-LabelIdentifier">LabelIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>:</emu-t><emu-nt params="?Yield, ?Await, ?Return" id="_ref_12301"><a href="#prod-LabelledItem">LabelledItem</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="LabelledItem" params="Yield, Await, Return" id="prod-LabelledItem">
<emu-nt params="Yield, Await, Return"><a href="#prod-LabelledItem">LabelledItem</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4843d33f"><emu-nt params="?Yield, ?Await, ?Return" id="_ref_12302"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="7743708d"><emu-nt params="?Yield, ?Await, ~Default" id="_ref_12303"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a><emu-mods><emu-params>[?Yield, ?Await, ~Default]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>A <emu-nt id="_ref_12304"><a href="#prod-Statement">Statement</a></emu-nt> may be prefixed by a label. Labelled statements are only used in conjunction with labelled <code>break</code> and <code>continue</code> statements. ECMAScript has no <code>goto</code> statement. A <emu-nt id="_ref_12305"><a href="#prod-Statement">Statement</a></emu-nt> can be part of a <emu-nt id="_ref_12306"><a href="#prod-LabelledStatement">LabelledStatement</a></emu-nt>, which itself can be part of a <emu-nt id="_ref_12307"><a href="#prod-LabelledStatement">LabelledStatement</a></emu-nt>,
and so on. The labels introduced this way are collectively referred to
as the “current label set” when describing the semantics of individual
statements.</p>
</div></emu-note>
<emu-clause id="sec-labelled-statements-static-semantics-early-errors">
<h1><span class="secnum">13.13.1</span>Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="LabelledItem" collapsed="">
<emu-nt><a href="#prod-LabelledItem">LabelledItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="fa7a943c"><emu-nt id="_ref_12308"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if any source text matches this rule.
</li>
</ul>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>An alternative definition for this rule is provided in <emu-xref href="#sec-labelled-function-declarations" id="_ref_351"><a href="#sec-labelled-function-declarations">B.3.2</a></emu-xref>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-labelled-statements-static-semantics-containsduplicatelabels">
<h1><span class="secnum">13.13.2</span>Static Semantics: ContainsDuplicateLabels</h1>
<p>With parameter <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsDuplicateLabels"></emu-see-also-para>
<emu-grammar><emu-production name="LabelledStatement" collapsed="">
<emu-nt><a href="#prod-LabelledStatement">LabelledStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="51b6efb5"><emu-nt id="_ref_12309"><a href="#prod-LabelIdentifier">LabelIdentifier</a></emu-nt><emu-t>:</emu-t><emu-nt id="_ref_12310"><a href="#prod-LabelledItem">LabelledItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>label</var> be the StringValue of <emu-nt id="_ref_12311"><a href="#prod-LabelIdentifier">LabelIdentifier</a></emu-nt>.</li><li>If <var>label</var> is an element of <var>labelSet</var>, return <emu-val>true</emu-val>.</li><li>Let <var>newLabelSet</var> be a copy of <var>labelSet</var> with <var>label</var> appended.</li><li>Return ContainsDuplicateLabels of <emu-nt id="_ref_12312"><a href="#prod-LabelledItem">LabelledItem</a></emu-nt> with argument <var>newLabelSet</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="LabelledItem" collapsed="">
<emu-nt><a href="#prod-LabelledItem">LabelledItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="fa7a943c"><emu-nt id="_ref_12313"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-labelled-statements-static-semantics-containsundefinedbreaktarget">
<h1><span class="secnum">13.13.3</span>Static Semantics: ContainsUndefinedBreakTarget</h1>
<p>With parameter <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsUndefinedBreakTarget"></emu-see-also-para>
<emu-grammar><emu-production name="LabelledStatement" collapsed="">
<emu-nt><a href="#prod-LabelledStatement">LabelledStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="51b6efb5"><emu-nt id="_ref_12314"><a href="#prod-LabelIdentifier">LabelIdentifier</a></emu-nt><emu-t>:</emu-t><emu-nt id="_ref_12315"><a href="#prod-LabelledItem">LabelledItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>label</var> be the StringValue of <emu-nt id="_ref_12316"><a href="#prod-LabelIdentifier">LabelIdentifier</a></emu-nt>.</li><li>Let <var>newLabelSet</var> be a copy of <var>labelSet</var> with <var>label</var> appended.</li><li>Return ContainsUndefinedBreakTarget of <emu-nt id="_ref_12317"><a href="#prod-LabelledItem">LabelledItem</a></emu-nt> with argument <var>newLabelSet</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="LabelledItem" collapsed="">
<emu-nt><a href="#prod-LabelledItem">LabelledItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="fa7a943c"><emu-nt id="_ref_12318"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-labelled-statements-static-semantics-containsundefinedcontinuetarget">
<h1><span class="secnum">13.13.4</span>Static Semantics: ContainsUndefinedContinueTarget</h1>
<p>With parameters <var>iterationSet</var> and <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsUndefinedContinueTarget"></emu-see-also-para>
<emu-grammar><emu-production name="LabelledStatement" collapsed="">
<emu-nt><a href="#prod-LabelledStatement">LabelledStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="51b6efb5"><emu-nt id="_ref_12319"><a href="#prod-LabelIdentifier">LabelIdentifier</a></emu-nt><emu-t>:</emu-t><emu-nt id="_ref_12320"><a href="#prod-LabelledItem">LabelledItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>label</var> be the StringValue of <emu-nt id="_ref_12321"><a href="#prod-LabelIdentifier">LabelIdentifier</a></emu-nt>.</li><li>Let <var>newLabelSet</var> be a copy of <var>labelSet</var> with <var>label</var> appended.</li><li>Return ContainsUndefinedContinueTarget of <emu-nt id="_ref_12322"><a href="#prod-LabelledItem">LabelledItem</a></emu-nt> with arguments <var>iterationSet</var> and <var>newLabelSet</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="LabelledItem" collapsed="">
<emu-nt><a href="#prod-LabelledItem">LabelledItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="fa7a943c"><emu-nt id="_ref_12323"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-islabelledfunction" aoid="IsLabelledFunction">
<h1><span class="secnum">13.13.5</span>Static Semantics: IsLabelledFunction ( <var>stmt</var> )</h1>
<p>The abstract operation IsLabelledFunction with argument <var>stmt</var> performs the following steps:</p>
<emu-alg><ol><li>If <var>stmt</var> is not a <emu-nt id="_ref_12324"><a href="#prod-LabelledStatement">LabelledStatement</a></emu-nt>, return <emu-val>false</emu-val>.</li><li>Let <var>item</var> be the <emu-nt id="_ref_12325"><a href="#prod-LabelledItem">LabelledItem</a></emu-nt> of <var>stmt</var>.</li><li>If <var>item</var> is <emu-grammar><emu-production name="LabelledItem" collapsed="" class=" inline">
<emu-nt><a href="#prod-LabelledItem">LabelledItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="fa7a943c"><emu-nt id="_ref_12326"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> , return <emu-val>true</emu-val>.</li><li>Let <var>subStmt</var> be the <emu-nt id="_ref_12327"><a href="#prod-Statement">Statement</a></emu-nt> of <var>item</var>.</li><li>Return <emu-xref aoid="IsLabelledFunction" id="_ref_3969"><a href="#sec-islabelledfunction">IsLabelledFunction</a></emu-xref>(<var>subStmt</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-labelled-statements-static-semantics-lexicallydeclarednames">
<h1><span class="secnum">13.13.6</span>Static Semantics: LexicallyDeclaredNames</h1>
<emu-see-also-para op="LexicallyDeclaredNames"></emu-see-also-para>
<emu-grammar><emu-production name="LabelledStatement" collapsed="">
<emu-nt><a href="#prod-LabelledStatement">LabelledStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="51b6efb5"><emu-nt id="_ref_12328"><a href="#prod-LabelIdentifier">LabelIdentifier</a></emu-nt><emu-t>:</emu-t><emu-nt id="_ref_12329"><a href="#prod-LabelledItem">LabelledItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the LexicallyDeclaredNames of <emu-nt id="_ref_12330"><a href="#prod-LabelledItem">LabelledItem</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="LabelledItem" collapsed="">
<emu-nt><a href="#prod-LabelledItem">LabelledItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a72ca256"><emu-nt id="_ref_12331"><a href="#prod-Statement">Statement</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_3970"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="LabelledItem" collapsed="">
<emu-nt><a href="#prod-LabelledItem">LabelledItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="fa7a943c"><emu-nt id="_ref_12332"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return BoundNames of <emu-nt id="_ref_12333"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-labelled-statements-static-semantics-lexicallyscopeddeclarations">
<h1><span class="secnum">13.13.7</span>Static Semantics: LexicallyScopedDeclarations</h1>
<emu-see-also-para op="LexicallyScopedDeclarations"></emu-see-also-para>
<emu-grammar><emu-production name="LabelledStatement" collapsed="">
<emu-nt><a href="#prod-LabelledStatement">LabelledStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="51b6efb5"><emu-nt id="_ref_12334"><a href="#prod-LabelIdentifier">LabelIdentifier</a></emu-nt><emu-t>:</emu-t><emu-nt id="_ref_12335"><a href="#prod-LabelledItem">LabelledItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the LexicallyScopedDeclarations of <emu-nt id="_ref_12336"><a href="#prod-LabelledItem">LabelledItem</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="LabelledItem" collapsed="">
<emu-nt><a href="#prod-LabelledItem">LabelledItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a72ca256"><emu-nt id="_ref_12337"><a href="#prod-Statement">Statement</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_3971"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="LabelledItem" collapsed="">
<emu-nt><a href="#prod-LabelledItem">LabelledItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="fa7a943c"><emu-nt id="_ref_12338"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3972"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing <emu-nt id="_ref_12339"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-labelled-statements-static-semantics-toplevellexicallydeclarednames">
<h1><span class="secnum">13.13.8</span>Static Semantics: TopLevelLexicallyDeclaredNames</h1>
<emu-see-also-para op="TopLevelLexicallyDeclaredNames"></emu-see-also-para>
<emu-grammar><emu-production name="LabelledStatement" collapsed="">
<emu-nt><a href="#prod-LabelledStatement">LabelledStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="51b6efb5"><emu-nt id="_ref_12340"><a href="#prod-LabelIdentifier">LabelIdentifier</a></emu-nt><emu-t>:</emu-t><emu-nt id="_ref_12341"><a href="#prod-LabelledItem">LabelledItem</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_3973"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-labelled-statements-static-semantics-toplevellexicallyscopeddeclarations">
<h1><span class="secnum">13.13.9</span>Static Semantics: TopLevelLexicallyScopedDeclarations</h1>
<emu-see-also-para op="TopLevelLexicallyScopedDeclarations"></emu-see-also-para>
<emu-grammar><emu-production name="LabelledStatement" collapsed="">
<emu-nt><a href="#prod-LabelledStatement">LabelledStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="51b6efb5"><emu-nt id="_ref_12342"><a href="#prod-LabelIdentifier">LabelIdentifier</a></emu-nt><emu-t>:</emu-t><emu-nt id="_ref_12343"><a href="#prod-LabelledItem">LabelledItem</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_3974"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-labelled-statements-static-semantics-toplevelvardeclarednames">
<h1><span class="secnum">13.13.10</span>Static Semantics: TopLevelVarDeclaredNames</h1>
<emu-see-also-para op="TopLevelVarDeclaredNames"></emu-see-also-para>
<emu-grammar><emu-production name="LabelledStatement" collapsed="">
<emu-nt><a href="#prod-LabelledStatement">LabelledStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="51b6efb5"><emu-nt id="_ref_12344"><a href="#prod-LabelIdentifier">LabelIdentifier</a></emu-nt><emu-t>:</emu-t><emu-nt id="_ref_12345"><a href="#prod-LabelledItem">LabelledItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the TopLevelVarDeclaredNames of <emu-nt id="_ref_12346"><a href="#prod-LabelledItem">LabelledItem</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="LabelledItem" collapsed="">
<emu-nt><a href="#prod-LabelledItem">LabelledItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a72ca256"><emu-nt id="_ref_12347"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <emu-nt id="_ref_12348"><a href="#prod-Statement">Statement</a></emu-nt> is <emu-grammar><emu-production name="Statement" collapsed="" class=" inline">
<emu-nt><a href="#prod-Statement">Statement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="08827f68"><emu-nt id="_ref_12349"><a href="#prod-LabelledStatement">LabelledStatement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> , return TopLevelVarDeclaredNames of <emu-nt id="_ref_12350"><a href="#prod-Statement">Statement</a></emu-nt>.</li><li>Return VarDeclaredNames of <emu-nt id="_ref_12351"><a href="#prod-Statement">Statement</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="LabelledItem" collapsed="">
<emu-nt><a href="#prod-LabelledItem">LabelledItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="fa7a943c"><emu-nt id="_ref_12352"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return BoundNames of <emu-nt id="_ref_12353"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-labelled-statements-static-semantics-toplevelvarscopeddeclarations">
<h1><span class="secnum">13.13.11</span>Static Semantics: TopLevelVarScopedDeclarations</h1>
<emu-see-also-para op="TopLevelVarScopedDeclarations"></emu-see-also-para>
<emu-grammar><emu-production name="LabelledStatement" collapsed="">
<emu-nt><a href="#prod-LabelledStatement">LabelledStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="51b6efb5"><emu-nt id="_ref_12354"><a href="#prod-LabelIdentifier">LabelIdentifier</a></emu-nt><emu-t>:</emu-t><emu-nt id="_ref_12355"><a href="#prod-LabelledItem">LabelledItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the TopLevelVarScopedDeclarations of <emu-nt id="_ref_12356"><a href="#prod-LabelledItem">LabelledItem</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="LabelledItem" collapsed="">
<emu-nt><a href="#prod-LabelledItem">LabelledItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a72ca256"><emu-nt id="_ref_12357"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <emu-nt id="_ref_12358"><a href="#prod-Statement">Statement</a></emu-nt> is <emu-grammar><emu-production name="Statement" collapsed="" class=" inline">
<emu-nt><a href="#prod-Statement">Statement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="08827f68"><emu-nt id="_ref_12359"><a href="#prod-LabelledStatement">LabelledStatement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> , return TopLevelVarScopedDeclarations of <emu-nt id="_ref_12360"><a href="#prod-Statement">Statement</a></emu-nt>.</li><li>Return VarScopedDeclarations of <emu-nt id="_ref_12361"><a href="#prod-Statement">Statement</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="LabelledItem" collapsed="">
<emu-nt><a href="#prod-LabelledItem">LabelledItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="fa7a943c"><emu-nt id="_ref_12362"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3975"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing <emu-nt id="_ref_12363"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-labelled-statements-static-semantics-vardeclarednames">
<h1><span class="secnum">13.13.12</span>Static Semantics: VarDeclaredNames</h1>
<emu-see-also-para op="VarDeclaredNames"></emu-see-also-para>
<emu-grammar><emu-production name="LabelledStatement" collapsed="">
<emu-nt><a href="#prod-LabelledStatement">LabelledStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="51b6efb5"><emu-nt id="_ref_12364"><a href="#prod-LabelIdentifier">LabelIdentifier</a></emu-nt><emu-t>:</emu-t><emu-nt id="_ref_12365"><a href="#prod-LabelledItem">LabelledItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the VarDeclaredNames of <emu-nt id="_ref_12366"><a href="#prod-LabelledItem">LabelledItem</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="LabelledItem" collapsed="">
<emu-nt><a href="#prod-LabelledItem">LabelledItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="fa7a943c"><emu-nt id="_ref_12367"><a href="#prod-FunctionDeclaration">FunctionDeclaration</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_3976"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-labelled-statements-static-semantics-varscopeddeclarations">
<h1><span class="secnum">13.13.13</span>Static Semantics: VarScopedDeclarations</h1>
<emu-see-also-para op="VarScopedDeclarations"></emu-see-also-para>
<emu-grammar><emu-production name="LabelledStatement" collapsed="">
<emu-nt><a href="#prod-LabelledStatement">LabelledStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="51b6efb5"><emu-nt id="_ref_12368"><a href="#prod-LabelIdentifier">LabelIdentifier</a></emu-nt><emu-t>:</emu-t><emu-nt id="_ref_12369"><a href="#prod-LabelledItem">LabelledItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the VarScopedDeclarations of <emu-nt id="_ref_12370"><a href="#prod-LabelledItem">LabelledItem</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="LabelledItem" collapsed="">
<emu-nt><a href="#prod-LabelledItem">LabelledItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="fa7a943c"><emu-nt id="_ref_12371"><a href="#prod-FunctionDeclaration">FunctionDeclaration</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_3977"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-labelled-statements-runtime-semantics-labelledevaluation">
<h1><span class="secnum">13.13.14</span>Runtime Semantics: LabelledEvaluation</h1>
<p>With parameter <var>labelSet</var>.</p>
<emu-see-also-para op="LabelledEvaluation"></emu-see-also-para>
<emu-grammar><emu-production name="LabelledStatement" collapsed="">
<emu-nt><a href="#prod-LabelledStatement">LabelledStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="51b6efb5"><emu-nt id="_ref_12372"><a href="#prod-LabelIdentifier">LabelIdentifier</a></emu-nt><emu-t>:</emu-t><emu-nt id="_ref_12373"><a href="#prod-LabelledItem">LabelledItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>label</var> be the StringValue of <emu-nt id="_ref_12374"><a href="#prod-LabelIdentifier">LabelIdentifier</a></emu-nt>.</li><li>Append <var>label</var> as an element of <var>labelSet</var>.</li><li>Let <var>stmtResult</var> be LabelledEvaluation of <emu-nt id="_ref_12375"><a href="#prod-LabelledItem">LabelledItem</a></emu-nt> with argument <var>labelSet</var>.</li><li>If <var>stmtResult</var>.[[Type]] is <emu-const>break</emu-const> and <emu-xref aoid="SameValue" id="_ref_3978"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>stmtResult</var>.[[Target]], <var>label</var>) is <emu-val>true</emu-val>, then<ol><li>Set <var>stmtResult</var> to <emu-xref aoid="NormalCompletion" id="_ref_3979"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<var>stmtResult</var>.[[Value]]).</li></ol></li><li>Return <emu-xref aoid="Completion" id="_ref_3980"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>stmtResult</var>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="LabelledItem" collapsed="">
<emu-nt><a href="#prod-LabelledItem">LabelledItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a72ca256"><emu-nt id="_ref_12376"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <emu-nt id="_ref_12377"><a href="#prod-Statement">Statement</a></emu-nt> is either a <emu-nt id="_ref_12378"><a href="#prod-LabelledStatement">LabelledStatement</a></emu-nt> or a <emu-nt id="_ref_12379"><a href="#prod-BreakableStatement">BreakableStatement</a></emu-nt>, then<ol><li>Return LabelledEvaluation of <emu-nt id="_ref_12380"><a href="#prod-Statement">Statement</a></emu-nt> with argument <var>labelSet</var>.</li></ol></li><li>Else,<ol><li>Return the result of evaluating <emu-nt id="_ref_12381"><a href="#prod-Statement">Statement</a></emu-nt>.
</li></ol></li></ol></emu-alg>
<emu-grammar><emu-production name="LabelledItem" collapsed="">
<emu-nt><a href="#prod-LabelledItem">LabelledItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="fa7a943c"><emu-nt id="_ref_12382"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the result of evaluating <emu-nt id="_ref_12383"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-labelled-statements-runtime-semantics-evaluation">
<h1><span class="secnum">13.13.15</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="LabelledStatement" collapsed="">
<emu-nt><a href="#prod-LabelledStatement">LabelledStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="51b6efb5"><emu-nt id="_ref_12384"><a href="#prod-LabelIdentifier">LabelIdentifier</a></emu-nt><emu-t>:</emu-t><emu-nt id="_ref_12385"><a href="#prod-LabelledItem">LabelledItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>newLabelSet</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_3981"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Return LabelledEvaluation of this <emu-nt id="_ref_12386"><a href="#prod-LabelledStatement">LabelledStatement</a></emu-nt> with argument <var>newLabelSet</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-throw-statement">
<h1><span class="secnum">13.14</span>The <code>throw</code> Statement</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="ThrowStatement" params="Yield, Await" id="prod-ThrowStatement">
<emu-nt params="Yield, Await"><a href="#prod-ThrowStatement">ThrowStatement</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="abf0986c"><emu-t>throw</emu-t><emu-gann>[no <emu-nt id="_ref_12387"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-nt params="+In, ?Yield, ?Await" id="_ref_12388"><a href="#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-throw-statement-runtime-semantics-evaluation">
<h1><span class="secnum">13.14.1</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="ThrowStatement" collapsed="">
<emu-nt><a href="#prod-ThrowStatement">ThrowStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="940518e2"><emu-t>throw</emu-t><emu-nt id="_ref_12389"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>exprRef</var> be the result of evaluating <emu-nt id="_ref_12390"><a href="#prod-Expression">Expression</a></emu-nt>.</li><li>Let <var>exprValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_3982"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>exprRef</var>).</li><li>Return <emu-xref aoid="ThrowCompletion" id="_ref_3983"><a href="#sec-throwcompletion">ThrowCompletion</a></emu-xref>(<var>exprValue</var>).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-try-statement">
<h1><span class="secnum">13.15</span>The <code>try</code> Statement</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="TryStatement" params="Yield, Await, Return" id="prod-TryStatement">
<emu-nt params="Yield, Await, Return"><a href="#prod-TryStatement">TryStatement</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1105fb1b"><emu-t>try</emu-t><emu-nt params="?Yield, ?Await, ?Return" id="_ref_12391"><a href="#prod-Block">Block</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt><emu-nt params="?Yield, ?Await, ?Return" id="_ref_12392"><a href="#prod-Catch">Catch</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="032228f5"><emu-t>try</emu-t><emu-nt params="?Yield, ?Await, ?Return" id="_ref_12393"><a href="#prod-Block">Block</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt><emu-nt params="?Yield, ?Await, ?Return" id="_ref_12394"><a href="#prod-Finally">Finally</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="c9f66613"><emu-t>try</emu-t><emu-nt params="?Yield, ?Await, ?Return" id="_ref_12395"><a href="#prod-Block">Block</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt><emu-nt params="?Yield, ?Await, ?Return" id="_ref_12396"><a href="#prod-Catch">Catch</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt><emu-nt params="?Yield, ?Await, ?Return" id="_ref_12397"><a href="#prod-Finally">Finally</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="Catch" params="Yield, Await, Return" id="prod-Catch">
<emu-nt params="Yield, Await, Return"><a href="#prod-Catch">Catch</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="824e8c92"><emu-t>catch</emu-t><emu-t>(</emu-t><emu-nt params="?Yield, ?Await" id="_ref_12398"><a href="#prod-CatchParameter">CatchParameter</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return" id="_ref_12399"><a href="#prod-Block">Block</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="548fd244"><emu-t>catch</emu-t><emu-nt params="?Yield, ?Await, ?Return" id="_ref_12400"><a href="#prod-Block">Block</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="Finally" params="Yield, Await, Return" id="prod-Finally">
<emu-nt params="Yield, Await, Return"><a href="#prod-Finally">Finally</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="7bd00a40"><emu-t>finally</emu-t><emu-nt params="?Yield, ?Await, ?Return" id="_ref_12401"><a href="#prod-Block">Block</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="CatchParameter" params="Yield, Await" id="prod-CatchParameter">
<emu-nt params="Yield, Await"><a href="#prod-CatchParameter">CatchParameter</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="22bf917e"><emu-nt params="?Yield, ?Await" id="_ref_12402"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="9eb89dc1"><emu-nt params="?Yield, ?Await" id="_ref_12403"><a href="#prod-BindingPattern">BindingPattern</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</span><div class="note-contents">
<p>The <code>try</code> statement encloses a block of code in which an exceptional condition can occur, such as a runtime error or a <code>throw</code> statement. The <code>catch</code> clause provides the exception-handling code. When a catch clause catches an exception, its <emu-nt id="_ref_12404"><a href="#prod-CatchParameter">CatchParameter</a></emu-nt> is bound to that exception.</p>
</div></emu-note>
<emu-clause id="sec-try-statement-static-semantics-early-errors">
<h1><span class="secnum">13.15.1</span>Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="Catch" collapsed="">
<emu-nt><a href="#prod-Catch">Catch</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ddc13c36"><emu-t>catch</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12405"><a href="#prod-CatchParameter">CatchParameter</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_12406"><a href="#prod-Block">Block</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if BoundNames of <emu-nt id="_ref_12407"><a href="#prod-CatchParameter">CatchParameter</a></emu-nt> contains any duplicate elements.
</li>
<li>
It is a Syntax Error if any element of the BoundNames of <emu-nt id="_ref_12408"><a href="#prod-CatchParameter">CatchParameter</a></emu-nt> also occurs in the LexicallyDeclaredNames of <emu-nt id="_ref_12409"><a href="#prod-Block">Block</a></emu-nt>.
</li>
<li>
It is a Syntax Error if any element of the BoundNames of <emu-nt id="_ref_12410"><a href="#prod-CatchParameter">CatchParameter</a></emu-nt> also occurs in the VarDeclaredNames of <emu-nt id="_ref_12411"><a href="#prod-Block">Block</a></emu-nt>.
</li>
</ul>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>An alternative <emu-xref href="#sec-static-semantic-rules" id="_ref_3984"><a href="#sec-static-semantic-rules">static semantics</a></emu-xref> for this production is given in <emu-xref href="#sec-variablestatements-in-catch-blocks" id="_ref_352"><a href="#sec-variablestatements-in-catch-blocks">B.3.5</a></emu-xref>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-try-statement-static-semantics-containsduplicatelabels">
<h1><span class="secnum">13.15.2</span>Static Semantics: ContainsDuplicateLabels</h1>
<p>With parameter <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsDuplicateLabels"></emu-see-also-para>
<emu-grammar><emu-production name="TryStatement" collapsed="">
<emu-nt><a href="#prod-TryStatement">TryStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a8714e57"><emu-t>try</emu-t><emu-nt id="_ref_12412"><a href="#prod-Block">Block</a></emu-nt><emu-nt id="_ref_12413"><a href="#prod-Catch">Catch</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>hasDuplicates</var> be ContainsDuplicateLabels of <emu-nt id="_ref_12414"><a href="#prod-Block">Block</a></emu-nt> with argument <var>labelSet</var>.</li><li>If <var>hasDuplicates</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return ContainsDuplicateLabels of <emu-nt id="_ref_12415"><a href="#prod-Catch">Catch</a></emu-nt> with argument <var>labelSet</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="TryStatement" collapsed="">
<emu-nt><a href="#prod-TryStatement">TryStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5ec68ab9"><emu-t>try</emu-t><emu-nt id="_ref_12416"><a href="#prod-Block">Block</a></emu-nt><emu-nt id="_ref_12417"><a href="#prod-Finally">Finally</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>hasDuplicates</var> be ContainsDuplicateLabels of <emu-nt id="_ref_12418"><a href="#prod-Block">Block</a></emu-nt> with argument <var>labelSet</var>.</li><li>If <var>hasDuplicates</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return ContainsDuplicateLabels of <emu-nt id="_ref_12419"><a href="#prod-Finally">Finally</a></emu-nt> with argument <var>labelSet</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="TryStatement" collapsed="">
<emu-nt><a href="#prod-TryStatement">TryStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1b19737c"><emu-t>try</emu-t><emu-nt id="_ref_12420"><a href="#prod-Block">Block</a></emu-nt><emu-nt id="_ref_12421"><a href="#prod-Catch">Catch</a></emu-nt><emu-nt id="_ref_12422"><a href="#prod-Finally">Finally</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>hasDuplicates</var> be ContainsDuplicateLabels of <emu-nt id="_ref_12423"><a href="#prod-Block">Block</a></emu-nt> with argument <var>labelSet</var>.</li><li>If <var>hasDuplicates</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Let <var>hasDuplicates</var> be ContainsDuplicateLabels of <emu-nt id="_ref_12424"><a href="#prod-Catch">Catch</a></emu-nt> with argument <var>labelSet</var>.</li><li>If <var>hasDuplicates</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return ContainsDuplicateLabels of <emu-nt id="_ref_12425"><a href="#prod-Finally">Finally</a></emu-nt> with argument <var>labelSet</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="Catch" collapsed="">
<emu-nt><a href="#prod-Catch">Catch</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ddc13c36"><emu-t>catch</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12426"><a href="#prod-CatchParameter">CatchParameter</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_12427"><a href="#prod-Block">Block</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ContainsDuplicateLabels of <emu-nt id="_ref_12428"><a href="#prod-Block">Block</a></emu-nt> with argument <var>labelSet</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-try-statement-static-semantics-containsundefinedbreaktarget">
<h1><span class="secnum">13.15.3</span>Static Semantics: ContainsUndefinedBreakTarget</h1>
<p>With parameter <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsUndefinedBreakTarget"></emu-see-also-para>
<emu-grammar><emu-production name="TryStatement" collapsed="">
<emu-nt><a href="#prod-TryStatement">TryStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a8714e57"><emu-t>try</emu-t><emu-nt id="_ref_12429"><a href="#prod-Block">Block</a></emu-nt><emu-nt id="_ref_12430"><a href="#prod-Catch">Catch</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>hasUndefinedLabels</var> be ContainsUndefinedBreakTarget of <emu-nt id="_ref_12431"><a href="#prod-Block">Block</a></emu-nt> with argument <var>labelSet</var>.</li><li>If <var>hasUndefinedLabels</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return ContainsUndefinedBreakTarget of <emu-nt id="_ref_12432"><a href="#prod-Catch">Catch</a></emu-nt> with argument <var>labelSet</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="TryStatement" collapsed="">
<emu-nt><a href="#prod-TryStatement">TryStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5ec68ab9"><emu-t>try</emu-t><emu-nt id="_ref_12433"><a href="#prod-Block">Block</a></emu-nt><emu-nt id="_ref_12434"><a href="#prod-Finally">Finally</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>hasUndefinedLabels</var> be ContainsUndefinedBreakTarget of <emu-nt id="_ref_12435"><a href="#prod-Block">Block</a></emu-nt> with argument <var>labelSet</var>.</li><li>If <var>hasUndefinedLabels</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return ContainsUndefinedBreakTarget of <emu-nt id="_ref_12436"><a href="#prod-Finally">Finally</a></emu-nt> with argument <var>labelSet</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="TryStatement" collapsed="">
<emu-nt><a href="#prod-TryStatement">TryStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1b19737c"><emu-t>try</emu-t><emu-nt id="_ref_12437"><a href="#prod-Block">Block</a></emu-nt><emu-nt id="_ref_12438"><a href="#prod-Catch">Catch</a></emu-nt><emu-nt id="_ref_12439"><a href="#prod-Finally">Finally</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>hasUndefinedLabels</var> be ContainsUndefinedBreakTarget of <emu-nt id="_ref_12440"><a href="#prod-Block">Block</a></emu-nt> with argument <var>labelSet</var>.</li><li>If <var>hasUndefinedLabels</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Let <var>hasUndefinedLabels</var> be ContainsUndefinedBreakTarget of <emu-nt id="_ref_12441"><a href="#prod-Catch">Catch</a></emu-nt> with argument <var>labelSet</var>.</li><li>If <var>hasUndefinedLabels</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return ContainsUndefinedBreakTarget of <emu-nt id="_ref_12442"><a href="#prod-Finally">Finally</a></emu-nt> with argument <var>labelSet</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="Catch" collapsed="">
<emu-nt><a href="#prod-Catch">Catch</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ddc13c36"><emu-t>catch</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12443"><a href="#prod-CatchParameter">CatchParameter</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_12444"><a href="#prod-Block">Block</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ContainsUndefinedBreakTarget of <emu-nt id="_ref_12445"><a href="#prod-Block">Block</a></emu-nt> with argument <var>labelSet</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-try-statement-static-semantics-containsundefinedcontinuetarget">
<h1><span class="secnum">13.15.4</span>Static Semantics: ContainsUndefinedContinueTarget</h1>
<p>With parameters <var>iterationSet</var> and <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsUndefinedContinueTarget"></emu-see-also-para>
<emu-grammar><emu-production name="TryStatement" collapsed="">
<emu-nt><a href="#prod-TryStatement">TryStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a8714e57"><emu-t>try</emu-t><emu-nt id="_ref_12446"><a href="#prod-Block">Block</a></emu-nt><emu-nt id="_ref_12447"><a href="#prod-Catch">Catch</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>hasUndefinedLabels</var> be ContainsUndefinedContinueTarget of <emu-nt id="_ref_12448"><a href="#prod-Block">Block</a></emu-nt> with arguments <var>iterationSet</var> and « ».</li><li>If <var>hasUndefinedLabels</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return ContainsUndefinedContinueTarget of <emu-nt id="_ref_12449"><a href="#prod-Catch">Catch</a></emu-nt> with arguments <var>iterationSet</var> and « ».
</li></ol></emu-alg>
<emu-grammar><emu-production name="TryStatement" collapsed="">
<emu-nt><a href="#prod-TryStatement">TryStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5ec68ab9"><emu-t>try</emu-t><emu-nt id="_ref_12450"><a href="#prod-Block">Block</a></emu-nt><emu-nt id="_ref_12451"><a href="#prod-Finally">Finally</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>hasUndefinedLabels</var> be ContainsUndefinedContinueTarget of <emu-nt id="_ref_12452"><a href="#prod-Block">Block</a></emu-nt> with arguments <var>iterationSet</var> and « ».</li><li>If <var>hasUndefinedLabels</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return ContainsUndefinedContinueTarget of <emu-nt id="_ref_12453"><a href="#prod-Finally">Finally</a></emu-nt> with arguments <var>iterationSet</var> and « ».
</li></ol></emu-alg>
<emu-grammar><emu-production name="TryStatement" collapsed="">
<emu-nt><a href="#prod-TryStatement">TryStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1b19737c"><emu-t>try</emu-t><emu-nt id="_ref_12454"><a href="#prod-Block">Block</a></emu-nt><emu-nt id="_ref_12455"><a href="#prod-Catch">Catch</a></emu-nt><emu-nt id="_ref_12456"><a href="#prod-Finally">Finally</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>hasUndefinedLabels</var> be ContainsUndefinedContinueTarget of <emu-nt id="_ref_12457"><a href="#prod-Block">Block</a></emu-nt> with arguments <var>iterationSet</var> and « ».</li><li>If <var>hasUndefinedLabels</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Let <var>hasUndefinedLabels</var> be ContainsUndefinedContinueTarget of <emu-nt id="_ref_12458"><a href="#prod-Catch">Catch</a></emu-nt> with arguments <var>iterationSet</var> and « ».</li><li>If <var>hasUndefinedLabels</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return ContainsUndefinedContinueTarget of <emu-nt id="_ref_12459"><a href="#prod-Finally">Finally</a></emu-nt> with arguments <var>iterationSet</var> and « ».
</li></ol></emu-alg>
<emu-grammar><emu-production name="Catch" collapsed="">
<emu-nt><a href="#prod-Catch">Catch</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ddc13c36"><emu-t>catch</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12460"><a href="#prod-CatchParameter">CatchParameter</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_12461"><a href="#prod-Block">Block</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ContainsUndefinedContinueTarget of <emu-nt id="_ref_12462"><a href="#prod-Block">Block</a></emu-nt> with arguments <var>iterationSet</var> and « ».
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-try-statement-static-semantics-vardeclarednames">
<h1><span class="secnum">13.15.5</span>Static Semantics: VarDeclaredNames</h1>
<emu-see-also-para op="VarDeclaredNames"></emu-see-also-para>
<emu-grammar><emu-production name="TryStatement" collapsed="">
<emu-nt><a href="#prod-TryStatement">TryStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a8714e57"><emu-t>try</emu-t><emu-nt id="_ref_12463"><a href="#prod-Block">Block</a></emu-nt><emu-nt id="_ref_12464"><a href="#prod-Catch">Catch</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>names</var> be VarDeclaredNames of <emu-nt id="_ref_12465"><a href="#prod-Block">Block</a></emu-nt>.</li><li>Append to <var>names</var> the elements of the VarDeclaredNames of <emu-nt id="_ref_12466"><a href="#prod-Catch">Catch</a></emu-nt>.</li><li>Return <var>names</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="TryStatement" collapsed="">
<emu-nt><a href="#prod-TryStatement">TryStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5ec68ab9"><emu-t>try</emu-t><emu-nt id="_ref_12467"><a href="#prod-Block">Block</a></emu-nt><emu-nt id="_ref_12468"><a href="#prod-Finally">Finally</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>names</var> be VarDeclaredNames of <emu-nt id="_ref_12469"><a href="#prod-Block">Block</a></emu-nt>.</li><li>Append to <var>names</var> the elements of the VarDeclaredNames of <emu-nt id="_ref_12470"><a href="#prod-Finally">Finally</a></emu-nt>.</li><li>Return <var>names</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="TryStatement" collapsed="">
<emu-nt><a href="#prod-TryStatement">TryStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1b19737c"><emu-t>try</emu-t><emu-nt id="_ref_12471"><a href="#prod-Block">Block</a></emu-nt><emu-nt id="_ref_12472"><a href="#prod-Catch">Catch</a></emu-nt><emu-nt id="_ref_12473"><a href="#prod-Finally">Finally</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>names</var> be VarDeclaredNames of <emu-nt id="_ref_12474"><a href="#prod-Block">Block</a></emu-nt>.</li><li>Append to <var>names</var> the elements of the VarDeclaredNames of <emu-nt id="_ref_12475"><a href="#prod-Catch">Catch</a></emu-nt>.</li><li>Append to <var>names</var> the elements of the VarDeclaredNames of <emu-nt id="_ref_12476"><a href="#prod-Finally">Finally</a></emu-nt>.</li><li>Return <var>names</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="Catch" collapsed="">
<emu-nt><a href="#prod-Catch">Catch</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ddc13c36"><emu-t>catch</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12477"><a href="#prod-CatchParameter">CatchParameter</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_12478"><a href="#prod-Block">Block</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the VarDeclaredNames of <emu-nt id="_ref_12479"><a href="#prod-Block">Block</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-try-statement-static-semantics-varscopeddeclarations">
<h1><span class="secnum">13.15.6</span>Static Semantics: VarScopedDeclarations</h1>
<emu-see-also-para op="VarScopedDeclarations"></emu-see-also-para>
<emu-grammar><emu-production name="TryStatement" collapsed="">
<emu-nt><a href="#prod-TryStatement">TryStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a8714e57"><emu-t>try</emu-t><emu-nt id="_ref_12480"><a href="#prod-Block">Block</a></emu-nt><emu-nt id="_ref_12481"><a href="#prod-Catch">Catch</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>declarations</var> be VarScopedDeclarations of <emu-nt id="_ref_12482"><a href="#prod-Block">Block</a></emu-nt>.</li><li>Append to <var>declarations</var> the elements of the VarScopedDeclarations of <emu-nt id="_ref_12483"><a href="#prod-Catch">Catch</a></emu-nt>.</li><li>Return <var>declarations</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="TryStatement" collapsed="">
<emu-nt><a href="#prod-TryStatement">TryStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5ec68ab9"><emu-t>try</emu-t><emu-nt id="_ref_12484"><a href="#prod-Block">Block</a></emu-nt><emu-nt id="_ref_12485"><a href="#prod-Finally">Finally</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>declarations</var> be VarScopedDeclarations of <emu-nt id="_ref_12486"><a href="#prod-Block">Block</a></emu-nt>.</li><li>Append to <var>declarations</var> the elements of the VarScopedDeclarations of <emu-nt id="_ref_12487"><a href="#prod-Finally">Finally</a></emu-nt>.</li><li>Return <var>declarations</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="TryStatement" collapsed="">
<emu-nt><a href="#prod-TryStatement">TryStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1b19737c"><emu-t>try</emu-t><emu-nt id="_ref_12488"><a href="#prod-Block">Block</a></emu-nt><emu-nt id="_ref_12489"><a href="#prod-Catch">Catch</a></emu-nt><emu-nt id="_ref_12490"><a href="#prod-Finally">Finally</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>declarations</var> be VarScopedDeclarations of <emu-nt id="_ref_12491"><a href="#prod-Block">Block</a></emu-nt>.</li><li>Append to <var>declarations</var> the elements of the VarScopedDeclarations of <emu-nt id="_ref_12492"><a href="#prod-Catch">Catch</a></emu-nt>.</li><li>Append to <var>declarations</var> the elements of the VarScopedDeclarations of <emu-nt id="_ref_12493"><a href="#prod-Finally">Finally</a></emu-nt>.</li><li>Return <var>declarations</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="Catch" collapsed="">
<emu-nt><a href="#prod-Catch">Catch</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ddc13c36"><emu-t>catch</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12494"><a href="#prod-CatchParameter">CatchParameter</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_12495"><a href="#prod-Block">Block</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the VarScopedDeclarations of <emu-nt id="_ref_12496"><a href="#prod-Block">Block</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-runtime-semantics-catchclauseevaluation">
<h1><span class="secnum">13.15.7</span>Runtime Semantics: CatchClauseEvaluation</h1>
<p>With parameter <var>thrownValue</var>.</p>
<emu-grammar><emu-production name="Catch" collapsed="">
<emu-nt><a href="#prod-Catch">Catch</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ddc13c36"><emu-t>catch</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12497"><a href="#prod-CatchParameter">CatchParameter</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_12498"><a href="#prod-Block">Block</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>oldEnv</var> be the <emu-xref href="#running-execution-context" id="_ref_3985"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment.</li><li>Let <var>catchEnv</var> be <emu-xref aoid="NewDeclarativeEnvironment" id="_ref_3986"><a href="#sec-newdeclarativeenvironment">NewDeclarativeEnvironment</a></emu-xref>(<var>oldEnv</var>).</li><li>Let <var>catchEnvRec</var> be <var>catchEnv</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_3987"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref>.</li><li>For each element <var>argName</var> of the BoundNames of <emu-nt id="_ref_12499"><a href="#prod-CatchParameter">CatchParameter</a></emu-nt>, do<ol><li>Perform ! <var>catchEnvRec</var>.CreateMutableBinding(<var>argName</var>, <emu-val>false</emu-val>).</li></ol></li><li>Set the <emu-xref href="#running-execution-context" id="_ref_3988"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment to <var>catchEnv</var>.</li><li>Let <var>status</var> be the result of performing BindingInitialization for <emu-nt id="_ref_12500"><a href="#prod-CatchParameter">CatchParameter</a></emu-nt> passing <var>thrownValue</var> and <var>catchEnv</var> as arguments.</li><li>If <var>status</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_3989"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, then<ol><li>Set the <emu-xref href="#running-execution-context" id="_ref_3990"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment to <var>oldEnv</var>.</li><li>Return <emu-xref aoid="Completion" id="_ref_3991"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>status</var>).</li></ol></li><li>Let <var>B</var> be the result of evaluating <emu-nt id="_ref_12501"><a href="#prod-Block">Block</a></emu-nt>.</li><li>Set the <emu-xref href="#running-execution-context" id="_ref_3992"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment to <var>oldEnv</var>.</li><li>Return <emu-xref aoid="Completion" id="_ref_3993"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>B</var>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="Catch" collapsed="">
<emu-nt><a href="#prod-Catch">Catch</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a18a7645"><emu-t>catch</emu-t><emu-nt id="_ref_12502"><a href="#prod-Block">Block</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the result of evaluating <emu-nt id="_ref_12503"><a href="#prod-Block">Block</a></emu-nt>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>No matter how control leaves the <emu-nt id="_ref_12504"><a href="#prod-Block">Block</a></emu-nt> the LexicalEnvironment is always restored to its former state.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-try-statement-runtime-semantics-evaluation">
<h1><span class="secnum">13.15.8</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="TryStatement" collapsed="">
<emu-nt><a href="#prod-TryStatement">TryStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a8714e57"><emu-t>try</emu-t><emu-nt id="_ref_12505"><a href="#prod-Block">Block</a></emu-nt><emu-nt id="_ref_12506"><a href="#prod-Catch">Catch</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>B</var> be the result of evaluating <emu-nt id="_ref_12507"><a href="#prod-Block">Block</a></emu-nt>.</li><li>If <var>B</var>.[[Type]] is <emu-const>throw</emu-const>, let <var>C</var> be CatchClauseEvaluation of <emu-nt id="_ref_12508"><a href="#prod-Catch">Catch</a></emu-nt> with argument <var>B</var>.[[Value]].</li><li>Else, let <var>C</var> be <var>B</var>.</li><li>Return <emu-xref aoid="Completion" id="_ref_3994"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<emu-xref aoid="UpdateEmpty" id="_ref_3995"><a href="#sec-updateempty">UpdateEmpty</a></emu-xref>(<var>C</var>, <emu-val>undefined</emu-val>)).
</li></ol></emu-alg>
<emu-grammar><emu-production name="TryStatement" collapsed="">
<emu-nt><a href="#prod-TryStatement">TryStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5ec68ab9"><emu-t>try</emu-t><emu-nt id="_ref_12509"><a href="#prod-Block">Block</a></emu-nt><emu-nt id="_ref_12510"><a href="#prod-Finally">Finally</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>B</var> be the result of evaluating <emu-nt id="_ref_12511"><a href="#prod-Block">Block</a></emu-nt>.</li><li>Let <var>F</var> be the result of evaluating <emu-nt id="_ref_12512"><a href="#prod-Finally">Finally</a></emu-nt>.</li><li>If <var>F</var>.[[Type]] is <emu-const>normal</emu-const>, set <var>F</var> to <var>B</var>.</li><li>Return <emu-xref aoid="Completion" id="_ref_3996"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<emu-xref aoid="UpdateEmpty" id="_ref_3997"><a href="#sec-updateempty">UpdateEmpty</a></emu-xref>(<var>F</var>, <emu-val>undefined</emu-val>)).
</li></ol></emu-alg>
<emu-grammar><emu-production name="TryStatement" collapsed="">
<emu-nt><a href="#prod-TryStatement">TryStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1b19737c"><emu-t>try</emu-t><emu-nt id="_ref_12513"><a href="#prod-Block">Block</a></emu-nt><emu-nt id="_ref_12514"><a href="#prod-Catch">Catch</a></emu-nt><emu-nt id="_ref_12515"><a href="#prod-Finally">Finally</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>B</var> be the result of evaluating <emu-nt id="_ref_12516"><a href="#prod-Block">Block</a></emu-nt>.</li><li>If <var>B</var>.[[Type]] is <emu-const>throw</emu-const>, let <var>C</var> be CatchClauseEvaluation of <emu-nt id="_ref_12517"><a href="#prod-Catch">Catch</a></emu-nt> with argument <var>B</var>.[[Value]].</li><li>Else, let <var>C</var> be <var>B</var>.</li><li>Let <var>F</var> be the result of evaluating <emu-nt id="_ref_12518"><a href="#prod-Finally">Finally</a></emu-nt>.</li><li>If <var>F</var>.[[Type]] is <emu-const>normal</emu-const>, set <var>F</var> to <var>C</var>.</li><li>Return <emu-xref aoid="Completion" id="_ref_3998"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<emu-xref aoid="UpdateEmpty" id="_ref_3999"><a href="#sec-updateempty">UpdateEmpty</a></emu-xref>(<var>F</var>, <emu-val>undefined</emu-val>)).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-debugger-statement">
<h1><span class="secnum">13.16</span>The <code>debugger</code> Statement</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="DebuggerStatement" id="prod-DebuggerStatement">
<emu-nt><a href="#prod-DebuggerStatement">DebuggerStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="352e6172"><emu-t>debugger</emu-t><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-clause id="sec-debugger-statement-runtime-semantics-evaluation">
<h1><span class="secnum">13.16.1</span>Runtime Semantics: Evaluation</h1>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Evaluating a <emu-nt id="_ref_12519"><a href="#prod-DebuggerStatement">DebuggerStatement</a></emu-nt>
may allow an implementation to cause a breakpoint when run under a
debugger. If a debugger is not present or active this statement has no
observable effect.</p>
</div></emu-note>
<emu-grammar><emu-production name="DebuggerStatement" collapsed="">
<emu-nt><a href="#prod-DebuggerStatement">DebuggerStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="352e6172"><emu-t>debugger</emu-t><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If an implementation-defined debugging facility is available and enabled, then<ol><li>Perform an implementation-defined debugging action.</li><li>Let <var>result</var> be an implementation-defined <emu-xref aoid="Completion" id="_ref_4000"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref> value.</li></ol></li><li>Else,<ol><li>Let <var>result</var> be <emu-xref aoid="NormalCompletion" id="_ref_4001"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).</li></ol></li><li>Return <var>result</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-ecmascript-language-functions-and-classes">
<h1><span class="secnum">14</span>ECMAScript Language: Functions and Classes</h1>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Various ECMAScript language elements cause the creation of ECMAScript function objects (<emu-xref href="#sec-ecmascript-function-objects" id="_ref_353"><a href="#sec-ecmascript-function-objects">9.2</a></emu-xref>). Evaluation of such functions starts with the execution of their [[Call]] internal method (<emu-xref href="#sec-ecmascript-function-objects-call-thisargument-argumentslist" id="_ref_354"><a href="#sec-ecmascript-function-objects-call-thisargument-argumentslist">9.2.1</a></emu-xref>).</p>
</div></emu-note>
<emu-clause id="sec-function-definitions">
<h1><span class="secnum">14.1</span>Function Definitions</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="FunctionDeclaration" params="Yield, Await, Default" id="prod-FunctionDeclaration">
<emu-nt params="Yield, Await, Default"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a><emu-mods><emu-params>[Yield, Await, Default]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="7c02f6b3"><emu-t>function</emu-t><emu-nt params="?Yield, ?Await" id="_ref_12520"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>(</emu-t><emu-nt params="~Yield, ~Await" id="_ref_12521"><a href="#prod-FormalParameters">FormalParameters</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt params="~Yield, ~Await" id="_ref_12522"><a href="#prod-FunctionBody">FunctionBody</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params></emu-mods></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="ff05b860" constraints="+Default"><emu-constraints>[+Default]</emu-constraints><emu-t>function</emu-t><emu-t>(</emu-t><emu-nt params="~Yield, ~Await" id="_ref_12523"><a href="#prod-FormalParameters">FormalParameters</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt params="~Yield, ~Await" id="_ref_12524"><a href="#prod-FunctionBody">FunctionBody</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params></emu-mods></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="FunctionExpression" id="prod-FunctionExpression">
<emu-nt><a href="#prod-FunctionExpression">FunctionExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1faafdcc"><emu-t>function</emu-t><emu-nt params="~Yield, ~Await" optional="" id="_ref_12525"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>(</emu-t><emu-nt params="~Yield, ~Await" id="_ref_12526"><a href="#prod-FormalParameters">FormalParameters</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt params="~Yield, ~Await" id="_ref_12527"><a href="#prod-FunctionBody">FunctionBody</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params></emu-mods></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="UniqueFormalParameters" params="Yield, Await" id="prod-UniqueFormalParameters">
<emu-nt params="Yield, Await"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="900b794a"><emu-nt params="?Yield, ?Await" id="_ref_12528"><a href="#prod-FormalParameters">FormalParameters</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="FormalParameters" params="Yield, Await" id="prod-FormalParameters">
<emu-nt params="Yield, Await"><a href="#prod-FormalParameters">FormalParameters</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></emu-rhs>
<emu-rhs a="c52f7805"><emu-nt params="?Yield, ?Await" id="_ref_12529"><a href="#prod-FunctionRestParameter">FunctionRestParameter</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="e5fdd15f"><emu-nt params="?Yield, ?Await" id="_ref_12530"><a href="#prod-FormalParameterList">FormalParameterList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="58349494"><emu-nt params="?Yield, ?Await" id="_ref_12531"><a href="#prod-FormalParameterList">FormalParameterList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>,</emu-t></emu-rhs>
<emu-rhs a="607f4086"><emu-nt params="?Yield, ?Await" id="_ref_12532"><a href="#prod-FormalParameterList">FormalParameterList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>,</emu-t><emu-nt params="?Yield, ?Await" id="_ref_12533"><a href="#prod-FunctionRestParameter">FunctionRestParameter</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="FormalParameterList" params="Yield, Await" id="prod-FormalParameterList">
<emu-nt params="Yield, Await"><a href="#prod-FormalParameterList">FormalParameterList</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="dd0854fb"><emu-nt params="?Yield, ?Await" id="_ref_12534"><a href="#prod-FormalParameter">FormalParameter</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="30b35c7e"><emu-nt params="?Yield, ?Await" id="_ref_12535"><a href="#prod-FormalParameterList">FormalParameterList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>,</emu-t><emu-nt params="?Yield, ?Await" id="_ref_12536"><a href="#prod-FormalParameter">FormalParameter</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="FunctionRestParameter" params="Yield, Await" id="prod-FunctionRestParameter">
<emu-nt params="Yield, Await"><a href="#prod-FunctionRestParameter">FunctionRestParameter</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="216da14c"><emu-nt params="?Yield, ?Await" id="_ref_12537"><a href="#prod-BindingRestElement">BindingRestElement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="FormalParameter" params="Yield, Await" id="prod-FormalParameter">
<emu-nt params="Yield, Await"><a href="#prod-FormalParameter">FormalParameter</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c6930e11"><emu-nt params="?Yield, ?Await" id="_ref_12538"><a href="#prod-BindingElement">BindingElement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="FunctionBody" params="Yield, Await" id="prod-FunctionBody">
<emu-nt params="Yield, Await"><a href="#prod-FunctionBody">FunctionBody</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="82527203"><emu-nt params="?Yield, ?Await" id="_ref_12539"><a href="#prod-FunctionStatementList">FunctionStatementList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="FunctionStatementList" params="Yield, Await" id="prod-FunctionStatementList">
<emu-nt params="Yield, Await"><a href="#prod-FunctionStatementList">FunctionStatementList</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="2267baf8"><emu-nt params="?Yield, ?Await, +Return" optional="" id="_ref_12540"><a href="#prod-StatementList">StatementList</a><emu-mods><emu-params>[?Yield, ?Await, +Return]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-clause id="sec-directive-prologues-and-the-use-strict-directive">
<h1><span class="secnum">14.1.1</span>Directive Prologues and the Use Strict Directive</h1>
<p>A <dfn id="directive-prologue">Directive Prologue</dfn> is the longest sequence of <emu-nt id="_ref_12541"><a href="#prod-ExpressionStatement">ExpressionStatement</a></emu-nt>s occurring as the initial <emu-nt id="_ref_12542"><a href="#prod-StatementListItem">StatementListItem</a></emu-nt>s or <emu-nt id="_ref_12543"><a href="#prod-ModuleItem">ModuleItem</a></emu-nt>s of a <emu-nt id="_ref_12544"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt>, a <emu-nt id="_ref_12545"><a href="#prod-ScriptBody">ScriptBody</a></emu-nt>, or a <emu-nt id="_ref_12546"><a href="#prod-ModuleBody">ModuleBody</a></emu-nt> and where each <emu-nt id="_ref_12547"><a href="#prod-ExpressionStatement">ExpressionStatement</a></emu-nt> in the sequence consists entirely of a <emu-nt id="_ref_12548"><a href="#prod-StringLiteral">StringLiteral</a></emu-nt> token followed by a semicolon. The semicolon may appear explicitly or may be inserted by automatic semicolon insertion. A <emu-xref href="#directive-prologue" id="_ref_4002"><a href="#directive-prologue">Directive Prologue</a></emu-xref> may be an empty sequence.</p>
<p>A <dfn id="use-strict-directive">Use Strict Directive</dfn> is an <emu-nt id="_ref_12549"><a href="#prod-ExpressionStatement">ExpressionStatement</a></emu-nt> in a <emu-xref href="#directive-prologue" id="_ref_4003"><a href="#directive-prologue">Directive Prologue</a></emu-xref> whose <emu-nt id="_ref_12550"><a href="#prod-StringLiteral">StringLiteral</a></emu-nt> is either the exact code unit sequences <code>"use strict"</code> or <code>'use strict'</code>. A <emu-xref href="#use-strict-directive" id="_ref_4004"><a href="#use-strict-directive">Use Strict Directive</a></emu-xref> may not contain an <emu-nt id="_ref_12551"><a href="#prod-EscapeSequence">EscapeSequence</a></emu-nt> or <emu-nt id="_ref_12552"><a href="#prod-LineContinuation">LineContinuation</a></emu-nt>.</p>
<p>A <emu-xref href="#directive-prologue" id="_ref_4005"><a href="#directive-prologue">Directive Prologue</a></emu-xref> may contain more than one <emu-xref href="#use-strict-directive" id="_ref_4006"><a href="#use-strict-directive">Use Strict Directive</a></emu-xref>. However, an implementation may issue a warning if this occurs.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <emu-nt id="_ref_12553"><a href="#prod-ExpressionStatement">ExpressionStatement</a></emu-nt>s of a <emu-xref href="#directive-prologue" id="_ref_4007"><a href="#directive-prologue">Directive Prologue</a></emu-xref>
are evaluated normally during evaluation of the containing production.
Implementations may define implementation specific meanings for <emu-nt id="_ref_12554"><a href="#prod-ExpressionStatement">ExpressionStatement</a></emu-nt>s which are not a <emu-xref href="#use-strict-directive" id="_ref_4008"><a href="#use-strict-directive">Use Strict Directive</a></emu-xref> and which occur in a <emu-xref href="#directive-prologue" id="_ref_4009"><a href="#directive-prologue">Directive Prologue</a></emu-xref>. If an appropriate notification mechanism exists, an implementation should issue a warning if it encounters in a <emu-xref href="#directive-prologue" id="_ref_4010"><a href="#directive-prologue">Directive Prologue</a></emu-xref> an <emu-nt id="_ref_12555"><a href="#prod-ExpressionStatement">ExpressionStatement</a></emu-nt> that is not a <emu-xref href="#use-strict-directive" id="_ref_4011"><a href="#use-strict-directive">Use Strict Directive</a></emu-xref> and which does not have a meaning defined by the implementation.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-function-definitions-static-semantics-early-errors">
<h1><span class="secnum">14.1.2</span>Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="FunctionDeclaration" collapsed="">
<emu-nt><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81739a57"><emu-t>function</emu-t><emu-nt id="_ref_12556"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_12557"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12558"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="FunctionDeclaration" collapsed="">
<emu-nt><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b26bacea"><emu-t>function</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12559"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12560"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="FunctionExpression" collapsed="">
<emu-nt><a href="#prod-FunctionExpression">FunctionExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8379937e"><emu-t>function</emu-t><emu-nt optional="" id="_ref_12561"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_12562"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12563"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
If the source code matching this production is <emu-xref href="#sec-strict-mode-code" id="_ref_4012"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, the Early Error rules for <emu-grammar><emu-production name="UniqueFormalParameters" collapsed="" class=" inline">
<emu-nt><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0218c6f5"><emu-nt id="_ref_12564"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> are applied.
</li>
<li>
If the source code matching this production is <emu-xref href="#sec-strict-mode-code" id="_ref_4013"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, it is a Syntax Error if <emu-nt id="_ref_12565"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt> is present and the StringValue of <emu-nt id="_ref_12566"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt> is <code>"eval"</code> or <code>"arguments"</code>.
</li>
<li>
It is a Syntax Error if ContainsUseStrict of <emu-nt id="_ref_12567"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt> is <emu-val>true</emu-val> and IsSimpleParameterList of <emu-nt id="_ref_12568"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt> is <emu-val>false</emu-val>.
</li>
<li>
It is a Syntax Error if any element of the BoundNames of <emu-nt id="_ref_12569"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt> also occurs in the LexicallyDeclaredNames of <emu-nt id="_ref_12570"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt>.
</li>
<li>
It is a Syntax Error if <emu-nt id="_ref_12571"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt> Contains <emu-nt id="_ref_12572"><a href="#prod-SuperProperty">SuperProperty</a></emu-nt> is <emu-val>true</emu-val>.
</li>
<li>
It is a Syntax Error if <emu-nt id="_ref_12573"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt> Contains <emu-nt id="_ref_12574"><a href="#prod-SuperProperty">SuperProperty</a></emu-nt> is <emu-val>true</emu-val>.
</li>
<li>
It is a Syntax Error if <emu-nt id="_ref_12575"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt> Contains <emu-nt id="_ref_12576"><a href="#prod-SuperCall">SuperCall</a></emu-nt> is <emu-val>true</emu-val>.
</li>
<li>
It is a Syntax Error if <emu-nt id="_ref_12577"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt> Contains <emu-nt id="_ref_12578"><a href="#prod-SuperCall">SuperCall</a></emu-nt> is <emu-val>true</emu-val>.
</li>
</ul>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>The LexicallyDeclaredNames of a <emu-nt id="_ref_12579"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt> does not include identifiers bound using var or function declarations.</p>
</div></emu-note>
<emu-grammar><emu-production name="UniqueFormalParameters" collapsed="">
<emu-nt><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0218c6f5"><emu-nt id="_ref_12580"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if BoundNames of <emu-nt id="_ref_12581"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt> contains any duplicate elements.
</li>
</ul>
<emu-grammar><emu-production name="FormalParameters" collapsed="">
<emu-nt><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="32e3c3aa"><emu-nt id="_ref_12582"><a href="#prod-FormalParameterList">FormalParameterList</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if IsSimpleParameterList of <emu-nt id="_ref_12583"><a href="#prod-FormalParameterList">FormalParameterList</a></emu-nt> is <emu-val>false</emu-val> and BoundNames of <emu-nt id="_ref_12584"><a href="#prod-FormalParameterList">FormalParameterList</a></emu-nt> contains any duplicate elements.
</li>
</ul>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>Multiple occurrences of the same <emu-nt id="_ref_12585"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt> in a <emu-nt id="_ref_12586"><a href="#prod-FormalParameterList">FormalParameterList</a></emu-nt> is only allowed for functions which have simple parameter lists and which are not defined in <emu-xref href="#sec-strict-mode-code" id="_ref_4014"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>.</p>
</div></emu-note>
<emu-grammar><emu-production name="FunctionBody" collapsed="">
<emu-nt><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5cdf1a9f"><emu-nt id="_ref_12587"><a href="#prod-FunctionStatementList">FunctionStatementList</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if the LexicallyDeclaredNames of <emu-nt id="_ref_12588"><a href="#prod-FunctionStatementList">FunctionStatementList</a></emu-nt> contains any duplicate entries.
</li>
<li>
It is a Syntax Error if any element of the LexicallyDeclaredNames of <emu-nt id="_ref_12589"><a href="#prod-FunctionStatementList">FunctionStatementList</a></emu-nt> also occurs in the VarDeclaredNames of <emu-nt id="_ref_12590"><a href="#prod-FunctionStatementList">FunctionStatementList</a></emu-nt>.
</li>
<li>
It is a Syntax Error if ContainsDuplicateLabels of <emu-nt id="_ref_12591"><a href="#prod-FunctionStatementList">FunctionStatementList</a></emu-nt> with argument « » is <emu-val>true</emu-val>.
</li>
<li>
It is a Syntax Error if ContainsUndefinedBreakTarget of <emu-nt id="_ref_12592"><a href="#prod-FunctionStatementList">FunctionStatementList</a></emu-nt> with argument « » is <emu-val>true</emu-val>.
</li>
<li>
It is a Syntax Error if ContainsUndefinedContinueTarget of <emu-nt id="_ref_12593"><a href="#prod-FunctionStatementList">FunctionStatementList</a></emu-nt> with arguments « » and « » is <emu-val>true</emu-val>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-function-definitions-static-semantics-boundnames">
<h1><span class="secnum">14.1.3</span>Static Semantics: BoundNames</h1>
<emu-see-also-para op="BoundNames"></emu-see-also-para>
<emu-grammar><emu-production name="FunctionDeclaration" collapsed="">
<emu-nt><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81739a57"><emu-t>function</emu-t><emu-nt id="_ref_12594"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_12595"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12596"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the BoundNames of <emu-nt id="_ref_12597"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="FunctionDeclaration" collapsed="">
<emu-nt><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b26bacea"><emu-t>function</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12598"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12599"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return « <code>"*default*"</code> ».
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p><code>"*default*"</code> is used within this specification as
a synthetic name for hoistable anonymous functions that are defined
using export declarations.</p>
</div></emu-note>
<emu-grammar><emu-production name="FormalParameters" collapsed="">
<emu-nt><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></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_4015"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="FormalParameters" collapsed="">
<emu-nt><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b9079b6b"><emu-nt id="_ref_12600"><a href="#prod-FormalParameterList">FormalParameterList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_12601"><a href="#prod-FunctionRestParameter">FunctionRestParameter</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>names</var> be BoundNames of <emu-nt id="_ref_12602"><a href="#prod-FormalParameterList">FormalParameterList</a></emu-nt>.</li><li>Append to <var>names</var> the BoundNames of <emu-nt id="_ref_12603"><a href="#prod-FunctionRestParameter">FunctionRestParameter</a></emu-nt>.</li><li>Return <var>names</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="FormalParameterList" collapsed="">
<emu-nt><a href="#prod-FormalParameterList">FormalParameterList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="209ae310"><emu-nt id="_ref_12604"><a href="#prod-FormalParameterList">FormalParameterList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_12605"><a href="#prod-FormalParameter">FormalParameter</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>names</var> be BoundNames of <emu-nt id="_ref_12606"><a href="#prod-FormalParameterList">FormalParameterList</a></emu-nt>.</li><li>Append to <var>names</var> the BoundNames of <emu-nt id="_ref_12607"><a href="#prod-FormalParameter">FormalParameter</a></emu-nt>.</li><li>Return <var>names</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-function-definitions-static-semantics-contains">
<h1><span class="secnum">14.1.4</span>Static Semantics: Contains</h1>
<p>With parameter <var>symbol</var>.</p>
<emu-see-also-para op="Contains"></emu-see-also-para>
<emu-grammar><emu-production name="FunctionDeclaration" collapsed="">
<emu-nt><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81739a57"><emu-t>function</emu-t><emu-nt id="_ref_12608"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_12609"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12610"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="FunctionDeclaration" collapsed="">
<emu-nt><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b26bacea"><emu-t>function</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12611"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12612"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="FunctionExpression" collapsed="">
<emu-nt><a href="#prod-FunctionExpression">FunctionExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8379937e"><emu-t>function</emu-t><emu-nt optional="" id="_ref_12613"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_12614"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12615"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Static semantic rules that depend upon substructure generally do not look into function definitions.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-function-definitions-static-semantics-containsexpression">
<h1><span class="secnum">14.1.5</span>Static Semantics: ContainsExpression</h1>
<emu-see-also-para op="ContainsExpression"></emu-see-also-para>
<emu-grammar><emu-production name="FormalParameters" collapsed="">
<emu-nt><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></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="FormalParameters" collapsed="">
<emu-nt><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b9079b6b"><emu-nt id="_ref_12616"><a href="#prod-FormalParameterList">FormalParameterList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_12617"><a href="#prod-FunctionRestParameter">FunctionRestParameter</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If ContainsExpression of <emu-nt id="_ref_12618"><a href="#prod-FormalParameterList">FormalParameterList</a></emu-nt> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return ContainsExpression of <emu-nt id="_ref_12619"><a href="#prod-FunctionRestParameter">FunctionRestParameter</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="FormalParameterList" collapsed="">
<emu-nt><a href="#prod-FormalParameterList">FormalParameterList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="209ae310"><emu-nt id="_ref_12620"><a href="#prod-FormalParameterList">FormalParameterList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_12621"><a href="#prod-FormalParameter">FormalParameter</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If ContainsExpression of <emu-nt id="_ref_12622"><a href="#prod-FormalParameterList">FormalParameterList</a></emu-nt> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return ContainsExpression of <emu-nt id="_ref_12623"><a href="#prod-FormalParameter">FormalParameter</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-function-definitions-static-semantics-containsusestrict">
<h1><span class="secnum">14.1.6</span>Static Semantics: ContainsUseStrict</h1>
<emu-see-also-para op="ContainsUseStrict"></emu-see-also-para>
<emu-grammar><emu-production name="FunctionBody" collapsed="">
<emu-nt><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5cdf1a9f"><emu-nt id="_ref_12624"><a href="#prod-FunctionStatementList">FunctionStatementList</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If the <emu-xref href="#directive-prologue" id="_ref_4016"><a href="#directive-prologue">Directive Prologue</a></emu-xref> of <emu-nt id="_ref_12625"><a href="#prod-FunctionStatementList">FunctionStatementList</a></emu-nt> contains a <emu-xref href="#use-strict-directive" id="_ref_4017"><a href="#use-strict-directive">Use Strict Directive</a></emu-xref>, return <emu-val>true</emu-val>; otherwise, return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-function-definitions-static-semantics-expectedargumentcount">
<h1><span class="secnum">14.1.7</span>Static Semantics: ExpectedArgumentCount</h1>
<emu-see-also-para op="ExpectedArgumentCount"></emu-see-also-para>
<emu-grammar><emu-production name="FormalParameters" collapsed="">
<emu-nt><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return 0.
</li></ol></emu-alg>
<emu-grammar><emu-production name="FormalParameters" collapsed="">
<emu-nt><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b9079b6b"><emu-nt id="_ref_12626"><a href="#prod-FormalParameterList">FormalParameterList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_12627"><a href="#prod-FunctionRestParameter">FunctionRestParameter</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ExpectedArgumentCount of <emu-nt id="_ref_12628"><a href="#prod-FormalParameterList">FormalParameterList</a></emu-nt>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The ExpectedArgumentCount of a <emu-nt id="_ref_12629"><a href="#prod-FormalParameterList">FormalParameterList</a></emu-nt> is the number of <emu-nt id="_ref_12630"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt> to the left of either the rest parameter or the first <emu-nt id="_ref_12631"><a href="#prod-FormalParameter">FormalParameter</a></emu-nt> with an Initializer. A <emu-nt id="_ref_12632"><a href="#prod-FormalParameter">FormalParameter</a></emu-nt>
without an initializer is allowed after the first parameter with an
initializer but such parameters are considered to be optional with <emu-val>undefined</emu-val> as their default value.</p>
</div></emu-note>
<emu-grammar><emu-production name="FormalParameterList" collapsed="">
<emu-nt><a href="#prod-FormalParameterList">FormalParameterList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="209ae310"><emu-nt id="_ref_12633"><a href="#prod-FormalParameterList">FormalParameterList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_12634"><a href="#prod-FormalParameter">FormalParameter</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>count</var> be ExpectedArgumentCount of <emu-nt id="_ref_12635"><a href="#prod-FormalParameterList">FormalParameterList</a></emu-nt>.</li><li>If HasInitializer of <emu-nt id="_ref_12636"><a href="#prod-FormalParameterList">FormalParameterList</a></emu-nt> is <emu-val>true</emu-val> or HasInitializer of <emu-nt id="_ref_12637"><a href="#prod-FormalParameter">FormalParameter</a></emu-nt> is <emu-val>true</emu-val>, return <var>count</var>.</li><li>Return <var>count</var> + 1.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-function-definitions-static-semantics-hasinitializer">
<h1><span class="secnum">14.1.8</span>Static Semantics: HasInitializer</h1>
<emu-see-also-para op="HasInitializer"></emu-see-also-para>
<emu-grammar><emu-production name="FormalParameterList" collapsed="">
<emu-nt><a href="#prod-FormalParameterList">FormalParameterList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="209ae310"><emu-nt id="_ref_12638"><a href="#prod-FormalParameterList">FormalParameterList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_12639"><a href="#prod-FormalParameter">FormalParameter</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If HasInitializer of <emu-nt id="_ref_12640"><a href="#prod-FormalParameterList">FormalParameterList</a></emu-nt> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return HasInitializer of <emu-nt id="_ref_12641"><a href="#prod-FormalParameter">FormalParameter</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-function-definitions-static-semantics-hasname">
<h1><span class="secnum">14.1.9</span>Static Semantics: HasName</h1>
<emu-see-also-para op="HasName"></emu-see-also-para>
<emu-grammar><emu-production name="FunctionExpression" collapsed="">
<emu-nt><a href="#prod-FunctionExpression">FunctionExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b26bacea"><emu-t>function</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12642"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12643"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></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="FunctionExpression" collapsed="">
<emu-nt><a href="#prod-FunctionExpression">FunctionExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81739a57"><emu-t>function</emu-t><emu-nt id="_ref_12644"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_12645"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12646"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></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-isanonymousfunctiondefinition" aoid="IsAnonymousFunctionDefinition">
<h1><span class="secnum">14.1.10</span>Static Semantics: IsAnonymousFunctionDefinition ( <var>expr</var> )</h1>
<p>The abstract operation IsAnonymousFunctionDefinition determines
if its argument is a function definition that does not bind a name. The
argument <var>expr</var> is the result of parsing an <emu-nt id="_ref_12647"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt> or <emu-nt id="_ref_12648"><a href="#prod-Initializer">Initializer</a></emu-nt>. The following steps are taken:</p>
<emu-alg><ol><li>If IsFunctionDefinition of <var>expr</var> is <emu-val>false</emu-val>, return <emu-val>false</emu-val>.</li><li>Let <var>hasName</var> be the result of HasName of <var>expr</var>.</li><li>If <var>hasName</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 id="sec-function-definitions-static-semantics-isconstantdeclaration">
<h1><span class="secnum">14.1.11</span>Static Semantics: IsConstantDeclaration</h1>
<emu-see-also-para op="IsConstantDeclaration"></emu-see-also-para>
<emu-grammar><emu-production name="FunctionDeclaration" collapsed="">
<emu-nt><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81739a57"><emu-t>function</emu-t><emu-nt id="_ref_12649"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_12650"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12651"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="FunctionDeclaration" collapsed="">
<emu-nt><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b26bacea"><emu-t>function</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12652"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12653"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-function-definitions-static-semantics-isfunctiondefinition">
<h1><span class="secnum">14.1.12</span>Static Semantics: IsFunctionDefinition</h1>
<emu-see-also-para op="IsFunctionDefinition"></emu-see-also-para>
<emu-grammar><emu-production name="FunctionExpression" collapsed="">
<emu-nt><a href="#prod-FunctionExpression">FunctionExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8379937e"><emu-t>function</emu-t><emu-nt optional="" id="_ref_12654"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_12655"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12656"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></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-function-definitions-static-semantics-issimpleparameterlist">
<h1><span class="secnum">14.1.13</span>Static Semantics: IsSimpleParameterList</h1>
<emu-see-also-para op="IsSimpleParameterList"></emu-see-also-para>
<emu-grammar><emu-production name="FormalParameters" collapsed="">
<emu-nt><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="FormalParameters" collapsed="">
<emu-nt><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b9079b6b"><emu-nt id="_ref_12657"><a href="#prod-FormalParameterList">FormalParameterList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_12658"><a href="#prod-FunctionRestParameter">FunctionRestParameter</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="FormalParameterList" collapsed="">
<emu-nt><a href="#prod-FormalParameterList">FormalParameterList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="209ae310"><emu-nt id="_ref_12659"><a href="#prod-FormalParameterList">FormalParameterList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_12660"><a href="#prod-FormalParameter">FormalParameter</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If IsSimpleParameterList of <emu-nt id="_ref_12661"><a href="#prod-FormalParameterList">FormalParameterList</a></emu-nt> is <emu-val>false</emu-val>, return <emu-val>false</emu-val>.</li><li>Return IsSimpleParameterList of <emu-nt id="_ref_12662"><a href="#prod-FormalParameter">FormalParameter</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="FormalParameter" collapsed="">
<emu-nt><a href="#prod-FormalParameter">FormalParameter</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="03366b31"><emu-nt id="_ref_12663"><a href="#prod-BindingElement">BindingElement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return IsSimpleParameterList of <emu-nt id="_ref_12664"><a href="#prod-BindingElement">BindingElement</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-function-definitions-static-semantics-lexicallydeclarednames">
<h1><span class="secnum">14.1.14</span>Static Semantics: LexicallyDeclaredNames</h1>
<emu-see-also-para op="LexicallyDeclaredNames"></emu-see-also-para>
<emu-grammar><emu-production name="FunctionStatementList" collapsed="">
<emu-nt><a href="#prod-FunctionStatementList">FunctionStatementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></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_4018"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="FunctionStatementList" collapsed="">
<emu-nt><a href="#prod-FunctionStatementList">FunctionStatementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cf403a0c"><emu-nt id="_ref_12665"><a href="#prod-StatementList">StatementList</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return TopLevelLexicallyDeclaredNames of <emu-nt id="_ref_12666"><a href="#prod-StatementList">StatementList</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-function-definitions-static-semantics-lexicallyscopeddeclarations">
<h1><span class="secnum">14.1.15</span>Static Semantics: LexicallyScopedDeclarations</h1>
<emu-see-also-para op="LexicallyScopedDeclarations"></emu-see-also-para>
<emu-grammar><emu-production name="FunctionStatementList" collapsed="">
<emu-nt><a href="#prod-FunctionStatementList">FunctionStatementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></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_4019"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="FunctionStatementList" collapsed="">
<emu-nt><a href="#prod-FunctionStatementList">FunctionStatementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cf403a0c"><emu-nt id="_ref_12667"><a href="#prod-StatementList">StatementList</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the TopLevelLexicallyScopedDeclarations of <emu-nt id="_ref_12668"><a href="#prod-StatementList">StatementList</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-function-definitions-static-semantics-vardeclarednames">
<h1><span class="secnum">14.1.16</span>Static Semantics: VarDeclaredNames</h1>
<emu-see-also-para op="VarDeclaredNames"></emu-see-also-para>
<emu-grammar><emu-production name="FunctionStatementList" collapsed="">
<emu-nt><a href="#prod-FunctionStatementList">FunctionStatementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></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_4020"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="FunctionStatementList" collapsed="">
<emu-nt><a href="#prod-FunctionStatementList">FunctionStatementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cf403a0c"><emu-nt id="_ref_12669"><a href="#prod-StatementList">StatementList</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return TopLevelVarDeclaredNames of <emu-nt id="_ref_12670"><a href="#prod-StatementList">StatementList</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-function-definitions-static-semantics-varscopeddeclarations">
<h1><span class="secnum">14.1.17</span>Static Semantics: VarScopedDeclarations</h1>
<emu-see-also-para op="VarScopedDeclarations"></emu-see-also-para>
<emu-grammar><emu-production name="FunctionStatementList" collapsed="">
<emu-nt><a href="#prod-FunctionStatementList">FunctionStatementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></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_4021"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="FunctionStatementList" collapsed="">
<emu-nt><a href="#prod-FunctionStatementList">FunctionStatementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cf403a0c"><emu-nt id="_ref_12671"><a href="#prod-StatementList">StatementList</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the TopLevelVarScopedDeclarations of <emu-nt id="_ref_12672"><a href="#prod-StatementList">StatementList</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-function-definitions-runtime-semantics-evaluatebody">
<h1><span class="secnum">14.1.18</span>Runtime Semantics: EvaluateBody</h1>
<p>With parameters <var>functionObject</var> and <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4022"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> <var>argumentsList</var>.</p>
<emu-see-also-para op="EvaluateBody"></emu-see-also-para>
<emu-grammar><emu-production name="FunctionBody" collapsed="">
<emu-nt><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5cdf1a9f"><emu-nt id="_ref_12673"><a href="#prod-FunctionStatementList">FunctionStatementList</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Perform ?&nbsp;<emu-xref aoid="FunctionDeclarationInstantiation" id="_ref_4023"><a href="#sec-functiondeclarationinstantiation">FunctionDeclarationInstantiation</a></emu-xref>(<var>functionObject</var>, <var>argumentsList</var>).</li><li>Return the result of evaluating <emu-nt id="_ref_12674"><a href="#prod-FunctionStatementList">FunctionStatementList</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-function-definitions-runtime-semantics-iteratorbindinginitialization">
<h1><span class="secnum">14.1.19</span>Runtime Semantics: IteratorBindingInitialization</h1>
<p>With parameters <var>iteratorRecord</var> and <var>environment</var>.</p>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>When <emu-val>undefined</emu-val> is passed for <var>environment</var> it indicates that a <emu-xref aoid="PutValue" id="_ref_4024"><a href="#sec-putvalue">PutValue</a></emu-xref>
operation should be used to assign the initialization value. This is
the case for formal parameter lists of non-strict functions. In that
case the formal parameter bindings are preinitialized in order to deal
with the possibility of multiple parameters with the same name.</p>
</div></emu-note>
<emu-see-also-para op="IteratorBindingInitialization"></emu-see-also-para>
<emu-grammar><emu-production name="FormalParameters" collapsed="">
<emu-nt><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-xref aoid="NormalCompletion" id="_ref_4025"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="FormalParameters" collapsed="">
<emu-nt><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b9079b6b"><emu-nt id="_ref_12675"><a href="#prod-FormalParameterList">FormalParameterList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_12676"><a href="#prod-FunctionRestParameter">FunctionRestParameter</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Perform ? IteratorBindingInitialization for <emu-nt id="_ref_12677"><a href="#prod-FormalParameterList">FormalParameterList</a></emu-nt> using <var>iteratorRecord</var> and <var>environment</var> as the arguments.</li><li>Return the result of performing IteratorBindingInitialization for <emu-nt id="_ref_12678"><a href="#prod-FunctionRestParameter">FunctionRestParameter</a></emu-nt> using <var>iteratorRecord</var> and <var>environment</var> as the arguments.
</li></ol></emu-alg>
<emu-grammar><emu-production name="FormalParameterList" collapsed="">
<emu-nt><a href="#prod-FormalParameterList">FormalParameterList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="209ae310"><emu-nt id="_ref_12679"><a href="#prod-FormalParameterList">FormalParameterList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_12680"><a href="#prod-FormalParameter">FormalParameter</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Perform ? IteratorBindingInitialization for <emu-nt id="_ref_12681"><a href="#prod-FormalParameterList">FormalParameterList</a></emu-nt> using <var>iteratorRecord</var> and <var>environment</var> as the arguments.</li><li>Return the result of performing IteratorBindingInitialization for <emu-nt id="_ref_12682"><a href="#prod-FormalParameter">FormalParameter</a></emu-nt> using <var>iteratorRecord</var> and <var>environment</var> as the arguments.
</li></ol></emu-alg>
<emu-grammar><emu-production name="FormalParameter" collapsed="">
<emu-nt><a href="#prod-FormalParameter">FormalParameter</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="03366b31"><emu-nt id="_ref_12683"><a href="#prod-BindingElement">BindingElement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If ContainsExpression of <emu-nt id="_ref_12684"><a href="#prod-BindingElement">BindingElement</a></emu-nt> is <emu-val>false</emu-val>, return the result of performing IteratorBindingInitialization for <emu-nt id="_ref_12685"><a href="#prod-BindingElement">BindingElement</a></emu-nt> using <var>iteratorRecord</var> and <var>environment</var> as the arguments.</li><li>Let <var>currentContext</var> be the <emu-xref href="#running-execution-context" id="_ref_4026"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Let <var>originalEnv</var> be the VariableEnvironment of <var>currentContext</var>.</li><li><emu-xref href="#assert" id="_ref_4027"><a href="#assert">Assert</a></emu-xref>: The VariableEnvironment and LexicalEnvironment of <var>currentContext</var> are the same.</li><li><emu-xref href="#assert" id="_ref_4028"><a href="#assert">Assert</a></emu-xref>: <var>environment</var> and <var>originalEnv</var> are the same.</li><li>Let <var>paramVarEnv</var> be <emu-xref aoid="NewDeclarativeEnvironment" id="_ref_4029"><a href="#sec-newdeclarativeenvironment">NewDeclarativeEnvironment</a></emu-xref>(<var>originalEnv</var>).</li><li>Set the VariableEnvironment of <var>currentContext</var> to <var>paramVarEnv</var>.</li><li>Set the LexicalEnvironment of <var>currentContext</var> to <var>paramVarEnv</var>.</li><li>Let <var>result</var> be the result of performing IteratorBindingInitialization for <emu-nt id="_ref_12686"><a href="#prod-BindingElement">BindingElement</a></emu-nt> using <var>iteratorRecord</var> and <var>environment</var> as the arguments.</li><li>Set the VariableEnvironment of <var>currentContext</var> to <var>originalEnv</var>.</li><li>Set the LexicalEnvironment of <var>currentContext</var> to <var>originalEnv</var>.</li><li>Return <var>result</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The new <emu-xref href="#sec-environment-records" id="_ref_4030"><a href="#sec-environment-records">Environment Record</a></emu-xref> created in step 6 is only used if the <emu-nt id="_ref_12687"><a href="#prod-BindingElement">BindingElement</a></emu-nt> contains a <emu-xref href="#sec-function-calls-runtime-semantics-evaluation" id="_ref_4031"><a href="#sec-function-calls-runtime-semantics-evaluation">direct eval</a></emu-xref>.</p>
</div></emu-note>
<emu-grammar><emu-production name="FunctionRestParameter" collapsed="">
<emu-nt><a href="#prod-FunctionRestParameter">FunctionRestParameter</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c70de561"><emu-nt id="_ref_12688"><a href="#prod-BindingRestElement">BindingRestElement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If ContainsExpression of <emu-nt id="_ref_12689"><a href="#prod-BindingRestElement">BindingRestElement</a></emu-nt> is <emu-val>false</emu-val>, return the result of performing IteratorBindingInitialization for <emu-nt id="_ref_12690"><a href="#prod-BindingRestElement">BindingRestElement</a></emu-nt> using <var>iteratorRecord</var> and <var>environment</var> as the arguments.</li><li>Let <var>currentContext</var> be the <emu-xref href="#running-execution-context" id="_ref_4032"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Let <var>originalEnv</var> be the VariableEnvironment of <var>currentContext</var>.</li><li><emu-xref href="#assert" id="_ref_4033"><a href="#assert">Assert</a></emu-xref>: The VariableEnvironment and LexicalEnvironment of <var>currentContext</var> are the same.</li><li><emu-xref href="#assert" id="_ref_4034"><a href="#assert">Assert</a></emu-xref>: <var>environment</var> and <var>originalEnv</var> are the same.</li><li>Let <var>paramVarEnv</var> be <emu-xref aoid="NewDeclarativeEnvironment" id="_ref_4035"><a href="#sec-newdeclarativeenvironment">NewDeclarativeEnvironment</a></emu-xref>(<var>originalEnv</var>).</li><li>Set the VariableEnvironment of <var>currentContext</var> to <var>paramVarEnv</var>.</li><li>Set the LexicalEnvironment of <var>currentContext</var> to <var>paramVarEnv</var>.</li><li>Let <var>result</var> be the result of performing IteratorBindingInitialization for <emu-nt id="_ref_12691"><a href="#prod-BindingRestElement">BindingRestElement</a></emu-nt> using <var>iteratorRecord</var> and <var>environment</var> as the arguments.</li><li>Set the VariableEnvironment of <var>currentContext</var> to <var>originalEnv</var>.</li><li>Set the LexicalEnvironment of <var>currentContext</var> to <var>originalEnv</var>.</li><li>Return <var>result</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 3</span><div class="note-contents">
<p>The new <emu-xref href="#sec-environment-records" id="_ref_4036"><a href="#sec-environment-records">Environment Record</a></emu-xref> created in step 6 is only used if the <emu-nt id="_ref_12692"><a href="#prod-BindingRestElement">BindingRestElement</a></emu-nt> contains a <emu-xref href="#sec-function-calls-runtime-semantics-evaluation" id="_ref_4037"><a href="#sec-function-calls-runtime-semantics-evaluation">direct eval</a></emu-xref>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-function-definitions-runtime-semantics-instantiatefunctionobject">
<h1><span class="secnum">14.1.20</span>Runtime Semantics: InstantiateFunctionObject</h1>
<p>With parameter <var>scope</var>.</p>
<emu-see-also-para op="InstantiateFunctionObject"></emu-see-also-para>
<emu-grammar><emu-production name="FunctionDeclaration" collapsed="">
<emu-nt><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81739a57"><emu-t>function</emu-t><emu-nt id="_ref_12693"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_12694"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12695"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If the function code for <emu-nt id="_ref_12696"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt> is <emu-xref href="#sec-strict-mode-code" id="_ref_4038"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, let <var>strict</var> be <emu-val>true</emu-val>. Otherwise let <var>strict</var> be <emu-val>false</emu-val>.</li><li>Let <var>name</var> be StringValue of <emu-nt id="_ref_12697"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt>.</li><li>Let <var>F</var> be <emu-xref aoid="FunctionCreate" id="_ref_4039"><a href="#sec-functioncreate">FunctionCreate</a></emu-xref>(<emu-const>Normal</emu-const>, <emu-nt id="_ref_12698"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt>, <emu-nt id="_ref_12699"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt>, <var>scope</var>, <var>strict</var>).</li><li>Perform <emu-xref aoid="MakeConstructor" id="_ref_4040"><a href="#sec-makeconstructor">MakeConstructor</a></emu-xref>(<var>F</var>).</li><li>Perform <emu-xref aoid="SetFunctionName" id="_ref_4041"><a href="#sec-setfunctionname">SetFunctionName</a></emu-xref>(<var>F</var>, <var>name</var>).</li><li>Set <var>F</var>.[[SourceText]] to the source text matched by <emu-nt id="_ref_12700"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>.</li><li>Return <var>F</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="FunctionDeclaration" collapsed="">
<emu-nt><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b26bacea"><emu-t>function</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12701"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12702"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>F</var> be <emu-xref aoid="FunctionCreate" id="_ref_4042"><a href="#sec-functioncreate">FunctionCreate</a></emu-xref>(<emu-const>Normal</emu-const>, <emu-nt id="_ref_12703"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt>, <emu-nt id="_ref_12704"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt>, <var>scope</var>, <emu-val>true</emu-val>).</li><li>Perform <emu-xref aoid="MakeConstructor" id="_ref_4043"><a href="#sec-makeconstructor">MakeConstructor</a></emu-xref>(<var>F</var>).</li><li>Perform <emu-xref aoid="SetFunctionName" id="_ref_4044"><a href="#sec-setfunctionname">SetFunctionName</a></emu-xref>(<var>F</var>, <code>"default"</code>).</li><li>Set <var>F</var>.[[SourceText]] to the source text matched by <emu-nt id="_ref_12705"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>.</li><li>Return <var>F</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>An anonymous <emu-nt id="_ref_12706"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt> can only occur as part of an <code>export default</code> declaration, and its function code is therefore always <emu-xref href="#sec-strict-mode-code" id="_ref_4045"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-function-definitions-runtime-semantics-namedevaluation">
<h1><span class="secnum">14.1.21</span>Runtime Semantics: NamedEvaluation</h1>
<p>With parameter <var>name</var>.</p>
<emu-grammar><emu-production name="FunctionExpression" collapsed="">
<emu-nt><a href="#prod-FunctionExpression">FunctionExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b26bacea"><emu-t>function</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12707"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12708"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>closure</var> be the result of evaluating this <emu-nt id="_ref_12709"><a href="#prod-FunctionExpression">FunctionExpression</a></emu-nt>.</li><li>Perform <emu-xref aoid="SetFunctionName" id="_ref_4046"><a href="#sec-setfunctionname">SetFunctionName</a></emu-xref>(<var>closure</var>, <var>name</var>).</li><li>Return <var>closure</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-function-definitions-runtime-semantics-evaluation">
<h1><span class="secnum">14.1.22</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="FunctionDeclaration" collapsed="">
<emu-nt><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81739a57"><emu-t>function</emu-t><emu-nt id="_ref_12710"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_12711"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12712"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-xref aoid="NormalCompletion" id="_ref_4047"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>An alternative semantics is provided in <emu-xref href="#sec-block-level-function-declarations-web-legacy-compatibility-semantics" id="_ref_355"><a href="#sec-block-level-function-declarations-web-legacy-compatibility-semantics">B.3.3</a></emu-xref>.</p>
</div></emu-note>
<emu-grammar><emu-production name="FunctionDeclaration" collapsed="">
<emu-nt><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b26bacea"><emu-t>function</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12713"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12714"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-xref aoid="NormalCompletion" id="_ref_4048"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="FunctionExpression" collapsed="">
<emu-nt><a href="#prod-FunctionExpression">FunctionExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b26bacea"><emu-t>function</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12715"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12716"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If the function code for <emu-nt id="_ref_12717"><a href="#prod-FunctionExpression">FunctionExpression</a></emu-nt> is <emu-xref href="#sec-strict-mode-code" id="_ref_4049"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, let <var>strict</var> be <emu-val>true</emu-val>. Otherwise let <var>strict</var> be <emu-val>false</emu-val>.</li><li>Let <var>scope</var> be the LexicalEnvironment of the <emu-xref href="#running-execution-context" id="_ref_4050"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Let <var>closure</var> be <emu-xref aoid="FunctionCreate" id="_ref_4051"><a href="#sec-functioncreate">FunctionCreate</a></emu-xref>(<emu-const>Normal</emu-const>, <emu-nt id="_ref_12718"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt>, <emu-nt id="_ref_12719"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt>, <var>scope</var>, <var>strict</var>).</li><li>Perform <emu-xref aoid="MakeConstructor" id="_ref_4052"><a href="#sec-makeconstructor">MakeConstructor</a></emu-xref>(<var>closure</var>).</li><li>Set <var>closure</var>.[[SourceText]] to the source text matched by <emu-nt id="_ref_12720"><a href="#prod-FunctionExpression">FunctionExpression</a></emu-nt>.</li><li>Return <var>closure</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="FunctionExpression" collapsed="">
<emu-nt><a href="#prod-FunctionExpression">FunctionExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81739a57"><emu-t>function</emu-t><emu-nt id="_ref_12721"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_12722"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12723"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If the function code for <emu-nt id="_ref_12724"><a href="#prod-FunctionExpression">FunctionExpression</a></emu-nt> is <emu-xref href="#sec-strict-mode-code" id="_ref_4053"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, let <var>strict</var> be <emu-val>true</emu-val>. Otherwise let <var>strict</var> be <emu-val>false</emu-val>.</li><li>Let <var>scope</var> be the <emu-xref href="#running-execution-context" id="_ref_4054"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment.</li><li>Let <var>funcEnv</var> be <emu-xref aoid="NewDeclarativeEnvironment" id="_ref_4055"><a href="#sec-newdeclarativeenvironment">NewDeclarativeEnvironment</a></emu-xref>(<var>scope</var>).</li><li>Let <var>envRec</var> be <var>funcEnv</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_4056"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref>.</li><li>Let <var>name</var> be StringValue of <emu-nt id="_ref_12725"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt>.</li><li>Perform <var>envRec</var>.CreateImmutableBinding(<var>name</var>, <emu-val>false</emu-val>).</li><li>Let <var>closure</var> be <emu-xref aoid="FunctionCreate" id="_ref_4057"><a href="#sec-functioncreate">FunctionCreate</a></emu-xref>(<emu-const>Normal</emu-const>, <emu-nt id="_ref_12726"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt>, <emu-nt id="_ref_12727"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt>, <var>funcEnv</var>, <var>strict</var>).</li><li>Perform <emu-xref aoid="MakeConstructor" id="_ref_4058"><a href="#sec-makeconstructor">MakeConstructor</a></emu-xref>(<var>closure</var>).</li><li>Perform <emu-xref aoid="SetFunctionName" id="_ref_4059"><a href="#sec-setfunctionname">SetFunctionName</a></emu-xref>(<var>closure</var>, <var>name</var>).</li><li>Set <var>closure</var>.[[SourceText]] to the source text matched by <emu-nt id="_ref_12728"><a href="#prod-FunctionExpression">FunctionExpression</a></emu-nt>.</li><li>Perform <var>envRec</var>.InitializeBinding(<var>name</var>, <var>closure</var>).</li><li>Return <var>closure</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <emu-nt id="_ref_12729"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt> in a <emu-nt id="_ref_12730"><a href="#prod-FunctionExpression">FunctionExpression</a></emu-nt> can be referenced from inside the <emu-nt id="_ref_12731"><a href="#prod-FunctionExpression">FunctionExpression</a></emu-nt>'s <emu-nt id="_ref_12732"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt> to allow the function to call itself recursively. However, unlike in a <emu-nt id="_ref_12733"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>, the <emu-nt id="_ref_12734"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt> in a <emu-nt id="_ref_12735"><a href="#prod-FunctionExpression">FunctionExpression</a></emu-nt> cannot be referenced from and does not affect the scope enclosing the <emu-nt id="_ref_12736"><a href="#prod-FunctionExpression">FunctionExpression</a></emu-nt>.</p>
</div></emu-note>
<emu-note><span class="note">Note 3</span><div class="note-contents">
<p>A <code>prototype</code> property is automatically created for every function defined using a <emu-nt id="_ref_12737"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt> or <emu-nt id="_ref_12738"><a href="#prod-FunctionExpression">FunctionExpression</a></emu-nt>, to allow for the possibility that the function will be used as a <emu-xref href="#constructor" id="_ref_4060"><a href="#constructor">constructor</a></emu-xref>.</p>
</div></emu-note>
<emu-grammar><emu-production name="FunctionStatementList" collapsed="">
<emu-nt><a href="#prod-FunctionStatementList">FunctionStatementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-xref aoid="NormalCompletion" id="_ref_4061"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-val>undefined</emu-val>).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-arrow-function-definitions">
<h1><span class="secnum">14.2</span>Arrow Function Definitions</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="ArrowFunction" params="In, Yield, Await" id="prod-ArrowFunction">
<emu-nt params="In, Yield, Await"><a href="#prod-ArrowFunction">ArrowFunction</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="bdca54b2"><emu-nt params="?Yield, ?Await" id="_ref_12739"><a href="#prod-ArrowParameters">ArrowParameters</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-gann>[no <emu-nt id="_ref_12740"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-t>=&gt;</emu-t><emu-nt params="?In" id="_ref_12741"><a href="#prod-ConciseBody">ConciseBody</a><emu-mods><emu-params>[?In]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ArrowParameters" params="Yield, Await" id="prod-ArrowParameters">
<emu-nt params="Yield, Await"><a href="#prod-ArrowParameters">ArrowParameters</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="22bf917e"><emu-nt params="?Yield, ?Await" id="_ref_12742"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="parencover"><emu-nt params="?Yield, ?Await" id="_ref_12743"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ConciseBody" params="In" id="prod-ConciseBody">
<emu-nt params="In"><a href="#prod-ConciseBody">ConciseBody</a><emu-mods><emu-params>[In]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="67ce9873"><emu-gann>[lookahead ≠ <emu-t>{</emu-t>]</emu-gann><emu-nt params="?In, ~Yield, ~Await" id="_ref_12744"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[?In, ~Yield, ~Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="6f7b95b3"><emu-t>{</emu-t><emu-nt params="~Yield, ~Await" id="_ref_12745"><a href="#prod-FunctionBody">FunctionBody</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 the production
<br>
<emu-grammar><emu-production name="ArrowParameters" params="Yield, Await" collapsed="" class=" inline">
<emu-nt params="Yield, Await"><a href="#prod-ArrowParameters">ArrowParameters</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="29cadaef"><emu-nt params="?Yield, ?Await" id="_ref_12746"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<br>
is recognized the following grammar is used to refine the interpretation of <emu-nt id="_ref_12747"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt>:</p>
<emu-grammar type="definition"><emu-production name="ArrowFormalParameters" params="Yield, Await" id="prod-ArrowFormalParameters">
<emu-nt params="Yield, Await"><a href="#prod-ArrowFormalParameters">ArrowFormalParameters</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b7561ab3"><emu-t>(</emu-t><emu-nt params="?Yield, ?Await" id="_ref_12748"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-clause id="sec-arrow-function-definitions-static-semantics-early-errors">
<h1><span class="secnum">14.2.1</span>Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="ArrowFunction" collapsed="">
<emu-nt><a href="#prod-ArrowFunction">ArrowFunction</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="2a7a3456"><emu-nt id="_ref_12749"><a href="#prod-ArrowParameters">ArrowParameters</a></emu-nt><emu-t>=&gt;</emu-t><emu-nt id="_ref_12750"><a href="#prod-ConciseBody">ConciseBody</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if <emu-nt id="_ref_12751"><a href="#prod-ArrowParameters">ArrowParameters</a></emu-nt> Contains <emu-nt id="_ref_12752"><a href="#prod-YieldExpression">YieldExpression</a></emu-nt> is <emu-val>true</emu-val>.
</li>
<li>
It is a Syntax Error if <emu-nt id="_ref_12753"><a href="#prod-ArrowParameters">ArrowParameters</a></emu-nt> Contains <emu-nt id="_ref_12754"><a href="#prod-AwaitExpression">AwaitExpression</a></emu-nt> is <emu-val>true</emu-val>.
</li>
<li>
It is a Syntax Error if ContainsUseStrict of <emu-nt id="_ref_12755"><a href="#prod-ConciseBody">ConciseBody</a></emu-nt> is <emu-val>true</emu-val> and IsSimpleParameterList of <emu-nt id="_ref_12756"><a href="#prod-ArrowParameters">ArrowParameters</a></emu-nt> is <emu-val>false</emu-val>.
</li>
<li>
It is a Syntax Error if any element of the BoundNames of <emu-nt id="_ref_12757"><a href="#prod-ArrowParameters">ArrowParameters</a></emu-nt> also occurs in the LexicallyDeclaredNames of <emu-nt id="_ref_12758"><a href="#prod-ConciseBody">ConciseBody</a></emu-nt>.
</li>
</ul>
<emu-grammar><emu-production name="ArrowParameters" collapsed="">
<emu-nt><a href="#prod-ArrowParameters">ArrowParameters</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cab6f5d7"><emu-nt id="_ref_12759"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if <emu-nt id="_ref_12760"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt> is not <emu-xref href="#sec-syntactic-grammar" id="_ref_4062"><a href="#sec-syntactic-grammar">covering</a></emu-xref> an <emu-nt id="_ref_12761"><a href="#prod-ArrowFormalParameters">ArrowFormalParameters</a></emu-nt>.
</li>
<li>
All <emu-xref href="#early-error" id="_ref_4063"><a href="#early-error">early error</a></emu-xref> rules for <emu-nt id="_ref_12762"><a href="#prod-ArrowFormalParameters">ArrowFormalParameters</a></emu-nt> and its derived productions also apply to CoveredFormalsList of <emu-nt id="_ref_12763"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-arrow-function-definitions-static-semantics-boundnames">
<h1><span class="secnum">14.2.2</span>Static Semantics: BoundNames</h1>
<emu-see-also-para op="BoundNames"></emu-see-also-para>
<emu-grammar><emu-production name="ArrowParameters" collapsed="">
<emu-nt><a href="#prod-ArrowParameters">ArrowParameters</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cab6f5d7"><emu-nt id="_ref_12764"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>formals</var> be CoveredFormalsList of <emu-nt id="_ref_12765"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt>.</li><li>Return the BoundNames of <var>formals</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-arrow-function-definitions-static-semantics-contains">
<h1><span class="secnum">14.2.3</span>Static Semantics: Contains</h1>
<p>With parameter <var>symbol</var>.</p>
<emu-see-also-para op="Contains"></emu-see-also-para>
<emu-grammar><emu-production name="ArrowFunction" collapsed="">
<emu-nt><a href="#prod-ArrowFunction">ArrowFunction</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="2a7a3456"><emu-nt id="_ref_12766"><a href="#prod-ArrowParameters">ArrowParameters</a></emu-nt><emu-t>=&gt;</emu-t><emu-nt id="_ref_12767"><a href="#prod-ConciseBody">ConciseBody</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <var>symbol</var> is not one of <emu-nt id="_ref_12768"><a href="#prod-NewTarget">NewTarget</a></emu-nt>, <emu-nt id="_ref_12769"><a href="#prod-SuperProperty">SuperProperty</a></emu-nt>, <emu-nt id="_ref_12770"><a href="#prod-SuperCall">SuperCall</a></emu-nt>, <code>super</code> or <code>this</code>, return <emu-val>false</emu-val>.</li><li>If <emu-nt id="_ref_12771"><a href="#prod-ArrowParameters">ArrowParameters</a></emu-nt> Contains <var>symbol</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return <emu-nt id="_ref_12772"><a href="#prod-ConciseBody">ConciseBody</a></emu-nt> Contains <var>symbol</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Normally, Contains does not look inside most function forms. However, Contains is used to detect <code>new.target</code>, <code>this</code>, and <code>super</code> usage within an <emu-nt id="_ref_12773"><a href="#prod-ArrowFunction">ArrowFunction</a></emu-nt>.</p>
</div></emu-note>
<emu-grammar><emu-production name="ArrowParameters" collapsed="">
<emu-nt><a href="#prod-ArrowParameters">ArrowParameters</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cab6f5d7"><emu-nt id="_ref_12774"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>formals</var> be CoveredFormalsList of <emu-nt id="_ref_12775"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt>.</li><li>Return <var>formals</var> Contains <var>symbol</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-arrow-function-definitions-static-semantics-containsexpression">
<h1><span class="secnum">14.2.4</span>Static Semantics: ContainsExpression</h1>
<emu-see-also-para op="ContainsExpression"></emu-see-also-para>
<emu-grammar><emu-production name="ArrowParameters" collapsed="">
<emu-nt><a href="#prod-ArrowParameters">ArrowParameters</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="50e97238"><emu-nt id="_ref_12776"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-arrow-function-definitions-static-semantics-containsusestrict">
<h1><span class="secnum">14.2.5</span>Static Semantics: ContainsUseStrict</h1>
<emu-see-also-para op="ContainsUseStrict"></emu-see-also-para>
<emu-grammar><emu-production name="ConciseBody" collapsed="">
<emu-nt><a href="#prod-ConciseBody">ConciseBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d4fc7da4"><emu-nt id="_ref_12777"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-arrow-function-definitions-static-semantics-expectedargumentcount">
<h1><span class="secnum">14.2.6</span>Static Semantics: ExpectedArgumentCount</h1>
<emu-see-also-para op="ExpectedArgumentCount"></emu-see-also-para>
<emu-grammar><emu-production name="ArrowParameters" collapsed="">
<emu-nt><a href="#prod-ArrowParameters">ArrowParameters</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="50e97238"><emu-nt id="_ref_12778"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return 1.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-arrow-function-definitions-static-semantics-hasname">
<h1><span class="secnum">14.2.7</span>Static Semantics: HasName</h1>
<emu-see-also-para op="HasName"></emu-see-also-para>
<emu-grammar><emu-production name="ArrowFunction" collapsed="">
<emu-nt><a href="#prod-ArrowFunction">ArrowFunction</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="2a7a3456"><emu-nt id="_ref_12779"><a href="#prod-ArrowParameters">ArrowParameters</a></emu-nt><emu-t>=&gt;</emu-t><emu-nt id="_ref_12780"><a href="#prod-ConciseBody">ConciseBody</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-arrow-function-definitions-static-semantics-issimpleparameterlist">
<h1><span class="secnum">14.2.8</span>Static Semantics: IsSimpleParameterList</h1>
<emu-see-also-para op="IsSimpleParameterList"></emu-see-also-para>
<emu-grammar><emu-production name="ArrowParameters" collapsed="">
<emu-nt><a href="#prod-ArrowParameters">ArrowParameters</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="50e97238"><emu-nt id="_ref_12781"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ArrowParameters" collapsed="">
<emu-nt><a href="#prod-ArrowParameters">ArrowParameters</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cab6f5d7"><emu-nt id="_ref_12782"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>formals</var> be CoveredFormalsList of <emu-nt id="_ref_12783"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt>.</li><li>Return IsSimpleParameterList of <var>formals</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-static-semantics-coveredformalslist">
<h1><span class="secnum">14.2.9</span>Static Semantics: CoveredFormalsList</h1>
<emu-grammar><emu-production name="ArrowParameters" collapsed="">
<emu-nt><a href="#prod-ArrowParameters">ArrowParameters</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="50e97238"><emu-nt id="_ref_12784"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return this <emu-nt id="_ref_12785"><a href="#prod-ArrowParameters">ArrowParameters</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="CoverParenthesizedExpressionAndArrowParameterList">
<emu-nt><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4ba6ef9d"><emu-t>(</emu-t><emu-nt id="_ref_12786"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t></emu-rhs>
<emu-rhs a="78e44c33"><emu-t>(</emu-t><emu-t>)</emu-t></emu-rhs>
<emu-rhs a="96bd933c"><emu-t>(</emu-t><emu-t>...</emu-t><emu-nt id="_ref_12787"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-t>)</emu-t></emu-rhs>
<emu-rhs a="c28a99dd"><emu-t>(</emu-t><emu-t>...</emu-t><emu-nt id="_ref_12788"><a href="#prod-BindingPattern">BindingPattern</a></emu-nt><emu-t>)</emu-t></emu-rhs>
<emu-rhs a="f2051a8f"><emu-t>(</emu-t><emu-nt id="_ref_12789"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>,</emu-t><emu-t>...</emu-t><emu-nt id="_ref_12790"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-t>)</emu-t></emu-rhs>
<emu-rhs a="b652fc19"><emu-t>(</emu-t><emu-nt id="_ref_12791"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>,</emu-t><emu-t>...</emu-t><emu-nt id="_ref_12792"><a href="#prod-BindingPattern">BindingPattern</a></emu-nt><emu-t>)</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the <emu-nt id="_ref_12793"><a href="#prod-ArrowFormalParameters">ArrowFormalParameters</a></emu-nt> that is <emu-xref href="#sec-syntactic-grammar" id="_ref_4064"><a href="#sec-syntactic-grammar">covered</a></emu-xref> by <emu-nt id="_ref_12794"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-arrow-function-definitions-static-semantics-lexicallydeclarednames">
<h1><span class="secnum">14.2.10</span>Static Semantics: LexicallyDeclaredNames</h1>
<emu-see-also-para op="LexicallyDeclaredNames"></emu-see-also-para>
<emu-grammar><emu-production name="ConciseBody" collapsed="">
<emu-nt><a href="#prod-ConciseBody">ConciseBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d4fc7da4"><emu-nt id="_ref_12795"><a href="#prod-AssignmentExpression">AssignmentExpression</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_4065"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-arrow-function-definitions-static-semantics-lexicallyscopeddeclarations">
<h1><span class="secnum">14.2.11</span>Static Semantics: LexicallyScopedDeclarations</h1>
<emu-see-also-para op="LexicallyScopedDeclarations"></emu-see-also-para>
<emu-grammar><emu-production name="ConciseBody" collapsed="">
<emu-nt><a href="#prod-ConciseBody">ConciseBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d4fc7da4"><emu-nt id="_ref_12796"><a href="#prod-AssignmentExpression">AssignmentExpression</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_4066"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-arrow-function-definitions-static-semantics-vardeclarednames">
<h1><span class="secnum">14.2.12</span>Static Semantics: VarDeclaredNames</h1>
<emu-see-also-para op="VarDeclaredNames"></emu-see-also-para>
<emu-grammar><emu-production name="ConciseBody" collapsed="">
<emu-nt><a href="#prod-ConciseBody">ConciseBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d4fc7da4"><emu-nt id="_ref_12797"><a href="#prod-AssignmentExpression">AssignmentExpression</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_4067"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-arrow-function-definitions-static-semantics-varscopeddeclarations">
<h1><span class="secnum">14.2.13</span>Static Semantics: VarScopedDeclarations</h1>
<emu-see-also-para op="VarScopedDeclarations"></emu-see-also-para>
<emu-grammar><emu-production name="ConciseBody" collapsed="">
<emu-nt><a href="#prod-ConciseBody">ConciseBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d4fc7da4"><emu-nt id="_ref_12798"><a href="#prod-AssignmentExpression">AssignmentExpression</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_4068"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-arrow-function-definitions-runtime-semantics-iteratorbindinginitialization">
<h1><span class="secnum">14.2.14</span>Runtime Semantics: IteratorBindingInitialization</h1>
<p>With parameters <var>iteratorRecord</var> and <var>environment</var>.</p>
<emu-see-also-para op="IteratorBindingInitialization"></emu-see-also-para>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>When <emu-val>undefined</emu-val> is passed for <var>environment</var> it indicates that a <emu-xref aoid="PutValue" id="_ref_4069"><a href="#sec-putvalue">PutValue</a></emu-xref>
operation should be used to assign the initialization value. This is
the case for formal parameter lists of non-strict functions. In that
case the formal parameter bindings are preinitialized in order to deal
with the possibility of multiple parameters with the same name.</p>
</div></emu-note>
<emu-grammar><emu-production name="ArrowParameters" collapsed="">
<emu-nt><a href="#prod-ArrowParameters">ArrowParameters</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="50e97238"><emu-nt id="_ref_12799"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_4070"><a href="#assert">Assert</a></emu-xref>: <var>iteratorRecord</var>.[[Done]] is <emu-val>false</emu-val>.</li><li>Let <var>next</var> be <emu-xref aoid="IteratorStep" id="_ref_4071"><a href="#sec-iteratorstep">IteratorStep</a></emu-xref>(<var>iteratorRecord</var>).</li><li>If <var>next</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_4072"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, set <var>iteratorRecord</var>.[[Done]] to <emu-val>true</emu-val>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_4073"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>next</var>).</li><li>If <var>next</var> is <emu-val>false</emu-val>, set <var>iteratorRecord</var>.[[Done]] to <emu-val>true</emu-val>.</li><li>Else,<ol><li>Let <var>v</var> be <emu-xref aoid="IteratorValue" id="_ref_4074"><a href="#sec-iteratorvalue">IteratorValue</a></emu-xref>(<var>next</var>).</li><li>If <var>v</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_4075"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, set <var>iteratorRecord</var>.[[Done]] to <emu-val>true</emu-val>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_4076"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>v</var>).</li></ol></li><li>If <var>iteratorRecord</var>.[[Done]] is <emu-val>true</emu-val>, let <var>v</var> be <emu-val>undefined</emu-val>.</li><li>Return the result of performing BindingInitialization for <emu-nt id="_ref_12800"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt> using <var>v</var> and <var>environment</var> as the arguments.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-arrow-function-definitions-runtime-semantics-evaluatebody">
<h1><span class="secnum">14.2.15</span>Runtime Semantics: EvaluateBody</h1>
<p>With parameters <var>functionObject</var> and <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4077"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> <var>argumentsList</var>.</p>
<emu-see-also-para op="EvaluateBody"></emu-see-also-para>
<emu-grammar><emu-production name="ConciseBody" collapsed="">
<emu-nt><a href="#prod-ConciseBody">ConciseBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d4fc7da4"><emu-nt id="_ref_12801"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Perform ?&nbsp;<emu-xref aoid="FunctionDeclarationInstantiation" id="_ref_4078"><a href="#sec-functiondeclarationinstantiation">FunctionDeclarationInstantiation</a></emu-xref>(<var>functionObject</var>, <var>argumentsList</var>).</li><li>Let <var>exprRef</var> be the result of evaluating <emu-nt id="_ref_12802"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Let <var>exprValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_4079"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>exprRef</var>).</li><li>Return <emu-xref aoid="Completion" id="_ref_4080"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref> { [[Type]]: <emu-const>return</emu-const>, [[Value]]: <var>exprValue</var>, [[Target]]: <emu-const>empty</emu-const> }.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-arrow-function-definitions-runtime-semantics-namedevaluation">
<h1><span class="secnum">14.2.16</span>Runtime Semantics: NamedEvaluation</h1>
<p>With parameter <var>name</var>.</p>
<emu-grammar><emu-production name="ArrowFunction" collapsed="">
<emu-nt><a href="#prod-ArrowFunction">ArrowFunction</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="2a7a3456"><emu-nt id="_ref_12803"><a href="#prod-ArrowParameters">ArrowParameters</a></emu-nt><emu-t>=&gt;</emu-t><emu-nt id="_ref_12804"><a href="#prod-ConciseBody">ConciseBody</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>closure</var> be the result of evaluating this <emu-nt id="_ref_12805"><a href="#prod-ArrowFunction">ArrowFunction</a></emu-nt>.</li><li>Perform <emu-xref aoid="SetFunctionName" id="_ref_4081"><a href="#sec-setfunctionname">SetFunctionName</a></emu-xref>(<var>closure</var>, <var>name</var>).</li><li>Return <var>closure</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-arrow-function-definitions-runtime-semantics-evaluation">
<h1><span class="secnum">14.2.17</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="ArrowFunction" collapsed="">
<emu-nt><a href="#prod-ArrowFunction">ArrowFunction</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="2a7a3456"><emu-nt id="_ref_12806"><a href="#prod-ArrowParameters">ArrowParameters</a></emu-nt><emu-t>=&gt;</emu-t><emu-nt id="_ref_12807"><a href="#prod-ConciseBody">ConciseBody</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If the function code for this <emu-nt id="_ref_12808"><a href="#prod-ArrowFunction">ArrowFunction</a></emu-nt> is <emu-xref href="#sec-strict-mode-code" id="_ref_4082"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, let <var>strict</var> be <emu-val>true</emu-val>. Otherwise let <var>strict</var> be <emu-val>false</emu-val>.</li><li>Let <var>scope</var> be the LexicalEnvironment of the <emu-xref href="#running-execution-context" id="_ref_4083"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Let <var>parameters</var> be CoveredFormalsList of <emu-nt id="_ref_12809"><a href="#prod-ArrowParameters">ArrowParameters</a></emu-nt>.</li><li>Let <var>closure</var> be <emu-xref aoid="FunctionCreate" id="_ref_4084"><a href="#sec-functioncreate">FunctionCreate</a></emu-xref>(<emu-const>Arrow</emu-const>, <var>parameters</var>, <emu-nt id="_ref_12810"><a href="#prod-ConciseBody">ConciseBody</a></emu-nt>, <var>scope</var>, <var>strict</var>).</li><li>Set <var>closure</var>.[[SourceText]] to the source text matched by <emu-nt id="_ref_12811"><a href="#prod-ArrowFunction">ArrowFunction</a></emu-nt>.</li><li>Return <var>closure</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>An <emu-nt id="_ref_12812"><a href="#prod-ArrowFunction">ArrowFunction</a></emu-nt> does not define local bindings for <code>arguments</code>, <code>super</code>, <code>this</code>, or <code>new.target</code>. Any reference to <code>arguments</code>, <code>super</code>, <code>this</code>, or <code>new.target</code> within an <emu-nt id="_ref_12813"><a href="#prod-ArrowFunction">ArrowFunction</a></emu-nt>
must resolve to a binding in a lexically enclosing environment.
Typically this will be the Function Environment of an immediately
enclosing function. Even though an <emu-nt id="_ref_12814"><a href="#prod-ArrowFunction">ArrowFunction</a></emu-nt> may contain references to <code>super</code>, the <emu-xref href="#function-object" id="_ref_4085"><a href="#function-object">function object</a></emu-xref> created in step 4 is not made into a method by performing <emu-xref aoid="MakeMethod" id="_ref_4086"><a href="#sec-makemethod">MakeMethod</a></emu-xref>. An <emu-nt id="_ref_12815"><a href="#prod-ArrowFunction">ArrowFunction</a></emu-nt> that references <code>super</code> is always contained within a non-<emu-nt id="_ref_12816"><a href="#prod-ArrowFunction">ArrowFunction</a></emu-nt> and the necessary state to implement <code>super</code> is accessible via the <var>scope</var> that is captured by the <emu-xref href="#function-object" id="_ref_4087"><a href="#function-object">function object</a></emu-xref> of the <emu-nt id="_ref_12817"><a href="#prod-ArrowFunction">ArrowFunction</a></emu-nt>.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-method-definitions">
<h1><span class="secnum">14.3</span>Method Definitions</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="MethodDefinition" params="Yield, Await" id="prod-MethodDefinition">
<emu-nt params="Yield, Await"><a href="#prod-MethodDefinition">MethodDefinition</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="19d49312"><emu-nt params="?Yield, ?Await" id="_ref_12818"><a href="#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_12819"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt params="~Yield, ~Await" id="_ref_12820"><a href="#prod-FunctionBody">FunctionBody</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params></emu-mods></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="b8854ce2"><emu-nt params="?Yield, ?Await" id="_ref_12821"><a href="#prod-GeneratorMethod">GeneratorMethod</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="978adba9"><emu-nt params="?Yield, ?Await" id="_ref_12822"><a href="#prod-AsyncMethod">AsyncMethod</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="d8d5f4bb"><emu-nt params="?Yield, ?Await" id="_ref_12823"><a href="#prod-AsyncGeneratorMethod">AsyncGeneratorMethod</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="044ecd0b"><emu-t>get</emu-t><emu-nt params="?Yield, ?Await" id="_ref_12824"><a href="#prod-PropertyName">PropertyName</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>(</emu-t><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt params="~Yield, ~Await" id="_ref_12825"><a href="#prod-FunctionBody">FunctionBody</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params></emu-mods></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="55774850"><emu-t>set</emu-t><emu-nt params="?Yield, ?Await" id="_ref_12826"><a href="#prod-PropertyName">PropertyName</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_12827"><a href="#prod-PropertySetParameterList">PropertySetParameterList</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt params="~Yield, ~Await" id="_ref_12828"><a href="#prod-FunctionBody">FunctionBody</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params></emu-mods></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="PropertySetParameterList" id="prod-PropertySetParameterList">
<emu-nt><a href="#prod-PropertySetParameterList">PropertySetParameterList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="3f4952d7"><emu-nt params="~Yield, ~Await" id="_ref_12829"><a href="#prod-FormalParameter">FormalParameter</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-clause id="sec-method-definitions-static-semantics-early-errors">
<h1><span class="secnum">14.3.1</span>Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="MethodDefinition" collapsed="">
<emu-nt><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cb8e53e9"><emu-nt id="_ref_12830"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_12831"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12832"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if ContainsUseStrict of <emu-nt id="_ref_12833"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt> is <emu-val>true</emu-val> and IsSimpleParameterList of <emu-nt id="_ref_12834"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt> is <emu-val>false</emu-val>.
</li>
<li>
It is a Syntax Error if any element of the BoundNames of <emu-nt id="_ref_12835"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt> also occurs in the LexicallyDeclaredNames of <emu-nt id="_ref_12836"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt>.
</li>
</ul>
<emu-grammar><emu-production name="MethodDefinition" collapsed="">
<emu-nt><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4402354c"><emu-t>set</emu-t><emu-nt id="_ref_12837"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_12838"><a href="#prod-PropertySetParameterList">PropertySetParameterList</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12839"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if BoundNames of <emu-nt id="_ref_12840"><a href="#prod-PropertySetParameterList">PropertySetParameterList</a></emu-nt> contains any duplicate elements.
</li>
<li>
It is a Syntax Error if ContainsUseStrict of <emu-nt id="_ref_12841"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt> is <emu-val>true</emu-val> and IsSimpleParameterList of <emu-nt id="_ref_12842"><a href="#prod-PropertySetParameterList">PropertySetParameterList</a></emu-nt> is <emu-val>false</emu-val>.
</li>
<li>
It is a Syntax Error if any element of the BoundNames of <emu-nt id="_ref_12843"><a href="#prod-PropertySetParameterList">PropertySetParameterList</a></emu-nt> also occurs in the LexicallyDeclaredNames of <emu-nt id="_ref_12844"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-method-definitions-static-semantics-computedpropertycontains">
<h1><span class="secnum">14.3.2</span>Static Semantics: ComputedPropertyContains</h1>
<p>With parameter <var>symbol</var>.</p>
<emu-see-also-para op="ComputedPropertyContains"></emu-see-also-para>
<emu-grammar><emu-production name="MethodDefinition">
<emu-nt><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cb8e53e9"><emu-nt id="_ref_12845"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_12846"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12847"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="f1487956"><emu-t>get</emu-t><emu-nt id="_ref_12848"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>(</emu-t><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12849"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="4402354c"><emu-t>set</emu-t><emu-nt id="_ref_12850"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_12851"><a href="#prod-PropertySetParameterList">PropertySetParameterList</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12852"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the result of ComputedPropertyContains for <emu-nt id="_ref_12853"><a href="#prod-PropertyName">PropertyName</a></emu-nt> with argument <var>symbol</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-method-definitions-static-semantics-expectedargumentcount">
<h1><span class="secnum">14.3.3</span>Static Semantics: ExpectedArgumentCount</h1>
<emu-see-also-para op="ExpectedArgumentCount"></emu-see-also-para>
<emu-grammar><emu-production name="PropertySetParameterList" collapsed="">
<emu-nt><a href="#prod-PropertySetParameterList">PropertySetParameterList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="497954f5"><emu-nt id="_ref_12854"><a href="#prod-FormalParameter">FormalParameter</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If HasInitializer of <emu-nt id="_ref_12855"><a href="#prod-FormalParameter">FormalParameter</a></emu-nt> is <emu-val>true</emu-val>, return 0.</li><li>Return 1.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-method-definitions-static-semantics-hasdirectsuper">
<h1><span class="secnum">14.3.4</span>Static Semantics: HasDirectSuper</h1>
<emu-see-also-para op="HasDirectSuper"></emu-see-also-para>
<emu-grammar><emu-production name="MethodDefinition" collapsed="">
<emu-nt><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cb8e53e9"><emu-nt id="_ref_12856"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_12857"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12858"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <emu-nt id="_ref_12859"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt> Contains <emu-nt id="_ref_12860"><a href="#prod-SuperCall">SuperCall</a></emu-nt> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return <emu-nt id="_ref_12861"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt> Contains <emu-nt id="_ref_12862"><a href="#prod-SuperCall">SuperCall</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="MethodDefinition" collapsed="">
<emu-nt><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f1487956"><emu-t>get</emu-t><emu-nt id="_ref_12863"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>(</emu-t><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12864"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-nt id="_ref_12865"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt> Contains <emu-nt id="_ref_12866"><a href="#prod-SuperCall">SuperCall</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="MethodDefinition" collapsed="">
<emu-nt><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4402354c"><emu-t>set</emu-t><emu-nt id="_ref_12867"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_12868"><a href="#prod-PropertySetParameterList">PropertySetParameterList</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12869"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <emu-nt id="_ref_12870"><a href="#prod-PropertySetParameterList">PropertySetParameterList</a></emu-nt> Contains <emu-nt id="_ref_12871"><a href="#prod-SuperCall">SuperCall</a></emu-nt> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return <emu-nt id="_ref_12872"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt> Contains <emu-nt id="_ref_12873"><a href="#prod-SuperCall">SuperCall</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-method-definitions-static-semantics-propname">
<h1><span class="secnum">14.3.5</span>Static Semantics: PropName</h1>
<emu-see-also-para op="PropName"></emu-see-also-para>
<emu-grammar><emu-production name="MethodDefinition">
<emu-nt><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cb8e53e9"><emu-nt id="_ref_12874"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_12875"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12876"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="f1487956"><emu-t>get</emu-t><emu-nt id="_ref_12877"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>(</emu-t><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12878"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="4402354c"><emu-t>set</emu-t><emu-nt id="_ref_12879"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_12880"><a href="#prod-PropertySetParameterList">PropertySetParameterList</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12881"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return PropName of <emu-nt id="_ref_12882"><a href="#prod-PropertyName">PropertyName</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-static-semantics-specialmethod">
<h1><span class="secnum">14.3.6</span>Static Semantics: SpecialMethod</h1>
<emu-grammar><emu-production name="MethodDefinition" collapsed="">
<emu-nt><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cb8e53e9"><emu-nt id="_ref_12883"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_12884"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12885"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></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="MethodDefinition">
<emu-nt><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="52fe7349"><emu-nt id="_ref_12886"><a href="#prod-GeneratorMethod">GeneratorMethod</a></emu-nt></emu-rhs>
<emu-rhs a="a413e1c4"><emu-nt id="_ref_12887"><a href="#prod-AsyncMethod">AsyncMethod</a></emu-nt></emu-rhs>
<emu-rhs a="801994bd"><emu-nt id="_ref_12888"><a href="#prod-AsyncGeneratorMethod">AsyncGeneratorMethod</a></emu-nt></emu-rhs>
<emu-rhs a="f1487956"><emu-t>get</emu-t><emu-nt id="_ref_12889"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>(</emu-t><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12890"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="4402354c"><emu-t>set</emu-t><emu-nt id="_ref_12891"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_12892"><a href="#prod-PropertySetParameterList">PropertySetParameterList</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12893"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></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-runtime-semantics-definemethod">
<h1><span class="secnum">14.3.7</span>Runtime Semantics: DefineMethod</h1>
<p>With parameters <var>object</var> and optional parameter <var>functionPrototype</var>.</p>
<emu-grammar><emu-production name="MethodDefinition" collapsed="">
<emu-nt><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cb8e53e9"><emu-nt id="_ref_12894"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_12895"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12896"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>propKey</var> be the result of evaluating <emu-nt id="_ref_12897"><a href="#prod-PropertyName">PropertyName</a></emu-nt>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_4088"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>propKey</var>).</li><li>If the function code for this <emu-nt id="_ref_12898"><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt> is <emu-xref href="#sec-strict-mode-code" id="_ref_4089"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, let <var>strict</var> be <emu-val>true</emu-val>. Otherwise let <var>strict</var> be <emu-val>false</emu-val>.</li><li>Let <var>scope</var> be the <emu-xref href="#running-execution-context" id="_ref_4090"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment.</li><li>If <var>functionPrototype</var> is present as a parameter, then<ol><li>Let <var>kind</var> be <emu-const>Normal</emu-const>.</li><li>Let <var>prototype</var> be <var>functionPrototype</var>.</li></ol></li><li>Else,<ol><li>Let <var>kind</var> be <emu-const>Method</emu-const>.</li><li>Let <var>prototype</var> be the intrinsic object <emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_4091"><a href="#sec-properties-of-the-function-prototype-object">%FunctionPrototype%</a></emu-xref>.</li></ol></li><li>Let <var>closure</var> be <emu-xref aoid="FunctionCreate" id="_ref_4092"><a href="#sec-functioncreate">FunctionCreate</a></emu-xref>(<var>kind</var>, <emu-nt id="_ref_12899"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt>, <emu-nt id="_ref_12900"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt>, <var>scope</var>, <var>strict</var>, <var>prototype</var>).</li><li>Perform <emu-xref aoid="MakeMethod" id="_ref_4093"><a href="#sec-makemethod">MakeMethod</a></emu-xref>(<var>closure</var>, <var>object</var>).</li><li>Set <var>closure</var>.[[SourceText]] to the source text matched by <emu-nt id="_ref_12901"><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt>.</li><li>Return the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4094"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Key]]: <var>propKey</var>, [[Closure]]: <var>closure</var> }.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-method-definitions-runtime-semantics-propertydefinitionevaluation">
<h1><span class="secnum">14.3.8</span>Runtime Semantics: PropertyDefinitionEvaluation</h1>
<p>With parameters <var>object</var> and <var>enumerable</var>.</p>
<emu-see-also-para op="PropertyDefinitionEvaluation"></emu-see-also-para>
<emu-grammar><emu-production name="MethodDefinition" collapsed="">
<emu-nt><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cb8e53e9"><emu-nt id="_ref_12902"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_12903"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12904"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>methodDef</var> be DefineMethod of <emu-nt id="_ref_12905"><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt> with argument <var>object</var>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_4095"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>methodDef</var>).</li><li>Perform <emu-xref aoid="SetFunctionName" id="_ref_4096"><a href="#sec-setfunctionname">SetFunctionName</a></emu-xref>(<var>methodDef</var>.[[Closure]], <var>methodDef</var>.[[Key]]).</li><li>Let <var>desc</var> be the PropertyDescriptor { [[Value]]: <var>methodDef</var>.[[Closure]], [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <var>enumerable</var>, [[Configurable]]: <emu-val>true</emu-val> }.</li><li>Return ?&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_4097"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>object</var>, <var>methodDef</var>.[[Key]], <var>desc</var>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="MethodDefinition" collapsed="">
<emu-nt><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f1487956"><emu-t>get</emu-t><emu-nt id="_ref_12906"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>(</emu-t><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12907"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>propKey</var> be the result of evaluating <emu-nt id="_ref_12908"><a href="#prod-PropertyName">PropertyName</a></emu-nt>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_4098"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>propKey</var>).</li><li>If the function code for this <emu-nt id="_ref_12909"><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt> is <emu-xref href="#sec-strict-mode-code" id="_ref_4099"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, let <var>strict</var> be <emu-val>true</emu-val>. Otherwise let <var>strict</var> be <emu-val>false</emu-val>.</li><li>Let <var>scope</var> be the <emu-xref href="#running-execution-context" id="_ref_4100"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment.</li><li>Let <var>formalParameterList</var> be an instance of the production <emu-grammar><emu-production name="FormalParameters" collapsed="" class=" inline">
<emu-nt><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></emu-rhs>
</emu-production></emu-grammar>.</li><li>Let <var>closure</var> be <emu-xref aoid="FunctionCreate" id="_ref_4101"><a href="#sec-functioncreate">FunctionCreate</a></emu-xref>(<emu-const>Method</emu-const>, <var>formalParameterList</var>, <emu-nt id="_ref_12910"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt>, <var>scope</var>, <var>strict</var>).</li><li>Perform <emu-xref aoid="MakeMethod" id="_ref_4102"><a href="#sec-makemethod">MakeMethod</a></emu-xref>(<var>closure</var>, <var>object</var>).</li><li>Perform <emu-xref aoid="SetFunctionName" id="_ref_4103"><a href="#sec-setfunctionname">SetFunctionName</a></emu-xref>(<var>closure</var>, <var>propKey</var>, <code>"get"</code>).</li><li>Set <var>closure</var>.[[SourceText]] to the source text matched by <emu-nt id="_ref_12911"><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt>.</li><li>Let <var>desc</var> be the PropertyDescriptor { [[Get]]: <var>closure</var>, [[Enumerable]]: <var>enumerable</var>, [[Configurable]]: <emu-val>true</emu-val> }.</li><li>Return ?&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_4104"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>object</var>, <var>propKey</var>, <var>desc</var>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="MethodDefinition" collapsed="">
<emu-nt><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4402354c"><emu-t>set</emu-t><emu-nt id="_ref_12912"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_12913"><a href="#prod-PropertySetParameterList">PropertySetParameterList</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12914"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>propKey</var> be the result of evaluating <emu-nt id="_ref_12915"><a href="#prod-PropertyName">PropertyName</a></emu-nt>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_4105"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>propKey</var>).</li><li>If the function code for this <emu-nt id="_ref_12916"><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt> is <emu-xref href="#sec-strict-mode-code" id="_ref_4106"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, let <var>strict</var> be <emu-val>true</emu-val>. Otherwise let <var>strict</var> be <emu-val>false</emu-val>.</li><li>Let <var>scope</var> be the <emu-xref href="#running-execution-context" id="_ref_4107"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment.</li><li>Let <var>closure</var> be <emu-xref aoid="FunctionCreate" id="_ref_4108"><a href="#sec-functioncreate">FunctionCreate</a></emu-xref>(<emu-const>Method</emu-const>, <emu-nt id="_ref_12917"><a href="#prod-PropertySetParameterList">PropertySetParameterList</a></emu-nt>, <emu-nt id="_ref_12918"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt>, <var>scope</var>, <var>strict</var>).</li><li>Perform <emu-xref aoid="MakeMethod" id="_ref_4109"><a href="#sec-makemethod">MakeMethod</a></emu-xref>(<var>closure</var>, <var>object</var>).</li><li>Perform <emu-xref aoid="SetFunctionName" id="_ref_4110"><a href="#sec-setfunctionname">SetFunctionName</a></emu-xref>(<var>closure</var>, <var>propKey</var>, <code>"set"</code>).</li><li>Set <var>closure</var>.[[SourceText]] to the source text matched by <emu-nt id="_ref_12919"><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt>.</li><li>Let <var>desc</var> be the PropertyDescriptor { [[Set]]: <var>closure</var>, [[Enumerable]]: <var>enumerable</var>, [[Configurable]]: <emu-val>true</emu-val> }.</li><li>Return ?&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_4111"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>object</var>, <var>propKey</var>, <var>desc</var>).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-generator-function-definitions">
<h1><span class="secnum">14.4</span>Generator Function Definitions</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="GeneratorMethod" params="Yield, Await" id="prod-GeneratorMethod">
<emu-nt params="Yield, Await"><a href="#prod-GeneratorMethod">GeneratorMethod</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="54505152"><emu-t>*</emu-t><emu-nt params="?Yield, ?Await" id="_ref_12920"><a href="#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_12921"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a><emu-mods><emu-params>[+Yield, ~Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12922"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="GeneratorDeclaration" params="Yield, Await, Default" id="prod-GeneratorDeclaration">
<emu-nt params="Yield, Await, Default"><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a><emu-mods><emu-params>[Yield, Await, Default]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e7a001a0"><emu-t>function</emu-t><emu-t>*</emu-t><emu-nt params="?Yield, ?Await" id="_ref_12923"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>(</emu-t><emu-nt params="+Yield, ~Await" id="_ref_12924"><a href="#prod-FormalParameters">FormalParameters</a><emu-mods><emu-params>[+Yield, ~Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12925"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="19cc4b38" constraints="+Default"><emu-constraints>[+Default]</emu-constraints><emu-t>function</emu-t><emu-t>*</emu-t><emu-t>(</emu-t><emu-nt params="+Yield, ~Await" id="_ref_12926"><a href="#prod-FormalParameters">FormalParameters</a><emu-mods><emu-params>[+Yield, ~Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12927"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="GeneratorExpression" id="prod-GeneratorExpression">
<emu-nt><a href="#prod-GeneratorExpression">GeneratorExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="65253812"><emu-t>function</emu-t><emu-t>*</emu-t><emu-nt params="+Yield, ~Await" optional="" id="_ref_12928"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[+Yield, ~Await]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>(</emu-t><emu-nt params="+Yield, ~Await" id="_ref_12929"><a href="#prod-FormalParameters">FormalParameters</a><emu-mods><emu-params>[+Yield, ~Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12930"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="GeneratorBody" id="prod-GeneratorBody">
<emu-nt><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="42e56a37"><emu-nt params="+Yield, ~Await" id="_ref_12931"><a href="#prod-FunctionBody">FunctionBody</a><emu-mods><emu-params>[+Yield, ~Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="YieldExpression" params="In, Await" id="prod-YieldExpression">
<emu-nt params="In, Await"><a href="#prod-YieldExpression">YieldExpression</a><emu-mods><emu-params>[In, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d1df3360"><emu-t>yield</emu-t></emu-rhs>
<emu-rhs a="68b64d66"><emu-t>yield</emu-t><emu-gann>[no <emu-nt id="_ref_12932"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-nt params="?In, +Yield, ?Await" id="_ref_12933"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[?In, +Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="9ab6e2ea"><emu-t>yield</emu-t><emu-gann>[no <emu-nt id="_ref_12934"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-t>*</emu-t><emu-nt params="?In, +Yield, ?Await" id="_ref_12935"><a href="#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 1</span><div class="note-contents">
<p>The syntactic context immediately following <code>yield</code> requires use of the <emu-nt id="_ref_12936"><a href="#prod-InputElementRegExpOrTemplateTail">InputElementRegExpOrTemplateTail</a></emu-nt> lexical goal.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p><emu-nt id="_ref_12937"><a href="#prod-YieldExpression">YieldExpression</a></emu-nt> cannot be used within the <emu-nt id="_ref_12938"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt> of a generator function because any expressions that are part of <emu-nt id="_ref_12939"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt> are evaluated before the resulting generator object is in a resumable state.</p>
</div></emu-note>
<emu-note><span class="note">Note 3</span><div class="note-contents">
<p><emu-xref href="#sec-algorithm-conventions-abstract-operations" id="_ref_4112"><a href="#sec-algorithm-conventions-abstract-operations">Abstract operations</a></emu-xref> relating to generator objects are defined in <emu-xref href="#sec-generator-abstract-operations" id="_ref_356"><a href="#sec-generator-abstract-operations">25.4.3</a></emu-xref>.</p>
</div></emu-note>
<emu-clause id="sec-generator-function-definitions-static-semantics-early-errors">
<h1><span class="secnum">14.4.1</span>Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="GeneratorMethod" collapsed="">
<emu-nt><a href="#prod-GeneratorMethod">GeneratorMethod</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c5c757ac"><emu-t>*</emu-t><emu-nt id="_ref_12940"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_12941"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12942"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if HasDirectSuper of <emu-nt id="_ref_12943"><a href="#prod-GeneratorMethod">GeneratorMethod</a></emu-nt> is <emu-val>true</emu-val>.
</li>
<li>
It is a Syntax Error if <emu-nt id="_ref_12944"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt> Contains <emu-nt id="_ref_12945"><a href="#prod-YieldExpression">YieldExpression</a></emu-nt> is <emu-val>true</emu-val>.
</li>
<li>
It is a Syntax Error if ContainsUseStrict of <emu-nt id="_ref_12946"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt> is <emu-val>true</emu-val> and IsSimpleParameterList of <emu-nt id="_ref_12947"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt> is <emu-val>false</emu-val>.
</li>
<li>
It is a Syntax Error if any element of the BoundNames of <emu-nt id="_ref_12948"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt> also occurs in the LexicallyDeclaredNames of <emu-nt id="_ref_12949"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt>.
</li>
</ul>
<emu-grammar><emu-production name="GeneratorDeclaration" collapsed="">
<emu-nt><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="7dbc99b6"><emu-t>function</emu-t><emu-t>*</emu-t><emu-nt id="_ref_12950"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_12951"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12952"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="GeneratorDeclaration" collapsed="">
<emu-nt><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0d271960"><emu-t>function</emu-t><emu-t>*</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12953"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12954"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="GeneratorExpression" collapsed="">
<emu-nt><a href="#prod-GeneratorExpression">GeneratorExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="df68213a"><emu-t>function</emu-t><emu-t>*</emu-t><emu-nt optional="" id="_ref_12955"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_12956"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12957"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
If the source code matching this production is <emu-xref href="#sec-strict-mode-code" id="_ref_4113"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, the Early Error rules for <emu-grammar><emu-production name="UniqueFormalParameters" collapsed="" class=" inline">
<emu-nt><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0218c6f5"><emu-nt id="_ref_12958"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> are applied.
</li>
<li>
If the source code matching this production is <emu-xref href="#sec-strict-mode-code" id="_ref_4114"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, it is a Syntax Error if <emu-nt id="_ref_12959"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt> is present and the StringValue of <emu-nt id="_ref_12960"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt> is <code>"eval"</code> or <code>"arguments"</code>.
</li>
<li>
It is a Syntax Error if ContainsUseStrict of <emu-nt id="_ref_12961"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt> is <emu-val>true</emu-val> and IsSimpleParameterList of <emu-nt id="_ref_12962"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt> is <emu-val>false</emu-val>.
</li>
<li>
It is a Syntax Error if any element of the BoundNames of <emu-nt id="_ref_12963"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt> also occurs in the LexicallyDeclaredNames of <emu-nt id="_ref_12964"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt>.
</li>
<li>
It is a Syntax Error if <emu-nt id="_ref_12965"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt> Contains <emu-nt id="_ref_12966"><a href="#prod-YieldExpression">YieldExpression</a></emu-nt> is <emu-val>true</emu-val>.
</li>
<li>
It is a Syntax Error if <emu-nt id="_ref_12967"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt> Contains <emu-nt id="_ref_12968"><a href="#prod-SuperProperty">SuperProperty</a></emu-nt> is <emu-val>true</emu-val>.
</li>
<li>
It is a Syntax Error if <emu-nt id="_ref_12969"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt> Contains <emu-nt id="_ref_12970"><a href="#prod-SuperProperty">SuperProperty</a></emu-nt> is <emu-val>true</emu-val>.
</li>
<li>
It is a Syntax Error if <emu-nt id="_ref_12971"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt> Contains <emu-nt id="_ref_12972"><a href="#prod-SuperCall">SuperCall</a></emu-nt> is <emu-val>true</emu-val>.
</li>
<li>
It is a Syntax Error if <emu-nt id="_ref_12973"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt> Contains <emu-nt id="_ref_12974"><a href="#prod-SuperCall">SuperCall</a></emu-nt> is <emu-val>true</emu-val>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-generator-function-definitions-static-semantics-boundnames">
<h1><span class="secnum">14.4.2</span>Static Semantics: BoundNames</h1>
<emu-see-also-para op="BoundNames"></emu-see-also-para>
<emu-grammar><emu-production name="GeneratorDeclaration" collapsed="">
<emu-nt><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="7dbc99b6"><emu-t>function</emu-t><emu-t>*</emu-t><emu-nt id="_ref_12975"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_12976"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12977"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the BoundNames of <emu-nt id="_ref_12978"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="GeneratorDeclaration" collapsed="">
<emu-nt><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0d271960"><emu-t>function</emu-t><emu-t>*</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12979"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12980"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return « <code>"*default*"</code> ».
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p><code>"*default*"</code> is used within this specification as
a synthetic name for hoistable anonymous functions that are defined
using export declarations.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-generator-function-definitions-static-semantics-computedpropertycontains">
<h1><span class="secnum">14.4.3</span>Static Semantics: ComputedPropertyContains</h1>
<p>With parameter <var>symbol</var>.</p>
<emu-see-also-para op="ComputedPropertyContains"></emu-see-also-para>
<emu-grammar><emu-production name="GeneratorMethod" collapsed="">
<emu-nt><a href="#prod-GeneratorMethod">GeneratorMethod</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c5c757ac"><emu-t>*</emu-t><emu-nt id="_ref_12981"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_12982"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12983"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the result of ComputedPropertyContains for <emu-nt id="_ref_12984"><a href="#prod-PropertyName">PropertyName</a></emu-nt> with argument <var>symbol</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-generator-function-definitions-static-semantics-contains">
<h1><span class="secnum">14.4.4</span>Static Semantics: Contains</h1>
<p>With parameter <var>symbol</var>.</p>
<emu-see-also-para op="Contains"></emu-see-also-para>
<emu-grammar><emu-production name="GeneratorDeclaration" collapsed="">
<emu-nt><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="7dbc99b6"><emu-t>function</emu-t><emu-t>*</emu-t><emu-nt id="_ref_12985"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_12986"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12987"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="GeneratorDeclaration" collapsed="">
<emu-nt><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0d271960"><emu-t>function</emu-t><emu-t>*</emu-t><emu-t>(</emu-t><emu-nt id="_ref_12988"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12989"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="GeneratorExpression" collapsed="">
<emu-nt><a href="#prod-GeneratorExpression">GeneratorExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="df68213a"><emu-t>function</emu-t><emu-t>*</emu-t><emu-nt optional="" id="_ref_12990"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_12991"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12992"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Static semantic rules that depend upon substructure generally do not look into function definitions.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-generator-function-definitions-static-semantics-hasdirectsuper">
<h1><span class="secnum">14.4.5</span>Static Semantics: HasDirectSuper</h1>
<emu-see-also-para op="HasDirectSuper"></emu-see-also-para>
<emu-grammar><emu-production name="GeneratorMethod" collapsed="">
<emu-nt><a href="#prod-GeneratorMethod">GeneratorMethod</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c5c757ac"><emu-t>*</emu-t><emu-nt id="_ref_12993"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_12994"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_12995"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <emu-nt id="_ref_12996"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt> Contains <emu-nt id="_ref_12997"><a href="#prod-SuperCall">SuperCall</a></emu-nt> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return <emu-nt id="_ref_12998"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt> Contains <emu-nt id="_ref_12999"><a href="#prod-SuperCall">SuperCall</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-generator-function-definitions-static-semantics-hasname">
<h1><span class="secnum">14.4.6</span>Static Semantics: HasName</h1>
<emu-see-also-para op="HasName"></emu-see-also-para>
<emu-grammar><emu-production name="GeneratorExpression" collapsed="">
<emu-nt><a href="#prod-GeneratorExpression">GeneratorExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0d271960"><emu-t>function</emu-t><emu-t>*</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13000"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13001"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt><emu-t>}</emu-t></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="GeneratorExpression" collapsed="">
<emu-nt><a href="#prod-GeneratorExpression">GeneratorExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="7dbc99b6"><emu-t>function</emu-t><emu-t>*</emu-t><emu-nt id="_ref_13002"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13003"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13004"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt><emu-t>}</emu-t></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-generator-function-definitions-static-semantics-isconstantdeclaration">
<h1><span class="secnum">14.4.7</span>Static Semantics: IsConstantDeclaration</h1>
<emu-see-also-para op="IsConstantDeclaration"></emu-see-also-para>
<emu-grammar><emu-production name="GeneratorDeclaration" collapsed="">
<emu-nt><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="7dbc99b6"><emu-t>function</emu-t><emu-t>*</emu-t><emu-nt id="_ref_13005"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13006"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13007"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="GeneratorDeclaration" collapsed="">
<emu-nt><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0d271960"><emu-t>function</emu-t><emu-t>*</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13008"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13009"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-generator-function-definitions-static-semantics-isfunctiondefinition">
<h1><span class="secnum">14.4.8</span>Static Semantics: IsFunctionDefinition</h1>
<emu-see-also-para op="IsFunctionDefinition"></emu-see-also-para>
<emu-grammar><emu-production name="GeneratorExpression" collapsed="">
<emu-nt><a href="#prod-GeneratorExpression">GeneratorExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="df68213a"><emu-t>function</emu-t><emu-t>*</emu-t><emu-nt optional="" id="_ref_13010"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13011"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13012"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt><emu-t>}</emu-t></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-generator-function-definitions-static-semantics-propname">
<h1><span class="secnum">14.4.9</span>Static Semantics: PropName</h1>
<emu-see-also-para op="PropName"></emu-see-also-para>
<emu-grammar><emu-production name="GeneratorMethod" collapsed="">
<emu-nt><a href="#prod-GeneratorMethod">GeneratorMethod</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c5c757ac"><emu-t>*</emu-t><emu-nt id="_ref_13013"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13014"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13015"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return PropName of <emu-nt id="_ref_13016"><a href="#prod-PropertyName">PropertyName</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-generator-function-definitions-runtime-semantics-evaluatebody">
<h1><span class="secnum">14.4.10</span>Runtime Semantics: EvaluateBody</h1>
<p>With parameters <var>functionObject</var> and <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4115"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> <var>argumentsList</var>.</p>
<emu-see-also-para op="EvaluateBody"></emu-see-also-para>
<emu-grammar><emu-production name="GeneratorBody" collapsed="">
<emu-nt><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8aa65b90"><emu-nt id="_ref_13017"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Perform ?&nbsp;<emu-xref aoid="FunctionDeclarationInstantiation" id="_ref_4116"><a href="#sec-functiondeclarationinstantiation">FunctionDeclarationInstantiation</a></emu-xref>(<var>functionObject</var>, <var>argumentsList</var>).</li><li>Let <var>G</var> be ?&nbsp;<emu-xref aoid="OrdinaryCreateFromConstructor" id="_ref_4117"><a href="#sec-ordinarycreatefromconstructor">OrdinaryCreateFromConstructor</a></emu-xref>(<var>functionObject</var>, <code>"%GeneratorPrototype%"</code>, « [[GeneratorState]], [[GeneratorContext]] »).</li><li>Perform <emu-xref aoid="GeneratorStart" id="_ref_4118"><a href="#sec-generatorstart">GeneratorStart</a></emu-xref>(<var>G</var>, <emu-nt id="_ref_13018"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt>).</li><li>Return <emu-xref aoid="Completion" id="_ref_4119"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref> { [[Type]]: <emu-const>return</emu-const>, [[Value]]: <var>G</var>, [[Target]]: <emu-const>empty</emu-const> }.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-generator-function-definitions-runtime-semantics-instantiatefunctionobject">
<h1><span class="secnum">14.4.11</span>Runtime Semantics: InstantiateFunctionObject</h1>
<p>With parameter <var>scope</var>.</p>
<emu-see-also-para op="InstantiateFunctionObject"></emu-see-also-para>
<emu-grammar><emu-production name="GeneratorDeclaration" collapsed="">
<emu-nt><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="7dbc99b6"><emu-t>function</emu-t><emu-t>*</emu-t><emu-nt id="_ref_13019"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13020"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13021"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If the function code for <emu-nt id="_ref_13022"><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a></emu-nt> is <emu-xref href="#sec-strict-mode-code" id="_ref_4120"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, let <var>strict</var> be <emu-val>true</emu-val>. Otherwise let <var>strict</var> be <emu-val>false</emu-val>.</li><li>Let <var>name</var> be StringValue of <emu-nt id="_ref_13023"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt>.</li><li>Let <var>F</var> be <emu-xref aoid="GeneratorFunctionCreate" id="_ref_4121"><a href="#sec-generatorfunctioncreate">GeneratorFunctionCreate</a></emu-xref>(<emu-const>Normal</emu-const>, <emu-nt id="_ref_13024"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt>, <emu-nt id="_ref_13025"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt>, <var>scope</var>, <var>strict</var>).</li><li>Let <var>prototype</var> be <emu-xref aoid="ObjectCreate" id="_ref_4122"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-generator-prototype" id="_ref_4123"><a href="#sec-properties-of-generator-prototype">%GeneratorPrototype%</a></emu-xref>).</li><li>Perform <emu-xref aoid="DefinePropertyOrThrow" id="_ref_4124"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>F</var>, <code>"prototype"</code>, PropertyDescriptor { [[Value]]: <var>prototype</var>, [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }).</li><li>Perform <emu-xref aoid="SetFunctionName" id="_ref_4125"><a href="#sec-setfunctionname">SetFunctionName</a></emu-xref>(<var>F</var>, <var>name</var>).</li><li>Set <var>F</var>.[[SourceText]] to the source text matched by <emu-nt id="_ref_13026"><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a></emu-nt>.</li><li>Return <var>F</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="GeneratorDeclaration" collapsed="">
<emu-nt><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0d271960"><emu-t>function</emu-t><emu-t>*</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13027"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13028"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>F</var> be <emu-xref aoid="GeneratorFunctionCreate" id="_ref_4126"><a href="#sec-generatorfunctioncreate">GeneratorFunctionCreate</a></emu-xref>(<emu-const>Normal</emu-const>, <emu-nt id="_ref_13029"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt>, <emu-nt id="_ref_13030"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt>, <var>scope</var>, <emu-val>true</emu-val>).</li><li>Let <var>prototype</var> be <emu-xref aoid="ObjectCreate" id="_ref_4127"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-generator-prototype" id="_ref_4128"><a href="#sec-properties-of-generator-prototype">%GeneratorPrototype%</a></emu-xref>).</li><li>Perform <emu-xref aoid="DefinePropertyOrThrow" id="_ref_4129"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>F</var>, <code>"prototype"</code>, PropertyDescriptor { [[Value]]: <var>prototype</var>, [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }).</li><li>Perform <emu-xref aoid="SetFunctionName" id="_ref_4130"><a href="#sec-setfunctionname">SetFunctionName</a></emu-xref>(<var>F</var>, <code>"default"</code>).</li><li>Set <var>F</var>.[[SourceText]] to the source text matched by <emu-nt id="_ref_13031"><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a></emu-nt>.</li><li>Return <var>F</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>An anonymous <emu-nt id="_ref_13032"><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a></emu-nt> can only occur as part of an <code>export default</code> declaration, and its function code is therefore always <emu-xref href="#sec-strict-mode-code" id="_ref_4131"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-generator-function-definitions-runtime-semantics-propertydefinitionevaluation">
<h1><span class="secnum">14.4.12</span>Runtime Semantics: PropertyDefinitionEvaluation</h1>
<p>With parameters <var>object</var> and <var>enumerable</var>.</p>
<emu-see-also-para op="PropertyDefinitionEvaluation"></emu-see-also-para>
<emu-grammar><emu-production name="GeneratorMethod" collapsed="">
<emu-nt><a href="#prod-GeneratorMethod">GeneratorMethod</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c5c757ac"><emu-t>*</emu-t><emu-nt id="_ref_13033"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13034"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13035"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>propKey</var> be the result of evaluating <emu-nt id="_ref_13036"><a href="#prod-PropertyName">PropertyName</a></emu-nt>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_4132"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>propKey</var>).</li><li>If the function code for this <emu-nt id="_ref_13037"><a href="#prod-GeneratorMethod">GeneratorMethod</a></emu-nt> is <emu-xref href="#sec-strict-mode-code" id="_ref_4133"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, let <var>strict</var> be <emu-val>true</emu-val>. Otherwise let <var>strict</var> be <emu-val>false</emu-val>.</li><li>Let <var>scope</var> be the <emu-xref href="#running-execution-context" id="_ref_4134"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment.</li><li>Let <var>closure</var> be <emu-xref aoid="GeneratorFunctionCreate" id="_ref_4135"><a href="#sec-generatorfunctioncreate">GeneratorFunctionCreate</a></emu-xref>(<emu-const>Method</emu-const>, <emu-nt id="_ref_13038"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt>, <emu-nt id="_ref_13039"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt>, <var>scope</var>, <var>strict</var>).</li><li>Perform <emu-xref aoid="MakeMethod" id="_ref_4136"><a href="#sec-makemethod">MakeMethod</a></emu-xref>(<var>closure</var>, <var>object</var>).</li><li>Let <var>prototype</var> be <emu-xref aoid="ObjectCreate" id="_ref_4137"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-generator-prototype" id="_ref_4138"><a href="#sec-properties-of-generator-prototype">%GeneratorPrototype%</a></emu-xref>).</li><li>Perform <emu-xref aoid="DefinePropertyOrThrow" id="_ref_4139"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>closure</var>, <code>"prototype"</code>, PropertyDescriptor { [[Value]]: <var>prototype</var>, [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }).</li><li>Perform <emu-xref aoid="SetFunctionName" id="_ref_4140"><a href="#sec-setfunctionname">SetFunctionName</a></emu-xref>(<var>closure</var>, <var>propKey</var>).</li><li>Set <var>closure</var>.[[SourceText]] to the source text matched by <emu-nt id="_ref_13040"><a href="#prod-GeneratorMethod">GeneratorMethod</a></emu-nt>.</li><li>Let <var>desc</var> be the PropertyDescriptor { [[Value]]: <var>closure</var>, [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <var>enumerable</var>, [[Configurable]]: <emu-val>true</emu-val> }.</li><li>Return ?&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_4141"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>object</var>, <var>propKey</var>, <var>desc</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-generator-function-definitions-runtime-semantics-namedevaluation">
<h1><span class="secnum">14.4.13</span>Runtime Semantics: NamedEvaluation</h1>
<p>With parameter <var>name</var>.</p>
<emu-grammar><emu-production name="GeneratorExpression" collapsed="">
<emu-nt><a href="#prod-GeneratorExpression">GeneratorExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0d271960"><emu-t>function</emu-t><emu-t>*</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13041"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13042"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>closure</var> be the result of evaluating this <emu-nt id="_ref_13043"><a href="#prod-GeneratorExpression">GeneratorExpression</a></emu-nt>.</li><li>Perform <emu-xref aoid="SetFunctionName" id="_ref_4142"><a href="#sec-setfunctionname">SetFunctionName</a></emu-xref>(<var>closure</var>, <var>name</var>).</li><li>Return <var>closure</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-generator-function-definitions-runtime-semantics-evaluation">
<h1><span class="secnum">14.4.14</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="GeneratorExpression" collapsed="">
<emu-nt><a href="#prod-GeneratorExpression">GeneratorExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0d271960"><emu-t>function</emu-t><emu-t>*</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13044"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13045"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If the function code for this <emu-nt id="_ref_13046"><a href="#prod-GeneratorExpression">GeneratorExpression</a></emu-nt> is <emu-xref href="#sec-strict-mode-code" id="_ref_4143"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, let <var>strict</var> be <emu-val>true</emu-val>. Otherwise let <var>strict</var> be <emu-val>false</emu-val>.</li><li>Let <var>scope</var> be the LexicalEnvironment of the <emu-xref href="#running-execution-context" id="_ref_4144"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Let <var>closure</var> be <emu-xref aoid="GeneratorFunctionCreate" id="_ref_4145"><a href="#sec-generatorfunctioncreate">GeneratorFunctionCreate</a></emu-xref>(<emu-const>Normal</emu-const>, <emu-nt id="_ref_13047"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt>, <emu-nt id="_ref_13048"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt>, <var>scope</var>, <var>strict</var>).</li><li>Let <var>prototype</var> be <emu-xref aoid="ObjectCreate" id="_ref_4146"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-generator-prototype" id="_ref_4147"><a href="#sec-properties-of-generator-prototype">%GeneratorPrototype%</a></emu-xref>).</li><li>Perform <emu-xref aoid="DefinePropertyOrThrow" id="_ref_4148"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>closure</var>, <code>"prototype"</code>, PropertyDescriptor { [[Value]]: <var>prototype</var>, [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }).</li><li>Set <var>closure</var>.[[SourceText]] to the source text matched by <emu-nt id="_ref_13049"><a href="#prod-GeneratorExpression">GeneratorExpression</a></emu-nt>.</li><li>Return <var>closure</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="GeneratorExpression" collapsed="">
<emu-nt><a href="#prod-GeneratorExpression">GeneratorExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="7dbc99b6"><emu-t>function</emu-t><emu-t>*</emu-t><emu-nt id="_ref_13050"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13051"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13052"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If the function code for this <emu-nt id="_ref_13053"><a href="#prod-GeneratorExpression">GeneratorExpression</a></emu-nt> is <emu-xref href="#sec-strict-mode-code" id="_ref_4149"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, let <var>strict</var> be <emu-val>true</emu-val>. Otherwise let <var>strict</var> be <emu-val>false</emu-val>.</li><li>Let <var>scope</var> be the <emu-xref href="#running-execution-context" id="_ref_4150"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment.</li><li>Let <var>funcEnv</var> be <emu-xref aoid="NewDeclarativeEnvironment" id="_ref_4151"><a href="#sec-newdeclarativeenvironment">NewDeclarativeEnvironment</a></emu-xref>(<var>scope</var>).</li><li>Let <var>envRec</var> be <var>funcEnv</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_4152"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref>.</li><li>Let <var>name</var> be StringValue of <emu-nt id="_ref_13054"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt>.</li><li>Perform <var>envRec</var>.CreateImmutableBinding(<var>name</var>, <emu-val>false</emu-val>).</li><li>Let <var>closure</var> be <emu-xref aoid="GeneratorFunctionCreate" id="_ref_4153"><a href="#sec-generatorfunctioncreate">GeneratorFunctionCreate</a></emu-xref>(<emu-const>Normal</emu-const>, <emu-nt id="_ref_13055"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt>, <emu-nt id="_ref_13056"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt>, <var>funcEnv</var>, <var>strict</var>).</li><li>Let <var>prototype</var> be <emu-xref aoid="ObjectCreate" id="_ref_4154"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-generator-prototype" id="_ref_4155"><a href="#sec-properties-of-generator-prototype">%GeneratorPrototype%</a></emu-xref>).</li><li>Perform <emu-xref aoid="DefinePropertyOrThrow" id="_ref_4156"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>closure</var>, <code>"prototype"</code>, PropertyDescriptor { [[Value]]: <var>prototype</var>, [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }).</li><li>Perform <emu-xref aoid="SetFunctionName" id="_ref_4157"><a href="#sec-setfunctionname">SetFunctionName</a></emu-xref>(<var>closure</var>, <var>name</var>).</li><li>Perform <var>envRec</var>.InitializeBinding(<var>name</var>, <var>closure</var>).</li><li>Set <var>closure</var>.[[SourceText]] to the source text matched by <emu-nt id="_ref_13057"><a href="#prod-GeneratorExpression">GeneratorExpression</a></emu-nt>.</li><li>Return <var>closure</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <emu-nt id="_ref_13058"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt> in a <emu-nt id="_ref_13059"><a href="#prod-GeneratorExpression">GeneratorExpression</a></emu-nt> can be referenced from inside the <emu-nt id="_ref_13060"><a href="#prod-GeneratorExpression">GeneratorExpression</a></emu-nt>'s <emu-nt id="_ref_13061"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt> to allow the generator code to call itself recursively. However, unlike in a <emu-nt id="_ref_13062"><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a></emu-nt>, the <emu-nt id="_ref_13063"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt> in a <emu-nt id="_ref_13064"><a href="#prod-GeneratorExpression">GeneratorExpression</a></emu-nt> cannot be referenced from and does not affect the scope enclosing the <emu-nt id="_ref_13065"><a href="#prod-GeneratorExpression">GeneratorExpression</a></emu-nt>.</p>
</div></emu-note>
<emu-grammar><emu-production name="YieldExpression" collapsed="">
<emu-nt><a href="#prod-YieldExpression">YieldExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d1df3360"><emu-t>yield</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>generatorKind</var> be !&nbsp;<emu-xref aoid="GetGeneratorKind" id="_ref_4158"><a href="#sec-getgeneratorkind">GetGeneratorKind</a></emu-xref>().</li><li>If <var>generatorKind</var> is <emu-const>async</emu-const>, then return ?&nbsp;<emu-xref aoid="AsyncGeneratorYield" id="_ref_4159"><a href="#sec-asyncgeneratoryield">AsyncGeneratorYield</a></emu-xref>(<emu-val>undefined</emu-val>).</li><li>Otherwise, return ?&nbsp;<emu-xref aoid="GeneratorYield" id="_ref_4160"><a href="#sec-generatoryield">GeneratorYield</a></emu-xref>(<emu-xref aoid="CreateIterResultObject" id="_ref_4161"><a href="#sec-createiterresultobject">CreateIterResultObject</a></emu-xref>(<emu-val>undefined</emu-val>, <emu-val>false</emu-val>)).
</li></ol></emu-alg>
<emu-grammar><emu-production name="YieldExpression" collapsed="">
<emu-nt><a href="#prod-YieldExpression">YieldExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e741ede8"><emu-t>yield</emu-t><emu-nt id="_ref_13066"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>generatorKind</var> be !&nbsp;<emu-xref aoid="GetGeneratorKind" id="_ref_4162"><a href="#sec-getgeneratorkind">GetGeneratorKind</a></emu-xref>().</li><li>Let <var>exprRef</var> be the result of evaluating <emu-nt id="_ref_13067"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Let <var>value</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_4163"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>exprRef</var>).</li><li>If <var>generatorKind</var> is <emu-const>async</emu-const>, then return ?&nbsp;<emu-xref aoid="AsyncGeneratorYield" id="_ref_4164"><a href="#sec-asyncgeneratoryield">AsyncGeneratorYield</a></emu-xref>(<var>value</var>).</li><li>Otherwise, return ?&nbsp;<emu-xref aoid="GeneratorYield" id="_ref_4165"><a href="#sec-generatoryield">GeneratorYield</a></emu-xref>(<emu-xref aoid="CreateIterResultObject" id="_ref_4166"><a href="#sec-createiterresultobject">CreateIterResultObject</a></emu-xref>(<var>value</var>, <emu-val>false</emu-val>)).
</li></ol></emu-alg>
<emu-grammar><emu-production name="YieldExpression" collapsed="">
<emu-nt><a href="#prod-YieldExpression">YieldExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="47a33813"><emu-t>yield</emu-t><emu-t>*</emu-t><emu-nt id="_ref_13068"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>generatorKind</var> be !&nbsp;<emu-xref aoid="GetGeneratorKind" id="_ref_4167"><a href="#sec-getgeneratorkind">GetGeneratorKind</a></emu-xref>().</li><li>Let <var>exprRef</var> be the result of evaluating <emu-nt id="_ref_13069"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Let <var>value</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_4168"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>exprRef</var>).</li><li>Let <var>iteratorRecord</var> be ?&nbsp;<emu-xref aoid="GetIterator" id="_ref_4169"><a href="#sec-getiterator">GetIterator</a></emu-xref>(<var>value</var>, <var>generatorKind</var>).</li><li>Let <var>iterator</var> be <var>iteratorRecord</var>.[[Iterator]].</li><li>Let <var>received</var> be <emu-xref aoid="NormalCompletion" id="_ref_4170"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-val>undefined</emu-val>).</li><li>Repeat,<ol><li>If <var>received</var>.[[Type]] is <emu-const>normal</emu-const>, then<ol><li>Let <var>innerResult</var> be ?&nbsp;<emu-xref aoid="Call" id="_ref_4171"><a href="#sec-call">Call</a></emu-xref>(<var>iteratorRecord</var>.[[NextMethod]], <var>iteratorRecord</var>.[[Iterator]], « <var>received</var>.[[Value]] »).</li><li>If <var>generatorKind</var> is <emu-const>async</emu-const>, then set <var>innerResult</var> to ?&nbsp;<emu-xref aoid="Await" id="_ref_4172"><a href="#await">Await</a></emu-xref>(<var>innerResult</var>).</li><li>If <emu-xref aoid="Type" id="_ref_4173"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>innerResult</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>done</var> be ?&nbsp;<emu-xref aoid="IteratorComplete" id="_ref_4174"><a href="#sec-iteratorcomplete">IteratorComplete</a></emu-xref>(<var>innerResult</var>).</li><li>If <var>done</var> is <emu-val>true</emu-val>, then<ol><li>Return ?&nbsp;<emu-xref aoid="IteratorValue" id="_ref_4175"><a href="#sec-iteratorvalue">IteratorValue</a></emu-xref>(<var>innerResult</var>).</li></ol></li><li>If <var>generatorKind</var> is <emu-const>async</emu-const>, then set <var>received</var> to <emu-xref aoid="AsyncGeneratorYield" id="_ref_4176"><a href="#sec-asyncgeneratoryield">AsyncGeneratorYield</a></emu-xref>(? <emu-xref aoid="IteratorValue" id="_ref_4177"><a href="#sec-iteratorvalue">IteratorValue</a></emu-xref>(<var>innerResult</var>)).</li><li>Else, set <var>received</var> to <emu-xref aoid="GeneratorYield" id="_ref_4178"><a href="#sec-generatoryield">GeneratorYield</a></emu-xref>(<var>innerResult</var>).</li></ol></li><li>Else if <var>received</var>.[[Type]] is <emu-const>throw</emu-const>, then<ol><li>Let <var>throw</var> be ?&nbsp;<emu-xref aoid="GetMethod" id="_ref_4179"><a href="#sec-getmethod">GetMethod</a></emu-xref>(<var>iterator</var>, <code>"throw"</code>).</li><li>If <var>throw</var> is not <emu-val>undefined</emu-val>, then<ol><li>Let <var>innerResult</var> be ?&nbsp;<emu-xref aoid="Call" id="_ref_4180"><a href="#sec-call">Call</a></emu-xref>(<var>throw</var>, <var>iterator</var>, « <var>received</var>.[[Value]] »).</li><li>If <var>generatorKind</var> is <emu-const>async</emu-const>, then set <var>innerResult</var> to ?&nbsp;<emu-xref aoid="Await" id="_ref_4181"><a href="#await">Await</a></emu-xref>(<var>innerResult</var>).</li><li>NOTE: Exceptions from the inner iterator <code>throw</code> method are propagated. Normal completions from an inner <code>throw</code> method are processed similarly to an inner <code>next</code>.</li><li>If <emu-xref aoid="Type" id="_ref_4182"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>innerResult</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>done</var> be ?&nbsp;<emu-xref aoid="IteratorComplete" id="_ref_4183"><a href="#sec-iteratorcomplete">IteratorComplete</a></emu-xref>(<var>innerResult</var>).</li><li>If <var>done</var> is <emu-val>true</emu-val>, then<ol><li>Return ?&nbsp;<emu-xref aoid="IteratorValue" id="_ref_4184"><a href="#sec-iteratorvalue">IteratorValue</a></emu-xref>(<var>innerResult</var>).</li></ol></li><li>If <var>generatorKind</var> is <emu-const>async</emu-const>, then set <var>received</var> to <emu-xref aoid="AsyncGeneratorYield" id="_ref_4185"><a href="#sec-asyncgeneratoryield">AsyncGeneratorYield</a></emu-xref>(? <emu-xref aoid="IteratorValue" id="_ref_4186"><a href="#sec-iteratorvalue">IteratorValue</a></emu-xref>(<var>innerResult</var>)).</li><li>Else, set <var>received</var> to <emu-xref aoid="GeneratorYield" id="_ref_4187"><a href="#sec-generatoryield">GeneratorYield</a></emu-xref>(<var>innerResult</var>).</li></ol></li><li>Else,<ol><li>NOTE: If <var>iterator</var> does not have a <code>throw</code> method, this throw is going to terminate the <code>yield*</code> loop. But first we need to give <var>iterator</var> a chance to clean up.</li><li>Let <var>closeCompletion</var> be <emu-xref aoid="Completion" id="_ref_4188"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref> { [[Type]]: <emu-const>normal</emu-const>, [[Value]]: <emu-const>empty</emu-const>, [[Target]]: <emu-const>empty</emu-const> }.</li><li>If <var>generatorKind</var> is <emu-const>async</emu-const>, perform ?&nbsp;<emu-xref aoid="AsyncIteratorClose" id="_ref_4189"><a href="#sec-asynciteratorclose">AsyncIteratorClose</a></emu-xref>(<var>iteratorRecord</var>, <var>closeCompletion</var>).</li><li>Else, perform ?&nbsp;<emu-xref aoid="IteratorClose" id="_ref_4190"><a href="#sec-iteratorclose">IteratorClose</a></emu-xref>(<var>iteratorRecord</var>, <var>closeCompletion</var>).</li><li>NOTE: The next step throws a <emu-val>TypeError</emu-val> to indicate that there was a <code>yield*</code> protocol violation: <var>iterator</var> does not have a <code>throw</code> method.</li><li>Throw a <emu-val>TypeError</emu-val> exception.</li></ol></li></ol></li><li>Else,<ol><li><emu-xref href="#assert" id="_ref_4191"><a href="#assert">Assert</a></emu-xref>: <var>received</var>.[[Type]] is <emu-const>return</emu-const>.</li><li>Let <var>return</var> be ?&nbsp;<emu-xref aoid="GetMethod" id="_ref_4192"><a href="#sec-getmethod">GetMethod</a></emu-xref>(<var>iterator</var>, <code>"return"</code>).</li><li>If <var>return</var> is <emu-val>undefined</emu-val>, then<ol><li>If <var>generatorKind</var> is <emu-const>async</emu-const>, then set <var>received</var>.[[Value]] to ?&nbsp;<emu-xref aoid="Await" id="_ref_4193"><a href="#await">Await</a></emu-xref>(<var>received</var>.[[Value]]).</li><li>Return <emu-xref aoid="Completion" id="_ref_4194"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>received</var>).</li></ol></li><li>Let <var>innerReturnResult</var> be ?&nbsp;<emu-xref aoid="Call" id="_ref_4195"><a href="#sec-call">Call</a></emu-xref>(<var>return</var>, <var>iterator</var>, « <var>received</var>.[[Value]] »).</li><li>If <var>generatorKind</var> is <emu-const>async</emu-const>, then set <var>innerReturnResult</var> to ?&nbsp;<emu-xref aoid="Await" id="_ref_4196"><a href="#await">Await</a></emu-xref>(<var>innerReturnResult</var>).</li><li>If <emu-xref aoid="Type" id="_ref_4197"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>innerReturnResult</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>done</var> be ?&nbsp;<emu-xref aoid="IteratorComplete" id="_ref_4198"><a href="#sec-iteratorcomplete">IteratorComplete</a></emu-xref>(<var>innerReturnResult</var>).</li><li>If <var>done</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>value</var> be ?&nbsp;<emu-xref aoid="IteratorValue" id="_ref_4199"><a href="#sec-iteratorvalue">IteratorValue</a></emu-xref>(<var>innerReturnResult</var>).</li><li>Return <emu-xref aoid="Completion" id="_ref_4200"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref> { [[Type]]: <emu-const>return</emu-const>, [[Value]]: <var>value</var>, [[Target]]: <emu-const>empty</emu-const> }.</li></ol></li><li>If <var>generatorKind</var> is <emu-const>async</emu-const>, then set <var>received</var> to <emu-xref aoid="AsyncGeneratorYield" id="_ref_4201"><a href="#sec-asyncgeneratoryield">AsyncGeneratorYield</a></emu-xref>(? <emu-xref aoid="IteratorValue" id="_ref_4202"><a href="#sec-iteratorvalue">IteratorValue</a></emu-xref>(<var>innerReturnResult</var>)).</li><li>Else, set <var>received</var> to <emu-xref aoid="GeneratorYield" id="_ref_4203"><a href="#sec-generatoryield">GeneratorYield</a></emu-xref>(<var>innerReturnResult</var>).
</li></ol></li></ol></li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-async-generator-function-definitions">
<h1><span class="secnum">14.5</span>Async Generator Function Definitions</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="AsyncGeneratorMethod" params="Yield, Await" id="prod-AsyncGeneratorMethod">
<emu-nt params="Yield, Await"><a href="#prod-AsyncGeneratorMethod">AsyncGeneratorMethod</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a713bc4f"><emu-t>async</emu-t><emu-gann>[no <emu-nt id="_ref_13070"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-t>*</emu-t><emu-nt params="?Yield, ?Await" id="_ref_13071"><a href="#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_13072"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a><emu-mods><emu-params>[+Yield, +Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13073"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="AsyncGeneratorDeclaration" params="Yield, Await, Default" id="prod-AsyncGeneratorDeclaration">
<emu-nt params="Yield, Await, Default"><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a><emu-mods><emu-params>[Yield, Await, Default]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="bf1795ae"><emu-t>async</emu-t><emu-gann>[no <emu-nt id="_ref_13074"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-t>function</emu-t><emu-t>*</emu-t><emu-nt params="?Yield, ?Await" id="_ref_13075"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>(</emu-t><emu-nt params="+Yield, +Await" id="_ref_13076"><a href="#prod-FormalParameters">FormalParameters</a><emu-mods><emu-params>[+Yield, +Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13077"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="cdd34229" constraints="+Default"><emu-constraints>[+Default]</emu-constraints><emu-t>async</emu-t><emu-gann>[no <emu-nt id="_ref_13078"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-t>function</emu-t><emu-t>*</emu-t><emu-t>(</emu-t><emu-nt params="+Yield, +Await" id="_ref_13079"><a href="#prod-FormalParameters">FormalParameters</a><emu-mods><emu-params>[+Yield, +Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13080"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="AsyncGeneratorExpression" id="prod-AsyncGeneratorExpression">
<emu-nt><a href="#prod-AsyncGeneratorExpression">AsyncGeneratorExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ca1d1606"><emu-t>async</emu-t><emu-gann>[no <emu-nt id="_ref_13081"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-t>function</emu-t><emu-t>*</emu-t><emu-nt params="+Yield, +Await" optional="" id="_ref_13082"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[+Yield, +Await]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>(</emu-t><emu-nt params="+Yield, +Await" id="_ref_13083"><a href="#prod-FormalParameters">FormalParameters</a><emu-mods><emu-params>[+Yield, +Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13084"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="AsyncGeneratorBody" id="prod-AsyncGeneratorBody">
<emu-nt><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cd09a4ad"><emu-nt params="+Yield, +Await" id="_ref_13085"><a href="#prod-FunctionBody">FunctionBody</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 1</span><div class="note-contents">
<p><emu-nt id="_ref_13086"><a href="#prod-YieldExpression">YieldExpression</a></emu-nt> and <emu-nt id="_ref_13087"><a href="#prod-AwaitExpression">AwaitExpression</a></emu-nt> cannot be used within the <emu-nt id="_ref_13088"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt> of an async generator function because any expressions that are part of <emu-nt id="_ref_13089"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt> are evaluated before the resulting async generator object is in a resumable state.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p><emu-xref href="#sec-algorithm-conventions-abstract-operations" id="_ref_4204"><a href="#sec-algorithm-conventions-abstract-operations">Abstract operations</a></emu-xref> relating to async generator objects are defined in <emu-xref href="#sec-asyncgenerator-abstract-operations" id="_ref_357"><a href="#sec-asyncgenerator-abstract-operations">25.5.3</a></emu-xref>.</p>
</div></emu-note>
<emu-clause id="sec-async-generator-function-definitions-static-semantics-early-errors">
<h1><span class="secnum">14.5.1</span>Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="AsyncGeneratorMethod" collapsed="">
<emu-nt><a href="#prod-AsyncGeneratorMethod">AsyncGeneratorMethod</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="be384400"><emu-t>async</emu-t><emu-t>*</emu-t><emu-nt id="_ref_13090"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13091"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13092"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>It is a Syntax Error if HasDirectSuper of <emu-nt id="_ref_13093"><a href="#prod-AsyncGeneratorMethod">AsyncGeneratorMethod</a></emu-nt> is <emu-val>true</emu-val>.</li>
<li>It is a Syntax Error if <emu-nt id="_ref_13094"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt> Contains <emu-nt id="_ref_13095"><a href="#prod-YieldExpression">YieldExpression</a></emu-nt> is <emu-val>true</emu-val>.</li>
<li>It is a Syntax Error if <emu-nt id="_ref_13096"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt> Contains <emu-nt id="_ref_13097"><a href="#prod-AwaitExpression">AwaitExpression</a></emu-nt> is <emu-val>true</emu-val>.</li>
<li>It is a Syntax Error if ContainsUseStrict of <emu-nt id="_ref_13098"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt> is <emu-val>true</emu-val> and IsSimpleParameterList of <emu-nt id="_ref_13099"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt> is <emu-val>false</emu-val>.</li>
<li>It is a Syntax Error if any element of the BoundNames of <emu-nt id="_ref_13100"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt> also occurs in the LexicallyDeclaredNames of <emu-nt id="_ref_13101"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt>.</li>
</ul>
<emu-grammar><emu-production name="AsyncGeneratorDeclaration" collapsed="">
<emu-nt><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="13d2cc33"><emu-t>async</emu-t><emu-t>function</emu-t><emu-t>*</emu-t><emu-nt id="_ref_13102"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13103"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13104"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="AsyncGeneratorDeclaration" collapsed="">
<emu-nt><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c51514e0"><emu-t>async</emu-t><emu-t>function</emu-t><emu-t>*</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13105"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13106"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="AsyncGeneratorExpression" collapsed="">
<emu-nt><a href="#prod-AsyncGeneratorExpression">AsyncGeneratorExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="9cf94eaf"><emu-t>async</emu-t><emu-t>function</emu-t><emu-t>*</emu-t><emu-nt optional="" id="_ref_13107"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13108"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13109"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>If the source code matching this production is <emu-xref href="#sec-strict-mode-code" id="_ref_4205"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, the Early Error rules for <emu-grammar><emu-production name="UniqueFormalParameters" collapsed="" class=" inline">
<emu-nt><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0218c6f5"><emu-nt id="_ref_13110"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> are applied.</li>
<li>If the source code matching this production is <emu-xref href="#sec-strict-mode-code" id="_ref_4206"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, it is a Syntax Error if <emu-nt id="_ref_13111"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt> is the <emu-nt id="_ref_13112"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt> <code>eval</code> or the <emu-nt id="_ref_13113"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt> <code>arguments</code>.</li>
<li>It is a Syntax Error if ContainsUseStrict of <emu-nt id="_ref_13114"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt> is <emu-val>true</emu-val> and IsSimpleParameterList of <emu-nt id="_ref_13115"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt> is <emu-val>false</emu-val>.</li>
<li>It is a Syntax Error if any element of the BoundNames of <emu-nt id="_ref_13116"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt> also occurs in the LexicallyDeclaredNames of <emu-nt id="_ref_13117"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt>.</li>
<li>It is a Syntax Error if <emu-nt id="_ref_13118"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt> Contains <emu-nt id="_ref_13119"><a href="#prod-YieldExpression">YieldExpression</a></emu-nt> is <emu-val>true</emu-val>.</li>
<li>It is a Syntax Error if <emu-nt id="_ref_13120"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt> Contains <emu-nt id="_ref_13121"><a href="#prod-AwaitExpression">AwaitExpression</a></emu-nt> is <emu-val>true</emu-val>.</li>
<li>It is a Syntax Error if <emu-nt id="_ref_13122"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt> Contains <emu-nt id="_ref_13123"><a href="#prod-SuperProperty">SuperProperty</a></emu-nt> is <emu-val>true</emu-val>.</li>
<li>It is a Syntax Error if <emu-nt id="_ref_13124"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt> Contains <emu-nt id="_ref_13125"><a href="#prod-SuperProperty">SuperProperty</a></emu-nt> is <emu-val>true</emu-val>.</li>
<li>It is a Syntax Error if <emu-nt id="_ref_13126"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt> Contains <emu-nt id="_ref_13127"><a href="#prod-SuperCall">SuperCall</a></emu-nt> is <emu-val>true</emu-val>.</li>
<li>It is a Syntax Error if <emu-nt id="_ref_13128"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt> Contains <emu-nt id="_ref_13129"><a href="#prod-SuperCall">SuperCall</a></emu-nt> is <emu-val>true</emu-val>.</li>
</ul>
</emu-clause>
<emu-clause id="sec-async-generator-function-definitions-static-semantics-boundnames">
<h1><span class="secnum">14.5.2</span>Static Semantics: BoundNames</h1>
<emu-see-also-para op="BoundNames"></emu-see-also-para>
<emu-grammar><emu-production name="AsyncGeneratorDeclaration" collapsed="">
<emu-nt><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="13d2cc33"><emu-t>async</emu-t><emu-t>function</emu-t><emu-t>*</emu-t><emu-nt id="_ref_13130"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13131"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13132"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the BoundNames of <emu-nt id="_ref_13133"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="AsyncGeneratorDeclaration" collapsed="">
<emu-nt><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c51514e0"><emu-t>async</emu-t><emu-t>function</emu-t><emu-t>*</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13134"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13135"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return « <code>"*default*"</code> ».
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p><code>"*default*"</code> is used within this specification as
a synthetic name for hoistable anonymous functions that are defined
using export declarations.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-async-generator-function-definitions-static-semantics-computedpropertycontains">
<h1><span class="secnum">14.5.3</span>Static Semantics: ComputedPropertyContains</h1>
<p>With parameter <var>symbol</var>.</p>
<emu-see-also-para op="ComputedPropertyContains"></emu-see-also-para>
<emu-grammar><emu-production name="AsyncGeneratorMethod" collapsed="">
<emu-nt><a href="#prod-AsyncGeneratorMethod">AsyncGeneratorMethod</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="be384400"><emu-t>async</emu-t><emu-t>*</emu-t><emu-nt id="_ref_13136"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13137"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13138"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the result of ComputedPropertyContains for <emu-nt id="_ref_13139"><a href="#prod-PropertyName">PropertyName</a></emu-nt> with argument <var>symbol</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-async-generator-function-definitions-static-semantics-contains">
<h1><span class="secnum">14.5.4</span>Static Semantics: Contains</h1>
<p>With parameter <var>symbol</var>.</p>
<emu-see-also-para op="Contains"></emu-see-also-para>
<emu-grammar><emu-production name="AsyncGeneratorDeclaration" collapsed="">
<emu-nt><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="13d2cc33"><emu-t>async</emu-t><emu-t>function</emu-t><emu-t>*</emu-t><emu-nt id="_ref_13140"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13141"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13142"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="AsyncGeneratorDeclaration" collapsed="">
<emu-nt><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c51514e0"><emu-t>async</emu-t><emu-t>function</emu-t><emu-t>*</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13143"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13144"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="AsyncGeneratorExpression" collapsed="">
<emu-nt><a href="#prod-AsyncGeneratorExpression">AsyncGeneratorExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="9cf94eaf"><emu-t>async</emu-t><emu-t>function</emu-t><emu-t>*</emu-t><emu-nt optional="" id="_ref_13145"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13146"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13147"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Static semantic rules that depend upon substructure generally do not look into function definitions.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-async-generator-function-definitions-static-semantics-hasdirectsuper">
<h1><span class="secnum">14.5.5</span>Static Semantics: HasDirectSuper</h1>
<emu-see-also-para op="HasDirectSuper"></emu-see-also-para>
<emu-grammar><emu-production name="AsyncGeneratorMethod" collapsed="">
<emu-nt><a href="#prod-AsyncGeneratorMethod">AsyncGeneratorMethod</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="be384400"><emu-t>async</emu-t><emu-t>*</emu-t><emu-nt id="_ref_13148"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13149"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13150"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <emu-nt id="_ref_13151"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt> Contains <emu-nt id="_ref_13152"><a href="#prod-SuperCall">SuperCall</a></emu-nt> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return <emu-nt id="_ref_13153"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt> Contains <emu-nt id="_ref_13154"><a href="#prod-SuperCall">SuperCall</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-async-generator-function-definitions-static-semantics-hasname">
<h1><span class="secnum">14.5.6</span>Static Semantics: HasName</h1>
<emu-see-also-para op="HasName"></emu-see-also-para>
<emu-grammar><emu-production name="AsyncGeneratorExpression" collapsed="">
<emu-nt><a href="#prod-AsyncGeneratorExpression">AsyncGeneratorExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c51514e0"><emu-t>async</emu-t><emu-t>function</emu-t><emu-t>*</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13155"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13156"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt><emu-t>}</emu-t></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="AsyncGeneratorExpression" collapsed="">
<emu-nt><a href="#prod-AsyncGeneratorExpression">AsyncGeneratorExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="13d2cc33"><emu-t>async</emu-t><emu-t>function</emu-t><emu-t>*</emu-t><emu-nt id="_ref_13157"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13158"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13159"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt><emu-t>}</emu-t></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-async-generator-function-definitions-static-semantics-isconstantdeclaration">
<h1><span class="secnum">14.5.7</span>Static Semantics: IsConstantDeclaration</h1>
<emu-see-also-para op="IsConstantDeclaration"></emu-see-also-para>
<emu-grammar><emu-production name="AsyncGeneratorDeclaration" collapsed="">
<emu-nt><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="13d2cc33"><emu-t>async</emu-t><emu-t>function</emu-t><emu-t>*</emu-t><emu-nt id="_ref_13160"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13161"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13162"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="AsyncGeneratorDeclaration" collapsed="">
<emu-nt><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c51514e0"><emu-t>async</emu-t><emu-t>function</emu-t><emu-t>*</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13163"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13164"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-async-generator-function-definitions-static-semantics-isfunctiondefinition">
<h1><span class="secnum">14.5.8</span>Static Semantics: IsFunctionDefinition</h1>
<emu-see-also-para op="IsFunctionDefinition"></emu-see-also-para>
<emu-grammar><emu-production name="AsyncGeneratorExpression" collapsed="">
<emu-nt><a href="#prod-AsyncGeneratorExpression">AsyncGeneratorExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="9cf94eaf"><emu-t>async</emu-t><emu-t>function</emu-t><emu-t>*</emu-t><emu-nt optional="" id="_ref_13165"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13166"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13167"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt><emu-t>}</emu-t></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-async-generator-function-definitions-static-semantics-propname">
<h1><span class="secnum">14.5.9</span>Static Semantics: PropName</h1>
<emu-see-also-para op="PropName"></emu-see-also-para>
<emu-grammar><emu-production name="AsyncGeneratorMethod" collapsed="">
<emu-nt><a href="#prod-AsyncGeneratorMethod">AsyncGeneratorMethod</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="be384400"><emu-t>async</emu-t><emu-t>*</emu-t><emu-nt id="_ref_13168"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13169"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13170"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return PropName of <emu-nt id="_ref_13171"><a href="#prod-PropertyName">PropertyName</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-asyncgenerator-definitions-evaluatebody">
<h1><span class="secnum">14.5.10</span>Runtime Semantics: EvaluateBody</h1>
<p>With parameters <var>functionObject</var> and <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4207"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> <var>argumentsList</var>.</p>
<emu-grammar><emu-production name="AsyncGeneratorBody" collapsed="">
<emu-nt><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8aa65b90"><emu-nt id="_ref_13172"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Perform ?&nbsp;<emu-xref aoid="FunctionDeclarationInstantiation" id="_ref_4208"><a href="#sec-functiondeclarationinstantiation">FunctionDeclarationInstantiation</a></emu-xref>(<var>functionObject</var>, <var>argumentsList</var>).</li><li>Let <var>generator</var> be ?&nbsp;<emu-xref aoid="OrdinaryCreateFromConstructor" id="_ref_4209"><a href="#sec-ordinarycreatefromconstructor">OrdinaryCreateFromConstructor</a></emu-xref>(<var>functionObject</var>, <code>"%AsyncGeneratorPrototype%"</code>, « [[AsyncGeneratorState]], [[AsyncGeneratorContext]], [[AsyncGeneratorQueue]] »).</li><li>Perform !&nbsp;<emu-xref aoid="AsyncGeneratorStart" id="_ref_4210"><a href="#sec-asyncgeneratorstart">AsyncGeneratorStart</a></emu-xref>(<var>generator</var>, <emu-nt id="_ref_13173"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt>).</li><li>Return <emu-xref aoid="Completion" id="_ref_4211"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref> { [[Type]]: <emu-const>return</emu-const>, [[Value]]: <var>generator</var>, [[Target]]: <emu-const>empty</emu-const> }.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-asyncgenerator-definitions-instantiatefunctionobject">
<h1><span class="secnum">14.5.11</span>Runtime Semantics: InstantiateFunctionObject</h1>
<p>With parameter <var>scope</var>.</p>
<emu-grammar><emu-production name="AsyncGeneratorDeclaration" collapsed="">
<emu-nt><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="13d2cc33"><emu-t>async</emu-t><emu-t>function</emu-t><emu-t>*</emu-t><emu-nt id="_ref_13174"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13175"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13176"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If the function code for <emu-nt id="_ref_13177"><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt> is <emu-xref href="#sec-strict-mode-code" id="_ref_4212"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, let <var>strict</var> be <emu-val>true</emu-val>. Otherwise let <var>strict</var> be <emu-val>false</emu-val>.</li><li>Let <var>name</var> be StringValue of <emu-nt id="_ref_13178"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt>.</li><li>Let <var>F</var> be !&nbsp;<emu-xref aoid="AsyncGeneratorFunctionCreate" id="_ref_4213"><a href="#sec-asyncgeneratorfunctioncreate">AsyncGeneratorFunctionCreate</a></emu-xref>(<emu-const>Normal</emu-const>, <emu-nt id="_ref_13179"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt>, <emu-nt id="_ref_13180"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt>, <var>scope</var>, <var>strict</var>).</li><li>Let <var>prototype</var> be !&nbsp;<emu-xref aoid="ObjectCreate" id="_ref_4214"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-asyncgenerator-prototype" id="_ref_4215"><a href="#sec-properties-of-asyncgenerator-prototype">%AsyncGeneratorPrototype%</a></emu-xref>).</li><li>Perform !&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_4216"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>F</var>, <code>"prototype"</code>, PropertyDescriptor { [[Value]]: <var>prototype</var>, [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }).</li><li>Perform !&nbsp;<emu-xref aoid="SetFunctionName" id="_ref_4217"><a href="#sec-setfunctionname">SetFunctionName</a></emu-xref>(<var>F</var>, <var>name</var>).</li><li>Set <var>F</var>.[[SourceText]] to the source text matched by <emu-nt id="_ref_13181"><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt>.</li><li>Return <var>F</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="AsyncGeneratorDeclaration" collapsed="">
<emu-nt><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c51514e0"><emu-t>async</emu-t><emu-t>function</emu-t><emu-t>*</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13182"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13183"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If the function code for <emu-nt id="_ref_13184"><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt> is <emu-xref href="#sec-strict-mode-code" id="_ref_4218"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, let <var>strict</var> be <emu-val>true</emu-val>. Otherwise let <var>strict</var> be <emu-val>false</emu-val>.</li><li>Let <var>F</var> be <emu-xref aoid="AsyncGeneratorFunctionCreate" id="_ref_4219"><a href="#sec-asyncgeneratorfunctioncreate">AsyncGeneratorFunctionCreate</a></emu-xref>(<emu-const>Normal</emu-const>, <emu-nt id="_ref_13185"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt>, <emu-nt id="_ref_13186"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt>, <var>scope</var>, <var>strict</var>).</li><li>Let <var>prototype</var> be <emu-xref aoid="ObjectCreate" id="_ref_4220"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-asyncgenerator-prototype" id="_ref_4221"><a href="#sec-properties-of-asyncgenerator-prototype">%AsyncGeneratorPrototype%</a></emu-xref>).</li><li>Perform <emu-xref aoid="DefinePropertyOrThrow" id="_ref_4222"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>F</var>, <code>"prototype"</code>, PropertyDescriptor { [[Value]]: <var>prototype</var>, [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }).</li><li>Perform <emu-xref aoid="SetFunctionName" id="_ref_4223"><a href="#sec-setfunctionname">SetFunctionName</a></emu-xref>(<var>F</var>, <code>"default"</code>).</li><li>Set <var>F</var>.[[SourceText]] to the source text matched by <emu-nt id="_ref_13187"><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt>.</li><li>Return <var>F</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>An anonymous <emu-nt id="_ref_13188"><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt> can only occur as part of an <code>export default</code> declaration.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-asyncgenerator-definitions-propertydefinitionevaluation">
<h1><span class="secnum">14.5.12</span>Runtime Semantics: PropertyDefinitionEvaluation</h1>
<p>With parameter <var>object</var> and <var>enumerable</var>.</p>
<emu-grammar><emu-production name="AsyncGeneratorMethod" collapsed="">
<emu-nt><a href="#prod-AsyncGeneratorMethod">AsyncGeneratorMethod</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="be384400"><emu-t>async</emu-t><emu-t>*</emu-t><emu-nt id="_ref_13189"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13190"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13191"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>propKey</var> be the result of evaluating <emu-nt id="_ref_13192"><a href="#prod-PropertyName">PropertyName</a></emu-nt>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_4224"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>propKey</var>).</li><li>If the function code for this <emu-nt id="_ref_13193"><a href="#prod-AsyncGeneratorMethod">AsyncGeneratorMethod</a></emu-nt> is <emu-xref href="#sec-strict-mode-code" id="_ref_4225"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, let <var>strict</var> be <emu-val>true</emu-val>. Otherwise let <var>strict</var> be <emu-val>false</emu-val>.</li><li>Let <var>scope</var> be the <emu-xref href="#running-execution-context" id="_ref_4226"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment.</li><li>Let <var>closure</var> be !&nbsp;<emu-xref aoid="AsyncGeneratorFunctionCreate" id="_ref_4227"><a href="#sec-asyncgeneratorfunctioncreate">AsyncGeneratorFunctionCreate</a></emu-xref>(<emu-const>Method</emu-const>, <emu-nt id="_ref_13194"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt>, <emu-nt id="_ref_13195"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt>, <var>scope</var>, <var>strict</var>).</li><li>Perform !&nbsp;<emu-xref aoid="MakeMethod" id="_ref_4228"><a href="#sec-makemethod">MakeMethod</a></emu-xref>(<var>closure</var>, <var>object</var>).</li><li>Let <var>prototype</var> be !&nbsp;<emu-xref aoid="ObjectCreate" id="_ref_4229"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-asyncgenerator-prototype" id="_ref_4230"><a href="#sec-properties-of-asyncgenerator-prototype">%AsyncGeneratorPrototype%</a></emu-xref>).</li><li>Perform !&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_4231"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>closure</var>, <code>"prototype"</code>, PropertyDescriptor { [[Value]]: <var>prototype</var>, [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }).</li><li>Perform !&nbsp;<emu-xref aoid="SetFunctionName" id="_ref_4232"><a href="#sec-setfunctionname">SetFunctionName</a></emu-xref>(<var>closure</var>, <var>propKey</var>).</li><li>Set <var>closure</var>.[[SourceText]] to the source text matched by <emu-nt id="_ref_13196"><a href="#prod-AsyncGeneratorMethod">AsyncGeneratorMethod</a></emu-nt>.</li><li>Let <var>desc</var> be PropertyDescriptor { [[Value]]: <var>closure</var>, [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <var>enumerable</var>, [[Configurable]]: <emu-val>true</emu-val> }.</li><li>Return ?&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_4233"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>object</var>, <var>propKey</var>, <var>desc</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-asyncgenerator-definitions-namedevaluation">
<h1><span class="secnum">14.5.13</span>Runtime Semantics: NamedEvaluation</h1>
<p>With parameter <var>name</var>.</p>
<emu-grammar><emu-production name="AsyncGeneratorExpression" collapsed="">
<emu-nt><a href="#prod-AsyncGeneratorExpression">AsyncGeneratorExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c51514e0"><emu-t>async</emu-t><emu-t>function</emu-t><emu-t>*</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13197"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13198"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>closure</var> be the result of evaluating this <emu-nt id="_ref_13199"><a href="#prod-AsyncGeneratorExpression">AsyncGeneratorExpression</a></emu-nt>.</li><li>Perform <emu-xref aoid="SetFunctionName" id="_ref_4234"><a href="#sec-setfunctionname">SetFunctionName</a></emu-xref>(<var>closure</var>, <var>name</var>).</li><li>Return <var>closure</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-asyncgenerator-definitions-evaluation">
<h1><span class="secnum">14.5.14</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="AsyncGeneratorExpression" collapsed="">
<emu-nt><a href="#prod-AsyncGeneratorExpression">AsyncGeneratorExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c51514e0"><emu-t>async</emu-t><emu-t>function</emu-t><emu-t>*</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13200"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13201"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If the function code for this <emu-nt id="_ref_13202"><a href="#prod-AsyncGeneratorExpression">AsyncGeneratorExpression</a></emu-nt> is <emu-xref href="#sec-strict-mode-code" id="_ref_4235"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, let <var>strict</var> be <emu-val>true</emu-val>. Otherwise let <var>strict</var> be <emu-val>false</emu-val>.</li><li>Let <var>scope</var> be the LexicalEnvironment of the <emu-xref href="#running-execution-context" id="_ref_4236"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Let <var>closure</var> be !&nbsp;<emu-xref aoid="AsyncGeneratorFunctionCreate" id="_ref_4237"><a href="#sec-asyncgeneratorfunctioncreate">AsyncGeneratorFunctionCreate</a></emu-xref>(<emu-const>Normal</emu-const>, <emu-nt id="_ref_13203"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt>, <emu-nt id="_ref_13204"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt>, <var>scope</var>, <var>strict</var>).</li><li>Let <var>prototype</var> be !&nbsp;<emu-xref aoid="ObjectCreate" id="_ref_4238"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-asyncgenerator-prototype" id="_ref_4239"><a href="#sec-properties-of-asyncgenerator-prototype">%AsyncGeneratorPrototype%</a></emu-xref>).</li><li>Perform !&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_4240"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>closure</var>, <code>"prototype"</code>, PropertyDescriptor { [[Value]]: <var>prototype</var>, [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }).</li><li>Set <var>closure</var>.[[SourceText]] to the source text matched by <emu-nt id="_ref_13205"><a href="#prod-AsyncGeneratorExpression">AsyncGeneratorExpression</a></emu-nt>.</li><li>Return <var>closure</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="AsyncGeneratorExpression" collapsed="">
<emu-nt><a href="#prod-AsyncGeneratorExpression">AsyncGeneratorExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="13d2cc33"><emu-t>async</emu-t><emu-t>function</emu-t><emu-t>*</emu-t><emu-nt id="_ref_13206"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13207"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13208"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If the function code for this <emu-nt id="_ref_13209"><a href="#prod-AsyncGeneratorExpression">AsyncGeneratorExpression</a></emu-nt> is <emu-xref href="#sec-strict-mode-code" id="_ref_4241"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, let <var>strict</var> be <emu-val>true</emu-val>. Otherwise let <var>strict</var> be <emu-val>false</emu-val>.</li><li>Let <var>scope</var> be the <emu-xref href="#running-execution-context" id="_ref_4242"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment.</li><li>Let <var>funcEnv</var> be !&nbsp;<emu-xref aoid="NewDeclarativeEnvironment" id="_ref_4243"><a href="#sec-newdeclarativeenvironment">NewDeclarativeEnvironment</a></emu-xref>(<var>scope</var>).</li><li>Let <var>envRec</var> be <var>funcEnv</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_4244"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref>.</li><li>Let <var>name</var> be StringValue of <emu-nt id="_ref_13210"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt>.</li><li>Perform ! <var>envRec</var>.CreateImmutableBinding(<var>name</var>).</li><li>Let <var>closure</var> be !&nbsp;<emu-xref aoid="AsyncGeneratorFunctionCreate" id="_ref_4245"><a href="#sec-asyncgeneratorfunctioncreate">AsyncGeneratorFunctionCreate</a></emu-xref>(<emu-const>Normal</emu-const>, <emu-nt id="_ref_13211"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt>, <emu-nt id="_ref_13212"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt>, <var>funcEnv</var>, <var>strict</var>).</li><li>Let <var>prototype</var> be !&nbsp;<emu-xref aoid="ObjectCreate" id="_ref_4246"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-asyncgenerator-prototype" id="_ref_4247"><a href="#sec-properties-of-asyncgenerator-prototype">%AsyncGeneratorPrototype%</a></emu-xref>).</li><li>Perform !&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_4248"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>closure</var>, <code>"prototype"</code>, PropertyDescriptor { [[Value]]: <var>prototype</var>, [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }).</li><li>Perform !&nbsp;<emu-xref aoid="SetFunctionName" id="_ref_4249"><a href="#sec-setfunctionname">SetFunctionName</a></emu-xref>(<var>closure</var>, <var>name</var>).</li><li>Perform ! <var>envRec</var>.InitializeBinding(<var>name</var>, <var>closure</var>).</li><li>Set <var>closure</var>.[[SourceText]] to the source text matched by <emu-nt id="_ref_13213"><a href="#prod-AsyncGeneratorExpression">AsyncGeneratorExpression</a></emu-nt>.</li><li>Return <var>closure</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <emu-nt id="_ref_13214"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt> in an <emu-nt id="_ref_13215"><a href="#prod-AsyncGeneratorExpression">AsyncGeneratorExpression</a></emu-nt> can be referenced from inside the <emu-nt id="_ref_13216"><a href="#prod-AsyncGeneratorExpression">AsyncGeneratorExpression</a></emu-nt>'s <emu-nt id="_ref_13217"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt> to allow the generator code to call itself recursively. However, unlike in an <emu-nt id="_ref_13218"><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt>, the <emu-nt id="_ref_13219"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt> in an <emu-nt id="_ref_13220"><a href="#prod-AsyncGeneratorExpression">AsyncGeneratorExpression</a></emu-nt> cannot be referenced from and does not affect the scope enclosing the <emu-nt id="_ref_13221"><a href="#prod-AsyncGeneratorExpression">AsyncGeneratorExpression</a></emu-nt>.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-class-definitions">
<h1><span class="secnum">14.6</span>Class Definitions</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="ClassDeclaration" params="Yield, Await, Default" id="prod-ClassDeclaration">
<emu-nt params="Yield, Await, Default"><a href="#prod-ClassDeclaration">ClassDeclaration</a><emu-mods><emu-params>[Yield, Await, Default]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="afef225f"><emu-t>class</emu-t><emu-nt params="?Yield, ?Await" id="_ref_13222"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt params="?Yield, ?Await" id="_ref_13223"><a href="#prod-ClassTail">ClassTail</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="788487dc" constraints="+Default"><emu-constraints>[+Default]</emu-constraints><emu-t>class</emu-t><emu-nt params="?Yield, ?Await" id="_ref_13224"><a href="#prod-ClassTail">ClassTail</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ClassExpression" params="Yield, Await" id="prod-ClassExpression">
<emu-nt params="Yield, Await"><a href="#prod-ClassExpression">ClassExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="dd578cac"><emu-t>class</emu-t><emu-nt params="?Yield, ?Await" optional="" id="_ref_13225"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt params="?Yield, ?Await" id="_ref_13226"><a href="#prod-ClassTail">ClassTail</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ClassTail" params="Yield, Await" id="prod-ClassTail">
<emu-nt params="Yield, Await"><a href="#prod-ClassTail">ClassTail</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d2d0a98e"><emu-nt params="?Yield, ?Await" optional="" id="_ref_13227"><a href="#prod-ClassHeritage">ClassHeritage</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>{</emu-t><emu-nt params="?Yield, ?Await" optional="" id="_ref_13228"><a href="#prod-ClassBody">ClassBody</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="ClassHeritage" params="Yield, Await" id="prod-ClassHeritage">
<emu-nt params="Yield, Await"><a href="#prod-ClassHeritage">ClassHeritage</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="7989e09f"><emu-t>extends</emu-t><emu-nt params="?Yield, ?Await" id="_ref_13229"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ClassBody" params="Yield, Await" id="prod-ClassBody">
<emu-nt params="Yield, Await"><a href="#prod-ClassBody">ClassBody</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1c8eab17"><emu-nt params="?Yield, ?Await" id="_ref_13230"><a href="#prod-ClassElementList">ClassElementList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ClassElementList" params="Yield, Await" id="prod-ClassElementList">
<emu-nt params="Yield, Await"><a href="#prod-ClassElementList">ClassElementList</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="2fb64cb4"><emu-nt params="?Yield, ?Await" id="_ref_13231"><a href="#prod-ClassElement">ClassElement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="180d43b5"><emu-nt params="?Yield, ?Await" id="_ref_13232"><a href="#prod-ClassElementList">ClassElementList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt params="?Yield, ?Await" id="_ref_13233"><a href="#prod-ClassElement">ClassElement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ClassElement" params="Yield, Await" id="prod-ClassElement">
<emu-nt params="Yield, Await"><a href="#prod-ClassElement">ClassElement</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="91edbff4"><emu-nt params="?Yield, ?Await" id="_ref_13234"><a href="#prod-MethodDefinition">MethodDefinition</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="6b4234e8"><emu-t>static</emu-t><emu-nt params="?Yield, ?Await" id="_ref_13235"><a href="#prod-MethodDefinition">MethodDefinition</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="4a0dac03"><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>A class definition is always <emu-xref href="#sec-strict-mode-code" id="_ref_4250"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>.</p>
</div></emu-note>
<emu-clause id="sec-class-definitions-static-semantics-early-errors">
<h1><span class="secnum">14.6.1</span>Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="ClassTail" collapsed="">
<emu-nt><a href="#prod-ClassTail">ClassTail</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d2e8467f"><emu-nt optional="" id="_ref_13236"><a href="#prod-ClassHeritage">ClassHeritage</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>{</emu-t><emu-nt id="_ref_13237"><a href="#prod-ClassBody">ClassBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
<p>It is a Syntax Error if <emu-nt id="_ref_13238"><a href="#prod-ClassHeritage">ClassHeritage</a></emu-nt> is not present and the following algorithm evaluates to <emu-val>true</emu-val>:</p>
<emu-alg><ol><li>Let <var>constructor</var> be ConstructorMethod of <emu-nt id="_ref_13239"><a href="#prod-ClassBody">ClassBody</a></emu-nt>.</li><li>If <var>constructor</var> is <emu-const>empty</emu-const>, return <emu-val>false</emu-val>.</li><li>Return HasDirectSuper of <var>constructor</var>.
</li></ol></emu-alg>
</li>
</ul>
<emu-grammar><emu-production name="ClassBody" collapsed="">
<emu-nt><a href="#prod-ClassBody">ClassBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d72d43ba"><emu-nt id="_ref_13240"><a href="#prod-ClassElementList">ClassElementList</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if PrototypePropertyNameList of <emu-nt id="_ref_13241"><a href="#prod-ClassElementList">ClassElementList</a></emu-nt> contains more than one occurrence of <code>"constructor"</code>.
</li>
</ul>
<emu-grammar><emu-production name="ClassElement" collapsed="">
<emu-nt><a href="#prod-ClassElement">ClassElement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4bc22514"><emu-nt id="_ref_13242"><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if PropName of <emu-nt id="_ref_13243"><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt> is not <code>"constructor"</code> and HasDirectSuper of <emu-nt id="_ref_13244"><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt> is <emu-val>true</emu-val>.
</li>
<li>
It is a Syntax Error if PropName of <emu-nt id="_ref_13245"><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt> is <code>"constructor"</code> and SpecialMethod of <emu-nt id="_ref_13246"><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt> is <emu-val>true</emu-val>.
</li>
</ul>
<emu-grammar><emu-production name="ClassElement" collapsed="">
<emu-nt><a href="#prod-ClassElement">ClassElement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="fa58c6b5"><emu-t>static</emu-t><emu-nt id="_ref_13247"><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if HasDirectSuper of <emu-nt id="_ref_13248"><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt> is <emu-val>true</emu-val>.
</li>
<li>
It is a Syntax Error if PropName of <emu-nt id="_ref_13249"><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt> is <code>"prototype"</code>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-class-definitions-static-semantics-boundnames">
<h1><span class="secnum">14.6.2</span>Static Semantics: BoundNames</h1>
<emu-see-also-para op="BoundNames"></emu-see-also-para>
<emu-grammar><emu-production name="ClassDeclaration" collapsed="">
<emu-nt><a href="#prod-ClassDeclaration">ClassDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4ee4ae5a"><emu-t>class</emu-t><emu-nt id="_ref_13250"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-nt id="_ref_13251"><a href="#prod-ClassTail">ClassTail</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the BoundNames of <emu-nt id="_ref_13252"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ClassDeclaration" collapsed="">
<emu-nt><a href="#prod-ClassDeclaration">ClassDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d461f28b"><emu-t>class</emu-t><emu-nt id="_ref_13253"><a href="#prod-ClassTail">ClassTail</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return « <code>"*default*"</code> ».
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-static-semantics-constructormethod">
<h1><span class="secnum">14.6.3</span>Static Semantics: ConstructorMethod</h1>
<emu-grammar><emu-production name="ClassElementList" collapsed="">
<emu-nt><a href="#prod-ClassElementList">ClassElementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="711bcbba"><emu-nt id="_ref_13254"><a href="#prod-ClassElement">ClassElement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <emu-nt id="_ref_13255"><a href="#prod-ClassElement">ClassElement</a></emu-nt> is <emu-grammar><emu-production name="ClassElement" collapsed="" class=" inline">
<emu-nt><a href="#prod-ClassElement">ClassElement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4a0dac03"><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar> , return <emu-const>empty</emu-const>.</li><li>If IsStatic of <emu-nt id="_ref_13256"><a href="#prod-ClassElement">ClassElement</a></emu-nt> is <emu-val>true</emu-val>, return <emu-const>empty</emu-const>.</li><li>If PropName of <emu-nt id="_ref_13257"><a href="#prod-ClassElement">ClassElement</a></emu-nt> is not <code>"constructor"</code>, return <emu-const>empty</emu-const>.</li><li>Return <emu-nt id="_ref_13258"><a href="#prod-ClassElement">ClassElement</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ClassElementList" collapsed="">
<emu-nt><a href="#prod-ClassElementList">ClassElementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="9ac50b6a"><emu-nt id="_ref_13259"><a href="#prod-ClassElementList">ClassElementList</a></emu-nt><emu-nt id="_ref_13260"><a href="#prod-ClassElement">ClassElement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>head</var> be ConstructorMethod of <emu-nt id="_ref_13261"><a href="#prod-ClassElementList">ClassElementList</a></emu-nt>.</li><li>If <var>head</var> is not <emu-const>empty</emu-const>, return <var>head</var>.</li><li>If <emu-nt id="_ref_13262"><a href="#prod-ClassElement">ClassElement</a></emu-nt> is <emu-grammar><emu-production name="ClassElement" collapsed="" class=" inline">
<emu-nt><a href="#prod-ClassElement">ClassElement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4a0dac03"><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar> , return <emu-const>empty</emu-const>.</li><li>If IsStatic of <emu-nt id="_ref_13263"><a href="#prod-ClassElement">ClassElement</a></emu-nt> is <emu-val>true</emu-val>, return <emu-const>empty</emu-const>.</li><li>If PropName of <emu-nt id="_ref_13264"><a href="#prod-ClassElement">ClassElement</a></emu-nt> is not <code>"constructor"</code>, return <emu-const>empty</emu-const>.</li><li>Return <emu-nt id="_ref_13265"><a href="#prod-ClassElement">ClassElement</a></emu-nt>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Early Error rules ensure that there is only one method definition named <code>"constructor"</code> and that it is not an <emu-xref href="#sec-object-type" id="_ref_4251"><a href="#sec-object-type">accessor property</a></emu-xref> or generator definition.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-class-definitions-static-semantics-contains">
<h1><span class="secnum">14.6.4</span>Static Semantics: Contains</h1>
<p>With parameter <var>symbol</var>.</p>
<emu-see-also-para op="Contains"></emu-see-also-para>
<emu-grammar><emu-production name="ClassTail" collapsed="">
<emu-nt><a href="#prod-ClassTail">ClassTail</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d2e8467f"><emu-nt optional="" id="_ref_13266"><a href="#prod-ClassHeritage">ClassHeritage</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>{</emu-t><emu-nt id="_ref_13267"><a href="#prod-ClassBody">ClassBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <var>symbol</var> is <emu-nt id="_ref_13268"><a href="#prod-ClassBody">ClassBody</a></emu-nt>, return <emu-val>true</emu-val>.</li><li>If <var>symbol</var> is <emu-nt id="_ref_13269"><a href="#prod-ClassHeritage">ClassHeritage</a></emu-nt>, then<ol><li>If <emu-nt id="_ref_13270"><a href="#prod-ClassHeritage">ClassHeritage</a></emu-nt> is present, return <emu-val>true</emu-val>; otherwise return <emu-val>false</emu-val>.</li></ol></li><li>Let <var>inHeritage</var> be <emu-nt id="_ref_13271"><a href="#prod-ClassHeritage">ClassHeritage</a></emu-nt> Contains <var>symbol</var>.</li><li>If <var>inHeritage</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return the result of ComputedPropertyContains for <emu-nt id="_ref_13272"><a href="#prod-ClassBody">ClassBody</a></emu-nt> with argument <var>symbol</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Static semantic rules that depend upon substructure generally do not look into class bodies except for <emu-nt id="_ref_13273"><a href="#prod-PropertyName">PropertyName</a></emu-nt>s.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-class-definitions-static-semantics-computedpropertycontains">
<h1><span class="secnum">14.6.5</span>Static Semantics: ComputedPropertyContains</h1>
<p>With parameter <var>symbol</var>.</p>
<emu-see-also-para op="ComputedPropertyContains"></emu-see-also-para>
<emu-grammar><emu-production name="ClassElementList" collapsed="">
<emu-nt><a href="#prod-ClassElementList">ClassElementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="9ac50b6a"><emu-nt id="_ref_13274"><a href="#prod-ClassElementList">ClassElementList</a></emu-nt><emu-nt id="_ref_13275"><a href="#prod-ClassElement">ClassElement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>inList</var> be the result of ComputedPropertyContains for <emu-nt id="_ref_13276"><a href="#prod-ClassElementList">ClassElementList</a></emu-nt> with argument <var>symbol</var>.</li><li>If <var>inList</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return the result of ComputedPropertyContains for <emu-nt id="_ref_13277"><a href="#prod-ClassElement">ClassElement</a></emu-nt> with argument <var>symbol</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ClassElement" collapsed="">
<emu-nt><a href="#prod-ClassElement">ClassElement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4bc22514"><emu-nt id="_ref_13278"><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the result of ComputedPropertyContains for <emu-nt id="_ref_13279"><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt> with argument <var>symbol</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ClassElement" collapsed="">
<emu-nt><a href="#prod-ClassElement">ClassElement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="fa58c6b5"><emu-t>static</emu-t><emu-nt id="_ref_13280"><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the result of ComputedPropertyContains for <emu-nt id="_ref_13281"><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt> with argument <var>symbol</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ClassElement" collapsed="">
<emu-nt><a href="#prod-ClassElement">ClassElement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4a0dac03"><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-class-definitions-static-semantics-hasname">
<h1><span class="secnum">14.6.6</span>Static Semantics: HasName</h1>
<emu-see-also-para op="HasName"></emu-see-also-para>
<emu-grammar><emu-production name="ClassExpression" collapsed="">
<emu-nt><a href="#prod-ClassExpression">ClassExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d461f28b"><emu-t>class</emu-t><emu-nt id="_ref_13282"><a href="#prod-ClassTail">ClassTail</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="ClassExpression" collapsed="">
<emu-nt><a href="#prod-ClassExpression">ClassExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4ee4ae5a"><emu-t>class</emu-t><emu-nt id="_ref_13283"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-nt id="_ref_13284"><a href="#prod-ClassTail">ClassTail</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-class-definitions-static-semantics-isconstantdeclaration">
<h1><span class="secnum">14.6.7</span>Static Semantics: IsConstantDeclaration</h1>
<emu-see-also-para op="IsConstantDeclaration"></emu-see-also-para>
<emu-grammar><emu-production name="ClassDeclaration" collapsed="">
<emu-nt><a href="#prod-ClassDeclaration">ClassDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4ee4ae5a"><emu-t>class</emu-t><emu-nt id="_ref_13285"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-nt id="_ref_13286"><a href="#prod-ClassTail">ClassTail</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ClassDeclaration" collapsed="">
<emu-nt><a href="#prod-ClassDeclaration">ClassDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d461f28b"><emu-t>class</emu-t><emu-nt id="_ref_13287"><a href="#prod-ClassTail">ClassTail</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-class-definitions-static-semantics-isfunctiondefinition">
<h1><span class="secnum">14.6.8</span>Static Semantics: IsFunctionDefinition</h1>
<emu-see-also-para op="IsFunctionDefinition"></emu-see-also-para>
<emu-grammar><emu-production name="ClassExpression" collapsed="">
<emu-nt><a href="#prod-ClassExpression">ClassExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d022e28b"><emu-t>class</emu-t><emu-nt optional="" id="_ref_13288"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt id="_ref_13289"><a href="#prod-ClassTail">ClassTail</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-isstatic">
<h1><span class="secnum">14.6.9</span>Static Semantics: IsStatic</h1>
<emu-grammar><emu-production name="ClassElement" collapsed="">
<emu-nt><a href="#prod-ClassElement">ClassElement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4bc22514"><emu-nt id="_ref_13290"><a href="#prod-MethodDefinition">MethodDefinition</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="ClassElement" collapsed="">
<emu-nt><a href="#prod-ClassElement">ClassElement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="fa58c6b5"><emu-t>static</emu-t><emu-nt id="_ref_13291"><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ClassElement" collapsed="">
<emu-nt><a href="#prod-ClassElement">ClassElement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4a0dac03"><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-static-semantics-nonconstructormethoddefinitions">
<h1><span class="secnum">14.6.10</span>Static Semantics: NonConstructorMethodDefinitions</h1>
<emu-grammar><emu-production name="ClassElementList" collapsed="">
<emu-nt><a href="#prod-ClassElementList">ClassElementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="711bcbba"><emu-nt id="_ref_13292"><a href="#prod-ClassElement">ClassElement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <emu-nt id="_ref_13293"><a href="#prod-ClassElement">ClassElement</a></emu-nt> is <emu-grammar><emu-production name="ClassElement" collapsed="" class=" inline">
<emu-nt><a href="#prod-ClassElement">ClassElement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4a0dac03"><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar> , return a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4252"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>If IsStatic of <emu-nt id="_ref_13294"><a href="#prod-ClassElement">ClassElement</a></emu-nt> is <emu-val>false</emu-val> and PropName of <emu-nt id="_ref_13295"><a href="#prod-ClassElement">ClassElement</a></emu-nt> is <code>"constructor"</code>, return a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4253"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Return a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4254"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing <emu-nt id="_ref_13296"><a href="#prod-ClassElement">ClassElement</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ClassElementList" collapsed="">
<emu-nt><a href="#prod-ClassElementList">ClassElementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="9ac50b6a"><emu-nt id="_ref_13297"><a href="#prod-ClassElementList">ClassElementList</a></emu-nt><emu-nt id="_ref_13298"><a href="#prod-ClassElement">ClassElement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>list</var> be NonConstructorMethodDefinitions of <emu-nt id="_ref_13299"><a href="#prod-ClassElementList">ClassElementList</a></emu-nt>.</li><li>If <emu-nt id="_ref_13300"><a href="#prod-ClassElement">ClassElement</a></emu-nt> is <emu-grammar><emu-production name="ClassElement" collapsed="" class=" inline">
<emu-nt><a href="#prod-ClassElement">ClassElement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4a0dac03"><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar> , return <var>list</var>.</li><li>If IsStatic of <emu-nt id="_ref_13301"><a href="#prod-ClassElement">ClassElement</a></emu-nt> is <emu-val>false</emu-val> and PropName of <emu-nt id="_ref_13302"><a href="#prod-ClassElement">ClassElement</a></emu-nt> is <code>"constructor"</code>, return <var>list</var>.</li><li>Append <emu-nt id="_ref_13303"><a href="#prod-ClassElement">ClassElement</a></emu-nt> to the end of <var>list</var>.</li><li>Return <var>list</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-static-semantics-prototypepropertynamelist">
<h1><span class="secnum">14.6.11</span>Static Semantics: PrototypePropertyNameList</h1>
<emu-grammar><emu-production name="ClassElementList" collapsed="">
<emu-nt><a href="#prod-ClassElementList">ClassElementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="711bcbba"><emu-nt id="_ref_13304"><a href="#prod-ClassElement">ClassElement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If PropName of <emu-nt id="_ref_13305"><a href="#prod-ClassElement">ClassElement</a></emu-nt> is <emu-const>empty</emu-const>, return a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4255"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>If IsStatic of <emu-nt id="_ref_13306"><a href="#prod-ClassElement">ClassElement</a></emu-nt> is <emu-val>true</emu-val>, return a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4256"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Return a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4257"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing PropName of <emu-nt id="_ref_13307"><a href="#prod-ClassElement">ClassElement</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ClassElementList" collapsed="">
<emu-nt><a href="#prod-ClassElementList">ClassElementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="9ac50b6a"><emu-nt id="_ref_13308"><a href="#prod-ClassElementList">ClassElementList</a></emu-nt><emu-nt id="_ref_13309"><a href="#prod-ClassElement">ClassElement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>list</var> be PrototypePropertyNameList of <emu-nt id="_ref_13310"><a href="#prod-ClassElementList">ClassElementList</a></emu-nt>.</li><li>If PropName of <emu-nt id="_ref_13311"><a href="#prod-ClassElement">ClassElement</a></emu-nt> is <emu-const>empty</emu-const>, return <var>list</var>.</li><li>If IsStatic of <emu-nt id="_ref_13312"><a href="#prod-ClassElement">ClassElement</a></emu-nt> is <emu-val>true</emu-val>, return <var>list</var>.</li><li>Append PropName of <emu-nt id="_ref_13313"><a href="#prod-ClassElement">ClassElement</a></emu-nt> to the end of <var>list</var>.</li><li>Return <var>list</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-class-definitions-static-semantics-propname">
<h1><span class="secnum">14.6.12</span>Static Semantics: PropName</h1>
<emu-see-also-para op="PropName"></emu-see-also-para>
<emu-grammar><emu-production name="ClassElement" collapsed="">
<emu-nt><a href="#prod-ClassElement">ClassElement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4a0dac03"><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-const>empty</emu-const>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-runtime-semantics-classdefinitionevaluation">
<h1><span class="secnum">14.6.13</span>Runtime Semantics: ClassDefinitionEvaluation</h1>
<p>With parameters <var>classBinding</var> and <var>className</var>.</p>
<emu-grammar><emu-production name="ClassTail" collapsed="">
<emu-nt><a href="#prod-ClassTail">ClassTail</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b8ea6aa5"><emu-nt optional="" id="_ref_13314"><a href="#prod-ClassHeritage">ClassHeritage</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>{</emu-t><emu-nt optional="" id="_ref_13315"><a href="#prod-ClassBody">ClassBody</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>lex</var> be the LexicalEnvironment of the <emu-xref href="#running-execution-context" id="_ref_4258"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Let <var>classScope</var> be <emu-xref aoid="NewDeclarativeEnvironment" id="_ref_4259"><a href="#sec-newdeclarativeenvironment">NewDeclarativeEnvironment</a></emu-xref>(<var>lex</var>).</li><li>Let <var>classScopeEnvRec</var> be <var>classScope</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_4260"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref>.</li><li>If <var>classBinding</var> is not <emu-val>undefined</emu-val>, then<ol><li>Perform <var>classScopeEnvRec</var>.CreateImmutableBinding(<var>classBinding</var>, <emu-val>true</emu-val>).</li></ol></li><li>If <emu-nt optional="" id="_ref_13316"><a href="#prod-ClassHeritage">ClassHeritage</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt> is not present, then<ol><li>Let <var>protoParent</var> be the intrinsic object <emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_4261"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>.</li><li>Let <var>constructorParent</var> be the intrinsic object <emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_4262"><a href="#sec-properties-of-the-function-prototype-object">%FunctionPrototype%</a></emu-xref>.</li></ol></li><li>Else,<ol><li>Set the <emu-xref href="#running-execution-context" id="_ref_4263"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment to <var>classScope</var>.</li><li>Let <var>superclassRef</var> be the result of evaluating <emu-nt id="_ref_13317"><a href="#prod-ClassHeritage">ClassHeritage</a></emu-nt>.</li><li>Set the <emu-xref href="#running-execution-context" id="_ref_4264"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment to <var>lex</var>.</li><li>Let <var>superclass</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_4265"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>superclassRef</var>).</li><li>If <var>superclass</var> is <emu-val>null</emu-val>, then<ol><li>Let <var>protoParent</var> be <emu-val>null</emu-val>.</li><li>Let <var>constructorParent</var> be the intrinsic object <emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_4266"><a href="#sec-properties-of-the-function-prototype-object">%FunctionPrototype%</a></emu-xref>.</li></ol></li><li>Else if <emu-xref aoid="IsConstructor" id="_ref_4267"><a href="#sec-isconstructor">IsConstructor</a></emu-xref>(<var>superclass</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Else,<ol><li>Let <var>protoParent</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_4268"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>superclass</var>, <code>"prototype"</code>).</li><li>If <emu-xref aoid="Type" id="_ref_4269"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>protoParent</var>) is neither Object nor Null, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>constructorParent</var> be <var>superclass</var>.</li></ol></li></ol></li><li>Let <var>proto</var> be <emu-xref aoid="ObjectCreate" id="_ref_4270"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<var>protoParent</var>).</li><li>If <emu-nt optional="" id="_ref_13318"><a href="#prod-ClassBody">ClassBody</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt> is not present, let <var>constructor</var> be <emu-const>empty</emu-const>.</li><li>Else, let <var>constructor</var> be ConstructorMethod of <emu-nt id="_ref_13319"><a href="#prod-ClassBody">ClassBody</a></emu-nt>.</li><li>If <var>constructor</var> is <emu-const>empty</emu-const>, then<ol><li>If <emu-nt optional="" id="_ref_13320"><a href="#prod-ClassHeritage">ClassHeritage</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt> is present, then<ol><li>Set <var>constructor</var> to the result of parsing the source text
<pre><code class="javascript hljs"><span class="hljs-keyword">constructor</span>(... args){ <span class="hljs-keyword">super</span> (...args);}</code></pre>
using the syntactic grammar with the <emu-xref href="#sec-context-free-grammars" id="_ref_4271"><a href="#sec-context-free-grammars">goal symbol</a></emu-xref> <emu-nt params="~Yield, ~Await" id="_ref_13321"><a href="#prod-MethodDefinition">MethodDefinition</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params></emu-mods></emu-nt>.</li></ol></li><li>Else,<ol><li>Set <var>constructor</var> to the result of parsing the source text
<pre><code class="javascript hljs"><span class="hljs-keyword">constructor</span>(){ }</code></pre>
using the syntactic grammar with the <emu-xref href="#sec-context-free-grammars" id="_ref_4272"><a href="#sec-context-free-grammars">goal symbol</a></emu-xref> <emu-nt params="~Yield, ~Await" id="_ref_13322"><a href="#prod-MethodDefinition">MethodDefinition</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params></emu-mods></emu-nt>.</li></ol></li></ol></li><li>Set the <emu-xref href="#running-execution-context" id="_ref_4273"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment to <var>classScope</var>.</li><li>Let <var>constructorInfo</var> be the result of performing DefineMethod for <var>constructor</var> with arguments <var>proto</var> and <var>constructorParent</var> as the optional <var>functionPrototype</var> argument.</li><li><emu-xref href="#assert" id="_ref_4274"><a href="#assert">Assert</a></emu-xref>: <var>constructorInfo</var> is not an <emu-xref href="#sec-completion-record-specification-type" id="_ref_4275"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>.</li><li>Let <var>F</var> be <var>constructorInfo</var>.[[Closure]].</li><li>If <emu-nt optional="" id="_ref_13323"><a href="#prod-ClassHeritage">ClassHeritage</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt> is present, set <var>F</var>.[[ConstructorKind]] to <code>"derived"</code>.</li><li>Perform <emu-xref aoid="MakeConstructor" id="_ref_4276"><a href="#sec-makeconstructor">MakeConstructor</a></emu-xref>(<var>F</var>, <emu-val>false</emu-val>, <var>proto</var>).</li><li>Perform <emu-xref aoid="MakeClassConstructor" id="_ref_4277"><a href="#sec-makeclassconstructor">MakeClassConstructor</a></emu-xref>(<var>F</var>).</li><li>If <var>className</var> is not <emu-val>undefined</emu-val>, then<ol><li>Perform <emu-xref aoid="SetFunctionName" id="_ref_4278"><a href="#sec-setfunctionname">SetFunctionName</a></emu-xref>(<var>F</var>, <var>className</var>).</li></ol></li><li>Perform <emu-xref aoid="CreateMethodProperty" id="_ref_4279"><a href="#sec-createmethodproperty">CreateMethodProperty</a></emu-xref>(<var>proto</var>, <code>"constructor"</code>, <var>F</var>).</li><li>If <emu-nt optional="" id="_ref_13324"><a href="#prod-ClassBody">ClassBody</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt> is not present, let <var>methods</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4280"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Else, let <var>methods</var> be NonConstructorMethodDefinitions of <emu-nt id="_ref_13325"><a href="#prod-ClassBody">ClassBody</a></emu-nt>.</li><li>For each <emu-nt id="_ref_13326"><a href="#prod-ClassElement">ClassElement</a></emu-nt> <var>m</var> in order from <var>methods</var>, do<ol><li>If IsStatic of <var>m</var> is <emu-val>false</emu-val>, then<ol><li>Let <var>status</var> be the result of performing PropertyDefinitionEvaluation for <var>m</var> with arguments <var>proto</var> and <emu-val>false</emu-val>.</li></ol></li><li>Else,<ol><li>Let <var>status</var> be the result of performing PropertyDefinitionEvaluation for <var>m</var> with arguments <var>F</var> and <emu-val>false</emu-val>.</li></ol></li><li>If <var>status</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_4281"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, then<ol><li>Set the <emu-xref href="#running-execution-context" id="_ref_4282"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment to <var>lex</var>.</li><li>Return <emu-xref aoid="Completion" id="_ref_4283"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>status</var>).</li></ol></li></ol></li><li>Set the <emu-xref href="#running-execution-context" id="_ref_4284"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment to <var>lex</var>.</li><li>If <var>classBinding</var> is not <emu-val>undefined</emu-val>, then<ol><li>Perform <var>classScopeEnvRec</var>.InitializeBinding(<var>classBinding</var>, <var>F</var>).</li></ol></li><li>Return <var>F</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-runtime-semantics-bindingclassdeclarationevaluation">
<h1><span class="secnum">14.6.14</span>Runtime Semantics: BindingClassDeclarationEvaluation</h1>
<emu-grammar><emu-production name="ClassDeclaration" collapsed="">
<emu-nt><a href="#prod-ClassDeclaration">ClassDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4ee4ae5a"><emu-t>class</emu-t><emu-nt id="_ref_13327"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-nt id="_ref_13328"><a href="#prod-ClassTail">ClassTail</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>className</var> be StringValue of <emu-nt id="_ref_13329"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt>.</li><li>Let <var>value</var> be the result of ClassDefinitionEvaluation of <emu-nt id="_ref_13330"><a href="#prod-ClassTail">ClassTail</a></emu-nt> with arguments <var>className</var> and <var>className</var>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_4285"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>value</var>).</li><li>Set <var>value</var>.[[SourceText]] to the source text matched by <emu-nt id="_ref_13331"><a href="#prod-ClassDeclaration">ClassDeclaration</a></emu-nt>.</li><li>Let <var>env</var> be the <emu-xref href="#running-execution-context" id="_ref_4286"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment.</li><li>Perform ?&nbsp;<emu-xref aoid="InitializeBoundName" id="_ref_4287"><a href="#sec-initializeboundname">InitializeBoundName</a></emu-xref>(<var>className</var>, <var>value</var>, <var>env</var>).</li><li>Return <var>value</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ClassDeclaration" collapsed="">
<emu-nt><a href="#prod-ClassDeclaration">ClassDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d461f28b"><emu-t>class</emu-t><emu-nt id="_ref_13332"><a href="#prod-ClassTail">ClassTail</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>value</var> be the result of ClassDefinitionEvaluation of <emu-nt id="_ref_13333"><a href="#prod-ClassTail">ClassTail</a></emu-nt> with arguments <emu-val>undefined</emu-val> and <code>"default"</code>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_4288"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>value</var>).</li><li>Set <var>value</var>.[[SourceText]] to the source text matched by <emu-nt id="_ref_13334"><a href="#prod-ClassDeclaration">ClassDeclaration</a></emu-nt>.</li><li>Return <var>value</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p><emu-grammar><emu-production name="ClassDeclaration" collapsed="" class=" inline">
<emu-nt><a href="#prod-ClassDeclaration">ClassDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d461f28b"><emu-t>class</emu-t><emu-nt id="_ref_13335"><a href="#prod-ClassTail">ClassTail</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> only occurs as part of an <emu-nt id="_ref_13336"><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt> and establishing its binding is handled as part of the evaluation action for that production. See <emu-xref href="#sec-exports-runtime-semantics-evaluation" id="_ref_358"><a href="#sec-exports-runtime-semantics-evaluation">15.2.3.11</a></emu-xref>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-class-definitions-runtime-semantics-namedevaluation">
<h1><span class="secnum">14.6.15</span>Runtime Semantics: NamedEvaluation</h1>
<p>With parameter <var>name</var>.</p>
<emu-grammar><emu-production name="ClassExpression" collapsed="">
<emu-nt><a href="#prod-ClassExpression">ClassExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d461f28b"><emu-t>class</emu-t><emu-nt id="_ref_13337"><a href="#prod-ClassTail">ClassTail</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the result of ClassDefinitionEvaluation of <emu-nt id="_ref_13338"><a href="#prod-ClassTail">ClassTail</a></emu-nt> with arguments <emu-val>undefined</emu-val> and <var>name</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-class-definitions-runtime-semantics-evaluation">
<h1><span class="secnum">14.6.16</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="ClassDeclaration" collapsed="">
<emu-nt><a href="#prod-ClassDeclaration">ClassDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4ee4ae5a"><emu-t>class</emu-t><emu-nt id="_ref_13339"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-nt id="_ref_13340"><a href="#prod-ClassTail">ClassTail</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Perform ? BindingClassDeclarationEvaluation of this <emu-nt id="_ref_13341"><a href="#prod-ClassDeclaration">ClassDeclaration</a></emu-nt>.</li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_4289"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p><emu-grammar><emu-production name="ClassDeclaration" collapsed="" class=" inline">
<emu-nt><a href="#prod-ClassDeclaration">ClassDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d461f28b"><emu-t>class</emu-t><emu-nt id="_ref_13342"><a href="#prod-ClassTail">ClassTail</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> only occurs as part of an <emu-nt id="_ref_13343"><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt> and is never directly evaluated.</p>
</div></emu-note>
<emu-grammar><emu-production name="ClassExpression" collapsed="">
<emu-nt><a href="#prod-ClassExpression">ClassExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d022e28b"><emu-t>class</emu-t><emu-nt optional="" id="_ref_13344"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt id="_ref_13345"><a href="#prod-ClassTail">ClassTail</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <emu-nt optional="" id="_ref_13346"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt> is not present, let <var>className</var> be <emu-val>undefined</emu-val>.</li><li>Else, let <var>className</var> be StringValue of <emu-nt id="_ref_13347"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt>.</li><li>Let <var>value</var> be the result of ClassDefinitionEvaluation of <emu-nt id="_ref_13348"><a href="#prod-ClassTail">ClassTail</a></emu-nt> with arguments <var>className</var> and <var>className</var>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_4290"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>value</var>).</li><li>Set <var>value</var>.[[SourceText]] to the source text matched by <emu-nt id="_ref_13349"><a href="#prod-ClassExpression">ClassExpression</a></emu-nt>.</li><li>Return <var>value</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-async-function-definitions">
<h1><span class="secnum">14.7</span>Async Function Definitions</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="AsyncFunctionDeclaration" params="Yield, Await, Default" id="prod-AsyncFunctionDeclaration">
<emu-nt params="Yield, Await, Default"><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a><emu-mods><emu-params>[Yield, Await, Default]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f512250e"><emu-t>async</emu-t><emu-gann>[no <emu-nt id="_ref_13350"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-t>function</emu-t><emu-nt params="?Yield, ?Await" id="_ref_13351"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>(</emu-t><emu-nt params="~Yield, +Await" id="_ref_13352"><a href="#prod-FormalParameters">FormalParameters</a><emu-mods><emu-params>[~Yield, +Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13353"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="fef042b8" constraints="+Default"><emu-constraints>[+Default]</emu-constraints><emu-t>async</emu-t><emu-gann>[no <emu-nt id="_ref_13354"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-t>function</emu-t><emu-t>(</emu-t><emu-nt params="~Yield, +Await" id="_ref_13355"><a href="#prod-FormalParameters">FormalParameters</a><emu-mods><emu-params>[~Yield, +Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13356"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="AsyncFunctionExpression" id="prod-AsyncFunctionExpression">
<emu-nt><a href="#prod-AsyncFunctionExpression">AsyncFunctionExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c25b1d19"><emu-t>async</emu-t><emu-gann>[no <emu-nt id="_ref_13357"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-t>function</emu-t><emu-t>(</emu-t><emu-nt params="~Yield, +Await" id="_ref_13358"><a href="#prod-FormalParameters">FormalParameters</a><emu-mods><emu-params>[~Yield, +Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13359"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="be6457e0"><emu-t>async</emu-t><emu-gann>[no <emu-nt id="_ref_13360"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-t>function</emu-t><emu-nt params="~Yield, +Await" id="_ref_13361"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[~Yield, +Await]</emu-params></emu-mods></emu-nt><emu-t>(</emu-t><emu-nt params="~Yield, +Await" id="_ref_13362"><a href="#prod-FormalParameters">FormalParameters</a><emu-mods><emu-params>[~Yield, +Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13363"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="AsyncMethod" params="Yield, Await" id="prod-AsyncMethod">
<emu-nt params="Yield, Await"><a href="#prod-AsyncMethod">AsyncMethod</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a922691e"><emu-t>async</emu-t><emu-gann>[no <emu-nt id="_ref_13364"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-nt params="?Yield, ?Await" id="_ref_13365"><a href="#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_13366"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a><emu-mods><emu-params>[~Yield, +Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13367"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="AsyncFunctionBody" id="prod-AsyncFunctionBody">
<emu-nt><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8ff4dc7c"><emu-nt params="~Yield, +Await" id="_ref_13368"><a href="#prod-FunctionBody">FunctionBody</a><emu-mods><emu-params>[~Yield, +Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="AwaitExpression" params="Yield" id="prod-AwaitExpression">
<emu-nt params="Yield"><a href="#prod-AwaitExpression">AwaitExpression</a><emu-mods><emu-params>[Yield]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c19c56e7"><emu-t>await</emu-t><emu-nt params="?Yield, +Await" id="_ref_13369"><a href="#prod-UnaryExpression">UnaryExpression</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 1</span><div class="note-contents">
<p><code>await</code> is parsed as an <emu-nt id="_ref_13370"><a href="#prod-AwaitExpression">AwaitExpression</a></emu-nt> when the <sub>[<emu-xref aoid="Await" id="_ref_4291"><a href="#await">Await</a></emu-xref>]</sub> parameter is present. The <sub>[<emu-xref aoid="Await" id="_ref_4292"><a href="#await">Await</a></emu-xref>]</sub> parameter is present in the following contexts:</p>
<ul>
<li>In an <emu-nt id="_ref_13371"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt>.</li>
<li>In the <emu-nt id="_ref_13372"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt> of an <emu-nt id="_ref_13373"><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt>, <emu-nt id="_ref_13374"><a href="#prod-AsyncFunctionExpression">AsyncFunctionExpression</a></emu-nt>, <emu-nt id="_ref_13375"><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt>, or <emu-nt id="_ref_13376"><a href="#prod-AsyncGeneratorExpression">AsyncGeneratorExpression</a></emu-nt>. <emu-nt id="_ref_13377"><a href="#prod-AwaitExpression">AwaitExpression</a></emu-nt> in this position is a Syntax error via <emu-xref href="#sec-static-semantic-rules" id="_ref_4293"><a href="#sec-static-semantic-rules">static semantics</a></emu-xref>.</li>
</ul>
<p>When <emu-nt id="_ref_13378"><a href="#prod-Module">Module</a></emu-nt> is the syntactic <emu-xref href="#sec-context-free-grammars" id="_ref_4294"><a href="#sec-context-free-grammars">goal symbol</a></emu-xref> and the <sub>[<emu-xref aoid="Await" id="_ref_4295"><a href="#await">Await</a></emu-xref>]</sub> parameter is absent, <code>await</code> is parsed as a keyword and will be a Syntax error. When <emu-nt id="_ref_13379"><a href="#prod-Script">Script</a></emu-nt> is the syntactic <emu-xref href="#sec-context-free-grammars" id="_ref_4296"><a href="#sec-context-free-grammars">goal symbol</a></emu-xref>, <code>await</code> may be parsed as an identifier when the <sub>[<emu-xref aoid="Await" id="_ref_4297"><a href="#await">Await</a></emu-xref>]</sub> parameter is absent. This includes the following contexts:</p>
<ul>
<li>Anywhere outside of an <emu-nt id="_ref_13380"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt> or <emu-nt id="_ref_13381"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt> of an <emu-nt id="_ref_13382"><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt>, <emu-nt id="_ref_13383"><a href="#prod-AsyncFunctionExpression">AsyncFunctionExpression</a></emu-nt>, <emu-nt id="_ref_13384"><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt>, or <emu-nt id="_ref_13385"><a href="#prod-AsyncGeneratorExpression">AsyncGeneratorExpression</a></emu-nt>.</li>
<li>In the <emu-nt id="_ref_13386"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt> of a <emu-nt id="_ref_13387"><a href="#prod-FunctionExpression">FunctionExpression</a></emu-nt>, <emu-nt id="_ref_13388"><a href="#prod-GeneratorExpression">GeneratorExpression</a></emu-nt>, or <emu-nt id="_ref_13389"><a href="#prod-AsyncGeneratorExpression">AsyncGeneratorExpression</a></emu-nt>.</li>
</ul>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>Unlike <emu-nt id="_ref_13390"><a href="#prod-YieldExpression">YieldExpression</a></emu-nt>, it is a Syntax Error to omit the operand of an <emu-nt id="_ref_13391"><a href="#prod-AwaitExpression">AwaitExpression</a></emu-nt>. You must await something.</p>
</div></emu-note>
<emu-clause id="sec-async-function-definitions-static-semantics-early-errors">
<h1><span class="secnum">14.7.1</span>Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="AsyncMethod" collapsed="">
<emu-nt><a href="#prod-AsyncMethod">AsyncMethod</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="759e5682"><emu-t>async</emu-t><emu-nt id="_ref_13392"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13393"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13394"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>It is a Syntax Error if ContainsUseStrict of <emu-nt id="_ref_13395"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt> is <emu-val>true</emu-val> and IsSimpleParameterList of <emu-nt id="_ref_13396"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt> is <emu-val>false</emu-val>.</li>
<li>It is a Syntax Error if HasDirectSuper of <emu-nt id="_ref_13397"><a href="#prod-AsyncMethod">AsyncMethod</a></emu-nt> is <emu-val>true</emu-val>.</li>
<li>It is a Syntax Error if <emu-nt id="_ref_13398"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt> Contains <emu-nt id="_ref_13399"><a href="#prod-AwaitExpression">AwaitExpression</a></emu-nt> is <emu-val>true</emu-val>.</li>
<li>It is a Syntax Error if any element of the BoundNames of <emu-nt id="_ref_13400"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt> also occurs in the LexicallyDeclaredNames of <emu-nt id="_ref_13401"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt>.</li>
</ul>
<emu-grammar><emu-production name="AsyncFunctionDeclaration" collapsed="">
<emu-nt><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e2632ddf"><emu-t>async</emu-t><emu-t>function</emu-t><emu-nt id="_ref_13402"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13403"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13404"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="AsyncFunctionDeclaration" collapsed="">
<emu-nt><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6a076671"><emu-t>async</emu-t><emu-t>function</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13405"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13406"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="AsyncFunctionExpression" collapsed="">
<emu-nt><a href="#prod-AsyncFunctionExpression">AsyncFunctionExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6a076671"><emu-t>async</emu-t><emu-t>function</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13407"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13408"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="AsyncFunctionExpression" collapsed="">
<emu-nt><a href="#prod-AsyncFunctionExpression">AsyncFunctionExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e2632ddf"><emu-t>async</emu-t><emu-t>function</emu-t><emu-nt id="_ref_13409"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13410"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13411"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>It is a Syntax Error if ContainsUseStrict of <emu-nt id="_ref_13412"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt> is <emu-val>true</emu-val> and IsSimpleParameterList of <emu-nt id="_ref_13413"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt> is <emu-val>false</emu-val>.</li>
<li>It is a Syntax Error if <emu-nt id="_ref_13414"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt> Contains <emu-nt id="_ref_13415"><a href="#prod-AwaitExpression">AwaitExpression</a></emu-nt> is <emu-val>true</emu-val>.</li>
<li>If the source code matching this production is strict code, the Early Error rules for <emu-grammar><emu-production name="UniqueFormalParameters" collapsed="" class=" inline">
<emu-nt><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0218c6f5"><emu-nt id="_ref_13416"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> are applied.</li>
<li>If the source code matching this production is strict code, it is a Syntax Error if <emu-nt id="_ref_13417"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt> is present and the StringValue of <emu-nt id="_ref_13418"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt> is <code>"eval"</code> or <code>"arguments"</code>.</li>
<li>It is a Syntax Error if any element of the BoundNames of <emu-nt id="_ref_13419"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt> also occurs in the LexicallyDeclaredNames of <emu-nt id="_ref_13420"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt>.</li>
<li>It is a Syntax Error if <emu-nt id="_ref_13421"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt> Contains <emu-nt id="_ref_13422"><a href="#prod-SuperProperty">SuperProperty</a></emu-nt> is <emu-val>true</emu-val>.</li>
<li>It is a Syntax Error if <emu-nt id="_ref_13423"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt> Contains <emu-nt id="_ref_13424"><a href="#prod-SuperProperty">SuperProperty</a></emu-nt> is <emu-val>true</emu-val>.</li>
<li>It is a Syntax Error if <emu-nt id="_ref_13425"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt> Contains <emu-nt id="_ref_13426"><a href="#prod-SuperCall">SuperCall</a></emu-nt> is <emu-val>true</emu-val>.</li>
<li>It is a Syntax Error if <emu-nt id="_ref_13427"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt> Contains <emu-nt id="_ref_13428"><a href="#prod-SuperCall">SuperCall</a></emu-nt> is <emu-val>true</emu-val>.</li>
</ul>
</emu-clause>
<emu-clause id="sec-async-function-definitions-static-semantics-BoundNames">
<h1><span class="secnum">14.7.2</span>Static Semantics: BoundNames</h1>
<emu-grammar><emu-production name="AsyncFunctionDeclaration" collapsed="">
<emu-nt><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e2632ddf"><emu-t>async</emu-t><emu-t>function</emu-t><emu-nt id="_ref_13429"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13430"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13431"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the BoundNames of <emu-nt id="_ref_13432"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="AsyncFunctionDeclaration" collapsed="">
<emu-nt><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6a076671"><emu-t>async</emu-t><emu-t>function</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13433"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13434"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return « <code>"*default*"</code> ».
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">"<code>*default*</code>"
is used within this specification as a synthetic name for hoistable
anonymous functions that are defined using export declarations.</div></emu-note>
</emu-clause>
<emu-clause id="sec-async-function-definitions-static-semantics-ComputedPropertyContains">
<h1><span class="secnum">14.7.3</span>Static Semantics: ComputedPropertyContains</h1>
<p>With parameter <var>symbol</var>.</p>
<emu-grammar><emu-production name="AsyncMethod" collapsed="">
<emu-nt><a href="#prod-AsyncMethod">AsyncMethod</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="759e5682"><emu-t>async</emu-t><emu-nt id="_ref_13435"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13436"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13437"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the result of ComputedPropertyContains for <emu-nt id="_ref_13438"><a href="#prod-PropertyName">PropertyName</a></emu-nt> with argument <var>symbol</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-async-function-definitions-static-semantics-Contains">
<h1><span class="secnum">14.7.4</span>Static Semantics: Contains</h1>
<p>With parameter <var>symbol</var>.</p>
<emu-grammar><emu-production name="AsyncFunctionDeclaration" collapsed="">
<emu-nt><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e2632ddf"><emu-t>async</emu-t><emu-t>function</emu-t><emu-nt id="_ref_13439"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13440"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13441"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="AsyncFunctionDeclaration" collapsed="">
<emu-nt><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6a076671"><emu-t>async</emu-t><emu-t>function</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13442"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13443"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="AsyncFunctionExpression" collapsed="">
<emu-nt><a href="#prod-AsyncFunctionExpression">AsyncFunctionExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6a076671"><emu-t>async</emu-t><emu-t>function</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13444"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13445"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="AsyncFunctionExpression" collapsed="">
<emu-nt><a href="#prod-AsyncFunctionExpression">AsyncFunctionExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e2632ddf"><emu-t>async</emu-t><emu-t>function</emu-t><emu-nt id="_ref_13446"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13447"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13448"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-async-function-definitions-static-semantics-HasDirectSuper">
<h1><span class="secnum">14.7.5</span>Static Semantics: HasDirectSuper</h1>
<emu-grammar><emu-production name="AsyncMethod" collapsed="">
<emu-nt><a href="#prod-AsyncMethod">AsyncMethod</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="759e5682"><emu-t>async</emu-t><emu-nt id="_ref_13449"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13450"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13451"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <emu-nt id="_ref_13452"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt> Contains <emu-nt id="_ref_13453"><a href="#prod-SuperCall">SuperCall</a></emu-nt> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return <emu-nt id="_ref_13454"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt> Contains <emu-nt id="_ref_13455"><a href="#prod-SuperCall">SuperCall</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-async-function-definitions-static-semantics-HasName">
<h1><span class="secnum">14.7.6</span>Static Semantics: HasName</h1>
<emu-grammar><emu-production name="AsyncFunctionExpression" collapsed="">
<emu-nt><a href="#prod-AsyncFunctionExpression">AsyncFunctionExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6a076671"><emu-t>async</emu-t><emu-t>function</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13456"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13457"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></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="AsyncFunctionExpression" collapsed="">
<emu-nt><a href="#prod-AsyncFunctionExpression">AsyncFunctionExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e2632ddf"><emu-t>async</emu-t><emu-t>function</emu-t><emu-nt id="_ref_13458"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13459"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13460"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></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-async-function-definitions-static-semantics-IsConstantDeclaration">
<h1><span class="secnum">14.7.7</span>Static Semantics: IsConstantDeclaration</h1>
<emu-grammar><emu-production name="AsyncFunctionDeclaration" collapsed="">
<emu-nt><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e2632ddf"><emu-t>async</emu-t><emu-t>function</emu-t><emu-nt id="_ref_13461"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13462"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13463"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="AsyncFunctionDeclaration" collapsed="">
<emu-nt><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6a076671"><emu-t>async</emu-t><emu-t>function</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13464"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13465"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-async-function-definitions-static-semantics-IsFunctionDefinition">
<h1><span class="secnum">14.7.8</span>Static Semantics: IsFunctionDefinition</h1>
<emu-grammar><emu-production name="AsyncFunctionExpression" collapsed="">
<emu-nt><a href="#prod-AsyncFunctionExpression">AsyncFunctionExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6a076671"><emu-t>async</emu-t><emu-t>function</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13466"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13467"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="AsyncFunctionExpression" collapsed="">
<emu-nt><a href="#prod-AsyncFunctionExpression">AsyncFunctionExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e2632ddf"><emu-t>async</emu-t><emu-t>function</emu-t><emu-nt id="_ref_13468"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13469"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13470"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></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-async-function-definitions-static-semantics-PropName">
<h1><span class="secnum">14.7.9</span>Static Semantics: PropName</h1>
<emu-grammar><emu-production name="AsyncMethod" collapsed="">
<emu-nt><a href="#prod-AsyncMethod">AsyncMethod</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="759e5682"><emu-t>async</emu-t><emu-nt id="_ref_13471"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13472"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13473"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return PropName of <emu-nt id="_ref_13474"><a href="#prod-PropertyName">PropertyName</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-async-function-definitions-InstantiateFunctionObject">
<h1><span class="secnum">14.7.10</span>Runtime Semantics: InstantiateFunctionObject</h1>
<p>With parameter <var>scope</var>.</p>
<emu-grammar><emu-production name="AsyncFunctionDeclaration" collapsed="">
<emu-nt><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e2632ddf"><emu-t>async</emu-t><emu-t>function</emu-t><emu-nt id="_ref_13475"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13476"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13477"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If the function code for <emu-nt id="_ref_13478"><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt> is <emu-xref href="#sec-strict-mode-code" id="_ref_4298"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, let <var>strict</var> be <emu-val>true</emu-val>. Otherwise, let <var>strict</var> be <emu-val>false</emu-val>.</li><li>Let <var>name</var> be StringValue of <emu-nt id="_ref_13479"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt>.</li><li>Let <var>F</var> be !&nbsp;<emu-xref aoid="AsyncFunctionCreate" id="_ref_4299"><a href="#sec-async-functions-abstract-operations-async-function-create">AsyncFunctionCreate</a></emu-xref>(<emu-const>Normal</emu-const>, <emu-nt id="_ref_13480"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt>, <emu-nt id="_ref_13481"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt>, <var>scope</var>, <var>strict</var>).</li><li>Perform !&nbsp;<emu-xref aoid="SetFunctionName" id="_ref_4300"><a href="#sec-setfunctionname">SetFunctionName</a></emu-xref>(<var>F</var>, <var>name</var>).</li><li>Set <var>F</var>.[[SourceText]] to the source text matched by <emu-nt id="_ref_13482"><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt>.</li><li>Return <var>F</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="AsyncFunctionDeclaration" collapsed="">
<emu-nt><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6a076671"><emu-t>async</emu-t><emu-t>function</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13483"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13484"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If the function code for <emu-nt id="_ref_13485"><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt> is <emu-xref href="#sec-strict-mode-code" id="_ref_4301"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, let <var>strict</var> be <emu-val>true</emu-val>. Otherwise, let <var>strict</var> be <emu-val>false</emu-val>.</li><li>Let <var>F</var> be !&nbsp;<emu-xref aoid="AsyncFunctionCreate" id="_ref_4302"><a href="#sec-async-functions-abstract-operations-async-function-create">AsyncFunctionCreate</a></emu-xref>(<emu-const>Normal</emu-const>, <emu-nt id="_ref_13486"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt>, <emu-nt id="_ref_13487"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt>, <var>scope</var>, <var>strict</var>).</li><li>Perform !&nbsp;<emu-xref aoid="SetFunctionName" id="_ref_4303"><a href="#sec-setfunctionname">SetFunctionName</a></emu-xref>(<var>F</var>, <code>"default"</code>).</li><li>Set <var>F</var>.[[SourceText]] to the source text matched by <emu-nt id="_ref_13488"><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt>.</li><li>Return <var>F</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-async-function-definitions-EvaluateBody">
<h1><span class="secnum">14.7.11</span>Runtime Semantics: EvaluateBody</h1>
<p>With parameters <var>functionObject</var> and <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4304"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> <var>argumentsList</var>.</p>
<emu-grammar><emu-production name="AsyncFunctionBody" collapsed="">
<emu-nt><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8aa65b90"><emu-nt id="_ref_13489"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>promiseCapability</var> be !&nbsp;<emu-xref aoid="NewPromiseCapability" id="_ref_4305"><a href="#sec-newpromisecapability">NewPromiseCapability</a></emu-xref>(<emu-xref href="#sec-promise-constructor" id="_ref_4306"><a href="#sec-promise-constructor">%Promise%</a></emu-xref>).</li><li>Let <var>declResult</var> be <emu-xref aoid="FunctionDeclarationInstantiation" id="_ref_4307"><a href="#sec-functiondeclarationinstantiation">FunctionDeclarationInstantiation</a></emu-xref>(<var>functionObject</var>, <var>argumentsList</var>).</li><li>If <var>declResult</var> is not an <emu-xref href="#sec-completion-record-specification-type" id="_ref_4308"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, then<ol><li>Perform !&nbsp;<emu-xref aoid="AsyncFunctionStart" id="_ref_4309"><a href="#sec-async-functions-abstract-operations-async-function-start">AsyncFunctionStart</a></emu-xref>(<var>promiseCapability</var>, <emu-nt id="_ref_13490"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt>).</li></ol></li><li>Else <var>declResult</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_4310"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>,<ol><li>Perform !&nbsp;<emu-xref aoid="Call" id="_ref_4311"><a href="#sec-call">Call</a></emu-xref>(<var>promiseCapability</var>.[[Reject]], <emu-val>undefined</emu-val>, « <var>declResult</var>.[[Value]] »).</li></ol></li><li>Return <emu-xref aoid="Completion" id="_ref_4312"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref> { [[Type]]: <emu-const>return</emu-const>, [[Value]]: <var>promiseCapability</var>.[[Promise]], [[Target]]: <emu-const>empty</emu-const> }.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-async-function-definitions-PropertyDefinitionEvaluation">
<h1><span class="secnum">14.7.12</span>Runtime Semantics: PropertyDefinitionEvaluation</h1>
<p>With parameters <var>object</var> and <var>enumerable</var>.</p>
<emu-grammar><emu-production name="AsyncMethod" collapsed="">
<emu-nt><a href="#prod-AsyncMethod">AsyncMethod</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="759e5682"><emu-t>async</emu-t><emu-nt id="_ref_13491"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13492"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13493"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>propKey</var> be the result of evaluating <emu-nt id="_ref_13494"><a href="#prod-PropertyName">PropertyName</a></emu-nt>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_4313"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>propKey</var>).</li><li>If the function code for this <emu-nt id="_ref_13495"><a href="#prod-AsyncMethod">AsyncMethod</a></emu-nt> is <emu-xref href="#sec-strict-mode-code" id="_ref_4314"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, let <var>strict</var> be <emu-val>true</emu-val>. Otherwise let <var>strict</var> be <emu-val>false</emu-val>.</li><li>Let <var>scope</var> be the LexicalEnvironment of the <emu-xref href="#running-execution-context" id="_ref_4315"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Let <var>closure</var> be !&nbsp;<emu-xref aoid="AsyncFunctionCreate" id="_ref_4316"><a href="#sec-async-functions-abstract-operations-async-function-create">AsyncFunctionCreate</a></emu-xref>(<emu-const>Method</emu-const>, <emu-nt id="_ref_13496"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt>, <emu-nt id="_ref_13497"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt>, <var>scope</var>, <var>strict</var>).</li><li>Perform !&nbsp;<emu-xref aoid="MakeMethod" id="_ref_4317"><a href="#sec-makemethod">MakeMethod</a></emu-xref>(<var>closure</var>, <var>object</var>).</li><li>Perform !&nbsp;<emu-xref aoid="SetFunctionName" id="_ref_4318"><a href="#sec-setfunctionname">SetFunctionName</a></emu-xref>(<var>closure</var>, <var>propKey</var>).</li><li>Set <var>closure</var>.[[SourceText]] to the source text matched by <emu-nt id="_ref_13498"><a href="#prod-AsyncMethod">AsyncMethod</a></emu-nt>.</li><li>Let <var>desc</var> be the PropertyDescriptor { [[Value]]: <var>closure</var>, [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <var>enumerable</var>, [[Configurable]]: <emu-val>true</emu-val> }.</li><li>Return ?&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_4319"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>object</var>, <var>propKey</var>, <var>desc</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-async-function-definitions-runtime-semantics-namedevaluation">
<h1><span class="secnum">14.7.13</span>Runtime Semantics: NamedEvaluation</h1>
<p>With parameter <var>name</var>.</p>
<emu-grammar><emu-production name="AsyncFunctionExpression" collapsed="">
<emu-nt><a href="#prod-AsyncFunctionExpression">AsyncFunctionExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6a076671"><emu-t>async</emu-t><emu-t>function</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13499"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13500"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>closure</var> be the result of evaluating this <emu-nt id="_ref_13501"><a href="#prod-AsyncFunctionExpression">AsyncFunctionExpression</a></emu-nt>.</li><li>Perform <emu-xref aoid="SetFunctionName" id="_ref_4320"><a href="#sec-setfunctionname">SetFunctionName</a></emu-xref>(<var>closure</var>, <var>name</var>).</li><li>Return <var>closure</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-async-function-definitions-runtime-semantics-evaluation">
<h1><span class="secnum">14.7.14</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="AsyncFunctionDeclaration" collapsed="">
<emu-nt><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e2632ddf"><emu-t>async</emu-t><emu-t>function</emu-t><emu-nt id="_ref_13502"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13503"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13504"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-xref aoid="NormalCompletion" id="_ref_4321"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="AsyncFunctionDeclaration" collapsed="">
<emu-nt><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6a076671"><emu-t>async</emu-t><emu-t>function</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13505"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13506"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-xref aoid="NormalCompletion" id="_ref_4322"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="AsyncFunctionExpression" collapsed="">
<emu-nt><a href="#prod-AsyncFunctionExpression">AsyncFunctionExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6a076671"><emu-t>async</emu-t><emu-t>function</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13507"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13508"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If the function code for <emu-nt id="_ref_13509"><a href="#prod-AsyncFunctionExpression">AsyncFunctionExpression</a></emu-nt> is <emu-xref href="#sec-strict-mode-code" id="_ref_4323"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, let <var>strict</var> be <emu-val>true</emu-val>. Otherwise let <var>strict</var> be <emu-val>false</emu-val>.</li><li>Let <var>scope</var> be the LexicalEnvironment of the <emu-xref href="#running-execution-context" id="_ref_4324"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Let <var>closure</var> be !&nbsp;<emu-xref aoid="AsyncFunctionCreate" id="_ref_4325"><a href="#sec-async-functions-abstract-operations-async-function-create">AsyncFunctionCreate</a></emu-xref>(<emu-const>Normal</emu-const>, <emu-nt id="_ref_13510"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt>, <emu-nt id="_ref_13511"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt>, <var>scope</var>, <var>strict</var>).</li><li>Set <var>closure</var>.[[SourceText]] to the source text matched by <emu-nt id="_ref_13512"><a href="#prod-AsyncFunctionExpression">AsyncFunctionExpression</a></emu-nt>.</li><li>Return <var>closure</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="AsyncFunctionExpression" collapsed="">
<emu-nt><a href="#prod-AsyncFunctionExpression">AsyncFunctionExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e2632ddf"><emu-t>async</emu-t><emu-t>function</emu-t><emu-nt id="_ref_13513"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-t>(</emu-t><emu-nt id="_ref_13514"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt id="_ref_13515"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If the function code for <emu-nt id="_ref_13516"><a href="#prod-AsyncFunctionExpression">AsyncFunctionExpression</a></emu-nt> is <emu-xref href="#sec-strict-mode-code" id="_ref_4326"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, let <var>strict</var> be <emu-val>true</emu-val>. Otherwise let <var>strict</var> be <emu-val>false</emu-val>.</li><li>Let <var>scope</var> be the LexicalEnvironment of the <emu-xref href="#running-execution-context" id="_ref_4327"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Let <var>funcEnv</var> be !&nbsp;<emu-xref aoid="NewDeclarativeEnvironment" id="_ref_4328"><a href="#sec-newdeclarativeenvironment">NewDeclarativeEnvironment</a></emu-xref>(<var>scope</var>).</li><li>Let <var>envRec</var> be <var>funcEnv</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_4329"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref>.</li><li>Let <var>name</var> be StringValue of <emu-nt id="_ref_13517"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt>.</li><li>Perform ! <var>envRec</var>.CreateImmutableBinding(<var>name</var>).</li><li>Let <var>closure</var> be !&nbsp;<emu-xref aoid="AsyncFunctionCreate" id="_ref_4330"><a href="#sec-async-functions-abstract-operations-async-function-create">AsyncFunctionCreate</a></emu-xref>(<emu-const>Normal</emu-const>, <emu-nt id="_ref_13518"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt>, <emu-nt id="_ref_13519"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt>, <var>funcEnv</var>, <var>strict</var>).</li><li>Perform !&nbsp;<emu-xref aoid="SetFunctionName" id="_ref_4331"><a href="#sec-setfunctionname">SetFunctionName</a></emu-xref>(<var>closure</var>, <var>name</var>).</li><li>Perform ! <var>envRec</var>.InitializeBinding(<var>name</var>, <var>closure</var>).</li><li>Set <var>closure</var>.[[SourceText]] to the source text matched by <emu-nt id="_ref_13520"><a href="#prod-AsyncFunctionExpression">AsyncFunctionExpression</a></emu-nt>.</li><li>Return <var>closure</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="AwaitExpression" collapsed="">
<emu-nt><a href="#prod-AwaitExpression">AwaitExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ef22da1b"><emu-t>await</emu-t><emu-nt id="_ref_13521"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>exprRef</var> be the result of evaluating <emu-nt id="_ref_13522"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt>.</li><li>Let <var>value</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_4332"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>exprRef</var>).</li><li>Return ?&nbsp;<emu-xref aoid="Await" id="_ref_4333"><a href="#await">Await</a></emu-xref>(<var>value</var>).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-async-arrow-function-definitions">
<h1><span class="secnum">14.8</span>Async Arrow Function Definitions</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="AsyncArrowFunction" params="In, Yield, Await" id="prod-AsyncArrowFunction">
<emu-nt params="In, Yield, Await"><a href="#prod-AsyncArrowFunction">AsyncArrowFunction</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="bb50dce4"><emu-t>async</emu-t><emu-gann>[no <emu-nt id="_ref_13523"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-nt params="?Yield" id="_ref_13524"><a href="#prod-AsyncArrowBindingIdentifier">AsyncArrowBindingIdentifier</a><emu-mods><emu-params>[?Yield]</emu-params></emu-mods></emu-nt><emu-gann>[no <emu-nt id="_ref_13525"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-t>=&gt;</emu-t><emu-nt params="?In" id="_ref_13526"><a href="#prod-AsyncConciseBody">AsyncConciseBody</a><emu-mods><emu-params>[?In]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="callcover"><emu-nt params="?Yield, ?Await" id="_ref_13527"><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-gann>[no <emu-nt id="_ref_13528"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-t>=&gt;</emu-t><emu-nt params="?In" id="_ref_13529"><a href="#prod-AsyncConciseBody">AsyncConciseBody</a><emu-mods><emu-params>[?In]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="AsyncConciseBody" params="In" id="prod-AsyncConciseBody">
<emu-nt params="In"><a href="#prod-AsyncConciseBody">AsyncConciseBody</a><emu-mods><emu-params>[In]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4fc9a6b0"><emu-gann>[lookahead ≠ <emu-t>{</emu-t>]</emu-gann><emu-nt params="?In, ~Yield, +Await" id="_ref_13530"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[?In, ~Yield, +Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="6ccf9be6"><emu-t>{</emu-t><emu-nt id="_ref_13531"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="AsyncArrowBindingIdentifier" params="Yield" id="prod-AsyncArrowBindingIdentifier">
<emu-nt params="Yield"><a href="#prod-AsyncArrowBindingIdentifier">AsyncArrowBindingIdentifier</a><emu-mods><emu-params>[Yield]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="614a19b0"><emu-nt params="?Yield, +Await" id="_ref_13532"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[?Yield, +Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="CoverCallExpressionAndAsyncArrowHead" params="Yield, Await" id="prod-CoverCallExpressionAndAsyncArrowHead">
<emu-nt params="Yield, Await"><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f747be5d"><emu-nt params="?Yield, ?Await" id="_ref_13533"><a href="#prod-MemberExpression">MemberExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt params="?Yield, ?Await" id="_ref_13534"><a href="#prod-Arguments">Arguments</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 <emu-grammar><emu-production name="AsyncArrowFunction" collapsed="" class=" inline">
<emu-nt><a href="#prod-AsyncArrowFunction">AsyncArrowFunction</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="694c2ff0"><emu-nt id="_ref_13535"><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt><emu-t>=&gt;</emu-t><emu-nt id="_ref_13536"><a href="#prod-AsyncConciseBody">AsyncConciseBody</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> the interpretation of <emu-nt id="_ref_13537"><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt> is refined using the following grammar:</p>
<emu-grammar type="definition"><emu-production name="AsyncArrowHead" id="prod-AsyncArrowHead">
<emu-nt><a href="#prod-AsyncArrowHead">AsyncArrowHead</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c9d14bfe"><emu-t>async</emu-t><emu-gann>[no <emu-nt id="_ref_13538"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-nt params="~Yield, +Await" id="_ref_13539"><a href="#prod-ArrowFormalParameters">ArrowFormalParameters</a><emu-mods><emu-params>[~Yield, +Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-clause id="sec-async-arrow-function-definitions-static-semantics-early-errors">
<h1><span class="secnum">14.8.1</span>Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="AsyncArrowFunction" collapsed="">
<emu-nt><a href="#prod-AsyncArrowFunction">AsyncArrowFunction</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="7505c63a"><emu-t>async</emu-t><emu-nt id="_ref_13540"><a href="#prod-AsyncArrowBindingIdentifier">AsyncArrowBindingIdentifier</a></emu-nt><emu-t>=&gt;</emu-t><emu-nt id="_ref_13541"><a href="#prod-AsyncConciseBody">AsyncConciseBody</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>It is a Syntax Error if any element of the BoundNames of <emu-nt id="_ref_13542"><a href="#prod-AsyncArrowBindingIdentifier">AsyncArrowBindingIdentifier</a></emu-nt> also occurs in the LexicallyDeclaredNames of <emu-nt id="_ref_13543"><a href="#prod-AsyncConciseBody">AsyncConciseBody</a></emu-nt>.</li>
</ul>
<emu-grammar><emu-production name="AsyncArrowFunction" collapsed="">
<emu-nt><a href="#prod-AsyncArrowFunction">AsyncArrowFunction</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="694c2ff0"><emu-nt id="_ref_13544"><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt><emu-t>=&gt;</emu-t><emu-nt id="_ref_13545"><a href="#prod-AsyncConciseBody">AsyncConciseBody</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>It is a Syntax Error if <emu-nt id="_ref_13546"><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt> Contains <emu-nt id="_ref_13547"><a href="#prod-YieldExpression">YieldExpression</a></emu-nt> is <emu-val>true</emu-val>.</li>
<li>It is a Syntax Error if <emu-nt id="_ref_13548"><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt> Contains <emu-nt id="_ref_13549"><a href="#prod-AwaitExpression">AwaitExpression</a></emu-nt> is <emu-val>true</emu-val>.</li>
<li>It is a Syntax Error if <emu-nt id="_ref_13550"><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt> is not <emu-xref href="#sec-syntactic-grammar" id="_ref_4334"><a href="#sec-syntactic-grammar">covering</a></emu-xref> an <emu-nt id="_ref_13551"><a href="#prod-AsyncArrowHead">AsyncArrowHead</a></emu-nt>.</li>
<li>It is a Syntax Error if any element of the BoundNames of <emu-nt id="_ref_13552"><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt> also occurs in the LexicallyDeclaredNames of <emu-nt id="_ref_13553"><a href="#prod-AsyncConciseBody">AsyncConciseBody</a></emu-nt>.</li>
<li>It is a Syntax Error if ContainsUseStrict of <emu-nt id="_ref_13554"><a href="#prod-AsyncConciseBody">AsyncConciseBody</a></emu-nt> is <emu-val>true</emu-val> and IsSimpleParameterList of <emu-nt id="_ref_13555"><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt> is <emu-val>false</emu-val>.</li>
<li>All Early Error rules for <emu-nt id="_ref_13556"><a href="#prod-AsyncArrowHead">AsyncArrowHead</a></emu-nt> and its derived productions apply to CoveredAsyncArrowHead of <emu-nt id="_ref_13557"><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt>.</li>
</ul>
</emu-clause>
<emu-clause id="sec-async-arrow-function-definitions-static-semantics-CoveredAsyncArrowHead">
<h1><span class="secnum">14.8.2</span>Static Semantics: CoveredAsyncArrowHead</h1>
<emu-grammar><emu-production name="CoverCallExpressionAndAsyncArrowHead" collapsed="">
<emu-nt><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="be44becf"><emu-nt id="_ref_13558"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-nt id="_ref_13559"><a href="#prod-Arguments">Arguments</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the <emu-nt id="_ref_13560"><a href="#prod-AsyncArrowHead">AsyncArrowHead</a></emu-nt> that is <emu-xref href="#sec-syntactic-grammar" id="_ref_4335"><a href="#sec-syntactic-grammar">covered</a></emu-xref> by <emu-nt id="_ref_13561"><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-async-arrow-function-definitions-static-semantics-BoundNames">
<h1><span class="secnum">14.8.3</span>Static Semantics: BoundNames</h1>
<emu-grammar><emu-production name="CoverCallExpressionAndAsyncArrowHead" collapsed="">
<emu-nt><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="be44becf"><emu-nt id="_ref_13562"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-nt id="_ref_13563"><a href="#prod-Arguments">Arguments</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>head</var> be CoveredAsyncArrowHead of <emu-nt id="_ref_13564"><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt>.</li><li>Return the BoundNames of <var>head</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-async-arrow-function-definitions-static-semantics-Contains">
<h1><span class="secnum">14.8.4</span>Static Semantics: Contains</h1>
<p>With parameter <var>symbol</var>.</p>
<emu-grammar><emu-production name="AsyncArrowFunction" collapsed="">
<emu-nt><a href="#prod-AsyncArrowFunction">AsyncArrowFunction</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="7505c63a"><emu-t>async</emu-t><emu-nt id="_ref_13565"><a href="#prod-AsyncArrowBindingIdentifier">AsyncArrowBindingIdentifier</a></emu-nt><emu-t>=&gt;</emu-t><emu-nt id="_ref_13566"><a href="#prod-AsyncConciseBody">AsyncConciseBody</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <var>symbol</var> is not one of <emu-nt id="_ref_13567"><a href="#prod-NewTarget">NewTarget</a></emu-nt>, <emu-nt id="_ref_13568"><a href="#prod-SuperProperty">SuperProperty</a></emu-nt>, <emu-nt id="_ref_13569"><a href="#prod-SuperCall">SuperCall</a></emu-nt>, <code>super</code>, or <code>this</code>, return <emu-val>false</emu-val>.</li><li>Return <emu-nt id="_ref_13570"><a href="#prod-AsyncConciseBody">AsyncConciseBody</a></emu-nt> Contains <var>symbol</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="AsyncArrowFunction" collapsed="">
<emu-nt><a href="#prod-AsyncArrowFunction">AsyncArrowFunction</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="694c2ff0"><emu-nt id="_ref_13571"><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt><emu-t>=&gt;</emu-t><emu-nt id="_ref_13572"><a href="#prod-AsyncConciseBody">AsyncConciseBody</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <var>symbol</var> is not one of <emu-nt id="_ref_13573"><a href="#prod-NewTarget">NewTarget</a></emu-nt>, <emu-nt id="_ref_13574"><a href="#prod-SuperProperty">SuperProperty</a></emu-nt>, <emu-nt id="_ref_13575"><a href="#prod-SuperCall">SuperCall</a></emu-nt>, <code>super</code>, or <code>this</code>, return <emu-val>false</emu-val>.</li><li>Let <var>head</var> be CoveredAsyncArrowHead of <emu-nt id="_ref_13576"><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt>.</li><li>If <var>head</var> Contains <var>symbol</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return <emu-nt id="_ref_13577"><a href="#prod-AsyncConciseBody">AsyncConciseBody</a></emu-nt> Contains <var>symbol</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">Normally, Contains does not look inside most function forms. However, Contains is used to detect <code>new.target</code>, <code>this</code>, and <code>super</code> usage within an AsyncArrowFunction.</div></emu-note>
</emu-clause>
<emu-clause id="sec-async-arrow-function-definitions-static-semantics-ContainsExpression">
<h1><span class="secnum">14.8.5</span>Static Semantics: ContainsExpression</h1>
<emu-grammar><emu-production name="AsyncArrowBindingIdentifier" collapsed="">
<emu-nt><a href="#prod-AsyncArrowBindingIdentifier">AsyncArrowBindingIdentifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="50e97238"><emu-nt id="_ref_13578"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-async-arrow-function-definitions-static-semantics-ExpectedArgumentCount">
<h1><span class="secnum">14.8.6</span>Static Semantics: ExpectedArgumentCount</h1>
<emu-grammar><emu-production name="AsyncArrowBindingIdentifier" collapsed="">
<emu-nt><a href="#prod-AsyncArrowBindingIdentifier">AsyncArrowBindingIdentifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="50e97238"><emu-nt id="_ref_13579"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return 1.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-async-arrow-function-definitions-static-semantics-HasName">
<h1><span class="secnum">14.8.7</span>Static Semantics: HasName</h1>
<emu-grammar><emu-production name="AsyncArrowFunction" collapsed="">
<emu-nt><a href="#prod-AsyncArrowFunction">AsyncArrowFunction</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="7505c63a"><emu-t>async</emu-t><emu-nt id="_ref_13580"><a href="#prod-AsyncArrowBindingIdentifier">AsyncArrowBindingIdentifier</a></emu-nt><emu-t>=&gt;</emu-t><emu-nt id="_ref_13581"><a href="#prod-AsyncConciseBody">AsyncConciseBody</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="AsyncArrowFunction" collapsed="">
<emu-nt><a href="#prod-AsyncArrowFunction">AsyncArrowFunction</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="694c2ff0"><emu-nt id="_ref_13582"><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt><emu-t>=&gt;</emu-t><emu-nt id="_ref_13583"><a href="#prod-AsyncConciseBody">AsyncConciseBody</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-async-arrow-function-definitions-static-semantics-IsSimpleParameterList">
<h1><span class="secnum">14.8.8</span>Static Semantics: IsSimpleParameterList</h1>
<emu-grammar><emu-production name="AsyncArrowBindingIdentifier" params="Yield" collapsed="">
<emu-nt params="Yield"><a href="#prod-AsyncArrowBindingIdentifier">AsyncArrowBindingIdentifier</a><emu-mods><emu-params>[Yield]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="614a19b0"><emu-nt params="?Yield, +Await" id="_ref_13584"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[?Yield, +Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="CoverCallExpressionAndAsyncArrowHead" collapsed="">
<emu-nt><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="be44becf"><emu-nt id="_ref_13585"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-nt id="_ref_13586"><a href="#prod-Arguments">Arguments</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>head</var> be CoveredAsyncArrowHead of <emu-nt id="_ref_13587"><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt>.</li><li>Return IsSimpleParameterList of <var>head</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-async-arrow-function-definitions-static-semantics-LexicallyDeclaredNames">
<h1><span class="secnum">14.8.9</span>Static Semantics: LexicallyDeclaredNames</h1>
<emu-grammar><emu-production name="AsyncConciseBody" collapsed="">
<emu-nt><a href="#prod-AsyncConciseBody">AsyncConciseBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d4fc7da4"><emu-nt id="_ref_13588"><a href="#prod-AssignmentExpression">AssignmentExpression</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_4336"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-async-arrow-function-definitions-static-semantics-LexicallyScopedDeclarations">
<h1><span class="secnum">14.8.10</span>Static Semantics: LexicallyScopedDeclarations</h1>
<emu-grammar><emu-production name="AsyncConciseBody" collapsed="">
<emu-nt><a href="#prod-AsyncConciseBody">AsyncConciseBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d4fc7da4"><emu-nt id="_ref_13589"><a href="#prod-AssignmentExpression">AssignmentExpression</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_4337"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-async-arrow-function-definitions-static-semantics-VarDeclaredNames">
<h1><span class="secnum">14.8.11</span>Static Semantics: VarDeclaredNames</h1>
<emu-grammar><emu-production name="AsyncConciseBody" collapsed="">
<emu-nt><a href="#prod-AsyncConciseBody">AsyncConciseBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d4fc7da4"><emu-nt id="_ref_13590"><a href="#prod-AssignmentExpression">AssignmentExpression</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_4338"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-async-arrow-function-definitions-static-semantics-VarScopedDeclarations">
<h1><span class="secnum">14.8.12</span>Static Semantics: VarScopedDeclarations</h1>
<emu-grammar><emu-production name="AsyncConciseBody" collapsed="">
<emu-nt><a href="#prod-AsyncConciseBody">AsyncConciseBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d4fc7da4"><emu-nt id="_ref_13591"><a href="#prod-AssignmentExpression">AssignmentExpression</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_4339"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-async-arrow-function-definitions-IteratorBindingInitialization">
<h1><span class="secnum">14.8.13</span>Runtime Semantics: IteratorBindingInitialization</h1>
<p>With parameters <var>iteratorRecord</var> and <var>environment</var>.</p>
<emu-grammar><emu-production name="AsyncArrowBindingIdentifier" collapsed="">
<emu-nt><a href="#prod-AsyncArrowBindingIdentifier">AsyncArrowBindingIdentifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="50e97238"><emu-nt id="_ref_13592"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_4340"><a href="#assert">Assert</a></emu-xref>: <var>iteratorRecord</var>.[[Done]] is <emu-val>false</emu-val>.</li><li>Let <var>next</var> be <emu-xref aoid="IteratorStep" id="_ref_4341"><a href="#sec-iteratorstep">IteratorStep</a></emu-xref>(<var>iteratorRecord</var>).</li><li>If <var>next</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_4342"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, set <var>iteratorRecord</var>.[[Done]] to <emu-val>true</emu-val>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_4343"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>next</var>).</li><li>If <var>next</var> is <emu-val>false</emu-val>, set <var>iteratorRecord</var>.[[Done]] to <emu-val>true</emu-val>.</li><li>Else,<ol><li>Let <var>v</var> be <emu-xref aoid="IteratorValue" id="_ref_4344"><a href="#sec-iteratorvalue">IteratorValue</a></emu-xref>(<var>next</var>).</li><li>If <var>v</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_4345"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, set <var>iteratorRecord</var>.[[Done]] to <emu-val>true</emu-val>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_4346"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>v</var>).</li></ol></li><li>If <var>iteratorRecord</var>.[[Done]] is <emu-val>true</emu-val>, let <var>v</var> be <emu-val>undefined</emu-val>.</li><li>Return the result of performing BindingInitialization for <emu-nt id="_ref_13593"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt> using <var>v</var> and <var>environment</var> as the arguments.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-async-arrow-function-definitions-EvaluateBody">
<h1><span class="secnum">14.8.14</span>Runtime Semantics: EvaluateBody</h1>
<p>With parameters <var>functionObject</var> and <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4347"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> <var>argumentsList</var>.</p>
<emu-grammar><emu-production name="AsyncConciseBody" collapsed="">
<emu-nt><a href="#prod-AsyncConciseBody">AsyncConciseBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d4fc7da4"><emu-nt id="_ref_13594"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>promiseCapability</var> be !&nbsp;<emu-xref aoid="NewPromiseCapability" id="_ref_4348"><a href="#sec-newpromisecapability">NewPromiseCapability</a></emu-xref>(<emu-xref href="#sec-promise-constructor" id="_ref_4349"><a href="#sec-promise-constructor">%Promise%</a></emu-xref>).</li><li>Let <var>declResult</var> be <emu-xref aoid="FunctionDeclarationInstantiation" id="_ref_4350"><a href="#sec-functiondeclarationinstantiation">FunctionDeclarationInstantiation</a></emu-xref>(<var>functionObject</var>, <var>argumentsList</var>).</li><li>If <var>declResult</var> is not an <emu-xref href="#sec-completion-record-specification-type" id="_ref_4351"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, then<ol><li>Perform !&nbsp;<emu-xref aoid="AsyncFunctionStart" id="_ref_4352"><a href="#sec-async-functions-abstract-operations-async-function-start">AsyncFunctionStart</a></emu-xref>(<var>promiseCapability</var>, <emu-nt id="_ref_13595"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>).</li></ol></li><li>Else <var>declResult</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_4353"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>,<ol><li>Perform !&nbsp;<emu-xref aoid="Call" id="_ref_4354"><a href="#sec-call">Call</a></emu-xref>(<var>promiseCapability</var>.[[Reject]], <emu-val>undefined</emu-val>, « <var>declResult</var>.[[Value]] »).</li></ol></li><li>Return <emu-xref aoid="Completion" id="_ref_4355"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref> { [[Type]]: <emu-const>return</emu-const>, [[Value]]: <var>promiseCapability</var>.[[Promise]], [[Target]]: <emu-const>empty</emu-const> }.
</li></ol></emu-alg>
<emu-grammar><emu-production name="AsyncConciseBody" collapsed="">
<emu-nt><a href="#prod-AsyncConciseBody">AsyncConciseBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6ccf9be6"><emu-t>{</emu-t><emu-nt id="_ref_13596"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the result of EvaluateBody of <emu-nt id="_ref_13597"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt> passing <var>functionObject</var> and <var>argumentsList</var> as the arguments.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-async-arrow-function-definitions-runtime-semantics-namedevaluation">
<h1><span class="secnum">14.8.15</span>Runtime Semantics: NamedEvaluation</h1>
<p>With parameter <var>name</var>.</p>
<emu-grammar><emu-production name="AsyncArrowFunction" collapsed="">
<emu-nt><a href="#prod-AsyncArrowFunction">AsyncArrowFunction</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="7505c63a"><emu-t>async</emu-t><emu-nt id="_ref_13598"><a href="#prod-AsyncArrowBindingIdentifier">AsyncArrowBindingIdentifier</a></emu-nt><emu-t>=&gt;</emu-t><emu-nt id="_ref_13599"><a href="#prod-AsyncConciseBody">AsyncConciseBody</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="AsyncArrowFunction" collapsed="">
<emu-nt><a href="#prod-AsyncArrowFunction">AsyncArrowFunction</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="694c2ff0"><emu-nt id="_ref_13600"><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt><emu-t>=&gt;</emu-t><emu-nt id="_ref_13601"><a href="#prod-AsyncConciseBody">AsyncConciseBody</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>closure</var> be the result of evaluating this <emu-nt id="_ref_13602"><a href="#prod-AsyncArrowFunction">AsyncArrowFunction</a></emu-nt>.</li><li>Perform <emu-xref aoid="SetFunctionName" id="_ref_4356"><a href="#sec-setfunctionname">SetFunctionName</a></emu-xref>(<var>closure</var>, <var>name</var>).</li><li>Return <var>closure</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-async-arrow-function-definitions-runtime-semantics-evaluation">
<h1><span class="secnum">14.8.16</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="AsyncArrowFunction" collapsed="">
<emu-nt><a href="#prod-AsyncArrowFunction">AsyncArrowFunction</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="7505c63a"><emu-t>async</emu-t><emu-nt id="_ref_13603"><a href="#prod-AsyncArrowBindingIdentifier">AsyncArrowBindingIdentifier</a></emu-nt><emu-t>=&gt;</emu-t><emu-nt id="_ref_13604"><a href="#prod-AsyncConciseBody">AsyncConciseBody</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If the function code for this <emu-nt id="_ref_13605"><a href="#prod-AsyncArrowFunction">AsyncArrowFunction</a></emu-nt> is <emu-xref href="#sec-strict-mode-code" id="_ref_4357"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, let <var>strict</var> be <emu-val>true</emu-val>. Otherwise, let <var>strict</var> be <emu-val>false</emu-val>.</li><li>Let <var>scope</var> be the LexicalEnvironment of the <emu-xref href="#running-execution-context" id="_ref_4358"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Let <var>parameters</var> be <emu-nt id="_ref_13606"><a href="#prod-AsyncArrowBindingIdentifier">AsyncArrowBindingIdentifier</a></emu-nt>.</li><li>Let <var>closure</var> be !&nbsp;<emu-xref aoid="AsyncFunctionCreate" id="_ref_4359"><a href="#sec-async-functions-abstract-operations-async-function-create">AsyncFunctionCreate</a></emu-xref>(<emu-const>Arrow</emu-const>, <var>parameters</var>, <emu-nt id="_ref_13607"><a href="#prod-AsyncConciseBody">AsyncConciseBody</a></emu-nt>, <var>scope</var>, <var>strict</var>).</li><li>Return <var>closure</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="AsyncArrowFunction" collapsed="">
<emu-nt><a href="#prod-AsyncArrowFunction">AsyncArrowFunction</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="694c2ff0"><emu-nt id="_ref_13608"><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt><emu-t>=&gt;</emu-t><emu-nt id="_ref_13609"><a href="#prod-AsyncConciseBody">AsyncConciseBody</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If the function code for this <emu-nt id="_ref_13610"><a href="#prod-AsyncArrowFunction">AsyncArrowFunction</a></emu-nt> is <emu-xref href="#sec-strict-mode-code" id="_ref_4360"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, let <var>strict</var> be <emu-val>true</emu-val>. Otherwise, let <var>strict</var> be <emu-val>false</emu-val>.</li><li>Let <var>scope</var> be the LexicalEnvironment of the <emu-xref href="#running-execution-context" id="_ref_4361"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Let <var>head</var> be CoveredAsyncArrowHead of <emu-nt id="_ref_13611"><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt>.</li><li>Let <var>parameters</var> be the <emu-nt id="_ref_13612"><a href="#prod-ArrowFormalParameters">ArrowFormalParameters</a></emu-nt> of <var>head</var>.</li><li>Let <var>closure</var> be !&nbsp;<emu-xref aoid="AsyncFunctionCreate" id="_ref_4362"><a href="#sec-async-functions-abstract-operations-async-function-create">AsyncFunctionCreate</a></emu-xref>(<emu-const>Arrow</emu-const>, <var>parameters</var>, <emu-nt id="_ref_13613"><a href="#prod-AsyncConciseBody">AsyncConciseBody</a></emu-nt>, <var>scope</var>, <var>strict</var>).</li><li>Return <var>closure</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-tail-position-calls">
<h1><span class="secnum">14.9</span>Tail Position Calls</h1>
<emu-clause id="sec-isintailposition" aoid="IsInTailPosition">
<h1><span class="secnum">14.9.1</span>Static Semantics: IsInTailPosition ( <var>call</var> )</h1>
<p>The abstract operation IsInTailPosition with argument <var>call</var> performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_4363"><a href="#assert">Assert</a></emu-xref>: <var>call</var> is a <emu-xref href="#sec-syntactic-grammar" id="_ref_4364"><a href="#sec-syntactic-grammar">Parse Node</a></emu-xref>.</li><li>If the source code matching <var>call</var> is <emu-xref href="#non-strict-code" id="_ref_4365"><a href="#non-strict-code">non-strict code</a></emu-xref>, return <emu-val>false</emu-val>.</li><li>If <var>call</var> is not contained within a <emu-nt id="_ref_13614"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt>, <emu-nt id="_ref_13615"><a href="#prod-ConciseBody">ConciseBody</a></emu-nt>, or <emu-nt id="_ref_13616"><a href="#prod-AsyncConciseBody">AsyncConciseBody</a></emu-nt>, return <emu-val>false</emu-val>.</li><li>Let <var>body</var> be the <emu-nt id="_ref_13617"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt>, <emu-nt id="_ref_13618"><a href="#prod-ConciseBody">ConciseBody</a></emu-nt>, or <emu-nt id="_ref_13619"><a href="#prod-AsyncConciseBody">AsyncConciseBody</a></emu-nt> that most closely contains <var>call</var>.</li><li>If <var>body</var> is the <emu-nt id="_ref_13620"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt> of a <emu-nt id="_ref_13621"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt>, return <emu-val>false</emu-val>.</li><li>If <var>body</var> is the <emu-nt id="_ref_13622"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt> of an <emu-nt id="_ref_13623"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt>, return <emu-val>false</emu-val>.</li><li>If <var>body</var> is the <emu-nt id="_ref_13624"><a href="#prod-FunctionBody">FunctionBody</a></emu-nt> of an <emu-nt id="_ref_13625"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt>, return <emu-val>false</emu-val>.</li><li>If <var>body</var> is an <emu-nt id="_ref_13626"><a href="#prod-AsyncConciseBody">AsyncConciseBody</a></emu-nt>, return <emu-val>false</emu-val>.</li><li>Return the result of HasCallInTailPosition of <var>body</var> with argument <var>call</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Tail Position calls are only defined in <emu-xref href="#sec-strict-mode-code" id="_ref_4366"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref> because of a common non-standard language extension (see <emu-xref href="#sec-addrestrictedfunctionproperties" id="_ref_359"><a href="#sec-addrestrictedfunctionproperties">9.2.9</a></emu-xref>) that enables observation of the chain of caller contexts.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-static-semantics-hascallintailposition">
<h1><span class="secnum">14.9.2</span>Static Semantics: HasCallInTailPosition</h1>
<p>With parameter <var>call</var>.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p><var>call</var> is a <emu-xref href="#sec-syntactic-grammar" id="_ref_4367"><a href="#sec-syntactic-grammar">Parse Node</a></emu-xref> that represents a specific range of source text. When the following algorithms compare <var>call</var> to another <emu-xref href="#sec-syntactic-grammar" id="_ref_4368"><a href="#sec-syntactic-grammar">Parse Node</a></emu-xref>, it is a test of whether they represent the same source text.</p>
</div></emu-note>
<emu-clause id="sec-statement-rules">
<h1><span class="secnum">14.9.2.1</span>Statement Rules</h1>
<emu-grammar><emu-production name="ConciseBody" collapsed="">
<emu-nt><a href="#prod-ConciseBody">ConciseBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d4fc7da4"><emu-nt id="_ref_13627"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return HasCallInTailPosition of <emu-nt id="_ref_13628"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt> with argument <var>call</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="StatementList" collapsed="">
<emu-nt><a href="#prod-StatementList">StatementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0db4597a"><emu-nt id="_ref_13629"><a href="#prod-StatementList">StatementList</a></emu-nt><emu-nt id="_ref_13630"><a href="#prod-StatementListItem">StatementListItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>has</var> be HasCallInTailPosition of <emu-nt id="_ref_13631"><a href="#prod-StatementList">StatementList</a></emu-nt> with argument <var>call</var>.</li><li>If <var>has</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return HasCallInTailPosition of <emu-nt id="_ref_13632"><a href="#prod-StatementListItem">StatementListItem</a></emu-nt> with argument <var>call</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="FunctionStatementList" collapsed="">
<emu-nt><a href="#prod-FunctionStatementList">FunctionStatementList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></emu-rhs>
</emu-production>
<emu-production name="StatementListItem" collapsed="">
<emu-nt><a href="#prod-StatementListItem">StatementListItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d6f37721"><emu-nt id="_ref_13633"><a href="#prod-Declaration">Declaration</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="Statement">
<emu-nt><a href="#prod-Statement">Statement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8b0c0df0"><emu-nt id="_ref_13634"><a href="#prod-VariableStatement">VariableStatement</a></emu-nt></emu-rhs>
<emu-rhs a="7338aabb"><emu-nt id="_ref_13635"><a href="#prod-EmptyStatement">EmptyStatement</a></emu-nt></emu-rhs>
<emu-rhs a="82c424b7"><emu-nt id="_ref_13636"><a href="#prod-ExpressionStatement">ExpressionStatement</a></emu-nt></emu-rhs>
<emu-rhs a="1d7d329e"><emu-nt id="_ref_13637"><a href="#prod-ContinueStatement">ContinueStatement</a></emu-nt></emu-rhs>
<emu-rhs a="ab8baff9"><emu-nt id="_ref_13638"><a href="#prod-BreakStatement">BreakStatement</a></emu-nt></emu-rhs>
<emu-rhs a="867b4090"><emu-nt id="_ref_13639"><a href="#prod-ThrowStatement">ThrowStatement</a></emu-nt></emu-rhs>
<emu-rhs a="21212edb"><emu-nt id="_ref_13640"><a href="#prod-DebuggerStatement">DebuggerStatement</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="Block" collapsed="">
<emu-nt><a href="#prod-Block">Block</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><emu-t>{</emu-t><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="ReturnStatement" collapsed="">
<emu-nt><a href="#prod-ReturnStatement">ReturnStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0b293381"><emu-t>return</emu-t><emu-t>;</emu-t></emu-rhs>
</emu-production>
<emu-production name="LabelledItem" collapsed="">
<emu-nt><a href="#prod-LabelledItem">LabelledItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="fa7a943c"><emu-nt id="_ref_13641"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="IterationStatement">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8ea6608b"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13642"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_13643"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_13644"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="ee6f9a77"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_13645"><a href="#prod-ForBinding">ForBinding</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_13646"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_13647"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="6f7c3304"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13648"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt><emu-t>of</emu-t><emu-nt id="_ref_13649"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_13650"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="CaseBlock" collapsed="">
<emu-nt><a href="#prod-CaseBlock">CaseBlock</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><emu-t>{</emu-t><emu-t>}</emu-t></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="IfStatement" collapsed="">
<emu-nt><a href="#prod-IfStatement">IfStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="16e86a13"><emu-t>if</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13651"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_13652"><a href="#prod-Statement">Statement</a></emu-nt><emu-t>else</emu-t><emu-nt id="_ref_13653"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>has</var> be HasCallInTailPosition of the first <emu-nt id="_ref_13654"><a href="#prod-Statement">Statement</a></emu-nt> with argument <var>call</var>.</li><li>If <var>has</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return HasCallInTailPosition of the second <emu-nt id="_ref_13655"><a href="#prod-Statement">Statement</a></emu-nt> with argument <var>call</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="IfStatement" collapsed="">
<emu-nt><a href="#prod-IfStatement">IfStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f6819570"><emu-t>if</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13656"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_13657"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="IterationStatement">
<emu-nt><a href="#prod-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="24e70caa"><emu-t>do</emu-t><emu-nt id="_ref_13658"><a href="#prod-Statement">Statement</a></emu-nt><emu-t>while</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13659"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-t>;</emu-t></emu-rhs>
<emu-rhs a="f7627bf3"><emu-t>while</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13660"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_13661"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="fc33bcf0"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt optional="" id="_ref_13662"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_13663"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_13664"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_13665"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="48e766b4"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_13666"><a href="#prod-VariableDeclarationList">VariableDeclarationList</a></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_13667"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_13668"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_13669"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="93c07e45"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13670"><a href="#prod-LexicalDeclaration">LexicalDeclaration</a></emu-nt><emu-nt optional="" id="_ref_13671"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt optional="" id="_ref_13672"><a href="#prod-Expression">Expression</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_13673"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="bf521b70"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13674"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>in</emu-t><emu-nt id="_ref_13675"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_13676"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="ecf18944"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_13677"><a href="#prod-ForBinding">ForBinding</a></emu-nt><emu-t>in</emu-t><emu-nt id="_ref_13678"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_13679"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
<emu-rhs a="2590ad81"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13680"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt><emu-t>in</emu-t><emu-nt id="_ref_13681"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_13682"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="WithStatement" collapsed="">
<emu-nt><a href="#prod-WithStatement">WithStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="23bd2456"><emu-t>with</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13683"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_13684"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return HasCallInTailPosition of <emu-nt id="_ref_13685"><a href="#prod-Statement">Statement</a></emu-nt> with argument <var>call</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="LabelledStatement">
<emu-nt><a href="#prod-LabelledStatement">LabelledStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="51b6efb5"><emu-nt id="_ref_13686"><a href="#prod-LabelIdentifier">LabelIdentifier</a></emu-nt><emu-t>:</emu-t><emu-nt id="_ref_13687"><a href="#prod-LabelledItem">LabelledItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return HasCallInTailPosition of <emu-nt id="_ref_13688"><a href="#prod-LabelledItem">LabelledItem</a></emu-nt> with argument <var>call</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ReturnStatement" collapsed="">
<emu-nt><a href="#prod-ReturnStatement">ReturnStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b4f7595f"><emu-t>return</emu-t><emu-nt id="_ref_13689"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return HasCallInTailPosition of <emu-nt id="_ref_13690"><a href="#prod-Expression">Expression</a></emu-nt> with argument <var>call</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="SwitchStatement" collapsed="">
<emu-nt><a href="#prod-SwitchStatement">SwitchStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="515acffe"><emu-t>switch</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13691"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_13692"><a href="#prod-CaseBlock">CaseBlock</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return HasCallInTailPosition of <emu-nt id="_ref_13693"><a href="#prod-CaseBlock">CaseBlock</a></emu-nt> with argument <var>call</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="CaseBlock" collapsed="">
<emu-nt><a href="#prod-CaseBlock">CaseBlock</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="503b8396"><emu-t>{</emu-t><emu-nt optional="" id="_ref_13694"><a href="#prod-CaseClauses">CaseClauses</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt id="_ref_13695"><a href="#prod-DefaultClause">DefaultClause</a></emu-nt><emu-nt optional="" id="_ref_13696"><a href="#prod-CaseClauses">CaseClauses</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>has</var> be <emu-val>false</emu-val>.</li><li>If the first <emu-nt id="_ref_13697"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt> is present, let <var>has</var> be HasCallInTailPosition of the first <emu-nt id="_ref_13698"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt> with argument <var>call</var>.</li><li>If <var>has</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Let <var>has</var> be HasCallInTailPosition of the <emu-nt id="_ref_13699"><a href="#prod-DefaultClause">DefaultClause</a></emu-nt> with argument <var>call</var>.</li><li>If <var>has</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>If the second <emu-nt id="_ref_13700"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt> is present, let <var>has</var> be HasCallInTailPosition of the second <emu-nt id="_ref_13701"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt> with argument <var>call</var>.</li><li>Return <var>has</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="CaseClauses" collapsed="">
<emu-nt><a href="#prod-CaseClauses">CaseClauses</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="68374923"><emu-nt id="_ref_13702"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt><emu-nt id="_ref_13703"><a href="#prod-CaseClause">CaseClause</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>has</var> be HasCallInTailPosition of <emu-nt id="_ref_13704"><a href="#prod-CaseClauses">CaseClauses</a></emu-nt> with argument <var>call</var>.</li><li>If <var>has</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return HasCallInTailPosition of <emu-nt id="_ref_13705"><a href="#prod-CaseClause">CaseClause</a></emu-nt> with argument <var>call</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="CaseClause" collapsed="">
<emu-nt><a href="#prod-CaseClause">CaseClause</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c76d0d30"><emu-t>case</emu-t><emu-nt id="_ref_13706"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>:</emu-t><emu-nt optional="" id="_ref_13707"><a href="#prod-StatementList">StatementList</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="DefaultClause" collapsed="">
<emu-nt><a href="#prod-DefaultClause">DefaultClause</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6782073e"><emu-t>default</emu-t><emu-t>:</emu-t><emu-nt optional="" id="_ref_13708"><a href="#prod-StatementList">StatementList</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_13709"><a href="#prod-StatementList">StatementList</a></emu-nt> is present, return HasCallInTailPosition of <emu-nt id="_ref_13710"><a href="#prod-StatementList">StatementList</a></emu-nt> with argument <var>call</var>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="TryStatement" collapsed="">
<emu-nt><a href="#prod-TryStatement">TryStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a8714e57"><emu-t>try</emu-t><emu-nt id="_ref_13711"><a href="#prod-Block">Block</a></emu-nt><emu-nt id="_ref_13712"><a href="#prod-Catch">Catch</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return HasCallInTailPosition of <emu-nt id="_ref_13713"><a href="#prod-Catch">Catch</a></emu-nt> with argument <var>call</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="TryStatement" collapsed="">
<emu-nt><a href="#prod-TryStatement">TryStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5ec68ab9"><emu-t>try</emu-t><emu-nt id="_ref_13714"><a href="#prod-Block">Block</a></emu-nt><emu-nt id="_ref_13715"><a href="#prod-Finally">Finally</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="TryStatement" collapsed="">
<emu-nt><a href="#prod-TryStatement">TryStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1b19737c"><emu-t>try</emu-t><emu-nt id="_ref_13716"><a href="#prod-Block">Block</a></emu-nt><emu-nt id="_ref_13717"><a href="#prod-Catch">Catch</a></emu-nt><emu-nt id="_ref_13718"><a href="#prod-Finally">Finally</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return HasCallInTailPosition of <emu-nt id="_ref_13719"><a href="#prod-Finally">Finally</a></emu-nt> with argument <var>call</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="Catch" collapsed="">
<emu-nt><a href="#prod-Catch">Catch</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ddc13c36"><emu-t>catch</emu-t><emu-t>(</emu-t><emu-nt id="_ref_13720"><a href="#prod-CatchParameter">CatchParameter</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_13721"><a href="#prod-Block">Block</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return HasCallInTailPosition of <emu-nt id="_ref_13722"><a href="#prod-Block">Block</a></emu-nt> with argument <var>call</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-expression-rules">
<h1><span class="secnum">14.9.2.2</span>Expression Rules</h1>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>A potential tail position call that is immediately followed by return <emu-xref aoid="GetValue" id="_ref_4369"><a href="#sec-getvalue">GetValue</a></emu-xref> of the call result is also a possible tail position call. Function calls cannot return reference values, so such a <emu-xref aoid="GetValue" id="_ref_4370"><a href="#sec-getvalue">GetValue</a></emu-xref> operation will always return the same value as the actual function call result.</p>
</div></emu-note>
<emu-grammar><emu-production name="AssignmentExpression">
<emu-nt><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5202c84b"><emu-nt id="_ref_13723"><a href="#prod-YieldExpression">YieldExpression</a></emu-nt></emu-rhs>
<emu-rhs a="2bdf3b10"><emu-nt id="_ref_13724"><a href="#prod-ArrowFunction">ArrowFunction</a></emu-nt></emu-rhs>
<emu-rhs a="6b79045b"><emu-nt id="_ref_13725"><a href="#prod-AsyncArrowFunction">AsyncArrowFunction</a></emu-nt></emu-rhs>
<emu-rhs a="8a33cee0"><emu-nt id="_ref_13726"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>=</emu-t><emu-nt id="_ref_13727"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
<emu-rhs a="5f3a8747"><emu-nt id="_ref_13728"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-nt id="_ref_13729"><a href="#prod-AssignmentOperator">AssignmentOperator</a></emu-nt><emu-nt id="_ref_13730"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="BitwiseANDExpression" collapsed="">
<emu-nt><a href="#prod-BitwiseANDExpression">BitwiseANDExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a90dedc2"><emu-nt id="_ref_13731"><a href="#prod-BitwiseANDExpression">BitwiseANDExpression</a></emu-nt><emu-t>&amp;</emu-t><emu-nt id="_ref_13732"><a href="#prod-EqualityExpression">EqualityExpression</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="BitwiseXORExpression" collapsed="">
<emu-nt><a href="#prod-BitwiseXORExpression">BitwiseXORExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b463172c"><emu-nt id="_ref_13733"><a href="#prod-BitwiseXORExpression">BitwiseXORExpression</a></emu-nt><emu-t>^</emu-t><emu-nt id="_ref_13734"><a href="#prod-BitwiseANDExpression">BitwiseANDExpression</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="BitwiseORExpression" collapsed="">
<emu-nt><a href="#prod-BitwiseORExpression">BitwiseORExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="016dfa90"><emu-nt id="_ref_13735"><a href="#prod-BitwiseORExpression">BitwiseORExpression</a></emu-nt><emu-t>|</emu-t><emu-nt id="_ref_13736"><a href="#prod-BitwiseXORExpression">BitwiseXORExpression</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="EqualityExpression">
<emu-nt><a href="#prod-EqualityExpression">EqualityExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="757a342c"><emu-nt id="_ref_13737"><a href="#prod-EqualityExpression">EqualityExpression</a></emu-nt><emu-t>==</emu-t><emu-nt id="_ref_13738"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt></emu-rhs>
<emu-rhs a="70ddad59"><emu-nt id="_ref_13739"><a href="#prod-EqualityExpression">EqualityExpression</a></emu-nt><emu-t>!=</emu-t><emu-nt id="_ref_13740"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt></emu-rhs>
<emu-rhs a="e0753bf6"><emu-nt id="_ref_13741"><a href="#prod-EqualityExpression">EqualityExpression</a></emu-nt><emu-t>===</emu-t><emu-nt id="_ref_13742"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt></emu-rhs>
<emu-rhs a="2113edaf"><emu-nt id="_ref_13743"><a href="#prod-EqualityExpression">EqualityExpression</a></emu-nt><emu-t>!==</emu-t><emu-nt id="_ref_13744"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="RelationalExpression">
<emu-nt><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d216c92a"><emu-nt id="_ref_13745"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt><emu-t>&lt;</emu-t><emu-nt id="_ref_13746"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt></emu-rhs>
<emu-rhs a="1998981b"><emu-nt id="_ref_13747"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt><emu-t>&gt;</emu-t><emu-nt id="_ref_13748"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt></emu-rhs>
<emu-rhs a="29c91375"><emu-nt id="_ref_13749"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt><emu-t>&lt;=</emu-t><emu-nt id="_ref_13750"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt></emu-rhs>
<emu-rhs a="ddc529a7"><emu-nt id="_ref_13751"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt><emu-t>&gt;=</emu-t><emu-nt id="_ref_13752"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt></emu-rhs>
<emu-rhs a="d440bdac"><emu-nt id="_ref_13753"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt><emu-t>instanceof</emu-t><emu-nt id="_ref_13754"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt></emu-rhs>
<emu-rhs a="f66b493e"><emu-nt id="_ref_13755"><a href="#prod-RelationalExpression">RelationalExpression</a></emu-nt><emu-t>in</emu-t><emu-nt id="_ref_13756"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ShiftExpression">
<emu-nt><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b46f532a"><emu-nt id="_ref_13757"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt><emu-t>&lt;&lt;</emu-t><emu-nt id="_ref_13758"><a href="#prod-AdditiveExpression">AdditiveExpression</a></emu-nt></emu-rhs>
<emu-rhs a="548327f3"><emu-nt id="_ref_13759"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt><emu-t>&gt;&gt;</emu-t><emu-nt id="_ref_13760"><a href="#prod-AdditiveExpression">AdditiveExpression</a></emu-nt></emu-rhs>
<emu-rhs a="37f16eac"><emu-nt id="_ref_13761"><a href="#prod-ShiftExpression">ShiftExpression</a></emu-nt><emu-t>&gt;&gt;&gt;</emu-t><emu-nt id="_ref_13762"><a href="#prod-AdditiveExpression">AdditiveExpression</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="AdditiveExpression">
<emu-nt><a href="#prod-AdditiveExpression">AdditiveExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0e497b17"><emu-nt id="_ref_13763"><a href="#prod-AdditiveExpression">AdditiveExpression</a></emu-nt><emu-t>+</emu-t><emu-nt id="_ref_13764"><a href="#prod-MultiplicativeExpression">MultiplicativeExpression</a></emu-nt></emu-rhs>
<emu-rhs a="ee054414"><emu-nt id="_ref_13765"><a href="#prod-AdditiveExpression">AdditiveExpression</a></emu-nt><emu-t>-</emu-t><emu-nt id="_ref_13766"><a href="#prod-MultiplicativeExpression">MultiplicativeExpression</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="MultiplicativeExpression">
<emu-nt><a href="#prod-MultiplicativeExpression">MultiplicativeExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="fb9fe2a0"><emu-nt id="_ref_13767"><a href="#prod-MultiplicativeExpression">MultiplicativeExpression</a></emu-nt><emu-nt id="_ref_13768"><a href="#prod-MultiplicativeOperator">MultiplicativeOperator</a></emu-nt><emu-nt id="_ref_13769"><a href="#prod-ExponentiationExpression">ExponentiationExpression</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ExponentiationExpression">
<emu-nt><a href="#prod-ExponentiationExpression">ExponentiationExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d1905fcc"><emu-nt id="_ref_13770"><a href="#prod-UpdateExpression">UpdateExpression</a></emu-nt><emu-t>**</emu-t><emu-nt id="_ref_13771"><a href="#prod-ExponentiationExpression">ExponentiationExpression</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="UpdateExpression">
<emu-nt><a href="#prod-UpdateExpression">UpdateExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8bf8e31b"><emu-nt id="_ref_13772"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>++</emu-t></emu-rhs>
<emu-rhs a="8d1d2d72"><emu-nt id="_ref_13773"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt><emu-t>--</emu-t></emu-rhs>
<emu-rhs a="5701b162"><emu-t>++</emu-t><emu-nt id="_ref_13774"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
<emu-rhs a="3a745559"><emu-t>--</emu-t><emu-nt id="_ref_13775"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="UnaryExpression">
<emu-nt><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="bfdc08c3"><emu-t>delete</emu-t><emu-nt id="_ref_13776"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
<emu-rhs a="e5d8038f"><emu-t>void</emu-t><emu-nt id="_ref_13777"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
<emu-rhs a="ab1a2cb9"><emu-t>typeof</emu-t><emu-nt id="_ref_13778"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
<emu-rhs a="3b49039a"><emu-t>+</emu-t><emu-nt id="_ref_13779"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
<emu-rhs a="a03cca5c"><emu-t>-</emu-t><emu-nt id="_ref_13780"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
<emu-rhs a="07d36a79"><emu-t>~</emu-t><emu-nt id="_ref_13781"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
<emu-rhs a="b8b0af72"><emu-t>!</emu-t><emu-nt id="_ref_13782"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt></emu-rhs>
<emu-rhs a="48794e9a"><emu-nt id="_ref_13783"><a href="#prod-AwaitExpression">AwaitExpression</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="CallExpression">
<emu-nt><a href="#prod-CallExpression">CallExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="949290c3"><emu-nt id="_ref_13784"><a href="#prod-SuperCall">SuperCall</a></emu-nt></emu-rhs>
<emu-rhs a="d94d9445"><emu-nt id="_ref_13785"><a href="#prod-CallExpression">CallExpression</a></emu-nt><emu-t>[</emu-t><emu-nt id="_ref_13786"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>]</emu-t></emu-rhs>
<emu-rhs a="bba9526d"><emu-nt id="_ref_13787"><a href="#prod-CallExpression">CallExpression</a></emu-nt><emu-t>.</emu-t><emu-nt id="_ref_13788"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="NewExpression" collapsed="">
<emu-nt><a href="#prod-NewExpression">NewExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e753fad7"><emu-t>new</emu-t><emu-nt id="_ref_13789"><a href="#prod-NewExpression">NewExpression</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="MemberExpression">
<emu-nt><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6bbe1777"><emu-nt id="_ref_13790"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-t>[</emu-t><emu-nt id="_ref_13791"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>]</emu-t></emu-rhs>
<emu-rhs a="7eb6e3f7"><emu-nt id="_ref_13792"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-t>.</emu-t><emu-nt id="_ref_13793"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
<emu-rhs a="5f8b7394"><emu-nt id="_ref_13794"><a href="#prod-SuperProperty">SuperProperty</a></emu-nt></emu-rhs>
<emu-rhs a="c81ee20f"><emu-nt id="_ref_13795"><a href="#prod-MetaProperty">MetaProperty</a></emu-nt></emu-rhs>
<emu-rhs a="705abe84"><emu-t>new</emu-t><emu-nt id="_ref_13796"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-nt id="_ref_13797"><a href="#prod-Arguments">Arguments</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="PrimaryExpression">
<emu-nt><a href="#prod-PrimaryExpression">PrimaryExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8cee0c59"><emu-t>this</emu-t></emu-rhs>
<emu-rhs a="2361f19d"><emu-nt id="_ref_13798"><a href="#prod-IdentifierReference">IdentifierReference</a></emu-nt></emu-rhs>
<emu-rhs a="92e97e03"><emu-nt id="_ref_13799"><a href="#prod-Literal">Literal</a></emu-nt></emu-rhs>
<emu-rhs a="1bf32393"><emu-nt id="_ref_13800"><a href="#prod-ArrayLiteral">ArrayLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="cd178913"><emu-nt id="_ref_13801"><a href="#prod-ObjectLiteral">ObjectLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="242eeccd"><emu-nt id="_ref_13802"><a href="#prod-FunctionExpression">FunctionExpression</a></emu-nt></emu-rhs>
<emu-rhs a="d8ce6db1"><emu-nt id="_ref_13803"><a href="#prod-ClassExpression">ClassExpression</a></emu-nt></emu-rhs>
<emu-rhs a="abb7f7f4"><emu-nt id="_ref_13804"><a href="#prod-GeneratorExpression">GeneratorExpression</a></emu-nt></emu-rhs>
<emu-rhs a="ad589bb4"><emu-nt id="_ref_13805"><a href="#prod-AsyncFunctionExpression">AsyncFunctionExpression</a></emu-nt></emu-rhs>
<emu-rhs a="3403ed46"><emu-nt id="_ref_13806"><a href="#prod-AsyncGeneratorExpression">AsyncGeneratorExpression</a></emu-nt></emu-rhs>
<emu-rhs a="31b672e8"><emu-nt id="_ref_13807"><a href="#prod-RegularExpressionLiteral">RegularExpressionLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="d9922ce8"><emu-nt id="_ref_13808"><a href="#prod-TemplateLiteral">TemplateLiteral</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="Expression">
<emu-nt><a href="#prod-Expression">Expression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d4fc7da4"><emu-nt id="_ref_13809"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
<emu-rhs a="0b039a65"><emu-nt id="_ref_13810"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_13811"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return HasCallInTailPosition of <emu-nt id="_ref_13812"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt> with argument <var>call</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ConditionalExpression" collapsed="">
<emu-nt><a href="#prod-ConditionalExpression">ConditionalExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="42ec48bb"><emu-nt id="_ref_13813"><a href="#prod-LogicalORExpression">LogicalORExpression</a></emu-nt><emu-t>?</emu-t><emu-nt id="_ref_13814"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>:</emu-t><emu-nt id="_ref_13815"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>has</var> be HasCallInTailPosition of the first <emu-nt id="_ref_13816"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt> with argument <var>call</var>.</li><li>If <var>has</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return HasCallInTailPosition of the second <emu-nt id="_ref_13817"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt> with argument <var>call</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="LogicalANDExpression" collapsed="">
<emu-nt><a href="#prod-LogicalANDExpression">LogicalANDExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="2186e2aa"><emu-nt id="_ref_13818"><a href="#prod-LogicalANDExpression">LogicalANDExpression</a></emu-nt><emu-t>&amp;&amp;</emu-t><emu-nt id="_ref_13819"><a href="#prod-BitwiseORExpression">BitwiseORExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return HasCallInTailPosition of <emu-nt id="_ref_13820"><a href="#prod-BitwiseORExpression">BitwiseORExpression</a></emu-nt> with argument <var>call</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="LogicalORExpression" collapsed="">
<emu-nt><a href="#prod-LogicalORExpression">LogicalORExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b6453dd9"><emu-nt id="_ref_13821"><a href="#prod-LogicalORExpression">LogicalORExpression</a></emu-nt><emu-t>||</emu-t><emu-nt id="_ref_13822"><a href="#prod-LogicalANDExpression">LogicalANDExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return HasCallInTailPosition of <emu-nt id="_ref_13823"><a href="#prod-LogicalANDExpression">LogicalANDExpression</a></emu-nt> with argument <var>call</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="CallExpression">
<emu-nt><a href="#prod-CallExpression">CallExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ec98fef7"><emu-nt id="_ref_13824"><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt></emu-rhs>
<emu-rhs a="42e81a1c"><emu-nt id="_ref_13825"><a href="#prod-CallExpression">CallExpression</a></emu-nt><emu-nt id="_ref_13826"><a href="#prod-Arguments">Arguments</a></emu-nt></emu-rhs>
<emu-rhs a="adcef8e1"><emu-nt id="_ref_13827"><a href="#prod-CallExpression">CallExpression</a></emu-nt><emu-nt id="_ref_13828"><a href="#prod-TemplateLiteral">TemplateLiteral</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If this <emu-nt id="_ref_13829"><a href="#prod-CallExpression">CallExpression</a></emu-nt> is <var>call</var>, return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="MemberExpression">
<emu-nt><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="149e7618"><emu-nt id="_ref_13830"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt><emu-nt id="_ref_13831"><a href="#prod-TemplateLiteral">TemplateLiteral</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If this <emu-nt id="_ref_13832"><a href="#prod-MemberExpression">MemberExpression</a></emu-nt> is <var>call</var>, return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="PrimaryExpression" collapsed="">
<emu-nt><a href="#prod-PrimaryExpression">PrimaryExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cab6f5d7"><emu-nt id="_ref_13833"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>expr</var> be CoveredParenthesizedExpression of <emu-nt id="_ref_13834"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt>.</li><li>Return HasCallInTailPosition of <var>expr</var> with argument <var>call</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ParenthesizedExpression">
<emu-nt><a href="#prod-ParenthesizedExpression">ParenthesizedExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4ba6ef9d"><emu-t>(</emu-t><emu-nt id="_ref_13835"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return HasCallInTailPosition of <emu-nt id="_ref_13836"><a href="#prod-Expression">Expression</a></emu-nt> with argument <var>call</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-preparefortailcall" aoid="PrepareForTailCall">
<h1><span class="secnum">14.9.3</span>Runtime Semantics: PrepareForTailCall ( )</h1>
<p>The abstract operation PrepareForTailCall performs the following steps:</p>
<emu-alg><ol><li>Let <var>leafContext</var> be the <emu-xref href="#running-execution-context" id="_ref_4371"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li><emu-xref aoid="Suspend" id="_ref_4372"><a href="#sec-suspend">Suspend</a></emu-xref> <var>leafContext</var>.</li><li>Pop <var>leafContext</var> from the <emu-xref href="#execution-context-stack" id="_ref_4373"><a href="#execution-context-stack">execution context stack</a></emu-xref>. The <emu-xref href="#sec-execution-contexts" id="_ref_4374"><a href="#sec-execution-contexts">execution context</a></emu-xref> now on the top of the stack becomes the <emu-xref href="#running-execution-context" id="_ref_4375"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li><emu-xref href="#assert" id="_ref_4376"><a href="#assert">Assert</a></emu-xref>: <var>leafContext</var> has no further use. It will never be activated as the <emu-xref href="#running-execution-context" id="_ref_4377"><a href="#running-execution-context">running execution context</a></emu-xref>.
</li></ol></emu-alg>
<p>A tail position call must either release any transient internal resources associated with the currently executing function <emu-xref href="#sec-execution-contexts" id="_ref_4378"><a href="#sec-execution-contexts">execution context</a></emu-xref> before invoking the target function or reuse those resources in support of the target function.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>For example, a tail position call should only grow an
implementation's activation record stack by the amount that the size of
the target function's activation record exceeds the size of the calling
function's activation record. If the target function's activation record
is smaller, then the total size of the stack should decrease.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-ecmascript-language-scripts-and-modules">
<h1><span class="secnum">15</span>ECMAScript Language: Scripts and Modules</h1>
<emu-clause id="sec-scripts">
<h1><span class="secnum">15.1</span>Scripts</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="Script" id="prod-Script">
<emu-nt><a href="#prod-Script">Script</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="08c8df8e"><emu-nt optional="" id="_ref_13837"><a href="#prod-ScriptBody">ScriptBody</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ScriptBody" id="prod-ScriptBody">
<emu-nt><a href="#prod-ScriptBody">ScriptBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="98de0f78"><emu-nt params="~Yield, ~Await, ~Return" id="_ref_13838"><a href="#prod-StatementList">StatementList</a><emu-mods><emu-params>[~Yield, ~Await, ~Return]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-clause id="sec-scripts-static-semantics-early-errors">
<h1><span class="secnum">15.1.1</span>Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="Script" collapsed="">
<emu-nt><a href="#prod-Script">Script</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b78f99cc"><emu-nt id="_ref_13839"><a href="#prod-ScriptBody">ScriptBody</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if the LexicallyDeclaredNames of <emu-nt id="_ref_13840"><a href="#prod-ScriptBody">ScriptBody</a></emu-nt> contains any duplicate entries.
</li>
<li>
It is a Syntax Error if any element of the LexicallyDeclaredNames of <emu-nt id="_ref_13841"><a href="#prod-ScriptBody">ScriptBody</a></emu-nt> also occurs in the VarDeclaredNames of <emu-nt id="_ref_13842"><a href="#prod-ScriptBody">ScriptBody</a></emu-nt>.
</li>
</ul>
<emu-grammar><emu-production name="ScriptBody" collapsed="">
<emu-nt><a href="#prod-ScriptBody">ScriptBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cf403a0c"><emu-nt id="_ref_13843"><a href="#prod-StatementList">StatementList</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if <emu-nt id="_ref_13844"><a href="#prod-StatementList">StatementList</a></emu-nt> Contains <code>super</code> unless the source code containing <code>super</code> is eval code that is being processed by a <emu-xref href="#sec-function-calls-runtime-semantics-evaluation" id="_ref_4379"><a href="#sec-function-calls-runtime-semantics-evaluation">direct eval</a></emu-xref>. Additional <emu-xref href="#early-error" id="_ref_4380"><a href="#early-error">early error</a></emu-xref> rules for <code>super</code> within <emu-xref href="#sec-function-calls-runtime-semantics-evaluation" id="_ref_4381"><a href="#sec-function-calls-runtime-semantics-evaluation">direct eval</a></emu-xref> are defined in <emu-xref href="#sec-performeval" id="_ref_360"><a href="#sec-performeval">18.2.1.1</a></emu-xref>.
</li>
<li>
It is a Syntax Error if <emu-nt id="_ref_13845"><a href="#prod-StatementList">StatementList</a></emu-nt> Contains <emu-nt id="_ref_13846"><a href="#prod-NewTarget">NewTarget</a></emu-nt> unless the source code containing <emu-nt id="_ref_13847"><a href="#prod-NewTarget">NewTarget</a></emu-nt> is eval code that is being processed by a <emu-xref href="#sec-function-calls-runtime-semantics-evaluation" id="_ref_4382"><a href="#sec-function-calls-runtime-semantics-evaluation">direct eval</a></emu-xref>. Additional <emu-xref href="#early-error" id="_ref_4383"><a href="#early-error">early error</a></emu-xref> rules for <emu-nt id="_ref_13848"><a href="#prod-NewTarget">NewTarget</a></emu-nt> in <emu-xref href="#sec-function-calls-runtime-semantics-evaluation" id="_ref_4384"><a href="#sec-function-calls-runtime-semantics-evaluation">direct eval</a></emu-xref> are defined in <emu-xref href="#sec-performeval" id="_ref_361"><a href="#sec-performeval">18.2.1.1</a></emu-xref>.
</li>
<li>
It is a Syntax Error if ContainsDuplicateLabels of <emu-nt id="_ref_13849"><a href="#prod-StatementList">StatementList</a></emu-nt> with argument « » is <emu-val>true</emu-val>.
</li>
<li>
It is a Syntax Error if ContainsUndefinedBreakTarget of <emu-nt id="_ref_13850"><a href="#prod-StatementList">StatementList</a></emu-nt> with argument « » is <emu-val>true</emu-val>.
</li>
<li>
It is a Syntax Error if ContainsUndefinedContinueTarget of <emu-nt id="_ref_13851"><a href="#prod-StatementList">StatementList</a></emu-nt> with arguments « » and « » is <emu-val>true</emu-val>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-static-semantics-isstrict">
<h1><span class="secnum">15.1.2</span>Static Semantics: IsStrict</h1>
<emu-grammar><emu-production name="ScriptBody" collapsed="">
<emu-nt><a href="#prod-ScriptBody">ScriptBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cf403a0c"><emu-nt id="_ref_13852"><a href="#prod-StatementList">StatementList</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If the <emu-xref href="#directive-prologue" id="_ref_4385"><a href="#directive-prologue">Directive Prologue</a></emu-xref> of <emu-nt id="_ref_13853"><a href="#prod-StatementList">StatementList</a></emu-nt> contains a <emu-xref href="#use-strict-directive" id="_ref_4386"><a href="#use-strict-directive">Use Strict Directive</a></emu-xref>, return <emu-val>true</emu-val>; otherwise, return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-scripts-static-semantics-lexicallydeclarednames">
<h1><span class="secnum">15.1.3</span>Static Semantics: LexicallyDeclaredNames</h1>
<emu-see-also-para op="LexicallyDeclaredNames"></emu-see-also-para>
<emu-grammar><emu-production name="ScriptBody" collapsed="">
<emu-nt><a href="#prod-ScriptBody">ScriptBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cf403a0c"><emu-nt id="_ref_13854"><a href="#prod-StatementList">StatementList</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return TopLevelLexicallyDeclaredNames of <emu-nt id="_ref_13855"><a href="#prod-StatementList">StatementList</a></emu-nt>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>At the top level of a <emu-nt id="_ref_13856"><a href="#prod-Script">Script</a></emu-nt>, function declarations are treated like var declarations rather than like lexical declarations.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-scripts-static-semantics-lexicallyscopeddeclarations">
<h1><span class="secnum">15.1.4</span>Static Semantics: LexicallyScopedDeclarations</h1>
<emu-see-also-para op="LexicallyScopedDeclarations"></emu-see-also-para>
<emu-grammar><emu-production name="ScriptBody" collapsed="">
<emu-nt><a href="#prod-ScriptBody">ScriptBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cf403a0c"><emu-nt id="_ref_13857"><a href="#prod-StatementList">StatementList</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return TopLevelLexicallyScopedDeclarations of <emu-nt id="_ref_13858"><a href="#prod-StatementList">StatementList</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-scripts-static-semantics-vardeclarednames">
<h1><span class="secnum">15.1.5</span>Static Semantics: VarDeclaredNames</h1>
<emu-see-also-para op="VarDeclaredNames"></emu-see-also-para>
<emu-grammar><emu-production name="ScriptBody" collapsed="">
<emu-nt><a href="#prod-ScriptBody">ScriptBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cf403a0c"><emu-nt id="_ref_13859"><a href="#prod-StatementList">StatementList</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return TopLevelVarDeclaredNames of <emu-nt id="_ref_13860"><a href="#prod-StatementList">StatementList</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-scripts-static-semantics-varscopeddeclarations">
<h1><span class="secnum">15.1.6</span>Static Semantics: VarScopedDeclarations</h1>
<emu-see-also-para op="VarScopedDeclarations"></emu-see-also-para>
<emu-grammar><emu-production name="ScriptBody" collapsed="">
<emu-nt><a href="#prod-ScriptBody">ScriptBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cf403a0c"><emu-nt id="_ref_13861"><a href="#prod-StatementList">StatementList</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return TopLevelVarScopedDeclarations of <emu-nt id="_ref_13862"><a href="#prod-StatementList">StatementList</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-script-semantics-runtime-semantics-evaluation">
<h1><span class="secnum">15.1.7</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="Script" collapsed="">
<emu-nt><a href="#prod-Script">Script</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-xref aoid="NormalCompletion" id="_ref_4387"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-val>undefined</emu-val>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-script-records">
<h1><span class="secnum">15.1.8</span>Script Records</h1>
<p>A <dfn id="script-record">Script Record</dfn> encapsulates information about a script being evaluated. Each script record contains the fields listed in <emu-xref href="#table-script-records" id="_ref_362"><a href="#table-script-records">Table 36</a></emu-xref>.</p>
<emu-table id="table-script-records" caption="Script Record Fields"><figure><figcaption>Table 36: <emu-xref href="#script-record" id="_ref_4388"><a href="#script-record">Script Record</a></emu-xref> Fields</figcaption>
<table>
<thead>
<tr>
<th>
Field Name
</th>
<th>
Value Type
</th>
<th>
Meaning
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
[[Realm]]
</td>
<td>
<emu-xref href="#realm-record" id="_ref_4389"><a href="#realm-record">Realm Record</a></emu-xref> | <emu-val>undefined</emu-val>
</td>
<td>
The <emu-xref href="#realm" id="_ref_4390"><a href="#realm">realm</a></emu-xref> within which this script was created. <emu-val>undefined</emu-val> if not yet assigned.
</td>
</tr>
<tr>
<td>
[[Environment]]
</td>
<td>
<emu-xref href="#sec-lexical-environments" id="_ref_4391"><a href="#sec-lexical-environments">Lexical Environment</a></emu-xref> | <emu-val>undefined</emu-val>
</td>
<td>
The <emu-xref href="#sec-lexical-environments" id="_ref_4392"><a href="#sec-lexical-environments">Lexical Environment</a></emu-xref> containing the top level bindings for this script. This field is set when the script is instantiated.
</td>
</tr>
<tr>
<td>
[[ECMAScriptCode]]
</td>
<td>
a <emu-xref href="#sec-syntactic-grammar" id="_ref_4393"><a href="#sec-syntactic-grammar">Parse Node</a></emu-xref>
</td>
<td>
The result of parsing the source text of this module using <emu-nt id="_ref_13863"><a href="#prod-Script">Script</a></emu-nt> as the <emu-xref href="#sec-context-free-grammars" id="_ref_4394"><a href="#sec-context-free-grammars">goal symbol</a></emu-xref>.
</td>
</tr>
<tr>
<td>
[[HostDefined]]
</td>
<td>
Any, default value is <emu-val>undefined</emu-val>.
</td>
<td>
Field reserved for use by host environments that need to associate additional information with a script.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
</emu-clause>
<emu-clause id="sec-parse-script" aoid="ParseScript">
<h1><span class="secnum">15.1.9</span>ParseScript ( <var>sourceText</var>, <var>realm</var>, <var>hostDefined</var> )</h1>
<p>The abstract operation ParseScript with arguments <var>sourceText</var>, <var>realm</var>, and <var>hostDefined</var> creates a <emu-xref href="#script-record" id="_ref_4395"><a href="#script-record">Script Record</a></emu-xref> based upon the result of parsing <var>sourceText</var> as a <emu-nt id="_ref_13864"><a href="#prod-Script">Script</a></emu-nt>. ParseScript performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_4396"><a href="#assert">Assert</a></emu-xref>: <var>sourceText</var> is an ECMAScript source text (see clause <emu-xref href="#sec-ecmascript-language-source-code" id="_ref_363"><a href="#sec-ecmascript-language-source-code">10</a></emu-xref>).</li><li>Parse <var>sourceText</var> using <emu-nt id="_ref_13865"><a href="#prod-Script">Script</a></emu-nt> as the <emu-xref href="#sec-context-free-grammars" id="_ref_4397"><a href="#sec-context-free-grammars">goal symbol</a></emu-xref> and analyse the parse result for any Early Error conditions. If the parse was successful and no early errors were found, let <var>body</var> be the resulting parse tree. Otherwise, let <var>body</var> be a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4398"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of one or more <emu-val>SyntaxError</emu-val> or <emu-val>ReferenceError</emu-val> objects representing the parsing errors and/or early errors. Parsing and <emu-xref href="#early-error" id="_ref_4399"><a href="#early-error">early error</a></emu-xref> detection may be interweaved in an implementation-dependent manner. If more than one parsing error or <emu-xref href="#early-error" id="_ref_4400"><a href="#early-error">early error</a></emu-xref> is present, the number and ordering of error objects in the list is implementation-dependent, but at least one must be present.</li><li>If <var>body</var> is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4401"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of errors, return <var>body</var>.</li><li>Return <emu-xref href="#script-record" id="_ref_4402"><a href="#script-record">Script Record</a></emu-xref> { [[Realm]]: <var>realm</var>, [[Environment]]: <emu-val>undefined</emu-val>, [[ECMAScriptCode]]: <var>body</var>, [[HostDefined]]: <var>hostDefined</var> }.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>An implementation may parse script source text and analyse it
for Early Error conditions prior to evaluation of ParseScript for that
script source text. However, the reporting of any errors must be
deferred until the point where this specification actually performs
ParseScript upon that source text.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-runtime-semantics-scriptevaluation" aoid="ScriptEvaluation">
<h1><span class="secnum">15.1.10</span>ScriptEvaluation ( <var>scriptRecord</var> )</h1>
<emu-alg><ol><li>Let <var>globalEnv</var> be <var>scriptRecord</var>.[[Realm]].[[GlobalEnv]].</li><li>Let <var>scriptCxt</var> be a new ECMAScript code <emu-xref href="#sec-execution-contexts" id="_ref_4403"><a href="#sec-execution-contexts">execution context</a></emu-xref>.</li><li>Set the Function of <var>scriptCxt</var> to <emu-val>null</emu-val>.</li><li>Set the <emu-xref href="#realm" id="_ref_4404"><a href="#realm">Realm</a></emu-xref> of <var>scriptCxt</var> to <var>scriptRecord</var>.[[Realm]].</li><li>Set the ScriptOrModule of <var>scriptCxt</var> to <var>scriptRecord</var>.</li><li>Set the VariableEnvironment of <var>scriptCxt</var> to <var>globalEnv</var>.</li><li>Set the LexicalEnvironment of <var>scriptCxt</var> to <var>globalEnv</var>.</li><li><emu-xref aoid="Suspend" id="_ref_4405"><a href="#sec-suspend">Suspend</a></emu-xref> the currently <emu-xref href="#running-execution-context" id="_ref_4406"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Push <var>scriptCxt</var> on to the <emu-xref href="#execution-context-stack" id="_ref_4407"><a href="#execution-context-stack">execution context stack</a></emu-xref>; <var>scriptCxt</var> is now the <emu-xref href="#running-execution-context" id="_ref_4408"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Let <var>scriptBody</var> be <var>scriptRecord</var>.[[ECMAScriptCode]].</li><li>Let <var>result</var> be <emu-xref aoid="GlobalDeclarationInstantiation" id="_ref_4409"><a href="#sec-globaldeclarationinstantiation">GlobalDeclarationInstantiation</a></emu-xref>(<var>scriptBody</var>, <var>globalEnv</var>).</li><li>If <var>result</var>.[[Type]] is <emu-const>normal</emu-const>, then<ol><li>Set <var>result</var> to the result of evaluating <var>scriptBody</var>.</li></ol></li><li>If <var>result</var>.[[Type]] is <emu-const>normal</emu-const> and <var>result</var>.[[Value]] is <emu-const>empty</emu-const>, then<ol><li>Set <var>result</var> to <emu-xref aoid="NormalCompletion" id="_ref_4410"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-val>undefined</emu-val>).</li></ol></li><li><emu-xref aoid="Suspend" id="_ref_4411"><a href="#sec-suspend">Suspend</a></emu-xref> <var>scriptCxt</var> and remove it from the <emu-xref href="#execution-context-stack" id="_ref_4412"><a href="#execution-context-stack">execution context stack</a></emu-xref>.</li><li><emu-xref href="#assert" id="_ref_4413"><a href="#assert">Assert</a></emu-xref>: The <emu-xref href="#execution-context-stack" id="_ref_4414"><a href="#execution-context-stack">execution context stack</a></emu-xref> is not empty.</li><li>Resume the context that is now on the top of the <emu-xref href="#execution-context-stack" id="_ref_4415"><a href="#execution-context-stack">execution context stack</a></emu-xref> as the <emu-xref href="#running-execution-context" id="_ref_4416"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Return <emu-xref aoid="Completion" id="_ref_4417"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>result</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-globaldeclarationinstantiation" aoid="GlobalDeclarationInstantiation">
<h1><span class="secnum">15.1.11</span>Runtime Semantics: GlobalDeclarationInstantiation ( <var>script</var>, <var>env</var> )</h1>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>When an <emu-xref href="#sec-execution-contexts" id="_ref_4418"><a href="#sec-execution-contexts">execution context</a></emu-xref> is established for evaluating scripts, declarations are instantiated in the current <emu-xref href="#global-environment" id="_ref_4419"><a href="#global-environment">global environment</a></emu-xref>. Each global binding declared in the code is instantiated.</p>
</div></emu-note>
<p>GlobalDeclarationInstantiation is performed as follows using arguments <var>script</var> and <var>env</var>. <var>script</var> is the <emu-nt id="_ref_13866"><a href="#prod-ScriptBody">ScriptBody</a></emu-nt> for which the <emu-xref href="#sec-execution-contexts" id="_ref_4420"><a href="#sec-execution-contexts">execution context</a></emu-xref> is being established. <var>env</var> is the global lexical environment in which bindings are to be created.</p>
<!--
WARNING: If you add, remove, rename, or repurpose any variable names
within this algorithm, you may need to update
#sec-web-compat-globaldeclarationinstantiation accordingly.
-->
<emu-alg><ol><li>Let <var>envRec</var> be <var>env</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_4421"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref>.</li><li><emu-xref href="#assert" id="_ref_4422"><a href="#assert">Assert</a></emu-xref>: <var>envRec</var> is a global <emu-xref href="#sec-environment-records" id="_ref_4423"><a href="#sec-environment-records">Environment Record</a></emu-xref>.</li><li>Let <var>lexNames</var> be the LexicallyDeclaredNames of <var>script</var>.</li><li>Let <var>varNames</var> be the VarDeclaredNames of <var>script</var>.</li><li>For each <var>name</var> in <var>lexNames</var>, do<ol><li>If <var>envRec</var>.HasVarDeclaration(<var>name</var>) is <emu-val>true</emu-val>, throw a <emu-val>SyntaxError</emu-val> exception.</li><li>If <var>envRec</var>.HasLexicalDeclaration(<var>name</var>) is <emu-val>true</emu-val>, throw a <emu-val>SyntaxError</emu-val> exception.</li><li>Let <var>hasRestrictedGlobal</var> be ? <var>envRec</var>.HasRestrictedGlobalProperty(<var>name</var>).</li><li>If <var>hasRestrictedGlobal</var> is <emu-val>true</emu-val>, throw a <emu-val>SyntaxError</emu-val> exception.</li></ol></li><li>For each <var>name</var> in <var>varNames</var>, do<ol><li>If <var>envRec</var>.HasLexicalDeclaration(<var>name</var>) is <emu-val>true</emu-val>, throw a <emu-val>SyntaxError</emu-val> exception.</li></ol></li><li>Let <var>varDeclarations</var> be the VarScopedDeclarations of <var>script</var>.</li><li>Let <var>functionsToInitialize</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4424"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>declaredFunctionNames</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4425"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>For each <var>d</var> in <var>varDeclarations</var>, in reverse list order, do<ol><li>If <var>d</var> is neither a <emu-nt id="_ref_13867"><a href="#prod-VariableDeclaration">VariableDeclaration</a></emu-nt> nor a <emu-nt id="_ref_13868"><a href="#prod-ForBinding">ForBinding</a></emu-nt> nor a <emu-nt id="_ref_13869"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt>, then<ol><li><emu-xref href="#assert" id="_ref_4426"><a href="#assert">Assert</a></emu-xref>: <var>d</var> is either a <emu-nt id="_ref_13870"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>, a <emu-nt id="_ref_13871"><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a></emu-nt>, an <emu-nt id="_ref_13872"><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt>, or an <emu-nt id="_ref_13873"><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt>.</li><li>NOTE: If there are multiple function declarations for the same name, the last declaration is used.</li><li>Let <var>fn</var> be the sole element of the BoundNames of <var>d</var>.</li><li>If <var>fn</var> is not an element of <var>declaredFunctionNames</var>, then<ol><li>Let <var>fnDefinable</var> be ? <var>envRec</var>.CanDeclareGlobalFunction(<var>fn</var>).</li><li>If <var>fnDefinable</var> is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Append <var>fn</var> to <var>declaredFunctionNames</var>.</li><li>Insert <var>d</var> as the first element of <var>functionsToInitialize</var>.</li></ol></li></ol></li></ol></li><li>Let <var>declaredVarNames</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4427"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>For each <var>d</var> in <var>varDeclarations</var>, do<ol><li>If <var>d</var> is a <emu-nt id="_ref_13874"><a href="#prod-VariableDeclaration">VariableDeclaration</a></emu-nt>, a <emu-nt id="_ref_13875"><a href="#prod-ForBinding">ForBinding</a></emu-nt>, or a <emu-nt id="_ref_13876"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt>, then<ol><li>For each String <var>vn</var> in the BoundNames of <var>d</var>, do<ol><li>If <var>vn</var> is not an element of <var>declaredFunctionNames</var>, then<ol><li>Let <var>vnDefinable</var> be ? <var>envRec</var>.CanDeclareGlobalVar(<var>vn</var>).</li><li>If <var>vnDefinable</var> is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>vn</var> is not an element of <var>declaredVarNames</var>, then<ol><li>Append <var>vn</var> to <var>declaredVarNames</var>.</li></ol></li></ol></li></ol></li></ol></li></ol></li><li>NOTE: No abnormal terminations occur after this algorithm step if the <emu-xref href="#sec-global-object" id="_ref_4428"><a href="#sec-global-object">global object</a></emu-xref> is an ordinary object. However, if the <emu-xref href="#sec-global-object" id="_ref_4429"><a href="#sec-global-object">global object</a></emu-xref> is a Proxy <emu-xref href="#exotic-object" id="_ref_4430"><a href="#exotic-object">exotic object</a></emu-xref> it may exhibit behaviours that cause abnormal terminations in some of the following steps.</li><li>NOTE: Annex <emu-xref href="#sec-web-compat-globaldeclarationinstantiation" id="_ref_364"><a href="#sec-web-compat-globaldeclarationinstantiation">B.3.3.2</a></emu-xref> adds additional steps at this point.</li><li>Let <var>lexDeclarations</var> be the LexicallyScopedDeclarations of <var>script</var>.</li><li>For each element <var>d</var> in <var>lexDeclarations</var>, do<ol><li>NOTE: Lexically declared names are only instantiated here but not initialized.</li><li>For each element <var>dn</var> of the BoundNames of <var>d</var>, do<ol><li>If IsConstantDeclaration of <var>d</var> is <emu-val>true</emu-val>, then<ol><li>Perform ? <var>envRec</var>.CreateImmutableBinding(<var>dn</var>, <emu-val>true</emu-val>).</li></ol></li><li>Else,<ol><li>Perform ? <var>envRec</var>.CreateMutableBinding(<var>dn</var>, <emu-val>false</emu-val>).</li></ol></li></ol></li></ol></li><li>For each <emu-xref href="#sec-syntactic-grammar" id="_ref_4431"><a href="#sec-syntactic-grammar">Parse Node</a></emu-xref> <var>f</var> in <var>functionsToInitialize</var>, do<ol><li>Let <var>fn</var> be the sole element of the BoundNames of <var>f</var>.</li><li>Let <var>fo</var> be the result of performing InstantiateFunctionObject for <var>f</var> with argument <var>env</var>.</li><li>Perform ? <var>envRec</var>.CreateGlobalFunctionBinding(<var>fn</var>, <var>fo</var>, <emu-val>false</emu-val>).</li></ol></li><li>For each String <var>vn</var> in <var>declaredVarNames</var>, in list order, do<ol><li>Perform ? <var>envRec</var>.CreateGlobalVarBinding(<var>vn</var>, <emu-val>false</emu-val>).</li></ol></li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_4432"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>Early errors specified in <emu-xref href="#sec-scripts-static-semantics-early-errors" id="_ref_365"><a href="#sec-scripts-static-semantics-early-errors">15.1.1</a></emu-xref>
prevent name conflicts between function/var declarations and
let/const/class declarations as well as redeclaration of let/const/class
bindings for declaration contained within a single <emu-nt id="_ref_13877"><a href="#prod-Script">Script</a></emu-nt>. However, such conflicts and redeclarations that span more than one <emu-nt id="_ref_13878"><a href="#prod-Script">Script</a></emu-nt>
are detected as runtime errors during GlobalDeclarationInstantiation.
If any such errors are detected, no bindings are instantiated for the
script. However, if the <emu-xref href="#sec-global-object" id="_ref_4433"><a href="#sec-global-object">global object</a></emu-xref> is defined using Proxy exotic objects then the runtime tests for conflicting declarations may be unreliable resulting in an <emu-xref href="#sec-completion-record-specification-type" id="_ref_4434"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref> and some global declarations not being instantiated. If this occurs, the code for the <emu-nt id="_ref_13879"><a href="#prod-Script">Script</a></emu-nt> is not evaluated.</p>
<p>Unlike explicit var or function declarations, properties that are directly created on the <emu-xref href="#sec-global-object" id="_ref_4435"><a href="#sec-global-object">global object</a></emu-xref> result in global bindings that may be shadowed by let/const/class declarations.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-scriptevaluationjob" aoid="ScriptEvaluationJob">
<h1><span class="secnum">15.1.12</span>Runtime Semantics: ScriptEvaluationJob ( <var>sourceText</var>, <var>hostDefined</var> )</h1>
<p>The job ScriptEvaluationJob with parameters <var>sourceText</var> and <var>hostDefined</var> parses, validates, and evaluates <var>sourceText</var> as a <emu-nt id="_ref_13880"><a href="#prod-Script">Script</a></emu-nt>.</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_4436"><a href="#assert">Assert</a></emu-xref>: <var>sourceText</var> is an ECMAScript source text (see clause <emu-xref href="#sec-ecmascript-language-source-code" id="_ref_366"><a href="#sec-ecmascript-language-source-code">10</a></emu-xref>).</li><li>Let <var>realm</var> be <emu-xref href="#current-realm" id="_ref_4437"><a href="#current-realm">the current Realm Record</a></emu-xref>.</li><li>Let <var>s</var> be <emu-xref aoid="ParseScript" id="_ref_4438"><a href="#sec-parse-script">ParseScript</a></emu-xref>(<var>sourceText</var>, <var>realm</var>, <var>hostDefined</var>).</li><li>If <var>s</var> is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4439"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of errors, then<ol><li>Perform <emu-xref aoid="HostReportErrors" id="_ref_4440"><a href="#sec-host-report-errors">HostReportErrors</a></emu-xref>(<var>s</var>).</li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_4441"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-val>undefined</emu-val>).</li></ol></li><li>Return ?&nbsp;<emu-xref aoid="ScriptEvaluation" id="_ref_4442"><a href="#sec-runtime-semantics-scriptevaluation">ScriptEvaluation</a></emu-xref>(<var>s</var>).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-modules">
<h1><span class="secnum">15.2</span>Modules</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="Module" id="prod-Module">
<emu-nt><a href="#prod-Module">Module</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="52f49b96"><emu-nt optional="" id="_ref_13881"><a href="#prod-ModuleBody">ModuleBody</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ModuleBody" id="prod-ModuleBody">
<emu-nt><a href="#prod-ModuleBody">ModuleBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="89010d7d"><emu-nt id="_ref_13882"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ModuleItemList" id="prod-ModuleItemList">
<emu-nt><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="029ec31e"><emu-nt id="_ref_13883"><a href="#prod-ModuleItem">ModuleItem</a></emu-nt></emu-rhs>
<emu-rhs a="75ddb725"><emu-nt id="_ref_13884"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt><emu-nt id="_ref_13885"><a href="#prod-ModuleItem">ModuleItem</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ModuleItem" id="prod-ModuleItem">
<emu-nt><a href="#prod-ModuleItem">ModuleItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e0559377"><emu-nt id="_ref_13886"><a href="#prod-ImportDeclaration">ImportDeclaration</a></emu-nt></emu-rhs>
<emu-rhs a="298e81b0"><emu-nt id="_ref_13887"><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt></emu-rhs>
<emu-rhs a="b8d22333"><emu-nt params="~Yield, ~Await, ~Return" id="_ref_13888"><a href="#prod-StatementListItem">StatementListItem</a><emu-mods><emu-params>[~Yield, ~Await, ~Return]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-clause id="sec-module-semantics">
<h1><span class="secnum">15.2.1</span>Module Semantics</h1>
<emu-clause id="sec-module-semantics-static-semantics-early-errors">
<h1><span class="secnum">15.2.1.1</span>Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="ModuleBody" collapsed="">
<emu-nt><a href="#prod-ModuleBody">ModuleBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="89010d7d"><emu-nt id="_ref_13889"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if the LexicallyDeclaredNames of <emu-nt id="_ref_13890"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt> contains any duplicate entries.
</li>
<li>
It is a Syntax Error if any element of the LexicallyDeclaredNames of <emu-nt id="_ref_13891"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt> also occurs in the VarDeclaredNames of <emu-nt id="_ref_13892"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt>.
</li>
<li>
It is a Syntax Error if the ExportedNames of <emu-nt id="_ref_13893"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt> contains any duplicate entries.
</li>
<li>
It is a Syntax Error if any element of the ExportedBindings of <emu-nt id="_ref_13894"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt> does not also occur in either the VarDeclaredNames of <emu-nt id="_ref_13895"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt>, or the LexicallyDeclaredNames of <emu-nt id="_ref_13896"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt>.
</li>
<li>
It is a Syntax Error if <emu-nt id="_ref_13897"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt> Contains <code>super</code>.
</li>
<li>
It is a Syntax Error if <emu-nt id="_ref_13898"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt> Contains <emu-nt id="_ref_13899"><a href="#prod-NewTarget">NewTarget</a></emu-nt>.
</li>
<li>
It is a Syntax Error if ContainsDuplicateLabels of <emu-nt id="_ref_13900"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt> with argument « » is <emu-val>true</emu-val>.
</li>
<li>
It is a Syntax Error if ContainsUndefinedBreakTarget of <emu-nt id="_ref_13901"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt> with argument « » is <emu-val>true</emu-val>.
</li>
<li>
It is a Syntax Error if ContainsUndefinedContinueTarget of <emu-nt id="_ref_13902"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt> with arguments « » and « » is <emu-val>true</emu-val>.
</li>
</ul>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The duplicate ExportedNames rule implies that multiple <code>export default</code> <emu-nt id="_ref_13903"><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt> items within a <emu-nt id="_ref_13904"><a href="#prod-ModuleBody">ModuleBody</a></emu-nt>
is a Syntax Error. Additional error conditions relating to conflicting
or duplicate declarations are checked during module linking prior to
evaluation of a <emu-nt id="_ref_13905"><a href="#prod-Module">Module</a></emu-nt>. If any such errors are detected the <emu-nt id="_ref_13906"><a href="#prod-Module">Module</a></emu-nt> is not evaluated.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-module-semantics-static-semantics-containsduplicatelabels">
<h1><span class="secnum">15.2.1.2</span>Static Semantics: ContainsDuplicateLabels</h1>
<p>With parameter <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsDuplicateLabels"></emu-see-also-para>
<emu-grammar><emu-production name="ModuleItemList" collapsed="">
<emu-nt><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="75ddb725"><emu-nt id="_ref_13907"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt><emu-nt id="_ref_13908"><a href="#prod-ModuleItem">ModuleItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>hasDuplicates</var> be ContainsDuplicateLabels of <emu-nt id="_ref_13909"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt> with argument <var>labelSet</var>.</li><li>If <var>hasDuplicates</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return ContainsDuplicateLabels of <emu-nt id="_ref_13910"><a href="#prod-ModuleItem">ModuleItem</a></emu-nt> with argument <var>labelSet</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ModuleItem">
<emu-nt><a href="#prod-ModuleItem">ModuleItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e0559377"><emu-nt id="_ref_13911"><a href="#prod-ImportDeclaration">ImportDeclaration</a></emu-nt></emu-rhs>
<emu-rhs a="298e81b0"><emu-nt id="_ref_13912"><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-module-semantics-static-semantics-containsundefinedbreaktarget">
<h1><span class="secnum">15.2.1.3</span>Static Semantics: ContainsUndefinedBreakTarget</h1>
<p>With parameter <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsUndefinedBreakTarget"></emu-see-also-para>
<emu-grammar><emu-production name="ModuleItemList" collapsed="">
<emu-nt><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="75ddb725"><emu-nt id="_ref_13913"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt><emu-nt id="_ref_13914"><a href="#prod-ModuleItem">ModuleItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>hasUndefinedLabels</var> be ContainsUndefinedBreakTarget of <emu-nt id="_ref_13915"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt> with argument <var>labelSet</var>.</li><li>If <var>hasUndefinedLabels</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return ContainsUndefinedBreakTarget of <emu-nt id="_ref_13916"><a href="#prod-ModuleItem">ModuleItem</a></emu-nt> with argument <var>labelSet</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ModuleItem">
<emu-nt><a href="#prod-ModuleItem">ModuleItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e0559377"><emu-nt id="_ref_13917"><a href="#prod-ImportDeclaration">ImportDeclaration</a></emu-nt></emu-rhs>
<emu-rhs a="298e81b0"><emu-nt id="_ref_13918"><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-module-semantics-static-semantics-containsundefinedcontinuetarget">
<h1><span class="secnum">15.2.1.4</span>Static Semantics: ContainsUndefinedContinueTarget</h1>
<p>With parameters <var>iterationSet</var> and <var>labelSet</var>.</p>
<emu-see-also-para op="ContainsUndefinedContinueTarget"></emu-see-also-para>
<emu-grammar><emu-production name="ModuleItemList" collapsed="">
<emu-nt><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="75ddb725"><emu-nt id="_ref_13919"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt><emu-nt id="_ref_13920"><a href="#prod-ModuleItem">ModuleItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>hasUndefinedLabels</var> be ContainsUndefinedContinueTarget of <emu-nt id="_ref_13921"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt> with arguments <var>iterationSet</var> and « ».</li><li>If <var>hasUndefinedLabels</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return ContainsUndefinedContinueTarget of <emu-nt id="_ref_13922"><a href="#prod-ModuleItem">ModuleItem</a></emu-nt> with arguments <var>iterationSet</var> and « ».
</li></ol></emu-alg>
<emu-grammar><emu-production name="ModuleItem">
<emu-nt><a href="#prod-ModuleItem">ModuleItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e0559377"><emu-nt id="_ref_13923"><a href="#prod-ImportDeclaration">ImportDeclaration</a></emu-nt></emu-rhs>
<emu-rhs a="298e81b0"><emu-nt id="_ref_13924"><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-module-semantics-static-semantics-exportedbindings">
<h1><span class="secnum">15.2.1.5</span>Static Semantics: ExportedBindings</h1>
<emu-see-also-para op="ExportedBindings"></emu-see-also-para>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>ExportedBindings are the locally bound names that are explicitly associated with a <emu-nt id="_ref_13925"><a href="#prod-Module">Module</a></emu-nt>'s ExportedNames.</p>
</div></emu-note>
<emu-grammar><emu-production name="ModuleItemList" collapsed="">
<emu-nt><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="75ddb725"><emu-nt id="_ref_13926"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt><emu-nt id="_ref_13927"><a href="#prod-ModuleItem">ModuleItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>names</var> be ExportedBindings of <emu-nt id="_ref_13928"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt>.</li><li>Append to <var>names</var> the elements of the ExportedBindings of <emu-nt id="_ref_13929"><a href="#prod-ModuleItem">ModuleItem</a></emu-nt>.</li><li>Return <var>names</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ModuleItem">
<emu-nt><a href="#prod-ModuleItem">ModuleItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e0559377"><emu-nt id="_ref_13930"><a href="#prod-ImportDeclaration">ImportDeclaration</a></emu-nt></emu-rhs>
<emu-rhs a="d791d1c9"><emu-nt id="_ref_13931"><a href="#prod-StatementListItem">StatementListItem</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_4443"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-module-semantics-static-semantics-exportednames">
<h1><span class="secnum">15.2.1.6</span>Static Semantics: ExportedNames</h1>
<emu-see-also-para op="ExportedNames"></emu-see-also-para>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>ExportedNames are the externally visible names that a <emu-nt id="_ref_13932"><a href="#prod-Module">Module</a></emu-nt> explicitly maps to one of its local name bindings.</p>
</div></emu-note>
<emu-grammar><emu-production name="ModuleItemList" collapsed="">
<emu-nt><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="75ddb725"><emu-nt id="_ref_13933"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt><emu-nt id="_ref_13934"><a href="#prod-ModuleItem">ModuleItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>names</var> be ExportedNames of <emu-nt id="_ref_13935"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt>.</li><li>Append to <var>names</var> the elements of the ExportedNames of <emu-nt id="_ref_13936"><a href="#prod-ModuleItem">ModuleItem</a></emu-nt>.</li><li>Return <var>names</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ModuleItem" collapsed="">
<emu-nt><a href="#prod-ModuleItem">ModuleItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="298e81b0"><emu-nt id="_ref_13937"><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the ExportedNames of <emu-nt id="_ref_13938"><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ModuleItem">
<emu-nt><a href="#prod-ModuleItem">ModuleItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e0559377"><emu-nt id="_ref_13939"><a href="#prod-ImportDeclaration">ImportDeclaration</a></emu-nt></emu-rhs>
<emu-rhs a="d791d1c9"><emu-nt id="_ref_13940"><a href="#prod-StatementListItem">StatementListItem</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_4444"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-module-semantics-static-semantics-exportentries">
<h1><span class="secnum">15.2.1.7</span>Static Semantics: ExportEntries</h1>
<emu-see-also-para op="ExportEntries"></emu-see-also-para>
<emu-grammar><emu-production name="Module" collapsed="">
<emu-nt><a href="#prod-Module">Module</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></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_4445"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ModuleItemList" collapsed="">
<emu-nt><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="75ddb725"><emu-nt id="_ref_13941"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt><emu-nt id="_ref_13942"><a href="#prod-ModuleItem">ModuleItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>entries</var> be ExportEntries of <emu-nt id="_ref_13943"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt>.</li><li>Append to <var>entries</var> the elements of the ExportEntries of <emu-nt id="_ref_13944"><a href="#prod-ModuleItem">ModuleItem</a></emu-nt>.</li><li>Return <var>entries</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ModuleItem">
<emu-nt><a href="#prod-ModuleItem">ModuleItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e0559377"><emu-nt id="_ref_13945"><a href="#prod-ImportDeclaration">ImportDeclaration</a></emu-nt></emu-rhs>
<emu-rhs a="d791d1c9"><emu-nt id="_ref_13946"><a href="#prod-StatementListItem">StatementListItem</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_4446"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-module-semantics-static-semantics-importentries">
<h1><span class="secnum">15.2.1.8</span>Static Semantics: ImportEntries</h1>
<emu-see-also-para op="ImportEntries"></emu-see-also-para>
<emu-grammar><emu-production name="Module" collapsed="">
<emu-nt><a href="#prod-Module">Module</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></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_4447"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ModuleItemList" collapsed="">
<emu-nt><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="75ddb725"><emu-nt id="_ref_13947"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt><emu-nt id="_ref_13948"><a href="#prod-ModuleItem">ModuleItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>entries</var> be ImportEntries of <emu-nt id="_ref_13949"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt>.</li><li>Append to <var>entries</var> the elements of the ImportEntries of <emu-nt id="_ref_13950"><a href="#prod-ModuleItem">ModuleItem</a></emu-nt>.</li><li>Return <var>entries</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ModuleItem">
<emu-nt><a href="#prod-ModuleItem">ModuleItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="298e81b0"><emu-nt id="_ref_13951"><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt></emu-rhs>
<emu-rhs a="d791d1c9"><emu-nt id="_ref_13952"><a href="#prod-StatementListItem">StatementListItem</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_4448"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-importedlocalnames" aoid="ImportedLocalNames">
<h1><span class="secnum">15.2.1.9</span>Static Semantics: ImportedLocalNames ( <var>importEntries</var> )</h1>
<p>The abstract operation ImportedLocalNames with argument <var>importEntries</var> creates a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4449"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of all of the local name bindings defined by a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4450"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of ImportEntry Records (see <emu-xref href="#table-39" id="_ref_367"><a href="#table-39">Table 42</a></emu-xref>). ImportedLocalNames performs the following steps:</p>
<emu-alg><ol><li>Let <var>localNames</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4451"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>For each <emu-xref href="#importentry-record" id="_ref_4452"><a href="#importentry-record">ImportEntry Record</a></emu-xref> <var>i</var> in <var>importEntries</var>, do<ol><li>Append <var>i</var>.[[LocalName]] to <var>localNames</var>.</li></ol></li><li>Return <var>localNames</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-module-semantics-static-semantics-modulerequests">
<h1><span class="secnum">15.2.1.10</span>Static Semantics: ModuleRequests</h1>
<emu-see-also-para op="ModuleRequests"></emu-see-also-para>
<emu-grammar><emu-production name="Module" collapsed="">
<emu-nt><a href="#prod-Module">Module</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></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_4453"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ModuleItemList" collapsed="">
<emu-nt><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="029ec31e"><emu-nt id="_ref_13953"><a href="#prod-ModuleItem">ModuleItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ModuleRequests of <emu-nt id="_ref_13954"><a href="#prod-ModuleItem">ModuleItem</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ModuleItemList" collapsed="">
<emu-nt><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="75ddb725"><emu-nt id="_ref_13955"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt><emu-nt id="_ref_13956"><a href="#prod-ModuleItem">ModuleItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>moduleNames</var> be ModuleRequests of <emu-nt id="_ref_13957"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt>.</li><li>Let <var>additionalNames</var> be ModuleRequests of <emu-nt id="_ref_13958"><a href="#prod-ModuleItem">ModuleItem</a></emu-nt>.</li><li>Append to <var>moduleNames</var> each element of <var>additionalNames</var> that is not already an element of <var>moduleNames</var>.</li><li>Return <var>moduleNames</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ModuleItem" collapsed="">
<emu-nt><a href="#prod-ModuleItem">ModuleItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d791d1c9"><emu-nt id="_ref_13959"><a href="#prod-StatementListItem">StatementListItem</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_4454"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-module-semantics-static-semantics-lexicallydeclarednames">
<h1><span class="secnum">15.2.1.11</span>Static Semantics: LexicallyDeclaredNames</h1>
<emu-see-also-para op="LexicallyDeclaredNames"></emu-see-also-para>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>The LexicallyDeclaredNames of a <emu-nt id="_ref_13960"><a href="#prod-Module">Module</a></emu-nt> includes the names of all of its imported bindings.</p>
</div></emu-note>
<emu-grammar><emu-production name="ModuleItemList" collapsed="">
<emu-nt><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="75ddb725"><emu-nt id="_ref_13961"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt><emu-nt id="_ref_13962"><a href="#prod-ModuleItem">ModuleItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>names</var> be LexicallyDeclaredNames of <emu-nt id="_ref_13963"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt>.</li><li>Append to <var>names</var> the elements of the LexicallyDeclaredNames of <emu-nt id="_ref_13964"><a href="#prod-ModuleItem">ModuleItem</a></emu-nt>.</li><li>Return <var>names</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ModuleItem" collapsed="">
<emu-nt><a href="#prod-ModuleItem">ModuleItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e0559377"><emu-nt id="_ref_13965"><a href="#prod-ImportDeclaration">ImportDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the BoundNames of <emu-nt id="_ref_13966"><a href="#prod-ImportDeclaration">ImportDeclaration</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ModuleItem" collapsed="">
<emu-nt><a href="#prod-ModuleItem">ModuleItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="298e81b0"><emu-nt id="_ref_13967"><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <emu-nt id="_ref_13968"><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt> is <code>export</code> <emu-nt id="_ref_13969"><a href="#prod-VariableStatement">VariableStatement</a></emu-nt>, return a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4455"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Return the BoundNames of <emu-nt id="_ref_13970"><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ModuleItem" collapsed="">
<emu-nt><a href="#prod-ModuleItem">ModuleItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d791d1c9"><emu-nt id="_ref_13971"><a href="#prod-StatementListItem">StatementListItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return LexicallyDeclaredNames of <emu-nt id="_ref_13972"><a href="#prod-StatementListItem">StatementListItem</a></emu-nt>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>At the top level of a <emu-nt id="_ref_13973"><a href="#prod-Module">Module</a></emu-nt>, function declarations are treated like lexical declarations rather than like var declarations.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-module-semantics-static-semantics-lexicallyscopeddeclarations">
<h1><span class="secnum">15.2.1.12</span>Static Semantics: LexicallyScopedDeclarations</h1>
<emu-see-also-para op="LexicallyScopedDeclarations"></emu-see-also-para>
<emu-grammar><emu-production name="Module" collapsed="">
<emu-nt><a href="#prod-Module">Module</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></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_4456"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ModuleItemList" collapsed="">
<emu-nt><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="75ddb725"><emu-nt id="_ref_13974"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt><emu-nt id="_ref_13975"><a href="#prod-ModuleItem">ModuleItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>declarations</var> be LexicallyScopedDeclarations of <emu-nt id="_ref_13976"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt>.</li><li>Append to <var>declarations</var> the elements of the LexicallyScopedDeclarations of <emu-nt id="_ref_13977"><a href="#prod-ModuleItem">ModuleItem</a></emu-nt>.</li><li>Return <var>declarations</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ModuleItem" collapsed="">
<emu-nt><a href="#prod-ModuleItem">ModuleItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e0559377"><emu-nt id="_ref_13978"><a href="#prod-ImportDeclaration">ImportDeclaration</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_4457"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-module-semantics-static-semantics-vardeclarednames">
<h1><span class="secnum">15.2.1.13</span>Static Semantics: VarDeclaredNames</h1>
<emu-see-also-para op="VarDeclaredNames"></emu-see-also-para>
<emu-grammar><emu-production name="Module" collapsed="">
<emu-nt><a href="#prod-Module">Module</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></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_4458"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ModuleItemList" collapsed="">
<emu-nt><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="75ddb725"><emu-nt id="_ref_13979"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt><emu-nt id="_ref_13980"><a href="#prod-ModuleItem">ModuleItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>names</var> be VarDeclaredNames of <emu-nt id="_ref_13981"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt>.</li><li>Append to <var>names</var> the elements of the VarDeclaredNames of <emu-nt id="_ref_13982"><a href="#prod-ModuleItem">ModuleItem</a></emu-nt>.</li><li>Return <var>names</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ModuleItem" collapsed="">
<emu-nt><a href="#prod-ModuleItem">ModuleItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e0559377"><emu-nt id="_ref_13983"><a href="#prod-ImportDeclaration">ImportDeclaration</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_4459"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ModuleItem" collapsed="">
<emu-nt><a href="#prod-ModuleItem">ModuleItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="298e81b0"><emu-nt id="_ref_13984"><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <emu-nt id="_ref_13985"><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt> is <code>export</code> <emu-nt id="_ref_13986"><a href="#prod-VariableStatement">VariableStatement</a></emu-nt>, return BoundNames of <emu-nt id="_ref_13987"><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt>.</li><li>Return a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4460"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-module-semantics-static-semantics-varscopeddeclarations">
<h1><span class="secnum">15.2.1.14</span>Static Semantics: VarScopedDeclarations</h1>
<emu-see-also-para op="VarScopedDeclarations"></emu-see-also-para>
<emu-grammar><emu-production name="Module" collapsed="">
<emu-nt><a href="#prod-Module">Module</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></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_4461"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ModuleItemList" collapsed="">
<emu-nt><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="75ddb725"><emu-nt id="_ref_13988"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt><emu-nt id="_ref_13989"><a href="#prod-ModuleItem">ModuleItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>declarations</var> be VarScopedDeclarations of <emu-nt id="_ref_13990"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt>.</li><li>Append to <var>declarations</var> the elements of the VarScopedDeclarations of <emu-nt id="_ref_13991"><a href="#prod-ModuleItem">ModuleItem</a></emu-nt>.</li><li>Return <var>declarations</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ModuleItem" collapsed="">
<emu-nt><a href="#prod-ModuleItem">ModuleItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e0559377"><emu-nt id="_ref_13992"><a href="#prod-ImportDeclaration">ImportDeclaration</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_4462"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ModuleItem" collapsed="">
<emu-nt><a href="#prod-ModuleItem">ModuleItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="298e81b0"><emu-nt id="_ref_13993"><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <emu-nt id="_ref_13994"><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt> is <code>export</code> <emu-nt id="_ref_13995"><a href="#prod-VariableStatement">VariableStatement</a></emu-nt>, return VarScopedDeclarations of <emu-nt id="_ref_13996"><a href="#prod-VariableStatement">VariableStatement</a></emu-nt>.</li><li>Return a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4463"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-abstract-module-records">
<h1><span class="secnum">15.2.1.15</span>Abstract Module Records</h1>
<p>A <dfn>Module Record</dfn> encapsulates structural
information about the imports and exports of a single module. This
information is used to link the imports and exports of sets of connected
modules. A Module Record includes four fields that are only used when
evaluating a module.</p>
<p>For specification purposes Module Record values are values of the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4464"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref>
specification type and can be thought of as existing in a simple
object-oriented hierarchy where Module Record is an abstract class with
both abstract and concrete subclasses. This specification defines the
abstract subclass named <emu-xref href="#cyclic-module-record" id="_ref_4465"><a href="#cyclic-module-record">Cyclic Module Record</a></emu-xref> and its concrete subclass named <emu-xref href="#sourctextmodule-record" id="_ref_4466"><a href="#sourctextmodule-record">Source Text Module Record</a></emu-xref>.
Other specifications and implementations may define additional Module
Record subclasses corresponding to alternative module definition
facilities that they defined.</p>
<p>Module Record defines the fields listed in <emu-xref href="#table-36" id="_ref_368"><a href="#table-36">Table 37</a></emu-xref>. All Module Definition subclasses include at least those fields. Module Record also defines the abstract method list in <emu-xref href="#table-37" id="_ref_369"><a href="#table-37">Table 38</a></emu-xref>. All Module definition subclasses must provide concrete implementations of these abstract methods.</p>
<emu-table id="table-36" caption="Module Record Fields"><figure><figcaption>Table 37: <emu-xref href="#sec-abstract-module-records" id="_ref_4467"><a href="#sec-abstract-module-records">Module Record</a></emu-xref> Fields</figcaption>
<table>
<thead>
<tr>
<th>
Field Name
</th>
<th>
Value Type
</th>
<th>
Meaning
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
[[Realm]]
</td>
<td>
<emu-xref href="#realm-record" id="_ref_4468"><a href="#realm-record">Realm Record</a></emu-xref> | <emu-val>undefined</emu-val>
</td>
<td>
The <emu-xref href="#realm" id="_ref_4469"><a href="#realm">Realm</a></emu-xref> within which this module was created. <emu-val>undefined</emu-val> if not yet assigned.
</td>
</tr>
<tr>
<td>
[[Environment]]
</td>
<td>
<emu-xref href="#sec-lexical-environments" id="_ref_4470"><a href="#sec-lexical-environments">Lexical Environment</a></emu-xref> | <emu-val>undefined</emu-val>
</td>
<td>
The <emu-xref href="#sec-lexical-environments" id="_ref_4471"><a href="#sec-lexical-environments">Lexical Environment</a></emu-xref> containing the top level bindings for this module. This field is set when the module is instantiated.
</td>
</tr>
<tr>
<td>
[[Namespace]]
</td>
<td>
Object | <emu-val>undefined</emu-val>
</td>
<td>
The Module Namespace Object (<emu-xref href="#sec-module-namespace-objects" id="_ref_370"><a href="#sec-module-namespace-objects">26.3</a></emu-xref>) if one has been created for this module. Otherwise <emu-val>undefined</emu-val>.
</td>
</tr>
<tr>
<td>
[[HostDefined]]
</td>
<td>
Any, default value is <emu-val>undefined</emu-val>.
</td>
<td>
Field reserved for use by host environments that need to associate additional information with a module.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<emu-table id="table-37" caption="Abstract Methods of Module Records"><figure><figcaption>Table 38: Abstract Methods of Module Records</figcaption>
<table>
<tbody>
<tr>
<th>
Method
</th>
<th>
Purpose
</th>
</tr>
<tr>
<td>
GetExportedNames(<var>exportStarSet</var>)
</td>
<td>
Return a list of all names that are either directly or indirectly exported from this module.
</td>
</tr>
<tr>
<td>
ResolveExport(<var>exportName</var>, <var>resolveSet</var>)
</td>
<td>
<p>Return the binding of a name exported by this module. Bindings are represented by a <dfn id="resolvedbinding-record">ResolvedBinding Record</dfn>, of the form { [[Module]]: <emu-xref href="#sec-abstract-module-records" id="_ref_4472"><a href="#sec-abstract-module-records">Module Record</a></emu-xref>, [[BindingName]]: String }. Return <emu-val>null</emu-val> if the name cannot be resolved, or <code>"ambiguous"</code> if multiple bindings were found.</p>
<p>This operation must be idempotent if it completes normally. Each time it is called with a specific <var>exportName</var>, <var>resolveSet</var> pair as arguments it must return the same result.</p>
</td>
</tr>
<tr>
<td>
Instantiate()
</td>
<td>
<p>Prepare the module for evaluation by transitively resolving all module dependencies and creating a module <emu-xref href="#sec-environment-records" id="_ref_4473"><a href="#sec-environment-records">Environment Record</a></emu-xref>.</p>
</td>
</tr>
<tr>
<td>
Evaluate()
</td>
<td>
<p>If this module has already been evaluated successfully, return <emu-val>undefined</emu-val>;
if it has already been evaluated unsuccessfully, throw the exception
that was produced. Otherwise, transitively evaluate all module
dependencies of this module and then evaluate this module.</p>
<p>Instantiate must have completed successfully prior to invoking this method.</p>
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
</emu-clause>
<emu-clause id="sec-cyclic-module-records">
<h1><span class="secnum">15.2.1.16</span>Cyclic Module Records</h1>
<p>A <dfn id="cyclic-module-record">Cyclic Module Record</dfn>
is used to represent information about a module that can participate in
dependency cycles with other modules that are subclasses of the <emu-xref href="#cyclic-module-record" id="_ref_4474"><a href="#cyclic-module-record">Cyclic Module Record</a></emu-xref> type. Module Records that are not subclasses of the <emu-xref href="#cyclic-module-record" id="_ref_4475"><a href="#cyclic-module-record">Cyclic Module Record</a></emu-xref> type must not participate in dependency cycles with Source Text Module Records.</p>
<p>In addition to the fields defined in <emu-xref href="#table-36" id="_ref_371"><a href="#table-36">Table 37</a></emu-xref> Cyclic Module Records have the additional fields listed in <emu-xref href="#table-cyclic-module-fields" id="_ref_372"><a href="#table-cyclic-module-fields">Table 39</a></emu-xref></p>
<emu-table id="table-cyclic-module-fields" caption="Additional Fields of Cyclic Module Records"><figure><figcaption>Table 39: Additional Fields of Cyclic Module Records</figcaption>
<table>
<tbody>
<tr>
<th>
Field Name
</th>
<th>
Value Type
</th>
<th>
Meaning
</th>
</tr>
<tr>
<td>
[[Status]]
</td>
<td>
String
</td>
<td>
Initially <code>"uninstantiated"</code>. Transitions to <code>"instantiating"</code>, <code>"instantiated"</code>, <code>"evaluating"</code>, <code>"evaluated"</code> (in that order) as the module progresses throughout its lifecycle.
</td>
</tr>
<tr>
<td>
[[EvaluationError]]
</td>
<td>
An <emu-xref href="#sec-completion-record-specification-type" id="_ref_4476"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref> | <emu-val>undefined</emu-val>
</td>
<td>
A completion of type <emu-const>throw</emu-const> representing the exception that occurred during evaluation. <emu-val>undefined</emu-val> if no exception occurred or if [[Status]] is not <code>"evaluated"</code>.
</td>
</tr>
<tr>
<td>
[[DFSIndex]]
</td>
<td>
Integer | <emu-val>undefined</emu-val>
</td>
<td>
Auxiliary field used during Instantiate and Evaluate only.
If [[Status]] is <code>"instantiating"</code> or <code>"evaluating"</code>,
this nonnegative number records the point at which the module was first
visited during the ongoing depth-first traversal of the dependency
graph.
</td>
</tr>
<tr>
<td>
[[DFSAncestorIndex]]
</td>
<td>
Integer | <emu-val>undefined</emu-val>
</td>
<td>
Auxiliary field used during Instantiate and Evaluate only. If [[Status]] is <code>"instantiating"</code> or <code>"evaluating"</code>, this is either the module's own [[DFSIndex]] or that of an "earlier" module in the same strongly connected component.
</td>
</tr>
<tr>
<td>
[[RequestedModules]]
</td>
<td>
<emu-xref href="#sec-list-and-record-specification-type" id="_ref_4477"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of String
</td>
<td>
A <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4478"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of all the <emu-nt id="_ref_13997"><a href="#prod-ModuleSpecifier">ModuleSpecifier</a></emu-nt> strings used by the module represented by this record to request the importation of a module. The <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4479"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> is source code occurrence ordered.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<p>In addition to the methods defined in <emu-xref href="#table-37" id="_ref_373"><a href="#table-37">Table 38</a></emu-xref> Cyclic Module Records have the additional methods listed in <emu-xref href="#table-cyclic-module-methods" id="_ref_374"><a href="#table-cyclic-module-methods">Table 40</a></emu-xref></p>
<emu-table id="table-cyclic-module-methods" caption="Additional Abstract Methods of Cyclic Module Records"><figure><figcaption>Table 40: Additional Abstract Methods of Cyclic Module Records</figcaption>
<table>
<tbody>
<tr>
<th>
Method
</th>
<th>
Purpose
</th>
</tr>
<tr>
<td>
<emu-xref aoid="InitializeEnvironment" id="_ref_4480"><a href="#sec-source-text-module-record-initialize-environment">InitializeEnvironment</a></emu-xref>()
</td>
<td>
Initialize the <emu-xref href="#sec-lexical-environments" id="_ref_4481"><a href="#sec-lexical-environments">Lexical Environment</a></emu-xref> of the module, including resolving all imported bindings.
</td>
</tr>
<tr>
<td>
<emu-xref aoid="ExecuteModule" id="_ref_4482"><a href="#sec-source-text-module-record-execute-module">ExecuteModule</a></emu-xref>()
</td>
<td>
Initialize the <emu-xref href="#sec-execution-contexts" id="_ref_4483"><a href="#sec-execution-contexts">execution context</a></emu-xref> of the module and evaluate the module's code within it.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<emu-clause id="sec-moduledeclarationinstantiation">
<h1><span class="secnum">15.2.1.16.1</span>Instantiate ( ) Concrete Method</h1>
<p>The Instantiate concrete method of a <emu-xref href="#cyclic-module-record" id="_ref_4484"><a href="#cyclic-module-record">Cyclic Module Record</a></emu-xref> implements the corresponding <emu-xref href="#sec-abstract-module-records" id="_ref_4485"><a href="#sec-abstract-module-records">Module Record</a></emu-xref> abstract method.</p>
<p>On success, Instantiate transitions this module's [[Status]] from <code>"uninstantiated"</code> to <code>"instantiated"</code>. On failure, an exception is thrown and this module's [[Status]] remains <code>"uninstantiated"</code>.</p>
<p>This abstract method performs the following steps (most of the work is done by the auxiliary function <emu-xref aoid="InnerModuleInstantiation" id="_ref_4486"><a href="#sec-innermoduleinstantiation">InnerModuleInstantiation</a></emu-xref>):</p>
<emu-alg><ol><li>Let <var>module</var> be this <emu-xref href="#cyclic-module-record" id="_ref_4487"><a href="#cyclic-module-record">Cyclic Module Record</a></emu-xref>.</li><li><emu-xref href="#assert" id="_ref_4488"><a href="#assert">Assert</a></emu-xref>: <var>module</var>.[[Status]] is not <code>"instantiating"</code> or <code>"evaluating"</code>.</li><li>Let <var>stack</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4489"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>result</var> be <emu-xref aoid="InnerModuleInstantiation" id="_ref_4490"><a href="#sec-innermoduleinstantiation">InnerModuleInstantiation</a></emu-xref>(<var>module</var>, <var>stack</var>, 0).</li><li>If <var>result</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_4491"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, then<ol><li>For each module <var>m</var> in <var>stack</var>, do<ol><li><emu-xref href="#assert" id="_ref_4492"><a href="#assert">Assert</a></emu-xref>: <var>m</var>.[[Status]] is <code>"instantiating"</code>.</li><li>Set <var>m</var>.[[Status]] to <code>"uninstantiated"</code>.</li><li>Set <var>m</var>.[[Environment]] to <emu-val>undefined</emu-val>.</li><li>Set <var>m</var>.[[DFSIndex]] to <emu-val>undefined</emu-val>.</li><li>Set <var>m</var>.[[DFSAncestorIndex]] to <emu-val>undefined</emu-val>.</li></ol></li><li><emu-xref href="#assert" id="_ref_4493"><a href="#assert">Assert</a></emu-xref>: <var>module</var>.[[Status]] is <code>"uninstantiated"</code>.</li><li>Return <var>result</var>.</li></ol></li><li><emu-xref href="#assert" id="_ref_4494"><a href="#assert">Assert</a></emu-xref>: <var>module</var>.[[Status]] is <code>"instantiated"</code> or <code>"evaluated"</code>.</li><li><emu-xref href="#assert" id="_ref_4495"><a href="#assert">Assert</a></emu-xref>: <var>stack</var> is empty.</li><li>Return <emu-val>undefined</emu-val>.
</li></ol></emu-alg>
<emu-clause id="sec-innermoduleinstantiation" aoid="InnerModuleInstantiation">
<h1><span class="secnum">15.2.1.16.1.1</span>InnerModuleInstantiation ( <var>module</var>, <var>stack</var>, <var>index</var> )</h1>
<p>The InnerModuleInstantiation abstract operation is used by Instantiate to perform the actual instantiation process for the <emu-xref href="#cyclic-module-record" id="_ref_4496"><a href="#cyclic-module-record">Cyclic Module Record</a></emu-xref> <var>module</var>, as well as recursively on all other modules in the dependency graph. The <var>stack</var> and <var>index</var>
parameters, as well as a module's [[DFSIndex]] and [[DFSAncestorIndex]]
fields, keep track of the depth-first search (DFS) traversal. In
particular, [[DFSAncestorIndex]] is used to discover strongly connected
components (SCCs), such that all modules in an SCC transition to <code>"instantiated"</code> together.</p>
<p>This abstract operation performs the following steps:</p>
<emu-alg><ol><li>If <var>module</var> is not a <emu-xref href="#cyclic-module-record" id="_ref_4497"><a href="#cyclic-module-record">Cyclic Module Record</a></emu-xref>, then<ol><li>Perform ? <var>module</var>.Instantiate().</li><li>Return <var>index</var>.</li></ol></li><li>If <var>module</var>.[[Status]] is <code>"instantiating"</code>, <code>"instantiated"</code>, or <code>"evaluated"</code>, then<ol><li>Return <var>index</var>.</li></ol></li><li><emu-xref href="#assert" id="_ref_4498"><a href="#assert">Assert</a></emu-xref>: <var>module</var>.[[Status]] is <code>"uninstantiated"</code>.</li><li>Set <var>module</var>.[[Status]] to <code>"instantiating"</code>.</li><li>Set <var>module</var>.[[DFSIndex]] to <var>index</var>.</li><li>Set <var>module</var>.[[DFSAncestorIndex]] to <var>index</var>.</li><li>Increase <var>index</var> by 1.</li><li>Append <var>module</var> to <var>stack</var>.</li><li>For each String <var>required</var> that is an element of <var>module</var>.[[RequestedModules]], do<ol><li>Let <var>requiredModule</var> be ?&nbsp;<emu-xref aoid="HostResolveImportedModule" id="_ref_4499"><a href="#sec-hostresolveimportedmodule">HostResolveImportedModule</a></emu-xref>(<var>module</var>, <var>required</var>).</li><li>Set <var>index</var> to ?&nbsp;<emu-xref aoid="InnerModuleInstantiation" id="_ref_4500"><a href="#sec-innermoduleinstantiation">InnerModuleInstantiation</a></emu-xref>(<var>requiredModule</var>, <var>stack</var>, <var>index</var>).</li><li><emu-xref href="#assert" id="_ref_4501"><a href="#assert">Assert</a></emu-xref>: <var>requiredModule</var>.[[Status]] is either <code>"instantiating"</code>, <code>"instantiated"</code>, or <code>"evaluated"</code>.</li><li><emu-xref href="#assert" id="_ref_4502"><a href="#assert">Assert</a></emu-xref>: <var>requiredModule</var>.[[Status]] is <code>"instantiating"</code> if and only if <var>requiredModule</var> is in <var>stack</var>.</li><li>If <var>requiredModule</var>.[[Status]] is <code>"instantiating"</code>, then<ol><li><emu-xref href="#assert" id="_ref_4503"><a href="#assert">Assert</a></emu-xref>: <var>requiredModule</var> is a <emu-xref href="#cyclic-module-record" id="_ref_4504"><a href="#cyclic-module-record">Cyclic Module Record</a></emu-xref>.</li><li>Set <var>module</var>.[[DFSAncestorIndex]] to <emu-xref aoid="min" id="_ref_4505"><a href="#eqn-min">min</a></emu-xref>(<var>module</var>.[[DFSAncestorIndex]], <var>requiredModule</var>.[[DFSAncestorIndex]]).</li></ol></li></ol></li><li>Perform ? <var>module</var>.<emu-xref aoid="InitializeEnvironment" id="_ref_4506"><a href="#sec-source-text-module-record-initialize-environment">InitializeEnvironment</a></emu-xref>().</li><li><emu-xref href="#assert" id="_ref_4507"><a href="#assert">Assert</a></emu-xref>: <var>module</var> occurs exactly once in <var>stack</var>.</li><li><emu-xref href="#assert" id="_ref_4508"><a href="#assert">Assert</a></emu-xref>: <var>module</var>.[[DFSAncestorIndex]] is less than or equal to <var>module</var>.[[DFSIndex]].</li><li>If <var>module</var>.[[DFSAncestorIndex]] equals <var>module</var>.[[DFSIndex]], then<ol><li>Let <var>done</var> be <emu-val>false</emu-val>.</li><li>Repeat, while <var>done</var> is <emu-val>false</emu-val>,<ol><li>Let <var>requiredModule</var> be the last element in <var>stack</var>.</li><li>Remove the last element of <var>stack</var>.</li><li>Set <var>requiredModule</var>.[[Status]] to <code>"instantiated"</code>.</li><li>If <var>requiredModule</var> and <var>module</var> are the same <emu-xref href="#sec-abstract-module-records" id="_ref_4509"><a href="#sec-abstract-module-records">Module Record</a></emu-xref>, set <var>done</var> to <emu-val>true</emu-val>.</li></ol></li></ol></li><li>Return <var>index</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-moduleevaluation">
<h1><span class="secnum">15.2.1.16.2</span>Evaluate ( ) Concrete Method</h1>
<p>The Evaluate concrete method of a <emu-xref href="#cyclic-module-record" id="_ref_4510"><a href="#cyclic-module-record">Cyclic Module Record</a></emu-xref> implements the corresponding <emu-xref href="#sec-abstract-module-records" id="_ref_4511"><a href="#sec-abstract-module-records">Module Record</a></emu-xref> abstract method.</p>
<p>Evaluate transitions this module's [[Status]] from <code>"instantiated"</code> to <code>"evaluated"</code>.</p>
<p>If execution results in an exception, that exception is
recorded in the [[EvaluationError]] field and rethrown by future
invocations of Evaluate.</p>
<p>This abstract method performs the following steps (most of the work is done by the auxiliary function <emu-xref aoid="InnerModuleEvaluation" id="_ref_4512"><a href="#sec-innermoduleevaluation">InnerModuleEvaluation</a></emu-xref>):</p>
<emu-alg><ol><li>Let <var>module</var> be this <emu-xref href="#cyclic-module-record" id="_ref_4513"><a href="#cyclic-module-record">Cyclic Module Record</a></emu-xref>.</li><li><emu-xref href="#assert" id="_ref_4514"><a href="#assert">Assert</a></emu-xref>: <var>module</var>.[[Status]] is <code>"instantiated"</code> or <code>"evaluated"</code>.</li><li>Let <var>stack</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4515"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>result</var> be <emu-xref aoid="InnerModuleEvaluation" id="_ref_4516"><a href="#sec-innermoduleevaluation">InnerModuleEvaluation</a></emu-xref>(<var>module</var>, <var>stack</var>, 0).</li><li>If <var>result</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_4517"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, then<ol><li>For each module <var>m</var> in <var>stack</var>, do<ol><li><emu-xref href="#assert" id="_ref_4518"><a href="#assert">Assert</a></emu-xref>: <var>m</var>.[[Status]] is <code>"evaluating"</code>.</li><li>Set <var>m</var>.[[Status]] to <code>"evaluated"</code>.</li><li>Set <var>m</var>.[[EvaluationError]] to <var>result</var>.</li></ol></li><li><emu-xref href="#assert" id="_ref_4519"><a href="#assert">Assert</a></emu-xref>: <var>module</var>.[[Status]] is <code>"evaluated"</code> and <var>module</var>.[[EvaluationError]] is <var>result</var>.</li><li>Return <var>result</var>.</li></ol></li><li><emu-xref href="#assert" id="_ref_4520"><a href="#assert">Assert</a></emu-xref>: <var>module</var>.[[Status]] is <code>"evaluated"</code> and <var>module</var>.[[EvaluationError]] is <emu-val>undefined</emu-val>.</li><li><emu-xref href="#assert" id="_ref_4521"><a href="#assert">Assert</a></emu-xref>: <var>stack</var> is empty.</li><li>Return <emu-val>undefined</emu-val>.
</li></ol></emu-alg>
<emu-clause id="sec-innermoduleevaluation" aoid="InnerModuleEvaluation">
<h1><span class="secnum">15.2.1.16.2.1</span>InnerModuleEvaluation ( <var>module</var>, <var>stack</var>, <var>index</var> )</h1>
<p>The InnerModuleEvaluation abstract operation is used by Evaluate to perform the actual evaluation process for the <emu-xref href="#sourctextmodule-record" id="_ref_4522"><a href="#sourctextmodule-record">Source Text Module Record</a></emu-xref> <var>module</var>, as well as recursively on all other modules in the dependency graph. The <var>stack</var> and <var>index</var> parameters, as well as <var>module</var>'s [[DFSIndex]] and [[DFSAncestoreIndex]] fields, are used the same way as in <emu-xref aoid="InnerModuleInstantiation" id="_ref_4523"><a href="#sec-innermoduleinstantiation">InnerModuleInstantiation</a></emu-xref>.</p>
<p>This abstract operation performs the following steps:</p>
<emu-alg><ol><li>If <var>module</var> is not a <emu-xref href="#cyclic-module-record" id="_ref_4524"><a href="#cyclic-module-record">Cyclic Module Record</a></emu-xref>, then<ol><li>Perform ? <var>module</var>.Evaluate().</li><li>Return <var>index</var>.</li></ol></li><li>If <var>module</var>.[[Status]] is <code>"evaluated"</code>, then<ol><li>If <var>module</var>.[[EvaluationError]] is <emu-val>undefined</emu-val>, return <var>index</var>.</li><li>Otherwise return <var>module</var>.[[EvaluationError]].</li></ol></li><li>If <var>module</var>.[[Status]] is <code>"evaluating"</code>, return <var>index</var>.</li><li><emu-xref href="#assert" id="_ref_4525"><a href="#assert">Assert</a></emu-xref>: <var>module</var>.[[Status]] is <code>"instantiated"</code>.</li><li>Set <var>module</var>.[[Status]] to <code>"evaluating"</code>.</li><li>Set <var>module</var>.[[DFSIndex]] to <var>index</var>.</li><li>Set <var>module</var>.[[DFSAncestorIndex]] to <var>index</var>.</li><li>Increase <var>index</var> by 1.</li><li>Append <var>module</var> to <var>stack</var>.</li><li>For each String <var>required</var> that is an element of <var>module</var>.[[RequestedModules]], do<ol><li>Let <var>requiredModule</var> be !&nbsp;<emu-xref aoid="HostResolveImportedModule" id="_ref_4526"><a href="#sec-hostresolveimportedmodule">HostResolveImportedModule</a></emu-xref>(<var>module</var>, <var>required</var>).</li><li>NOTE:
Instantiate must be completed successfully prior to invoking this
method, so every requested module is guaranteed to resolve successfully.</li><li>Set <var>index</var> to ?&nbsp;<emu-xref aoid="InnerModuleEvaluation" id="_ref_4527"><a href="#sec-innermoduleevaluation">InnerModuleEvaluation</a></emu-xref>(<var>requiredModule</var>, <var>stack</var>, <var>index</var>).</li><li><emu-xref href="#assert" id="_ref_4528"><a href="#assert">Assert</a></emu-xref>: <var>requiredModule</var>.[[Status]] is either <code>"evaluating"</code> or <code>"evaluated"</code>.</li><li><emu-xref href="#assert" id="_ref_4529"><a href="#assert">Assert</a></emu-xref>: <var>requiredModule</var>.[[Status]] is <code>"evaluating"</code> if and only if <var>requiredModule</var> is in <var>stack</var>.</li><li>If <var>requiredModule</var>.[[Status]] is <code>"evaluating"</code>, then<ol><li><emu-xref href="#assert" id="_ref_4530"><a href="#assert">Assert</a></emu-xref>: <var>requiredModule</var> is a <emu-xref href="#cyclic-module-record" id="_ref_4531"><a href="#cyclic-module-record">Cyclic Module Record</a></emu-xref>.</li><li>Set <var>module</var>.[[DFSAncestorIndex]] to <emu-xref aoid="min" id="_ref_4532"><a href="#eqn-min">min</a></emu-xref>(<var>module</var>.[[DFSAncestorIndex]], <var>requiredModule</var>.[[DFSAncestorIndex]]).</li></ol></li></ol></li><li>Perform ? <var>module</var>.<emu-xref aoid="ExecuteModule" id="_ref_4533"><a href="#sec-source-text-module-record-execute-module">ExecuteModule</a></emu-xref>().</li><li><emu-xref href="#assert" id="_ref_4534"><a href="#assert">Assert</a></emu-xref>: <var>module</var> occurs exactly once in <var>stack</var>.</li><li><emu-xref href="#assert" id="_ref_4535"><a href="#assert">Assert</a></emu-xref>: <var>module</var>.[[DFSAncestorIndex]] is less than or equal to <var>module</var>.[[DFSIndex]].</li><li>If <var>module</var>.[[DFSAncestorIndex]] equals <var>module</var>.[[DFSIndex]], then<ol><li>Let <var>done</var> be <emu-val>false</emu-val>.</li><li>Repeat, while <var>done</var> is <emu-val>false</emu-val>,<ol><li>Let <var>requiredModule</var> be the last element in <var>stack</var>.</li><li>Remove the last element of <var>stack</var>.</li><li>Set <var>requiredModule</var>.[[Status]] to <code>"evaluated"</code>.</li><li>If <var>requiredModule</var> and <var>module</var> are the same <emu-xref href="#sec-abstract-module-records" id="_ref_4536"><a href="#sec-abstract-module-records">Module Record</a></emu-xref>, set <var>done</var> to <emu-val>true</emu-val>.</li></ol></li></ol></li><li>Return <var>index</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-example-cyclic-module-record-graphs">
<h1><span class="secnum">15.2.1.16.3</span>Example Cyclic Module Record Graphs</h1>
<p>This non-normative section gives a series of examples of
the instantiation and evaluation of a few common module graphs, with a
specific focus on how errors can occur.</p>
<p>First consider the following simple module graph:</p>
<emu-figure id="figure-module-graph-simple" caption="A simple module graph"><figure><figcaption>Figure 2: A simple module graph</figcaption>
<img alt="A module graph in which module A depends on module B" src="ECMAScript%C2%AE%202019%20Language%C2%A0Specification_files/module-graph-simple.svg" width="121" height="211">
</figure></emu-figure>
<p>Let's first assume that there are no error conditions. When a host first calls <var>A</var>.Instantiate(), this will complete successfully by assumption, and recursively instantiate modules <var>B</var> and <var>C</var> as well, such that <var>A</var>.[[Status]] = <var>B</var>.[[Status]] = <var>C</var>.[[Status]] = <code>"instantiated"</code>.
This preparatory step can be performed at any time. Later, when the
host is ready to incur any possible side effects of the modules, it can
call <var>A</var>.Evaluate(), which will complete successfully (again by assumption), recursively having evaluated first <var>C</var> and then <var>B</var>. Each module's [[Status]] at this point will be <code>"evaluated</code>".</p>
<p>Consider then cases involving instantiation errors. If <emu-xref aoid="InnerModuleInstantiation" id="_ref_4537"><a href="#sec-innermoduleinstantiation">InnerModuleInstantiation</a></emu-xref> of <var>C</var> succeeds but, thereafter, fails for <var>B</var>, for example because it imports something that <var>C</var> does not provide, then the original <var>A</var>.Instantiate() will fail, and both <var>A</var> and <var>B</var>'s [[Status]] remain <code>"uninstantiated"</code>. <var>C</var>'s [[Status]] has become <code>"instantiated"</code>, though.</p>
<p>Finally, consider a case involving evaluation errors. If <emu-xref aoid="InnerModuleEvaluation" id="_ref_4538"><a href="#sec-innermoduleevaluation">InnerModuleEvaluation</a></emu-xref> of <var>C</var> succeeds but, thereafter, fails for <var>B</var>, for example because <var>B</var> contains code that throws an exception, then the original <var>A</var>.Evaluate() will fail. The resulting exception will be recorded in both <var>A</var> and <var>B</var>'s [[EvaluationError]] fields, and their [[Status]] will become <code>"evaluated"</code>. <var>C</var> will also become <code>"evaluated"</code> but, in contrast to <var>A</var> and <var>B</var>,
will remain without an [[EvaluationError]], as it successfully
completed evaluation. Storing the exception ensures that any time a host
tries to reuse <var>A</var> or <var>B</var> by calling their Evaluate()
method, it will encounter the same exception. (Hosts are not required
to reuse Cyclic Module Records; similarly, hosts are not required to
expose the exception objects thrown by these methods. However, the
specification enables such uses.)</p>
<p>The difference here between instantiation and evaluation
errors is due to how evaluation must be only performed once, as it can
cause side effects; it is thus important to remember whether evaluation
has already been performed, even if unsuccessfully. (In the error case,
it makes sense to also remember the exception because otherwise
subsequent Evaluate() calls would have to synthesize a new one.)
Instantiation, on the other hand, is side-effect-free, and thus even if
it fails, it can be retried at a later time with no issues.</p>
<p>Now consider a different type of error condition:</p>
<emu-figure id="figure-module-graph-missing" caption="A module graph with an unresolvable module"><figure><figcaption>Figure 3: A module graph with an unresolvable module</figcaption>
<img alt="A module graph in which module A depends on a missing (unresolvable) module, represented by ???" src="ECMAScript%C2%AE%202019%20Language%C2%A0Specification_files/module-graph-missing.svg" width="121" height="121">
</figure></emu-figure>
<p>In this scenario, module <var>A</var> declares a dependency on some other module, but no <emu-xref href="#sec-abstract-module-records" id="_ref_4539"><a href="#sec-abstract-module-records">Module Record</a></emu-xref> exists for that module, i.e. <emu-xref aoid="HostResolveImportedModule" id="_ref_4540"><a href="#sec-hostresolveimportedmodule">HostResolveImportedModule</a></emu-xref>
throws an exception when asked for it. This could occur for a variety
of reasons, such as the corresponding resource not existing, or the
resource existing but <emu-xref aoid="ParseModule" id="_ref_4541"><a href="#sec-parsemodule">ParseModule</a></emu-xref>
throwing an exception when trying to parse the resulting source text.
Hosts can choose to expose the cause of failure via the exception they
throw from <emu-xref aoid="HostResolveImportedModule" id="_ref_4542"><a href="#sec-hostresolveimportedmodule">HostResolveImportedModule</a></emu-xref>. In any case, this exception causes an instantiation failure, which as before results in <var>A</var>'s [[Status]] remaining <code>"uninstantiated"</code>.</p>
<p>Lastly, consider a module graph with a cycle:</p>
<emu-figure id="figure-module-graph-cycle" caption="A cyclic module graph"><figure><figcaption>Figure 4: A cyclic module graph</figcaption>
<img alt="A module graph in which module A depends on module B and C, but module B also depends on module A" src="ECMAScript%C2%AE%202019%20Language%C2%A0Specification_files/module-graph-cycle.svg" width="181" height="121">
</figure></emu-figure>
<p>Here we assume that the entry point is module <var>A</var>, so that the host proceeds by calling <var>A</var>.Instantiate(), which performs <emu-xref aoid="InnerModuleInstantiation" id="_ref_4543"><a href="#sec-innermoduleinstantiation">InnerModuleInstantiation</a></emu-xref> on <var>A</var>. This in turn calls <emu-xref aoid="InnerModuleInstantiation" id="_ref_4544"><a href="#sec-innermoduleinstantiation">InnerModuleInstantiation</a></emu-xref> on <var>B</var>. Because of the cycle, this again triggers <emu-xref aoid="InnerModuleInstantiation" id="_ref_4545"><a href="#sec-innermoduleinstantiation">InnerModuleInstantiation</a></emu-xref> on <var>A</var>, but at this point it is a no-op since <var>A</var>.[[Status]] is already <code>"instantiating"</code>. <var>B</var>.[[Status]] itself remains <code>"instantiating"</code> when control gets back to <var>A</var> and <emu-xref aoid="InnerModuleInstantiation" id="_ref_4546"><a href="#sec-innermoduleinstantiation">InnerModuleInstantiation</a></emu-xref> is triggered on <var>C</var>. After this returns with <var>C</var>.[[Status]] being <code>"instantiated"</code> , both <var>A</var> and <var>B</var> transition from <code>"instantiating"</code> to <code>"instantiated"</code> together; this is by design, since they form a strongly connected component.</p>
<p>An analogous story occurs for the evaluation phase of a cyclic module graph, in the success case.</p>
<p>Now consider a case where <var>A</var> has an instantiation error; for example, it tries to import a binding from <var>C</var> that does not exist. In that case, the above steps still occur, including the early return from the second call to <emu-xref aoid="InnerModuleInstantiation" id="_ref_4547"><a href="#sec-innermoduleinstantiation">InnerModuleInstantiation</a></emu-xref> on <var>A</var>. However, once we unwind back to the original <emu-xref aoid="InnerModuleInstantiation" id="_ref_4548"><a href="#sec-innermoduleinstantiation">InnerModuleInstantiation</a></emu-xref> on <var>A</var>, it fails during <emu-xref aoid="InitializeEnvironment" id="_ref_4549"><a href="#sec-source-text-module-record-initialize-environment">InitializeEnvironment</a></emu-xref>, namely right after <var>C</var>.ResolveExport(). The thrown <emu-val>SyntaxError</emu-val> exception propagates up to <var>A</var>.Instantiate, which resets all modules that are currently on its <var>stack</var> (these are always exactly the modules that are still <code>"instantiating"</code>). Hence both <var>A</var> and <var>B</var> become <code>"uninstantiated"</code>. Note that <var>C</var> is left as <code>"instantiated"</code>.</p>
<p>Finally, consider a case where <var>A</var> has an
evaluation error; for example, its source code throws an exception. In
that case, the evaluation-time analog of the above steps still occurs,
including the early return from the second call to <emu-xref aoid="InnerModuleEvaluation" id="_ref_4550"><a href="#sec-innermoduleevaluation">InnerModuleEvaluation</a></emu-xref> on <var>A</var>. However, once we unwind back to the original <emu-xref aoid="InnerModuleEvaluation" id="_ref_4551"><a href="#sec-innermoduleevaluation">InnerModuleEvaluation</a></emu-xref> on <var>A</var>, it fails by assumption. The exception thrown propagates up to <var>A</var>.Evaluate(), which records the error in all modules that are currently on its <var>stack</var> (i.e., the modules that are still <code>"evaluating"</code>). Hence both <var>A</var> and <var>B</var> become <code>"evaluated"</code> and the exception is recorded in both <var>A</var> and <var>B</var>'s [[EvaluationError]] fields, while <var>C</var> is left as <code>"evaluated"</code> with no [[EvaluationError]].</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-source-text-module-records">
<h1><span class="secnum">15.2.1.17</span>Source Text Module Records</h1>
<p>A <dfn id="sourctextmodule-record">Source Text Module Record</dfn> is used to represent information about a module that was defined from ECMAScript source text (<emu-xref href="#sec-ecmascript-language-source-code" id="_ref_375"><a href="#sec-ecmascript-language-source-code">10</a></emu-xref>) that was parsed using the <emu-xref href="#sec-context-free-grammars" id="_ref_4552"><a href="#sec-context-free-grammars">goal symbol</a></emu-xref> <emu-nt id="_ref_13998"><a href="#prod-Module">Module</a></emu-nt>.
Its fields contain digested information about the names that are
imported by the module and its concrete methods use this digest to link,
instantiate, and evaluate the module.</p>
<p>A <emu-xref href="#sourctextmodule-record" id="_ref_4553"><a href="#sourctextmodule-record">Source Text Module Record</a></emu-xref> can exist in a module graph with other subclasses of the abstract <emu-xref href="#sec-abstract-module-records" id="_ref_4554"><a href="#sec-abstract-module-records">Module Record</a></emu-xref> type, and can participate in cycles with other subclasses of the <emu-xref href="#cyclic-module-record" id="_ref_4555"><a href="#cyclic-module-record">Cyclic Module Record</a></emu-xref> type.</p>
<p>In addition to the fields defined in <emu-xref href="#table-cyclic-module-fields" id="_ref_376"><a href="#table-cyclic-module-fields">Table 39</a></emu-xref>, Source Text Module Records have the additional fields listed in <emu-xref href="#table-38" id="_ref_377"><a href="#table-38">Table 41</a></emu-xref>. Each of these fields is initially set in <emu-xref aoid="ParseModule" id="_ref_4556"><a href="#sec-parsemodule">ParseModule</a></emu-xref>.</p>
<emu-table id="table-38" caption="Additional Fields of Source Text Module Records"><figure><figcaption>Table 41: Additional Fields of Source Text Module Records</figcaption>
<table>
<tbody>
<tr>
<th>
Field Name
</th>
<th>
Value Type
</th>
<th>
Meaning
</th>
</tr>
<tr>
<td>
[[ECMAScriptCode]]
</td>
<td>
a <emu-xref href="#sec-syntactic-grammar" id="_ref_4557"><a href="#sec-syntactic-grammar">Parse Node</a></emu-xref>
</td>
<td>
The result of parsing the source text of this module using <emu-nt id="_ref_13999"><a href="#prod-Module">Module</a></emu-nt> as the <emu-xref href="#sec-context-free-grammars" id="_ref_4558"><a href="#sec-context-free-grammars">goal symbol</a></emu-xref>.
</td>
</tr>
<tr>
<td>
[[ImportEntries]]
</td>
<td>
<emu-xref href="#sec-list-and-record-specification-type" id="_ref_4559"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of ImportEntry Records
</td>
<td>
A <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4560"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of ImportEntry records derived from the code of this module.
</td>
</tr>
<tr>
<td>
[[LocalExportEntries]]
</td>
<td>
<emu-xref href="#sec-list-and-record-specification-type" id="_ref_4561"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of ExportEntry Records
</td>
<td>
A <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4562"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of ExportEntry records derived from the code of this module that correspond to declarations that occur within the module.
</td>
</tr>
<tr>
<td>
[[IndirectExportEntries]]
</td>
<td>
<emu-xref href="#sec-list-and-record-specification-type" id="_ref_4563"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of ExportEntry Records
</td>
<td>
A <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4564"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of ExportEntry records derived from the code of this module that correspond to reexported imports that occur within the module.
</td>
</tr>
<tr>
<td>
[[StarExportEntries]]
</td>
<td>
<emu-xref href="#sec-list-and-record-specification-type" id="_ref_4565"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of ExportEntry Records
</td>
<td>
A <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4566"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>
of ExportEntry records derived from the code of this module that
correspond to export * declarations that occur within the module.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<p>An <dfn id="importentry-record">ImportEntry Record</dfn> is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4567"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> that digests information about a single declarative import. Each <emu-xref href="#importentry-record" id="_ref_4568"><a href="#importentry-record">ImportEntry Record</a></emu-xref> has the fields defined in <emu-xref href="#table-39" id="_ref_378"><a href="#table-39">Table 42</a></emu-xref>:</p>
<emu-table id="table-39" caption="ImportEntry Record Fields"><figure><figcaption>Table 42: <emu-xref href="#importentry-record" id="_ref_4569"><a href="#importentry-record">ImportEntry Record</a></emu-xref> Fields</figcaption>
<table>
<tbody>
<tr>
<th>
Field Name
</th>
<th>
Value Type
</th>
<th>
Meaning
</th>
</tr>
<tr>
<td>
[[ModuleRequest]]
</td>
<td>
String
</td>
<td>
String value of the <emu-nt id="_ref_14000"><a href="#prod-ModuleSpecifier">ModuleSpecifier</a></emu-nt> of the <emu-nt id="_ref_14001"><a href="#prod-ImportDeclaration">ImportDeclaration</a></emu-nt>.
</td>
</tr>
<tr>
<td>
[[ImportName]]
</td>
<td>
String
</td>
<td>
The name under which the desired binding is exported by the module identified by [[ModuleRequest]]. The value <code>"*"</code> indicates that the import request is for the target module's namespace object.
</td>
</tr>
<tr>
<td>
[[LocalName]]
</td>
<td>
String
</td>
<td>
The name that is used to locally access the imported value from within the importing module.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p><emu-xref href="#table-40" id="_ref_379"><a href="#table-40">Table 43</a></emu-xref> gives examples of ImportEntry records fields used to represent the syntactic import forms:</p>
<emu-table id="table-40" caption="Import Forms Mappings to ImportEntry Records" informative=""><figure><figcaption>Table 43 (Informative): Import Forms Mappings to ImportEntry Records</figcaption>
<table>
<tbody>
<tr>
<th>
Import Statement Form
</th>
<th>
[[ModuleRequest]]
</th>
<th>
[[ImportName]]
</th>
<th>
[[LocalName]]
</th>
</tr>
<tr>
<td>
<code>import v from "mod";</code>
</td>
<td>
<code>"mod"</code>
</td>
<td>
<code>"default"</code>
</td>
<td>
<code>"v"</code>
</td>
</tr>
<tr>
<td>
<code>import * as ns from "mod";</code>
</td>
<td>
<code>"mod"</code>
</td>
<td>
<code>"*"</code>
</td>
<td>
<code>"ns"</code>
</td>
</tr>
<tr>
<td>
<code>import {x} from "mod";</code>
</td>
<td>
<code>"mod"</code>
</td>
<td>
<code>"x"</code>
</td>
<td>
<code>"x"</code>
</td>
</tr>
<tr>
<td>
<code>import {x as v} from "mod";</code>
</td>
<td>
<code>"mod"</code>
</td>
<td>
<code>"x"</code>
</td>
<td>
<code>"v"</code>
</td>
</tr>
<tr>
<td>
<code>import "mod";</code>
</td>
<td colspan="3">
An <emu-xref href="#importentry-record" id="_ref_4570"><a href="#importentry-record">ImportEntry Record</a></emu-xref> is not created.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
</div></emu-note>
<p>An <dfn id="exportentry-record">ExportEntry Record</dfn> is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4571"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> that digests information about a single declarative export. Each <emu-xref href="#exportentry-record" id="_ref_4572"><a href="#exportentry-record">ExportEntry Record</a></emu-xref> has the fields defined in <emu-xref href="#table-41" id="_ref_380"><a href="#table-41">Table 44</a></emu-xref>:</p>
<emu-table id="table-41" caption="ExportEntry Record Fields"><figure><figcaption>Table 44: <emu-xref href="#exportentry-record" id="_ref_4573"><a href="#exportentry-record">ExportEntry Record</a></emu-xref> Fields</figcaption>
<table>
<tbody>
<tr>
<th>
Field Name
</th>
<th>
Value Type
</th>
<th>
Meaning
</th>
</tr>
<tr>
<td>
[[ExportName]]
</td>
<td>
String | null
</td>
<td>
The name used to export this binding by this module.
</td>
</tr>
<tr>
<td>
[[ModuleRequest]]
</td>
<td>
String | null
</td>
<td>
The String value of the <emu-nt id="_ref_14002"><a href="#prod-ModuleSpecifier">ModuleSpecifier</a></emu-nt> of the <emu-nt id="_ref_14003"><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt>. <emu-val>null</emu-val> if the <emu-nt id="_ref_14004"><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt> does not have a <emu-nt id="_ref_14005"><a href="#prod-ModuleSpecifier">ModuleSpecifier</a></emu-nt>.
</td>
</tr>
<tr>
<td>
[[ImportName]]
</td>
<td>
String | null
</td>
<td>
The name under which the desired binding is exported by the module identified by [[ModuleRequest]]. <emu-val>null</emu-val> if the <emu-nt id="_ref_14006"><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt> does not have a <emu-nt id="_ref_14007"><a href="#prod-ModuleSpecifier">ModuleSpecifier</a></emu-nt>. <code>"*"</code> indicates that the export request is for all exported bindings.
</td>
</tr>
<tr>
<td>
[[LocalName]]
</td>
<td>
String | null
</td>
<td>
The name that is used to locally access the exported value from within the importing module. <emu-val>null</emu-val> if the exported value is not locally accessible from within the module.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p><emu-xref href="#table-42" id="_ref_381"><a href="#table-42">Table 45</a></emu-xref> gives examples of the ExportEntry record fields used to represent the syntactic export forms:</p>
<emu-table id="table-42" caption="Export Forms Mappings to ExportEntry Records" informative=""><figure><figcaption>Table 45 (Informative): Export Forms Mappings to ExportEntry Records</figcaption>
<table>
<tbody>
<tr>
<th>
Export Statement Form
</th>
<th>
[[ExportName]]
</th>
<th>
[[ModuleRequest]]
</th>
<th>
[[ImportName]]
</th>
<th>
[[LocalName]]
</th>
</tr>
<tr>
<td>
<code>export var v;</code>
</td>
<td>
<code>"v"</code>
</td>
<td>
<emu-val>null</emu-val>
</td>
<td>
<emu-val>null</emu-val>
</td>
<td>
<code>"v"</code>
</td>
</tr>
<tr>
<td>
<code>export default function f(){}</code>
</td>
<td>
<code>"default"</code>
</td>
<td>
<emu-val>null</emu-val>
</td>
<td>
<emu-val>null</emu-val>
</td>
<td>
<code>"f"</code>
</td>
</tr>
<tr>
<td>
<code>export default function(){}</code>
</td>
<td>
<code>"default"</code>
</td>
<td>
<emu-val>null</emu-val>
</td>
<td>
<emu-val>null</emu-val>
</td>
<td>
<code>"*default*"</code>
</td>
</tr>
<tr>
<td>
<code>export default 42;</code>
</td>
<td>
<code>"default"</code>
</td>
<td>
<emu-val>null</emu-val>
</td>
<td>
<emu-val>null</emu-val>
</td>
<td>
<code>"*default*"</code>
</td>
</tr>
<tr>
<td>
<code>export {x};</code>
</td>
<td>
<code>"x"</code>
</td>
<td>
<emu-val>null</emu-val>
</td>
<td>
<emu-val>null</emu-val>
</td>
<td>
<code>"x"</code>
</td>
</tr>
<tr>
<td>
<code>export {v as x};</code>
</td>
<td>
<code>"x"</code>
</td>
<td>
<emu-val>null</emu-val>
</td>
<td>
<emu-val>null</emu-val>
</td>
<td>
<code>"v"</code>
</td>
</tr>
<tr>
<td>
<code>export {x} from "mod";</code>
</td>
<td>
<code>"x"</code>
</td>
<td>
<code>"mod"</code>
</td>
<td>
<code>"x"</code>
</td>
<td>
<emu-val>null</emu-val>
</td>
</tr>
<tr>
<td>
<code>export {v as x} from "mod";</code>
</td>
<td>
<code>"x"</code>
</td>
<td>
<code>"mod"</code>
</td>
<td>
<code>"v"</code>
</td>
<td>
<emu-val>null</emu-val>
</td>
</tr>
<tr>
<td>
<code>export * from "mod";</code>
</td>
<td>
<emu-val>null</emu-val>
</td>
<td>
<code>"mod"</code>
</td>
<td>
<code>"*"</code>
</td>
<td>
<emu-val>null</emu-val>
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
</div></emu-note>
<p>The following definitions specify the required concrete methods and other <emu-xref href="#sec-algorithm-conventions-abstract-operations" id="_ref_4574"><a href="#sec-algorithm-conventions-abstract-operations">abstract operations</a></emu-xref> for Source Text Module Records</p>
<emu-clause id="sec-parsemodule" aoid="ParseModule">
<h1><span class="secnum">15.2.1.17.1</span>ParseModule ( <var>sourceText</var>, <var>realm</var>, <var>hostDefined</var> )</h1>
<p>The abstract operation ParseModule with arguments <var>sourceText</var>, <var>realm</var>, and <var>hostDefined</var> creates a <emu-xref href="#sourctextmodule-record" id="_ref_4575"><a href="#sourctextmodule-record">Source Text Module Record</a></emu-xref> based upon the result of parsing <var>sourceText</var> as a <emu-nt id="_ref_14008"><a href="#prod-Module">Module</a></emu-nt>. ParseModule performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_4576"><a href="#assert">Assert</a></emu-xref>: <var>sourceText</var> is an ECMAScript source text (see clause <emu-xref href="#sec-ecmascript-language-source-code" id="_ref_382"><a href="#sec-ecmascript-language-source-code">10</a></emu-xref>).</li><li>Parse <var>sourceText</var> using <emu-nt id="_ref_14009"><a href="#prod-Module">Module</a></emu-nt> as the <emu-xref href="#sec-context-free-grammars" id="_ref_4577"><a href="#sec-context-free-grammars">goal symbol</a></emu-xref> and analyse the parse result for any Early Error conditions. If the parse was successful and no early errors were found, let <var>body</var> be the resulting parse tree. Otherwise, let <var>body</var> be a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4578"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of one or more <emu-val>SyntaxError</emu-val> or <emu-val>ReferenceError</emu-val> objects representing the parsing errors and/or early errors. Parsing and <emu-xref href="#early-error" id="_ref_4579"><a href="#early-error">early error</a></emu-xref> detection may be interweaved in an implementation-dependent manner. If more than one parsing error or <emu-xref href="#early-error" id="_ref_4580"><a href="#early-error">early error</a></emu-xref> is present, the number and ordering of error objects in the list is implementation-dependent, but at least one must be present.</li><li>If <var>body</var> is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4581"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of errors, return <var>body</var>.</li><li>Let <var>requestedModules</var> be the ModuleRequests of <var>body</var>.</li><li>Let <var>importEntries</var> be ImportEntries of <var>body</var>.</li><li>Let <var>importedBoundNames</var> be <emu-xref aoid="ImportedLocalNames" id="_ref_4582"><a href="#sec-importedlocalnames">ImportedLocalNames</a></emu-xref>(<var>importEntries</var>).</li><li>Let <var>indirectExportEntries</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4583"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>localExportEntries</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4584"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>starExportEntries</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4585"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>exportEntries</var> be ExportEntries of <var>body</var>.</li><li>For each <emu-xref href="#exportentry-record" id="_ref_4586"><a href="#exportentry-record">ExportEntry Record</a></emu-xref> <var>ee</var> in <var>exportEntries</var>, do<ol><li>If <var>ee</var>.[[ModuleRequest]] is <emu-val>null</emu-val>, then<ol><li>If <var>ee</var>.[[LocalName]] is not an element of <var>importedBoundNames</var>, then<ol><li>Append <var>ee</var> to <var>localExportEntries</var>.</li></ol></li><li>Else,<ol><li>Let <var>ie</var> be the element of <var>importEntries</var> whose [[LocalName]] is the same as <var>ee</var>.[[LocalName]].</li><li>If <var>ie</var>.[[ImportName]] is <code>"*"</code>, then<ol><li><emu-xref href="#assert" id="_ref_4587"><a href="#assert">Assert</a></emu-xref>: This is a re-export of an imported module namespace object.</li><li>Append <var>ee</var> to <var>localExportEntries</var>.</li></ol></li><li>Else this is a re-export of a single name,<ol><li>Append the <emu-xref href="#exportentry-record" id="_ref_4588"><a href="#exportentry-record">ExportEntry Record</a></emu-xref> { [[ModuleRequest]]: <var>ie</var>.[[ModuleRequest]], [[ImportName]]: <var>ie</var>.[[ImportName]], [[LocalName]]: <emu-val>null</emu-val>, [[ExportName]]: <var>ee</var>.[[ExportName]] } to <var>indirectExportEntries</var>.</li></ol></li></ol></li></ol></li><li>Else if <var>ee</var>.[[ImportName]] is <code>"*"</code>, then<ol><li>Append <var>ee</var> to <var>starExportEntries</var>.</li></ol></li><li>Else,<ol><li>Append <var>ee</var> to <var>indirectExportEntries</var>.</li></ol></li></ol></li><li>Return <emu-xref href="#sourctextmodule-record" id="_ref_4589"><a href="#sourctextmodule-record">Source Text Module Record</a></emu-xref> { [[Realm]]: <var>realm</var>, [[Environment]]: <emu-val>undefined</emu-val>, [[Namespace]]: <emu-val>undefined</emu-val>, [[Status]]: <code>"uninstantiated"</code>, [[EvaluationError]]: <emu-val>undefined</emu-val>, [[HostDefined]]: <var>hostDefined</var>, [[ECMAScriptCode]]: <var>body</var>, [[RequestedModules]]: <var>requestedModules</var>, [[ImportEntries]]: <var>importEntries</var>, [[LocalExportEntries]]: <var>localExportEntries</var>, [[IndirectExportEntries]]: <var>indirectExportEntries</var>, [[StarExportEntries]]: <var>starExportEntries</var>, [[DFSIndex]]: <emu-val>undefined</emu-val>, [[DFSAncestorIndex]]: <emu-val>undefined</emu-val> }.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>An implementation may parse module source text and
analyse it for Early Error conditions prior to the evaluation of
ParseModule for that module source text. However, the reporting of any
errors must be deferred until the point where this specification
actually performs ParseModule upon that source text.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-getexportednames">
<h1><span class="secnum">15.2.1.17.2</span>GetExportedNames ( <var>exportStarSet</var> ) Concrete Method</h1>
<p>The GetExportedNames concrete method of a <emu-xref href="#sourctextmodule-record" id="_ref_4590"><a href="#sourctextmodule-record">Source Text Module Record</a></emu-xref> implements the corresponding <emu-xref href="#sec-abstract-module-records" id="_ref_4591"><a href="#sec-abstract-module-records">Module Record</a></emu-xref> abstract method.</p>
<p>It performs the following steps:</p>
<emu-alg><ol><li>Let <var>module</var> be this <emu-xref href="#sourctextmodule-record" id="_ref_4592"><a href="#sourctextmodule-record">Source Text Module Record</a></emu-xref>.</li><li>If <var>exportStarSet</var> contains <var>module</var>, then<ol><li><emu-xref href="#assert" id="_ref_4593"><a href="#assert">Assert</a></emu-xref>: We've reached the starting point of an <code>import *</code> circularity.</li><li>Return a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4594"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li></ol></li><li>Append <var>module</var> to <var>exportStarSet</var>.</li><li>Let <var>exportedNames</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4595"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>For each <emu-xref href="#exportentry-record" id="_ref_4596"><a href="#exportentry-record">ExportEntry Record</a></emu-xref> <var>e</var> in <var>module</var>.[[LocalExportEntries]], do<ol><li><emu-xref href="#assert" id="_ref_4597"><a href="#assert">Assert</a></emu-xref>: <var>module</var> provides the direct binding for this export.</li><li>Append <var>e</var>.[[ExportName]] to <var>exportedNames</var>.</li></ol></li><li>For each <emu-xref href="#exportentry-record" id="_ref_4598"><a href="#exportentry-record">ExportEntry Record</a></emu-xref> <var>e</var> in <var>module</var>.[[IndirectExportEntries]], do<ol><li><emu-xref href="#assert" id="_ref_4599"><a href="#assert">Assert</a></emu-xref>: <var>module</var> imports a specific binding for this export.</li><li>Append <var>e</var>.[[ExportName]] to <var>exportedNames</var>.</li></ol></li><li>For each <emu-xref href="#exportentry-record" id="_ref_4600"><a href="#exportentry-record">ExportEntry Record</a></emu-xref> <var>e</var> in <var>module</var>.[[StarExportEntries]], do<ol><li>Let <var>requestedModule</var> be ?&nbsp;<emu-xref aoid="HostResolveImportedModule" id="_ref_4601"><a href="#sec-hostresolveimportedmodule">HostResolveImportedModule</a></emu-xref>(<var>module</var>, <var>e</var>.[[ModuleRequest]]).</li><li>Let <var>starNames</var> be ? <var>requestedModule</var>.GetExportedNames(<var>exportStarSet</var>).</li><li>For each element <var>n</var> of <var>starNames</var>, do<ol><li>If <emu-xref aoid="SameValue" id="_ref_4602"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>n</var>, <code>"default"</code>) is <emu-val>false</emu-val>, then<ol><li>If <var>n</var> is not an element of <var>exportedNames</var>, then<ol><li>Append <var>n</var> to <var>exportedNames</var>.</li></ol></li></ol></li></ol></li></ol></li><li>Return <var>exportedNames</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>GetExportedNames does not filter out or throw an exception for names that have ambiguous star export bindings.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-resolveexport">
<h1><span class="secnum">15.2.1.17.3</span>ResolveExport ( <var>exportName</var>, <var>resolveSet</var> ) Concrete Method</h1>
<p>The ResolveExport concrete method of a <emu-xref href="#sourctextmodule-record" id="_ref_4603"><a href="#sourctextmodule-record">Source Text Module Record</a></emu-xref> implements the corresponding <emu-xref href="#sec-abstract-module-records" id="_ref_4604"><a href="#sec-abstract-module-records">Module Record</a></emu-xref> abstract method.</p>
<p>ResolveExport attempts to resolve an imported binding to
the actual defining module and local binding name. The defining module
may be the module represented by the <emu-xref href="#sec-abstract-module-records" id="_ref_4605"><a href="#sec-abstract-module-records">Module Record</a></emu-xref> this method was invoked on or some other module that is imported by that module. The parameter <var>resolveSet</var> is used to detect unresolved circular import/export paths. If a pair consisting of specific <emu-xref href="#sec-abstract-module-records" id="_ref_4606"><a href="#sec-abstract-module-records">Module Record</a></emu-xref> and <var>exportName</var> is reached that is already in <var>resolveSet</var>, an import circularity has been encountered. Before recursively calling ResolveExport, a pair consisting of <var>module</var> and <var>exportName</var> is added to <var>resolveSet</var>.</p>
<p>If a defining module is found, a <emu-xref href="#resolvedbinding-record" id="_ref_4607"><a href="#resolvedbinding-record">ResolvedBinding Record</a></emu-xref>
{ [[Module]], [[BindingName]] } is returned. This record identifies the
resolved binding of the originally requested export. If no definition
was found or the request is found to be circular, <emu-val>null</emu-val> is returned. If the request is found to be ambiguous, the string <code>"ambiguous"</code> is returned.</p>
<p>This abstract method performs the following steps:</p>
<emu-alg><ol><li>Let <var>module</var> be this <emu-xref href="#sourctextmodule-record" id="_ref_4608"><a href="#sourctextmodule-record">Source Text Module Record</a></emu-xref>.</li><li>For each <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4609"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Module]], [[ExportName]] } <var>r</var> in <var>resolveSet</var>, do<ol><li>If <var>module</var> and <var>r</var>.[[Module]] are the same <emu-xref href="#sec-abstract-module-records" id="_ref_4610"><a href="#sec-abstract-module-records">Module Record</a></emu-xref> and <emu-xref aoid="SameValue" id="_ref_4611"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>exportName</var>, <var>r</var>.[[ExportName]]) is <emu-val>true</emu-val>, then<ol><li><emu-xref href="#assert" id="_ref_4612"><a href="#assert">Assert</a></emu-xref>: This is a circular import request.</li><li>Return <emu-val>null</emu-val>.</li></ol></li></ol></li><li>Append the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4613"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Module]]: <var>module</var>, [[ExportName]]: <var>exportName</var> } to <var>resolveSet</var>.</li><li>For each <emu-xref href="#exportentry-record" id="_ref_4614"><a href="#exportentry-record">ExportEntry Record</a></emu-xref> <var>e</var> in <var>module</var>.[[LocalExportEntries]], do<ol><li>If <emu-xref aoid="SameValue" id="_ref_4615"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>exportName</var>, <var>e</var>.[[ExportName]]) is <emu-val>true</emu-val>, then<ol><li><emu-xref href="#assert" id="_ref_4616"><a href="#assert">Assert</a></emu-xref>: <var>module</var> provides the direct binding for this export.</li><li>Return <emu-xref href="#resolvedbinding-record" id="_ref_4617"><a href="#resolvedbinding-record">ResolvedBinding Record</a></emu-xref> { [[Module]]: <var>module</var>, [[BindingName]]: <var>e</var>.[[LocalName]] }.</li></ol></li></ol></li><li>For each <emu-xref href="#exportentry-record" id="_ref_4618"><a href="#exportentry-record">ExportEntry Record</a></emu-xref> <var>e</var> in <var>module</var>.[[IndirectExportEntries]], do<ol><li>If <emu-xref aoid="SameValue" id="_ref_4619"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>exportName</var>, <var>e</var>.[[ExportName]]) is <emu-val>true</emu-val>, then<ol><li><emu-xref href="#assert" id="_ref_4620"><a href="#assert">Assert</a></emu-xref>: <var>module</var> imports a specific binding for this export.</li><li>Let <var>importedModule</var> be ?&nbsp;<emu-xref aoid="HostResolveImportedModule" id="_ref_4621"><a href="#sec-hostresolveimportedmodule">HostResolveImportedModule</a></emu-xref>(<var>module</var>, <var>e</var>.[[ModuleRequest]]).</li><li>Return <var>importedModule</var>.ResolveExport(<var>e</var>.[[ImportName]], <var>resolveSet</var>).</li></ol></li></ol></li><li>If <emu-xref aoid="SameValue" id="_ref_4622"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>exportName</var>, <code>"default"</code>) is <emu-val>true</emu-val>, then<ol><li><emu-xref href="#assert" id="_ref_4623"><a href="#assert">Assert</a></emu-xref>: A <code>default</code> export was not explicitly defined by this module.</li><li>Return <emu-val>null</emu-val>.</li><li>NOTE: A <code>default</code> export cannot be provided by an <code>export *</code>.</li></ol></li><li>Let <var>starResolution</var> be <emu-val>null</emu-val>.</li><li>For each <emu-xref href="#exportentry-record" id="_ref_4624"><a href="#exportentry-record">ExportEntry Record</a></emu-xref> <var>e</var> in <var>module</var>.[[StarExportEntries]], do<ol><li>Let <var>importedModule</var> be ?&nbsp;<emu-xref aoid="HostResolveImportedModule" id="_ref_4625"><a href="#sec-hostresolveimportedmodule">HostResolveImportedModule</a></emu-xref>(<var>module</var>, <var>e</var>.[[ModuleRequest]]).</li><li>Let <var>resolution</var> be ? <var>importedModule</var>.ResolveExport(<var>exportName</var>, <var>resolveSet</var>).</li><li>If <var>resolution</var> is <code>"ambiguous"</code>, return <code>"ambiguous"</code>.</li><li>If <var>resolution</var> is not <emu-val>null</emu-val>, then<ol><li><emu-xref href="#assert" id="_ref_4626"><a href="#assert">Assert</a></emu-xref>: <var>resolution</var> is a <emu-xref href="#resolvedbinding-record" id="_ref_4627"><a href="#resolvedbinding-record">ResolvedBinding Record</a></emu-xref>.</li><li>If <var>starResolution</var> is <emu-val>null</emu-val>, set <var>starResolution</var> to <var>resolution</var>.</li><li>Else,<ol><li><emu-xref href="#assert" id="_ref_4628"><a href="#assert">Assert</a></emu-xref>: There is more than one <code>*</code> import that includes the requested name.</li><li>If <var>resolution</var>.[[Module]] and <var>starResolution</var>.[[Module]] are not the same <emu-xref href="#sec-abstract-module-records" id="_ref_4629"><a href="#sec-abstract-module-records">Module Record</a></emu-xref> or <emu-xref aoid="SameValue" id="_ref_4630"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>resolution</var>.[[BindingName]], <var>starResolution</var>.[[BindingName]]) is <emu-val>false</emu-val>, return <code>"ambiguous"</code>.</li></ol></li></ol></li></ol></li><li>Return <var>starResolution</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-source-text-module-record-initialize-environment" aoid="InitializeEnvironment">
<h1><span class="secnum">15.2.1.17.4</span>InitializeEnvironment ( ) Concrete Method</h1>
<p>The InitializeEnvironment concrete method of a <emu-xref href="#sourctextmodule-record" id="_ref_4631"><a href="#sourctextmodule-record">Source Text Module Record</a></emu-xref> implements the corresponding <emu-xref href="#cyclic-module-record" id="_ref_4632"><a href="#cyclic-module-record">Cyclic Module Record</a></emu-xref> abstract method.</p>
<p>This abstract method performs the following steps:</p>
<emu-alg><ol><li>Let <var>module</var> be this <emu-xref href="#sourctextmodule-record" id="_ref_4633"><a href="#sourctextmodule-record">Source Text Module Record</a></emu-xref>.</li><li>For each <emu-xref href="#exportentry-record" id="_ref_4634"><a href="#exportentry-record">ExportEntry Record</a></emu-xref> <var>e</var> in <var>module</var>.[[IndirectExportEntries]], do<ol><li>Let <var>resolution</var> be ? <var>module</var>.ResolveExport(<var>e</var>.[[ExportName]], « »).</li><li>If <var>resolution</var> is <emu-val>null</emu-val> or <code>"ambiguous"</code>, throw a <emu-val>SyntaxError</emu-val> exception.</li><li><emu-xref href="#assert" id="_ref_4635"><a href="#assert">Assert</a></emu-xref>: <var>resolution</var> is a <emu-xref href="#resolvedbinding-record" id="_ref_4636"><a href="#resolvedbinding-record">ResolvedBinding Record</a></emu-xref>.</li></ol></li><li><emu-xref href="#assert" id="_ref_4637"><a href="#assert">Assert</a></emu-xref>: All named exports from <var>module</var> are resolvable.</li><li>Let <var>realm</var> be <var>module</var>.[[Realm]].</li><li><emu-xref href="#assert" id="_ref_4638"><a href="#assert">Assert</a></emu-xref>: <var>realm</var> is not <emu-val>undefined</emu-val>.</li><li>Let <var>env</var> be <emu-xref aoid="NewModuleEnvironment" id="_ref_4639"><a href="#sec-newmoduleenvironment">NewModuleEnvironment</a></emu-xref>(<var>realm</var>.[[GlobalEnv]]).</li><li>Set <var>module</var>.[[Environment]] to <var>env</var>.</li><li>Let <var>envRec</var> be <var>env</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_4640"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref>.</li><li>For each <emu-xref href="#importentry-record" id="_ref_4641"><a href="#importentry-record">ImportEntry Record</a></emu-xref> <var>in</var> in <var>module</var>.[[ImportEntries]], do<ol><li>Let <var>importedModule</var> be !&nbsp;<emu-xref aoid="HostResolveImportedModule" id="_ref_4642"><a href="#sec-hostresolveimportedmodule">HostResolveImportedModule</a></emu-xref>(<var>module</var>, <var>in</var>.[[ModuleRequest]]).</li><li>NOTE: The above call cannot fail because imported module requests are a subset of <var>module</var>.[[RequestedModules]], and these have been resolved earlier in this algorithm.</li><li>If <var>in</var>.[[ImportName]] is <code>"*"</code>, then<ol><li>Let <var>namespace</var> be ?&nbsp;<emu-xref aoid="GetModuleNamespace" id="_ref_4643"><a href="#sec-getmodulenamespace">GetModuleNamespace</a></emu-xref>(<var>importedModule</var>).</li><li>Perform ! <var>envRec</var>.CreateImmutableBinding(<var>in</var>.[[LocalName]], <emu-val>true</emu-val>).</li><li>Call <var>envRec</var>.InitializeBinding(<var>in</var>.[[LocalName]], <var>namespace</var>).</li></ol></li><li>Else,<ol><li>Let <var>resolution</var> be ? <var>importedModule</var>.ResolveExport(<var>in</var>.[[ImportName]], « »).</li><li>If <var>resolution</var> is <emu-val>null</emu-val> or <code>"ambiguous"</code>, throw a <emu-val>SyntaxError</emu-val> exception.</li><li>Call <var>envRec</var>.CreateImportBinding(<var>in</var>.[[LocalName]], <var>resolution</var>.[[Module]], <var>resolution</var>.[[BindingName]]).</li></ol></li></ol></li><li>Let <var>code</var> be <var>module</var>.[[ECMAScriptCode]].</li><li>Let <var>varDeclarations</var> be the VarScopedDeclarations of <var>code</var>.</li><li>Let <var>declaredVarNames</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4644"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>For each element <var>d</var> in <var>varDeclarations</var>, do<ol><li>For each element <var>dn</var> of the BoundNames of <var>d</var>, do<ol><li>If <var>dn</var> is not an element of <var>declaredVarNames</var>, then<ol><li>Perform ! <var>envRec</var>.CreateMutableBinding(<var>dn</var>, <emu-val>false</emu-val>).</li><li>Call <var>envRec</var>.InitializeBinding(<var>dn</var>, <emu-val>undefined</emu-val>).</li><li>Append <var>dn</var> to <var>declaredVarNames</var>.</li></ol></li></ol></li></ol></li><li>Let <var>lexDeclarations</var> be the LexicallyScopedDeclarations of <var>code</var>.</li><li>For each element <var>d</var> in <var>lexDeclarations</var>, do<ol><li>For each element <var>dn</var> of the BoundNames of <var>d</var>, do<ol><li>If IsConstantDeclaration of <var>d</var> is <emu-val>true</emu-val>, then<ol><li>Perform ! <var>envRec</var>.CreateImmutableBinding(<var>dn</var>, <emu-val>true</emu-val>).</li></ol></li><li>Else,<ol><li>Perform ! <var>envRec</var>.CreateMutableBinding(<var>dn</var>, <emu-val>false</emu-val>).</li></ol></li><li>If <var>d</var> is a <emu-nt id="_ref_14010"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>, a <emu-nt id="_ref_14011"><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a></emu-nt>, an <emu-nt id="_ref_14012"><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt>, or an <emu-nt id="_ref_14013"><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt>, then<ol><li>Let <var>fo</var> be the result of performing InstantiateFunctionObject for <var>d</var> with argument <var>env</var>.</li><li>Call <var>envRec</var>.InitializeBinding(<var>dn</var>, <var>fo</var>).</li></ol></li></ol></li></ol></li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_4645"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-source-text-module-record-execute-module" aoid="ExecuteModule">
<h1><span class="secnum">15.2.1.17.5</span>ExecuteModule ( ) Concrete Method</h1>
<p>The ExecuteModule concrete method of a <emu-xref href="#sourctextmodule-record" id="_ref_4646"><a href="#sourctextmodule-record">Source Text Module Record</a></emu-xref> implements the corresponding <emu-xref href="#cyclic-module-record" id="_ref_4647"><a href="#cyclic-module-record">Cyclic Module Record</a></emu-xref> abstract method.</p>
<p>This abstract method performs the following steps:</p>
<emu-alg><ol><li>Let <var>module</var> be this <emu-xref href="#sourctextmodule-record" id="_ref_4648"><a href="#sourctextmodule-record">Source Text Module Record</a></emu-xref>.</li><li>Let <var>moduleCxt</var> be a new ECMAScript code <emu-xref href="#sec-execution-contexts" id="_ref_4649"><a href="#sec-execution-contexts">execution context</a></emu-xref>.</li><li>Set the Function of <var>moduleCxt</var> to <emu-val>null</emu-val>.</li><li><emu-xref href="#assert" id="_ref_4650"><a href="#assert">Assert</a></emu-xref>: <var>module</var>.[[Realm]] is not <emu-val>undefined</emu-val>.</li><li>Set the <emu-xref href="#realm" id="_ref_4651"><a href="#realm">Realm</a></emu-xref> of <var>moduleCxt</var> to <var>module</var>.[[Realm]].</li><li>Set the ScriptOrModule of <var>moduleCxt</var> to <var>module</var>.</li><li><emu-xref href="#assert" id="_ref_4652"><a href="#assert">Assert</a></emu-xref>: <var>module</var> has been linked and declarations in its <emu-xref href="#module-environment" id="_ref_4653"><a href="#module-environment">module environment</a></emu-xref> have been instantiated.</li><li>Set the VariableEnvironment of <var>moduleCxt</var> to <var>module</var>.[[Environment]].</li><li>Set the LexicalEnvironment of <var>moduleCxt</var> to <var>module</var>.[[Environment]].</li><li><emu-xref aoid="Suspend" id="_ref_4654"><a href="#sec-suspend">Suspend</a></emu-xref> the currently <emu-xref href="#running-execution-context" id="_ref_4655"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Push <var>moduleCxt</var> on to the <emu-xref href="#execution-context-stack" id="_ref_4656"><a href="#execution-context-stack">execution context stack</a></emu-xref>; <var>moduleCxt</var> is now the <emu-xref href="#running-execution-context" id="_ref_4657"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Let <var>result</var> be the result of evaluating <var>module</var>.[[ECMAScriptCode]].</li><li><emu-xref aoid="Suspend" id="_ref_4658"><a href="#sec-suspend">Suspend</a></emu-xref> <var>moduleCxt</var> and remove it from the <emu-xref href="#execution-context-stack" id="_ref_4659"><a href="#execution-context-stack">execution context stack</a></emu-xref>.</li><li>Resume the context that is now on the top of the <emu-xref href="#execution-context-stack" id="_ref_4660"><a href="#execution-context-stack">execution context stack</a></emu-xref> as the <emu-xref href="#running-execution-context" id="_ref_4661"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Return <emu-xref aoid="Completion" id="_ref_4662"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>result</var>).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-hostresolveimportedmodule" aoid="HostResolveImportedModule">
<h1><span class="secnum">15.2.1.18</span>Runtime Semantics: HostResolveImportedModule ( <var>referencingModule</var>, <var>specifier</var> )</h1>
<p>HostResolveImportedModule is an implementation-defined abstract operation that provides the concrete <emu-xref href="#sec-abstract-module-records" id="_ref_4663"><a href="#sec-abstract-module-records">Module Record</a></emu-xref> subclass instance that corresponds to the <emu-nt id="_ref_14014"><a href="#prod-ModuleSpecifier">ModuleSpecifier</a></emu-nt> String, <var>specifier</var>, occurring within the context of the module represented by the <emu-xref href="#sec-abstract-module-records" id="_ref_4664"><a href="#sec-abstract-module-records">Module Record</a></emu-xref> <var>referencingModule</var>.</p>
<p>The implementation of HostResolveImportedModule must conform to the following requirements:</p>
<ul>
<li>
The normal return value must be an instance of a concrete subclass of <emu-xref href="#sec-abstract-module-records" id="_ref_4665"><a href="#sec-abstract-module-records">Module Record</a></emu-xref>.
</li>
<li>
If a <emu-xref href="#sec-abstract-module-records" id="_ref_4666"><a href="#sec-abstract-module-records">Module Record</a></emu-xref> corresponding to the pair <var>referencingModule</var>, <var>specifier</var> does not exist or cannot be created, an exception must be thrown.
</li>
<li>
This operation must be idempotent if it completes normally. Each time it is called with a specific <var>referencingModule</var>, <var>specifier</var> pair as arguments it must return the same <emu-xref href="#sec-abstract-module-records" id="_ref_4667"><a href="#sec-abstract-module-records">Module Record</a></emu-xref> instance.
</li>
</ul>
<p>Multiple different <var>referencingModule</var>, <var>specifier</var> pairs may map to the same <emu-xref href="#sec-abstract-module-records" id="_ref_4668"><a href="#sec-abstract-module-records">Module Record</a></emu-xref> instance. The actual mapping semantic is implementation-defined but typically a normalization process is applied to <var>specifier</var>
as part of the mapping process. A typical normalization process would
include actions such as alphabetic case folding and expansion of
relative and abbreviated path specifiers.</p>
</emu-clause>
<emu-clause id="sec-getmodulenamespace" aoid="GetModuleNamespace">
<h1><span class="secnum">15.2.1.19</span>Runtime Semantics: GetModuleNamespace ( <var>module</var> )</h1>
<p>The GetModuleNamespace abstract operation retrieves the Module Namespace <emu-xref href="#exotic-object" id="_ref_4669"><a href="#exotic-object">Exotic object</a></emu-xref> representing <var>module</var>'s exports, lazily creating it the first time it was requested, and storing it in <var>module</var>.[[Namespace]] for future retrieval.</p>
<p>This abstract operation performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_4670"><a href="#assert">Assert</a></emu-xref>: <var>module</var> is an instance of a concrete subclass of <emu-xref href="#sec-abstract-module-records" id="_ref_4671"><a href="#sec-abstract-module-records">Module Record</a></emu-xref>.</li><li><emu-xref href="#assert" id="_ref_4672"><a href="#assert">Assert</a></emu-xref>: <var>module</var>.[[Status]] is not <code>"uninstantiated"</code>.</li><li>Let <var>namespace</var> be <var>module</var>.[[Namespace]].</li><li>If <var>namespace</var> is <emu-val>undefined</emu-val>, then<ol><li>Let <var>exportedNames</var> be ? <var>module</var>.GetExportedNames(« »).</li><li>Let <var>unambiguousNames</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4673"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>For each <var>name</var> that is an element of <var>exportedNames</var>, do<ol><li>Let <var>resolution</var> be ? <var>module</var>.ResolveExport(<var>name</var>, « »).</li><li>If <var>resolution</var> is a <emu-xref href="#resolvedbinding-record" id="_ref_4674"><a href="#resolvedbinding-record">ResolvedBinding Record</a></emu-xref>, append <var>name</var> to <var>unambiguousNames</var>.</li></ol></li><li>Set <var>namespace</var> to <emu-xref aoid="ModuleNamespaceCreate" id="_ref_4675"><a href="#sec-modulenamespacecreate">ModuleNamespaceCreate</a></emu-xref>(<var>module</var>, <var>unambiguousNames</var>).</li></ol></li><li>Return <var>namespace</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The only way GetModuleNamespace can throw is via one of the triggered <emu-xref aoid="HostResolveImportedModule" id="_ref_4676"><a href="#sec-hostresolveimportedmodule">HostResolveImportedModule</a></emu-xref>
calls. Unresolvable names are simply excluded from the namespace at
this point. They will lead to a real instantiation error later unless
they are all ambiguous star exports that are not explicitly requested
anywhere.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-toplevelmoduleevaluationjob" aoid="TopLevelModuleEvaluationJob">
<h1><span class="secnum">15.2.1.20</span>Runtime Semantics: TopLevelModuleEvaluationJob ( <var>sourceText</var>, <var>hostDefined</var> )</h1>
<p>A TopLevelModuleEvaluationJob with parameters <var>sourceText</var> and <var>hostDefined</var> is a job that parses, validates, and evaluates <var>sourceText</var> as a <emu-nt id="_ref_14015"><a href="#prod-Module">Module</a></emu-nt>.</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_4677"><a href="#assert">Assert</a></emu-xref>: <var>sourceText</var> is an ECMAScript source text (see clause <emu-xref href="#sec-ecmascript-language-source-code" id="_ref_383"><a href="#sec-ecmascript-language-source-code">10</a></emu-xref>).</li><li>Let <var>realm</var> be <emu-xref href="#current-realm" id="_ref_4678"><a href="#current-realm">the current Realm Record</a></emu-xref>.</li><li>Let <var>m</var> be <emu-xref aoid="ParseModule" id="_ref_4679"><a href="#sec-parsemodule">ParseModule</a></emu-xref>(<var>sourceText</var>, <var>realm</var>, <var>hostDefined</var>).</li><li>If <var>m</var> is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4680"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of errors, then<ol><li>Perform <emu-xref aoid="HostReportErrors" id="_ref_4681"><a href="#sec-host-report-errors">HostReportErrors</a></emu-xref>(<var>m</var>).</li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_4682"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-val>undefined</emu-val>).</li></ol></li><li>Perform ? <var>m</var>.Instantiate().</li><li><emu-xref href="#assert" id="_ref_4683"><a href="#assert">Assert</a></emu-xref>: All dependencies of <var>m</var> have been transitively resolved and <var>m</var> is ready for evaluation.</li><li>Return ? <var>m</var>.Evaluate().
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>An implementation may parse a <var>sourceText</var> as a <emu-nt id="_ref_14016"><a href="#prod-Module">Module</a></emu-nt>, analyse it for Early Error conditions, and instantiate it prior to the execution of the TopLevelModuleEvaluationJob for that <var>sourceText</var>. An implementation may also resolve, pre-parse and pre-analyse, and pre-instantiate module dependencies of <var>sourceText</var>.
However, the reporting of any errors detected by these actions must be
deferred until the TopLevelModuleEvaluationJob is actually executed.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-module-semantics-runtime-semantics-evaluation">
<h1><span class="secnum">15.2.1.21</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="Module" collapsed="">
<emu-nt><a href="#prod-Module">Module</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-xref aoid="NormalCompletion" id="_ref_4684"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-val>undefined</emu-val>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="ModuleBody" collapsed="">
<emu-nt><a href="#prod-ModuleBody">ModuleBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="89010d7d"><emu-nt id="_ref_14017"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>result</var> be the result of evaluating <emu-nt id="_ref_14018"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt>.</li><li>If <var>result</var>.[[Type]] is <emu-const>normal</emu-const> and <var>result</var>.[[Value]] is <emu-const>empty</emu-const>, then<ol><li>Return <emu-xref aoid="NormalCompletion" id="_ref_4685"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-val>undefined</emu-val>).</li></ol></li><li>Return <emu-xref aoid="Completion" id="_ref_4686"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>result</var>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="ModuleItemList" collapsed="">
<emu-nt><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="75ddb725"><emu-nt id="_ref_14019"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt><emu-nt id="_ref_14020"><a href="#prod-ModuleItem">ModuleItem</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>sl</var> be the result of evaluating <emu-nt id="_ref_14021"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_4687"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>sl</var>).</li><li>Let <var>s</var> be the result of evaluating <emu-nt id="_ref_14022"><a href="#prod-ModuleItem">ModuleItem</a></emu-nt>.</li><li>Return <emu-xref aoid="Completion" id="_ref_4688"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<emu-xref aoid="UpdateEmpty" id="_ref_4689"><a href="#sec-updateempty">UpdateEmpty</a></emu-xref>(<var>s</var>, <var>sl</var>)).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The value of a <emu-nt id="_ref_14023"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt> is the value of the last value-producing item in the <emu-nt id="_ref_14024"><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt>.</p>
</div></emu-note>
<emu-grammar><emu-production name="ModuleItem" collapsed="">
<emu-nt><a href="#prod-ModuleItem">ModuleItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e0559377"><emu-nt id="_ref_14025"><a href="#prod-ImportDeclaration">ImportDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-xref aoid="NormalCompletion" id="_ref_4690"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-imports">
<h1><span class="secnum">15.2.2</span>Imports</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="ImportDeclaration" id="prod-ImportDeclaration">
<emu-nt><a href="#prod-ImportDeclaration">ImportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1a51d4c5"><emu-t>import</emu-t><emu-nt id="_ref_14026"><a href="#prod-ImportClause">ImportClause</a></emu-nt><emu-nt id="_ref_14027"><a href="#prod-FromClause">FromClause</a></emu-nt><emu-t>;</emu-t></emu-rhs>
<emu-rhs a="a1d094cc"><emu-t>import</emu-t><emu-nt id="_ref_14028"><a href="#prod-ModuleSpecifier">ModuleSpecifier</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production>
<emu-production name="ImportClause" id="prod-ImportClause">
<emu-nt><a href="#prod-ImportClause">ImportClause</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="3a2f22cc"><emu-nt id="_ref_14029"><a href="#prod-ImportedDefaultBinding">ImportedDefaultBinding</a></emu-nt></emu-rhs>
<emu-rhs a="f35b66f8"><emu-nt id="_ref_14030"><a href="#prod-NameSpaceImport">NameSpaceImport</a></emu-nt></emu-rhs>
<emu-rhs a="cdf0063c"><emu-nt id="_ref_14031"><a href="#prod-NamedImports">NamedImports</a></emu-nt></emu-rhs>
<emu-rhs a="cbd47597"><emu-nt id="_ref_14032"><a href="#prod-ImportedDefaultBinding">ImportedDefaultBinding</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_14033"><a href="#prod-NameSpaceImport">NameSpaceImport</a></emu-nt></emu-rhs>
<emu-rhs a="8a1f1182"><emu-nt id="_ref_14034"><a href="#prod-ImportedDefaultBinding">ImportedDefaultBinding</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_14035"><a href="#prod-NamedImports">NamedImports</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ImportedDefaultBinding" id="prod-ImportedDefaultBinding">
<emu-nt><a href="#prod-ImportedDefaultBinding">ImportedDefaultBinding</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="bedec05a"><emu-nt id="_ref_14036"><a href="#prod-ImportedBinding">ImportedBinding</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="NameSpaceImport" id="prod-NameSpaceImport">
<emu-nt><a href="#prod-NameSpaceImport">NameSpaceImport</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b7641ff3"><emu-t>*</emu-t><emu-t>as</emu-t><emu-nt id="_ref_14037"><a href="#prod-ImportedBinding">ImportedBinding</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="NamedImports" id="prod-NamedImports">
<emu-nt><a href="#prod-NamedImports">NamedImports</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><emu-t>{</emu-t><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="835252f8"><emu-t>{</emu-t><emu-nt id="_ref_14038"><a href="#prod-ImportsList">ImportsList</a></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="6f18d3a2"><emu-t>{</emu-t><emu-nt id="_ref_14039"><a href="#prod-ImportsList">ImportsList</a></emu-nt><emu-t>,</emu-t><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="FromClause" id="prod-FromClause">
<emu-nt><a href="#prod-FromClause">FromClause</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ac457a7a"><emu-t>from</emu-t><emu-nt id="_ref_14040"><a href="#prod-ModuleSpecifier">ModuleSpecifier</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ImportsList" id="prod-ImportsList">
<emu-nt><a href="#prod-ImportsList">ImportsList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5292cb55"><emu-nt id="_ref_14041"><a href="#prod-ImportSpecifier">ImportSpecifier</a></emu-nt></emu-rhs>
<emu-rhs a="82009fbc"><emu-nt id="_ref_14042"><a href="#prod-ImportsList">ImportsList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_14043"><a href="#prod-ImportSpecifier">ImportSpecifier</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ImportSpecifier" id="prod-ImportSpecifier">
<emu-nt><a href="#prod-ImportSpecifier">ImportSpecifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="bedec05a"><emu-nt id="_ref_14044"><a href="#prod-ImportedBinding">ImportedBinding</a></emu-nt></emu-rhs>
<emu-rhs a="38da6908"><emu-nt id="_ref_14045"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt><emu-t>as</emu-t><emu-nt id="_ref_14046"><a href="#prod-ImportedBinding">ImportedBinding</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ModuleSpecifier" id="prod-ModuleSpecifier">
<emu-nt><a href="#prod-ModuleSpecifier">ModuleSpecifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5c74e54d"><emu-nt id="_ref_14047"><a href="#prod-StringLiteral">StringLiteral</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ImportedBinding" id="prod-ImportedBinding">
<emu-nt><a href="#prod-ImportedBinding">ImportedBinding</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="06cca55e"><emu-nt params="~Yield, ~Await" id="_ref_14048"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-clause id="sec-imports-static-semantics-early-errors">
<h1><span class="secnum">15.2.2.1</span>Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="ModuleItem" collapsed="">
<emu-nt><a href="#prod-ModuleItem">ModuleItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e0559377"><emu-nt id="_ref_14049"><a href="#prod-ImportDeclaration">ImportDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if the BoundNames of <emu-nt id="_ref_14050"><a href="#prod-ImportDeclaration">ImportDeclaration</a></emu-nt> contains any duplicate entries.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-imports-static-semantics-boundnames">
<h1><span class="secnum">15.2.2.2</span>Static Semantics: BoundNames</h1>
<emu-see-also-para op="BoundNames"></emu-see-also-para>
<emu-grammar><emu-production name="ImportDeclaration" collapsed="">
<emu-nt><a href="#prod-ImportDeclaration">ImportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1a51d4c5"><emu-t>import</emu-t><emu-nt id="_ref_14051"><a href="#prod-ImportClause">ImportClause</a></emu-nt><emu-nt id="_ref_14052"><a href="#prod-FromClause">FromClause</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the BoundNames of <emu-nt id="_ref_14053"><a href="#prod-ImportClause">ImportClause</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ImportDeclaration" collapsed="">
<emu-nt><a href="#prod-ImportDeclaration">ImportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a1d094cc"><emu-t>import</emu-t><emu-nt id="_ref_14054"><a href="#prod-ModuleSpecifier">ModuleSpecifier</a></emu-nt><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_4691"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ImportClause" collapsed="">
<emu-nt><a href="#prod-ImportClause">ImportClause</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cbd47597"><emu-nt id="_ref_14055"><a href="#prod-ImportedDefaultBinding">ImportedDefaultBinding</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_14056"><a href="#prod-NameSpaceImport">NameSpaceImport</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>names</var> be the BoundNames of <emu-nt id="_ref_14057"><a href="#prod-ImportedDefaultBinding">ImportedDefaultBinding</a></emu-nt>.</li><li>Append to <var>names</var> the elements of the BoundNames of <emu-nt id="_ref_14058"><a href="#prod-NameSpaceImport">NameSpaceImport</a></emu-nt>.</li><li>Return <var>names</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ImportClause" collapsed="">
<emu-nt><a href="#prod-ImportClause">ImportClause</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8a1f1182"><emu-nt id="_ref_14059"><a href="#prod-ImportedDefaultBinding">ImportedDefaultBinding</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_14060"><a href="#prod-NamedImports">NamedImports</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>names</var> be the BoundNames of <emu-nt id="_ref_14061"><a href="#prod-ImportedDefaultBinding">ImportedDefaultBinding</a></emu-nt>.</li><li>Append to <var>names</var> the elements of the BoundNames of <emu-nt id="_ref_14062"><a href="#prod-NamedImports">NamedImports</a></emu-nt>.</li><li>Return <var>names</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="NamedImports" collapsed="">
<emu-nt><a href="#prod-NamedImports">NamedImports</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><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_4692"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ImportsList" collapsed="">
<emu-nt><a href="#prod-ImportsList">ImportsList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="82009fbc"><emu-nt id="_ref_14063"><a href="#prod-ImportsList">ImportsList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_14064"><a href="#prod-ImportSpecifier">ImportSpecifier</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>names</var> be the BoundNames of <emu-nt id="_ref_14065"><a href="#prod-ImportsList">ImportsList</a></emu-nt>.</li><li>Append to <var>names</var> the elements of the BoundNames of <emu-nt id="_ref_14066"><a href="#prod-ImportSpecifier">ImportSpecifier</a></emu-nt>.</li><li>Return <var>names</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ImportSpecifier" collapsed="">
<emu-nt><a href="#prod-ImportSpecifier">ImportSpecifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="38da6908"><emu-nt id="_ref_14067"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt><emu-t>as</emu-t><emu-nt id="_ref_14068"><a href="#prod-ImportedBinding">ImportedBinding</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the BoundNames of <emu-nt id="_ref_14069"><a href="#prod-ImportedBinding">ImportedBinding</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-imports-static-semantics-importentries">
<h1><span class="secnum">15.2.2.3</span>Static Semantics: ImportEntries</h1>
<emu-see-also-para op="ImportEntries"></emu-see-also-para>
<emu-grammar><emu-production name="ImportDeclaration" collapsed="">
<emu-nt><a href="#prod-ImportDeclaration">ImportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1a51d4c5"><emu-t>import</emu-t><emu-nt id="_ref_14070"><a href="#prod-ImportClause">ImportClause</a></emu-nt><emu-nt id="_ref_14071"><a href="#prod-FromClause">FromClause</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>module</var> be the sole element of ModuleRequests of <emu-nt id="_ref_14072"><a href="#prod-FromClause">FromClause</a></emu-nt>.</li><li>Return ImportEntriesForModule of <emu-nt id="_ref_14073"><a href="#prod-ImportClause">ImportClause</a></emu-nt> with argument <var>module</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ImportDeclaration" collapsed="">
<emu-nt><a href="#prod-ImportDeclaration">ImportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a1d094cc"><emu-t>import</emu-t><emu-nt id="_ref_14074"><a href="#prod-ModuleSpecifier">ModuleSpecifier</a></emu-nt><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_4693"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-static-semantics-importentriesformodule">
<h1><span class="secnum">15.2.2.4</span>Static Semantics: ImportEntriesForModule</h1>
<p>With parameter <var>module</var>.</p>
<emu-grammar><emu-production name="ImportClause" collapsed="">
<emu-nt><a href="#prod-ImportClause">ImportClause</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cbd47597"><emu-nt id="_ref_14075"><a href="#prod-ImportedDefaultBinding">ImportedDefaultBinding</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_14076"><a href="#prod-NameSpaceImport">NameSpaceImport</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>entries</var> be ImportEntriesForModule of <emu-nt id="_ref_14077"><a href="#prod-ImportedDefaultBinding">ImportedDefaultBinding</a></emu-nt> with argument <var>module</var>.</li><li>Append to <var>entries</var> the elements of the ImportEntriesForModule of <emu-nt id="_ref_14078"><a href="#prod-NameSpaceImport">NameSpaceImport</a></emu-nt> with argument <var>module</var>.</li><li>Return <var>entries</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ImportClause" collapsed="">
<emu-nt><a href="#prod-ImportClause">ImportClause</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8a1f1182"><emu-nt id="_ref_14079"><a href="#prod-ImportedDefaultBinding">ImportedDefaultBinding</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_14080"><a href="#prod-NamedImports">NamedImports</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>entries</var> be ImportEntriesForModule of <emu-nt id="_ref_14081"><a href="#prod-ImportedDefaultBinding">ImportedDefaultBinding</a></emu-nt> with argument <var>module</var>.</li><li>Append to <var>entries</var> the elements of the ImportEntriesForModule of <emu-nt id="_ref_14082"><a href="#prod-NamedImports">NamedImports</a></emu-nt> with argument <var>module</var>.</li><li>Return <var>entries</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ImportedDefaultBinding" collapsed="">
<emu-nt><a href="#prod-ImportedDefaultBinding">ImportedDefaultBinding</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="bedec05a"><emu-nt id="_ref_14083"><a href="#prod-ImportedBinding">ImportedBinding</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>localName</var> be the sole element of BoundNames of <emu-nt id="_ref_14084"><a href="#prod-ImportedBinding">ImportedBinding</a></emu-nt>.</li><li>Let <var>defaultEntry</var> be the <emu-xref href="#importentry-record" id="_ref_4694"><a href="#importentry-record">ImportEntry Record</a></emu-xref> { [[ModuleRequest]]: <var>module</var>, [[ImportName]]: <code>"default"</code>, [[LocalName]]: <var>localName</var> }.</li><li>Return a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4695"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing <var>defaultEntry</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="NameSpaceImport" collapsed="">
<emu-nt><a href="#prod-NameSpaceImport">NameSpaceImport</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b7641ff3"><emu-t>*</emu-t><emu-t>as</emu-t><emu-nt id="_ref_14085"><a href="#prod-ImportedBinding">ImportedBinding</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>localName</var> be the StringValue of <emu-nt id="_ref_14086"><a href="#prod-ImportedBinding">ImportedBinding</a></emu-nt>.</li><li>Let <var>entry</var> be the <emu-xref href="#importentry-record" id="_ref_4696"><a href="#importentry-record">ImportEntry Record</a></emu-xref> { [[ModuleRequest]]: <var>module</var>, [[ImportName]]: <code>"*"</code>, [[LocalName]]: <var>localName</var> }.</li><li>Return a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4697"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing <var>entry</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="NamedImports" collapsed="">
<emu-nt><a href="#prod-NamedImports">NamedImports</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><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_4698"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ImportsList" collapsed="">
<emu-nt><a href="#prod-ImportsList">ImportsList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="82009fbc"><emu-nt id="_ref_14087"><a href="#prod-ImportsList">ImportsList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_14088"><a href="#prod-ImportSpecifier">ImportSpecifier</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>specs</var> be the ImportEntriesForModule of <emu-nt id="_ref_14089"><a href="#prod-ImportsList">ImportsList</a></emu-nt> with argument <var>module</var>.</li><li>Append to <var>specs</var> the elements of the ImportEntriesForModule of <emu-nt id="_ref_14090"><a href="#prod-ImportSpecifier">ImportSpecifier</a></emu-nt> with argument <var>module</var>.</li><li>Return <var>specs</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ImportSpecifier" collapsed="">
<emu-nt><a href="#prod-ImportSpecifier">ImportSpecifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="bedec05a"><emu-nt id="_ref_14091"><a href="#prod-ImportedBinding">ImportedBinding</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>localName</var> be the sole element of BoundNames of <emu-nt id="_ref_14092"><a href="#prod-ImportedBinding">ImportedBinding</a></emu-nt>.</li><li>Let <var>entry</var> be the <emu-xref href="#importentry-record" id="_ref_4699"><a href="#importentry-record">ImportEntry Record</a></emu-xref> { [[ModuleRequest]]: <var>module</var>, [[ImportName]]: <var>localName</var>, [[LocalName]]: <var>localName</var> }.</li><li>Return a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4700"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing <var>entry</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ImportSpecifier" collapsed="">
<emu-nt><a href="#prod-ImportSpecifier">ImportSpecifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="38da6908"><emu-nt id="_ref_14093"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt><emu-t>as</emu-t><emu-nt id="_ref_14094"><a href="#prod-ImportedBinding">ImportedBinding</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>importName</var> be the StringValue of <emu-nt id="_ref_14095"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt>.</li><li>Let <var>localName</var> be the StringValue of <emu-nt id="_ref_14096"><a href="#prod-ImportedBinding">ImportedBinding</a></emu-nt>.</li><li>Let <var>entry</var> be the <emu-xref href="#importentry-record" id="_ref_4701"><a href="#importentry-record">ImportEntry Record</a></emu-xref> { [[ModuleRequest]]: <var>module</var>, [[ImportName]]: <var>importName</var>, [[LocalName]]: <var>localName</var> }.</li><li>Return a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4702"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing <var>entry</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-imports-static-semantics-modulerequests">
<h1><span class="secnum">15.2.2.5</span>Static Semantics: ModuleRequests</h1>
<emu-see-also-para op="ModuleRequests"></emu-see-also-para>
<emu-grammar><emu-production name="ImportDeclaration" collapsed="">
<emu-nt><a href="#prod-ImportDeclaration">ImportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1a51d4c5"><emu-t>import</emu-t><emu-nt id="_ref_14097"><a href="#prod-ImportClause">ImportClause</a></emu-nt><emu-nt id="_ref_14098"><a href="#prod-FromClause">FromClause</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ModuleRequests of <emu-nt id="_ref_14099"><a href="#prod-FromClause">FromClause</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ModuleSpecifier" collapsed="">
<emu-nt><a href="#prod-ModuleSpecifier">ModuleSpecifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5c74e54d"><emu-nt id="_ref_14100"><a href="#prod-StringLiteral">StringLiteral</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4703"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing the StringValue of <emu-nt id="_ref_14101"><a href="#prod-StringLiteral">StringLiteral</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-exports">
<h1><span class="secnum">15.2.3</span>Exports</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="ExportDeclaration" id="prod-ExportDeclaration">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="56ae069c"><emu-t>export</emu-t><emu-t>*</emu-t><emu-nt id="_ref_14102"><a href="#prod-FromClause">FromClause</a></emu-nt><emu-t>;</emu-t></emu-rhs>
<emu-rhs a="54a8804a"><emu-t>export</emu-t><emu-nt id="_ref_14103"><a href="#prod-ExportClause">ExportClause</a></emu-nt><emu-nt id="_ref_14104"><a href="#prod-FromClause">FromClause</a></emu-nt><emu-t>;</emu-t></emu-rhs>
<emu-rhs a="b6878be3"><emu-t>export</emu-t><emu-nt id="_ref_14105"><a href="#prod-ExportClause">ExportClause</a></emu-nt><emu-t>;</emu-t></emu-rhs>
<emu-rhs a="696b8d6e"><emu-t>export</emu-t><emu-nt params="~Yield, ~Await" id="_ref_14106"><a href="#prod-VariableStatement">VariableStatement</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="6bc99b97"><emu-t>export</emu-t><emu-nt params="~Yield, ~Await" id="_ref_14107"><a href="#prod-Declaration">Declaration</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="d298e1ba"><emu-t>export</emu-t><emu-t>default</emu-t><emu-nt params="~Yield, ~Await, +Default" id="_ref_14108"><a href="#prod-HoistableDeclaration">HoistableDeclaration</a><emu-mods><emu-params>[~Yield, ~Await, +Default]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="ae276654"><emu-t>export</emu-t><emu-t>default</emu-t><emu-nt params="~Yield, ~Await, +Default" id="_ref_14109"><a href="#prod-ClassDeclaration">ClassDeclaration</a><emu-mods><emu-params>[~Yield, ~Await, +Default]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="e2a585b6"><emu-t>export</emu-t><emu-t>default</emu-t><emu-gann>[lookahead ∉ { <emu-t>function</emu-t>, <emu-t>async</emu-t>
<emu-gann>[no <emu-nt id="_ref_14110"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann>
<emu-t>function</emu-t>, <emu-t>class</emu-t> }]</emu-gann><emu-nt params="+In, ~Yield, ~Await" id="_ref_14111"><a href="#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="ExportClause" id="prod-ExportClause">
<emu-nt><a href="#prod-ExportClause">ExportClause</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><emu-t>{</emu-t><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="29b1414e"><emu-t>{</emu-t><emu-nt id="_ref_14112"><a href="#prod-ExportsList">ExportsList</a></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="c16c88fe"><emu-t>{</emu-t><emu-nt id="_ref_14113"><a href="#prod-ExportsList">ExportsList</a></emu-nt><emu-t>,</emu-t><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="ExportsList" id="prod-ExportsList">
<emu-nt><a href="#prod-ExportsList">ExportsList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5b554fef"><emu-nt id="_ref_14114"><a href="#prod-ExportSpecifier">ExportSpecifier</a></emu-nt></emu-rhs>
<emu-rhs a="1907cd0c"><emu-nt id="_ref_14115"><a href="#prod-ExportsList">ExportsList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_14116"><a href="#prod-ExportSpecifier">ExportSpecifier</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ExportSpecifier" id="prod-ExportSpecifier">
<emu-nt><a href="#prod-ExportSpecifier">ExportSpecifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0ebb31e2"><emu-nt id="_ref_14117"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
<emu-rhs a="a9552c46"><emu-nt id="_ref_14118"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt><emu-t>as</emu-t><emu-nt id="_ref_14119"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-clause id="sec-exports-static-semantics-early-errors">
<h1><span class="secnum">15.2.3.1</span>Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b6878be3"><emu-t>export</emu-t><emu-nt id="_ref_14120"><a href="#prod-ExportClause">ExportClause</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
For each <emu-nt id="_ref_14121"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt> <var>n</var> in ReferencedBindings of <emu-nt id="_ref_14122"><a href="#prod-ExportClause">ExportClause</a></emu-nt>: It is a Syntax Error if StringValue of <var>n</var> is a <emu-nt id="_ref_14123"><a href="#prod-ReservedWord">ReservedWord</a></emu-nt> or if the StringValue of <var>n</var> is one of: <code>"implements"</code>, <code>"interface"</code>, <code>"let"</code>, <code>"package"</code>, <code>"private"</code>, <code>"protected"</code>, <code>"public"</code>, or <code>"static"</code>.
</li>
</ul>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The above rule means that each ReferencedBindings of <emu-nt id="_ref_14124"><a href="#prod-ExportClause">ExportClause</a></emu-nt> is treated as an <emu-nt id="_ref_14125"><a href="#prod-IdentifierReference">IdentifierReference</a></emu-nt>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-exports-static-semantics-boundnames">
<h1><span class="secnum">15.2.3.2</span>Static Semantics: BoundNames</h1>
<emu-see-also-para op="BoundNames"></emu-see-also-para>
<emu-grammar><emu-production name="ExportDeclaration">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="56ae069c"><emu-t>export</emu-t><emu-t>*</emu-t><emu-nt id="_ref_14126"><a href="#prod-FromClause">FromClause</a></emu-nt><emu-t>;</emu-t></emu-rhs>
<emu-rhs a="54a8804a"><emu-t>export</emu-t><emu-nt id="_ref_14127"><a href="#prod-ExportClause">ExportClause</a></emu-nt><emu-nt id="_ref_14128"><a href="#prod-FromClause">FromClause</a></emu-nt><emu-t>;</emu-t></emu-rhs>
<emu-rhs a="b6878be3"><emu-t>export</emu-t><emu-nt id="_ref_14129"><a href="#prod-ExportClause">ExportClause</a></emu-nt><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_4704"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6c6de801"><emu-t>export</emu-t><emu-nt id="_ref_14130"><a href="#prod-VariableStatement">VariableStatement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the BoundNames of <emu-nt id="_ref_14131"><a href="#prod-VariableStatement">VariableStatement</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="828f5ae3"><emu-t>export</emu-t><emu-nt id="_ref_14132"><a href="#prod-Declaration">Declaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the BoundNames of <emu-nt id="_ref_14133"><a href="#prod-Declaration">Declaration</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="71d1417e"><emu-t>export</emu-t><emu-t>default</emu-t><emu-nt id="_ref_14134"><a href="#prod-HoistableDeclaration">HoistableDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>declarationNames</var> be the BoundNames of <emu-nt id="_ref_14135"><a href="#prod-HoistableDeclaration">HoistableDeclaration</a></emu-nt>.</li><li>If <var>declarationNames</var> does not include the element <code>"*default*"</code>, append <code>"*default*"</code> to <var>declarationNames</var>.</li><li>Return <var>declarationNames</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c3c3cb8d"><emu-t>export</emu-t><emu-t>default</emu-t><emu-nt id="_ref_14136"><a href="#prod-ClassDeclaration">ClassDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>declarationNames</var> be the BoundNames of <emu-nt id="_ref_14137"><a href="#prod-ClassDeclaration">ClassDeclaration</a></emu-nt>.</li><li>If <var>declarationNames</var> does not include the element <code>"*default*"</code>, append <code>"*default*"</code> to <var>declarationNames</var>.</li><li>Return <var>declarationNames</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e1fe9c4f"><emu-t>export</emu-t><emu-t>default</emu-t><emu-nt id="_ref_14138"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return « <code>"*default*"</code> ».
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-exports-static-semantics-exportedbindings">
<h1><span class="secnum">15.2.3.3</span>Static Semantics: ExportedBindings</h1>
<emu-see-also-para op="ExportedBindings"></emu-see-also-para>
<emu-grammar><emu-production name="ExportDeclaration">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="56ae069c"><emu-t>export</emu-t><emu-t>*</emu-t><emu-nt id="_ref_14139"><a href="#prod-FromClause">FromClause</a></emu-nt><emu-t>;</emu-t></emu-rhs>
<emu-rhs a="54a8804a"><emu-t>export</emu-t><emu-nt id="_ref_14140"><a href="#prod-ExportClause">ExportClause</a></emu-nt><emu-nt id="_ref_14141"><a href="#prod-FromClause">FromClause</a></emu-nt><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_4705"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b6878be3"><emu-t>export</emu-t><emu-nt id="_ref_14142"><a href="#prod-ExportClause">ExportClause</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the ExportedBindings of <emu-nt id="_ref_14143"><a href="#prod-ExportClause">ExportClause</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6c6de801"><emu-t>export</emu-t><emu-nt id="_ref_14144"><a href="#prod-VariableStatement">VariableStatement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the BoundNames of <emu-nt id="_ref_14145"><a href="#prod-VariableStatement">VariableStatement</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="828f5ae3"><emu-t>export</emu-t><emu-nt id="_ref_14146"><a href="#prod-Declaration">Declaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the BoundNames of <emu-nt id="_ref_14147"><a href="#prod-Declaration">Declaration</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="71d1417e"><emu-t>export</emu-t><emu-t>default</emu-t><emu-nt id="_ref_14148"><a href="#prod-HoistableDeclaration">HoistableDeclaration</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c3c3cb8d"><emu-t>export</emu-t><emu-t>default</emu-t><emu-nt id="_ref_14149"><a href="#prod-ClassDeclaration">ClassDeclaration</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e1fe9c4f"><emu-t>export</emu-t><emu-t>default</emu-t><emu-nt id="_ref_14150"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the BoundNames of this <emu-nt id="_ref_14151"><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportClause" collapsed="">
<emu-nt><a href="#prod-ExportClause">ExportClause</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><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_4706"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportsList" collapsed="">
<emu-nt><a href="#prod-ExportsList">ExportsList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1907cd0c"><emu-nt id="_ref_14152"><a href="#prod-ExportsList">ExportsList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_14153"><a href="#prod-ExportSpecifier">ExportSpecifier</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>names</var> be the ExportedBindings of <emu-nt id="_ref_14154"><a href="#prod-ExportsList">ExportsList</a></emu-nt>.</li><li>Append to <var>names</var> the elements of the ExportedBindings of <emu-nt id="_ref_14155"><a href="#prod-ExportSpecifier">ExportSpecifier</a></emu-nt>.</li><li>Return <var>names</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportSpecifier" collapsed="">
<emu-nt><a href="#prod-ExportSpecifier">ExportSpecifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0ebb31e2"><emu-nt id="_ref_14156"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4707"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing the StringValue of <emu-nt id="_ref_14157"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportSpecifier" collapsed="">
<emu-nt><a href="#prod-ExportSpecifier">ExportSpecifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a9552c46"><emu-nt id="_ref_14158"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt><emu-t>as</emu-t><emu-nt id="_ref_14159"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4708"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing the StringValue of the first <emu-nt id="_ref_14160"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-exports-static-semantics-exportednames">
<h1><span class="secnum">15.2.3.4</span>Static Semantics: ExportedNames</h1>
<emu-see-also-para op="ExportedNames"></emu-see-also-para>
<emu-grammar><emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="56ae069c"><emu-t>export</emu-t><emu-t>*</emu-t><emu-nt id="_ref_14161"><a href="#prod-FromClause">FromClause</a></emu-nt><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_4709"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="54a8804a"><emu-t>export</emu-t><emu-nt id="_ref_14162"><a href="#prod-ExportClause">ExportClause</a></emu-nt><emu-nt id="_ref_14163"><a href="#prod-FromClause">FromClause</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production>
<emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b6878be3"><emu-t>export</emu-t><emu-nt id="_ref_14164"><a href="#prod-ExportClause">ExportClause</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the ExportedNames of <emu-nt id="_ref_14165"><a href="#prod-ExportClause">ExportClause</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6c6de801"><emu-t>export</emu-t><emu-nt id="_ref_14166"><a href="#prod-VariableStatement">VariableStatement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the BoundNames of <emu-nt id="_ref_14167"><a href="#prod-VariableStatement">VariableStatement</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="828f5ae3"><emu-t>export</emu-t><emu-nt id="_ref_14168"><a href="#prod-Declaration">Declaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the BoundNames of <emu-nt id="_ref_14169"><a href="#prod-Declaration">Declaration</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="71d1417e"><emu-t>export</emu-t><emu-t>default</emu-t><emu-nt id="_ref_14170"><a href="#prod-HoistableDeclaration">HoistableDeclaration</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c3c3cb8d"><emu-t>export</emu-t><emu-t>default</emu-t><emu-nt id="_ref_14171"><a href="#prod-ClassDeclaration">ClassDeclaration</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e1fe9c4f"><emu-t>export</emu-t><emu-t>default</emu-t><emu-nt id="_ref_14172"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return « <code>"default"</code> ».
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportClause" collapsed="">
<emu-nt><a href="#prod-ExportClause">ExportClause</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><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_4710"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportsList" collapsed="">
<emu-nt><a href="#prod-ExportsList">ExportsList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1907cd0c"><emu-nt id="_ref_14173"><a href="#prod-ExportsList">ExportsList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_14174"><a href="#prod-ExportSpecifier">ExportSpecifier</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>names</var> be the ExportedNames of <emu-nt id="_ref_14175"><a href="#prod-ExportsList">ExportsList</a></emu-nt>.</li><li>Append to <var>names</var> the elements of the ExportedNames of <emu-nt id="_ref_14176"><a href="#prod-ExportSpecifier">ExportSpecifier</a></emu-nt>.</li><li>Return <var>names</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportSpecifier" collapsed="">
<emu-nt><a href="#prod-ExportSpecifier">ExportSpecifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0ebb31e2"><emu-nt id="_ref_14177"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4711"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing the StringValue of <emu-nt id="_ref_14178"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportSpecifier" collapsed="">
<emu-nt><a href="#prod-ExportSpecifier">ExportSpecifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a9552c46"><emu-nt id="_ref_14179"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt><emu-t>as</emu-t><emu-nt id="_ref_14180"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4712"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing the StringValue of the second <emu-nt id="_ref_14181"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-exports-static-semantics-exportentries">
<h1><span class="secnum">15.2.3.5</span>Static Semantics: ExportEntries</h1>
<emu-see-also-para op="ExportEntries"></emu-see-also-para>
<emu-grammar><emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="56ae069c"><emu-t>export</emu-t><emu-t>*</emu-t><emu-nt id="_ref_14182"><a href="#prod-FromClause">FromClause</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>module</var> be the sole element of ModuleRequests of <emu-nt id="_ref_14183"><a href="#prod-FromClause">FromClause</a></emu-nt>.</li><li>Let <var>entry</var> be the <emu-xref href="#exportentry-record" id="_ref_4713"><a href="#exportentry-record">ExportEntry Record</a></emu-xref> { [[ModuleRequest]]: <var>module</var>, [[ImportName]]: <code>"*"</code>, [[LocalName]]: <emu-val>null</emu-val>, [[ExportName]]: <emu-val>null</emu-val> }.</li><li>Return a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4714"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing <var>entry</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="54a8804a"><emu-t>export</emu-t><emu-nt id="_ref_14184"><a href="#prod-ExportClause">ExportClause</a></emu-nt><emu-nt id="_ref_14185"><a href="#prod-FromClause">FromClause</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>module</var> be the sole element of ModuleRequests of <emu-nt id="_ref_14186"><a href="#prod-FromClause">FromClause</a></emu-nt>.</li><li>Return ExportEntriesForModule of <emu-nt id="_ref_14187"><a href="#prod-ExportClause">ExportClause</a></emu-nt> with argument <var>module</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b6878be3"><emu-t>export</emu-t><emu-nt id="_ref_14188"><a href="#prod-ExportClause">ExportClause</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ExportEntriesForModule of <emu-nt id="_ref_14189"><a href="#prod-ExportClause">ExportClause</a></emu-nt> with argument <emu-val>null</emu-val>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6c6de801"><emu-t>export</emu-t><emu-nt id="_ref_14190"><a href="#prod-VariableStatement">VariableStatement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>entries</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4715"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>names</var> be the BoundNames of <emu-nt id="_ref_14191"><a href="#prod-VariableStatement">VariableStatement</a></emu-nt>.</li><li>For each <var>name</var> in <var>names</var>, do<ol><li>Append the <emu-xref href="#exportentry-record" id="_ref_4716"><a href="#exportentry-record">ExportEntry Record</a></emu-xref> { [[ModuleRequest]]: <emu-val>null</emu-val>, [[ImportName]]: <emu-val>null</emu-val>, [[LocalName]]: <var>name</var>, [[ExportName]]: <var>name</var> } to <var>entries</var>.</li></ol></li><li>Return <var>entries</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="828f5ae3"><emu-t>export</emu-t><emu-nt id="_ref_14192"><a href="#prod-Declaration">Declaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>entries</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4717"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>names</var> be the BoundNames of <emu-nt id="_ref_14193"><a href="#prod-Declaration">Declaration</a></emu-nt>.</li><li>For each <var>name</var> in <var>names</var>, do<ol><li>Append the <emu-xref href="#exportentry-record" id="_ref_4718"><a href="#exportentry-record">ExportEntry Record</a></emu-xref> { [[ModuleRequest]]: <emu-val>null</emu-val>, [[ImportName]]: <emu-val>null</emu-val>, [[LocalName]]: <var>name</var>, [[ExportName]]: <var>name</var> } to <var>entries</var>.</li></ol></li><li>Return <var>entries</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="71d1417e"><emu-t>export</emu-t><emu-t>default</emu-t><emu-nt id="_ref_14194"><a href="#prod-HoistableDeclaration">HoistableDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>names</var> be BoundNames of <emu-nt id="_ref_14195"><a href="#prod-HoistableDeclaration">HoistableDeclaration</a></emu-nt>.</li><li>Let <var>localName</var> be the sole element of <var>names</var>.</li><li>Return a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4719"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing the <emu-xref href="#exportentry-record" id="_ref_4720"><a href="#exportentry-record">ExportEntry Record</a></emu-xref> { [[ModuleRequest]]: <emu-val>null</emu-val>, [[ImportName]]: <emu-val>null</emu-val>, [[LocalName]]: <var>localName</var>, [[ExportName]]: <code>"default"</code> }.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c3c3cb8d"><emu-t>export</emu-t><emu-t>default</emu-t><emu-nt id="_ref_14196"><a href="#prod-ClassDeclaration">ClassDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>names</var> be BoundNames of <emu-nt id="_ref_14197"><a href="#prod-ClassDeclaration">ClassDeclaration</a></emu-nt>.</li><li>Let <var>localName</var> be the sole element of <var>names</var>.</li><li>Return a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4721"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing the <emu-xref href="#exportentry-record" id="_ref_4722"><a href="#exportentry-record">ExportEntry Record</a></emu-xref> { [[ModuleRequest]]: <emu-val>null</emu-val>, [[ImportName]]: <emu-val>null</emu-val>, [[LocalName]]: <var>localName</var>, [[ExportName]]: <code>"default"</code> }.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e1fe9c4f"><emu-t>export</emu-t><emu-t>default</emu-t><emu-nt id="_ref_14198"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>entry</var> be the <emu-xref href="#exportentry-record" id="_ref_4723"><a href="#exportentry-record">ExportEntry Record</a></emu-xref> { [[ModuleRequest]]: <emu-val>null</emu-val>, [[ImportName]]: <emu-val>null</emu-val>, [[LocalName]]: <code>"*default*"</code>, [[ExportName]]: <code>"default"</code> }.</li><li>Return a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4724"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing <var>entry</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p><code>"*default*"</code> is used within this specification as a synthetic name for anonymous default export values.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-static-semantics-exportentriesformodule">
<h1><span class="secnum">15.2.3.6</span>Static Semantics: ExportEntriesForModule</h1>
<p>With parameter <var>module</var>.</p>
<emu-grammar><emu-production name="ExportClause" collapsed="">
<emu-nt><a href="#prod-ExportClause">ExportClause</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><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_4725"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportsList" collapsed="">
<emu-nt><a href="#prod-ExportsList">ExportsList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1907cd0c"><emu-nt id="_ref_14199"><a href="#prod-ExportsList">ExportsList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_14200"><a href="#prod-ExportSpecifier">ExportSpecifier</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>specs</var> be the ExportEntriesForModule of <emu-nt id="_ref_14201"><a href="#prod-ExportsList">ExportsList</a></emu-nt> with argument <var>module</var>.</li><li>Append to <var>specs</var> the elements of the ExportEntriesForModule of <emu-nt id="_ref_14202"><a href="#prod-ExportSpecifier">ExportSpecifier</a></emu-nt> with argument <var>module</var>.</li><li>Return <var>specs</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportSpecifier" collapsed="">
<emu-nt><a href="#prod-ExportSpecifier">ExportSpecifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0ebb31e2"><emu-nt id="_ref_14203"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>sourceName</var> be the StringValue of <emu-nt id="_ref_14204"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt>.</li><li>If <var>module</var> is <emu-val>null</emu-val>, then<ol><li>Let <var>localName</var> be <var>sourceName</var>.</li><li>Let <var>importName</var> be <emu-val>null</emu-val>.</li></ol></li><li>Else,<ol><li>Let <var>localName</var> be <emu-val>null</emu-val>.</li><li>Let <var>importName</var> be <var>sourceName</var>.</li></ol></li><li>Return a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4726"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing the <emu-xref href="#exportentry-record" id="_ref_4727"><a href="#exportentry-record">ExportEntry Record</a></emu-xref> { [[ModuleRequest]]: <var>module</var>, [[ImportName]]: <var>importName</var>, [[LocalName]]: <var>localName</var>, [[ExportName]]: <var>sourceName</var> }.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportSpecifier" collapsed="">
<emu-nt><a href="#prod-ExportSpecifier">ExportSpecifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a9552c46"><emu-nt id="_ref_14205"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt><emu-t>as</emu-t><emu-nt id="_ref_14206"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>sourceName</var> be the StringValue of the first <emu-nt id="_ref_14207"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt>.</li><li>Let <var>exportName</var> be the StringValue of the second <emu-nt id="_ref_14208"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt>.</li><li>If <var>module</var> is <emu-val>null</emu-val>, then<ol><li>Let <var>localName</var> be <var>sourceName</var>.</li><li>Let <var>importName</var> be <emu-val>null</emu-val>.</li></ol></li><li>Else,<ol><li>Let <var>localName</var> be <emu-val>null</emu-val>.</li><li>Let <var>importName</var> be <var>sourceName</var>.</li></ol></li><li>Return a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4728"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing the <emu-xref href="#exportentry-record" id="_ref_4729"><a href="#exportentry-record">ExportEntry Record</a></emu-xref> { [[ModuleRequest]]: <var>module</var>, [[ImportName]]: <var>importName</var>, [[LocalName]]: <var>localName</var>, [[ExportName]]: <var>exportName</var> }.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-exports-static-semantics-isconstantdeclaration">
<h1><span class="secnum">15.2.3.7</span>Static Semantics: IsConstantDeclaration</h1>
<emu-see-also-para op="IsConstantDeclaration"></emu-see-also-para>
<emu-grammar><emu-production name="ExportDeclaration">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="56ae069c"><emu-t>export</emu-t><emu-t>*</emu-t><emu-nt id="_ref_14209"><a href="#prod-FromClause">FromClause</a></emu-nt><emu-t>;</emu-t></emu-rhs>
<emu-rhs a="54a8804a"><emu-t>export</emu-t><emu-nt id="_ref_14210"><a href="#prod-ExportClause">ExportClause</a></emu-nt><emu-nt id="_ref_14211"><a href="#prod-FromClause">FromClause</a></emu-nt><emu-t>;</emu-t></emu-rhs>
<emu-rhs a="b6878be3"><emu-t>export</emu-t><emu-nt id="_ref_14212"><a href="#prod-ExportClause">ExportClause</a></emu-nt><emu-t>;</emu-t></emu-rhs>
<emu-rhs a="e1fe9c4f"><emu-t>export</emu-t><emu-t>default</emu-t><emu-nt id="_ref_14213"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>It is not necessary to treat <code>export default</code> <emu-nt id="_ref_14214"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>
as a constant declaration because there is no syntax that permits
assignment to the internal bound name used to reference a module's
default object.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-exports-static-semantics-lexicallyscopeddeclarations">
<h1><span class="secnum">15.2.3.8</span>Static Semantics: LexicallyScopedDeclarations</h1>
<emu-see-also-para op="LexicallyScopedDeclarations"></emu-see-also-para>
<emu-grammar><emu-production name="ExportDeclaration">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="56ae069c"><emu-t>export</emu-t><emu-t>*</emu-t><emu-nt id="_ref_14215"><a href="#prod-FromClause">FromClause</a></emu-nt><emu-t>;</emu-t></emu-rhs>
<emu-rhs a="54a8804a"><emu-t>export</emu-t><emu-nt id="_ref_14216"><a href="#prod-ExportClause">ExportClause</a></emu-nt><emu-nt id="_ref_14217"><a href="#prod-FromClause">FromClause</a></emu-nt><emu-t>;</emu-t></emu-rhs>
<emu-rhs a="b6878be3"><emu-t>export</emu-t><emu-nt id="_ref_14218"><a href="#prod-ExportClause">ExportClause</a></emu-nt><emu-t>;</emu-t></emu-rhs>
<emu-rhs a="6c6de801"><emu-t>export</emu-t><emu-nt id="_ref_14219"><a href="#prod-VariableStatement">VariableStatement</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_4730"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="828f5ae3"><emu-t>export</emu-t><emu-nt id="_ref_14220"><a href="#prod-Declaration">Declaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4731"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing DeclarationPart of <emu-nt id="_ref_14221"><a href="#prod-Declaration">Declaration</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="71d1417e"><emu-t>export</emu-t><emu-t>default</emu-t><emu-nt id="_ref_14222"><a href="#prod-HoistableDeclaration">HoistableDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4732"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing DeclarationPart of <emu-nt id="_ref_14223"><a href="#prod-HoistableDeclaration">HoistableDeclaration</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c3c3cb8d"><emu-t>export</emu-t><emu-t>default</emu-t><emu-nt id="_ref_14224"><a href="#prod-ClassDeclaration">ClassDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4733"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing <emu-nt id="_ref_14225"><a href="#prod-ClassDeclaration">ClassDeclaration</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e1fe9c4f"><emu-t>export</emu-t><emu-t>default</emu-t><emu-nt id="_ref_14226"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4734"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing this <emu-nt id="_ref_14227"><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-exports-static-semantics-modulerequests">
<h1><span class="secnum">15.2.3.9</span>Static Semantics: ModuleRequests</h1>
<emu-see-also-para op="ModuleRequests"></emu-see-also-para>
<emu-grammar><emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="56ae069c"><emu-t>export</emu-t><emu-t>*</emu-t><emu-nt id="_ref_14228"><a href="#prod-FromClause">FromClause</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production>
<emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="54a8804a"><emu-t>export</emu-t><emu-nt id="_ref_14229"><a href="#prod-ExportClause">ExportClause</a></emu-nt><emu-nt id="_ref_14230"><a href="#prod-FromClause">FromClause</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the ModuleRequests of <emu-nt id="_ref_14231"><a href="#prod-FromClause">FromClause</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportDeclaration">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b6878be3"><emu-t>export</emu-t><emu-nt id="_ref_14232"><a href="#prod-ExportClause">ExportClause</a></emu-nt><emu-t>;</emu-t></emu-rhs>
<emu-rhs a="6c6de801"><emu-t>export</emu-t><emu-nt id="_ref_14233"><a href="#prod-VariableStatement">VariableStatement</a></emu-nt></emu-rhs>
<emu-rhs a="828f5ae3"><emu-t>export</emu-t><emu-nt id="_ref_14234"><a href="#prod-Declaration">Declaration</a></emu-nt></emu-rhs>
<emu-rhs a="71d1417e"><emu-t>export</emu-t><emu-t>default</emu-t><emu-nt id="_ref_14235"><a href="#prod-HoistableDeclaration">HoistableDeclaration</a></emu-nt></emu-rhs>
<emu-rhs a="c3c3cb8d"><emu-t>export</emu-t><emu-t>default</emu-t><emu-nt id="_ref_14236"><a href="#prod-ClassDeclaration">ClassDeclaration</a></emu-nt></emu-rhs>
<emu-rhs a="e1fe9c4f"><emu-t>export</emu-t><emu-t>default</emu-t><emu-nt id="_ref_14237"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><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_4735"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-static-semantics-referencedbindings">
<h1><span class="secnum">15.2.3.10</span>Static Semantics: ReferencedBindings</h1>
<emu-grammar><emu-production name="ExportClause" collapsed="">
<emu-nt><a href="#prod-ExportClause">ExportClause</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><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_4736"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportsList" collapsed="">
<emu-nt><a href="#prod-ExportsList">ExportsList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1907cd0c"><emu-nt id="_ref_14238"><a href="#prod-ExportsList">ExportsList</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_14239"><a href="#prod-ExportSpecifier">ExportSpecifier</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>names</var> be the ReferencedBindings of <emu-nt id="_ref_14240"><a href="#prod-ExportsList">ExportsList</a></emu-nt>.</li><li>Append to <var>names</var> the elements of the ReferencedBindings of <emu-nt id="_ref_14241"><a href="#prod-ExportSpecifier">ExportSpecifier</a></emu-nt>.</li><li>Return <var>names</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportSpecifier" collapsed="">
<emu-nt><a href="#prod-ExportSpecifier">ExportSpecifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0ebb31e2"><emu-nt id="_ref_14242"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4737"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing the <emu-nt id="_ref_14243"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportSpecifier" collapsed="">
<emu-nt><a href="#prod-ExportSpecifier">ExportSpecifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a9552c46"><emu-nt id="_ref_14244"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt><emu-t>as</emu-t><emu-nt id="_ref_14245"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4738"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing the first <emu-nt id="_ref_14246"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-exports-runtime-semantics-evaluation">
<h1><span class="secnum">15.2.3.11</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="ExportDeclaration">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="56ae069c"><emu-t>export</emu-t><emu-t>*</emu-t><emu-nt id="_ref_14247"><a href="#prod-FromClause">FromClause</a></emu-nt><emu-t>;</emu-t></emu-rhs>
<emu-rhs a="54a8804a"><emu-t>export</emu-t><emu-nt id="_ref_14248"><a href="#prod-ExportClause">ExportClause</a></emu-nt><emu-nt id="_ref_14249"><a href="#prod-FromClause">FromClause</a></emu-nt><emu-t>;</emu-t></emu-rhs>
<emu-rhs a="b6878be3"><emu-t>export</emu-t><emu-nt id="_ref_14250"><a href="#prod-ExportClause">ExportClause</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-xref aoid="NormalCompletion" id="_ref_4739"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6c6de801"><emu-t>export</emu-t><emu-nt id="_ref_14251"><a href="#prod-VariableStatement">VariableStatement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the result of evaluating <emu-nt id="_ref_14252"><a href="#prod-VariableStatement">VariableStatement</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="828f5ae3"><emu-t>export</emu-t><emu-nt id="_ref_14253"><a href="#prod-Declaration">Declaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the result of evaluating <emu-nt id="_ref_14254"><a href="#prod-Declaration">Declaration</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="71d1417e"><emu-t>export</emu-t><emu-t>default</emu-t><emu-nt id="_ref_14255"><a href="#prod-HoistableDeclaration">HoistableDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the result of evaluating <emu-nt id="_ref_14256"><a href="#prod-HoistableDeclaration">HoistableDeclaration</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c3c3cb8d"><emu-t>export</emu-t><emu-t>default</emu-t><emu-nt id="_ref_14257"><a href="#prod-ClassDeclaration">ClassDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>value</var> be the result of BindingClassDeclarationEvaluation of <emu-nt id="_ref_14258"><a href="#prod-ClassDeclaration">ClassDeclaration</a></emu-nt>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_4740"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>value</var>).</li><li>Let <var>className</var> be the sole element of BoundNames of <emu-nt id="_ref_14259"><a href="#prod-ClassDeclaration">ClassDeclaration</a></emu-nt>.</li><li>If <var>className</var> is <code>"*default*"</code>, then<ol><li>Let <var>env</var> be the <emu-xref href="#running-execution-context" id="_ref_4741"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment.</li><li>Perform ?&nbsp;<emu-xref aoid="InitializeBoundName" id="_ref_4742"><a href="#sec-initializeboundname">InitializeBoundName</a></emu-xref>(<code>"*default*"</code>, <var>value</var>, <var>env</var>).</li></ol></li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_4743"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
<emu-grammar><emu-production name="ExportDeclaration" collapsed="">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e1fe9c4f"><emu-t>export</emu-t><emu-t>default</emu-t><emu-nt id="_ref_14260"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>If <emu-xref aoid="IsAnonymousFunctionDefinition" id="_ref_4744"><a href="#sec-isanonymousfunctiondefinition">IsAnonymousFunctionDefinition</a></emu-xref>(<emu-nt id="_ref_14261"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>) is <emu-val>true</emu-val>, then<ol><li>Let <var>value</var> be the result of performing NamedEvaluation for <emu-nt id="_ref_14262"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt> with argument <code>"default"</code>.</li></ol></li><li>Else,<ol><li>Let <var>rhs</var> be the result of evaluating <emu-nt id="_ref_14263"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Let <var>value</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_4745"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>rhs</var>).</li></ol></li><li>Let <var>env</var> be the <emu-xref href="#running-execution-context" id="_ref_4746"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment.</li><li>Perform ?&nbsp;<emu-xref aoid="InitializeBoundName" id="_ref_4747"><a href="#sec-initializeboundname">InitializeBoundName</a></emu-xref>(<code>"*default*"</code>, <var>value</var>, <var>env</var>).</li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_4748"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-error-handling-and-language-extensions">
<h1><span class="secnum">16</span>Error Handling and Language Extensions</h1>
<p>An implementation must report most errors at the time the relevant ECMAScript language construct is evaluated. An <dfn id="early-error">early error</dfn> is an error that can be detected and reported prior to the evaluation of any construct in the <emu-nt id="_ref_14264"><a href="#prod-Script">Script</a></emu-nt> containing the error. The presence of an <emu-xref href="#early-error" id="_ref_4749"><a href="#early-error">early error</a></emu-xref> prevents the evaluation of the construct. An implementation must report early errors in a <emu-nt id="_ref_14265"><a href="#prod-Script">Script</a></emu-nt> as part of parsing that <emu-nt id="_ref_14266"><a href="#prod-Script">Script</a></emu-nt> in <emu-xref aoid="ParseScript" id="_ref_4750"><a href="#sec-parse-script">ParseScript</a></emu-xref>. Early errors in a <emu-nt id="_ref_14267"><a href="#prod-Module">Module</a></emu-nt> are reported at the point when the <emu-nt id="_ref_14268"><a href="#prod-Module">Module</a></emu-nt> would be evaluated and the <emu-nt id="_ref_14269"><a href="#prod-Module">Module</a></emu-nt> is never initialized. Early errors in <b>eval</b> code are reported at the time <code>eval</code> is called and prevent evaluation of the <b>eval</b> code. All errors that are not early errors are runtime errors.</p>
<p>An implementation must report as an <emu-xref href="#early-error" id="_ref_4751"><a href="#early-error">early error</a></emu-xref> any occurrence of a condition that is listed in a “Static Semantics: Early Errors” subclause of this specification.</p>
<p>An implementation shall not treat other kinds of errors as early
errors even if the compiler can prove that a construct cannot execute
without error under any circumstances. An implementation may issue an
early warning in such a case, but it should not report the error until
the relevant construct is actually executed.</p>
<p>An implementation shall report all errors as specified, except for the following:</p>
<ul>
<li>
Except as restricted in <emu-xref href="#sec-forbidden-extensions" id="_ref_384"><a href="#sec-forbidden-extensions">16.2</a></emu-xref>, an implementation may extend <emu-nt id="_ref_14270"><a href="#prod-Script">Script</a></emu-nt> syntax, <emu-nt id="_ref_14271"><a href="#prod-Module">Module</a></emu-nt> syntax, and regular expression pattern or flag syntax. To permit this, all operations (such as calling <code>eval</code>, using a regular expression literal, or using the <code>Function</code> or <code>RegExp</code> <emu-xref href="#constructor" id="_ref_4752"><a href="#constructor">constructor</a></emu-xref>) that are allowed to throw <emu-val>SyntaxError</emu-val> are permitted to exhibit implementation-defined behaviour instead of throwing <emu-val>SyntaxError</emu-val> when they encounter an implementation-defined extension to the script syntax or regular expression pattern or flag syntax.
</li>
<li>
Except as restricted in <emu-xref href="#sec-forbidden-extensions" id="_ref_385"><a href="#sec-forbidden-extensions">16.2</a></emu-xref>,
an implementation may provide additional types, values, objects,
properties, and functions beyond those described in this specification.
This may cause constructs (such as looking up a variable in the global
scope) to have implementation-defined behaviour instead of throwing an
error (such as <emu-val>ReferenceError</emu-val>).
</li>
</ul>
<emu-clause id="sec-host-report-errors" aoid="HostReportErrors">
<h1><span class="secnum">16.1</span>HostReportErrors ( <var>errorList</var> )</h1>
<p>HostReportErrors is an implementation-defined abstract operation
that allows host environments to report parsing errors, early errors,
and runtime errors.</p>
<p>An implementation of HostReportErrors must complete normally in
all cases. The default implementation of HostReportErrors is to
unconditionally return an empty normal completion.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p><var>errorList</var> will be a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4753"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of ECMAScript language values. If the errors are parsing errors or early errors, these will always be <emu-val>SyntaxError</emu-val> or <emu-val>ReferenceError</emu-val> objects. Runtime errors, however, can be any ECMAScript value.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-forbidden-extensions">
<h1><span class="secnum">16.2</span>Forbidden Extensions</h1>
<p>An implementation must not extend this specification in the following ways:</p>
<ul>
<li>
ECMAScript function objects defined using syntactic constructors in <emu-xref href="#sec-strict-mode-code" id="_ref_4754"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref> must not be created with own properties named <code>"caller"</code> or <code>"arguments"</code>. Such own properties also must not be created for function objects defined using an <emu-nt id="_ref_14272"><a href="#prod-ArrowFunction">ArrowFunction</a></emu-nt>, <emu-nt id="_ref_14273"><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt>, <emu-nt id="_ref_14274"><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a></emu-nt>, <emu-nt id="_ref_14275"><a href="#prod-GeneratorExpression">GeneratorExpression</a></emu-nt>, <emu-nt id="_ref_14276"><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt>, <emu-nt id="_ref_14277"><a href="#prod-AsyncGeneratorExpression">AsyncGeneratorExpression</a></emu-nt>, <emu-nt id="_ref_14278"><a href="#prod-ClassDeclaration">ClassDeclaration</a></emu-nt>, <emu-nt id="_ref_14279"><a href="#prod-ClassExpression">ClassExpression</a></emu-nt>, <emu-nt id="_ref_14280"><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt>, <emu-nt id="_ref_14281"><a href="#prod-AsyncFunctionExpression">AsyncFunctionExpression</a></emu-nt>, or <emu-nt id="_ref_14282"><a href="#prod-AsyncArrowFunction">AsyncArrowFunction</a></emu-nt> regardless of whether the definition is contained in <emu-xref href="#sec-strict-mode-code" id="_ref_4755"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>. Built-in functions, strict functions created using the <code>Function</code> <emu-xref href="#constructor" id="_ref_4756"><a href="#constructor">constructor</a></emu-xref>, generator functions created using the <code>Generator</code> <emu-xref href="#constructor" id="_ref_4757"><a href="#constructor">constructor</a></emu-xref>, async functions created using the <code>AsyncFunction</code> <emu-xref href="#constructor" id="_ref_4758"><a href="#constructor">constructor</a></emu-xref>, and functions created using the <code>bind</code> method also must not be created with such own properties.
</li>
<li>
If an implementation extends any <emu-xref href="#function-object" id="_ref_4759"><a href="#function-object">function object</a></emu-xref> with an own property named <code>"caller"</code> the value of that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a <emu-xref href="#strict-function" id="_ref_4760"><a href="#strict-function">strict function</a></emu-xref> object. If it is an <emu-xref href="#sec-object-type" id="_ref_4761"><a href="#sec-object-type">accessor property</a></emu-xref>, the function that is the value of the property's [[Get]] attribute must never return a <emu-xref href="#strict-function" id="_ref_4762"><a href="#strict-function">strict function</a></emu-xref> when called.
</li>
<li>
Neither mapped nor unmapped arguments objects may be created with an own property named <code>"caller"</code>.
</li>
<li>
The behaviour of the following methods must not be extended except as specified in ECMA-402: <code>Object.prototype.toLocaleString</code>, <code>Array.prototype.toLocaleString</code>, <code>Number.prototype.toLocaleString</code>, <code>Date.prototype.toLocaleDateString</code>, <code>Date.prototype.toLocaleString</code>, <code>Date.prototype.toLocaleTimeString</code>, <code>String.prototype.localeCompare</code>, <emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_4763"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref><code>.prototype.toLocaleString</code>.
</li>
<li>
The RegExp pattern grammars in <emu-xref href="#sec-patterns" id="_ref_386"><a href="#sec-patterns">21.2.1</a></emu-xref> and <emu-xref href="#sec-regular-expressions-patterns" id="_ref_387"><a href="#sec-regular-expressions-patterns">B.1.4</a></emu-xref> must not be extended to recognize any of the source characters A-Z or a-z as <emu-nt params="+U" id="_ref_14283"><a href="#prod-IdentityEscape">IdentityEscape</a><emu-mods><emu-params>[+U]</emu-params></emu-mods></emu-nt> when the <sub>[U]</sub> grammar parameter is present.
</li>
<li>
The Syntactic Grammar must not be extended in any manner that allows the token <code>:</code> to immediately follow source text that matches the <emu-nt id="_ref_14284"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt> nonterminal symbol.
</li>
<li>
When processing <emu-xref href="#sec-strict-mode-code" id="_ref_4764"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, the syntax of <emu-nt id="_ref_14285"><a href="#prod-NumericLiteral">NumericLiteral</a></emu-nt> must not be extended to include <emu-xref href="#prod-annexB-LegacyOctalIntegerLiteral" id="_ref_388"><a href="#prod-annexB-LegacyOctalIntegerLiteral"><emu-nt>LegacyOctalIntegerLiteral</emu-nt></a></emu-xref> and the syntax of <emu-nt id="_ref_14286"><a href="#prod-DecimalIntegerLiteral">DecimalIntegerLiteral</a></emu-nt> must not be extended to include <emu-xref href="#prod-annexB-NonOctalDecimalIntegerLiteral" id="_ref_389"><a href="#prod-annexB-NonOctalDecimalIntegerLiteral"><emu-nt>NonOctalDecimalIntegerLiteral</emu-nt></a></emu-xref> as described in <emu-xref href="#sec-additional-syntax-numeric-literals" id="_ref_390"><a href="#sec-additional-syntax-numeric-literals">B.1.1</a></emu-xref>.
</li>
<li>
<emu-nt id="_ref_14287"><a href="#prod-TemplateCharacter">TemplateCharacter</a></emu-nt> must not be extended to include <emu-xref href="#prod-annexB-LegacyOctalEscapeSequence" id="_ref_391"><a href="#prod-annexB-LegacyOctalEscapeSequence"><emu-nt>LegacyOctalEscapeSequence</emu-nt></a></emu-xref> as defined in <emu-xref href="#sec-additional-syntax-string-literals" id="_ref_392"><a href="#sec-additional-syntax-string-literals">B.1.2</a></emu-xref>.
</li>
<li>
When processing <emu-xref href="#sec-strict-mode-code" id="_ref_4765"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, the extensions defined in <emu-xref href="#sec-labelled-function-declarations" id="_ref_393"><a href="#sec-labelled-function-declarations">B.3.2</a></emu-xref>, <emu-xref href="#sec-block-level-function-declarations-web-legacy-compatibility-semantics" id="_ref_394"><a href="#sec-block-level-function-declarations-web-legacy-compatibility-semantics">B.3.3</a></emu-xref>, <emu-xref href="#sec-functiondeclarations-in-ifstatement-statement-clauses" id="_ref_395"><a href="#sec-functiondeclarations-in-ifstatement-statement-clauses">B.3.4</a></emu-xref>, and <emu-xref href="#sec-initializers-in-forin-statement-heads" id="_ref_396"><a href="#sec-initializers-in-forin-statement-heads">B.3.6</a></emu-xref> must not be supported.
</li>
<li>
When parsing for the <emu-nt id="_ref_14288"><a href="#prod-Module">Module</a></emu-nt> <emu-xref href="#sec-context-free-grammars" id="_ref_4766"><a href="#sec-context-free-grammars">goal symbol</a></emu-xref>, the lexical grammar extensions defined in <emu-xref href="#sec-html-like-comments" id="_ref_397"><a href="#sec-html-like-comments">B.1.3</a></emu-xref> must not be supported.
</li>
</ul>
</emu-clause>
</emu-clause>
<emu-clause id="sec-ecmascript-standard-built-in-objects">
<h1><span class="secnum">17</span>ECMAScript Standard Built-in Objects</h1>
<p>There are certain built-in objects available whenever an ECMAScript <emu-nt id="_ref_14289"><a href="#prod-Script">Script</a></emu-nt> or <emu-nt id="_ref_14290"><a href="#prod-Module">Module</a></emu-nt> begins execution. One, the <emu-xref href="#sec-global-object" id="_ref_4767"><a href="#sec-global-object">global object</a></emu-xref>, is part of the lexical environment of the executing program. Others are accessible as initial properties of the <emu-xref href="#sec-global-object" id="_ref_4768"><a href="#sec-global-object">global object</a></emu-xref> or indirectly as properties of accessible built-in objects.</p>
<p>Unless specified otherwise, a built-in object that is callable as a function is a built-in <emu-xref href="#function-object" id="_ref_4769"><a href="#function-object">function object</a></emu-xref> with the characteristics described in <emu-xref href="#sec-built-in-function-objects" id="_ref_398"><a href="#sec-built-in-function-objects">9.3</a></emu-xref>. Unless specified otherwise, the [[Extensible]] internal slot of a built-in object initially has the value <emu-val>true</emu-val>. Every built-in <emu-xref href="#function-object" id="_ref_4770"><a href="#function-object">function object</a></emu-xref> has a [[Realm]] internal slot whose value is the <emu-xref href="#realm-record" id="_ref_4771"><a href="#realm-record">Realm Record</a></emu-xref> of the <emu-xref href="#realm" id="_ref_4772"><a href="#realm">realm</a></emu-xref> for which the object was initially created.</p>
<p>Many built-in objects are functions: they can be invoked with
arguments. Some of them furthermore are constructors: they are functions
intended for use with the <code>new</code> operator. For each built-in
function, this specification describes the arguments required by that
function and the properties of that <emu-xref href="#function-object" id="_ref_4773"><a href="#function-object">function object</a></emu-xref>. For each built-in <emu-xref href="#constructor" id="_ref_4774"><a href="#constructor">constructor</a></emu-xref>, this specification furthermore describes properties of the prototype object of that <emu-xref href="#constructor" id="_ref_4775"><a href="#constructor">constructor</a></emu-xref> and properties of specific object instances returned by a <code>new</code> expression that invokes that <emu-xref href="#constructor" id="_ref_4776"><a href="#constructor">constructor</a></emu-xref>.</p>
<p>Unless otherwise specified in the description of a particular function, if a built-in function or <emu-xref href="#constructor" id="_ref_4777"><a href="#constructor">constructor</a></emu-xref> is given fewer arguments than the function is specified to require, the function or <emu-xref href="#constructor" id="_ref_4778"><a href="#constructor">constructor</a></emu-xref> shall behave exactly as if it had been given sufficient additional arguments, each such argument being the <emu-val>undefined</emu-val>
value. Such missing arguments are considered to be “not present” and
may be identified in that manner by specification algorithms. In the
description of a particular function, the terms “<code>this</code> value” and “NewTarget” have the meanings given in <emu-xref href="#sec-built-in-function-objects" id="_ref_399"><a href="#sec-built-in-function-objects">9.3</a></emu-xref>.</p>
<p>Unless otherwise specified in the description of a particular function, if a built-in function or <emu-xref href="#constructor" id="_ref_4779"><a href="#constructor">constructor</a></emu-xref>
described is given more arguments than the function is specified to
allow, the extra arguments are evaluated by the call and then ignored by
the function. However, an implementation may define implementation
specific behaviour relating to such arguments as long as the behaviour
is not the throwing of a <emu-val>TypeError</emu-val> exception that is predicated simply on the presence of an extra argument.</p>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>Implementations that add additional capabilities to the set of
built-in functions are encouraged to do so by adding new functions
rather than adding new parameters to existing functions.</p>
</div></emu-note>
<p>Unless otherwise specified every built-in function and every built-in <emu-xref href="#constructor" id="_ref_4780"><a href="#constructor">constructor</a></emu-xref> has the Function prototype object, which is the initial value of the expression <code>Function.prototype</code> (<emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_400"><a href="#sec-properties-of-the-function-prototype-object">19.2.3</a></emu-xref>), as the value of its [[Prototype]] internal slot.</p>
<p>Unless otherwise specified every built-in prototype object has the
Object prototype object, which is the initial value of the expression <code>Object.prototype</code> (<emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_401"><a href="#sec-properties-of-the-object-prototype-object">19.1.3</a></emu-xref>), as the value of its [[Prototype]] internal slot, except the Object prototype object itself.</p>
<p>Built-in function objects that are not identified as constructors
do not implement the [[Construct]] internal method unless otherwise
specified in the description of a particular function.</p>
<p>Each built-in function defined in this specification is created by calling the <emu-xref aoid="CreateBuiltinFunction" id="_ref_4781"><a href="#sec-createbuiltinfunction">CreateBuiltinFunction</a></emu-xref> abstract operation (<emu-xref href="#sec-createbuiltinfunction" id="_ref_402"><a href="#sec-createbuiltinfunction">9.3.3</a></emu-xref>).</p>
<p>Every built-in <emu-xref href="#function-object" id="_ref_4782"><a href="#function-object">function object</a></emu-xref>, including constructors, has a <code>"length"</code>
property whose value is an integer. Unless otherwise specified, this
value is equal to the largest number of named arguments shown in the
subclause headings for the function description. Optional parameters
(which are indicated with brackets: <code>[</code> <code>]</code>) or rest parameters (which are shown using the form «...name») are not included in the default argument count.</p>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>For example, the <emu-xref href="#function-object" id="_ref_4783"><a href="#function-object">function object</a></emu-xref> that is the initial value of the <code>map</code>
property of the Array prototype object is described under the subclause
heading «Array.prototype.map (callbackFn [ , thisArg])» which shows the
two named arguments callbackFn and thisArg, the latter being optional;
therefore the value of the <code>"length"</code> property of that <emu-xref href="#function-object" id="_ref_4784"><a href="#function-object">function object</a></emu-xref> is 1.</p>
</div></emu-note>
<p>Unless otherwise specified, the <code>"length"</code> property of a built-in <emu-xref href="#function-object" id="_ref_4785"><a href="#function-object">function object</a></emu-xref> has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
<p>Every built-in <emu-xref href="#function-object" id="_ref_4786"><a href="#function-object">function object</a></emu-xref>, including constructors, that is not identified as an anonymous function has a <code>name</code>
property whose value is a String. Unless otherwise specified, this
value is the name that is given to the function in this specification.
For functions that are specified as properties of objects, the name
value is the <emu-xref href="#property-name" id="_ref_4787"><a href="#property-name">property name</a></emu-xref> string used to access the function. Functions that are specified as get or set accessor functions of built-in properties have <code>"get "</code> or <code>"set "</code> prepended to the <emu-xref href="#property-name" id="_ref_4788"><a href="#property-name">property name</a></emu-xref> string. The value of the <code>name</code> property is explicitly specified for each built-in functions whose property key is a Symbol value.</p>
<p>Unless otherwise specified, the <code>name</code> property of a built-in <emu-xref href="#function-object" id="_ref_4789"><a href="#function-object">function object</a></emu-xref>, if it exists, has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
<p>Every other <emu-xref href="#sec-object-type" id="_ref_4790"><a href="#sec-object-type">data property</a></emu-xref> described in clauses 18 through 26 and in Annex <emu-xref href="#sec-additional-built-in-properties" id="_ref_403"><a href="#sec-additional-built-in-properties">B.2</a></emu-xref> has the attributes { [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> } unless otherwise specified.</p>
<p>Every <emu-xref href="#sec-object-type" id="_ref_4791"><a href="#sec-object-type">accessor property</a></emu-xref> described in clauses 18 through 26 and in Annex <emu-xref href="#sec-additional-built-in-properties" id="_ref_404"><a href="#sec-additional-built-in-properties">B.2</a></emu-xref> has the attributes { [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> } unless otherwise specified. If only a get accessor function is described, the set accessor function is the default value, <emu-val>undefined</emu-val>. If only a set accessor is described the get accessor is the default value, <emu-val>undefined</emu-val>.</p>
</emu-clause>
<emu-clause id="sec-global-object">
<h1><span class="secnum">18</span>The Global Object</h1>
<p>The <dfn>global object</dfn>:</p>
<ul>
<li>is created before control enters any <emu-xref href="#sec-execution-contexts" id="_ref_4792"><a href="#sec-execution-contexts">execution context</a></emu-xref>.</li>
<li>does not have a [[Construct]] internal method; it cannot be used as a <emu-xref href="#constructor" id="_ref_4793"><a href="#constructor">constructor</a></emu-xref> with the <code>new</code> operator.</li>
<li>does not have a [[Call]] internal method; it cannot be invoked as a function.</li>
<li>has a [[Prototype]] internal slot whose value is implementation-dependent.</li>
<li>may have host defined properties in addition to the properties
defined in this specification. This may include a property whose value
is the global object itself.</li>
</ul>
<emu-clause id="sec-value-properties-of-the-global-object">
<h1><span class="secnum">18.1</span>Value Properties of the Global Object</h1>
<emu-clause id="sec-value-properties-of-the-global-object-infinity">
<h1><span class="secnum">18.1.1</span>Infinity</h1>
<p>The value of <code>Infinity</code> is <emu-val>+∞</emu-val> (see <emu-xref href="#sec-ecmascript-language-types-number-type" id="_ref_405"><a href="#sec-ecmascript-language-types-number-type">6.1.6</a></emu-xref>). This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-value-properties-of-the-global-object-nan">
<h1><span class="secnum">18.1.2</span>NaN</h1>
<p>The value of <code>NaN</code> is <emu-val>NaN</emu-val> (see <emu-xref href="#sec-ecmascript-language-types-number-type" id="_ref_406"><a href="#sec-ecmascript-language-types-number-type">6.1.6</a></emu-xref>). This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-undefined">
<h1><span class="secnum">18.1.3</span>undefined</h1>
<p>The value of <code>undefined</code> is <emu-val>undefined</emu-val> (see <emu-xref href="#sec-ecmascript-language-types-undefined-type" id="_ref_407"><a href="#sec-ecmascript-language-types-undefined-type">6.1.1</a></emu-xref>). This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-function-properties-of-the-global-object">
<h1><span class="secnum">18.2</span>Function Properties of the Global Object</h1>
<emu-clause id="sec-eval-x">
<h1><span class="secnum">18.2.1</span>eval ( <var>x</var> )</h1>
<p>The <code>eval</code> function is the <dfn>%eval%</dfn> intrinsic object. When the <code>eval</code> function is called with one argument <var>x</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_4794"><a href="#assert">Assert</a></emu-xref>: The <emu-xref href="#execution-context-stack" id="_ref_4795"><a href="#execution-context-stack">execution context stack</a></emu-xref> has at least two elements.</li><li>Let <var>callerContext</var> be the second to top element of the <emu-xref href="#execution-context-stack" id="_ref_4796"><a href="#execution-context-stack">execution context stack</a></emu-xref>.</li><li>Let <var>callerRealm</var> be <var>callerContext</var>'s <emu-xref href="#realm" id="_ref_4797"><a href="#realm">Realm</a></emu-xref>.</li><li>Let <var>calleeRealm</var> be <emu-xref href="#current-realm" id="_ref_4798"><a href="#current-realm">the current Realm Record</a></emu-xref>.</li><li>Perform ?&nbsp;<emu-xref aoid="HostEnsureCanCompileStrings" id="_ref_4799"><a href="#sec-hostensurecancompilestrings">HostEnsureCanCompileStrings</a></emu-xref>(<var>callerRealm</var>, <var>calleeRealm</var>).</li><li>Return ?&nbsp;<emu-xref aoid="PerformEval" id="_ref_4800"><a href="#sec-performeval">PerformEval</a></emu-xref>(<var>x</var>, <var>calleeRealm</var>, <emu-val>false</emu-val>, <emu-val>false</emu-val>).
</li></ol></emu-alg>
<emu-clause id="sec-performeval" aoid="PerformEval">
<h1><span class="secnum">18.2.1.1</span>Runtime Semantics: PerformEval ( <var>x</var>, <var>evalRealm</var>, <var>strictCaller</var>, <var>direct</var> )</h1>
<p>The abstract operation PerformEval with arguments <var>x</var>, <var>evalRealm</var>, <var>strictCaller</var>, and <var>direct</var> performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_4801"><a href="#assert">Assert</a></emu-xref>: If <var>direct</var> is <emu-val>false</emu-val>, then <var>strictCaller</var> is also <emu-val>false</emu-val>.</li><li>If <emu-xref aoid="Type" id="_ref_4802"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>x</var>) is not String, return <var>x</var>.</li><li>Let <var>thisEnvRec</var> be !&nbsp;<emu-xref aoid="GetThisEnvironment" id="_ref_4803"><a href="#sec-getthisenvironment">GetThisEnvironment</a></emu-xref>().</li><li>If <var>thisEnvRec</var> is a <emu-xref href="#sec-function-environment-records" id="_ref_4804"><a href="#sec-function-environment-records">function Environment Record</a></emu-xref>, then<ol><li>Let <var>F</var> be <var>thisEnvRec</var>.[[FunctionObject]].</li><li>Let <var>inFunction</var> be <emu-val>true</emu-val>.</li><li>Let <var>inMethod</var> be <var>thisEnvRec</var>.HasSuperBinding().</li><li>If <var>F</var>.[[ConstructorKind]] is <code>"derived"</code>, let <var>inDerivedConstructor</var> be <emu-val>true</emu-val>; otherwise, let <var>inDerivedConstructor</var> be <emu-val>false</emu-val>.</li></ol></li><li>Else,<ol><li>Let <var>inFunction</var> be <emu-val>false</emu-val>.</li><li>Let <var>inMethod</var> be <emu-val>false</emu-val>.</li><li>Let <var>inDerivedConstructor</var> be <emu-val>false</emu-val>.</li></ol></li><li>Let <var>script</var> be the ECMAScript code that is the result of parsing <var>x</var>, interpreted as UTF-16 encoded Unicode text as described in <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_408"><a href="#sec-ecmascript-language-types-string-type">6.1.4</a></emu-xref>, for the <emu-xref href="#sec-context-free-grammars" id="_ref_4805"><a href="#sec-context-free-grammars">goal symbol</a></emu-xref> <emu-nt id="_ref_14291"><a href="#prod-Script">Script</a></emu-nt>. If <var>inFunction</var> is <emu-val>false</emu-val>, additional <emu-xref href="#early-error" id="_ref_4806"><a href="#early-error">early error</a></emu-xref> rules from <emu-xref href="#sec-performeval-rules-outside-functions" id="_ref_409"><a href="#sec-performeval-rules-outside-functions">18.2.1.1.1</a></emu-xref> are applied. If <var>inMethod</var> is <emu-val>false</emu-val>, additional <emu-xref href="#early-error" id="_ref_4807"><a href="#early-error">early error</a></emu-xref> rules from <emu-xref href="#sec-performeval-rules-outside-methods" id="_ref_410"><a href="#sec-performeval-rules-outside-methods">18.2.1.1.2</a></emu-xref> are applied. If <var>inDerivedConstructor</var> is <emu-val>false</emu-val>, additional <emu-xref href="#early-error" id="_ref_4808"><a href="#early-error">early error</a></emu-xref> rules from <emu-xref href="#sec-performeval-rules-outside-constructors" id="_ref_411"><a href="#sec-performeval-rules-outside-constructors">18.2.1.1.3</a></emu-xref> are applied. If the parse fails, throw a <emu-val>SyntaxError</emu-val> exception. If any early errors are detected, throw a <emu-val>SyntaxError</emu-val> or a <emu-val>ReferenceError</emu-val> exception, depending on the type of the error (but see also clause <emu-xref href="#sec-error-handling-and-language-extensions" id="_ref_412"><a href="#sec-error-handling-and-language-extensions">16</a></emu-xref>). Parsing and <emu-xref href="#early-error" id="_ref_4809"><a href="#early-error">early error</a></emu-xref> detection may be interweaved in an implementation-dependent manner.</li><li>If <var>script</var> Contains <emu-nt id="_ref_14292"><a href="#prod-ScriptBody">ScriptBody</a></emu-nt> is <emu-val>false</emu-val>, return <emu-val>undefined</emu-val>.</li><li>Let <var>body</var> be the <emu-nt id="_ref_14293"><a href="#prod-ScriptBody">ScriptBody</a></emu-nt> of <var>script</var>.</li><li>If <var>strictCaller</var> is <emu-val>true</emu-val>, let <var>strictEval</var> be <emu-val>true</emu-val>.</li><li>Else, let <var>strictEval</var> be IsStrict of <var>script</var>.</li><li>Let <var>ctx</var> be the <emu-xref href="#running-execution-context" id="_ref_4810"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>NOTE: If <var>direct</var> is <emu-val>true</emu-val>, <var>ctx</var> will be the <emu-xref href="#sec-execution-contexts" id="_ref_4811"><a href="#sec-execution-contexts">execution context</a></emu-xref> that performed the <emu-xref href="#sec-function-calls-runtime-semantics-evaluation" id="_ref_4812"><a href="#sec-function-calls-runtime-semantics-evaluation">direct eval</a></emu-xref>. If <var>direct</var> is <emu-val>false</emu-val>, <var>ctx</var> will be the <emu-xref href="#sec-execution-contexts" id="_ref_4813"><a href="#sec-execution-contexts">execution context</a></emu-xref> for the invocation of the <code>eval</code> function.</li><li>If <var>direct</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>lexEnv</var> be <emu-xref aoid="NewDeclarativeEnvironment" id="_ref_4814"><a href="#sec-newdeclarativeenvironment">NewDeclarativeEnvironment</a></emu-xref>(<var>ctx</var>'s LexicalEnvironment).</li><li>Let <var>varEnv</var> be <var>ctx</var>'s VariableEnvironment.</li></ol></li><li>Else,<ol><li>Let <var>lexEnv</var> be <emu-xref aoid="NewDeclarativeEnvironment" id="_ref_4815"><a href="#sec-newdeclarativeenvironment">NewDeclarativeEnvironment</a></emu-xref>(<var>evalRealm</var>.[[GlobalEnv]]).</li><li>Let <var>varEnv</var> be <var>evalRealm</var>.[[GlobalEnv]].</li></ol></li><li>If <var>strictEval</var> is <emu-val>true</emu-val>, set <var>varEnv</var> to <var>lexEnv</var>.</li><li>If <var>ctx</var> is not already suspended, suspend <var>ctx</var>.</li><li>Let <var>evalCxt</var> be a new ECMAScript code <emu-xref href="#sec-execution-contexts" id="_ref_4816"><a href="#sec-execution-contexts">execution context</a></emu-xref>.</li><li>Set the <var>evalCxt</var>'s Function to <emu-val>null</emu-val>.</li><li>Set the <var>evalCxt</var>'s <emu-xref href="#realm" id="_ref_4817"><a href="#realm">Realm</a></emu-xref> to <var>evalRealm</var>.</li><li>Set the <var>evalCxt</var>'s ScriptOrModule to <var>ctx</var>'s ScriptOrModule.</li><li>Set the <var>evalCxt</var>'s VariableEnvironment to <var>varEnv</var>.</li><li>Set the <var>evalCxt</var>'s LexicalEnvironment to <var>lexEnv</var>.</li><li>Push <var>evalCxt</var> on to the <emu-xref href="#execution-context-stack" id="_ref_4818"><a href="#execution-context-stack">execution context stack</a></emu-xref>; <var>evalCxt</var> is now the <emu-xref href="#running-execution-context" id="_ref_4819"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Let <var>result</var> be <emu-xref aoid="EvalDeclarationInstantiation" id="_ref_4820"><a href="#sec-evaldeclarationinstantiation">EvalDeclarationInstantiation</a></emu-xref>(<var>body</var>, <var>varEnv</var>, <var>lexEnv</var>, <var>strictEval</var>).</li><li>If <var>result</var>.[[Type]] is <emu-const>normal</emu-const>, then<ol><li>Set <var>result</var> to the result of evaluating <var>body</var>.</li></ol></li><li>If <var>result</var>.[[Type]] is <emu-const>normal</emu-const> and <var>result</var>.[[Value]] is <emu-const>empty</emu-const>, then<ol><li>Set <var>result</var> to <emu-xref aoid="NormalCompletion" id="_ref_4821"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-val>undefined</emu-val>).</li></ol></li><li><emu-xref aoid="Suspend" id="_ref_4822"><a href="#sec-suspend">Suspend</a></emu-xref> <var>evalCxt</var> and remove it from the <emu-xref href="#execution-context-stack" id="_ref_4823"><a href="#execution-context-stack">execution context stack</a></emu-xref>.</li><li>Resume the context that is now on the top of the <emu-xref href="#execution-context-stack" id="_ref_4824"><a href="#execution-context-stack">execution context stack</a></emu-xref> as the <emu-xref href="#running-execution-context" id="_ref_4825"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Return <emu-xref aoid="Completion" id="_ref_4826"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>result</var>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The eval code cannot instantiate variable or function
bindings in the variable environment of the calling context that invoked
the eval if the calling context is evaluating formal parameter
initializers or if either the code of the calling context or the eval
code is <emu-xref href="#sec-strict-mode-code" id="_ref_4827"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>.
Instead such bindings are instantiated in a new VariableEnvironment
that is only accessible to the eval code. Bindings introduced by <code>let</code>, <code>const</code>, or <code>class</code> declarations are always instantiated in a new LexicalEnvironment.</p>
</div></emu-note>
<emu-clause id="sec-performeval-rules-outside-functions">
<h1><span class="secnum">18.2.1.1.1</span>Additional Early Error Rules for Eval Outside Functions</h1>
<p>These <emu-xref href="#sec-static-semantic-rules" id="_ref_4828"><a href="#sec-static-semantic-rules">static semantics</a></emu-xref> are applied by <emu-xref aoid="PerformEval" id="_ref_4829"><a href="#sec-performeval">PerformEval</a></emu-xref> when a <emu-xref href="#sec-function-calls-runtime-semantics-evaluation" id="_ref_4830"><a href="#sec-function-calls-runtime-semantics-evaluation">direct eval</a></emu-xref> call occurs outside of any function.</p>
<emu-grammar><emu-production name="ScriptBody" collapsed="">
<emu-nt><a href="#prod-ScriptBody">ScriptBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cf403a0c"><emu-nt id="_ref_14294"><a href="#prod-StatementList">StatementList</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>It is a Syntax Error if <emu-nt id="_ref_14295"><a href="#prod-StatementList">StatementList</a></emu-nt> Contains <emu-nt id="_ref_14296"><a href="#prod-NewTarget">NewTarget</a></emu-nt>.</li>
</ul>
</emu-clause>
<emu-clause id="sec-performeval-rules-outside-methods">
<h1><span class="secnum">18.2.1.1.2</span>Additional Early Error Rules for Eval Outside Methods</h1>
<p>These <emu-xref href="#sec-static-semantic-rules" id="_ref_4831"><a href="#sec-static-semantic-rules">static semantics</a></emu-xref> are applied by <emu-xref aoid="PerformEval" id="_ref_4832"><a href="#sec-performeval">PerformEval</a></emu-xref> when a <emu-xref href="#sec-function-calls-runtime-semantics-evaluation" id="_ref_4833"><a href="#sec-function-calls-runtime-semantics-evaluation">direct eval</a></emu-xref> call occurs outside of a <emu-nt id="_ref_14297"><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt>.</p>
<emu-grammar><emu-production name="ScriptBody" collapsed="">
<emu-nt><a href="#prod-ScriptBody">ScriptBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cf403a0c"><emu-nt id="_ref_14298"><a href="#prod-StatementList">StatementList</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>It is a Syntax Error if <emu-nt id="_ref_14299"><a href="#prod-StatementList">StatementList</a></emu-nt> Contains <emu-nt id="_ref_14300"><a href="#prod-SuperProperty">SuperProperty</a></emu-nt>.</li>
</ul>
</emu-clause>
<emu-clause id="sec-performeval-rules-outside-constructors">
<h1><span class="secnum">18.2.1.1.3</span>Additional Early Error Rules for Eval Outside Constructor Methods</h1>
<p>These <emu-xref href="#sec-static-semantic-rules" id="_ref_4834"><a href="#sec-static-semantic-rules">static semantics</a></emu-xref> are applied by <emu-xref aoid="PerformEval" id="_ref_4835"><a href="#sec-performeval">PerformEval</a></emu-xref> when a <emu-xref href="#sec-function-calls-runtime-semantics-evaluation" id="_ref_4836"><a href="#sec-function-calls-runtime-semantics-evaluation">direct eval</a></emu-xref> call occurs outside of the <emu-xref href="#sec-static-semantics-constructormethod" id="_ref_413"><a href="#sec-static-semantics-constructormethod">constructor method</a></emu-xref> of a <emu-nt id="_ref_14301"><a href="#prod-ClassDeclaration">ClassDeclaration</a></emu-nt> or <emu-nt id="_ref_14302"><a href="#prod-ClassExpression">ClassExpression</a></emu-nt>.</p>
<emu-grammar><emu-production name="ScriptBody" collapsed="">
<emu-nt><a href="#prod-ScriptBody">ScriptBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cf403a0c"><emu-nt id="_ref_14303"><a href="#prod-StatementList">StatementList</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>It is a Syntax Error if <emu-nt id="_ref_14304"><a href="#prod-StatementList">StatementList</a></emu-nt> Contains <emu-nt id="_ref_14305"><a href="#prod-SuperCall">SuperCall</a></emu-nt>.</li>
</ul>
</emu-clause>
</emu-clause>
<emu-clause id="sec-hostensurecancompilestrings" aoid="HostEnsureCanCompileStrings">
<h1><span class="secnum">18.2.1.2</span>HostEnsureCanCompileStrings ( <var>callerRealm</var>, <var>calleeRealm</var> )</h1>
<p>HostEnsureCanCompileStrings is an implementation-defined
abstract operation that allows host environments to block certain
ECMAScript functions which allow developers to compile strings into
ECMAScript code.</p>
<p>An implementation of HostEnsureCanCompileStrings may complete
normally or abruptly. Any abrupt completions will be propagated to its
callers. The default implementation of HostEnsureCanCompileStrings is to
unconditionally return an empty normal completion.</p>
</emu-clause>
<emu-clause id="sec-evaldeclarationinstantiation" aoid="EvalDeclarationInstantiation">
<h1><span class="secnum">18.2.1.3</span>Runtime Semantics: EvalDeclarationInstantiation ( <var>body</var>, <var>varEnv</var>, <var>lexEnv</var>, <var>strict</var> )</h1>
<p>When the abstract operation EvalDeclarationInstantiation is called with arguments <var>body</var>, <var>varEnv</var>, <var>lexEnv</var>, and <var>strict</var>, the following steps are taken:</p>
<!--
WARNING: If you add, remove, rename, or repurpose any variable names
within this algorithm, you may need to update
#sec-web-compat-evaldeclarationinstantiation and
#sec-variablestatements-in-catch-blocks accordingly.
-->
<emu-alg><ol><li>Let <var>varNames</var> be the VarDeclaredNames of <var>body</var>.</li><li>Let <var>varDeclarations</var> be the VarScopedDeclarations of <var>body</var>.</li><li>Let <var>lexEnvRec</var> be <var>lexEnv</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_4837"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref>.</li><li>Let <var>varEnvRec</var> be <var>varEnv</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_4838"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref>.</li><li>If <var>strict</var> is <emu-val>false</emu-val>, then<ol><li>If <var>varEnvRec</var> is a global <emu-xref href="#sec-environment-records" id="_ref_4839"><a href="#sec-environment-records">Environment Record</a></emu-xref>, then<ol><li>For each <var>name</var> in <var>varNames</var>, do<ol><li>If <var>varEnvRec</var>.HasLexicalDeclaration(<var>name</var>) is <emu-val>true</emu-val>, throw a <emu-val>SyntaxError</emu-val> exception.</li><li>NOTE: <code>eval</code> will not create a global var declaration that would be shadowed by a global lexical declaration.</li></ol></li></ol></li><li>Let <var>thisLex</var> be <var>lexEnv</var>.</li><li><emu-xref href="#assert" id="_ref_4840"><a href="#assert">Assert</a></emu-xref>: The following loop will terminate.</li><li>Repeat, while <var>thisLex</var> is not the same as <var>varEnv</var>,<ol><li>Let <var>thisEnvRec</var> be <var>thisLex</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_4841"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref>.</li><li>If <var>thisEnvRec</var> is not an object <emu-xref href="#sec-environment-records" id="_ref_4842"><a href="#sec-environment-records">Environment Record</a></emu-xref>, then<ol><li>NOTE:
The environment of with statements cannot contain any lexical
declaration so it doesn't need to be checked for var/let hoisting
conflicts.</li><li>For each <var>name</var> in <var>varNames</var>, do<ol><li>If <var>thisEnvRec</var>.HasBinding(<var>name</var>) is <emu-val>true</emu-val>, then<ol><li>Throw a <emu-val>SyntaxError</emu-val> exception.</li><li>NOTE: Annex <emu-xref href="#sec-variablestatements-in-catch-blocks" id="_ref_414"><a href="#sec-variablestatements-in-catch-blocks">B.3.5</a></emu-xref> defines alternate semantics for the above step.</li></ol></li><li>NOTE: A <emu-xref href="#sec-function-calls-runtime-semantics-evaluation" id="_ref_4843"><a href="#sec-function-calls-runtime-semantics-evaluation">direct eval</a></emu-xref> will not hoist var declaration over a like-named lexical declaration.</li></ol></li></ol></li><li>Set <var>thisLex</var> to <var>thisLex</var>'s outer environment reference.</li></ol></li></ol></li><li>Let <var>functionsToInitialize</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4844"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>declaredFunctionNames</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4845"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>For each <var>d</var> in <var>varDeclarations</var>, in reverse list order, do<ol><li>If <var>d</var> is neither a <emu-nt id="_ref_14306"><a href="#prod-VariableDeclaration">VariableDeclaration</a></emu-nt> nor a <emu-nt id="_ref_14307"><a href="#prod-ForBinding">ForBinding</a></emu-nt> nor a <emu-nt id="_ref_14308"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt>, then<ol><li><emu-xref href="#assert" id="_ref_4846"><a href="#assert">Assert</a></emu-xref>: <var>d</var> is either a <emu-nt id="_ref_14309"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>, a <emu-nt id="_ref_14310"><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a></emu-nt>, an <emu-nt id="_ref_14311"><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt>, or an <emu-nt id="_ref_14312"><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt>.</li><li>NOTE: If there are multiple function declarations for the same name, the last declaration is used.</li><li>Let <var>fn</var> be the sole element of the BoundNames of <var>d</var>.</li><li>If <var>fn</var> is not an element of <var>declaredFunctionNames</var>, then<ol><li>If <var>varEnvRec</var> is a global <emu-xref href="#sec-environment-records" id="_ref_4847"><a href="#sec-environment-records">Environment Record</a></emu-xref>, then<ol><li>Let <var>fnDefinable</var> be ? <var>varEnvRec</var>.CanDeclareGlobalFunction(<var>fn</var>).</li><li>If <var>fnDefinable</var> is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li></ol></li><li>Append <var>fn</var> to <var>declaredFunctionNames</var>.</li><li>Insert <var>d</var> as the first element of <var>functionsToInitialize</var>.</li></ol></li></ol></li></ol></li><li>NOTE: Annex <emu-xref href="#sec-web-compat-evaldeclarationinstantiation" id="_ref_415"><a href="#sec-web-compat-evaldeclarationinstantiation">B.3.3.3</a></emu-xref> adds additional steps at this point.</li><li>Let <var>declaredVarNames</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4848"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>For each <var>d</var> in <var>varDeclarations</var>, do<ol><li>If <var>d</var> is a <emu-nt id="_ref_14313"><a href="#prod-VariableDeclaration">VariableDeclaration</a></emu-nt>, a <emu-nt id="_ref_14314"><a href="#prod-ForBinding">ForBinding</a></emu-nt>, or a <emu-nt id="_ref_14315"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt>, then<ol><li>For each String <var>vn</var> in the BoundNames of <var>d</var>, do<ol><li>If <var>vn</var> is not an element of <var>declaredFunctionNames</var>, then<ol><li>If <var>varEnvRec</var> is a global <emu-xref href="#sec-environment-records" id="_ref_4849"><a href="#sec-environment-records">Environment Record</a></emu-xref>, then<ol><li>Let <var>vnDefinable</var> be ? <var>varEnvRec</var>.CanDeclareGlobalVar(<var>vn</var>).</li><li>If <var>vnDefinable</var> is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li></ol></li><li>If <var>vn</var> is not an element of <var>declaredVarNames</var>, then<ol><li>Append <var>vn</var> to <var>declaredVarNames</var>.</li></ol></li></ol></li></ol></li></ol></li></ol></li><li>NOTE: No abnormal terminations occur after this algorithm step unless <var>varEnvRec</var> is a global <emu-xref href="#sec-environment-records" id="_ref_4850"><a href="#sec-environment-records">Environment Record</a></emu-xref> and the <emu-xref href="#sec-global-object" id="_ref_4851"><a href="#sec-global-object">global object</a></emu-xref> is a Proxy <emu-xref href="#exotic-object" id="_ref_4852"><a href="#exotic-object">exotic object</a></emu-xref>.</li><li>Let <var>lexDeclarations</var> be the LexicallyScopedDeclarations of <var>body</var>.</li><li>For each element <var>d</var> in <var>lexDeclarations</var>, do<ol><li>NOTE: Lexically declared names are only instantiated here but not initialized.</li><li>For each element <var>dn</var> of the BoundNames of <var>d</var>, do<ol><li>If IsConstantDeclaration of <var>d</var> is <emu-val>true</emu-val>, then<ol><li>Perform ? <var>lexEnvRec</var>.CreateImmutableBinding(<var>dn</var>, <emu-val>true</emu-val>).</li></ol></li><li>Else,<ol><li>Perform ? <var>lexEnvRec</var>.CreateMutableBinding(<var>dn</var>, <emu-val>false</emu-val>).</li></ol></li></ol></li></ol></li><li>For each <emu-xref href="#sec-syntactic-grammar" id="_ref_4853"><a href="#sec-syntactic-grammar">Parse Node</a></emu-xref> <var>f</var> in <var>functionsToInitialize</var>, do<ol><li>Let <var>fn</var> be the sole element of the BoundNames of <var>f</var>.</li><li>Let <var>fo</var> be the result of performing InstantiateFunctionObject for <var>f</var> with argument <var>lexEnv</var>.</li><li>If <var>varEnvRec</var> is a global <emu-xref href="#sec-environment-records" id="_ref_4854"><a href="#sec-environment-records">Environment Record</a></emu-xref>, then<ol><li>Perform ? <var>varEnvRec</var>.CreateGlobalFunctionBinding(<var>fn</var>, <var>fo</var>, <emu-val>true</emu-val>).</li></ol></li><li>Else,<ol><li>Let <var>bindingExists</var> be <var>varEnvRec</var>.HasBinding(<var>fn</var>).</li><li>If <var>bindingExists</var> is <emu-val>false</emu-val>, then<ol><li>Let <var>status</var> be ! <var>varEnvRec</var>.CreateMutableBinding(<var>fn</var>, <emu-val>true</emu-val>).</li><li><emu-xref href="#assert" id="_ref_4855"><a href="#assert">Assert</a></emu-xref>: <var>status</var> is not an <emu-xref href="#sec-completion-record-specification-type" id="_ref_4856"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref> because of validation preceding step 12.</li><li>Perform ! <var>varEnvRec</var>.InitializeBinding(<var>fn</var>, <var>fo</var>).</li></ol></li><li>Else,<ol><li>Perform ! <var>varEnvRec</var>.SetMutableBinding(<var>fn</var>, <var>fo</var>, <emu-val>false</emu-val>).</li></ol></li></ol></li></ol></li><li>For each String <var>vn</var> in <var>declaredVarNames</var>, in list order, do<ol><li>If <var>varEnvRec</var> is a global <emu-xref href="#sec-environment-records" id="_ref_4857"><a href="#sec-environment-records">Environment Record</a></emu-xref>, then<ol><li>Perform ? <var>varEnvRec</var>.CreateGlobalVarBinding(<var>vn</var>, <emu-val>true</emu-val>).</li></ol></li><li>Else,<ol><li>Let <var>bindingExists</var> be <var>varEnvRec</var>.HasBinding(<var>vn</var>).</li><li>If <var>bindingExists</var> is <emu-val>false</emu-val>, then<ol><li>Let <var>status</var> be ! <var>varEnvRec</var>.CreateMutableBinding(<var>vn</var>, <emu-val>true</emu-val>).</li><li><emu-xref href="#assert" id="_ref_4858"><a href="#assert">Assert</a></emu-xref>: <var>status</var> is not an <emu-xref href="#sec-completion-record-specification-type" id="_ref_4859"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref> because of validation preceding step 12.</li><li>Perform ! <var>varEnvRec</var>.InitializeBinding(<var>vn</var>, <emu-val>undefined</emu-val>).</li></ol></li></ol></li></ol></li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_4860"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>An alternative version of this algorithm is described in <emu-xref href="#sec-variablestatements-in-catch-blocks" id="_ref_416"><a href="#sec-variablestatements-in-catch-blocks">B.3.5</a></emu-xref>.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-isfinite-number">
<h1><span class="secnum">18.2.2</span>isFinite ( <var>number</var> )</h1>
<p>The <code>isFinite</code> function is the <dfn>%isFinite%</dfn> intrinsic object. When the <code>isFinite</code> function is called with one argument <var>number</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>num</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_4861"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>number</var>).</li><li>If <var>num</var> is <emu-val>NaN</emu-val>, <emu-val>+∞</emu-val>, or <emu-val>-∞</emu-val>, return <emu-val>false</emu-val>.</li><li>Otherwise, return <emu-val>true</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-isnan-number">
<h1><span class="secnum">18.2.3</span>isNaN ( <var>number</var> )</h1>
<p>The <code>isNaN</code> function is the <dfn>%isNaN%</dfn> intrinsic object. When the <code>isNaN</code> function is called with one argument <var>number</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>num</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_4862"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>number</var>).</li><li>If <var>num</var> is <emu-val>NaN</emu-val>, return <emu-val>true</emu-val>.</li><li>Otherwise, return <emu-val>false</emu-val>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>A reliable way for ECMAScript code to test if a value <code>X</code> is a <emu-val>NaN</emu-val> is an expression of the form <code>X !== X</code>. The result will be <emu-val>true</emu-val> if and only if <code>X</code> is a <emu-val>NaN</emu-val>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-parsefloat-string">
<h1><span class="secnum">18.2.4</span>parseFloat ( <var>string</var> )</h1>
<p>The <code>parseFloat</code> function produces a Number value dictated by interpretation of the contents of the <var>string</var> argument as a decimal literal.</p>
<p>The <code>parseFloat</code> function is the <dfn>%parseFloat%</dfn> intrinsic object. When the <code>parseFloat</code> function is called with one argument <var>string</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>inputString</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_4863"><a href="#sec-tostring">ToString</a></emu-xref>(<var>string</var>).</li><li>Let <var>trimmedString</var> be a substring of <var>inputString</var> consisting of the leftmost code unit that is not a <emu-nt id="_ref_14316"><a href="#prod-StrWhiteSpaceChar">StrWhiteSpaceChar</a></emu-nt> and all code units to the right of that code unit. (In other words, remove leading white space.) If <var>inputString</var> does not contain any such code units, let <var>trimmedString</var> be the empty string.</li><li>If neither <var>trimmedString</var> nor any prefix of <var>trimmedString</var> satisfies the syntax of a <emu-nt id="_ref_14317"><a href="#prod-StrDecimalLiteral">StrDecimalLiteral</a></emu-nt> (see <emu-xref href="#sec-tonumber-applied-to-the-string-type" id="_ref_417"><a href="#sec-tonumber-applied-to-the-string-type">7.1.3.1</a></emu-xref>), return <emu-val>NaN</emu-val>.</li><li>Let <var>numberString</var> be the longest prefix of <var>trimmedString</var>, which might be <var>trimmedString</var> itself, that satisfies the syntax of a <emu-nt id="_ref_14318"><a href="#prod-StrDecimalLiteral">StrDecimalLiteral</a></emu-nt>.</li><li>Let <var>mathFloat</var> be MV of <var>numberString</var>.</li><li>If <var>mathFloat</var> = 0, then<ol><li>If the first code unit of <var>trimmedString</var> is the code unit 0x002D (HYPHEN-MINUS), return <emu-val>-0</emu-val>.</li><li>Return <emu-val>+0</emu-val>.</li></ol></li><li>Return the Number value for <var>mathFloat</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p><code>parseFloat</code> may interpret only a leading portion of <var>string</var>
as a Number value; it ignores any code units that cannot be interpreted
as part of the notation of a decimal literal, and no indication is
given that any such code units were ignored.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-parseint-string-radix">
<h1><span class="secnum">18.2.5</span>parseInt ( <var>string</var>, <var>radix</var> )</h1>
<p>The <code>parseInt</code> function produces an integer value dictated by interpretation of the contents of the <var>string</var> argument according to the specified <var>radix</var>. Leading white space in <var>string</var> is ignored. If <var>radix</var> is <emu-val>undefined</emu-val> or 0, it is assumed to be 10 except when the number begins with the code unit pairs <code>0x</code> or <code>0X</code>, in which case a radix of 16 is assumed. If <var>radix</var> is 16, the number may also optionally begin with the code unit pairs <code>0x</code> or <code>0X</code>.</p>
<p>The <code>parseInt</code> function is the <dfn>%parseInt%</dfn> intrinsic object. When the <code>parseInt</code> function is called, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>inputString</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_4864"><a href="#sec-tostring">ToString</a></emu-xref>(<var>string</var>).</li><li>Let <var>S</var> be a newly created substring of <var>inputString</var> consisting of the first code unit that is not a <emu-nt id="_ref_14319"><a href="#prod-StrWhiteSpaceChar">StrWhiteSpaceChar</a></emu-nt> and all code units following that code unit. (In other words, remove leading white space.) If <var>inputString</var> does not contain any such code unit, let <var>S</var> be the empty string.</li><li>Let <var>sign</var> be 1.</li><li>If <var>S</var> is not empty and the first code unit of <var>S</var> is the code unit 0x002D (HYPHEN-MINUS), set <var>sign</var> to -1.</li><li>If <var>S</var> is not empty and the first code unit of <var>S</var> is the code unit 0x002B (PLUS SIGN) or the code unit 0x002D (HYPHEN-MINUS), remove the first code unit from <var>S</var>.</li><li>Let <var>R</var> be ?&nbsp;<emu-xref aoid="ToInt32" id="_ref_4865"><a href="#sec-toint32">ToInt32</a></emu-xref>(<var>radix</var>).</li><li>Let <var>stripPrefix</var> be <emu-val>true</emu-val>.</li><li>If <var>R</var> ≠ 0, then<ol><li>If <var>R</var> &lt; 2 or <var>R</var> &gt; 36, return <emu-val>NaN</emu-val>.</li><li>If <var>R</var> ≠ 16, set <var>stripPrefix</var> to <emu-val>false</emu-val>.</li></ol></li><li>Else <var>R</var> = 0,<ol><li>Set <var>R</var> to 10.</li></ol></li><li>If <var>stripPrefix</var> is <emu-val>true</emu-val>, then<ol><li>If the length of <var>S</var> is at least 2 and the first two code units of <var>S</var> are either <code>"0x"</code> or <code>"0X"</code>, then<ol><li>Remove the first two code units from <var>S</var>.</li><li>Set <var>R</var> to 16.</li></ol></li></ol></li><li>If <var>S</var> contains a code unit that is not a radix-<var>R</var> digit, let <var>Z</var> be the substring of <var>S</var> consisting of all code units before the first such code unit; otherwise, let <var>Z</var> be <var>S</var>.</li><li>If <var>Z</var> is empty, return <emu-val>NaN</emu-val>.</li><li>Let <var>mathInt</var> be the mathematical integer value that is represented by <var>Z</var> in radix-<var>R</var> notation, using the letters <b>A</b>-<b>Z</b> and <b>a</b>-<b>z</b> for digits with values 10 through 35. (However, if <var>R</var> is 10 and <var>Z</var>
contains more than 20 significant digits, every significant digit after
the 20th may be replaced by a 0 digit, at the option of the
implementation; and if <var>R</var> is not 2, 4, 8, 10, 16, or 32, then <var>mathInt</var> may be an implementation-dependent approximation to the mathematical integer value that is represented by <var>Z</var> in radix-<var>R</var> notation.)</li><li>If <var>mathInt</var> = 0, then<ol><li>If <var>sign</var> = -1, return <emu-val>-0</emu-val>.</li><li>Return <emu-val>+0</emu-val>.</li></ol></li><li>Let <var>number</var> be the Number value for <var>mathInt</var>.</li><li>Return <var>sign</var> × <var>number</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p><code>parseInt</code> may interpret only a leading portion of <var>string</var>
as an integer value; it ignores any code units that cannot be
interpreted as part of the notation of an integer, and no indication is
given that any such code units were ignored.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-uri-handling-functions">
<h1><span class="secnum">18.2.6</span>URI Handling Functions</h1>
<p>Uniform Resource Identifiers, or URIs, are Strings that
identify resources (e.g. web pages or files) and transport protocols by
which to access them (e.g. HTTP or FTP) on the Internet. The ECMAScript
language itself does not provide any support for using URIs except for
functions that encode and decode URIs as described in <emu-xref href="#sec-decodeuri-encodeduri" id="_ref_418"><a href="#sec-decodeuri-encodeduri">18.2.6.2</a></emu-xref>, <emu-xref href="#sec-decodeuricomponent-encodeduricomponent" id="_ref_419"><a href="#sec-decodeuricomponent-encodeduricomponent">18.2.6.3</a></emu-xref>, <emu-xref href="#sec-encodeuri-uri" id="_ref_420"><a href="#sec-encodeuri-uri">18.2.6.4</a></emu-xref> and <emu-xref href="#sec-encodeuricomponent-uricomponent" id="_ref_421"><a href="#sec-encodeuricomponent-uricomponent">18.2.6.5</a></emu-xref></p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Many implementations of ECMAScript provide additional
functions and methods that manipulate web pages; these functions are
beyond the scope of this standard.</p>
</div></emu-note>
<emu-clause id="sec-uri-syntax-and-semantics">
<h1><span class="secnum">18.2.6.1</span>URI Syntax and Semantics</h1>
<p>A URI is composed of a sequence of components separated by component separators. The general form is:</p>
<div class="rhs">
<emu-nt>Scheme</emu-nt> <code>:</code> <emu-nt>First</emu-nt> <code>/</code> <emu-nt>Second</emu-nt> <code>;</code> <emu-nt>Third</emu-nt> <code>?</code> <emu-nt>Fourth</emu-nt>
</div>
<p>where the italicized names represent components and “<code>:</code>”, “<code>/</code>”, “<code>;</code>” and “<code>?</code>” are reserved for use as separators. The <code>encodeURI</code> and <code>decodeURI</code>
functions are intended to work with complete URIs; they assume that any
reserved code units in the URI are intended to have special meaning and
so are not encoded. The <code>encodeURIComponent</code> and <code>decodeURIComponent</code>
functions are intended to work with the individual component parts of a
URI; they assume that any reserved code units represent text and so
must be encoded so that they are not interpreted as reserved code units
when the component is part of a complete URI.</p>
<p>The following lexical grammar specifies the form of encoded URIs.</p>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="uri" type="regexp" id="prod-uri">
<emu-nt><a href="#prod-uri">uri</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="0a700980"><emu-nt optional="" id="_ref_14320"><a href="#prod-uriCharacters">uriCharacters</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="uriCharacters" type="regexp" id="prod-uriCharacters">
<emu-nt><a href="#prod-uriCharacters">uriCharacters</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="1440f450"><emu-nt id="_ref_14321"><a href="#prod-uriCharacter">uriCharacter</a></emu-nt><emu-nt optional="" id="_ref_14322"><a href="#prod-uriCharacters">uriCharacters</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="uriCharacter" type="regexp" id="prod-uriCharacter">
<emu-nt><a href="#prod-uriCharacter">uriCharacter</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="345fa263"><emu-nt id="_ref_14323"><a href="#prod-uriReserved">uriReserved</a></emu-nt></emu-rhs>
<emu-rhs a="032a420c"><emu-nt id="_ref_14324"><a href="#prod-uriUnescaped">uriUnescaped</a></emu-nt></emu-rhs>
<emu-rhs a="c9e0cc22"><emu-nt id="_ref_14325"><a href="#prod-uriEscaped">uriEscaped</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="uriReserved" type="regexp" oneof="" id="prod-uriReserved">
<emu-nt><a href="#prod-uriReserved">uriReserved</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>&amp;</emu-t><emu-t>=</emu-t><emu-t>+</emu-t><emu-t>$</emu-t><emu-t>,</emu-t></emu-rhs>
</emu-production>
<emu-production name="uriUnescaped" type="regexp" id="prod-uriUnescaped">
<emu-nt><a href="#prod-uriUnescaped">uriUnescaped</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="a3a1eef4"><emu-nt id="_ref_14326"><a href="#prod-uriAlpha">uriAlpha</a></emu-nt></emu-rhs>
<emu-rhs a="b3831ee0"><emu-nt id="_ref_14327"><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt></emu-rhs>
<emu-rhs a="14f39e10"><emu-nt id="_ref_14328"><a href="#prod-uriMark">uriMark</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="uriEscaped" type="regexp" id="prod-uriEscaped">
<emu-nt><a href="#prod-uriEscaped">uriEscaped</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="43658761"><emu-t>%</emu-t><emu-nt id="_ref_14329"><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-nt id="_ref_14330"><a href="#prod-HexDigit">HexDigit</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="uriAlpha" type="regexp" oneof="" id="prod-uriAlpha">
<emu-nt><a href="#prod-uriAlpha">uriAlpha</a></emu-nt><emu-geq>:::</emu-geq><emu-oneof>one of</emu-oneof><emu-rhs><emu-t>a</emu-t><emu-t>b</emu-t><emu-t>c</emu-t><emu-t>d</emu-t><emu-t>e</emu-t><emu-t>f</emu-t><emu-t>g</emu-t><emu-t>h</emu-t><emu-t>i</emu-t><emu-t>j</emu-t><emu-t>k</emu-t><emu-t>l</emu-t><emu-t>m</emu-t><emu-t>n</emu-t><emu-t>o</emu-t><emu-t>p</emu-t><emu-t>q</emu-t><emu-t>r</emu-t><emu-t>s</emu-t><emu-t>t</emu-t><emu-t>u</emu-t><emu-t>v</emu-t><emu-t>w</emu-t><emu-t>x</emu-t><emu-t>y</emu-t><emu-t>z</emu-t><emu-t>A</emu-t><emu-t>B</emu-t><emu-t>C</emu-t><emu-t>D</emu-t><emu-t>E</emu-t><emu-t>F</emu-t><emu-t>G</emu-t><emu-t>H</emu-t><emu-t>I</emu-t><emu-t>J</emu-t><emu-t>K</emu-t><emu-t>L</emu-t><emu-t>M</emu-t><emu-t>N</emu-t><emu-t>O</emu-t><emu-t>P</emu-t><emu-t>Q</emu-t><emu-t>R</emu-t><emu-t>S</emu-t><emu-t>T</emu-t><emu-t>U</emu-t><emu-t>V</emu-t><emu-t>W</emu-t><emu-t>X</emu-t><emu-t>Y</emu-t><emu-t>Z</emu-t></emu-rhs>
</emu-production>
<emu-production name="uriMark" type="regexp" oneof="" id="prod-uriMark">
<emu-nt><a href="#prod-uriMark">uriMark</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>*</emu-t><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">
<p>The above syntax is based upon RFC 2396 and does not reflect changes introduced by the more recent RFC 3986.</p>
</div></emu-note>
<h2>Runtime Semantics</h2>
<p>When a code unit to be included in a URI is not listed above
or is not intended to have the special meaning sometimes given to the
reserved code units, that code unit must be encoded. The code unit is
transformed into its UTF-8 encoding, with <emu-xref href="#surrogate-pair" id="_ref_422"><a href="#surrogate-pair">surrogate pairs</a></emu-xref>
first converted from UTF-16 to the corresponding code point value.
(Note that for code units in the range [0, 127] this results in a single
octet with the same value.) The resulting sequence of octets is then
transformed into a String with each octet represented by an escape
sequence of the form <code>"%xx"</code>.</p>
<emu-clause id="sec-encode" aoid="Encode">
<h1><span class="secnum">18.2.6.1.1</span>Runtime Semantics: Encode ( <var>string</var>, <var>unescapedSet</var> )</h1>
<p>The encoding and escaping process is described by the abstract operation Encode taking two String arguments <var>string</var> and <var>unescapedSet</var>.</p>
<emu-alg><ol><li>Let <var>strLen</var> be the number of code units in <var>string</var>.</li><li>Let <var>R</var> be the empty String.</li><li>Let <var>k</var> be 0.</li><li>Repeat,<ol><li>If <var>k</var> equals <var>strLen</var>, return <var>R</var>.</li><li>Let <var>C</var> be the code unit at index <var>k</var> within <var>string</var>.</li><li>If <var>C</var> is in <var>unescapedSet</var>, then<ol><li>Let <var>S</var> be the String value containing only the code unit <var>C</var>.</li><li>Set <var>R</var> to the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_4866"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of the previous value of <var>R</var> and <var>S</var>.</li></ol></li><li>Else <var>C</var> is not in <var>unescapedSet</var>,<ol><li>If <var>C</var> is a <emu-xref href="#trailing-surrogate" id="_ref_423"><a href="#trailing-surrogate">trailing surrogate</a></emu-xref>, throw a <emu-val>URIError</emu-val> exception.</li><li>If <var>C</var> is not a <emu-xref href="#leading-surrogate" id="_ref_424"><a href="#leading-surrogate">leading surrogate</a></emu-xref>, then<ol><li>Let <var>V</var> be the code point with the same numeric value as code unit <var>C</var>.</li></ol></li><li>Else,<ol><li>Increase <var>k</var> by 1.</li><li>If <var>k</var> equals <var>strLen</var>, throw a <emu-val>URIError</emu-val> exception.</li><li>Let <var>kChar</var> be the code unit at index <var>k</var> within <var>string</var>.</li><li>If <var>kChar</var> is not a <emu-xref href="#trailing-surrogate" id="_ref_425"><a href="#trailing-surrogate">trailing surrogate</a></emu-xref>, throw a <emu-val>URIError</emu-val> exception.</li><li>Let <var>V</var> be <emu-xref aoid="UTF16Decode" id="_ref_4867"><a href="#sec-utf16decode">UTF16Decode</a></emu-xref>(<var>C</var>, <var>kChar</var>).</li></ol></li><li>Let <var>Octets</var> be the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4868"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of octets resulting by applying the UTF-8 transformation to <var>V</var>.</li><li>For each element <var>octet</var> of <var>Octets</var> in <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4869"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> order, do<ol><li>Let <var>S</var> be the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_4870"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of:<ul><li><code>"%"</code></li><li>the String representation of <var>octet</var>, formatted as a two-digit uppercase hexadecimal number, padded to the left with a zero if necessary</li></ul></li><li>Set <var>R</var> to the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_4871"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of the previous value of <var>R</var> and <var>S</var>.</li></ol></li></ol></li><li>Increase <var>k</var> by 1.
</li></ol></li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-decode" aoid="Decode">
<h1><span class="secnum">18.2.6.1.2</span>Runtime Semantics: Decode ( <var>string</var>, <var>reservedSet</var> )</h1>
<p>The unescaping and decoding process is described by the abstract operation Decode taking two String arguments <var>string</var> and <var>reservedSet</var>.</p>
<emu-alg><ol><li>Let <var>strLen</var> be the number of code units in <var>string</var>.</li><li>Let <var>R</var> be the empty String.</li><li>Let <var>k</var> be 0.</li><li>Repeat,<ol><li>If <var>k</var> equals <var>strLen</var>, return <var>R</var>.</li><li>Let <var>C</var> be the code unit at index <var>k</var> within <var>string</var>.</li><li>If <var>C</var> is not the code unit 0x0025 (PERCENT SIGN), then<ol><li>Let <var>S</var> be the String value containing only the code unit <var>C</var>.</li></ol></li><li>Else <var>C</var> is the code unit 0x0025 (PERCENT SIGN),<ol><li>Let <var>start</var> be <var>k</var>.</li><li>If <var>k</var> + 2 is greater than or equal to <var>strLen</var>, throw a <emu-val>URIError</emu-val> exception.</li><li>If the code units at index (<var>k</var> + 1) and (<var>k</var> + 2) within <var>string</var> do not represent hexadecimal digits, throw a <emu-val>URIError</emu-val> exception.</li><li>Let <var>B</var> be the 8-bit value represented by the two hexadecimal digits at index (<var>k</var> + 1) and (<var>k</var> + 2).</li><li>Increment <var>k</var> by 2.</li><li>If the most significant bit in <var>B</var> is 0, then<ol><li>Let <var>C</var> be the code unit whose value is <var>B</var>.</li><li>If <var>C</var> is not in <var>reservedSet</var>, then<ol><li>Let <var>S</var> be the String value containing only the code unit <var>C</var>.</li></ol></li><li>Else <var>C</var> is in <var>reservedSet</var>,<ol><li>Let <var>S</var> be the substring of <var>string</var> from index <var>start</var> to index <var>k</var> inclusive.</li></ol></li></ol></li><li>Else the most significant bit in <var>B</var> is 1,<ol><li>Let <var>n</var> be the smallest nonnegative integer such that (<var>B</var> &lt;&lt; <var>n</var>) &amp; 0x80 is equal to 0.</li><li>If <var>n</var> equals 1 or <var>n</var> is greater than 4, throw a <emu-val>URIError</emu-val> exception.</li><li>Let <var>Octets</var> be a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4872"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of 8-bit integers of size <var>n</var>.</li><li>Set <var>Octets</var>[0] to <var>B</var>.</li><li>If <var>k</var> + (3 × (<var>n</var> - 1)) is greater than or equal to <var>strLen</var>, throw a <emu-val>URIError</emu-val> exception.</li><li>Let <var>j</var> be 1.</li><li>Repeat, while <var>j</var> &lt; <var>n</var><ol><li>Increment <var>k</var> by 1.</li><li>If the code unit at index <var>k</var> within <var>string</var> is not the code unit 0x0025 (PERCENT SIGN), throw a <emu-val>URIError</emu-val> exception.</li><li>If the code units at index (<var>k</var> + 1) and (<var>k</var> + 2) within <var>string</var> do not represent hexadecimal digits, throw a <emu-val>URIError</emu-val> exception.</li><li>Let <var>B</var> be the 8-bit value represented by the two hexadecimal digits at index (<var>k</var> + 1) and (<var>k</var> + 2).</li><li>If the two most significant bits in <var>B</var> are not 10, throw a <emu-val>URIError</emu-val> exception.</li><li>Increment <var>k</var> by 2.</li><li>Set <var>Octets</var>[<var>j</var>] to <var>B</var>.</li><li>Increment <var>j</var> by 1.</li></ol></li><li>If <var>Octets</var> does not contain a valid UTF-8 encoding of a Unicode code point, throw a <emu-val>URIError</emu-val> exception.</li><li>Let <var>V</var> be the value obtained by applying the UTF-8 transformation to <var>Octets</var>, that is, from a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4873"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of octets into a 21-bit value.</li><li>Let <var>S</var> be the String value whose code units are, in order, the elements in <emu-xref aoid="UTF16Encoding" id="_ref_4874"><a href="#sec-utf16encoding">UTF16Encoding</a></emu-xref>(<var>V</var>).</li></ol></li></ol></li><li>Set <var>R</var> to the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_4875"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of the previous value of <var>R</var> and <var>S</var>.</li><li>Increase <var>k</var> by 1.
</li></ol></li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>This syntax of Uniform Resource Identifiers is based upon
RFC 2396 and does not reflect the more recent RFC 3986 which replaces
RFC 2396. A formal description and implementation of UTF-8 is given in
RFC 3629.</p>
<p>In UTF-8, characters are encoded using sequences of 1 to 6
octets. The only octet of a sequence of one has the higher-order bit
set to 0, the remaining 7 bits being used to encode the character value.
In a sequence of n octets, n &gt; 1, the initial octet has the n
higher-order bits set to 1, followed by a bit set to 0. The remaining
bits of that octet contain bits from the value of the character to be
encoded. The following octets all have the higher-order bit set to 1 and
the following bit set to 0, leaving 6 bits in each to contain bits from
the character to be encoded. The possible UTF-8 encodings of ECMAScript
characters are specified in <emu-xref href="#table-43" id="_ref_426"><a href="#table-43">Table 46</a></emu-xref>.</p>
<emu-table id="table-43" caption="UTF-8 Encodings" informative=""><figure><figcaption>Table 46 (Informative): UTF-8 Encodings</figcaption>
<table>
<tbody>
<tr>
<th>
Code Unit Value
</th>
<th>
Representation
</th>
<th>
1<sup>st</sup> Octet
</th>
<th>
2<sup>nd</sup> Octet
</th>
<th>
3<sup>rd</sup> Octet
</th>
<th>
4<sup>th</sup> Octet
</th>
</tr>
<tr>
<td>
<code>0x0000 - 0x007F</code>
</td>
<td>
<code>00000000 0<i>zzzzzzz</i></code>
</td>
<td>
<code>0<i>zzzzzzz</i></code>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
<code>0x0080 - 0x07FF</code>
</td>
<td>
<code>00000<i>yyy yyzzzzzz</i></code>
</td>
<td>
<code>110<i>yyyyy</i></code>
</td>
<td>
<code>10<i>zzzzzz</i></code>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
<code>0x0800 - 0xD7FF</code>
</td>
<td>
<code><i>xxxxyyyy yyzzzzzz</i></code>
</td>
<td>
<code>1110<i>xxxx</i></code>
</td>
<td>
<code>10<i>yyyyyy</i></code>
</td>
<td>
<code>10<i>zzzzzz</i></code>
</td>
<td>
</td>
</tr>
<tr>
<td>
<code>0xD800 - 0xDBFF</code>
<br>
followed by
<br>
<code>0xDC00 - 0xDFFF</code>
</td>
<td>
<code>110110<i>vv vvwwwwxx</i></code>
<br>
followed by
<br>
<code>110111<i>yy yyzzzzzz</i></code>
</td>
<td>
<code>11110<i>uuu</i></code>
</td>
<td>
<code>10<i>uuwwww</i></code>
</td>
<td>
<code>10<i>xxyyyy</i></code>
</td>
<td>
<code>10<i>zzzzzz</i></code>
</td>
</tr>
<tr>
<td>
<code>0xD800 - 0xDBFF</code>
<br>
not followed by
<br>
<code>0xDC00 - 0xDFFF</code>
</td>
<td>
causes <code>URIError</code>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
<code>0xDC00 - 0xDFFF</code>
</td>
<td>
causes <code>URIError</code>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
<code>0xE000 - 0xFFFF</code>
</td>
<td>
<code><i>xxxxyyyy yyzzzzzz</i></code>
</td>
<td>
<code>1110<i>xxxx</i></code>
</td>
<td>
<code>10<i>yyyyyy</i></code>
</td>
<td>
<code>10<i>zzzzzz</i></code>
</td>
<td>
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<p>Where
<br>
<var>uuuuu</var> = <var>vvvv</var> + 1
<br>
to account for the addition of 0x10000 as in section 3.8 of the Unicode Standard (Surrogates).</p>
<p>The above transformation combines each <emu-xref href="#surrogate-pair" id="_ref_427"><a href="#surrogate-pair">surrogate pair</a></emu-xref>
(for which code unit values in the inclusive range 0xD800 to 0xDFFF are
reserved) into a UTF-32 representation and encodes the resulting 21-bit
value into UTF-8. Decoding reconstructs the <emu-xref href="#surrogate-pair" id="_ref_4876"><a href="#surrogate-pair">surrogate pair</a></emu-xref>.</p>
<p>RFC 3629 prohibits the decoding of invalid UTF-8 octet
sequences. For example, the invalid sequence C0 80 must not decode into
the code unit 0x0000. Implementations of the Decode algorithm are
required to throw a <emu-val>URIError</emu-val> when encountering such invalid sequences.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-decodeuri-encodeduri">
<h1><span class="secnum">18.2.6.2</span>decodeURI ( <var>encodedURI</var> )</h1>
<p>The <code>decodeURI</code> function computes a new version of
a URI in which each escape sequence and UTF-8 encoding of the sort that
might be introduced by the <code>encodeURI</code> function is replaced
with the UTF-16 encoding of the code points that it represents. Escape
sequences that could not have been introduced by <code>encodeURI</code> are not replaced.</p>
<p>The <code>decodeURI</code> function is the <dfn>%decodeURI%</dfn> intrinsic object. When the <code>decodeURI</code> function is called with one argument <var>encodedURI</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>uriString</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_4877"><a href="#sec-tostring">ToString</a></emu-xref>(<var>encodedURI</var>).</li><li>Let <var>reservedURISet</var> be a String containing one instance of each code unit valid in <emu-nt id="_ref_14331"><a href="#prod-uriReserved">uriReserved</a></emu-nt> plus <code>"#"</code>.</li><li>Return ?&nbsp;<emu-xref aoid="Decode" id="_ref_4878"><a href="#sec-decode">Decode</a></emu-xref>(<var>uriString</var>, <var>reservedURISet</var>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The code point <code>"#"</code> is not decoded from escape sequences even though it is not a reserved URI code point.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-decodeuricomponent-encodeduricomponent">
<h1><span class="secnum">18.2.6.3</span>decodeURIComponent ( <var>encodedURIComponent</var> )</h1>
<p>The <code>decodeURIComponent</code> function computes a new
version of a URI in which each escape sequence and UTF-8 encoding of the
sort that might be introduced by the <code>encodeURIComponent</code> function is replaced with the UTF-16 encoding of the code points that it represents.</p>
<p>The <code>decodeURIComponent</code> function is the <dfn>%decodeURIComponent%</dfn> intrinsic object. When the <code>decodeURIComponent</code> function is called with one argument <var>encodedURIComponent</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>componentString</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_4879"><a href="#sec-tostring">ToString</a></emu-xref>(<var>encodedURIComponent</var>).</li><li>Let <var>reservedURIComponentSet</var> be the empty String.</li><li>Return ?&nbsp;<emu-xref aoid="Decode" id="_ref_4880"><a href="#sec-decode">Decode</a></emu-xref>(<var>componentString</var>, <var>reservedURIComponentSet</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-encodeuri-uri">
<h1><span class="secnum">18.2.6.4</span>encodeURI ( <var>uri</var> )</h1>
<p>The <code>encodeURI</code> function computes a new version of a UTF-16 encoded (<emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_428"><a href="#sec-ecmascript-language-types-string-type">6.1.4</a></emu-xref>)
URI in which each instance of certain code points is replaced by one,
two, three, or four escape sequences representing the UTF-8 encoding of
the code points.</p>
<p>The <code>encodeURI</code> function is the <dfn>%encodeURI%</dfn> intrinsic object. When the <code>encodeURI</code> function is called with one argument <var>uri</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>uriString</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_4881"><a href="#sec-tostring">ToString</a></emu-xref>(<var>uri</var>).</li><li>Let <var>unescapedURISet</var> be a String containing one instance of each code unit valid in <emu-nt id="_ref_14332"><a href="#prod-uriReserved">uriReserved</a></emu-nt> and <emu-nt id="_ref_14333"><a href="#prod-uriUnescaped">uriUnescaped</a></emu-nt> plus <code>"#"</code>.</li><li>Return ?&nbsp;<emu-xref aoid="Encode" id="_ref_4882"><a href="#sec-encode">Encode</a></emu-xref>(<var>uriString</var>, <var>unescapedURISet</var>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The code unit <code>"#"</code> is not encoded to an escape sequence even though it is not a reserved or unescaped URI code point.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-encodeuricomponent-uricomponent">
<h1><span class="secnum">18.2.6.5</span>encodeURIComponent ( <var>uriComponent</var> )</h1>
<p>The <code>encodeURIComponent</code> function computes a new version of a UTF-16 encoded (<emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_429"><a href="#sec-ecmascript-language-types-string-type">6.1.4</a></emu-xref>)
URI in which each instance of certain code points is replaced by one,
two, three, or four escape sequences representing the UTF-8 encoding of
the code point.</p>
<p>The <code>encodeURIComponent</code> function is the <dfn>%encodeURIComponent%</dfn> intrinsic object. When the <code>encodeURIComponent</code> function is called with one argument <var>uriComponent</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>componentString</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_4883"><a href="#sec-tostring">ToString</a></emu-xref>(<var>uriComponent</var>).</li><li>Let <var>unescapedURIComponentSet</var> be a String containing one instance of each code unit valid in <emu-nt id="_ref_14334"><a href="#prod-uriUnescaped">uriUnescaped</a></emu-nt>.</li><li>Return ?&nbsp;<emu-xref aoid="Encode" id="_ref_4884"><a href="#sec-encode">Encode</a></emu-xref>(<var>componentString</var>, <var>unescapedURIComponentSet</var>).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-constructor-properties-of-the-global-object">
<h1><span class="secnum">18.3</span>Constructor Properties of the Global Object</h1>
<emu-clause id="sec-constructor-properties-of-the-global-object-array">
<h1><span class="secnum">18.3.1</span>Array ( . . . )</h1>
<p>See <emu-xref href="#sec-array-constructor" id="_ref_430"><a href="#sec-array-constructor">22.1.1</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-constructor-properties-of-the-global-object-arraybuffer">
<h1><span class="secnum">18.3.2</span>ArrayBuffer ( . . . )</h1>
<p>See <emu-xref href="#sec-arraybuffer-constructor" id="_ref_431"><a href="#sec-arraybuffer-constructor">24.1.2</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-constructor-properties-of-the-global-object-boolean">
<h1><span class="secnum">18.3.3</span>Boolean ( . . . )</h1>
<p>See <emu-xref href="#sec-boolean-constructor" id="_ref_432"><a href="#sec-boolean-constructor">19.3.1</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-constructor-properties-of-the-global-object-dataview">
<h1><span class="secnum">18.3.4</span>DataView ( . . . )</h1>
<p>See <emu-xref href="#sec-dataview-constructor" id="_ref_433"><a href="#sec-dataview-constructor">24.3.2</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-constructor-properties-of-the-global-object-date">
<h1><span class="secnum">18.3.5</span>Date ( . . . )</h1>
<p>See <emu-xref href="#sec-date-constructor" id="_ref_434"><a href="#sec-date-constructor">20.3.2</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-constructor-properties-of-the-global-object-error">
<h1><span class="secnum">18.3.6</span>Error ( . . . )</h1>
<p>See <emu-xref href="#sec-error-constructor" id="_ref_435"><a href="#sec-error-constructor">19.5.1</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-constructor-properties-of-the-global-object-evalerror">
<h1><span class="secnum">18.3.7</span>EvalError ( . . . )</h1>
<p>See <emu-xref href="#sec-native-error-types-used-in-this-standard-evalerror" id="_ref_436"><a href="#sec-native-error-types-used-in-this-standard-evalerror">19.5.5.1</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-float32array">
<h1><span class="secnum">18.3.8</span>Float32Array ( . . . )</h1>
<p>See <emu-xref href="#sec-typedarray-constructors" id="_ref_437"><a href="#sec-typedarray-constructors">22.2.4</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-float64array">
<h1><span class="secnum">18.3.9</span>Float64Array ( . . . )</h1>
<p>See <emu-xref href="#sec-typedarray-constructors" id="_ref_438"><a href="#sec-typedarray-constructors">22.2.4</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-constructor-properties-of-the-global-object-function">
<h1><span class="secnum">18.3.10</span>Function ( . . . )</h1>
<p>See <emu-xref href="#sec-function-constructor" id="_ref_439"><a href="#sec-function-constructor">19.2.1</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-int8array">
<h1><span class="secnum">18.3.11</span>Int8Array ( . . . )</h1>
<p>See <emu-xref href="#sec-typedarray-constructors" id="_ref_440"><a href="#sec-typedarray-constructors">22.2.4</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-int16array">
<h1><span class="secnum">18.3.12</span>Int16Array ( . . . )</h1>
<p>See <emu-xref href="#sec-typedarray-constructors" id="_ref_441"><a href="#sec-typedarray-constructors">22.2.4</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-int32array">
<h1><span class="secnum">18.3.13</span>Int32Array ( . . . )</h1>
<p>See <emu-xref href="#sec-typedarray-constructors" id="_ref_442"><a href="#sec-typedarray-constructors">22.2.4</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-map">
<h1><span class="secnum">18.3.14</span>Map ( . . . )</h1>
<p>See <emu-xref href="#sec-map-constructor" id="_ref_443"><a href="#sec-map-constructor">23.1.1</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-constructor-properties-of-the-global-object-number">
<h1><span class="secnum">18.3.15</span>Number ( . . . )</h1>
<p>See <emu-xref href="#sec-number-constructor" id="_ref_444"><a href="#sec-number-constructor">20.1.1</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-constructor-properties-of-the-global-object-object">
<h1><span class="secnum">18.3.16</span>Object ( . . . )</h1>
<p>See <emu-xref href="#sec-object-constructor" id="_ref_445"><a href="#sec-object-constructor">19.1.1</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-constructor-properties-of-the-global-object-promise">
<h1><span class="secnum">18.3.17</span>Promise ( . . . )</h1>
<p>See <emu-xref href="#sec-promise-constructor" id="_ref_446"><a href="#sec-promise-constructor">25.6.3</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-constructor-properties-of-the-global-object-proxy">
<h1><span class="secnum">18.3.18</span>Proxy ( . . . )</h1>
<p>See <emu-xref href="#sec-proxy-constructor" id="_ref_447"><a href="#sec-proxy-constructor">26.2.1</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-constructor-properties-of-the-global-object-rangeerror">
<h1><span class="secnum">18.3.19</span>RangeError ( . . . )</h1>
<p>See <emu-xref href="#sec-native-error-types-used-in-this-standard-rangeerror" id="_ref_448"><a href="#sec-native-error-types-used-in-this-standard-rangeerror">19.5.5.2</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-constructor-properties-of-the-global-object-referenceerror">
<h1><span class="secnum">18.3.20</span>ReferenceError ( . . . )</h1>
<p>See <emu-xref href="#sec-native-error-types-used-in-this-standard-referenceerror" id="_ref_449"><a href="#sec-native-error-types-used-in-this-standard-referenceerror">19.5.5.3</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-constructor-properties-of-the-global-object-regexp">
<h1><span class="secnum">18.3.21</span>RegExp ( . . . )</h1>
<p>See <emu-xref href="#sec-regexp-constructor" id="_ref_450"><a href="#sec-regexp-constructor">21.2.3</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-set">
<h1><span class="secnum">18.3.22</span>Set ( . . . )</h1>
<p>See <emu-xref href="#sec-set-constructor" id="_ref_451"><a href="#sec-set-constructor">23.2.1</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-constructor-properties-of-the-global-object-sharedarraybuffer">
<h1><span class="secnum">18.3.23</span>SharedArrayBuffer ( . . . )</h1>
<p>See <emu-xref href="#sec-sharedarraybuffer-constructor" id="_ref_452"><a href="#sec-sharedarraybuffer-constructor">24.2.2</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-constructor-properties-of-the-global-object-string">
<h1><span class="secnum">18.3.24</span>String ( . . . )</h1>
<p>See <emu-xref href="#sec-string-constructor" id="_ref_453"><a href="#sec-string-constructor">21.1.1</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-constructor-properties-of-the-global-object-symbol">
<h1><span class="secnum">18.3.25</span>Symbol ( . . . )</h1>
<p>See <emu-xref href="#sec-symbol-constructor" id="_ref_454"><a href="#sec-symbol-constructor">19.4.1</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-constructor-properties-of-the-global-object-syntaxerror">
<h1><span class="secnum">18.3.26</span>SyntaxError ( . . . )</h1>
<p>See <emu-xref href="#sec-native-error-types-used-in-this-standard-syntaxerror" id="_ref_455"><a href="#sec-native-error-types-used-in-this-standard-syntaxerror">19.5.5.4</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-constructor-properties-of-the-global-object-typeerror">
<h1><span class="secnum">18.3.27</span>TypeError ( . . . )</h1>
<p>See <emu-xref href="#sec-native-error-types-used-in-this-standard-typeerror" id="_ref_456"><a href="#sec-native-error-types-used-in-this-standard-typeerror">19.5.5.5</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-uint8array">
<h1><span class="secnum">18.3.28</span>Uint8Array ( . . . )</h1>
<p>See <emu-xref href="#sec-typedarray-constructors" id="_ref_457"><a href="#sec-typedarray-constructors">22.2.4</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-uint8clampedarray">
<h1><span class="secnum">18.3.29</span>Uint8ClampedArray ( . . . )</h1>
<p>See <emu-xref href="#sec-typedarray-constructors" id="_ref_458"><a href="#sec-typedarray-constructors">22.2.4</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-uint16array">
<h1><span class="secnum">18.3.30</span>Uint16Array ( . . . )</h1>
<p>See <emu-xref href="#sec-typedarray-constructors" id="_ref_459"><a href="#sec-typedarray-constructors">22.2.4</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-uint32array">
<h1><span class="secnum">18.3.31</span>Uint32Array ( . . . )</h1>
<p>See <emu-xref href="#sec-typedarray-constructors" id="_ref_460"><a href="#sec-typedarray-constructors">22.2.4</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-constructor-properties-of-the-global-object-urierror">
<h1><span class="secnum">18.3.32</span>URIError ( . . . )</h1>
<p>See <emu-xref href="#sec-native-error-types-used-in-this-standard-urierror" id="_ref_461"><a href="#sec-native-error-types-used-in-this-standard-urierror">19.5.5.6</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-constructor-properties-of-the-global-object-weakmap">
<h1><span class="secnum">18.3.33</span>WeakMap ( . . . )</h1>
<p>See <emu-xref href="#sec-weakmap-constructor" id="_ref_462"><a href="#sec-weakmap-constructor">23.3.1</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-constructor-properties-of-the-global-object-weakset">
<h1><span class="secnum">18.3.34</span>WeakSet ( . . . )</h1>
<p>See <emu-xref href="#sec-weakset-objects" id="_ref_463"><a href="#sec-weakset-objects">23.4</a></emu-xref>.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-other-properties-of-the-global-object">
<h1><span class="secnum">18.4</span>Other Properties of the Global Object</h1>
<emu-clause id="sec-atomics">
<h1><span class="secnum">18.4.1</span>Atomics</h1>
<p>See <emu-xref href="#sec-atomics-object" id="_ref_464"><a href="#sec-atomics-object">24.4</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-json">
<h1><span class="secnum">18.4.2</span>JSON</h1>
<p>See <emu-xref href="#sec-json-object" id="_ref_465"><a href="#sec-json-object">24.5</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-math">
<h1><span class="secnum">18.4.3</span>Math</h1>
<p>See <emu-xref href="#sec-math-object" id="_ref_466"><a href="#sec-math-object">20.2</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-reflect">
<h1><span class="secnum">18.4.4</span>Reflect</h1>
<p>See <emu-xref href="#sec-reflect-object" id="_ref_467"><a href="#sec-reflect-object">26.1</a></emu-xref>.</p>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-fundamental-objects">
<h1><span class="secnum">19</span>Fundamental Objects</h1>
<emu-clause id="sec-object-objects">
<h1><span class="secnum">19.1</span>Object Objects</h1>
<emu-clause id="sec-object-constructor">
<h1><span class="secnum">19.1.1</span>The Object Constructor</h1>
<p>The Object <emu-xref href="#constructor" id="_ref_4885"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>is the intrinsic object <dfn>%Object%</dfn>.</li>
<li>is the initial value of the <code>Object</code> property of the <emu-xref href="#sec-global-object" id="_ref_4886"><a href="#sec-global-object">global object</a></emu-xref>.</li>
<li>creates a new ordinary object when called as a <emu-xref href="#constructor" id="_ref_4887"><a href="#constructor">constructor</a></emu-xref>.</li>
<li>performs a type conversion when called as a function rather than as a <emu-xref href="#constructor" id="_ref_4888"><a href="#constructor">constructor</a></emu-xref>.</li>
<li>is designed to be subclassable. It may be used as the value of an <code>extends</code> clause of a class definition.</li>
</ul>
<emu-clause id="sec-object-value">
<h1><span class="secnum">19.1.1.1</span>Object ( [ <var>value</var> ] )</h1>
<p>When the <code>Object</code> function is called with optional argument <var>value</var>, the following steps are taken:</p>
<emu-alg><ol><li>If NewTarget is neither <emu-val>undefined</emu-val> nor the active function, then<ol><li>Return ?&nbsp;<emu-xref aoid="OrdinaryCreateFromConstructor" id="_ref_4889"><a href="#sec-ordinarycreatefromconstructor">OrdinaryCreateFromConstructor</a></emu-xref>(NewTarget, <code>"%ObjectPrototype%"</code>).</li></ol></li><li>If <var>value</var> is <emu-val>null</emu-val>, <emu-val>undefined</emu-val> or not supplied, return <emu-xref aoid="ObjectCreate" id="_ref_4890"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_4891"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>).</li><li>Return !&nbsp;<emu-xref aoid="ToObject" id="_ref_4892"><a href="#sec-toobject">ToObject</a></emu-xref>(<var>value</var>).
</li></ol></emu-alg>
<p>The <code>"length"</code> property of the <code>Object</code> <emu-xref href="#constructor" id="_ref_4893"><a href="#constructor">constructor</a></emu-xref> function is 1.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-object-constructor">
<h1><span class="secnum">19.1.2</span>Properties of the Object Constructor</h1>
<p>The Object <emu-xref href="#constructor" id="_ref_4894"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_4895"><a href="#sec-properties-of-the-function-prototype-object">%FunctionPrototype%</a></emu-xref>.</li>
<li>has a <code>"length"</code> property.</li>
<li>has the following additional properties:</li>
</ul>
<emu-clause id="sec-object.assign">
<h1><span class="secnum">19.1.2.1</span>Object.assign ( <var>target</var>, ...<var>sources</var> )</h1>
<p>The <code>assign</code> function is used to copy the values of all of the enumerable own properties from one or more source objects to a <var>target</var> object. When the <code>assign</code> function is called, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>to</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_4896"><a href="#sec-toobject">ToObject</a></emu-xref>(<var>target</var>).</li><li>If only one argument was passed, return <var>to</var>.</li><li>Let <var>sources</var> be the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4897"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of argument values starting with the second argument.</li><li>For each element <var>nextSource</var> of <var>sources</var>, in ascending index order, do<ol><li>If <var>nextSource</var> is neither <emu-val>undefined</emu-val> nor <emu-val>null</emu-val>, then<ol><li>Let <var>from</var> be !&nbsp;<emu-xref aoid="ToObject" id="_ref_4898"><a href="#sec-toobject">ToObject</a></emu-xref>(<var>nextSource</var>).</li><li>Let <var>keys</var> be ? <var>from</var>.[[OwnPropertyKeys]]().</li><li>For each element <var>nextKey</var> of <var>keys</var> in <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4899"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> order, do<ol><li>Let <var>desc</var> be ? <var>from</var>.[[GetOwnProperty]](<var>nextKey</var>).</li><li>If <var>desc</var> is not <emu-val>undefined</emu-val> and <var>desc</var>.[[Enumerable]] is <emu-val>true</emu-val>, then<ol><li>Let <var>propValue</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_4900"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>from</var>, <var>nextKey</var>).</li><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_4901"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>to</var>, <var>nextKey</var>, <var>propValue</var>, <emu-val>true</emu-val>).</li></ol></li></ol></li></ol></li></ol></li><li>Return <var>to</var>.
</li></ol></emu-alg>
<p>The <code>"length"</code> property of the <code>assign</code> function is 2.</p>
</emu-clause>
<emu-clause id="sec-object.create">
<h1><span class="secnum">19.1.2.2</span>Object.create ( <var>O</var>, <var>Properties</var> )</h1>
<p>The <code>create</code> function creates a new object with a specified prototype. When the <code>create</code> function is called, the following steps are taken:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_4902"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is neither Object nor Null, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>obj</var> be <emu-xref aoid="ObjectCreate" id="_ref_4903"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<var>O</var>).</li><li>If <var>Properties</var> is not <emu-val>undefined</emu-val>, then<ol><li>Return ?&nbsp;<emu-xref aoid="ObjectDefineProperties" id="_ref_4904"><a href="#sec-objectdefineproperties">ObjectDefineProperties</a></emu-xref>(<var>obj</var>, <var>Properties</var>).</li></ol></li><li>Return <var>obj</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-object.defineproperties">
<h1><span class="secnum">19.1.2.3</span>Object.defineProperties ( <var>O</var>, <var>Properties</var> )</h1>
<p>The <code>defineProperties</code> function is used to add own properties and/or update the attributes of existing own properties of an object. When the <code>defineProperties</code> function is called, the following steps are taken:</p>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="ObjectDefineProperties" id="_ref_4905"><a href="#sec-objectdefineproperties">ObjectDefineProperties</a></emu-xref>(<var>O</var>, <var>Properties</var>).
</li></ol></emu-alg>
<emu-clause id="sec-objectdefineproperties" aoid="ObjectDefineProperties">
<h1><span class="secnum">19.1.2.3.1</span>Runtime Semantics: ObjectDefineProperties ( <var>O</var>, <var>Properties</var> )</h1>
<p>The abstract operation ObjectDefineProperties with arguments <var>O</var> and <var>Properties</var> performs the following steps:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_4906"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>props</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_4907"><a href="#sec-toobject">ToObject</a></emu-xref>(<var>Properties</var>).</li><li>Let <var>keys</var> be ? <var>props</var>.[[OwnPropertyKeys]]().</li><li>Let <var>descriptors</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4908"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>For each element <var>nextKey</var> of <var>keys</var> in <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4909"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> order, do<ol><li>Let <var>propDesc</var> be ? <var>props</var>.[[GetOwnProperty]](<var>nextKey</var>).</li><li>If <var>propDesc</var> is not <emu-val>undefined</emu-val> and <var>propDesc</var>.[[Enumerable]] is <emu-val>true</emu-val>, then<ol><li>Let <var>descObj</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_4910"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>props</var>, <var>nextKey</var>).</li><li>Let <var>desc</var> be ?&nbsp;<emu-xref aoid="ToPropertyDescriptor" id="_ref_4911"><a href="#sec-topropertydescriptor">ToPropertyDescriptor</a></emu-xref>(<var>descObj</var>).</li><li>Append the pair (a two element <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4912"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>) consisting of <var>nextKey</var> and <var>desc</var> to the end of <var>descriptors</var>.</li></ol></li></ol></li><li>For each <var>pair</var> from <var>descriptors</var> in list order, do<ol><li>Let <var>P</var> be the first element of <var>pair</var>.</li><li>Let <var>desc</var> be the second element of <var>pair</var>.</li><li>Perform ?&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_4913"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>O</var>, <var>P</var>, <var>desc</var>).</li></ol></li><li>Return <var>O</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-object.defineproperty">
<h1><span class="secnum">19.1.2.4</span>Object.defineProperty ( <var>O</var>, <var>P</var>, <var>Attributes</var> )</h1>
<p>The <code>defineProperty</code> function is used to add an own property and/or update the attributes of an existing own property of an object. When the <code>defineProperty</code> function is called, the following steps are taken:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_4914"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>key</var> be ?&nbsp;<emu-xref aoid="ToPropertyKey" id="_ref_4915"><a href="#sec-topropertykey">ToPropertyKey</a></emu-xref>(<var>P</var>).</li><li>Let <var>desc</var> be ?&nbsp;<emu-xref aoid="ToPropertyDescriptor" id="_ref_4916"><a href="#sec-topropertydescriptor">ToPropertyDescriptor</a></emu-xref>(<var>Attributes</var>).</li><li>Perform ?&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_4917"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>O</var>, <var>key</var>, <var>desc</var>).</li><li>Return <var>O</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-object.entries">
<h1><span class="secnum">19.1.2.5</span>Object.entries ( <var>O</var> )</h1>
<p>When the <code>entries</code> function is called with argument <var>O</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>obj</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_4918"><a href="#sec-toobject">ToObject</a></emu-xref>(<var>O</var>).</li><li>Let <var>nameList</var> be ?&nbsp;<emu-xref aoid="EnumerableOwnPropertyNames" id="_ref_4919"><a href="#sec-enumerableownpropertynames">EnumerableOwnPropertyNames</a></emu-xref>(<var>obj</var>, <emu-val>"key+value"</emu-val>).</li><li>Return <emu-xref aoid="CreateArrayFromList" id="_ref_4920"><a href="#sec-createarrayfromlist">CreateArrayFromList</a></emu-xref>(<var>nameList</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-object.freeze">
<h1><span class="secnum">19.1.2.6</span>Object.freeze ( <var>O</var> )</h1>
<p>When the <code>freeze</code> function is called, the following steps are taken:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_4921"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, return <var>O</var>.</li><li>Let <var>status</var> be ?&nbsp;<emu-xref aoid="SetIntegrityLevel" id="_ref_4922"><a href="#sec-setintegritylevel">SetIntegrityLevel</a></emu-xref>(<var>O</var>, <code>"frozen"</code>).</li><li>If <var>status</var> is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return <var>O</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-object.fromentries">
<h1><span class="secnum">19.1.2.7</span>Object.fromEntries ( <var>iterable</var> )</h1>
<p>When the <code>fromEntries</code> method is called with argument <var>iterable</var>, the following steps are taken:</p>
<emu-alg><ol><li>Perform ?&nbsp;<emu-xref aoid="RequireObjectCoercible" id="_ref_4923"><a href="#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<var>iterable</var>).</li><li>Let <var>obj</var> be <emu-xref aoid="ObjectCreate" id="_ref_4924"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_4925"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>).</li><li><emu-xref href="#assert" id="_ref_4926"><a href="#assert">Assert</a></emu-xref>: <var>obj</var> is an extensible ordinary object with no own properties.</li><li>Let <var>stepsDefine</var> be the algorithm steps defined in <emu-xref href="#sec-create-data-property-on-object-functions" title="" id="_ref_468"><a href="#sec-create-data-property-on-object-functions">CreateDataPropertyOnObject Functions</a></emu-xref>.</li><li>Let <var>adder</var> be <emu-xref aoid="CreateBuiltinFunction" id="_ref_4927"><a href="#sec-createbuiltinfunction">CreateBuiltinFunction</a></emu-xref>(<var>stepsDefine</var>, « »).</li><li>Return ?&nbsp;<emu-xref aoid="AddEntriesFromIterable" id="_ref_4928"><a href="#sec-add-entries-from-iterable">AddEntriesFromIterable</a></emu-xref>(<var>obj</var>, <var>iterable</var>, <var>adder</var>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
The function created for <var>adder</var> is never directly accessible to ECMAScript code.
</div></emu-note>
<emu-clause id="sec-create-data-property-on-object-functions">
<h1><span class="secnum">19.1.2.7.1</span>CreateDataPropertyOnObject Functions</h1>
<p>A CreateDataPropertyOnObject function is an anonymous
built-in function. When a CreateDataPropertyOnObject function is called
with arguments <var>key</var> and <var>value</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li><emu-xref href="#assert" id="_ref_4929"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_4930"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is Object.</li><li><emu-xref href="#assert" id="_ref_4931"><a href="#assert">Assert</a></emu-xref>: <var>O</var> is an extensible ordinary object.</li><li>Let <var>propertyKey</var> be ?&nbsp;<emu-xref aoid="ToPropertyKey" id="_ref_4932"><a href="#sec-topropertykey">ToPropertyKey</a></emu-xref>(<var>key</var>).</li><li>Perform !&nbsp;<emu-xref aoid="CreateDataPropertyOrThrow" id="_ref_4933"><a href="#sec-createdatapropertyorthrow">CreateDataPropertyOrThrow</a></emu-xref>(<var>O</var>, <var>propertyKey</var>, <var>value</var>).</li><li>Return <emu-val>undefined</emu-val>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-object.getownpropertydescriptor">
<h1><span class="secnum">19.1.2.8</span>Object.getOwnPropertyDescriptor ( <var>O</var>, <var>P</var> )</h1>
<p>When the <code>getOwnPropertyDescriptor</code> function is called, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>obj</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_4934"><a href="#sec-toobject">ToObject</a></emu-xref>(<var>O</var>).</li><li>Let <var>key</var> be ?&nbsp;<emu-xref aoid="ToPropertyKey" id="_ref_4935"><a href="#sec-topropertykey">ToPropertyKey</a></emu-xref>(<var>P</var>).</li><li>Let <var>desc</var> be ? <var>obj</var>.[[GetOwnProperty]](<var>key</var>).</li><li>Return <emu-xref aoid="FromPropertyDescriptor" id="_ref_4936"><a href="#sec-frompropertydescriptor">FromPropertyDescriptor</a></emu-xref>(<var>desc</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-object.getownpropertydescriptors">
<h1><span class="secnum">19.1.2.9</span>Object.getOwnPropertyDescriptors ( <var>O</var> )</h1>
<p>When the <code>getOwnPropertyDescriptors</code> function is called, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>obj</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_4937"><a href="#sec-toobject">ToObject</a></emu-xref>(<var>O</var>).</li><li>Let <var>ownKeys</var> be ? <var>obj</var>.[[OwnPropertyKeys]]().</li><li>Let <var>descriptors</var> be !&nbsp;<emu-xref aoid="ObjectCreate" id="_ref_4938"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_4939"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>).</li><li>For each element <var>key</var> of <var>ownKeys</var> in <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4940"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> order, do<ol><li>Let <var>desc</var> be ? <var>obj</var>.[[GetOwnProperty]](<var>key</var>).</li><li>Let <var>descriptor</var> be !&nbsp;<emu-xref aoid="FromPropertyDescriptor" id="_ref_4941"><a href="#sec-frompropertydescriptor">FromPropertyDescriptor</a></emu-xref>(<var>desc</var>).</li><li>If <var>descriptor</var> is not <emu-val>undefined</emu-val>, perform !&nbsp;<emu-xref aoid="CreateDataProperty" id="_ref_4942"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>descriptors</var>, <var>key</var>, <var>descriptor</var>).</li></ol></li><li>Return <var>descriptors</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-object.getownpropertynames">
<h1><span class="secnum">19.1.2.10</span>Object.getOwnPropertyNames ( <var>O</var> )</h1>
<p>When the <code>getOwnPropertyNames</code> function is called, the following steps are taken:</p>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="GetOwnPropertyKeys" id="_ref_4943"><a href="#sec-getownpropertykeys">GetOwnPropertyKeys</a></emu-xref>(<var>O</var>, String).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-object.getownpropertysymbols">
<h1><span class="secnum">19.1.2.11</span>Object.getOwnPropertySymbols ( <var>O</var> )</h1>
<p>When the <code>getOwnPropertySymbols</code> function is called with argument <var>O</var>, the following steps are taken:</p>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="GetOwnPropertyKeys" id="_ref_4944"><a href="#sec-getownpropertykeys">GetOwnPropertyKeys</a></emu-xref>(<var>O</var>, Symbol).
</li></ol></emu-alg>
<emu-clause id="sec-getownpropertykeys" aoid="GetOwnPropertyKeys">
<h1><span class="secnum">19.1.2.11.1</span>Runtime Semantics: GetOwnPropertyKeys ( <var>O</var>, <var>type</var> )</h1>
<p>The abstract operation GetOwnPropertyKeys is called with arguments <var>O</var> and <var>type</var> where <var>O</var> is an Object and <var>type</var> is one of the ECMAScript specification types String or Symbol. The following steps are taken:</p>
<emu-alg><ol><li>Let <var>obj</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_4945"><a href="#sec-toobject">ToObject</a></emu-xref>(<var>O</var>).</li><li>Let <var>keys</var> be ? <var>obj</var>.[[OwnPropertyKeys]]().</li><li>Let <var>nameList</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4946"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>For each element <var>nextKey</var> of <var>keys</var> in <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4947"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> order, do<ol><li>If <emu-xref aoid="Type" id="_ref_4948"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>nextKey</var>) is <var>type</var>, then<ol><li>Append <var>nextKey</var> as the last element of <var>nameList</var>.</li></ol></li></ol></li><li>Return <emu-xref aoid="CreateArrayFromList" id="_ref_4949"><a href="#sec-createarrayfromlist">CreateArrayFromList</a></emu-xref>(<var>nameList</var>).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-object.getprototypeof">
<h1><span class="secnum">19.1.2.12</span>Object.getPrototypeOf ( <var>O</var> )</h1>
<p>When the <code>getPrototypeOf</code> function is called with argument <var>O</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>obj</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_4950"><a href="#sec-toobject">ToObject</a></emu-xref>(<var>O</var>).</li><li>Return ? <var>obj</var>.[[GetPrototypeOf]]().
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-object.is">
<h1><span class="secnum">19.1.2.13</span>Object.is ( <var>value1</var>, <var>value2</var> )</h1>
<p>When the <code>is</code> function is called with arguments <var>value1</var> and <var>value2</var>, the following steps are taken:</p>
<emu-alg><ol><li>Return <emu-xref aoid="SameValue" id="_ref_4951"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>value1</var>, <var>value2</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-object.isextensible">
<h1><span class="secnum">19.1.2.14</span>Object.isExtensible ( <var>O</var> )</h1>
<p>When the <code>isExtensible</code> function is called with argument <var>O</var>, the following steps are taken:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_4952"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, return <emu-val>false</emu-val>.</li><li>Return ?&nbsp;<emu-xref aoid="IsExtensible" id="_ref_4953"><a href="#sec-isextensible-o">IsExtensible</a></emu-xref>(<var>O</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-object.isfrozen">
<h1><span class="secnum">19.1.2.15</span>Object.isFrozen ( <var>O</var> )</h1>
<p>When the <code>isFrozen</code> function is called with argument <var>O</var>, the following steps are taken:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_4954"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, return <emu-val>true</emu-val>.</li><li>Return ?&nbsp;<emu-xref aoid="TestIntegrityLevel" id="_ref_4955"><a href="#sec-testintegritylevel">TestIntegrityLevel</a></emu-xref>(<var>O</var>, <code>"frozen"</code>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-object.issealed">
<h1><span class="secnum">19.1.2.16</span>Object.isSealed ( <var>O</var> )</h1>
<p>When the <code>isSealed</code> function is called with argument <var>O</var>, the following steps are taken:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_4956"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, return <emu-val>true</emu-val>.</li><li>Return ?&nbsp;<emu-xref aoid="TestIntegrityLevel" id="_ref_4957"><a href="#sec-testintegritylevel">TestIntegrityLevel</a></emu-xref>(<var>O</var>, <code>"sealed"</code>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-object.keys">
<h1><span class="secnum">19.1.2.17</span>Object.keys ( <var>O</var> )</h1>
<p>When the <code>keys</code> function is called with argument <var>O</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>obj</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_4958"><a href="#sec-toobject">ToObject</a></emu-xref>(<var>O</var>).</li><li>Let <var>nameList</var> be ?&nbsp;<emu-xref aoid="EnumerableOwnPropertyNames" id="_ref_4959"><a href="#sec-enumerableownpropertynames">EnumerableOwnPropertyNames</a></emu-xref>(<var>obj</var>, <emu-val>"key"</emu-val>).</li><li>Return <emu-xref aoid="CreateArrayFromList" id="_ref_4960"><a href="#sec-createarrayfromlist">CreateArrayFromList</a></emu-xref>(<var>nameList</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-object.preventextensions">
<h1><span class="secnum">19.1.2.18</span>Object.preventExtensions ( <var>O</var> )</h1>
<p>When the <code>preventExtensions</code> function is called, the following steps are taken:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_4961"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, return <var>O</var>.</li><li>Let <var>status</var> be ? <var>O</var>.[[PreventExtensions]]().</li><li>If <var>status</var> is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return <var>O</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-object.prototype">
<h1><span class="secnum">19.1.2.19</span>Object.prototype</h1>
<p>The initial value of <code>Object.prototype</code> is the intrinsic object <emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_4962"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-object.seal">
<h1><span class="secnum">19.1.2.20</span>Object.seal ( <var>O</var> )</h1>
<p>When the <code>seal</code> function is called, the following steps are taken:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_4963"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, return <var>O</var>.</li><li>Let <var>status</var> be ?&nbsp;<emu-xref aoid="SetIntegrityLevel" id="_ref_4964"><a href="#sec-setintegritylevel">SetIntegrityLevel</a></emu-xref>(<var>O</var>, <code>"sealed"</code>).</li><li>If <var>status</var> is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return <var>O</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-object.setprototypeof">
<h1><span class="secnum">19.1.2.21</span>Object.setPrototypeOf ( <var>O</var>, <var>proto</var> )</h1>
<p>When the <code>setPrototypeOf</code> function is called with arguments <var>O</var> and <var>proto</var>, the following steps are taken:</p>
<emu-alg><ol><li>Set <var>O</var> to ?&nbsp;<emu-xref aoid="RequireObjectCoercible" id="_ref_4965"><a href="#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<var>O</var>).</li><li>If <emu-xref aoid="Type" id="_ref_4966"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>proto</var>) is neither Object nor Null, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <emu-xref aoid="Type" id="_ref_4967"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, return <var>O</var>.</li><li>Let <var>status</var> be ? <var>O</var>.[[SetPrototypeOf]](<var>proto</var>).</li><li>If <var>status</var> is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return <var>O</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-object.values">
<h1><span class="secnum">19.1.2.22</span>Object.values ( <var>O</var> )</h1>
<p>When the <code>values</code> function is called with argument <var>O</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>obj</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_4968"><a href="#sec-toobject">ToObject</a></emu-xref>(<var>O</var>).</li><li>Let <var>nameList</var> be ?&nbsp;<emu-xref aoid="EnumerableOwnPropertyNames" id="_ref_4969"><a href="#sec-enumerableownpropertynames">EnumerableOwnPropertyNames</a></emu-xref>(<var>obj</var>, <emu-val>"value"</emu-val>).</li><li>Return <emu-xref aoid="CreateArrayFromList" id="_ref_4970"><a href="#sec-createarrayfromlist">CreateArrayFromList</a></emu-xref>(<var>nameList</var>).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-object-prototype-object">
<h1><span class="secnum">19.1.3</span>Properties of the Object Prototype Object</h1>
<p>The Object prototype object:</p>
<ul>
<li>is the intrinsic object <dfn>%ObjectPrototype%</dfn>.</li>
<li>is an <emu-xref href="#sec-immutable-prototype-exotic-objects" id="_ref_4971"><a href="#sec-immutable-prototype-exotic-objects">immutable prototype exotic object</a></emu-xref>.</li>
<li>has a [[Prototype]] internal slot whose value is <emu-val>null</emu-val>.</li>
</ul>
<emu-clause id="sec-object.prototype.constructor">
<h1><span class="secnum">19.1.3.1</span>Object.prototype.constructor</h1>
<p>The initial value of <code>Object.prototype.constructor</code> is the intrinsic object <emu-xref href="#sec-object-constructor" id="_ref_4972"><a href="#sec-object-constructor">%Object%</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-object.prototype.hasownproperty">
<h1><span class="secnum">19.1.3.2</span>Object.prototype.hasOwnProperty ( <var>V</var> )</h1>
<p>When the <code>hasOwnProperty</code> method is called with argument <var>V</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>P</var> be ?&nbsp;<emu-xref aoid="ToPropertyKey" id="_ref_4973"><a href="#sec-topropertykey">ToPropertyKey</a></emu-xref>(<var>V</var>).</li><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_4974"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Return ?&nbsp;<emu-xref aoid="HasOwnProperty" id="_ref_4975"><a href="#sec-hasownproperty">HasOwnProperty</a></emu-xref>(<var>O</var>, <var>P</var>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The ordering of steps 1 and 2 is chosen to ensure that any
exception that would have been thrown by step 1 in previous editions of
this specification will continue to be thrown even if the <emu-val>this</emu-val> value is <emu-val>undefined</emu-val> or <emu-val>null</emu-val>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-object.prototype.isprototypeof">
<h1><span class="secnum">19.1.3.3</span>Object.prototype.isPrototypeOf ( <var>V</var> )</h1>
<p>When the <code>isPrototypeOf</code> method is called with argument <var>V</var>, the following steps are taken:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_4976"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>V</var>) is not Object, return <emu-val>false</emu-val>.</li><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_4977"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Repeat,<ol><li>Set <var>V</var> to ? <var>V</var>.[[GetPrototypeOf]]().</li><li>If <var>V</var> is <emu-val>null</emu-val>, return <emu-val>false</emu-val>.</li><li>If <emu-xref aoid="SameValue" id="_ref_4978"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>O</var>, <var>V</var>) is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.
</li></ol></li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The ordering of steps 1 and 2 preserves the behaviour specified by previous editions of this specification for the case where <var>V</var> is not an object and the <emu-val>this</emu-val> value is <emu-val>undefined</emu-val> or <emu-val>null</emu-val>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-object.prototype.propertyisenumerable">
<h1><span class="secnum">19.1.3.4</span>Object.prototype.propertyIsEnumerable ( <var>V</var> )</h1>
<p>When the <code>propertyIsEnumerable</code> method is called with argument <var>V</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>P</var> be ?&nbsp;<emu-xref aoid="ToPropertyKey" id="_ref_4979"><a href="#sec-topropertykey">ToPropertyKey</a></emu-xref>(<var>V</var>).</li><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_4980"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>desc</var> be ? <var>O</var>.[[GetOwnProperty]](<var>P</var>).</li><li>If <var>desc</var> is <emu-val>undefined</emu-val>, return <emu-val>false</emu-val>.</li><li>Return <var>desc</var>.[[Enumerable]].
</li></ol></emu-alg>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>This method does not consider objects in the prototype chain.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The ordering of steps 1 and 2 is chosen to ensure that any
exception that would have been thrown by step 1 in previous editions of
this specification will continue to be thrown even if the <emu-val>this</emu-val> value is <emu-val>undefined</emu-val> or <emu-val>null</emu-val>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-object.prototype.tolocalestring">
<h1><span class="secnum">19.1.3.5</span>Object.prototype.toLocaleString ( [ <var>reserved1</var> [ , <var>reserved2</var> ] ] )</h1>
<p>When the <code>toLocaleString</code> method is called, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li>Return ?&nbsp;<emu-xref aoid="Invoke" id="_ref_4981"><a href="#sec-invoke">Invoke</a></emu-xref>(<var>O</var>, <code>"toString"</code>).
</li></ol></emu-alg>
<p>The optional parameters to this function are not used but are intended to correspond to the parameter pattern used by ECMA-402 <code>toLocaleString</code> functions. Implementations that do not include ECMA-402 support must not use those parameter positions for other purposes.</p>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>This function provides a generic <code>toLocaleString</code> implementation for objects that have no locale-specific <code>toString</code> behaviour. <code>Array</code>, <code>Number</code>, <code>Date</code>, and <code>Typed Arrays</code> provide their own locale-sensitive <code>toLocaleString</code> methods.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>ECMA-402 intentionally does not provide an alternative to this default implementation.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-object.prototype.tostring">
<h1><span class="secnum">19.1.3.6</span>Object.prototype.toString ( )</h1>
<p>When the <code>toString</code> method is called, the following steps are taken:</p>
<emu-alg><ol><li>If the <emu-val>this</emu-val> value is <emu-val>undefined</emu-val>, return <code>"[object Undefined]"</code>.</li><li>If the <emu-val>this</emu-val> value is <emu-val>null</emu-val>, return <code>"[object Null]"</code>.</li><li>Let <var>O</var> be !&nbsp;<emu-xref aoid="ToObject" id="_ref_4982"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>isArray</var> be ?&nbsp;<emu-xref aoid="IsArray" id="_ref_4983"><a href="#sec-isarray">IsArray</a></emu-xref>(<var>O</var>).</li><li>If <var>isArray</var> is <emu-val>true</emu-val>, let <var>builtinTag</var> be <code>"Array"</code>.</li><li>Else if <var>O</var> is a String <emu-xref href="#exotic-object" id="_ref_4984"><a href="#exotic-object">exotic object</a></emu-xref>, let <var>builtinTag</var> be <code>"String"</code>.</li><li>Else if <var>O</var> has a [[ParameterMap]] internal slot, let <var>builtinTag</var> be <code>"Arguments"</code>.</li><li>Else if <var>O</var> has a [[Call]] internal method, let <var>builtinTag</var> be <code>"Function"</code>.</li><li>Else if <var>O</var> has an [[ErrorData]] internal slot, let <var>builtinTag</var> be <code>"Error"</code>.</li><li>Else if <var>O</var> has a [[BooleanData]] internal slot, let <var>builtinTag</var> be <code>"Boolean"</code>.</li><li>Else if <var>O</var> has a [[NumberData]] internal slot, let <var>builtinTag</var> be <code>"Number"</code>.</li><li>Else if <var>O</var> has a [[DateValue]] internal slot, let <var>builtinTag</var> be <code>"Date"</code>.</li><li>Else if <var>O</var> has a [[RegExpMatcher]] internal slot, let <var>builtinTag</var> be <code>"RegExp"</code>.</li><li>Else, let <var>builtinTag</var> be <code>"Object"</code>.</li><li>Let <var>tag</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_4985"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, @@toStringTag).</li><li>If <emu-xref aoid="Type" id="_ref_4986"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>tag</var>) is not String, set <var>tag</var> to <var>builtinTag</var>.</li><li>Return the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_4987"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <code>"[object "</code>, <var>tag</var>, and <code>"]"</code>.
</li></ol></emu-alg>
<p>This function is the <dfn>%ObjProto_toString%</dfn> intrinsic object.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Historically, this function was occasionally used to access
the String value of the [[Class]] internal slot that was used in
previous editions of this specification as a nominal type tag for
various built-in objects. The above definition of <code>toString</code> preserves compatibility for legacy code that uses <code>toString</code>
as a test for those specific kinds of built-in objects. It does not
provide a reliable type testing mechanism for other kinds of built-in or
program defined objects. In addition, programs can use @@toStringTag in
ways that will invalidate the reliability of such legacy type tests.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-object.prototype.valueof">
<h1><span class="secnum">19.1.3.7</span>Object.prototype.valueOf ( )</h1>
<p>When the <code>valueOf</code> method is called, the following steps are taken:</p>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="ToObject" id="_ref_4988"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).
</li></ol></emu-alg>
<p>This function is the <dfn>%ObjProto_valueOf%</dfn> intrinsic object.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-object-instances">
<h1><span class="secnum">19.1.4</span>Properties of Object Instances</h1>
<p>Object instances have no special properties beyond those inherited from the Object prototype object.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-function-objects">
<h1><span class="secnum">19.2</span>Function Objects</h1>
<emu-clause id="sec-function-constructor">
<h1><span class="secnum">19.2.1</span>The Function Constructor</h1>
<p>The Function <emu-xref href="#constructor" id="_ref_4989"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>is the intrinsic object <dfn>%Function%</dfn>.</li>
<li>is the initial value of the <code>Function</code> property of the <emu-xref href="#sec-global-object" id="_ref_4990"><a href="#sec-global-object">global object</a></emu-xref>.</li>
<li>creates and initializes a new <emu-xref href="#function-object" id="_ref_4991"><a href="#function-object">function object</a></emu-xref> when called as a function rather than as a <emu-xref href="#constructor" id="_ref_4992"><a href="#constructor">constructor</a></emu-xref>. Thus the function call <code>Function(…)</code> is equivalent to the object creation expression <code>new Function(…)</code> with the same arguments.</li>
<li>is designed to be subclassable. It may be used as the value of an <code>extends</code> clause of a class definition. Subclass constructors that intend to inherit the specified <code>Function</code> behaviour must include a <code>super</code> call to the <code>Function</code> <emu-xref href="#constructor" id="_ref_4993"><a href="#constructor">constructor</a></emu-xref>
to create and initialize a subclass instance with the internal slots
necessary for built-in function behaviour. All ECMAScript syntactic
forms for defining function objects create instances of <code>Function</code>. There is no syntactic means to create instances of <code>Function</code> subclasses except for the built-in <code>GeneratorFunction</code>, <code>AsyncFunction</code>, and <code>AsyncGeneratorFunction</code> subclasses.</li>
</ul>
<emu-clause id="sec-function-p1-p2-pn-body">
<h1><span class="secnum">19.2.1.1</span>Function ( <var>p1</var>, <var>p2</var>, … , <var>pn</var>, <var>body</var> )</h1>
<p>The last argument specifies the body (executable code) of a function; any preceding arguments specify formal parameters.</p>
<p>When the <code>Function</code> function is called with some arguments <var>p1</var>, <var>p2</var>, … , <var>pn</var>, <var>body</var> (where <var>n</var> might be 0, that is, there are no “ <var>p</var> ” arguments, and where <var>body</var> might also not be provided), the following steps are taken:</p>
<emu-alg><ol><li>Let <var>C</var> be the <emu-xref href="#active-function-object" id="_ref_4994"><a href="#active-function-object">active function object</a></emu-xref>.</li><li>Let <var>args</var> be the <var>argumentsList</var> that was passed to this function by [[Call]] or [[Construct]].</li><li>Return ?&nbsp;<emu-xref aoid="CreateDynamicFunction" id="_ref_4995"><a href="#sec-createdynamicfunction">CreateDynamicFunction</a></emu-xref>(<var>C</var>, NewTarget, <code>"normal"</code>, <var>args</var>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>It is permissible but not necessary to have one argument
for each formal parameter to be specified. For example, all three of the
following expressions produce the same result:</p>
<pre><code class="javascript hljs"><span class="hljs-keyword">new</span> <span class="hljs-built_in">Function</span>(<span class="hljs-string">"a"</span>, <span class="hljs-string">"b"</span>, <span class="hljs-string">"c"</span>, <span class="hljs-string">"return a+b+c"</span>)
<span class="hljs-keyword">new</span> <span class="hljs-built_in">Function</span>(<span class="hljs-string">"a, b, c"</span>, <span class="hljs-string">"return a+b+c"</span>)
<span class="hljs-keyword">new</span> <span class="hljs-built_in">Function</span>(<span class="hljs-string">"a,b"</span>, <span class="hljs-string">"c"</span>, <span class="hljs-string">"return a+b+c"</span>)</code></pre>
</div></emu-note>
<emu-clause id="sec-createdynamicfunction" aoid="CreateDynamicFunction">
<h1><span class="secnum">19.2.1.1.1</span>Runtime Semantics: CreateDynamicFunction ( <var>constructor</var>, <var>newTarget</var>, <var>kind</var>, <var>args</var> )</h1>
<p>The abstract operation CreateDynamicFunction is called with arguments <var>constructor</var>, <var>newTarget</var>, <var>kind</var>, and <var>args</var>. <var>constructor</var> is the <emu-xref href="#constructor" id="_ref_4996"><a href="#constructor">constructor</a></emu-xref> function that is performing this action, <var>newTarget</var> is the <emu-xref href="#constructor" id="_ref_4997"><a href="#constructor">constructor</a></emu-xref> that <code>new</code> was initially applied to, <var>kind</var> is either <code>"normal"</code>, <code>"generator"</code>, <code>"async"</code>, or <code>"async generator"</code>, and <var>args</var> is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_4998"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing the actual argument values that were passed to <var>constructor</var>. The following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_4999"><a href="#assert">Assert</a></emu-xref>: The <emu-xref href="#execution-context-stack" id="_ref_5000"><a href="#execution-context-stack">execution context stack</a></emu-xref> has at least two elements.</li><li>Let <var>callerContext</var> be the second to top element of the <emu-xref href="#execution-context-stack" id="_ref_5001"><a href="#execution-context-stack">execution context stack</a></emu-xref>.</li><li>Let <var>callerRealm</var> be <var>callerContext</var>'s <emu-xref href="#realm" id="_ref_5002"><a href="#realm">Realm</a></emu-xref>.</li><li>Let <var>calleeRealm</var> be <emu-xref href="#current-realm" id="_ref_5003"><a href="#current-realm">the current Realm Record</a></emu-xref>.</li><li>Perform ?&nbsp;<emu-xref aoid="HostEnsureCanCompileStrings" id="_ref_5004"><a href="#sec-hostensurecancompilestrings">HostEnsureCanCompileStrings</a></emu-xref>(<var>callerRealm</var>, <var>calleeRealm</var>).</li><li>If <var>newTarget</var> is <emu-val>undefined</emu-val>, set <var>newTarget</var> to <var>constructor</var>.</li><li>If <var>kind</var> is <code>"normal"</code>, then<ol><li>Let <var>goal</var> be the grammar symbol <emu-nt params="~Yield, ~Await" id="_ref_14335"><a href="#prod-FunctionBody">FunctionBody</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params></emu-mods></emu-nt>.</li><li>Let <var>parameterGoal</var> be the grammar symbol <emu-nt params="~Yield, ~Await" id="_ref_14336"><a href="#prod-FormalParameters">FormalParameters</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params></emu-mods></emu-nt>.</li><li>Let <var>fallbackProto</var> be <code>"%FunctionPrototype%"</code>.</li></ol></li><li>Else if <var>kind</var> is <code>"generator"</code>, then<ol><li>Let <var>goal</var> be the grammar symbol <emu-nt id="_ref_14337"><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt>.</li><li>Let <var>parameterGoal</var> be the grammar symbol <emu-nt params="+Yield, ~Await" id="_ref_14338"><a href="#prod-FormalParameters">FormalParameters</a><emu-mods><emu-params>[+Yield, ~Await]</emu-params></emu-mods></emu-nt>.</li><li>Let <var>fallbackProto</var> be <code>"%Generator%"</code>.</li></ol></li><li>Else if <var>kind</var> is <code>"async"</code>, then<ol><li>Let <var>goal</var> be the grammar symbol <emu-nt id="_ref_14339"><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt>.</li><li>Let <var>parameterGoal</var> be the grammar symbol <emu-nt params="~Yield, +Await" id="_ref_14340"><a href="#prod-FormalParameters">FormalParameters</a><emu-mods><emu-params>[~Yield, +Await]</emu-params></emu-mods></emu-nt>.</li><li>Let <var>fallbackProto</var> be <code>"%AsyncFunctionPrototype%"</code>.</li></ol></li><li>Else,<ol><li><emu-xref href="#assert" id="_ref_5005"><a href="#assert">Assert</a></emu-xref>: <var>kind</var> is <code>"async generator"</code>.</li><li>Let <var>goal</var> be the grammar symbol <emu-nt id="_ref_14341"><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt>.</li><li>Let <var>parameterGoal</var> be the grammar symbol <emu-nt params="+Yield, +Await" id="_ref_14342"><a href="#prod-FormalParameters">FormalParameters</a><emu-mods><emu-params>[+Yield, +Await]</emu-params></emu-mods></emu-nt>.</li><li>Let <var>fallbackProto</var> be <code>"%AsyncGenerator%"</code>.</li></ol></li><li>Let <var>argCount</var> be the number of elements in <var>args</var>.</li><li>Let <var>P</var> be the empty String.</li><li>If <var>argCount</var> = 0, let <var>bodyText</var> be the empty String.</li><li>Else if <var>argCount</var> = 1, let <var>bodyText</var> be <var>args</var>[0].</li><li>Else <var>argCount</var> &gt; 1,<ol><li>Let <var>firstArg</var> be <var>args</var>[0].</li><li>Set <var>P</var> to ?&nbsp;<emu-xref aoid="ToString" id="_ref_5006"><a href="#sec-tostring">ToString</a></emu-xref>(<var>firstArg</var>).</li><li>Let <var>k</var> be 1.</li><li>Repeat, while <var>k</var> &lt; <var>argCount</var> - 1<ol><li>Let <var>nextArg</var> be <var>args</var>[<var>k</var>].</li><li>Let <var>nextArgString</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5007"><a href="#sec-tostring">ToString</a></emu-xref>(<var>nextArg</var>).</li><li>Set <var>P</var> to the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_5008"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of the previous value of <var>P</var>, <code>","</code> (a comma), and <var>nextArgString</var>.</li><li>Increase <var>k</var> by 1.</li></ol></li><li>Let <var>bodyText</var> be <var>args</var>[<var>k</var>].</li></ol></li><li>Set <var>bodyText</var> to ?&nbsp;<emu-xref aoid="ToString" id="_ref_5009"><a href="#sec-tostring">ToString</a></emu-xref>(<var>bodyText</var>).</li><li>Let <var>parameters</var> be the result of parsing <var>P</var>, interpreted as UTF-16 encoded Unicode text as described in <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_469"><a href="#sec-ecmascript-language-types-string-type">6.1.4</a></emu-xref>, using <var>parameterGoal</var> as the <emu-xref href="#sec-context-free-grammars" id="_ref_5010"><a href="#sec-context-free-grammars">goal symbol</a></emu-xref>. Throw a <emu-val>SyntaxError</emu-val> exception if the parse fails.</li><li>Let <var>body</var> be the result of parsing <var>bodyText</var>, interpreted as UTF-16 encoded Unicode text as described in <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_470"><a href="#sec-ecmascript-language-types-string-type">6.1.4</a></emu-xref>, using <var>goal</var> as the <emu-xref href="#sec-context-free-grammars" id="_ref_5011"><a href="#sec-context-free-grammars">goal symbol</a></emu-xref>. Throw a <emu-val>SyntaxError</emu-val> exception if the parse fails.</li><li>Let <var>strict</var> be ContainsUseStrict of <var>body</var>.</li><li>If any <emu-xref href="#sec-static-semantic-rules" id="_ref_5012"><a href="#sec-static-semantic-rules">static semantics</a></emu-xref> errors are detected for <var>parameters</var> or <var>body</var>, throw a <emu-val>SyntaxError</emu-val> or a <emu-val>ReferenceError</emu-val> exception, depending on the type of the error. If <var>strict</var> is <emu-val>true</emu-val>, the Early Error rules for <emu-grammar><emu-production name="UniqueFormalParameters" collapsed="" class=" inline">
<emu-nt><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0218c6f5"><emu-nt id="_ref_14343"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> are applied. Parsing and <emu-xref href="#early-error" id="_ref_5013"><a href="#early-error">early error</a></emu-xref> detection may be interweaved in an implementation-dependent manner.</li><li>If <var>strict</var> is <emu-val>true</emu-val> and IsSimpleParameterList of <var>parameters</var> is <emu-val>false</emu-val>, throw a <emu-val>SyntaxError</emu-val> exception.</li><li>If any element of the BoundNames of <var>parameters</var> also occurs in the LexicallyDeclaredNames of <var>body</var>, throw a <emu-val>SyntaxError</emu-val> exception.</li><li>If <var>body</var> Contains <emu-nt id="_ref_14344"><a href="#prod-SuperCall">SuperCall</a></emu-nt> is <emu-val>true</emu-val>, throw a <emu-val>SyntaxError</emu-val> exception.</li><li>If <var>parameters</var> Contains <emu-nt id="_ref_14345"><a href="#prod-SuperCall">SuperCall</a></emu-nt> is <emu-val>true</emu-val>, throw a <emu-val>SyntaxError</emu-val> exception.</li><li>If <var>body</var> Contains <emu-nt id="_ref_14346"><a href="#prod-SuperProperty">SuperProperty</a></emu-nt> is <emu-val>true</emu-val>, throw a <emu-val>SyntaxError</emu-val> exception.</li><li>If <var>parameters</var> Contains <emu-nt id="_ref_14347"><a href="#prod-SuperProperty">SuperProperty</a></emu-nt> is <emu-val>true</emu-val>, throw a <emu-val>SyntaxError</emu-val> exception.</li><li>If <var>kind</var> is <code>"generator"</code> or <code>"async generator"</code>, then<ol><li>If <var>parameters</var> Contains <emu-nt id="_ref_14348"><a href="#prod-YieldExpression">YieldExpression</a></emu-nt> is <emu-val>true</emu-val>, throw a <emu-val>SyntaxError</emu-val> exception.</li></ol></li><li>If <var>kind</var> is <code>"async"</code> or <code>"async generator"</code>, then<ol><li>If <var>parameters</var> Contains <emu-nt id="_ref_14349"><a href="#prod-AwaitExpression">AwaitExpression</a></emu-nt> is <emu-val>true</emu-val>, throw a <emu-val>SyntaxError</emu-val> exception.</li></ol></li><li>If <var>strict</var> is <emu-val>true</emu-val>, then<ol><li>If BoundNames of <var>parameters</var> contains any duplicate elements, throw a <emu-val>SyntaxError</emu-val> exception.</li></ol></li><li>Let <var>proto</var> be ?&nbsp;<emu-xref aoid="GetPrototypeFromConstructor" id="_ref_5014"><a href="#sec-getprototypefromconstructor">GetPrototypeFromConstructor</a></emu-xref>(<var>newTarget</var>, <var>fallbackProto</var>).</li><li>Let <var>F</var> be <emu-xref aoid="FunctionAllocate" id="_ref_5015"><a href="#sec-functionallocate">FunctionAllocate</a></emu-xref>(<var>proto</var>, <var>strict</var>, <var>kind</var>).</li><li>Let <var>realmF</var> be <var>F</var>.[[Realm]].</li><li>Let <var>scope</var> be <var>realmF</var>.[[GlobalEnv]].</li><li>Perform <emu-xref aoid="FunctionInitialize" id="_ref_5016"><a href="#sec-functioninitialize">FunctionInitialize</a></emu-xref>(<var>F</var>, <emu-const>Normal</emu-const>, <var>parameters</var>, <var>body</var>, <var>scope</var>).</li><li>If <var>kind</var> is <code>"generator"</code>, then<ol><li>Let <var>prototype</var> be <emu-xref aoid="ObjectCreate" id="_ref_5017"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-generator-prototype" id="_ref_5018"><a href="#sec-properties-of-generator-prototype">%GeneratorPrototype%</a></emu-xref>).</li><li>Perform <emu-xref aoid="DefinePropertyOrThrow" id="_ref_5019"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>F</var>, <code>"prototype"</code>, PropertyDescriptor { [[Value]]: <var>prototype</var>, [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }).</li></ol></li><li>Else if <var>kind</var> is <code>"async generator"</code>, then<ol><li>Let <var>prototype</var> be <emu-xref aoid="ObjectCreate" id="_ref_5020"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-asyncgenerator-prototype" id="_ref_5021"><a href="#sec-properties-of-asyncgenerator-prototype">%AsyncGeneratorPrototype%</a></emu-xref>).</li><li>Perform <emu-xref aoid="DefinePropertyOrThrow" id="_ref_5022"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>F</var>, <code>"prototype"</code>, PropertyDescriptor { [[Value]]: <var>prototype</var>, [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }).</li></ol></li><li>Else if <var>kind</var> is <code>"normal"</code>, perform <emu-xref aoid="MakeConstructor" id="_ref_5023"><a href="#sec-makeconstructor">MakeConstructor</a></emu-xref>(<var>F</var>).</li><li>NOTE: Async functions are not constructable and do not have a [[Construct]] internal method or a <code>"prototype"</code> property.</li><li>Perform <emu-xref aoid="SetFunctionName" id="_ref_5024"><a href="#sec-setfunctionname">SetFunctionName</a></emu-xref>(<var>F</var>, <code>"anonymous"</code>).</li><li>Let <var>prefix</var> be the prefix associated with <var>kind</var> in <emu-xref href="#table-dynamic-function-sourcetext-prefixes" id="_ref_471"><a href="#table-dynamic-function-sourcetext-prefixes">Table 47</a></emu-xref>.</li><li>Let <var>sourceText</var> be the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_5025"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>prefix</var>, <code>" anonymous("</code>, <var>P</var>, 0x000A (LINE FEED), <code>") {"</code>, 0x000A (LINE FEED), <var>bodyText</var>, 0x000A (LINE FEED), and <code>"}"</code>.</li><li>Set <var>F</var>.[[SourceText]] to <var>sourceText</var>.</li><li>Return <var>F</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>A <code>prototype</code> property is created for every
non-async function created using CreateDynamicFunction to provide for
the possibility that the function will be used as a <emu-xref href="#constructor" id="_ref_5026"><a href="#constructor">constructor</a></emu-xref>.</p>
</div></emu-note>
<emu-table id="table-dynamic-function-sourcetext-prefixes" caption="Dynamic Function SourceText Prefixes"><figure><figcaption>Table 47: Dynamic Function SourceText Prefixes</figcaption>
<table>
<tbody>
<tr><th>Kind</th><th>Prefix</th></tr>
<tr><td><code>"normal"</code></td><td><code>"function"</code></td></tr>
<tr><td><code>"generator"</code></td><td><code>"function*"</code></td></tr>
<tr><td><code>"async"</code></td><td><code>"async function"</code></td></tr>
<tr><td><code>"async generator"</code></td><td><code>"async function*"</code></td></tr>
</tbody>
</table>
</figure></emu-table>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-function-constructor">
<h1><span class="secnum">19.2.2</span>Properties of the Function Constructor</h1>
<p>The Function <emu-xref href="#constructor" id="_ref_5027"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>is itself a built-in <emu-xref href="#function-object" id="_ref_5028"><a href="#function-object">function object</a></emu-xref>.</li>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_5029"><a href="#sec-properties-of-the-function-prototype-object">%FunctionPrototype%</a></emu-xref>.</li>
<li>has the following properties:</li>
</ul>
<emu-clause id="sec-function.length">
<h1><span class="secnum">19.2.2.1</span>Function.length</h1>
<p>This is a <emu-xref href="#sec-object-type" id="_ref_5030"><a href="#sec-object-type">data property</a></emu-xref> with a value of 1. This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-function.prototype">
<h1><span class="secnum">19.2.2.2</span>Function.prototype</h1>
<p>The value of <code>Function.prototype</code> is <emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_5031"><a href="#sec-properties-of-the-function-prototype-object">%FunctionPrototype%</a></emu-xref>, the intrinsic Function prototype object.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-function-prototype-object">
<h1><span class="secnum">19.2.3</span>Properties of the Function Prototype Object</h1>
<p>The Function prototype object:</p>
<ul>
<li>is the intrinsic object <dfn>%FunctionPrototype%</dfn>.</li>
<li>is itself a built-in <emu-xref href="#function-object" id="_ref_5032"><a href="#function-object">function object</a></emu-xref>.</li>
<li>accepts any arguments and returns <emu-val>undefined</emu-val> when invoked.</li>
<li>does not have a [[Construct]] internal method; it cannot be used as a <emu-xref href="#constructor" id="_ref_5033"><a href="#constructor">constructor</a></emu-xref> with the <code>new</code> operator.</li>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_5034"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>.</li>
<li>does not have a <code>prototype</code> property.</li>
<li>has a <code>"length"</code> property whose value is 0.</li>
<li>has a <code>name</code> property whose value is the empty String.</li>
</ul>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The Function prototype object is specified to be a <emu-xref href="#function-object" id="_ref_5035"><a href="#function-object">function object</a></emu-xref> to ensure compatibility with ECMAScript code that was created prior to the ECMAScript 2015 specification.</p>
</div></emu-note>
<emu-clause id="sec-function.prototype.apply">
<h1><span class="secnum">19.2.3.1</span>Function.prototype.apply ( <var>thisArg</var>, <var>argArray</var> )</h1>
<p>When the <code>apply</code> method is called with arguments <var>thisArg</var> and <var>argArray</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>func</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="IsCallable" id="_ref_5036"><a href="#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>argArray</var> is <emu-val>undefined</emu-val> or <emu-val>null</emu-val>, then<ol><li>Perform <emu-xref aoid="PrepareForTailCall" id="_ref_5037"><a href="#sec-preparefortailcall">PrepareForTailCall</a></emu-xref>().</li><li>Return ?&nbsp;<emu-xref aoid="Call" id="_ref_5038"><a href="#sec-call">Call</a></emu-xref>(<var>func</var>, <var>thisArg</var>).</li></ol></li><li>Let <var>argList</var> be ?&nbsp;<emu-xref aoid="CreateListFromArrayLike" id="_ref_5039"><a href="#sec-createlistfromarraylike">CreateListFromArrayLike</a></emu-xref>(<var>argArray</var>).</li><li>Perform <emu-xref aoid="PrepareForTailCall" id="_ref_5040"><a href="#sec-preparefortailcall">PrepareForTailCall</a></emu-xref>().</li><li>Return ?&nbsp;<emu-xref aoid="Call" id="_ref_5041"><a href="#sec-call">Call</a></emu-xref>(<var>func</var>, <var>thisArg</var>, <var>argList</var>).
</li></ol></emu-alg>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>The <var>thisArg</var> value is passed without modification as the <emu-val>this</emu-val> value. This is a change from Edition 3, where an <emu-val>undefined</emu-val> or <emu-val>null</emu-val> <var>thisArg</var> is replaced with the <emu-xref href="#sec-global-object" id="_ref_5042"><a href="#sec-global-object">global object</a></emu-xref> and <emu-xref aoid="ToObject" id="_ref_5043"><a href="#sec-toobject">ToObject</a></emu-xref> is applied to all other values and that result is passed as the <emu-val>this</emu-val> value. Even though the <var>thisArg</var> is passed without modification, non-strict functions still perform these transformations upon entry to the function.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>If <var>func</var> is an arrow function or a <emu-xref href="#sec-bound-function-exotic-objects" id="_ref_5044"><a href="#sec-bound-function-exotic-objects">bound function</a></emu-xref> then the <var>thisArg</var> will be ignored by the function [[Call]] in step 5.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-function.prototype.bind">
<h1><span class="secnum">19.2.3.2</span>Function.prototype.bind ( <var>thisArg</var>, ...<var>args</var> )</h1>
<p>When the <code>bind</code> method is called with argument <var>thisArg</var> and zero or more <var>args</var>, it performs the following steps:</p>
<emu-alg><ol><li>Let <var>Target</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="IsCallable" id="_ref_5045"><a href="#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>Let <var>args</var> be a new (possibly empty) <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5046"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> consisting of all of the argument values provided after <var>thisArg</var> in order.</li><li>Let <var>F</var> be ?&nbsp;<emu-xref aoid="BoundFunctionCreate" id="_ref_5047"><a href="#sec-boundfunctioncreate">BoundFunctionCreate</a></emu-xref>(<var>Target</var>, <var>thisArg</var>, <var>args</var>).</li><li>Let <var>targetHasLength</var> be ?&nbsp;<emu-xref aoid="HasOwnProperty" id="_ref_5048"><a href="#sec-hasownproperty">HasOwnProperty</a></emu-xref>(<var>Target</var>, <code>"length"</code>).</li><li>If <var>targetHasLength</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>targetLen</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_5049"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>Target</var>, <code>"length"</code>).</li><li>If <emu-xref aoid="Type" id="_ref_5050"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>targetLen</var>) is not Number, let <var>L</var> be 0.</li><li>Else,<ol><li>Set <var>targetLen</var> to !&nbsp;<emu-xref aoid="ToInteger" id="_ref_5051"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>targetLen</var>).</li><li>Let <var>L</var> be the larger of 0 and the result of <var>targetLen</var> minus the number of elements of <var>args</var>.</li></ol></li></ol></li><li>Else, let <var>L</var> be 0.</li><li>Perform !&nbsp;<emu-xref aoid="SetFunctionLength" id="_ref_5052"><a href="#sec-setfunctionlength">SetFunctionLength</a></emu-xref>(<var>F</var>, <var>L</var>).</li><li>Let <var>targetName</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_5053"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>Target</var>, <code>"name"</code>).</li><li>If <emu-xref aoid="Type" id="_ref_5054"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>targetName</var>) is not String, set <var>targetName</var> to the empty string.</li><li>Perform <emu-xref aoid="SetFunctionName" id="_ref_5055"><a href="#sec-setfunctionname">SetFunctionName</a></emu-xref>(<var>F</var>, <var>targetName</var>, <code>"bound"</code>).</li><li>Return <var>F</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>Function objects created using <code>Function.prototype.bind</code> are exotic objects. They also do not have a <code>prototype</code> property.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>If <var>Target</var> is an arrow function or a <emu-xref href="#sec-bound-function-exotic-objects" id="_ref_5056"><a href="#sec-bound-function-exotic-objects">bound function</a></emu-xref> then the <var>thisArg</var> passed to this method will not be used by subsequent calls to <var>F</var>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-function.prototype.call">
<h1><span class="secnum">19.2.3.3</span>Function.prototype.call ( <var>thisArg</var>, ...<var>args</var> )</h1>
<p>When the <code>call</code> method is called with argument <var>thisArg</var> and zero or more <var>args</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>func</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="IsCallable" id="_ref_5057"><a href="#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>Let <var>argList</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5058"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>If
this method was called with more than one argument, then in left to
right order, starting with the second argument, append each argument as
the last element of <var>argList</var>.</li><li>Perform <emu-xref aoid="PrepareForTailCall" id="_ref_5059"><a href="#sec-preparefortailcall">PrepareForTailCall</a></emu-xref>().</li><li>Return ?&nbsp;<emu-xref aoid="Call" id="_ref_5060"><a href="#sec-call">Call</a></emu-xref>(<var>func</var>, <var>thisArg</var>, <var>argList</var>).
</li></ol></emu-alg>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>The <var>thisArg</var> value is passed without modification as the <emu-val>this</emu-val> value. This is a change from Edition 3, where an <emu-val>undefined</emu-val> or <emu-val>null</emu-val> <var>thisArg</var> is replaced with the <emu-xref href="#sec-global-object" id="_ref_5061"><a href="#sec-global-object">global object</a></emu-xref> and <emu-xref aoid="ToObject" id="_ref_5062"><a href="#sec-toobject">ToObject</a></emu-xref> is applied to all other values and that result is passed as the <emu-val>this</emu-val> value. Even though the <var>thisArg</var> is passed without modification, non-strict functions still perform these transformations upon entry to the function.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>If <var>func</var> is an arrow function or a <emu-xref href="#sec-bound-function-exotic-objects" id="_ref_5063"><a href="#sec-bound-function-exotic-objects">bound function</a></emu-xref> then the <var>thisArg</var> will be ignored by the function [[Call]] in step 5.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-function.prototype.constructor">
<h1><span class="secnum">19.2.3.4</span>Function.prototype.constructor</h1>
<p>The initial value of <code>Function.prototype.constructor</code> is the intrinsic object <emu-xref href="#sec-function-constructor" id="_ref_5064"><a href="#sec-function-constructor">%Function%</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-function.prototype.tostring">
<h1><span class="secnum">19.2.3.5</span>Function.prototype.toString ( )</h1>
<p>When the <code>toString</code> method is called, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>func</var> be the <emu-val>this</emu-val> value.</li><li>If <var>func</var> is a <emu-xref href="#sec-bound-function-exotic-objects" id="_ref_472"><a href="#sec-bound-function-exotic-objects">Bound Function exotic object</a></emu-xref> or a <emu-xref href="#sec-built-in-function-objects" id="_ref_473"><a href="#sec-built-in-function-objects">built-in function object</a></emu-xref>, then return an implementation-dependent String source code representation of <var>func</var>. The representation must have the syntax of a <emu-nt id="_ref_14350"><a href="#prod-NativeFunction">NativeFunction</a></emu-nt>. Additionally, if <var>func</var> is a <emu-xref href="#sec-well-known-intrinsic-objects" id="_ref_474"><a href="#sec-well-known-intrinsic-objects">Well-known Intrinsic Object</a></emu-xref> and is not identified as an anonymous function, the portion of the returned String that would be matched by <emu-nt id="_ref_14351"><a href="#prod-PropertyName">PropertyName</a></emu-nt> must be the initial value of the <code>name</code> property of <var>func</var>.</li><li>If <emu-xref aoid="Type" id="_ref_5065"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>func</var>) is Object and <var>func</var> has a [[SourceText]] internal slot and <emu-xref aoid="Type" id="_ref_5066"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>func</var>.[[SourceText]]) is String and !&nbsp;HostHasSourceTextAvailable(<var>func</var>) is <emu-val>true</emu-val>, then return <var>func</var>.[[SourceText]].</li><li>If <emu-xref aoid="Type" id="_ref_5067"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>func</var>) is Object and <emu-xref aoid="IsCallable" id="_ref_5068"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>func</var>) is <emu-val>true</emu-val>, then return an implementation-dependent String source code representation of <var>func</var>. The representation must have the syntax of a <emu-nt id="_ref_14352"><a href="#prod-NativeFunction">NativeFunction</a></emu-nt>.</li><li>Throw a <emu-val>TypeError</emu-val> exception.
</li></ol></emu-alg>
<emu-grammar type="definition"><emu-production name="NativeFunction" id="prod-NativeFunction">
<emu-nt><a href="#prod-NativeFunction">NativeFunction</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1fcbc9e6"><emu-t>function</emu-t><emu-nt params="~Yield, ~Await" optional="" id="_ref_14353"><a href="#prod-PropertyName">PropertyName</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>(</emu-t><emu-nt params="~Yield, ~Await" id="_ref_14354"><a href="#prod-FormalParameters">FormalParameters</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-t>[</emu-t><emu-t>native</emu-t><emu-t>code</emu-t><emu-t>]</emu-t><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
</emu-clause>
<emu-clause id="sec-function.prototype-@@hasinstance">
<h1><span class="secnum">19.2.3.6</span>Function.prototype [ @@hasInstance ] ( <var>V</var> )</h1>
<p>When the <code>@@hasInstance</code> method of an object <var>F</var> is called with value <var>V</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>F</var> be the <emu-val>this</emu-val> value.</li><li>Return ?&nbsp;<emu-xref aoid="OrdinaryHasInstance" id="_ref_5069"><a href="#sec-ordinaryhasinstance">OrdinaryHasInstance</a></emu-xref>(<var>F</var>, <var>V</var>).
</li></ol></emu-alg>
<p>The value of the <code>name</code> property of this function is <code>"[Symbol.hasInstance]"</code>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>This is the default implementation of <code>@@hasInstance</code> that most functions inherit. <code>@@hasInstance</code> is called by the <code>instanceof</code> operator to determine whether a value is an instance of a specific <emu-xref href="#constructor" id="_ref_5070"><a href="#constructor">constructor</a></emu-xref>. An expression such as</p>
<pre><code class="javascript hljs">v <span class="hljs-keyword">instanceof</span> F</code></pre>
<p>evaluates as</p>
<pre><code class="javascript hljs">F[@@hasInstance](v)</code></pre>
<p>A <emu-xref href="#constructor" id="_ref_5071"><a href="#constructor">constructor</a></emu-xref> function can control which objects are recognized as its instances by <code>instanceof</code> by exposing a different <code>@@hasInstance</code> method on the function.</p>
</div></emu-note>
<p>This property is non-writable and non-configurable to prevent
tampering that could be used to globally expose the target function of a
<emu-xref href="#sec-bound-function-exotic-objects" id="_ref_5072"><a href="#sec-bound-function-exotic-objects">bound function</a></emu-xref>.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-function-instances">
<h1><span class="secnum">19.2.4</span>Function Instances</h1>
<p>Every Function instance is an ECMAScript <emu-xref href="#function-object" id="_ref_5073"><a href="#function-object">function object</a></emu-xref> and has the internal slots listed in <emu-xref href="#table-27" id="_ref_475"><a href="#table-27">Table 27</a></emu-xref>. Function objects created using the <code>Function.prototype.bind</code> method (<emu-xref href="#sec-function.prototype.bind" id="_ref_476"><a href="#sec-function.prototype.bind">19.2.3.2</a></emu-xref>) have the internal slots listed in <emu-xref href="#table-28" id="_ref_477"><a href="#table-28">Table 28</a></emu-xref>.</p>
<p>Function instances have the following properties:</p>
<emu-clause id="sec-function-instances-length">
<h1><span class="secnum">19.2.4.1</span>length</h1>
<p>The value of the <code>"length"</code> property is an integer
that indicates the typical number of arguments expected by the
function. However, the language permits the function to be invoked with
some other number of arguments. The behaviour of a function when invoked
on a number of arguments other than the number specified by its <code>"length"</code> property depends on the function. This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-function-instances-name">
<h1><span class="secnum">19.2.4.2</span>name</h1>
<p>The value of the <code>name</code> property is a String that is descriptive of the function. The name has no semantic significance but is typically a variable or <emu-xref href="#property-name" id="_ref_5074"><a href="#property-name">property name</a></emu-xref>
that is used to refer to the function at its point of definition in
ECMAScript code. This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
<p>Anonymous functions objects that do not have a contextual name associated with them by this specification do not have a <code>name</code> own property but inherit the <code>name</code> property of <emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_5075"><a href="#sec-properties-of-the-function-prototype-object">%FunctionPrototype%</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-function-instances-prototype">
<h1><span class="secnum">19.2.4.3</span>prototype</h1>
<p>Function instances that can be used as a <emu-xref href="#constructor" id="_ref_5076"><a href="#constructor">constructor</a></emu-xref> have a <code>prototype</code>
property. Whenever such a Function instance is created another ordinary
object is also created and is the initial value of the function's <code>prototype</code> property. Unless otherwise specified, the value of the <code>prototype</code> property is used to initialize the [[Prototype]] internal slot of the object created when that function is invoked as a <emu-xref href="#constructor" id="_ref_5077"><a href="#constructor">constructor</a></emu-xref>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Function objects created using <code>Function.prototype.bind</code>, or by evaluating a <emu-nt id="_ref_14355"><a href="#prod-MethodDefinition">MethodDefinition</a></emu-nt> (that is not a <emu-nt id="_ref_14356"><a href="#prod-GeneratorMethod">GeneratorMethod</a></emu-nt> or <emu-nt id="_ref_14357"><a href="#prod-AsyncGeneratorMethod">AsyncGeneratorMethod</a></emu-nt>) or an <emu-nt id="_ref_14358"><a href="#prod-ArrowFunction">ArrowFunction</a></emu-nt> do not have a <code>prototype</code> property.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-hosthassourcetextavailable">
<h1><span class="secnum">19.2.5</span>HostHasSourceTextAvailable ( <var>func</var> )</h1>
<p>HostHasSourceTextAvailable is an implementation-defined
abstract operation that allows host environments to prevent the source
text from being provided for a given function.</p>
<p>An implementation of HostHasSourceTextAvailable must complete
normally in all cases. This operation must be deterministic with respect
to its parameters. Each time it is called with a specific <var>func</var>
as its argument, it must return the same completion record. The default
implementation of HostHasSourceTextAvailable is to unconditionally
return a normal completion with a value of <emu-val>true</emu-val>.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-boolean-objects">
<h1><span class="secnum">19.3</span>Boolean Objects</h1>
<emu-clause id="sec-boolean-constructor">
<h1><span class="secnum">19.3.1</span>The Boolean Constructor</h1>
<p>The Boolean <emu-xref href="#constructor" id="_ref_5078"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>is the intrinsic object <dfn>%Boolean%</dfn>.</li>
<li>is the initial value of the <code>Boolean</code> property of the <emu-xref href="#sec-global-object" id="_ref_5079"><a href="#sec-global-object">global object</a></emu-xref>.</li>
<li>creates and initializes a new Boolean object when called as a <emu-xref href="#constructor" id="_ref_5080"><a href="#constructor">constructor</a></emu-xref>.</li>
<li>performs a type conversion when called as a function rather than as a <emu-xref href="#constructor" id="_ref_5081"><a href="#constructor">constructor</a></emu-xref>.</li>
<li>is designed to be subclassable. It may be used as the value of an <code>extends</code> clause of a class definition. Subclass constructors that intend to inherit the specified <code>Boolean</code> behaviour must include a <code>super</code> call to the <code>Boolean</code> <emu-xref href="#constructor" id="_ref_5082"><a href="#constructor">constructor</a></emu-xref> to create and initialize the subclass instance with a [[BooleanData]] internal slot.</li>
</ul>
<emu-clause id="sec-boolean-constructor-boolean-value">
<h1><span class="secnum">19.3.1.1</span>Boolean ( <var>value</var> )</h1>
<p>When <code>Boolean</code> is called with argument <var>value</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>b</var> be <emu-xref aoid="ToBoolean" id="_ref_5083"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(<var>value</var>).</li><li>If NewTarget is <emu-val>undefined</emu-val>, return <var>b</var>.</li><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="OrdinaryCreateFromConstructor" id="_ref_5084"><a href="#sec-ordinarycreatefromconstructor">OrdinaryCreateFromConstructor</a></emu-xref>(NewTarget, <code>"%BooleanPrototype%"</code>, « [[BooleanData]] »).</li><li>Set <var>O</var>.[[BooleanData]] to <var>b</var>.</li><li>Return <var>O</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-boolean-constructor">
<h1><span class="secnum">19.3.2</span>Properties of the Boolean Constructor</h1>
<p>The Boolean <emu-xref href="#constructor" id="_ref_5085"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_5086"><a href="#sec-properties-of-the-function-prototype-object">%FunctionPrototype%</a></emu-xref>.</li>
<li>has the following properties:</li>
</ul>
<emu-clause id="sec-boolean.prototype">
<h1><span class="secnum">19.3.2.1</span>Boolean.prototype</h1>
<p>The initial value of <code>Boolean.prototype</code> is the intrinsic object <emu-xref href="#sec-properties-of-the-boolean-prototype-object" id="_ref_5087"><a href="#sec-properties-of-the-boolean-prototype-object">%BooleanPrototype%</a></emu-xref>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-boolean-prototype-object">
<h1><span class="secnum">19.3.3</span>Properties of the Boolean Prototype Object</h1>
<p>The Boolean prototype object:</p>
<ul>
<li>is the intrinsic object <dfn>%BooleanPrototype%</dfn>.</li>
<li>is an ordinary object.</li>
<li>is itself a Boolean object; it has a [[BooleanData]] internal slot with the value <emu-val>false</emu-val>.</li>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_5088"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>.</li>
</ul>
<p>The abstract operation <dfn id="sec-thisbooleanvalue" aoid="thisBooleanValue">thisBooleanValue</dfn>(<var>value</var>) performs the following steps:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_5089"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>value</var>) is Boolean, return <var>value</var>.</li><li>If <emu-xref aoid="Type" id="_ref_5090"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>value</var>) is Object and <var>value</var> has a [[BooleanData]] internal slot, then<ol><li>Let <var>b</var> be <var>value</var>.[[BooleanData]].</li><li><emu-xref href="#assert" id="_ref_5091"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_5092"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>b</var>) is Boolean.</li><li>Return <var>b</var>.</li></ol></li><li>Throw a <emu-val>TypeError</emu-val> exception.
</li></ol></emu-alg>
<emu-clause id="sec-boolean.prototype.constructor">
<h1><span class="secnum">19.3.3.1</span>Boolean.prototype.constructor</h1>
<p>The initial value of <code>Boolean.prototype.constructor</code> is the intrinsic object <emu-xref href="#sec-boolean-constructor" id="_ref_5093"><a href="#sec-boolean-constructor">%Boolean%</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-boolean.prototype.tostring">
<h1><span class="secnum">19.3.3.2</span>Boolean.prototype.toString ( )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>b</var> be ?&nbsp;<emu-xref aoid="thisBooleanValue" id="_ref_5094"><a href="https://tc39.github.io/ecma262/#sec-thisbooleanvalue">thisBooleanValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>If <var>b</var> is <emu-val>true</emu-val>, return <code>"true"</code>; else return <code>"false"</code>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-boolean.prototype.valueof">
<h1><span class="secnum">19.3.3.3</span>Boolean.prototype.valueOf ( )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="thisBooleanValue" id="_ref_5095"><a href="https://tc39.github.io/ecma262/#sec-thisbooleanvalue">thisBooleanValue</a></emu-xref>(<emu-val>this</emu-val> value).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-boolean-instances">
<h1><span class="secnum">19.3.4</span>Properties of Boolean Instances</h1>
<p>Boolean instances are ordinary objects that inherit properties
from the Boolean prototype object. Boolean instances have a
[[BooleanData]] internal slot. The [[BooleanData]] internal slot is the
Boolean value represented by this Boolean object.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-symbol-objects">
<h1><span class="secnum">19.4</span>Symbol Objects</h1>
<emu-clause id="sec-symbol-constructor">
<h1><span class="secnum">19.4.1</span>The Symbol Constructor</h1>
<p>The Symbol <emu-xref href="#constructor" id="_ref_5096"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>is the intrinsic object <dfn>%Symbol%</dfn>.</li>
<li>is the initial value of the <code>Symbol</code> property of the <emu-xref href="#sec-global-object" id="_ref_5097"><a href="#sec-global-object">global object</a></emu-xref>.</li>
<li>returns a new Symbol value when called as a function.</li>
<li>is not intended to be used with the <code>new</code> operator.</li>
<li>is not intended to be subclassed.</li>
<li>may be used as the value of an <code>extends</code> clause of a class definition but a <code>super</code> call to it will cause an exception.</li>
</ul>
<emu-clause id="sec-symbol-description">
<h1><span class="secnum">19.4.1.1</span>Symbol ( [ <var>description</var> ] )</h1>
<p>When <code>Symbol</code> is called with optional argument <var>description</var>, the following steps are taken:</p>
<emu-alg><ol><li>If NewTarget is not <emu-val>undefined</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>description</var> is <emu-val>undefined</emu-val>, let <var>descString</var> be <emu-val>undefined</emu-val>.</li><li>Else, let <var>descString</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5098"><a href="#sec-tostring">ToString</a></emu-xref>(<var>description</var>).</li><li>Return a new unique Symbol value whose [[Description]] value is <var>descString</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-symbol-constructor">
<h1><span class="secnum">19.4.2</span>Properties of the Symbol Constructor</h1>
<p>The Symbol <emu-xref href="#constructor" id="_ref_5099"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_5100"><a href="#sec-properties-of-the-function-prototype-object">%FunctionPrototype%</a></emu-xref>.</li>
<li>has the following properties:</li>
</ul>
<emu-clause id="sec-symbol.asynciterator">
<h1><span class="secnum">19.4.2.1</span>Symbol.asyncIterator</h1>
<p>The initial value of <code>Symbol.asyncIterator</code> is the well known symbol @@asyncIterator (<emu-xref href="#table-1" id="_ref_478"><a href="#table-1">Table 1</a></emu-xref>).</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-symbol.for">
<h1><span class="secnum">19.4.2.2</span>Symbol.for ( <var>key</var> )</h1>
<p>When <code>Symbol.for</code> is called with argument <var>key</var> it performs the following steps:</p>
<emu-alg><ol><li>Let <var>stringKey</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5101"><a href="#sec-tostring">ToString</a></emu-xref>(<var>key</var>).</li><li>For each element <var>e</var> of the GlobalSymbolRegistry <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5102"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>, do<ol><li>If <emu-xref aoid="SameValue" id="_ref_5103"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>e</var>.[[Key]], <var>stringKey</var>) is <emu-val>true</emu-val>, return <var>e</var>.[[Symbol]].</li></ol></li><li><emu-xref href="#assert" id="_ref_5104"><a href="#assert">Assert</a></emu-xref>: GlobalSymbolRegistry does not currently contain an entry for <var>stringKey</var>.</li><li>Let <var>newSymbol</var> be a new unique Symbol value whose [[Description]] value is <var>stringKey</var>.</li><li>Append the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5105"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Key]]: <var>stringKey</var>, [[Symbol]]: <var>newSymbol</var> } to the GlobalSymbolRegistry <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5106"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Return <var>newSymbol</var>.
</li></ol></emu-alg>
<p>The GlobalSymbolRegistry is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5107"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>
that is globally available. It is shared by all realms. Prior to the
evaluation of any ECMAScript code it is initialized as a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5108"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>. Elements of the GlobalSymbolRegistry are Records with the structure defined in <emu-xref href="#table-44" id="_ref_479"><a href="#table-44">Table 48</a></emu-xref>.</p>
<emu-table id="table-44" caption="GlobalSymbolRegistry Record Fields"><figure><figcaption>Table 48: GlobalSymbolRegistry <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5109"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> Fields</figcaption>
<table>
<tbody>
<tr>
<th>
Field Name
</th>
<th>
Value
</th>
<th>
Usage
</th>
</tr>
<tr>
<td>
[[Key]]
</td>
<td>
A String
</td>
<td>
A string key used to globally identify a Symbol.
</td>
</tr>
<tr>
<td>
[[Symbol]]
</td>
<td>
A Symbol
</td>
<td>
A symbol that can be retrieved from any <emu-xref href="#realm" id="_ref_5110"><a href="#realm">realm</a></emu-xref>.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
</emu-clause>
<emu-clause id="sec-symbol.hasinstance">
<h1><span class="secnum">19.4.2.3</span>Symbol.hasInstance</h1>
<p>The initial value of <code>Symbol.hasInstance</code> is the well-known symbol @@hasInstance (<emu-xref href="#table-1" id="_ref_480"><a href="#table-1">Table 1</a></emu-xref>).</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-symbol.isconcatspreadable">
<h1><span class="secnum">19.4.2.4</span>Symbol.isConcatSpreadable</h1>
<p>The initial value of <code>Symbol.isConcatSpreadable</code> is the well-known symbol @@isConcatSpreadable (<emu-xref href="#table-1" id="_ref_481"><a href="#table-1">Table 1</a></emu-xref>).</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-symbol.iterator">
<h1><span class="secnum">19.4.2.5</span>Symbol.iterator</h1>
<p>The initial value of <code>Symbol.iterator</code> is the well-known symbol @@iterator (<emu-xref href="#table-1" id="_ref_482"><a href="#table-1">Table 1</a></emu-xref>).</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-symbol.keyfor">
<h1><span class="secnum">19.4.2.6</span>Symbol.keyFor ( <var>sym</var> )</h1>
<p>When <code>Symbol.keyFor</code> is called with argument <var>sym</var> it performs the following steps:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_5111"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>sym</var>) is not Symbol, throw a <emu-val>TypeError</emu-val> exception.</li><li>For each element <var>e</var> of the GlobalSymbolRegistry <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5112"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> (see <emu-xref href="#sec-symbol.for" id="_ref_483"><a href="#sec-symbol.for">19.4.2.2</a></emu-xref>), do<ol><li>If <emu-xref aoid="SameValue" id="_ref_5113"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>e</var>.[[Symbol]], <var>sym</var>) is <emu-val>true</emu-val>, return <var>e</var>.[[Key]].</li></ol></li><li><emu-xref href="#assert" id="_ref_5114"><a href="#assert">Assert</a></emu-xref>: GlobalSymbolRegistry does not currently contain an entry for <var>sym</var>.</li><li>Return <emu-val>undefined</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-symbol.match">
<h1><span class="secnum">19.4.2.7</span>Symbol.match</h1>
<p>The initial value of <code>Symbol.match</code> is the well-known symbol @@match (<emu-xref href="#table-1" id="_ref_484"><a href="#table-1">Table 1</a></emu-xref>).</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-symbol.prototype">
<h1><span class="secnum">19.4.2.8</span>Symbol.prototype</h1>
<p>The initial value of <code>Symbol.prototype</code> is the intrinsic object <emu-xref href="#sec-properties-of-the-symbol-prototype-object" id="_ref_5115"><a href="#sec-properties-of-the-symbol-prototype-object">%SymbolPrototype%</a></emu-xref>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-symbol.replace">
<h1><span class="secnum">19.4.2.9</span>Symbol.replace</h1>
<p>The initial value of <code>Symbol.replace</code> is the well-known symbol @@replace (<emu-xref href="#table-1" id="_ref_485"><a href="#table-1">Table 1</a></emu-xref>).</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-symbol.search">
<h1><span class="secnum">19.4.2.10</span>Symbol.search</h1>
<p>The initial value of <code>Symbol.search</code> is the well-known symbol @@search (<emu-xref href="#table-1" id="_ref_486"><a href="#table-1">Table 1</a></emu-xref>).</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-symbol.species">
<h1><span class="secnum">19.4.2.11</span>Symbol.species</h1>
<p>The initial value of <code>Symbol.species</code> is the well-known symbol @@species (<emu-xref href="#table-1" id="_ref_487"><a href="#table-1">Table 1</a></emu-xref>).</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-symbol.split">
<h1><span class="secnum">19.4.2.12</span>Symbol.split</h1>
<p>The initial value of <code>Symbol.split</code> is the well-known symbol @@split (<emu-xref href="#table-1" id="_ref_488"><a href="#table-1">Table 1</a></emu-xref>).</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-symbol.toprimitive">
<h1><span class="secnum">19.4.2.13</span>Symbol.toPrimitive</h1>
<p>The initial value of <code>Symbol.toPrimitive</code> is the well-known symbol @@toPrimitive (<emu-xref href="#table-1" id="_ref_489"><a href="#table-1">Table 1</a></emu-xref>).</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-symbol.tostringtag">
<h1><span class="secnum">19.4.2.14</span>Symbol.toStringTag</h1>
<p>The initial value of <code>Symbol.toStringTag</code> is the well-known symbol @@toStringTag (<emu-xref href="#table-1" id="_ref_490"><a href="#table-1">Table 1</a></emu-xref>).</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-symbol.unscopables">
<h1><span class="secnum">19.4.2.15</span>Symbol.unscopables</h1>
<p>The initial value of <code>Symbol.unscopables</code> is the well-known symbol @@unscopables (<emu-xref href="#table-1" id="_ref_491"><a href="#table-1">Table 1</a></emu-xref>).</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-symbol-prototype-object">
<h1><span class="secnum">19.4.3</span>Properties of the Symbol Prototype Object</h1>
<p>The Symbol prototype object:</p>
<ul>
<li>is the intrinsic object <dfn>%SymbolPrototype%</dfn>.</li>
<li>is an ordinary object.</li>
<li>is not a Symbol instance and does not have a [[SymbolData]] internal slot.</li>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_5116"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>.</li>
</ul>
<p>The abstract operation <dfn id="sec-thissymbolvalue" aoid="thisSymbolValue">thisSymbolValue</dfn>(<var>value</var>) performs the following steps:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_5117"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>value</var>) is Symbol, return <var>value</var>.</li><li>If <emu-xref aoid="Type" id="_ref_5118"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>value</var>) is Object and <var>value</var> has a [[SymbolData]] internal slot, then<ol><li>Let <var>s</var> be <var>value</var>.[[SymbolData]].</li><li><emu-xref href="#assert" id="_ref_5119"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_5120"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>s</var>) is Symbol.</li><li>Return <var>s</var>.</li></ol></li><li>Throw a <emu-val>TypeError</emu-val> exception.
</li></ol></emu-alg>
<emu-clause id="sec-symbol.prototype.constructor">
<h1><span class="secnum">19.4.3.1</span>Symbol.prototype.constructor</h1>
<p>The initial value of <code>Symbol.prototype.constructor</code> is the intrinsic object <emu-xref href="#sec-symbol-constructor" id="_ref_5121"><a href="#sec-symbol-constructor">%Symbol%</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-symbol.prototype.description">
<h1><span class="secnum">19.4.3.2</span>get Symbol.prototype.description</h1>
<p><code>Symbol.prototype.description</code> is an <emu-xref href="#sec-object-type" id="_ref_5122"><a href="#sec-object-type">accessor property</a></emu-xref> whose set accessor function is <emu-val>undefined</emu-val>. Its get accessor function performs the following steps:</p>
<emu-alg><ol><li>Let <var>s</var> be the <emu-val>this</emu-val> value.</li><li>Let <var>sym</var> be ?&nbsp;<emu-xref href="#sec-thissymbolvalue" id="_ref_5123"><a href="#sec-thissymbolvalue">thisSymbolValue</a></emu-xref>(<var>s</var>).</li><li>Return <var>sym</var>.[[Description]].
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-symbol.prototype.tostring">
<h1><span class="secnum">19.4.3.3</span>Symbol.prototype.toString ( )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>sym</var> be ?&nbsp;<emu-xref href="#sec-thissymbolvalue" id="_ref_5124"><a href="#sec-thissymbolvalue">thisSymbolValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Return <emu-xref aoid="SymbolDescriptiveString" id="_ref_5125"><a href="#sec-symboldescriptivestring">SymbolDescriptiveString</a></emu-xref>(<var>sym</var>).
</li></ol></emu-alg>
<emu-clause id="sec-symboldescriptivestring" aoid="SymbolDescriptiveString">
<h1><span class="secnum">19.4.3.3.1</span>Runtime Semantics: SymbolDescriptiveString ( <var>sym</var> )</h1>
<p>When the abstract operation SymbolDescriptiveString is called with argument <var>sym</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_5126"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_5127"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>sym</var>) is Symbol.</li><li>Let <var>desc</var> be <var>sym</var>'s [[Description]] value.</li><li>If <var>desc</var> is <emu-val>undefined</emu-val>, set <var>desc</var> to the empty string.</li><li><emu-xref href="#assert" id="_ref_5128"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_5129"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>desc</var>) is String.</li><li>Return the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_5130"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <code>"Symbol("</code>, <var>desc</var>, and <code>")"</code>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-symbol.prototype.valueof">
<h1><span class="secnum">19.4.3.4</span>Symbol.prototype.valueOf ( )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref href="#sec-thissymbolvalue" id="_ref_5131"><a href="#sec-thissymbolvalue">thisSymbolValue</a></emu-xref>(<emu-val>this</emu-val> value).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-symbol.prototype-@@toprimitive">
<h1><span class="secnum">19.4.3.5</span>Symbol.prototype [ @@toPrimitive ] ( <var>hint</var> )</h1>
<p>This function is called by ECMAScript language operators to
convert a Symbol object to a primitive value. The allowed values for <var>hint</var> are <code>"default"</code>, <code>"number"</code>, and <code>"string"</code>.</p>
<p>When the <code>@@toPrimitive</code> method is called with argument <var>hint</var>, the following steps are taken:</p>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref href="#sec-thissymbolvalue" id="_ref_5132"><a href="#sec-thissymbolvalue">thisSymbolValue</a></emu-xref>(<emu-val>this</emu-val> value).
</li></ol></emu-alg>
<p>The value of the <code>name</code> property of this function is <code>"[Symbol.toPrimitive]"</code>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-symbol.prototype-@@tostringtag">
<h1><span class="secnum">19.4.3.6</span>Symbol.prototype [ @@toStringTag ]</h1>
<p>The initial value of the @@toStringTag property is the String value <code>"Symbol"</code>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-symbol-instances">
<h1><span class="secnum">19.4.4</span>Properties of Symbol Instances</h1>
<p>Symbol instances are ordinary objects that inherit properties
from the Symbol prototype object. Symbol instances have a [[SymbolData]]
internal slot. The [[SymbolData]] internal slot is the Symbol value
represented by this Symbol object.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-error-objects">
<h1><span class="secnum">19.5</span>Error Objects</h1>
<p>Instances of Error objects are thrown as exceptions when runtime
errors occur. The Error objects may also serve as base objects for
user-defined exception classes.</p>
<emu-clause id="sec-error-constructor">
<h1><span class="secnum">19.5.1</span>The Error Constructor</h1>
<p>The Error <emu-xref href="#constructor" id="_ref_5133"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>is the intrinsic object <dfn>%Error%</dfn>.</li>
<li>is the initial value of the <code>Error</code> property of the <emu-xref href="#sec-global-object" id="_ref_5134"><a href="#sec-global-object">global object</a></emu-xref>.</li>
<li>creates and initializes a new Error object when called as a function rather than as a <emu-xref href="#constructor" id="_ref_5135"><a href="#constructor">constructor</a></emu-xref>. Thus the function call <code>Error(…)</code> is equivalent to the object creation expression <code>new Error(…)</code> with the same arguments.</li>
<li>is designed to be subclassable. It may be used as the value of an <code>extends</code> clause of a class definition. Subclass constructors that intend to inherit the specified <code>Error</code> behaviour must include a <code>super</code> call to the <code>Error</code> <emu-xref href="#constructor" id="_ref_5136"><a href="#constructor">constructor</a></emu-xref> to create and initialize subclass instances with an [[ErrorData]] internal slot.</li>
</ul>
<emu-clause id="sec-error-message">
<h1><span class="secnum">19.5.1.1</span>Error ( <var>message</var> )</h1>
<p>When the <code>Error</code> function is called with argument <var>message</var>, the following steps are taken:</p>
<emu-alg><ol><li>If NewTarget is <emu-val>undefined</emu-val>, let <var>newTarget</var> be the <emu-xref href="#active-function-object" id="_ref_5137"><a href="#active-function-object">active function object</a></emu-xref>, else let <var>newTarget</var> be NewTarget.</li><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="OrdinaryCreateFromConstructor" id="_ref_5138"><a href="#sec-ordinarycreatefromconstructor">OrdinaryCreateFromConstructor</a></emu-xref>(<var>newTarget</var>, <code>"%ErrorPrototype%"</code>, « [[ErrorData]] »).</li><li>If <var>message</var> is not <emu-val>undefined</emu-val>, then<ol><li>Let <var>msg</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5139"><a href="#sec-tostring">ToString</a></emu-xref>(<var>message</var>).</li><li>Let <var>msgDesc</var> be the PropertyDescriptor { [[Value]]: <var>msg</var>, [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</li><li>Perform !&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_5140"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>O</var>, <code>"message"</code>, <var>msgDesc</var>).</li></ol></li><li>Return <var>O</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-error-constructor">
<h1><span class="secnum">19.5.2</span>Properties of the Error Constructor</h1>
<p>The Error <emu-xref href="#constructor" id="_ref_5141"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_5142"><a href="#sec-properties-of-the-function-prototype-object">%FunctionPrototype%</a></emu-xref>.</li>
<li>has the following properties:</li>
</ul>
<emu-clause id="sec-error.prototype">
<h1><span class="secnum">19.5.2.1</span>Error.prototype</h1>
<p>The initial value of <code>Error.prototype</code> is the intrinsic object <emu-xref href="#sec-properties-of-the-error-prototype-object" id="_ref_5143"><a href="#sec-properties-of-the-error-prototype-object">%ErrorPrototype%</a></emu-xref>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-error-prototype-object">
<h1><span class="secnum">19.5.3</span>Properties of the Error Prototype Object</h1>
<p>The Error prototype object:</p>
<ul>
<li>is the intrinsic object <dfn>%ErrorPrototype%</dfn>.</li>
<li>is an ordinary object.</li>
<li>is not an Error instance and does not have an [[ErrorData]] internal slot.</li>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_5144"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>.</li>
</ul>
<emu-clause id="sec-error.prototype.constructor">
<h1><span class="secnum">19.5.3.1</span>Error.prototype.constructor</h1>
<p>The initial value of <code>Error.prototype.constructor</code> is the intrinsic object <emu-xref href="#sec-error-constructor" id="_ref_5145"><a href="#sec-error-constructor">%Error%</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-error.prototype.message">
<h1><span class="secnum">19.5.3.2</span>Error.prototype.message</h1>
<p>The initial value of <code>Error.prototype.message</code> is the empty String.</p>
</emu-clause>
<emu-clause id="sec-error.prototype.name">
<h1><span class="secnum">19.5.3.3</span>Error.prototype.name</h1>
<p>The initial value of <code>Error.prototype.name</code> is <code>"Error"</code>.</p>
</emu-clause>
<emu-clause id="sec-error.prototype.tostring">
<h1><span class="secnum">19.5.3.4</span>Error.prototype.toString ( )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_5146"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>name</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_5147"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <code>"name"</code>).</li><li>If <var>name</var> is <emu-val>undefined</emu-val>, set <var>name</var> to <code>"Error"</code>; otherwise set <var>name</var> to ?&nbsp;<emu-xref aoid="ToString" id="_ref_5148"><a href="#sec-tostring">ToString</a></emu-xref>(<var>name</var>).</li><li>Let <var>msg</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_5149"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <code>"message"</code>).</li><li>If <var>msg</var> is <emu-val>undefined</emu-val>, set <var>msg</var> to the empty String; otherwise set <var>msg</var> to ?&nbsp;<emu-xref aoid="ToString" id="_ref_5150"><a href="#sec-tostring">ToString</a></emu-xref>(<var>msg</var>).</li><li>If <var>name</var> is the empty String, return <var>msg</var>.</li><li>If <var>msg</var> is the empty String, return <var>name</var>.</li><li>Return the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_5151"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>name</var>, the code unit 0x003A (COLON), the code unit 0x0020 (SPACE), and <var>msg</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-error-instances">
<h1><span class="secnum">19.5.4</span>Properties of Error Instances</h1>
<p>Error instances are ordinary objects that inherit properties
from the Error prototype object and have an [[ErrorData]] internal slot
whose value is <emu-val>undefined</emu-val>. The only specified uses of [[ErrorData]] is to identify Error and <var>NativeError</var> instances as Error objects within <code>Object.prototype.toString</code>.</p>
</emu-clause>
<emu-clause id="sec-native-error-types-used-in-this-standard">
<h1><span class="secnum">19.5.5</span>Native Error Types Used in This Standard</h1>
<p>A new instance of one of the <var>NativeError</var> objects below is thrown when a runtime error is detected. All of these objects share the same structure, as described in <emu-xref href="#sec-nativeerror-object-structure" id="_ref_492"><a href="#sec-nativeerror-object-structure">19.5.6</a></emu-xref>.</p>
<emu-clause id="sec-native-error-types-used-in-this-standard-evalerror">
<h1><span class="secnum">19.5.5.1</span>EvalError</h1>
<p>This exception is not currently used within this
specification. This object remains for compatibility with previous
editions of this specification.</p>
</emu-clause>
<emu-clause id="sec-native-error-types-used-in-this-standard-rangeerror">
<h1><span class="secnum">19.5.5.2</span>RangeError</h1>
<p>Indicates a value that is not in the set or range of allowable values.</p>
</emu-clause>
<emu-clause id="sec-native-error-types-used-in-this-standard-referenceerror">
<h1><span class="secnum">19.5.5.3</span>ReferenceError</h1>
<p>Indicate that an invalid reference value has been detected.</p>
</emu-clause>
<emu-clause id="sec-native-error-types-used-in-this-standard-syntaxerror">
<h1><span class="secnum">19.5.5.4</span>SyntaxError</h1>
<p>Indicates that a parsing error has occurred.</p>
</emu-clause>
<emu-clause id="sec-native-error-types-used-in-this-standard-typeerror">
<h1><span class="secnum">19.5.5.5</span>TypeError</h1>
<p>TypeError is used to indicate an unsuccessful operation when none of the other <var>NativeError</var> objects are an appropriate indication of the failure cause.</p>
</emu-clause>
<emu-clause id="sec-native-error-types-used-in-this-standard-urierror">
<h1><span class="secnum">19.5.5.6</span>URIError</h1>
<p>Indicates that one of the global URI handling functions was used in a way that is incompatible with its definition.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-nativeerror-object-structure">
<h1><span class="secnum">19.5.6</span><var>NativeError</var> Object Structure</h1>
<p>When an ECMAScript implementation detects a runtime error, it throws a new instance of one of the <var>NativeError</var> objects defined in <emu-xref href="#sec-native-error-types-used-in-this-standard" id="_ref_493"><a href="#sec-native-error-types-used-in-this-standard">19.5.5</a></emu-xref>. Each of these objects has the structure described below, differing only in the name used as the <emu-xref href="#constructor" id="_ref_5152"><a href="#constructor">constructor</a></emu-xref> name instead of <var>NativeError</var>, in the <code>name</code> property of the prototype object, and in the implementation-defined <code>message</code> property of the prototype object.</p>
<p>For each error object, references to <var>NativeError</var> in the definition should be replaced with the appropriate error object name from <emu-xref href="#sec-native-error-types-used-in-this-standard" id="_ref_494"><a href="#sec-native-error-types-used-in-this-standard">19.5.5</a></emu-xref>.</p>
<emu-clause id="sec-nativeerror-constructors">
<h1><span class="secnum">19.5.6.1</span>The <var>NativeError</var> Constructors</h1>
<p>Each <var>NativeError</var> <emu-xref href="#constructor" id="_ref_5153"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>creates and initializes a new <var>NativeError</var> object when called as a function rather than as a <emu-xref href="#constructor" id="_ref_5154"><a href="#constructor">constructor</a></emu-xref>. A call of the object as a function is equivalent to calling it as a <emu-xref href="#constructor" id="_ref_5155"><a href="#constructor">constructor</a></emu-xref> with the same arguments. Thus the function call <code><var>NativeError</var>(…)</code> is equivalent to the object creation expression <code>new <var>NativeError</var>(…)</code> with the same arguments.</li>
<li>is designed to be subclassable. It may be used as the value of an <code>extends</code> clause of a class definition. Subclass constructors that intend to inherit the specified <var>NativeError</var> behaviour must include a <code>super</code> call to the <var>NativeError</var> <emu-xref href="#constructor" id="_ref_5156"><a href="#constructor">constructor</a></emu-xref> to create and initialize subclass instances with an [[ErrorData]] internal slot.</li>
</ul>
<emu-clause id="sec-nativeerror">
<h1><span class="secnum">19.5.6.1.1</span>NativeError ( <var>message</var> )</h1>
<p>When a <var>NativeError</var> function is called with argument <var>message</var>, the following steps are taken:</p>
<emu-alg><ol><li>If NewTarget is <emu-val>undefined</emu-val>, let <var>newTarget</var> be the <emu-xref href="#active-function-object" id="_ref_5157"><a href="#active-function-object">active function object</a></emu-xref>, else let <var>newTarget</var> be NewTarget.</li><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="OrdinaryCreateFromConstructor" id="_ref_5158"><a href="#sec-ordinarycreatefromconstructor">OrdinaryCreateFromConstructor</a></emu-xref>(<var>newTarget</var>, <code>"%<var>NativeError</var>Prototype%"</code>, « [[ErrorData]] »).</li><li>If <var>message</var> is not <emu-val>undefined</emu-val>, then<ol><li>Let <var>msg</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5159"><a href="#sec-tostring">ToString</a></emu-xref>(<var>message</var>).</li><li>Let <var>msgDesc</var> be the PropertyDescriptor { [[Value]]: <var>msg</var>, [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</li><li>Perform !&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_5160"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>O</var>, <code>"message"</code>, <var>msgDesc</var>).</li></ol></li><li>Return <var>O</var>.
</li></ol></emu-alg>
<p>The actual value of the string passed in step 2 is either <code>"%EvalErrorPrototype%"</code>, <code>"%RangeErrorPrototype%"</code>, <code>"%ReferenceErrorPrototype%"</code>, <code>"%SyntaxErrorPrototype%"</code>, <code>"%TypeErrorPrototype%"</code>, or <code>"%URIErrorPrototype%"</code> corresponding to which <var>NativeError</var> <emu-xref href="#constructor" id="_ref_5161"><a href="#constructor">constructor</a></emu-xref> is being defined.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-nativeerror-constructors">
<h1><span class="secnum">19.5.6.2</span>Properties of the <var>NativeError</var> Constructors</h1>
<p>Each <var>NativeError</var> <emu-xref href="#constructor" id="_ref_5162"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-error-constructor" id="_ref_5163"><a href="#sec-error-constructor">%Error%</a></emu-xref>.</li>
<li>has a <code>name</code> property whose value is the String value `"<var>NativeError</var>"`.</li>
<li>has the following properties:</li>
</ul>
<emu-clause id="sec-nativeerror.prototype">
<h1><span class="secnum">19.5.6.2.1</span>NativeError.prototype</h1>
<p>The initial value of <code><var>NativeError</var>.prototype</code> is a <var>NativeError</var> prototype object (<emu-xref href="#sec-properties-of-the-nativeerror-prototype-objects" id="_ref_495"><a href="#sec-properties-of-the-nativeerror-prototype-objects">19.5.6.3</a></emu-xref>). Each <var>NativeError</var> <emu-xref href="#constructor" id="_ref_5164"><a href="#constructor">constructor</a></emu-xref> has a distinct prototype object.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-nativeerror-prototype-objects">
<h1><span class="secnum">19.5.6.3</span>Properties of the <var>NativeError</var> Prototype Objects</h1>
<p>Each <var>NativeError</var> prototype object:</p>
<ul>
<li>is an ordinary object.</li>
<li>is not an Error instance and does not have an [[ErrorData]] internal slot.</li>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-error-prototype-object" id="_ref_5165"><a href="#sec-properties-of-the-error-prototype-object">%ErrorPrototype%</a></emu-xref>.</li>
</ul>
<emu-clause id="sec-nativeerror.prototype.constructor">
<h1><span class="secnum">19.5.6.3.1</span><var>NativeError</var>.prototype.constructor</h1>
<p>The initial value of the <code>constructor</code> property of the prototype for a given <var>NativeError</var> <emu-xref href="#constructor" id="_ref_5166"><a href="#constructor">constructor</a></emu-xref> is the corresponding intrinsic object %<var>NativeError</var>% (<emu-xref href="#sec-nativeerror-constructors" id="_ref_496"><a href="#sec-nativeerror-constructors">19.5.6.1</a></emu-xref>).</p>
</emu-clause>
<emu-clause id="sec-nativeerror.prototype.message">
<h1><span class="secnum">19.5.6.3.2</span><var>NativeError</var>.prototype.message</h1>
<p>The initial value of the <code>message</code> property of the prototype for a given <var>NativeError</var> <emu-xref href="#constructor" id="_ref_5167"><a href="#constructor">constructor</a></emu-xref> is the empty String.</p>
</emu-clause>
<emu-clause id="sec-nativeerror.prototype.name">
<h1><span class="secnum">19.5.6.3.3</span><var>NativeError</var>.prototype.name</h1>
<p>The initial value of the <code>name</code> property of the prototype for a given <var>NativeError</var> <emu-xref href="#constructor" id="_ref_5168"><a href="#constructor">constructor</a></emu-xref> is the String value consisting of the name of the <emu-xref href="#constructor" id="_ref_5169"><a href="#constructor">constructor</a></emu-xref> (the name used instead of <var>NativeError</var>).</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-nativeerror-instances">
<h1><span class="secnum">19.5.6.4</span>Properties of <var>NativeError</var> Instances</h1>
<p><var>NativeError</var> instances are ordinary objects that inherit properties from their <var>NativeError</var> prototype object and have an [[ErrorData]] internal slot whose value is <emu-val>undefined</emu-val>. The only specified use of [[ErrorData]] is by <code>Object.prototype.toString</code> (<emu-xref href="#sec-object.prototype.tostring" id="_ref_497"><a href="#sec-object.prototype.tostring">19.1.3.6</a></emu-xref>) to identify Error or <var>NativeError</var> instances.</p>
</emu-clause>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-numbers-and-dates">
<h1><span class="secnum">20</span>Numbers and Dates</h1>
<emu-clause id="sec-number-objects">
<h1><span class="secnum">20.1</span>Number Objects</h1>
<emu-clause id="sec-number-constructor">
<h1><span class="secnum">20.1.1</span>The Number Constructor</h1>
<p>The Number <emu-xref href="#constructor" id="_ref_5170"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>is the intrinsic object <dfn>%Number%</dfn>.</li>
<li>is the initial value of the <code>Number</code> property of the <emu-xref href="#sec-global-object" id="_ref_5171"><a href="#sec-global-object">global object</a></emu-xref>.</li>
<li>creates and initializes a new Number object when called as a <emu-xref href="#constructor" id="_ref_5172"><a href="#constructor">constructor</a></emu-xref>.</li>
<li>performs a type conversion when called as a function rather than as a <emu-xref href="#constructor" id="_ref_5173"><a href="#constructor">constructor</a></emu-xref>.</li>
<li>is designed to be subclassable. It may be used as the value of an <code>extends</code> clause of a class definition. Subclass constructors that intend to inherit the specified <code>Number</code> behaviour must include a <code>super</code> call to the <code>Number</code> <emu-xref href="#constructor" id="_ref_5174"><a href="#constructor">constructor</a></emu-xref> to create and initialize the subclass instance with a [[NumberData]] internal slot.</li>
</ul>
<emu-clause id="sec-number-constructor-number-value">
<h1><span class="secnum">20.1.1.1</span>Number ( <var>value</var> )</h1>
<p>When <code>Number</code> is called with argument <var>value</var>, the following steps are taken:</p>
<emu-alg><ol><li>If no arguments were passed to this function invocation, let <var>n</var> be <emu-val>+0</emu-val>.</li><li>Else, let <var>n</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5175"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>value</var>).</li><li>If NewTarget is <emu-val>undefined</emu-val>, return <var>n</var>.</li><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="OrdinaryCreateFromConstructor" id="_ref_5176"><a href="#sec-ordinarycreatefromconstructor">OrdinaryCreateFromConstructor</a></emu-xref>(NewTarget, <code>"%NumberPrototype%"</code>, « [[NumberData]] »).</li><li>Set <var>O</var>.[[NumberData]] to <var>n</var>.</li><li>Return <var>O</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-number-constructor">
<h1><span class="secnum">20.1.2</span>Properties of the Number Constructor</h1>
<p>The Number <emu-xref href="#constructor" id="_ref_5177"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_5178"><a href="#sec-properties-of-the-function-prototype-object">%FunctionPrototype%</a></emu-xref>.</li>
<li>has the following properties:</li>
</ul>
<emu-clause id="sec-number.epsilon">
<h1><span class="secnum">20.1.2.1</span>Number.EPSILON</h1>
<p>The value of Number.EPSILON is the difference between 1 and
the smallest value greater than 1 that is representable as a Number
value, which is approximately 2.2204460492503130808472633361816 x 10<sup> - 16</sup>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-number.isfinite">
<h1><span class="secnum">20.1.2.2</span>Number.isFinite ( <var>number</var> )</h1>
<p>When <code>Number.isFinite</code> is called with one argument <var>number</var>, the following steps are taken:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_5179"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>number</var>) is not Number, return <emu-val>false</emu-val>.</li><li>If <var>number</var> is <emu-val>NaN</emu-val>, <emu-val>+∞</emu-val>, or <emu-val>-∞</emu-val>, return <emu-val>false</emu-val>.</li><li>Otherwise, return <emu-val>true</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-number.isinteger">
<h1><span class="secnum">20.1.2.3</span>Number.isInteger ( <var>number</var> )</h1>
<p>When <code>Number.isInteger</code> is called with one argument <var>number</var>, the following steps are taken:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_5180"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>number</var>) is not Number, return <emu-val>false</emu-val>.</li><li>If <var>number</var> is <emu-val>NaN</emu-val>, <emu-val>+∞</emu-val>, or <emu-val>-∞</emu-val>, return <emu-val>false</emu-val>.</li><li>Let <var>integer</var> be !&nbsp;<emu-xref aoid="ToInteger" id="_ref_5181"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>number</var>).</li><li>If <var>integer</var> is not equal to <var>number</var>, return <emu-val>false</emu-val>.</li><li>Otherwise, return <emu-val>true</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-number.isnan">
<h1><span class="secnum">20.1.2.4</span>Number.isNaN ( <var>number</var> )</h1>
<p>When <code>Number.isNaN</code> is called with one argument <var>number</var>, the following steps are taken:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_5182"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>number</var>) is not Number, return <emu-val>false</emu-val>.</li><li>If <var>number</var> is <emu-val>NaN</emu-val>, return <emu-val>true</emu-val>.</li><li>Otherwise, return <emu-val>false</emu-val>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>This function differs from the global isNaN function (<emu-xref href="#sec-isnan-number" id="_ref_498"><a href="#sec-isnan-number">18.2.3</a></emu-xref>) in that it does not convert its argument to a Number before determining whether it is <emu-val>NaN</emu-val>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-number.issafeinteger">
<h1><span class="secnum">20.1.2.5</span>Number.isSafeInteger ( <var>number</var> )</h1>
<p>When <code>Number.isSafeInteger</code> is called with one argument <var>number</var>, the following steps are taken:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_5183"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>number</var>) is not Number, return <emu-val>false</emu-val>.</li><li>If <var>number</var> is <emu-val>NaN</emu-val>, <emu-val>+∞</emu-val>, or <emu-val>-∞</emu-val>, return <emu-val>false</emu-val>.</li><li>Let <var>integer</var> be !&nbsp;<emu-xref aoid="ToInteger" id="_ref_5184"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>number</var>).</li><li>If <var>integer</var> is not equal to <var>number</var>, return <emu-val>false</emu-val>.</li><li>If <emu-xref aoid="abs" id="_ref_5185"><a href="#eqn-abs">abs</a></emu-xref>(<var>integer</var>) ≤ 2<sup>53</sup> - 1, return <emu-val>true</emu-val>.</li><li>Otherwise, return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-number.max_safe_integer">
<h1><span class="secnum">20.1.2.6</span>Number.MAX_SAFE_INTEGER</h1>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The value of <code>Number.MAX_SAFE_INTEGER</code> is the largest integer n such that n and n + 1 are both exactly representable as a Number value.</p>
</div></emu-note>
<p>The value of Number.MAX_SAFE_INTEGER is 9007199254740991 (2<sup>53</sup> - 1).</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-number.max_value">
<h1><span class="secnum">20.1.2.7</span>Number.MAX_VALUE</h1>
<p>The value of <code>Number.MAX_VALUE</code> is the largest positive finite value of the Number type, which is approximately <emu-eqn class="inline">1.7976931348623157 × 10<sup>308</sup></emu-eqn>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-number.min_safe_integer">
<h1><span class="secnum">20.1.2.8</span>Number.MIN_SAFE_INTEGER</h1>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The value of <code>Number.MIN_SAFE_INTEGER</code> is the smallest integer n such that n and n - 1 are both exactly representable as a Number value.</p>
</div></emu-note>
<p>The value of Number.MIN_SAFE_INTEGER is -9007199254740991 (-(2<sup>53</sup> - 1)).</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-number.min_value">
<h1><span class="secnum">20.1.2.9</span>Number.MIN_VALUE</h1>
<p>The value of <code>Number.MIN_VALUE</code> is the smallest positive value of the Number type, which is approximately <emu-eqn class="inline">5 × 10<sup>-324</sup></emu-eqn>.</p>
<p>In the IEEE 754-2008 double precision binary representation,
the smallest possible value is a denormalized number. If an
implementation does not support denormalized values, the value of <code>Number.MIN_VALUE</code> must be the smallest non-zero positive value that can actually be represented by the implementation.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-number.nan">
<h1><span class="secnum">20.1.2.10</span>Number.NaN</h1>
<p>The value of <code>Number.NaN</code> is <emu-val>NaN</emu-val>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-number.negative_infinity">
<h1><span class="secnum">20.1.2.11</span>Number.NEGATIVE_INFINITY</h1>
<p>The value of Number.NEGATIVE_INFINITY is <emu-val>-∞</emu-val>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-number.parsefloat">
<h1><span class="secnum">20.1.2.12</span>Number.parseFloat ( <var>string</var> )</h1>
<p>The value of the <code>Number.parseFloat</code> <emu-xref href="#sec-object-type" id="_ref_5186"><a href="#sec-object-type">data property</a></emu-xref> is the same built-in <emu-xref href="#function-object" id="_ref_5187"><a href="#function-object">function object</a></emu-xref> that is the value of the <code>parseFloat</code> property of the <emu-xref href="#sec-global-object" id="_ref_5188"><a href="#sec-global-object">global object</a></emu-xref> defined in <emu-xref href="#sec-parsefloat-string" id="_ref_499"><a href="#sec-parsefloat-string">18.2.4</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-number.parseint">
<h1><span class="secnum">20.1.2.13</span>Number.parseInt ( <var>string</var>, <var>radix</var> )</h1>
<p>The value of the <code>Number.parseInt</code> <emu-xref href="#sec-object-type" id="_ref_5189"><a href="#sec-object-type">data property</a></emu-xref> is the same built-in <emu-xref href="#function-object" id="_ref_5190"><a href="#function-object">function object</a></emu-xref> that is the value of the <code>parseInt</code> property of the <emu-xref href="#sec-global-object" id="_ref_5191"><a href="#sec-global-object">global object</a></emu-xref> defined in <emu-xref href="#sec-parseint-string-radix" id="_ref_500"><a href="#sec-parseint-string-radix">18.2.5</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-number.positive_infinity">
<h1><span class="secnum">20.1.2.14</span>Number.POSITIVE_INFINITY</h1>
<p>The value of Number.POSITIVE_INFINITY is <emu-val>+∞</emu-val>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-number.prototype">
<h1><span class="secnum">20.1.2.15</span>Number.prototype</h1>
<p>The initial value of <code>Number.prototype</code> is the intrinsic object <emu-xref href="#sec-properties-of-the-number-prototype-object" id="_ref_5192"><a href="#sec-properties-of-the-number-prototype-object">%NumberPrototype%</a></emu-xref>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-number-prototype-object">
<h1><span class="secnum">20.1.3</span>Properties of the Number Prototype Object</h1>
<p>The Number prototype object:</p>
<ul>
<li>is the intrinsic object <dfn>%NumberPrototype%</dfn>.</li>
<li>is an ordinary object.</li>
<li>is itself a Number object; it has a [[NumberData]] internal slot with the value <emu-val>+0</emu-val>.</li>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_5193"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>.</li>
</ul>
<p>Unless explicitly stated otherwise, the methods of the Number prototype object defined below are not generic and the <emu-val>this</emu-val>
value passed to them must be either a Number value or an object that
has a [[NumberData]] internal slot that has been initialized to a Number
value.</p>
<p>The abstract operation <dfn id="sec-thisnumbervalue" aoid="thisNumberValue">thisNumberValue</dfn>(<var>value</var>) performs the following steps:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_5194"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>value</var>) is Number, return <var>value</var>.</li><li>If <emu-xref aoid="Type" id="_ref_5195"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>value</var>) is Object and <var>value</var> has a [[NumberData]] internal slot, then<ol><li>Let <var>n</var> be <var>value</var>.[[NumberData]].</li><li><emu-xref href="#assert" id="_ref_5196"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_5197"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>n</var>) is Number.</li><li>Return <var>n</var>.</li></ol></li><li>Throw a <emu-val>TypeError</emu-val> exception.
</li></ol></emu-alg>
<p>The phrase “this Number value” within the specification of a
method refers to the result returned by calling the abstract operation <emu-xref href="#sec-thisnumbervalue" id="_ref_5198"><a href="#sec-thisnumbervalue">thisNumberValue</a></emu-xref> with the <emu-val>this</emu-val> value of the method invocation passed as the argument.</p>
<emu-clause id="sec-number.prototype.constructor">
<h1><span class="secnum">20.1.3.1</span>Number.prototype.constructor</h1>
<p>The initial value of <code>Number.prototype.constructor</code> is the intrinsic object <emu-xref href="#sec-number-constructor" id="_ref_5199"><a href="#sec-number-constructor">%Number%</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-number.prototype.toexponential">
<h1><span class="secnum">20.1.3.2</span>Number.prototype.toExponential ( <var>fractionDigits</var> )</h1>
<p>Return a String containing this Number value represented in
decimal exponential notation with one digit before the significand's
decimal point and <var>fractionDigits</var> digits after the significand's decimal point. If <var>fractionDigits</var> is <emu-val>undefined</emu-val>, include as many significand digits as necessary to uniquely specify the Number (just like in <emu-xref aoid="ToString" id="_ref_5200"><a href="#sec-tostring">ToString</a></emu-xref> except that in this case the Number is always output in exponential notation). Specifically, perform the following steps:</p>
<emu-alg><ol><li>Let <var>x</var> be ?&nbsp;<emu-xref href="#sec-thisnumbervalue" id="_ref_5201"><a href="#sec-thisnumbervalue">thisNumberValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>f</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_5202"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>fractionDigits</var>).</li><li><emu-xref href="#assert" id="_ref_5203"><a href="#assert">Assert</a></emu-xref>: If <var>fractionDigits</var> is <emu-val>undefined</emu-val>, then <var>f</var> is 0.</li><li>If <var>x</var> is <emu-val>NaN</emu-val>, return the String <code>"NaN"</code>.</li><li>Let <var>s</var> be the empty String.</li><li>If <var>x</var> &lt; 0, then<ol><li>Set <var>s</var> to <code>"-"</code>.</li><li>Set <var>x</var> to -<var>x</var>.</li></ol></li><li>If <var>x</var> = <emu-val>+∞</emu-val>, then<ol><li>Return the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_5204"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>s</var> and <code>"Infinity"</code>.</li></ol></li><li>If <var>f</var> &lt; 0 or <var>f</var> &gt; 100, throw a <emu-val>RangeError</emu-val> exception.</li><li>If <var>x</var> = 0, then<ol><li>Let <var>m</var> be the String value consisting of <var>f</var> + 1 occurrences of the code unit 0x0030 (DIGIT ZERO).</li><li>Let <var>e</var> be 0.</li></ol></li><li>Else <var>x</var> ≠ 0,<ol><li>If <var>fractionDigits</var> is not <emu-val>undefined</emu-val>, then<ol><li>Let <var>e</var> and <var>n</var> be integers such that 10<sup><var>f</var></sup> ≤ <var>n</var> &lt; 10<sup><var>f</var> + 1</sup> and for which the exact mathematical value of <var>n</var> × 10<sup><var>e</var> - <var>f</var></sup> - <var>x</var> is as close to zero as possible. If there are two such sets of <var>e</var> and <var>n</var>, pick the <var>e</var> and <var>n</var> for which <var>n</var> × 10<sup><var>e</var> - <var>f</var></sup> is larger.</li></ol></li><li>Else <var>fractionDigits</var> is <emu-val>undefined</emu-val>,<ol><li>Let <var>e</var>, <var>n</var>, and <var>f</var> be integers such that <var>f</var> ≥ 0, 10<sup><var>f</var></sup> ≤ <var>n</var> &lt; 10<sup><var>f</var> + 1</sup>, the Number value for <var>n</var> × 10<sup><var>e</var> - <var>f</var></sup> is <var>x</var>, and <var>f</var> is as small as possible. Note that the decimal representation of <var>n</var> has <var>f</var> + 1 digits, <var>n</var> is not divisible by 10, and the least significant digit of <var>n</var> is not necessarily uniquely determined by these criteria.</li></ol></li><li>Let <var>m</var> be the String value consisting of the digits of the decimal representation of <var>n</var> (in order, with no leading zeroes).</li></ol></li><li>If <var>f</var> ≠ 0, then<ol><li>Let <var>a</var> be the first code unit of <var>m</var>, and let <var>b</var> be the remaining <var>f</var> code units of <var>m</var>.</li><li>Set <var>m</var> to the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_5205"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>a</var>, <code>"."</code>, and <var>b</var>.</li></ol></li><li>If <var>e</var> = 0, then<ol><li>Let <var>c</var> be <code>"+"</code>.</li><li>Let <var>d</var> be <code>"0"</code>.</li></ol></li><li>Else,<ol><li>If <var>e</var> &gt; 0, let <var>c</var> be <code>"+"</code>.</li><li>Else <var>e</var> ≤ 0,<ol><li>Let <var>c</var> be <code>"-"</code>.</li><li>Set <var>e</var> to -<var>e</var>.</li></ol></li><li>Let <var>d</var> be the String value consisting of the digits of the decimal representation of <var>e</var> (in order, with no leading zeroes).</li></ol></li><li>Set <var>m</var> to the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_5206"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>m</var>, <code>"e"</code>, <var>c</var>, and <var>d</var>.</li><li>Return the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_5207"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>s</var> and <var>m</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>For implementations that provide more accurate conversions
than required by the rules above, it is recommended that the following
alternative version of step 10.b.i be used as a guideline:</p>
<emu-alg type="i"><ol><li>Let <var>e</var>, <var>n</var>, and <var>f</var> be integers such that <var>f</var> ≥ 0, 10<sup><var>f</var></sup> ≤ <var>n</var> &lt; 10<sup><var>f</var> + 1</sup>, the Number value for <var>n</var> × 10<sup><var>e</var> - <var>f</var></sup> is <var>x</var>, and <var>f</var> is as small as possible. If there are multiple possibilities for <var>n</var>, choose the value of <var>n</var> for which <var>n</var> × 10<sup><var>e</var> - <var>f</var></sup> is closest in value to <var>x</var>. If there are two such possible values of <var>n</var>, choose the one that is even.
</li></ol></emu-alg>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-number.prototype.tofixed">
<h1><span class="secnum">20.1.3.3</span>Number.prototype.toFixed ( <var>fractionDigits</var> )</h1>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p><code>toFixed</code> returns a String containing this Number value represented in decimal fixed-point notation with <var>fractionDigits</var> digits after the decimal point. If <var>fractionDigits</var> is <emu-val>undefined</emu-val>, 0 is assumed.</p>
</div></emu-note>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>x</var> be ?&nbsp;<emu-xref href="#sec-thisnumbervalue" id="_ref_5208"><a href="#sec-thisnumbervalue">thisNumberValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>f</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_5209"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>fractionDigits</var>).</li><li><emu-xref href="#assert" id="_ref_5210"><a href="#assert">Assert</a></emu-xref>: If <var>fractionDigits</var> is <emu-val>undefined</emu-val>, then <var>f</var> is 0.</li><li>If <var>f</var> &lt; 0 or <var>f</var> &gt; 100, throw a <emu-val>RangeError</emu-val> exception.</li><li>If <var>x</var> is <emu-val>NaN</emu-val>, return the String <code>"NaN"</code>.</li><li>Let <var>s</var> be the empty String.</li><li>If <var>x</var> &lt; 0, then<ol><li>Set <var>s</var> to <code>"-"</code>.</li><li>Set <var>x</var> to -<var>x</var>.</li></ol></li><li>If <var>x</var> ≥ 10<sup>21</sup>, then<ol><li>Let <var>m</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_5211"><a href="#sec-tostring">ToString</a></emu-xref>(<var>x</var>).</li></ol></li><li>Else <var>x</var> &lt; 10<sup>21</sup>,<ol><li>Let <var>n</var> be an integer for which the exact mathematical value of <var>n</var> ÷ 10<sup><var>f</var></sup> - <var>x</var> is as close to zero as possible. If there are two such <var>n</var>, pick the larger <var>n</var>.</li><li>If <var>n</var> = 0, let <var>m</var> be the String <code>"0"</code>. Otherwise, let <var>m</var> be the String value consisting of the digits of the decimal representation of <var>n</var> (in order, with no leading zeroes).</li><li>If <var>f</var> ≠ 0, then<ol><li>Let <var>k</var> be the length of <var>m</var>.</li><li>If <var>k</var> ≤ <var>f</var>, then<ol><li>Let <var>z</var> be the String value consisting of <var>f</var> + 1 - <var>k</var> occurrences of the code unit 0x0030 (DIGIT ZERO).</li><li>Set <var>m</var> to the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_5212"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>z</var> and <var>m</var>.</li><li>Set <var>k</var> to <var>f</var> + 1.</li></ol></li><li>Let <var>a</var> be the first <var>k</var> - <var>f</var> code units of <var>m</var>, and let <var>b</var> be the remaining <var>f</var> code units of <var>m</var>.</li><li>Set <var>m</var> to the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_5213"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>a</var>, <code>"."</code>, and <var>b</var>.</li></ol></li></ol></li><li>Return the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_5214"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>s</var> and <var>m</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The output of <code>toFixed</code> may be more precise than <code>toString</code>
for some values because toString only prints enough significant digits
to distinguish the number from adjacent number values. For example,</p>
<p><code>(1000000000000000128).toString()</code> returns <code>"1000000000000000100"</code>, while
<br>
<code>(1000000000000000128).toFixed(0)</code> returns <code>"1000000000000000128"</code>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-number.prototype.tolocalestring">
<h1><span class="secnum">20.1.3.4</span>Number.prototype.toLocaleString ( [ <var>reserved1</var> [ , <var>reserved2</var> ] ] )</h1>
<p>An ECMAScript implementation that includes the ECMA-402 Internationalization API must implement the <code>Number.prototype.toLocaleString</code>
method as specified in the ECMA-402 specification. If an ECMAScript
implementation does not include the ECMA-402 API the following
specification of the <code>toLocaleString</code> method is used.</p>
<p>Produces a String value that represents this Number value
formatted according to the conventions of the host environment's current
locale. This function is implementation-dependent, and it is
permissible, but not encouraged, for it to return the same thing as <code>toString</code>.</p>
<p>The meanings of the optional parameters to this method are
defined in the ECMA-402 specification; implementations that do not
include ECMA-402 support must not use those parameter positions for
anything else.</p>
</emu-clause>
<emu-clause id="sec-number.prototype.toprecision">
<h1><span class="secnum">20.1.3.5</span>Number.prototype.toPrecision ( <var>precision</var> )</h1>
<p>Return a String containing this Number value represented
either in decimal exponential notation with one digit before the
significand's decimal point and <emu-eqn class="inline"><var>precision</var> - 1</emu-eqn> digits after the significand's decimal point or in decimal fixed notation with <var>precision</var> significant digits. If <var>precision</var> is <emu-val>undefined</emu-val>, call <emu-xref aoid="ToString" id="_ref_5215"><a href="#sec-tostring">ToString</a></emu-xref> instead. Specifically, perform the following steps:</p>
<emu-alg><ol><li>Let <var>x</var> be ?&nbsp;<emu-xref href="#sec-thisnumbervalue" id="_ref_5216"><a href="#sec-thisnumbervalue">thisNumberValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>If <var>precision</var> is <emu-val>undefined</emu-val>, return !&nbsp;<emu-xref aoid="ToString" id="_ref_5217"><a href="#sec-tostring">ToString</a></emu-xref>(<var>x</var>).</li><li>Let <var>p</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_5218"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>precision</var>).</li><li>If <var>x</var> is <emu-val>NaN</emu-val>, return the String <code>"NaN"</code>.</li><li>Let <var>s</var> be the empty String.</li><li>If <var>x</var> &lt; 0, then<ol><li>Set <var>s</var> to the code unit 0x002D (HYPHEN-MINUS).</li><li>Set <var>x</var> to -<var>x</var>.</li></ol></li><li>If <var>x</var> = <emu-val>+∞</emu-val>, then<ol><li>Return the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_5219"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>s</var> and <code>"Infinity"</code>.</li></ol></li><li>If <var>p</var> &lt; 1 or <var>p</var> &gt; 100, throw a <emu-val>RangeError</emu-val> exception.</li><li>If <var>x</var> = 0, then<ol><li>Let <var>m</var> be the String value consisting of <var>p</var> occurrences of the code unit 0x0030 (DIGIT ZERO).</li><li>Let <var>e</var> be 0.</li></ol></li><li>Else <var>x</var> ≠ 0,<ol><li>Let <var>e</var> and <var>n</var> be integers such that 10<sup><var>p</var> - 1</sup> ≤ <var>n</var> &lt; 10<sup><var>p</var></sup> and for which the exact mathematical value of <var>n</var> × 10<sup><var>e</var> - <var>p</var> + 1</sup> - <var>x</var> is as close to zero as possible. If there are two such sets of <var>e</var> and <var>n</var>, pick the <var>e</var> and <var>n</var> for which <var>n</var> × 10<sup><var>e</var> - <var>p</var> + 1</sup> is larger.</li><li>Let <var>m</var> be the String value consisting of the digits of the decimal representation of <var>n</var> (in order, with no leading zeroes).</li><li>If <var>e</var> &lt; -6 or <var>e</var> ≥ <var>p</var>, then<ol><li><emu-xref href="#assert" id="_ref_5220"><a href="#assert">Assert</a></emu-xref>: <var>e</var> ≠ 0.</li><li>If <var>p</var> ≠ 1, then<ol><li>Let <var>a</var> be the first code unit of <var>m</var>, and let <var>b</var> be the remaining <var>p</var> - 1 code units of <var>m</var>.</li><li>Set <var>m</var> to the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_5221"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>a</var>, <code>"."</code>, and <var>b</var>.</li></ol></li><li>If <var>e</var> &gt; 0, then<ol><li>Let <var>c</var> be the code unit 0x002B (PLUS SIGN).</li></ol></li><li>Else <var>e</var> &lt; 0,<ol><li>Let <var>c</var> be the code unit 0x002D (HYPHEN-MINUS).</li><li>Set <var>e</var> to -<var>e</var>.</li></ol></li><li>Let <var>d</var> be the String value consisting of the digits of the decimal representation of <var>e</var> (in order, with no leading zeroes).</li><li>Return the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_5222"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>s</var>, <var>m</var>, the code unit 0x0065 (LATIN SMALL LETTER E), <var>c</var>, and <var>d</var>.</li></ol></li></ol></li><li>If <var>e</var> = <var>p</var> - 1, return the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_5223"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>s</var> and <var>m</var>.</li><li>If <var>e</var> ≥ 0, then<ol><li>Set <var>m</var> to the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_5224"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of the first <var>e</var> + 1 code units of <var>m</var>, the code unit 0x002E (FULL STOP), and the remaining <var>p</var> - (<var>e</var> + 1) code units of <var>m</var>.</li></ol></li><li>Else <var>e</var> &lt; 0,<ol><li>Set <var>m</var> to the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_5225"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of the code unit 0x0030 (DIGIT ZERO), the code unit 0x002E (FULL STOP), -(<var>e</var> + 1) occurrences of the code unit 0x0030 (DIGIT ZERO), and the String <var>m</var>.</li></ol></li><li>Return the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_5226"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>s</var> and <var>m</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-number.prototype.tostring">
<h1><span class="secnum">20.1.3.6</span>Number.prototype.toString ( [ <var>radix</var> ] )</h1>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The optional <var>radix</var> should be an integer value in the inclusive range 2 to 36. If <var>radix</var> is not present or is <emu-val>undefined</emu-val> the Number 10 is used as the value of <var>radix</var>.</p>
</div></emu-note>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>x</var> be ?&nbsp;<emu-xref href="#sec-thisnumbervalue" id="_ref_5227"><a href="#sec-thisnumbervalue">thisNumberValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>If <var>radix</var> is not present, let <var>radixNumber</var> be 10.</li><li>Else if <var>radix</var> is <emu-val>undefined</emu-val>, let <var>radixNumber</var> be 10.</li><li>Else, let <var>radixNumber</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_5228"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>radix</var>).</li><li>If <var>radixNumber</var> &lt; 2 or <var>radixNumber</var> &gt; 36, throw a <emu-val>RangeError</emu-val> exception.</li><li>If <var>radixNumber</var> = 10, return !&nbsp;<emu-xref aoid="ToString" id="_ref_5229"><a href="#sec-tostring">ToString</a></emu-xref>(<var>x</var>).</li><li>Return the String representation of this Number value using the radix specified by <var>radixNumber</var>. Letters <code>a</code>-<code>z</code>
are used for digits with values 10 through 35. The precise algorithm is
implementation-dependent, however the algorithm should be a
generalization of that specified in <emu-xref href="#sec-tostring-applied-to-the-number-type" id="_ref_501"><a href="#sec-tostring-applied-to-the-number-type">7.1.12.1</a></emu-xref>.
</li></ol></emu-alg>
<p>The <code>toString</code> function is not generic; it throws a <emu-val>TypeError</emu-val> exception if its <emu-val>this</emu-val> value is not a Number or a Number object. Therefore, it cannot be transferred to other kinds of objects for use as a method.</p>
<p>The <code>"length"</code> property of the <code>toString</code> method is 1.</p>
</emu-clause>
<emu-clause id="sec-number.prototype.valueof">
<h1><span class="secnum">20.1.3.7</span>Number.prototype.valueOf ( )</h1>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref href="#sec-thisnumbervalue" id="_ref_5230"><a href="#sec-thisnumbervalue">thisNumberValue</a></emu-xref>(<emu-val>this</emu-val> value).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-number-instances">
<h1><span class="secnum">20.1.4</span>Properties of Number Instances</h1>
<p>Number instances are ordinary objects that inherit properties
from the Number prototype object. Number instances also have a
[[NumberData]] internal slot. The [[NumberData]] internal slot is the
Number value represented by this Number object.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-math-object">
<h1><span class="secnum">20.2</span>The Math Object</h1>
<p>The Math object:</p>
<ul>
<li>is the intrinsic object <dfn>%Math%</dfn>.</li>
<li>is the initial value of the <code>Math</code> property of the <emu-xref href="#sec-global-object" id="_ref_5231"><a href="#sec-global-object">global object</a></emu-xref>.</li>
<li>is an ordinary object.</li>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_5232"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>.</li>
<li>is not a <emu-xref href="#function-object" id="_ref_5233"><a href="#function-object">function object</a></emu-xref>.</li>
<li>does not have a [[Construct]] internal method; it cannot be used as a <emu-xref href="#constructor" id="_ref_5234"><a href="#constructor">constructor</a></emu-xref> with the <code>new</code> operator.</li>
<li>does not have a [[Call]] internal method; it cannot be invoked as a function.</li>
</ul>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>In this specification, the phrase “the Number value for <var>x</var>” has a technical meaning defined in <emu-xref href="#sec-ecmascript-language-types-number-type" id="_ref_502"><a href="#sec-ecmascript-language-types-number-type">6.1.6</a></emu-xref>.</p>
</div></emu-note>
<emu-clause id="sec-value-properties-of-the-math-object">
<h1><span class="secnum">20.2.1</span>Value Properties of the Math Object</h1>
<emu-clause id="sec-math.e">
<h1><span class="secnum">20.2.1.1</span>Math.E</h1>
<p>The Number value for <var>e</var>, the base of the natural logarithms, which is approximately 2.7182818284590452354.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-math.ln10">
<h1><span class="secnum">20.2.1.2</span>Math.LN10</h1>
<p>The Number value for the natural logarithm of 10, which is approximately 2.302585092994046.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-math.ln2">
<h1><span class="secnum">20.2.1.3</span>Math.LN2</h1>
<p>The Number value for the natural logarithm of 2, which is approximately 0.6931471805599453.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-math.log10e">
<h1><span class="secnum">20.2.1.4</span>Math.LOG10E</h1>
<p>The Number value for the base-10 logarithm of <var>e</var>, the base of the natural logarithms; this value is approximately 0.4342944819032518.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The value of <code>Math.LOG10E</code> is approximately the reciprocal of the value of <code>Math.LN10</code>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-math.log2e">
<h1><span class="secnum">20.2.1.5</span>Math.LOG2E</h1>
<p>The Number value for the base-2 logarithm of <var>e</var>, the base of the natural logarithms; this value is approximately 1.4426950408889634.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The value of <code>Math.LOG2E</code> is approximately the reciprocal of the value of <code>Math.LN2</code>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-math.pi">
<h1><span class="secnum">20.2.1.6</span>Math.PI</h1>
<p>The Number value for π, the ratio of the circumference of a circle to its diameter, which is approximately 3.1415926535897932.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-math.sqrt1_2">
<h1><span class="secnum">20.2.1.7</span>Math.SQRT1_2</h1>
<p>The Number value for the square root of ½, which is approximately 0.7071067811865476.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The value of <code>Math.SQRT1_2</code> is approximately the reciprocal of the value of <code>Math.SQRT2</code>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-math.sqrt2">
<h1><span class="secnum">20.2.1.8</span>Math.SQRT2</h1>
<p>The Number value for the square root of 2, which is approximately 1.4142135623730951.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-math-@@tostringtag">
<h1><span class="secnum">20.2.1.9</span>Math [ @@toStringTag ]</h1>
<p>The initial value of the @@toStringTag property is the String value <code>"Math"</code>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-function-properties-of-the-math-object">
<h1><span class="secnum">20.2.2</span>Function Properties of the Math Object</h1>
<p>Each of the following <code>Math</code> object functions applies the <emu-xref aoid="ToNumber" id="_ref_5235"><a href="#sec-tonumber">ToNumber</a></emu-xref> abstract operation to each of its arguments (in left-to-right order if there is more than one). If <emu-xref aoid="ToNumber" id="_ref_5236"><a href="#sec-tonumber">ToNumber</a></emu-xref> returns an <emu-xref href="#sec-completion-record-specification-type" id="_ref_5237"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, that <emu-xref href="#sec-completion-record-specification-type" id="_ref_5238"><a href="#sec-completion-record-specification-type">Completion Record</a></emu-xref>
is immediately returned. Otherwise, the function performs a computation
on the resulting Number value(s). The value returned by each function
is a Number.</p>
<p>In the function descriptions below, the symbols <emu-val>NaN</emu-val>, <emu-val>-0</emu-val>, <emu-val>+0</emu-val>, <emu-val>-∞</emu-val> and <emu-val>+∞</emu-val> refer to the Number values described in <emu-xref href="#sec-ecmascript-language-types-number-type" id="_ref_503"><a href="#sec-ecmascript-language-types-number-type">6.1.6</a></emu-xref>.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The behaviour of the functions <code>acos</code>, <code>acosh</code>, <code>asin</code>, <code>asinh</code>, <code>atan</code>, <code>atanh</code>, <code>atan2</code>, <code>cbrt</code>, <code>cos</code>, <code>cosh</code>, <code>exp</code>, <code>expm1</code>, <code>hypot</code>, <code>log</code>,<code>log1p</code>, <code>log2</code>, <code>log10</code>, <code>pow</code>, <code>random</code>, <code>sin</code>, <code>sinh</code>, <code>sqrt</code>, <code>tan</code>, and <code>tanh</code>
is not precisely specified here except to require specific results for
certain argument values that represent boundary cases of interest. For
other argument values, these functions are intended to compute
approximations to the results of familiar mathematical functions, but
some latitude is allowed in the choice of approximation algorithms. The
general intent is that an implementer should be able to use the same
mathematical library for ECMAScript on a given hardware platform that is
available to C programmers on that platform.</p>
<p>Although the choice of algorithms is left to the
implementation, it is recommended (but not specified by this standard)
that implementations use the approximation algorithms for IEEE 754-2008
arithmetic contained in <code>fdlibm</code>, the freely distributable mathematical library from Sun Microsystems (<a href="http://www.netlib.org/fdlibm">http://www.netlib.org/fdlibm</a>).</p>
</div></emu-note>
<emu-clause id="sec-math.abs">
<h1><span class="secnum">20.2.2.1</span>Math.abs ( <var>x</var> )</h1>
<p>Returns the absolute value of <var>x</var>; the result has the same magnitude as <var>x</var> but has positive sign.</p>
<ul>
<li>
If <var>x</var> is <emu-val>NaN</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>-0</emu-val>, the result is <emu-val>+0</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>-∞</emu-val>, the result is <emu-val>+∞</emu-val>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-math.acos">
<h1><span class="secnum">20.2.2.2</span>Math.acos ( <var>x</var> )</h1>
<p>Returns an implementation-dependent approximation to the arc cosine of <var>x</var>. The result is expressed in radians and ranges from <emu-val>+0</emu-val> to +π.</p>
<ul>
<li>
If <var>x</var> is <emu-val>NaN</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>x</var> is greater than 1, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>x</var> is less than -1, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>x</var> is exactly 1, the result is <emu-val>+0</emu-val>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-math.acosh">
<h1><span class="secnum">20.2.2.3</span>Math.acosh ( <var>x</var> )</h1>
<p>Returns an implementation-dependent approximation to the inverse hyperbolic cosine of <var>x</var>.</p>
<ul>
<li>
If <var>x</var> is <emu-val>NaN</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If x is less than 1, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If x is 1, the result is <emu-val>+0</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+∞</emu-val>, the result is <emu-val>+∞</emu-val>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-math.asin">
<h1><span class="secnum">20.2.2.4</span>Math.asin ( <var>x</var> )</h1>
<p>Returns an implementation-dependent approximation to the arc sine of <var>x</var>. The result is expressed in radians and ranges from -π / 2 to +π / 2.</p>
<ul>
<li>
If <var>x</var> is <emu-val>NaN</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>x</var> is greater than 1, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>x</var> is less than -1, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+0</emu-val>, the result is <emu-val>+0</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>-0</emu-val>, the result is <emu-val>-0</emu-val>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-math.asinh">
<h1><span class="secnum">20.2.2.5</span>Math.asinh ( <var>x</var> )</h1>
<p>Returns an implementation-dependent approximation to the inverse hyperbolic sine of <var>x</var>.</p>
<ul>
<li>
If <var>x</var> is <emu-val>NaN</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+0</emu-val>, the result is <emu-val>+0</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>-0</emu-val>, the result is <emu-val>-0</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+∞</emu-val>, the result is <emu-val>+∞</emu-val>.
</li>
<li>
If x is <emu-val>-∞</emu-val>, the result is <emu-val>-∞</emu-val>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-math.atan">
<h1><span class="secnum">20.2.2.6</span>Math.atan ( <var>x</var> )</h1>
<p>Returns an implementation-dependent approximation to the arc tangent of <var>x</var>. The result is expressed in radians and ranges from -π / 2 to +π / 2.</p>
<ul>
<li>
If <var>x</var> is <emu-val>NaN</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+0</emu-val>, the result is <emu-val>+0</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>-0</emu-val>, the result is <emu-val>-0</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+∞</emu-val>, the result is an implementation-dependent approximation to +π / 2.
</li>
<li>
If <var>x</var> is <emu-val>-∞</emu-val>, the result is an implementation-dependent approximation to -π / 2.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-math.atanh">
<h1><span class="secnum">20.2.2.7</span>Math.atanh ( <var>x</var> )</h1>
<p>Returns an implementation-dependent approximation to the inverse hyperbolic tangent of <var>x</var>.</p>
<ul>
<li>
If <var>x</var> is <emu-val>NaN</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>x</var> is less than -1, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>x</var> is greater than 1, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>x</var> is -1, the result is <emu-val>-∞</emu-val>.
</li>
<li>
If <var>x</var> is +1, the result is <emu-val>+∞</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+0</emu-val>, the result is <emu-val>+0</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>-0</emu-val>, the result is <emu-val>-0</emu-val>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-math.atan2">
<h1><span class="secnum">20.2.2.8</span>Math.atan2 ( <var>y</var>, <var>x</var> )</h1>
<p>Returns an implementation-dependent approximation to the arc tangent of the quotient <emu-eqn class="inline"><var>y</var> / <var>x</var></emu-eqn> of the arguments <var>y</var> and <var>x</var>, where the signs of <var>y</var> and <var>x</var>
are used to determine the quadrant of the result. Note that it is
intentional and traditional for the two-argument arc tangent function
that the argument named <var>y</var> be first and the argument named <var>x</var> be second. The result is expressed in radians and ranges from -π to +π.</p>
<ul>
<li>
If either <var>x</var> or <var>y</var> is <emu-val>NaN</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>y</var> &gt; 0 and <var>x</var> is <emu-val>+0</emu-val>, the result is an implementation-dependent approximation to +π / 2.
</li>
<li>
If <var>y</var> &gt; 0 and <var>x</var> is <emu-val>-0</emu-val>, the result is an implementation-dependent approximation to +π / 2.
</li>
<li>
If <var>y</var> is <emu-val>+0</emu-val> and <var>x</var> &gt; 0, the result is <emu-val>+0</emu-val>.
</li>
<li>
If <var>y</var> is <emu-val>+0</emu-val> and <var>x</var> is <emu-val>+0</emu-val>, the result is <emu-val>+0</emu-val>.
</li>
<li>
If <var>y</var> is <emu-val>+0</emu-val> and <var>x</var> is <emu-val>-0</emu-val>, the result is an implementation-dependent approximation to +π.
</li>
<li>
If <var>y</var> is <emu-val>+0</emu-val> and <var>x</var> &lt; 0, the result is an implementation-dependent approximation to +π.
</li>
<li>
If <var>y</var> is <emu-val>-0</emu-val> and <var>x</var> &gt; 0, the result is <emu-val>-0</emu-val>.
</li>
<li>
If <var>y</var> is <emu-val>-0</emu-val> and <var>x</var> is <emu-val>+0</emu-val>, the result is <emu-val>-0</emu-val>.
</li>
<li>
If <var>y</var> is <emu-val>-0</emu-val> and <var>x</var> is <emu-val>-0</emu-val>, the result is an implementation-dependent approximation to -π.
</li>
<li>
If <var>y</var> is <emu-val>-0</emu-val> and <var>x</var> &lt; 0, the result is an implementation-dependent approximation to -π.
</li>
<li>
If <var>y</var> &lt; 0 and <var>x</var> is <emu-val>+0</emu-val>, the result is an implementation-dependent approximation to -π / 2.
</li>
<li>
If <var>y</var> &lt; 0 and <var>x</var> is <emu-val>-0</emu-val>, the result is an implementation-dependent approximation to -π / 2.
</li>
<li>
If <var>y</var> &gt; 0 and <var>y</var> is finite and <var>x</var> is <emu-val>+∞</emu-val>, the result is <emu-val>+0</emu-val>.
</li>
<li>
If <var>y</var> &gt; 0 and <var>y</var> is finite and <var>x</var> is <emu-val>-∞</emu-val>, the result is an implementation-dependent approximation to +π.
</li>
<li>
If <var>y</var> &lt; 0 and <var>y</var> is finite and <var>x</var> is <emu-val>+∞</emu-val>, the result is <emu-val>-0</emu-val>.
</li>
<li>
If <var>y</var> &lt; 0 and <var>y</var> is finite and <var>x</var> is <emu-val>-∞</emu-val>, the result is an implementation-dependent approximation to -π.
</li>
<li>
If <var>y</var> is <emu-val>+∞</emu-val> and <var>x</var> is finite, the result is an implementation-dependent approximation to +π / 2.
</li>
<li>
If <var>y</var> is <emu-val>-∞</emu-val> and <var>x</var> is finite, the result is an implementation-dependent approximation to -π / 2.
</li>
<li>
If <var>y</var> is <emu-val>+∞</emu-val> and <var>x</var> is <emu-val>+∞</emu-val>, the result is an implementation-dependent approximation to +π / 4.
</li>
<li>
If <var>y</var> is <emu-val>+∞</emu-val> and <var>x</var> is <emu-val>-∞</emu-val>, the result is an implementation-dependent approximation to +3π / 4.
</li>
<li>
If <var>y</var> is <emu-val>-∞</emu-val> and <var>x</var> is <emu-val>+∞</emu-val>, the result is an implementation-dependent approximation to -π / 4.
</li>
<li>
If <var>y</var> is <emu-val>-∞</emu-val> and <var>x</var> is <emu-val>-∞</emu-val>, the result is an implementation-dependent approximation to -3π / 4.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-math.cbrt">
<h1><span class="secnum">20.2.2.9</span>Math.cbrt ( <var>x</var> )</h1>
<p>Returns an implementation-dependent approximation to the cube root of <var>x</var>.</p>
<ul>
<li>
If <var>x</var> is <emu-val>NaN</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+0</emu-val>, the result is <emu-val>+0</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>-0</emu-val>, the result is <emu-val>-0</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+∞</emu-val>, the result is <emu-val>+∞</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>-∞</emu-val>, the result is <emu-val>-∞</emu-val>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-math.ceil">
<h1><span class="secnum">20.2.2.10</span>Math.ceil ( <var>x</var> )</h1>
<p>Returns the smallest (closest to <emu-val>-∞</emu-val>) Number value that is not less than <var>x</var> and is equal to a mathematical integer. If <var>x</var> is already an integer, the result is <var>x</var>.</p>
<ul>
<li>
If <var>x</var> is <emu-val>NaN</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+0</emu-val>, the result is <emu-val>+0</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>-0</emu-val>, the result is <emu-val>-0</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+∞</emu-val>, the result is <emu-val>+∞</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>-∞</emu-val>, the result is <emu-val>-∞</emu-val>.
</li>
<li>
If <var>x</var> is less than 0 but greater than -1, the result is <emu-val>-0</emu-val>.
</li>
</ul>
<p>The value of <code>Math.ceil(x)</code> is the same as the value of <code>-Math.floor(-x)</code>.</p>
</emu-clause>
<emu-clause id="sec-math.clz32">
<h1><span class="secnum">20.2.2.11</span>Math.clz32 ( <var>x</var> )</h1>
<p>When <code>Math.clz32</code> is called with one argument <var>x</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>n</var> be ?&nbsp;<emu-xref aoid="ToUint32" id="_ref_5239"><a href="#sec-touint32">ToUint32</a></emu-xref>(<var>x</var>).</li><li>Let <var>p</var> be the number of leading zero bits in the 32-bit binary representation of <var>n</var>.</li><li>Return <var>p</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>If <var>n</var> is 0, <var>p</var> will be 32. If the most significant bit of the 32-bit binary encoding of <var>n</var> is 1, <var>p</var> will be 0.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-math.cos">
<h1><span class="secnum">20.2.2.12</span>Math.cos ( <var>x</var> )</h1>
<p>Returns an implementation-dependent approximation to the cosine of <var>x</var>. The argument is expressed in radians.</p>
<ul>
<li>
If <var>x</var> is <emu-val>NaN</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+0</emu-val>, the result is 1.
</li>
<li>
If <var>x</var> is <emu-val>-0</emu-val>, the result is 1.
</li>
<li>
If <var>x</var> is <emu-val>+∞</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>-∞</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-math.cosh">
<h1><span class="secnum">20.2.2.13</span>Math.cosh ( <var>x</var> )</h1>
<p>Returns an implementation-dependent approximation to the hyperbolic cosine of <var>x</var>.</p>
<ul>
<li>
If <var>x</var> is <emu-val>NaN</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+0</emu-val>, the result is 1.
</li>
<li>
If <var>x</var> is <emu-val>-0</emu-val>, the result is 1.
</li>
<li>
If <var>x</var> is <emu-val>+∞</emu-val>, the result is <emu-val>+∞</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>-∞</emu-val>, the result is <emu-val>+∞</emu-val>.
</li>
</ul>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The value of cosh(x) is the same as <i>(exp(x) + exp(-x)) / 2</i>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-math.exp">
<h1><span class="secnum">20.2.2.14</span>Math.exp ( <var>x</var> )</h1>
<p>Returns an implementation-dependent approximation to the exponential function of <var>x</var> (<var>e</var> raised to the power of <var>x</var>, where <var>e</var> is the base of the natural logarithms).</p>
<ul>
<li>
If <var>x</var> is <emu-val>NaN</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+0</emu-val>, the result is 1.
</li>
<li>
If <var>x</var> is <emu-val>-0</emu-val>, the result is 1.
</li>
<li>
If <var>x</var> is <emu-val>+∞</emu-val>, the result is <emu-val>+∞</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>-∞</emu-val>, the result is <emu-val>+0</emu-val>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-math.expm1">
<h1><span class="secnum">20.2.2.15</span>Math.expm1 ( <var>x</var> )</h1>
<p>Returns an implementation-dependent approximation to subtracting 1 from the exponential function of <var>x</var> (<var>e</var> raised to the power of <var>x</var>, where <var>e</var> is the base of the natural logarithms). The result is computed in a way that is accurate even when the value of x is close 0.</p>
<ul>
<li>
If <var>x</var> is <emu-val>NaN</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+0</emu-val>, the result is <emu-val>+0</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>-0</emu-val>, the result is <emu-val>-0</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+∞</emu-val>, the result is <emu-val>+∞</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>-∞</emu-val>, the result is -1.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-math.floor">
<h1><span class="secnum">20.2.2.16</span>Math.floor ( <var>x</var> )</h1>
<p>Returns the greatest (closest to <emu-val>+∞</emu-val>) Number value that is not greater than <var>x</var> and is equal to a mathematical integer. If <var>x</var> is already an integer, the result is <var>x</var>.</p>
<ul>
<li>
If <var>x</var> is <emu-val>NaN</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+0</emu-val>, the result is <emu-val>+0</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>-0</emu-val>, the result is <emu-val>-0</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+∞</emu-val>, the result is <emu-val>+∞</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>-∞</emu-val>, the result is <emu-val>-∞</emu-val>.
</li>
<li>
If <var>x</var> is greater than 0 but less than 1, the result is <emu-val>+0</emu-val>.
</li>
</ul>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The value of <code>Math.floor(x)</code> is the same as the value of <code>-Math.ceil(-x)</code>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-math.fround">
<h1><span class="secnum">20.2.2.17</span>Math.fround ( <var>x</var> )</h1>
<p>When <code>Math.fround</code> is called with argument <var>x</var>, the following steps are taken:</p>
<emu-alg><ol><li>If <var>x</var> is <emu-val>NaN</emu-val>, return <emu-val>NaN</emu-val>.</li><li>If <var>x</var> is one of <emu-val>+0</emu-val>, <emu-val>-0</emu-val>, <emu-val>+∞</emu-val>, <emu-val>-∞</emu-val>, return <var>x</var>.</li><li>Let <var>x32</var> be the result of converting <var>x</var> to a value in IEEE 754-2008 binary32 format using roundTiesToEven.</li><li>Let <var>x64</var> be the result of converting <var>x32</var> to a value in IEEE 754-2008 binary64 format.</li><li>Return the ECMAScript Number value corresponding to <var>x64</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-math.hypot">
<h1><span class="secnum">20.2.2.18</span>Math.hypot ( <var>value1</var>, <var>value2</var>, ...<var>values</var> )</h1>
<p><code>Math.hypot</code> returns an implementation-dependent approximation of the square root of the sum of squares of its arguments.</p>
<ul>
<li>
If no arguments are passed, the result is <emu-val>+0</emu-val>.
</li>
<li>
If any argument is <emu-val>+∞</emu-val>, the result is <emu-val>+∞</emu-val>.
</li>
<li>
If any argument is <emu-val>-∞</emu-val>, the result is <emu-val>+∞</emu-val>.
</li>
<li>
If no argument is <emu-val>+∞</emu-val> or <emu-val>-∞</emu-val>, and any argument is <emu-val>NaN</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If all arguments are either <emu-val>+0</emu-val> or <emu-val>-0</emu-val>, the result is <emu-val>+0</emu-val>.
</li>
</ul>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Implementations should take care to avoid the loss of
precision from overflows and underflows that are prone to occur in naive
implementations when this function is called with two or more
arguments.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-math.imul">
<h1><span class="secnum">20.2.2.19</span>Math.imul ( <var>x</var>, <var>y</var> )</h1>
<p>When <code>Math.imul</code> is called with arguments <var>x</var> and <var>y</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>a</var> be ?&nbsp;<emu-xref aoid="ToUint32" id="_ref_5240"><a href="#sec-touint32">ToUint32</a></emu-xref>(<var>x</var>).</li><li>Let <var>b</var> be ?&nbsp;<emu-xref aoid="ToUint32" id="_ref_5241"><a href="#sec-touint32">ToUint32</a></emu-xref>(<var>y</var>).</li><li>Let <var>product</var> be (<var>a</var> × <var>b</var>) <emu-xref aoid="modulo" id="_ref_5242"><a href="#eqn-modulo">modulo</a></emu-xref> 2<sup>32</sup>.</li><li>If <var>product</var> ≥ 2<sup>31</sup>, return <var>product</var> - 2<sup>32</sup>; otherwise return <var>product</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-math.log">
<h1><span class="secnum">20.2.2.20</span>Math.log ( <var>x</var> )</h1>
<p>Returns an implementation-dependent approximation to the natural logarithm of <var>x</var>.</p>
<ul>
<li>
If <var>x</var> is <emu-val>NaN</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>x</var> is less than 0, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+0</emu-val> or <emu-val>-0</emu-val>, the result is <emu-val>-∞</emu-val>.
</li>
<li>
If <var>x</var> is 1, the result is <emu-val>+0</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+∞</emu-val>, the result is <emu-val>+∞</emu-val>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-math.log1p">
<h1><span class="secnum">20.2.2.21</span>Math.log1p ( <var>x</var> )</h1>
<p>Returns an implementation-dependent approximation to the natural logarithm of 1 + <var>x</var>. The result is computed in a way that is accurate even when the value of x is close to zero.</p>
<ul>
<li>
If <var>x</var> is <emu-val>NaN</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>x</var> is less than -1, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If x is -1, the result is <emu-val>-∞</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+0</emu-val>, the result is <emu-val>+0</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>-0</emu-val>, the result is <emu-val>-0</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+∞</emu-val>, the result is <emu-val>+∞</emu-val>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-math.log10">
<h1><span class="secnum">20.2.2.22</span>Math.log10 ( <var>x</var> )</h1>
<p>Returns an implementation-dependent approximation to the base 10 logarithm of <var>x</var>.</p>
<ul>
<li>
If <var>x</var> is <emu-val>NaN</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>x</var> is less than 0, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+0</emu-val>, the result is <emu-val>-∞</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>-0</emu-val>, the result is <emu-val>-∞</emu-val>.
</li>
<li>
If <var>x</var> is 1, the result is <emu-val>+0</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+∞</emu-val>, the result is <emu-val>+∞</emu-val>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-math.log2">
<h1><span class="secnum">20.2.2.23</span>Math.log2 ( <var>x</var> )</h1>
<p>Returns an implementation-dependent approximation to the base 2 logarithm of <var>x</var>.</p>
<ul>
<li>
If <var>x</var> is <emu-val>NaN</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>x</var> is less than 0, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+0</emu-val>, the result is <emu-val>-∞</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>-0</emu-val>, the result is <emu-val>-∞</emu-val>.
</li>
<li>
If <var>x</var> is 1, the result is <emu-val>+0</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+∞</emu-val>, the result is <emu-val>+∞</emu-val>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-math.max">
<h1><span class="secnum">20.2.2.24</span>Math.max ( <var>value1</var>, <var>value2</var>, ...<var>values</var> )</h1>
<p>Given zero or more arguments, calls <emu-xref aoid="ToNumber" id="_ref_5243"><a href="#sec-tonumber">ToNumber</a></emu-xref> on each of the arguments and returns the largest of the resulting values.</p>
<ul>
<li>
If no arguments are given, the result is <emu-val>-∞</emu-val>.
</li>
<li>
If any value is <emu-val>NaN</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
<li>
The comparison of values to determine the largest value is done using the <emu-xref aoid="Abstract Relational Comparison" id="_ref_5244"><a href="#sec-abstract-relational-comparison">Abstract Relational Comparison</a></emu-xref> algorithm except that <emu-val>+0</emu-val> is considered to be larger than <emu-val>-0</emu-val>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-math.min">
<h1><span class="secnum">20.2.2.25</span>Math.min ( <var>value1</var>, <var>value2</var>, ...<var>values</var> )</h1>
<p>Given zero or more arguments, calls <emu-xref aoid="ToNumber" id="_ref_5245"><a href="#sec-tonumber">ToNumber</a></emu-xref> on each of the arguments and returns the smallest of the resulting values.</p>
<ul>
<li>
If no arguments are given, the result is <emu-val>+∞</emu-val>.
</li>
<li>
If any value is <emu-val>NaN</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
<li>
The comparison of values to determine the smallest value is done using the <emu-xref aoid="Abstract Relational Comparison" id="_ref_5246"><a href="#sec-abstract-relational-comparison">Abstract Relational Comparison</a></emu-xref> algorithm except that <emu-val>+0</emu-val> is considered to be larger than <emu-val>-0</emu-val>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-math.pow">
<h1><span class="secnum">20.2.2.26</span>Math.pow ( <var>base</var>, <var>exponent</var> )</h1>
<emu-alg><ol><li>Return the result of <emu-xref href="#sec-applying-the-exp-operator" title="" id="_ref_504"><a href="#sec-applying-the-exp-operator">Applying the ** operator</a></emu-xref> with <var>base</var> and <var>exponent</var> as specified in <emu-xref href="#sec-applying-the-exp-operator" id="_ref_505"><a href="#sec-applying-the-exp-operator">12.6.4</a></emu-xref>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-math.random">
<h1><span class="secnum">20.2.2.27</span>Math.random ( )</h1>
<p>Returns a Number value with positive sign, greater than or
equal to 0 but less than 1, chosen randomly or pseudo randomly with
approximately uniform distribution over that range, using an
implementation-dependent algorithm or strategy. This function takes no
arguments.</p>
<p>Each <code>Math.random</code> function created for distinct realms must produce a distinct sequence of values from successive calls.</p>
</emu-clause>
<emu-clause id="sec-math.round">
<h1><span class="secnum">20.2.2.28</span>Math.round ( <var>x</var> )</h1>
<p>Returns the Number value that is closest to <var>x</var> and is equal to a mathematical integer. If two integer Number values are equally close to <var>x</var>, then the result is the Number value that is closer to <emu-val>+∞</emu-val>. If <var>x</var> is already an integer, the result is <var>x</var>.</p>
<ul>
<li>
If <var>x</var> is <emu-val>NaN</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+0</emu-val>, the result is <emu-val>+0</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>-0</emu-val>, the result is <emu-val>-0</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+∞</emu-val>, the result is <emu-val>+∞</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>-∞</emu-val>, the result is <emu-val>-∞</emu-val>.
</li>
<li>
If <var>x</var> is greater than 0 but less than 0.5, the result is <emu-val>+0</emu-val>.
</li>
<li>
If <var>x</var> is less than 0 but greater than or equal to -0.5, the result is <emu-val>-0</emu-val>.
</li>
</ul>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p><code>Math.round(3.5)</code> returns 4, but <code>Math.round(-3.5)</code> returns -3.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The value of <code>Math.round(x)</code> is not always the same as the value of <code>Math.floor(x + 0.5)</code>. When <code>x</code> is <emu-val>-0</emu-val> or is less than 0 but greater than or equal to -0.5, <code>Math.round(x)</code> returns <emu-val>-0</emu-val>, but <code>Math.floor(x + 0.5)</code> returns <emu-val>+0</emu-val>. <code>Math.round(x)</code> may also differ from the value of <code>Math.floor(x + 0.5)</code>because of internal rounding when computing <code>x + 0.5</code>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-math.sign">
<h1><span class="secnum">20.2.2.29</span>Math.sign ( <var>x</var> )</h1>
<p>Returns the sign of <var>x</var>, indicating whether <var>x</var> is positive, negative, or zero.</p>
<ul>
<li>
If <var>x</var> is <emu-val>NaN</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>-0</emu-val>, the result is <emu-val>-0</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+0</emu-val>, the result is <emu-val>+0</emu-val>.
</li>
<li>
If <var>x</var> is negative and not <emu-val>-0</emu-val>, the result is -1.
</li>
<li>
If <var>x</var> is positive and not <emu-val>+0</emu-val>, the result is +1.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-math.sin">
<h1><span class="secnum">20.2.2.30</span>Math.sin ( <var>x</var> )</h1>
<p>Returns an implementation-dependent approximation to the sine of <var>x</var>. The argument is expressed in radians.</p>
<ul>
<li>
If <var>x</var> is <emu-val>NaN</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+0</emu-val>, the result is <emu-val>+0</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>-0</emu-val>, the result is <emu-val>-0</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+∞</emu-val> or <emu-val>-∞</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-math.sinh">
<h1><span class="secnum">20.2.2.31</span>Math.sinh ( <var>x</var> )</h1>
<p>Returns an implementation-dependent approximation to the hyperbolic sine of <var>x</var>.</p>
<ul>
<li>
If <var>x</var> is <emu-val>NaN</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+0</emu-val>, the result is <emu-val>+0</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>-0</emu-val>, the result is <emu-val>-0</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+∞</emu-val>, the result is <emu-val>+∞</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>-∞</emu-val>, the result is <emu-val>-∞</emu-val>.
</li>
</ul>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The value of sinh(x) is the same as <i>(exp(x) - exp(-x)) / 2</i>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-math.sqrt">
<h1><span class="secnum">20.2.2.32</span>Math.sqrt ( <var>x</var> )</h1>
<p>Returns an implementation-dependent approximation to the square root of <var>x</var>.</p>
<ul>
<li>
If <var>x</var> is <emu-val>NaN</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>x</var> is less than 0, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+0</emu-val>, the result is <emu-val>+0</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>-0</emu-val>, the result is <emu-val>-0</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+∞</emu-val>, the result is <emu-val>+∞</emu-val>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-math.tan">
<h1><span class="secnum">20.2.2.33</span>Math.tan ( <var>x</var> )</h1>
<p>Returns an implementation-dependent approximation to the tangent of <var>x</var>. The argument is expressed in radians.</p>
<ul>
<li>
If <var>x</var> is <emu-val>NaN</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+0</emu-val>, the result is <emu-val>+0</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>-0</emu-val>, the result is <emu-val>-0</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+∞</emu-val> or <emu-val>-∞</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-math.tanh">
<h1><span class="secnum">20.2.2.34</span>Math.tanh ( <var>x</var> )</h1>
<p>Returns an implementation-dependent approximation to the hyperbolic tangent of <var>x</var>.</p>
<ul>
<li>
If <var>x</var> is <emu-val>NaN</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+0</emu-val>, the result is <emu-val>+0</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>-0</emu-val>, the result is <emu-val>-0</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+∞</emu-val>, the result is +1.
</li>
<li>
If <var>x</var> is <emu-val>-∞</emu-val>, the result is -1.
</li>
</ul>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The value of tanh(x) is the same as <i>(exp(x) - exp(-x))/(exp(x) + exp(-x))</i>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-math.trunc">
<h1><span class="secnum">20.2.2.35</span>Math.trunc ( <var>x</var> )</h1>
<p>Returns the integral part of the number <var>x</var>, removing any fractional digits. If <var>x</var> is already an integer, the result is <var>x</var>.</p>
<ul>
<li>
If <var>x</var> is <emu-val>NaN</emu-val>, the result is <emu-val>NaN</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>-0</emu-val>, the result is <emu-val>-0</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+0</emu-val>, the result is <emu-val>+0</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>+∞</emu-val>, the result is <emu-val>+∞</emu-val>.
</li>
<li>
If <var>x</var> is <emu-val>-∞</emu-val>, the result is <emu-val>-∞</emu-val>.
</li>
<li>
If <var>x</var> is greater than 0 but less than 1, the result is <emu-val>+0</emu-val>.
</li>
<li>
If <var>x</var> is less than 0 but greater than -1, the result is <emu-val>-0</emu-val>.
</li>
</ul>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-date-objects">
<h1><span class="secnum">20.3</span>Date Objects</h1>
<emu-clause id="sec-overview-of-date-objects-and-definitions-of-abstract-operations">
<h1><span class="secnum">20.3.1</span>Overview of Date Objects and Definitions of Abstract Operations</h1>
<p>The following functions are <emu-xref href="#sec-algorithm-conventions-abstract-operations" id="_ref_5247"><a href="#sec-algorithm-conventions-abstract-operations">abstract operations</a></emu-xref> that operate on time values (defined in <emu-xref href="#sec-time-values-and-time-range" id="_ref_506"><a href="#sec-time-values-and-time-range">20.3.1.1</a></emu-xref>). Note that, in every case, if any argument to one of these functions is <emu-val>NaN</emu-val>, the result will be <emu-val>NaN</emu-val>.</p>
<emu-clause id="sec-time-values-and-time-range">
<h1><span class="secnum">20.3.1.1</span>Time Values and Time Range</h1>
<p>A Date object contains a Number representing an instant in time with millisecond precision. Such a Number is called a <dfn>time value</dfn>. A time value may also be <emu-val>NaN</emu-val>, indicating that the Date object does not represent a specific instant in time.</p>
<p>Time is measured in ECMAScript as milliseconds since midnight
at the beginning of 01 January, 1970 UTC. Time in ECMAScript does not
observe leap seconds; they are ignored. Time calculations assume each
and every day contains exactly <emu-eqn class="inline">60 × 60 × 24 × 1000 = 86,400,000</emu-eqn> milliseconds, to align with the POSIX specification of each and every day containing exactly 86,400 seconds.</p>
<p>A Number can exactly represent all integers from -9,007,199,254,740,992 to 9,007,199,254,740,992 (<emu-xref href="#sec-number.min_safe_integer" id="_ref_507"><a href="#sec-number.min_safe_integer">20.1.2.8</a></emu-xref> and <emu-xref href="#sec-number.max_safe_integer" id="_ref_508"><a href="#sec-number.max_safe_integer">20.1.2.6</a></emu-xref>).
A time value supports a slightly smaller range of exactly -100,000,000
days to 100,000,000 days measured relative to midnight at the beginning
of 01 January, 1970 UTC. This yields an exact supported time value range
of -8,640,000,000,000,000 to 8,640,000,000,000,000 milliseconds
relative to midnight at the beginning of 01 January, 1970 UTC.</p>
<p>The exact moment of midnight at the beginning of 01 January, 1970 UTC is represented by the time value <emu-val>+0</emu-val>.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The 400 year cycle of the Gregorian calendar contains 97
leap years. This yields an average of 365.2425 days per year, or an
average of 31,556,952,000 milliseconds per year under the Gregorian
calendar. ECMAScript applies a proleptic Gregorian calendar for all time
computations.</p>
<p>As specified by this section, the maximum year range a
Number can represent exactly with millisecond precision is approximately
-285,426 to 285,426 years relative to midnight at the beginning of 01
January, 1970 UTC.</p>
<p>As specified by this section, the maximum year range a time
value can represent is approximately -273,790 to 273,790 years relative
to midnight at the beginning of 01 January, 1970 UTC.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-day-number-and-time-within-day">
<h1><span class="secnum">20.3.1.2</span>Day Number and Time within Day</h1>
<p>A given <emu-xref href="#sec-time-values-and-time-range" id="_ref_5248"><a href="#sec-time-values-and-time-range">time value</a></emu-xref> <var>t</var> belongs to day number</p>
<emu-eqn id="eqn-Day" aoid="Day"><div>Day(<var>t</var>) = <emu-xref aoid="floor" id="_ref_5249"><a href="#eqn-floor">floor</a></emu-xref>(<var>t</var> / <emu-xref aoid="msPerDay" id="_ref_5250"><a href="#eqn-msPerDay">msPerDay</a></emu-xref>)</div></emu-eqn>
<p>where the number of milliseconds per day is</p>
<emu-eqn id="eqn-msPerDay" aoid="msPerDay"><div>msPerDay = 86400000</div></emu-eqn>
<p>The remainder is called the time within the day:</p>
<emu-eqn id="eqn-TimeWithinDay" aoid="TimeWithinDay"><div>TimeWithinDay(<var>t</var>) = <var>t</var> <emu-xref aoid="modulo" id="_ref_5251"><a href="#eqn-modulo">modulo</a></emu-xref> <emu-xref aoid="msPerDay" id="_ref_5252"><a href="#eqn-msPerDay">msPerDay</a></emu-xref></div></emu-eqn>
</emu-clause>
<emu-clause id="sec-year-number">
<h1><span class="secnum">20.3.1.3</span>Year Number</h1>
<p>ECMAScript uses a proleptic Gregorian calendar to map a day
number to a year number and to determine the month and date within that
year. In this calendar, leap years are precisely those which are
(divisible by 4) and ((not divisible by 100) or (divisible by 400)). The
number of days in year number <var>y</var> is therefore defined by</p>
<emu-eqn id="eqn-DaysInYear" aoid="DaysInYear"><div>DaysInYear(<var>y</var>)</div><div> = 365 if (<var>y</var> <emu-xref aoid="modulo" id="_ref_5253"><a href="#eqn-modulo">modulo</a></emu-xref> 4) ≠ 0</div><div> = 366 if (<var>y</var> <emu-xref aoid="modulo" id="_ref_5254"><a href="#eqn-modulo">modulo</a></emu-xref> 4) = 0 and (<var>y</var> <emu-xref aoid="modulo" id="_ref_5255"><a href="#eqn-modulo">modulo</a></emu-xref> 100) ≠ 0</div><div> = 365 if (<var>y</var> <emu-xref aoid="modulo" id="_ref_5256"><a href="#eqn-modulo">modulo</a></emu-xref> 100) = 0 and (<var>y</var> <emu-xref aoid="modulo" id="_ref_5257"><a href="#eqn-modulo">modulo</a></emu-xref> 400) ≠ 0</div><div> = 366 if (<var>y</var> <emu-xref aoid="modulo" id="_ref_5258"><a href="#eqn-modulo">modulo</a></emu-xref> 400) = 0</div></emu-eqn>
<p>All non-leap years have 365 days with the usual number of
days per month and leap years have an extra day in February. The day
number of the first day of year <var>y</var> is given by:</p>
<emu-eqn id="eqn-DaysFromYear" aoid="DayFromYear"><div>DayFromYear(<var>y</var>) = 365 × (<var>y</var> - 1970) + <emu-xref aoid="floor" id="_ref_5259"><a href="#eqn-floor">floor</a></emu-xref>((<var>y</var> - 1969) / 4) - <emu-xref aoid="floor" id="_ref_5260"><a href="#eqn-floor">floor</a></emu-xref>((<var>y</var> - 1901) / 100) + <emu-xref aoid="floor" id="_ref_5261"><a href="#eqn-floor">floor</a></emu-xref>((<var>y</var> - 1601) / 400)</div></emu-eqn>
<p>The <emu-xref href="#sec-time-values-and-time-range" id="_ref_5262"><a href="#sec-time-values-and-time-range">time value</a></emu-xref> of the start of a year is:</p>
<emu-eqn id="eqn-TimeFromYear" aoid="TimeFromYear"><div>TimeFromYear(<var>y</var>) = <emu-xref aoid="msPerDay" id="_ref_5263"><a href="#eqn-msPerDay">msPerDay</a></emu-xref> × <emu-xref aoid="DayFromYear" id="_ref_5264"><a href="#eqn-DaysFromYear">DayFromYear</a></emu-xref>(<var>y</var>)</div></emu-eqn>
<p>A <emu-xref href="#sec-time-values-and-time-range" id="_ref_5265"><a href="#sec-time-values-and-time-range">time value</a></emu-xref> determines a year by:</p>
<emu-eqn id="eqn-YearFromTime" aoid="YearFromTime"><div>YearFromTime(<var>t</var>) = the largest integer <var>y</var> (closest to positive infinity) such that <emu-xref aoid="TimeFromYear" id="_ref_5266"><a href="#eqn-TimeFromYear">TimeFromYear</a></emu-xref>(<var>y</var>) ≤ <var>t</var></div></emu-eqn>
<p>The leap-year function is 1 for a time within a leap year and otherwise is zero:</p>
<emu-eqn id="eqn-InLeapYear" aoid="InLeapYear"><div>InLeapYear(<var>t</var>)</div><div> = 0 if <emu-xref aoid="DaysInYear" id="_ref_5267"><a href="#eqn-DaysInYear">DaysInYear</a></emu-xref>(<emu-xref aoid="YearFromTime" id="_ref_5268"><a href="#eqn-YearFromTime">YearFromTime</a></emu-xref>(<var>t</var>)) = 365</div><div> = 1 if <emu-xref aoid="DaysInYear" id="_ref_5269"><a href="#eqn-DaysInYear">DaysInYear</a></emu-xref>(<emu-xref aoid="YearFromTime" id="_ref_5270"><a href="#eqn-YearFromTime">YearFromTime</a></emu-xref>(<var>t</var>)) = 366</div></emu-eqn>
</emu-clause>
<emu-clause id="sec-month-number">
<h1><span class="secnum">20.3.1.4</span>Month Number</h1>
<p>Months are identified by an integer in the range 0 to 11, inclusive. The mapping <emu-xref aoid="MonthFromTime" id="_ref_5271"><a href="#eqn-MonthFromTime">MonthFromTime</a></emu-xref>(<var>t</var>) from a <emu-xref href="#sec-time-values-and-time-range" id="_ref_5272"><a href="#sec-time-values-and-time-range">time value</a></emu-xref> <var>t</var> to a month number is defined by:</p>
<emu-eqn id="eqn-MonthFromTime" aoid="MonthFromTime"><div>MonthFromTime(<var>t</var>)</div><div> = 0 if 0 ≤ <emu-xref aoid="DayWithinYear" id="_ref_5273"><a href="#eqn-DayWithinYear">DayWithinYear</a></emu-xref>(<var>t</var>) &lt; 31</div><div> = 1 if 31 ≤ <emu-xref aoid="DayWithinYear" id="_ref_5274"><a href="#eqn-DayWithinYear">DayWithinYear</a></emu-xref>(<var>t</var>) &lt; 59 + <emu-xref aoid="InLeapYear" id="_ref_5275"><a href="#eqn-InLeapYear">InLeapYear</a></emu-xref>(<var>t</var>)</div><div> = 2 if 59 + <emu-xref aoid="InLeapYear" id="_ref_5276"><a href="#eqn-InLeapYear">InLeapYear</a></emu-xref>(<var>t</var>) ≤ <emu-xref aoid="DayWithinYear" id="_ref_5277"><a href="#eqn-DayWithinYear">DayWithinYear</a></emu-xref>(<var>t</var>) &lt; 90 + <emu-xref aoid="InLeapYear" id="_ref_5278"><a href="#eqn-InLeapYear">InLeapYear</a></emu-xref>(<var>t</var>)</div><div> = 3 if 90 + <emu-xref aoid="InLeapYear" id="_ref_5279"><a href="#eqn-InLeapYear">InLeapYear</a></emu-xref>(<var>t</var>) ≤ <emu-xref aoid="DayWithinYear" id="_ref_5280"><a href="#eqn-DayWithinYear">DayWithinYear</a></emu-xref>(<var>t</var>) &lt; 120 + <emu-xref aoid="InLeapYear" id="_ref_5281"><a href="#eqn-InLeapYear">InLeapYear</a></emu-xref>(<var>t</var>)</div><div> = 4 if 120 + <emu-xref aoid="InLeapYear" id="_ref_5282"><a href="#eqn-InLeapYear">InLeapYear</a></emu-xref>(<var>t</var>) ≤ <emu-xref aoid="DayWithinYear" id="_ref_5283"><a href="#eqn-DayWithinYear">DayWithinYear</a></emu-xref>(<var>t</var>) &lt; 151 + <emu-xref aoid="InLeapYear" id="_ref_5284"><a href="#eqn-InLeapYear">InLeapYear</a></emu-xref>(<var>t</var>)</div><div> = 5 if 151 + <emu-xref aoid="InLeapYear" id="_ref_5285"><a href="#eqn-InLeapYear">InLeapYear</a></emu-xref>(<var>t</var>) ≤ <emu-xref aoid="DayWithinYear" id="_ref_5286"><a href="#eqn-DayWithinYear">DayWithinYear</a></emu-xref>(<var>t</var>) &lt; 181 + <emu-xref aoid="InLeapYear" id="_ref_5287"><a href="#eqn-InLeapYear">InLeapYear</a></emu-xref>(<var>t</var>)</div><div> = 6 if 181 + <emu-xref aoid="InLeapYear" id="_ref_5288"><a href="#eqn-InLeapYear">InLeapYear</a></emu-xref>(<var>t</var>) ≤ <emu-xref aoid="DayWithinYear" id="_ref_5289"><a href="#eqn-DayWithinYear">DayWithinYear</a></emu-xref>(<var>t</var>) &lt; 212 + <emu-xref aoid="InLeapYear" id="_ref_5290"><a href="#eqn-InLeapYear">InLeapYear</a></emu-xref>(<var>t</var>)</div><div> = 7 if 212 + <emu-xref aoid="InLeapYear" id="_ref_5291"><a href="#eqn-InLeapYear">InLeapYear</a></emu-xref>(<var>t</var>) ≤ <emu-xref aoid="DayWithinYear" id="_ref_5292"><a href="#eqn-DayWithinYear">DayWithinYear</a></emu-xref>(<var>t</var>) &lt; 243 + <emu-xref aoid="InLeapYear" id="_ref_5293"><a href="#eqn-InLeapYear">InLeapYear</a></emu-xref>(<var>t</var>)</div><div> = 8 if 243 + <emu-xref aoid="InLeapYear" id="_ref_5294"><a href="#eqn-InLeapYear">InLeapYear</a></emu-xref>(<var>t</var>) ≤ <emu-xref aoid="DayWithinYear" id="_ref_5295"><a href="#eqn-DayWithinYear">DayWithinYear</a></emu-xref>(<var>t</var>) &lt; 273 + <emu-xref aoid="InLeapYear" id="_ref_5296"><a href="#eqn-InLeapYear">InLeapYear</a></emu-xref>(<var>t</var>)</div><div> = 9 if 273 + <emu-xref aoid="InLeapYear" id="_ref_5297"><a href="#eqn-InLeapYear">InLeapYear</a></emu-xref>(<var>t</var>) ≤ <emu-xref aoid="DayWithinYear" id="_ref_5298"><a href="#eqn-DayWithinYear">DayWithinYear</a></emu-xref>(<var>t</var>) &lt; 304 + <emu-xref aoid="InLeapYear" id="_ref_5299"><a href="#eqn-InLeapYear">InLeapYear</a></emu-xref>(<var>t</var>)</div><div> = 10 if 304 + <emu-xref aoid="InLeapYear" id="_ref_5300"><a href="#eqn-InLeapYear">InLeapYear</a></emu-xref>(<var>t</var>) ≤ <emu-xref aoid="DayWithinYear" id="_ref_5301"><a href="#eqn-DayWithinYear">DayWithinYear</a></emu-xref>(<var>t</var>) &lt; 334 + <emu-xref aoid="InLeapYear" id="_ref_5302"><a href="#eqn-InLeapYear">InLeapYear</a></emu-xref>(<var>t</var>)</div><div> = 11 if 334 + <emu-xref aoid="InLeapYear" id="_ref_5303"><a href="#eqn-InLeapYear">InLeapYear</a></emu-xref>(<var>t</var>) ≤ <emu-xref aoid="DayWithinYear" id="_ref_5304"><a href="#eqn-DayWithinYear">DayWithinYear</a></emu-xref>(<var>t</var>) &lt; 365 + <emu-xref aoid="InLeapYear" id="_ref_5305"><a href="#eqn-InLeapYear">InLeapYear</a></emu-xref>(<var>t</var>)</div></emu-eqn>
<p>where</p>
<emu-eqn id="eqn-DayWithinYear" aoid="DayWithinYear"><div>DayWithinYear(<var>t</var>) = <emu-xref aoid="Day" id="_ref_5306"><a href="#eqn-Day">Day</a></emu-xref>(<var>t</var>) - <emu-xref aoid="DayFromYear" id="_ref_5307"><a href="#eqn-DaysFromYear">DayFromYear</a></emu-xref>(<emu-xref aoid="YearFromTime" id="_ref_5308"><a href="#eqn-YearFromTime">YearFromTime</a></emu-xref>(<var>t</var>))</div></emu-eqn>
<p>A month value of 0 specifies January; 1 specifies February; 2
specifies March; 3 specifies April; 4 specifies May; 5 specifies June; 6
specifies July; 7 specifies August; 8 specifies September; 9 specifies
October; 10 specifies November; and 11 specifies December. Note that <emu-eqn class="inline"><emu-xref aoid="MonthFromTime" id="_ref_5309"><a href="#eqn-MonthFromTime">MonthFromTime</a></emu-xref>(0) = 0</emu-eqn>, corresponding to Thursday, 01 January, 1970.</p>
</emu-clause>
<emu-clause id="sec-date-number">
<h1><span class="secnum">20.3.1.5</span>Date Number</h1>
<p>A date number is identified by an integer in the range 1 through 31, inclusive. The mapping DateFromTime(<var>t</var>) from a <emu-xref href="#sec-time-values-and-time-range" id="_ref_5310"><a href="#sec-time-values-and-time-range">time value</a></emu-xref> <var>t</var> to a date number is defined by:</p>
<emu-eqn aoid="DateFromTime"><div>DateFromTime(<var>t</var>)</div><div> = <emu-xref aoid="DayWithinYear" id="_ref_5311"><a href="#eqn-DayWithinYear">DayWithinYear</a></emu-xref>(<var>t</var>) + 1 if <emu-xref aoid="MonthFromTime" id="_ref_5312"><a href="#eqn-MonthFromTime">MonthFromTime</a></emu-xref>(<var>t</var>) = 0</div><div> = <emu-xref aoid="DayWithinYear" id="_ref_5313"><a href="#eqn-DayWithinYear">DayWithinYear</a></emu-xref>(<var>t</var>) - 30 if <emu-xref aoid="MonthFromTime" id="_ref_5314"><a href="#eqn-MonthFromTime">MonthFromTime</a></emu-xref>(<var>t</var>) = 1</div><div> = <emu-xref aoid="DayWithinYear" id="_ref_5315"><a href="#eqn-DayWithinYear">DayWithinYear</a></emu-xref>(<var>t</var>) - 58 - <emu-xref aoid="InLeapYear" id="_ref_5316"><a href="#eqn-InLeapYear">InLeapYear</a></emu-xref>(<var>t</var>) if <emu-xref aoid="MonthFromTime" id="_ref_5317"><a href="#eqn-MonthFromTime">MonthFromTime</a></emu-xref>(<var>t</var>) = 2</div><div> = <emu-xref aoid="DayWithinYear" id="_ref_5318"><a href="#eqn-DayWithinYear">DayWithinYear</a></emu-xref>(<var>t</var>) - 89 - <emu-xref aoid="InLeapYear" id="_ref_5319"><a href="#eqn-InLeapYear">InLeapYear</a></emu-xref>(<var>t</var>) if <emu-xref aoid="MonthFromTime" id="_ref_5320"><a href="#eqn-MonthFromTime">MonthFromTime</a></emu-xref>(<var>t</var>) = 3</div><div> = <emu-xref aoid="DayWithinYear" id="_ref_5321"><a href="#eqn-DayWithinYear">DayWithinYear</a></emu-xref>(<var>t</var>) - 119 - <emu-xref aoid="InLeapYear" id="_ref_5322"><a href="#eqn-InLeapYear">InLeapYear</a></emu-xref>(<var>t</var>) if <emu-xref aoid="MonthFromTime" id="_ref_5323"><a href="#eqn-MonthFromTime">MonthFromTime</a></emu-xref>(<var>t</var>) = 4</div><div> = <emu-xref aoid="DayWithinYear" id="_ref_5324"><a href="#eqn-DayWithinYear">DayWithinYear</a></emu-xref>(<var>t</var>) - 150 - <emu-xref aoid="InLeapYear" id="_ref_5325"><a href="#eqn-InLeapYear">InLeapYear</a></emu-xref>(<var>t</var>) if <emu-xref aoid="MonthFromTime" id="_ref_5326"><a href="#eqn-MonthFromTime">MonthFromTime</a></emu-xref>(<var>t</var>) = 5</div><div> = <emu-xref aoid="DayWithinYear" id="_ref_5327"><a href="#eqn-DayWithinYear">DayWithinYear</a></emu-xref>(<var>t</var>) - 180 - <emu-xref aoid="InLeapYear" id="_ref_5328"><a href="#eqn-InLeapYear">InLeapYear</a></emu-xref>(<var>t</var>) if <emu-xref aoid="MonthFromTime" id="_ref_5329"><a href="#eqn-MonthFromTime">MonthFromTime</a></emu-xref>(<var>t</var>) = 6</div><div> = <emu-xref aoid="DayWithinYear" id="_ref_5330"><a href="#eqn-DayWithinYear">DayWithinYear</a></emu-xref>(<var>t</var>) - 211 - <emu-xref aoid="InLeapYear" id="_ref_5331"><a href="#eqn-InLeapYear">InLeapYear</a></emu-xref>(<var>t</var>) if <emu-xref aoid="MonthFromTime" id="_ref_5332"><a href="#eqn-MonthFromTime">MonthFromTime</a></emu-xref>(<var>t</var>) = 7</div><div> = <emu-xref aoid="DayWithinYear" id="_ref_5333"><a href="#eqn-DayWithinYear">DayWithinYear</a></emu-xref>(<var>t</var>) - 242 - <emu-xref aoid="InLeapYear" id="_ref_5334"><a href="#eqn-InLeapYear">InLeapYear</a></emu-xref>(<var>t</var>) if <emu-xref aoid="MonthFromTime" id="_ref_5335"><a href="#eqn-MonthFromTime">MonthFromTime</a></emu-xref>(<var>t</var>) = 8</div><div> = <emu-xref aoid="DayWithinYear" id="_ref_5336"><a href="#eqn-DayWithinYear">DayWithinYear</a></emu-xref>(<var>t</var>) - 272 - <emu-xref aoid="InLeapYear" id="_ref_5337"><a href="#eqn-InLeapYear">InLeapYear</a></emu-xref>(<var>t</var>) if <emu-xref aoid="MonthFromTime" id="_ref_5338"><a href="#eqn-MonthFromTime">MonthFromTime</a></emu-xref>(<var>t</var>) = 9</div><div> = <emu-xref aoid="DayWithinYear" id="_ref_5339"><a href="#eqn-DayWithinYear">DayWithinYear</a></emu-xref>(<var>t</var>) - 303 - <emu-xref aoid="InLeapYear" id="_ref_5340"><a href="#eqn-InLeapYear">InLeapYear</a></emu-xref>(<var>t</var>) if <emu-xref aoid="MonthFromTime" id="_ref_5341"><a href="#eqn-MonthFromTime">MonthFromTime</a></emu-xref>(<var>t</var>) = 10</div><div> = <emu-xref aoid="DayWithinYear" id="_ref_5342"><a href="#eqn-DayWithinYear">DayWithinYear</a></emu-xref>(<var>t</var>) - 333 - <emu-xref aoid="InLeapYear" id="_ref_5343"><a href="#eqn-InLeapYear">InLeapYear</a></emu-xref>(<var>t</var>) if <emu-xref aoid="MonthFromTime" id="_ref_5344"><a href="#eqn-MonthFromTime">MonthFromTime</a></emu-xref>(<var>t</var>) = 11</div></emu-eqn>
</emu-clause>
<emu-clause id="sec-week-day">
<h1><span class="secnum">20.3.1.6</span>Week Day</h1>
<p>The weekday for a particular <emu-xref href="#sec-time-values-and-time-range" id="_ref_5345"><a href="#sec-time-values-and-time-range">time value</a></emu-xref> <var>t</var> is defined as</p>
<emu-eqn aoid="WeekDay"><div>WeekDay(<var>t</var>) = (<emu-xref aoid="Day" id="_ref_5346"><a href="#eqn-Day">Day</a></emu-xref>(<var>t</var>) + 4) <emu-xref aoid="modulo" id="_ref_5347"><a href="#eqn-modulo">modulo</a></emu-xref> 7</div></emu-eqn>
<p>A weekday value of 0 specifies Sunday; 1 specifies Monday; 2
specifies Tuesday; 3 specifies Wednesday; 4 specifies Thursday; 5
specifies Friday; and 6 specifies Saturday. Note that <emu-eqn class="inline">WeekDay(0) = 4</emu-eqn>, corresponding to Thursday, 01 January, 1970.</p>
</emu-clause>
<emu-clause id="sec-local-time-zone-adjustment">
<h1><span class="secnum">20.3.1.7</span>LocalTZA ( <var>t</var>, <var>isUTC</var> )</h1>
<p>LocalTZA( <var>t</var>, <var>isUTC</var> ) is an
implementation-defined algorithm that must return a number representing
milliseconds suitable for adding to a Time Value. The local political
rules for standard time and daylight saving time in effect at <var>t</var> should be used to determine the result in the way specified in the following three paragraphs.</p>
<p>When <var>isUTC</var> is true, <dfn>LocalTZA( <var>t</var>, true )</dfn> should return the offset of the local time zone from UTC measured in milliseconds at time represented by <emu-xref href="#sec-time-values-and-time-range" id="_ref_5348"><a href="#sec-time-values-and-time-range">time value</a></emu-xref> <var>t</var> (UTC). When the result is added to <var>t</var> (UTC), it should yield the local time.</p>
<p>When <var>isUTC</var> is false, <dfn>LocalTZA( <var>t</var>, false )</dfn> should return the offset of the local time zone from UTC measured in milliseconds at local time represented by <emu-xref href="#sec-time-values-and-time-range" id="_ref_5349"><a href="#sec-time-values-and-time-range">time value</a></emu-xref> <dfn><emu-eqn class="inline"><var>t</var><sub>local</sub> = <var>t</var></emu-eqn></dfn>. When the result is subtracted from the local time <emu-eqn class="inline"><var>t</var><sub>local</sub></emu-eqn>, it should yield the corresponding UTC.</p>
<p>When <emu-eqn class="inline"><var>t</var><sub>local</sub></emu-eqn>
represents local time repeating multiple times at a negative time zone
transition (e.g. when the daylight saving time ends or the time zone
adjustment is decreased due to a time zone rule change) or skipped local
time at a positive time zone transitions (e.g. when the daylight saving
time starts or the time zone adjustment is increased due to a time zone
rule change), <emu-eqn class="inline"><var>t</var><sub>local</sub></emu-eqn> must be interpreted with the time zone adjustment before the transition.</p>
<p>If an implementation does not support a conversion described above or if political rules for time <var>t</var> are not available within the implementation, the result must be 0.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>It is recommended that implementations use the time zone information of the IANA Time Zone Database <a href="https://www.iana.org/time-zones/">https://www.iana.org/time-zones/</a>.</p>
<p>1:30 AM on November 5, 2017 in America/New_York is repeated
twice (fall backward), but it must be interpreted as 1:30 AM UTC-04
instead of 1:30 AM UTC-05. LocalTZA(<emu-xref aoid="TimeClip" id="_ref_5350"><a href="#sec-timeclip">TimeClip</a></emu-xref>(<emu-xref aoid="MakeDate" id="_ref_5351"><a href="#sec-makedate">MakeDate</a></emu-xref>(<emu-xref aoid="MakeDay" id="_ref_5352"><a href="#sec-makeday">MakeDay</a></emu-xref>(2017, 10, 5), <emu-xref aoid="MakeTime" id="_ref_5353"><a href="#sec-maketime">MakeTime</a></emu-xref>(1, 30, 0, 0))), false) is <emu-eqn class="inline">-4 × <emu-xref aoid="msPerHour" id="_ref_5354"><a href="#eqn-msPerHour">msPerHour</a></emu-xref></emu-eqn>.</p>
<p>2:30 AM on March 12, 2017 in America/New_York does not
exist, but it must be interpreted as 2:30 AM UTC-05 (equivalent to 3:30
AM UTC-04). LocalTZA(<emu-xref aoid="TimeClip" id="_ref_5355"><a href="#sec-timeclip">TimeClip</a></emu-xref>(<emu-xref aoid="MakeDate" id="_ref_5356"><a href="#sec-makedate">MakeDate</a></emu-xref>(<emu-xref aoid="MakeDay" id="_ref_5357"><a href="#sec-makeday">MakeDay</a></emu-xref>(2017, 2, 12), <emu-xref aoid="MakeTime" id="_ref_5358"><a href="#sec-maketime">MakeTime</a></emu-xref>(2, 30, 0, 0))), false) is <emu-eqn class="inline">-5 × <emu-xref aoid="msPerHour" id="_ref_5359"><a href="#eqn-msPerHour">msPerHour</a></emu-xref></emu-eqn>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-localtime" aoid="LocalTime">
<h1><span class="secnum">20.3.1.8</span>LocalTime ( <var>t</var> )</h1>
<p>The abstract operation LocalTime with argument <var>t</var> converts <var>t</var> from UTC to local time by performing the following steps:</p>
<emu-alg><ol><li>Return <var>t</var> + <emu-xref href="#sec-local-time-zone-adjustment" id="_ref_5360"><a href="#sec-local-time-zone-adjustment">LocalTZA</a></emu-xref>(<var>t</var>, <emu-val>true</emu-val>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Two different time values (<var>t</var> (UTC)) are converted to the same local time <emu-eqn class="inline">t<sub>local</sub></emu-eqn>
at a negative time zone transition when there are repeated times (e.g.
the daylight saving time ends or the time zone adjustment is
decreased.).</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-utc-t" aoid="UTC">
<h1><span class="secnum">20.3.1.9</span>UTC ( <var>t</var> )</h1>
<p>The abstract operation UTC with argument <var>t</var> converts <var>t</var> from local time to UTC. It performs the following steps:</p>
<emu-alg><ol><li>Return <var>t</var> - <emu-xref href="#sec-local-time-zone-adjustment" id="_ref_5361"><a href="#sec-local-time-zone-adjustment">LocalTZA</a></emu-xref>(<var>t</var>, <emu-val>false</emu-val>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p><emu-eqn class="inline">UTC(<emu-xref aoid="LocalTime" id="_ref_5362"><a href="#sec-localtime">LocalTime</a></emu-xref>(<var>t</var>))</emu-eqn> is not necessarily always equal to <var>t</var>. <emu-eqn class="inline"><emu-xref aoid="LocalTime" id="_ref_5363"><a href="#sec-localtime">LocalTime</a></emu-xref>(UTC(<var>t</var><sub>local</sub>))</emu-eqn> is not necessarily always equal to <emu-eqn class="inline"><var>t</var><sub>local</sub></emu-eqn>, either.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-hours-minutes-second-and-milliseconds">
<h1><span class="secnum">20.3.1.10</span>Hours, Minutes, Second, and Milliseconds</h1>
<p>The following <emu-xref href="#sec-algorithm-conventions-abstract-operations" id="_ref_5364"><a href="#sec-algorithm-conventions-abstract-operations">abstract operations</a></emu-xref> are useful in decomposing time values:</p>
<emu-eqn id="eqn-HourFromTime" aoid="HourFromTime"><div>HourFromTime(<var>t</var>) = <emu-xref aoid="floor" id="_ref_5365"><a href="#eqn-floor">floor</a></emu-xref>(<var>t</var> / <emu-xref aoid="msPerHour" id="_ref_5366"><a href="#eqn-msPerHour">msPerHour</a></emu-xref>) <emu-xref aoid="modulo" id="_ref_5367"><a href="#eqn-modulo">modulo</a></emu-xref> <emu-xref aoid="HoursPerDay" id="_ref_5368"><a href="#eqn-HoursPerDay">HoursPerDay</a></emu-xref></div></emu-eqn>
<emu-eqn id="eqn-MinFromTime" aoid="MinFromTime"><div>MinFromTime(<var>t</var>) = <emu-xref aoid="floor" id="_ref_5369"><a href="#eqn-floor">floor</a></emu-xref>(<var>t</var> / <emu-xref aoid="msPerMinute" id="_ref_5370"><a href="#eqn-msPerMinute">msPerMinute</a></emu-xref>) <emu-xref aoid="modulo" id="_ref_5371"><a href="#eqn-modulo">modulo</a></emu-xref> <emu-xref aoid="MinutesPerHour" id="_ref_5372"><a href="#eqn-MinutesPerHour">MinutesPerHour</a></emu-xref></div></emu-eqn>
<emu-eqn id="eqn-SecFromTime" aoid="SecFromTime"><div>SecFromTime(<var>t</var>) = <emu-xref aoid="floor" id="_ref_5373"><a href="#eqn-floor">floor</a></emu-xref>(<var>t</var> / <emu-xref aoid="msPerSecond" id="_ref_5374"><a href="#eqn-msPerSecond">msPerSecond</a></emu-xref>) <emu-xref aoid="modulo" id="_ref_5375"><a href="#eqn-modulo">modulo</a></emu-xref> <emu-xref aoid="SecondsPerMinute" id="_ref_5376"><a href="#eqn-SecondsPerMinute">SecondsPerMinute</a></emu-xref></div></emu-eqn>
<emu-eqn id="eqn-msFromTime" aoid="msFromTime"><div>msFromTime(<var>t</var>) = <var>t</var> <emu-xref aoid="modulo" id="_ref_5377"><a href="#eqn-modulo">modulo</a></emu-xref> <emu-xref aoid="msPerSecond" id="_ref_5378"><a href="#eqn-msPerSecond">msPerSecond</a></emu-xref></div></emu-eqn>
<p>where</p>
<emu-eqn id="eqn-HoursPerDay" aoid="HoursPerDay"><div>HoursPerDay = 24</div></emu-eqn>
<emu-eqn id="eqn-MinutesPerHour" aoid="MinutesPerHour"><div>MinutesPerHour = 60</div></emu-eqn>
<emu-eqn id="eqn-SecondsPerMinute" aoid="SecondsPerMinute"><div>SecondsPerMinute = 60</div></emu-eqn>
<emu-eqn id="eqn-msPerSecond" aoid="msPerSecond"><div>msPerSecond = 1000</div></emu-eqn>
<emu-eqn id="eqn-msPerMinute" aoid="msPerMinute"><div>msPerMinute = 60000 = <emu-xref aoid="msPerSecond" id="_ref_5379"><a href="#eqn-msPerSecond">msPerSecond</a></emu-xref> × <emu-xref aoid="SecondsPerMinute" id="_ref_5380"><a href="#eqn-SecondsPerMinute">SecondsPerMinute</a></emu-xref></div></emu-eqn>
<emu-eqn id="eqn-msPerHour" aoid="msPerHour"><div>msPerHour = 3600000 = <emu-xref aoid="msPerMinute" id="_ref_5381"><a href="#eqn-msPerMinute">msPerMinute</a></emu-xref> × <emu-xref aoid="MinutesPerHour" id="_ref_5382"><a href="#eqn-MinutesPerHour">MinutesPerHour</a></emu-xref></div></emu-eqn>
</emu-clause>
<emu-clause id="sec-maketime" aoid="MakeTime">
<h1><span class="secnum">20.3.1.11</span>MakeTime ( <var>hour</var>, <var>min</var>, <var>sec</var>, <var>ms</var> )</h1>
<p>The abstract operation MakeTime calculates a number of
milliseconds from its four arguments, which must be ECMAScript Number
values. This operator functions as follows:</p>
<emu-alg><ol><li>If <var>hour</var> is not finite or <var>min</var> is not finite or <var>sec</var> is not finite or <var>ms</var> is not finite, return <emu-val>NaN</emu-val>.</li><li>Let <var>h</var> be !&nbsp;<emu-xref aoid="ToInteger" id="_ref_5383"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>hour</var>).</li><li>Let <var>m</var> be !&nbsp;<emu-xref aoid="ToInteger" id="_ref_5384"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>min</var>).</li><li>Let <var>s</var> be !&nbsp;<emu-xref aoid="ToInteger" id="_ref_5385"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>sec</var>).</li><li>Let <var>milli</var> be !&nbsp;<emu-xref aoid="ToInteger" id="_ref_5386"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>ms</var>).</li><li>Let <var>t</var> be <var>h</var> <code>*</code> <emu-xref aoid="msPerHour" id="_ref_5387"><a href="#eqn-msPerHour">msPerHour</a></emu-xref> <code>+</code> <var>m</var> <code>*</code> <emu-xref aoid="msPerMinute" id="_ref_5388"><a href="#eqn-msPerMinute">msPerMinute</a></emu-xref> <code>+</code> <var>s</var> <code>*</code> <emu-xref aoid="msPerSecond" id="_ref_5389"><a href="#eqn-msPerSecond">msPerSecond</a></emu-xref> <code>+</code> <var>milli</var>, performing the arithmetic according to IEEE 754-2008 rules (that is, as if using the ECMAScript operators <code>*</code> and <code>+</code>).</li><li>Return <var>t</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-makeday" aoid="MakeDay">
<h1><span class="secnum">20.3.1.12</span>MakeDay ( <var>year</var>, <var>month</var>, <var>date</var> )</h1>
<p>The abstract operation MakeDay calculates a number of days
from its three arguments, which must be ECMAScript Number values. This
operator functions as follows:</p>
<emu-alg><ol><li>If <var>year</var> is not finite or <var>month</var> is not finite or <var>date</var> is not finite, return <emu-val>NaN</emu-val>.</li><li>Let <var>y</var> be !&nbsp;<emu-xref aoid="ToInteger" id="_ref_5390"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>year</var>).</li><li>Let <var>m</var> be !&nbsp;<emu-xref aoid="ToInteger" id="_ref_5391"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>month</var>).</li><li>Let <var>dt</var> be !&nbsp;<emu-xref aoid="ToInteger" id="_ref_5392"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>date</var>).</li><li>Let <var>ym</var> be <var>y</var> + <emu-xref aoid="floor" id="_ref_5393"><a href="#eqn-floor">floor</a></emu-xref>(<var>m</var> / 12).</li><li>Let <var>mn</var> be <var>m</var> <emu-xref aoid="modulo" id="_ref_5394"><a href="#eqn-modulo">modulo</a></emu-xref> 12.</li><li>Find a value <var>t</var> such that <emu-xref aoid="YearFromTime" id="_ref_5395"><a href="#eqn-YearFromTime">YearFromTime</a></emu-xref>(<var>t</var>) is <var>ym</var> and <emu-xref aoid="MonthFromTime" id="_ref_5396"><a href="#eqn-MonthFromTime">MonthFromTime</a></emu-xref>(<var>t</var>) is <var>mn</var> and <emu-xref aoid="DateFromTime" id="_ref_5397"><a href="#sec-date-number">DateFromTime</a></emu-xref>(<var>t</var>) is 1; but if this is not possible (because some argument is out of range), return <emu-val>NaN</emu-val>.</li><li>Return <emu-xref aoid="Day" id="_ref_5398"><a href="#eqn-Day">Day</a></emu-xref>(<var>t</var>) + <var>dt</var> - 1.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-makedate" aoid="MakeDate">
<h1><span class="secnum">20.3.1.13</span>MakeDate ( <var>day</var>, <var>time</var> )</h1>
<p>The abstract operation MakeDate calculates a number of
milliseconds from its two arguments, which must be ECMAScript Number
values. This operator functions as follows:</p>
<emu-alg><ol><li>If <var>day</var> is not finite or <var>time</var> is not finite, return <emu-val>NaN</emu-val>.</li><li>Return <var>day</var> × <emu-xref aoid="msPerDay" id="_ref_5399"><a href="#eqn-msPerDay">msPerDay</a></emu-xref> + <var>time</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-timeclip" aoid="TimeClip">
<h1><span class="secnum">20.3.1.14</span>TimeClip ( <var>time</var> )</h1>
<p>The abstract operation TimeClip calculates a number of
milliseconds from its argument, which must be an ECMAScript Number
value. This operator functions as follows:</p>
<emu-alg><ol><li>If <var>time</var> is not finite, return <emu-val>NaN</emu-val>.</li><li>If <emu-xref aoid="abs" id="_ref_5400"><a href="#eqn-abs">abs</a></emu-xref>(<var>time</var>) &gt; 8.64 × 10<sup>15</sup>, return <emu-val>NaN</emu-val>.</li><li>Let <var>clippedTime</var> be !&nbsp;<emu-xref aoid="ToInteger" id="_ref_5401"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>time</var>).</li><li>If <var>clippedTime</var> is <emu-val>-0</emu-val>, set <var>clippedTime</var> to <emu-val>+0</emu-val>.</li><li>Return <var>clippedTime</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The point of step 4 is that an implementation is permitted a
choice of internal representations of time values, for example as a
64-bit signed integer or as a 64-bit floating-point value. Depending on
the implementation, this internal representation may or may not
distinguish <emu-val>-0</emu-val> and <emu-val>+0</emu-val>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-date-time-string-format">
<h1><span class="secnum">20.3.1.15</span>Date Time String Format</h1>
<p>ECMAScript defines a string interchange format for date-times
based upon a simplification of the ISO 8601 calendar date extended
format. The format is as follows: <code>YYYY-MM-DDTHH:mm:ss.sssZ</code></p>
<p>Where the fields are as follows:</p>
<figure>
<table class="lightweight-table">
<tbody>
<tr>
<td>
<code>YYYY</code>
</td>
<td>
is the decimal digits of the year 0000 to 9999 in the proleptic Gregorian calendar.
</td>
</tr>
<tr>
<td>
<code>-</code>
</td>
<td>
<code>"-"</code> (hyphen) appears literally twice in the string.
</td>
</tr>
<tr>
<td>
<code>MM</code>
</td>
<td>
is the month of the year from 01 (January) to 12 (December).
</td>
</tr>
<tr>
<td>
<code>DD</code>
</td>
<td>
is the day of the month from 01 to 31.
</td>
</tr>
<tr>
<td>
<code>T</code>
</td>
<td>
<code>"T"</code> appears literally in the string, to indicate the beginning of the time element.
</td>
</tr>
<tr>
<td>
<code>HH</code>
</td>
<td>
is the number of complete hours that have passed since midnight as two decimal digits from 00 to 24.
</td>
</tr>
<tr>
<td>
<code>:</code>
</td>
<td>
<code>":"</code> (colon) appears literally twice in the string.
</td>
</tr>
<tr>
<td>
<code>mm</code>
</td>
<td>
is the number of complete minutes since the start of the hour as two decimal digits from 00 to 59.
</td>
</tr>
<tr>
<td>
<code>ss</code>
</td>
<td>
is the number of complete seconds since the start of the minute as two decimal digits from 00 to 59.
</td>
</tr>
<tr>
<td>
<code>.</code>
</td>
<td>
<code>"."</code> (dot) appears literally in the string.
</td>
</tr>
<tr>
<td>
<code>sss</code>
</td>
<td>
is the number of complete milliseconds since the start of the second as three decimal digits.
</td>
</tr>
<tr>
<td>
<code>Z</code>
</td>
<td>
is the time zone offset specified as <code>"Z"</code> (for UTC) or either <code>"+"</code> or <code>"-"</code> followed by a time expression <code>HH:mm</code>
</td>
</tr>
</tbody>
</table>
</figure>
<p>This format includes date-only forms:</p>
<pre>YYYY
YYYY-MM
YYYY-MM-DD
</pre>
<p>It also includes “date-time” forms that consist of one of the
above date-only forms immediately followed by one of the following time
forms with an optional time zone offset appended:</p>
<pre>THH:mm
THH:mm:ss
THH:mm:ss.sss
</pre>
<p>All numbers must be base 10. If the <code>MM</code> or <code>DD</code> fields are absent <code>"01"</code> is used as the value. If the <code>HH</code>, <code>mm</code>, or <code>ss</code> fields are absent <code>"00"</code> is used as the value and the value of an absent <code>sss</code> field is <code>"000"</code>.
When the time zone offset is absent, date-only forms are interpreted as
a UTC time and date-time forms are interpreted as a local time.</p>
<p>A string containing out-of-bounds or nonconforming fields is not a valid instance of this format.</p>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>As every day both starts and ends with midnight, the two notations <code>00:00</code> and <code>24:00</code>
are available to distinguish the two midnights that can be associated
with one date. This means that the following two notations refer to
exactly the same point in time: <code>1995-02-04T24:00</code> and <code>1995-02-05T00:00</code>.
This interpretation of the latter form as "end of a calendar day" is
consistent with ISO 8601, even though that specification reserves it for
describing time intervals and does not permit it within representations
of single points in time.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>There exists no international standard that specifies
abbreviations for civil time zones like CET, EST, etc. and sometimes the
same abbreviation is even used for two very different time zones. For
this reason, both ISO 8601 and this format specify numeric
representations of time zone offsets.</p>
</div></emu-note>
<emu-clause id="sec-expanded-years" oldids="sec-extended-years">
<span id="sec-extended-years"></span><h1><span class="secnum">20.3.1.15.1</span>Expanded Years</h1>
<p><emu-xref href="#sec-syntactic-grammar" id="_ref_5402"><a href="#sec-syntactic-grammar">Covering</a></emu-xref> the full <emu-xref href="#sec-time-values-and-time-range" id="_ref_5403"><a href="#sec-time-values-and-time-range">time value</a></emu-xref> range of approximately 273,790 years forward or backward from 01 January, 1970 (<emu-xref href="#sec-time-values-and-time-range" id="_ref_509"><a href="#sec-time-values-and-time-range">20.3.1.1</a></emu-xref>)
requires representing years before 0 or after 9999. ISO 8601 permits
expansion of the year representation, but only by mutual agreement of
the partners in information interchange. In the simplified ECMAScript
format, such an expanded year representation shall have 6 digits and is
always prefixed with a + or - sign. The year 0 is considered positive
and hence prefixed with a + sign. Strings matching the <emu-xref href="#sec-date-time-string-format" id="_ref_510"><a href="#sec-date-time-string-format">Date Time String Format</a></emu-xref> with expanded years representing instants in time outside the range of a <emu-xref href="#sec-time-values-and-time-range" id="_ref_5404"><a href="#sec-time-values-and-time-range">time value</a></emu-xref> are treated as unrecognizable by <emu-xref href="#sec-date.parse" id="_ref_511"><a href="#sec-date.parse"><code>Date.parse</code></a></emu-xref> and cause that function to return <emu-val>NaN</emu-val> without falling back to implementation-specific behavior or heuristics.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Examples of date-time values with expanded years:</p>
<figure>
<table class="lightweight-table">
<tbody>
<tr>
<td>-271821-04-20T00:00:00Z</td>
<td>271822 B.C.</td>
</tr>
<tr>
<td>-000001-01-01T00:00:00Z</td>
<td>2 B.C.</td>
</tr>
<tr>
<td>+000000-01-01T00:00:00Z</td>
<td>1 B.C.</td>
</tr>
<tr>
<td>+000001-01-01T00:00:00Z</td>
<td>1 A.D.</td>
</tr>
<tr>
<td>+001970-01-01T00:00:00Z</td>
<td>1970 A.D.</td>
</tr>
<tr>
<td>+002009-12-15T00:00:00Z</td>
<td>2009 A.D.</td>
</tr>
<tr>
<td>+275760-09-13T00:00:00Z</td>
<td>275760 A.D.</td>
</tr>
</tbody>
</table>
</figure>
</div></emu-note>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-date-constructor">
<h1><span class="secnum">20.3.2</span>The Date Constructor</h1>
<p>The Date <emu-xref href="#constructor" id="_ref_5405"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>is the intrinsic object <dfn>%Date%</dfn>.</li>
<li>is the initial value of the <code>Date</code> property of the <emu-xref href="#sec-global-object" id="_ref_5406"><a href="#sec-global-object">global object</a></emu-xref>.</li>
<li>creates and initializes a new Date object when called as a <emu-xref href="#constructor" id="_ref_5407"><a href="#constructor">constructor</a></emu-xref>.</li>
<li>returns a String representing the current time (UTC) when called as a function rather than as a <emu-xref href="#constructor" id="_ref_5408"><a href="#constructor">constructor</a></emu-xref>.</li>
<li>is a single function whose behaviour is overloaded based upon the number and types of its arguments.</li>
<li>is designed to be subclassable. It may be used as the value of an <code>extends</code> clause of a class definition. Subclass constructors that intend to inherit the specified <code>Date</code> behaviour must include a <code>super</code> call to the <code>Date</code> <emu-xref href="#constructor" id="_ref_5409"><a href="#constructor">constructor</a></emu-xref> to create and initialize the subclass instance with a [[DateValue]] internal slot.</li>
<li>has a <code>"length"</code> property whose value is 7.</li>
</ul>
<emu-clause id="sec-date-year-month-date-hours-minutes-seconds-ms">
<h1><span class="secnum">20.3.2.1</span>Date ( <var>year</var>, <var>month</var> [ , <var>date</var> [ , <var>hours</var> [ , <var>minutes</var> [ , <var>seconds</var> [ , <var>ms</var> ] ] ] ] ] )</h1>
<p>This description applies only if the Date <emu-xref href="#constructor" id="_ref_5410"><a href="#constructor">constructor</a></emu-xref> is called with at least two arguments.</p>
<p>When the <code>Date</code> function is called, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>numberOfArgs</var> be the number of arguments passed to this function call.</li><li><emu-xref href="#assert" id="_ref_5411"><a href="#assert">Assert</a></emu-xref>: <var>numberOfArgs</var> ≥ 2.</li><li>If NewTarget is <emu-val>undefined</emu-val>, then<ol><li>Let <var>now</var> be the Number that is the <emu-xref href="#sec-time-values-and-time-range" id="_ref_5412"><a href="#sec-time-values-and-time-range">time value</a></emu-xref> (UTC) identifying the current time.</li><li>Return <emu-xref aoid="ToDateString" id="_ref_5413"><a href="#sec-todatestring">ToDateString</a></emu-xref>(<var>now</var>).</li></ol></li><li>Else,<ol><li>Let <var>y</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5414"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>year</var>).</li><li>Let <var>m</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5415"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>month</var>).</li><li>If <var>date</var> is present, let <var>dt</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5416"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>date</var>); else let <var>dt</var> be 1.</li><li>If <var>hours</var> is present, let <var>h</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5417"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>hours</var>); else let <var>h</var> be 0.</li><li>If <var>minutes</var> is present, let <var>min</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5418"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>minutes</var>); else let <var>min</var> be 0.</li><li>If <var>seconds</var> is present, let <var>s</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5419"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>seconds</var>); else let <var>s</var> be 0.</li><li>If <var>ms</var> is present, let <var>milli</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5420"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>ms</var>); else let <var>milli</var> be 0.</li><li>If <var>y</var> is <emu-val>NaN</emu-val>, let <var>yr</var> be <emu-val>NaN</emu-val>.</li><li>Else,<ol><li>Let <var>yi</var> be !&nbsp;<emu-xref aoid="ToInteger" id="_ref_5421"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>y</var>).</li><li>If 0 ≤ <var>yi</var> ≤ 99, let <var>yr</var> be 1900 + <var>yi</var>; otherwise, let <var>yr</var> be <var>y</var>.</li></ol></li><li>Let <var>finalDate</var> be <emu-xref aoid="MakeDate" id="_ref_5422"><a href="#sec-makedate">MakeDate</a></emu-xref>(<emu-xref aoid="MakeDay" id="_ref_5423"><a href="#sec-makeday">MakeDay</a></emu-xref>(<var>yr</var>, <var>m</var>, <var>dt</var>), <emu-xref aoid="MakeTime" id="_ref_5424"><a href="#sec-maketime">MakeTime</a></emu-xref>(<var>h</var>, <var>min</var>, <var>s</var>, <var>milli</var>)).</li><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="OrdinaryCreateFromConstructor" id="_ref_5425"><a href="#sec-ordinarycreatefromconstructor">OrdinaryCreateFromConstructor</a></emu-xref>(NewTarget, <code>"%DatePrototype%"</code>, « [[DateValue]] »).</li><li>Set <var>O</var>.[[DateValue]] to <emu-xref aoid="TimeClip" id="_ref_5426"><a href="#sec-timeclip">TimeClip</a></emu-xref>(<emu-xref aoid="UTC" id="_ref_5427"><a href="#sec-utc-t">UTC</a></emu-xref>(<var>finalDate</var>)).</li><li>Return <var>O</var>.
</li></ol></li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-date-value">
<h1><span class="secnum">20.3.2.2</span>Date ( <var>value</var> )</h1>
<p>This description applies only if the Date <emu-xref href="#constructor" id="_ref_5428"><a href="#constructor">constructor</a></emu-xref> is called with exactly one argument.</p>
<p>When the <code>Date</code> function is called, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>numberOfArgs</var> be the number of arguments passed to this function call.</li><li><emu-xref href="#assert" id="_ref_5429"><a href="#assert">Assert</a></emu-xref>: <var>numberOfArgs</var> = 1.</li><li>If NewTarget is <emu-val>undefined</emu-val>, then<ol><li>Let <var>now</var> be the Number that is the <emu-xref href="#sec-time-values-and-time-range" id="_ref_5430"><a href="#sec-time-values-and-time-range">time value</a></emu-xref> (UTC) identifying the current time.</li><li>Return <emu-xref aoid="ToDateString" id="_ref_5431"><a href="#sec-todatestring">ToDateString</a></emu-xref>(<var>now</var>).</li></ol></li><li>Else,<ol><li>If <emu-xref aoid="Type" id="_ref_5432"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>value</var>) is Object and <var>value</var> has a [[DateValue]] internal slot, then<ol><li>Let <var>tv</var> be <emu-xref aoid="thisTimeValue" id="_ref_5433"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<var>value</var>).</li></ol></li><li>Else,<ol><li>Let <var>v</var> be ?&nbsp;<emu-xref aoid="ToPrimitive" id="_ref_5434"><a href="#sec-toprimitive">ToPrimitive</a></emu-xref>(<var>value</var>).</li><li>If <emu-xref aoid="Type" id="_ref_5435"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>v</var>) is String, then<ol><li><emu-xref href="#assert" id="_ref_5436"><a href="#assert">Assert</a></emu-xref>: The next step never returns an <emu-xref href="#sec-completion-record-specification-type" id="_ref_5437"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref> because <emu-xref aoid="Type" id="_ref_5438"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>v</var>) is String.</li><li>Let <var>tv</var> be the result of parsing <var>v</var> as a date, in exactly the same manner as for the <code>parse</code> method (<emu-xref href="#sec-date.parse" id="_ref_512"><a href="#sec-date.parse">20.3.3.2</a></emu-xref>).</li></ol></li><li>Else,<ol><li>Let <var>tv</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5439"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>v</var>).</li></ol></li></ol></li><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="OrdinaryCreateFromConstructor" id="_ref_5440"><a href="#sec-ordinarycreatefromconstructor">OrdinaryCreateFromConstructor</a></emu-xref>(NewTarget, <code>"%DatePrototype%"</code>, « [[DateValue]] »).</li><li>Set <var>O</var>.[[DateValue]] to <emu-xref aoid="TimeClip" id="_ref_5441"><a href="#sec-timeclip">TimeClip</a></emu-xref>(<var>tv</var>).</li><li>Return <var>O</var>.
</li></ol></li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-date-constructor-date">
<h1><span class="secnum">20.3.2.3</span>Date ( )</h1>
<p>This description applies only if the Date <emu-xref href="#constructor" id="_ref_5442"><a href="#constructor">constructor</a></emu-xref> is called with no arguments.</p>
<p>When the <code>Date</code> function is called, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>numberOfArgs</var> be the number of arguments passed to this function call.</li><li><emu-xref href="#assert" id="_ref_5443"><a href="#assert">Assert</a></emu-xref>: <var>numberOfArgs</var> = 0.</li><li>If NewTarget is <emu-val>undefined</emu-val>, then<ol><li>Let <var>now</var> be the Number that is the <emu-xref href="#sec-time-values-and-time-range" id="_ref_5444"><a href="#sec-time-values-and-time-range">time value</a></emu-xref> (UTC) identifying the current time.</li><li>Return <emu-xref aoid="ToDateString" id="_ref_5445"><a href="#sec-todatestring">ToDateString</a></emu-xref>(<var>now</var>).</li></ol></li><li>Else,<ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="OrdinaryCreateFromConstructor" id="_ref_5446"><a href="#sec-ordinarycreatefromconstructor">OrdinaryCreateFromConstructor</a></emu-xref>(NewTarget, <code>"%DatePrototype%"</code>, « [[DateValue]] »).</li><li>Set <var>O</var>.[[DateValue]] to the <emu-xref href="#sec-time-values-and-time-range" id="_ref_5447"><a href="#sec-time-values-and-time-range">time value</a></emu-xref> (UTC) identifying the current time.</li><li>Return <var>O</var>.
</li></ol></li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-date-constructor">
<h1><span class="secnum">20.3.3</span>Properties of the Date Constructor</h1>
<p>The Date <emu-xref href="#constructor" id="_ref_5448"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_5449"><a href="#sec-properties-of-the-function-prototype-object">%FunctionPrototype%</a></emu-xref>.</li>
<li>has the following properties:</li>
</ul>
<emu-clause id="sec-date.now">
<h1><span class="secnum">20.3.3.1</span>Date.now ( )</h1>
<p>The <code>now</code> function returns a Number value that is the <emu-xref href="#sec-time-values-and-time-range" id="_ref_5450"><a href="#sec-time-values-and-time-range">time value</a></emu-xref> designating the UTC date and time of the occurrence of the call to <code>now</code>.</p>
</emu-clause>
<emu-clause id="sec-date.parse">
<h1><span class="secnum">20.3.3.2</span>Date.parse ( <var>string</var> )</h1>
<p>The <code>parse</code> function applies the <emu-xref aoid="ToString" id="_ref_5451"><a href="#sec-tostring">ToString</a></emu-xref> operator to its argument. If <emu-xref aoid="ToString" id="_ref_5452"><a href="#sec-tostring">ToString</a></emu-xref> results in an <emu-xref href="#sec-completion-record-specification-type" id="_ref_5453"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref> the <emu-xref href="#sec-completion-record-specification-type" id="_ref_5454"><a href="#sec-completion-record-specification-type">Completion Record</a></emu-xref> is immediately returned. Otherwise, <code>parse</code> interprets the resulting String as a date and time; it returns a Number, the UTC <emu-xref href="#sec-time-values-and-time-range" id="_ref_5455"><a href="#sec-time-values-and-time-range">time value</a></emu-xref>
corresponding to the date and time. The String may be interpreted as a
local time, a UTC time, or a time in some other time zone, depending on
the contents of the String. The function first attempts to parse the
String according to the format described in Date Time String Format (<emu-xref href="#sec-date-time-string-format" id="_ref_513"><a href="#sec-date-time-string-format">20.3.1.15</a></emu-xref>),
including expanded years. If the String does not conform to that format
the function may fall back to any implementation-specific heuristics or
implementation-specific date formats. Strings that are unrecognizable
or contain out-of-bounds format field values shall cause <code>Date.parse</code> to return <emu-val>NaN</emu-val>.</p>
<p>If <code>x</code> is any Date object whose milliseconds
amount is zero within a particular implementation of ECMAScript, then
all of the following expressions should produce the same numeric value
in that implementation, if all the properties referenced have their
initial values:</p>
<pre><code class="javascript hljs">x.valueOf()
<span class="hljs-built_in">Date</span>.parse(x.toString())
<span class="hljs-built_in">Date</span>.parse(x.toUTCString())
<span class="hljs-built_in">Date</span>.parse(x.toISOString())</code></pre>
<p>However, the expression</p>
<pre><code class="javascript hljs"><span class="hljs-built_in">Date</span>.parse(x.toLocaleString())</code></pre>
<p>is not required to produce the same Number value as the preceding three expressions and, in general, the value produced by <code>Date.parse</code> is implementation-dependent when given any String value that does not conform to the Date Time String Format (<emu-xref href="#sec-date-time-string-format" id="_ref_514"><a href="#sec-date-time-string-format">20.3.1.15</a></emu-xref>) and that could not be produced in that implementation by the <code>toString</code> or <code>toUTCString</code> method.</p>
</emu-clause>
<emu-clause id="sec-date.prototype">
<h1><span class="secnum">20.3.3.3</span>Date.prototype</h1>
<p>The initial value of <code>Date.prototype</code> is the intrinsic object <emu-xref href="#sec-properties-of-the-date-prototype-object" id="_ref_5456"><a href="#sec-properties-of-the-date-prototype-object">%DatePrototype%</a></emu-xref>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-date.utc">
<h1><span class="secnum">20.3.3.4</span>Date.UTC ( <var>year</var> [ , <var>month</var> [ , <var>date</var> [ , <var>hours</var> [ , <var>minutes</var> [ , <var>seconds</var> [ , <var>ms</var> ] ] ] ] ] ] )</h1>
<p>When the <code>UTC</code> function is called, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>y</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5457"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>year</var>).</li><li>If <var>month</var> is present, let <var>m</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5458"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>month</var>); else let <var>m</var> be 0.</li><li>If <var>date</var> is present, let <var>dt</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5459"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>date</var>); else let <var>dt</var> be 1.</li><li>If <var>hours</var> is present, let <var>h</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5460"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>hours</var>); else let <var>h</var> be 0.</li><li>If <var>minutes</var> is present, let <var>min</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5461"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>minutes</var>); else let <var>min</var> be 0.</li><li>If <var>seconds</var> is present, let <var>s</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5462"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>seconds</var>); else let <var>s</var> be 0.</li><li>If <var>ms</var> is present, let <var>milli</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5463"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>ms</var>); else let <var>milli</var> be 0.</li><li>If <var>y</var> is <emu-val>NaN</emu-val>, let <var>yr</var> be <emu-val>NaN</emu-val>.</li><li>Else,<ol><li>Let <var>yi</var> be !&nbsp;<emu-xref aoid="ToInteger" id="_ref_5464"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>y</var>).</li><li>If 0 ≤ <var>yi</var> ≤ 99, let <var>yr</var> be 1900 + <var>yi</var>; otherwise, let <var>yr</var> be <var>y</var>.</li></ol></li><li>Return <emu-xref aoid="TimeClip" id="_ref_5465"><a href="#sec-timeclip">TimeClip</a></emu-xref>(<emu-xref aoid="MakeDate" id="_ref_5466"><a href="#sec-makedate">MakeDate</a></emu-xref>(<emu-xref aoid="MakeDay" id="_ref_5467"><a href="#sec-makeday">MakeDay</a></emu-xref>(<var>yr</var>, <var>m</var>, <var>dt</var>), <emu-xref aoid="MakeTime" id="_ref_5468"><a href="#sec-maketime">MakeTime</a></emu-xref>(<var>h</var>, <var>min</var>, <var>s</var>, <var>milli</var>))).
</li></ol></emu-alg>
<p>The <code>"length"</code> property of the <code>UTC</code> function is 7.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <code>UTC</code> function differs from the <code>Date</code> <emu-xref href="#constructor" id="_ref_5469"><a href="#constructor">constructor</a></emu-xref> in two ways: it returns a <emu-xref href="#sec-time-values-and-time-range" id="_ref_5470"><a href="#sec-time-values-and-time-range">time value</a></emu-xref> as a Number, rather than creating a Date object, and it interprets the arguments in UTC rather than as local time.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-date-prototype-object">
<h1><span class="secnum">20.3.4</span>Properties of the Date Prototype Object</h1>
<p>The Date prototype object:</p>
<ul>
<li>is the intrinsic object <dfn>%DatePrototype%</dfn>.</li>
<li>is itself an ordinary object.</li>
<li>is not a Date instance and does not have a [[DateValue]] internal slot.</li>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_5471"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>.</li>
</ul>
<p>Unless explicitly defined otherwise, the methods of the Date prototype object defined below are not generic and the <emu-val>this</emu-val> value passed to them must be an object that has a [[DateValue]] internal slot that has been initialized to a <emu-xref href="#sec-time-values-and-time-range" id="_ref_5472"><a href="#sec-time-values-and-time-range">time value</a></emu-xref>.</p>
<p>The abstract operation <dfn id="sec-thistimevalue" aoid="thisTimeValue">thisTimeValue</dfn>(<var>value</var>) performs the following steps:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_5473"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>value</var>) is Object and <var>value</var> has a [[DateValue]] internal slot, then<ol><li>Return <var>value</var>.[[DateValue]].</li></ol></li><li>Throw a <emu-val>TypeError</emu-val> exception.
</li></ol></emu-alg>
<p>In following descriptions of functions that are properties of the Date prototype object, the phrase “<dfn id="this-Date-object">this Date object</dfn>” refers to the object that is the <emu-val>this</emu-val> value for the invocation of the function. If the Type of the <emu-val>this</emu-val> value is not Object, a <emu-val>TypeError</emu-val> exception is thrown. The phrase “<dfn id="this-time-value">this time value</dfn>” within the specification of a method refers to the result returned by calling the abstract operation thisTimeValue with the <emu-val>this</emu-val> value of the method invocation passed as the argument.</p>
<emu-clause id="sec-date.prototype.constructor">
<h1><span class="secnum">20.3.4.1</span>Date.prototype.constructor</h1>
<p>The initial value of <code>Date.prototype.constructor</code> is the intrinsic object <emu-xref href="#sec-date-constructor" id="_ref_5474"><a href="#sec-date-constructor">%Date%</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-date.prototype.getdate">
<h1><span class="secnum">20.3.4.2</span>Date.prototype.getDate ( )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>t</var> be ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_5475"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>If <var>t</var> is <emu-val>NaN</emu-val>, return <emu-val>NaN</emu-val>.</li><li>Return <emu-xref aoid="DateFromTime" id="_ref_5476"><a href="#sec-date-number">DateFromTime</a></emu-xref>(<emu-xref aoid="LocalTime" id="_ref_5477"><a href="#sec-localtime">LocalTime</a></emu-xref>(<var>t</var>)).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-date.prototype.getday">
<h1><span class="secnum">20.3.4.3</span>Date.prototype.getDay ( )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>t</var> be ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_5478"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>If <var>t</var> is <emu-val>NaN</emu-val>, return <emu-val>NaN</emu-val>.</li><li>Return <emu-xref aoid="WeekDay" id="_ref_5479"><a href="#sec-week-day">WeekDay</a></emu-xref>(<emu-xref aoid="LocalTime" id="_ref_5480"><a href="#sec-localtime">LocalTime</a></emu-xref>(<var>t</var>)).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-date.prototype.getfullyear">
<h1><span class="secnum">20.3.4.4</span>Date.prototype.getFullYear ( )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>t</var> be ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_5481"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>If <var>t</var> is <emu-val>NaN</emu-val>, return <emu-val>NaN</emu-val>.</li><li>Return <emu-xref aoid="YearFromTime" id="_ref_5482"><a href="#eqn-YearFromTime">YearFromTime</a></emu-xref>(<emu-xref aoid="LocalTime" id="_ref_5483"><a href="#sec-localtime">LocalTime</a></emu-xref>(<var>t</var>)).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-date.prototype.gethours">
<h1><span class="secnum">20.3.4.5</span>Date.prototype.getHours ( )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>t</var> be ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_5484"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>If <var>t</var> is <emu-val>NaN</emu-val>, return <emu-val>NaN</emu-val>.</li><li>Return <emu-xref aoid="HourFromTime" id="_ref_5485"><a href="#eqn-HourFromTime">HourFromTime</a></emu-xref>(<emu-xref aoid="LocalTime" id="_ref_5486"><a href="#sec-localtime">LocalTime</a></emu-xref>(<var>t</var>)).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-date.prototype.getmilliseconds">
<h1><span class="secnum">20.3.4.6</span>Date.prototype.getMilliseconds ( )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>t</var> be ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_5487"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>If <var>t</var> is <emu-val>NaN</emu-val>, return <emu-val>NaN</emu-val>.</li><li>Return <emu-xref aoid="msFromTime" id="_ref_5488"><a href="#eqn-msFromTime">msFromTime</a></emu-xref>(<emu-xref aoid="LocalTime" id="_ref_5489"><a href="#sec-localtime">LocalTime</a></emu-xref>(<var>t</var>)).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-date.prototype.getminutes">
<h1><span class="secnum">20.3.4.7</span>Date.prototype.getMinutes ( )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>t</var> be ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_5490"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>If <var>t</var> is <emu-val>NaN</emu-val>, return <emu-val>NaN</emu-val>.</li><li>Return <emu-xref aoid="MinFromTime" id="_ref_5491"><a href="#eqn-MinFromTime">MinFromTime</a></emu-xref>(<emu-xref aoid="LocalTime" id="_ref_5492"><a href="#sec-localtime">LocalTime</a></emu-xref>(<var>t</var>)).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-date.prototype.getmonth">
<h1><span class="secnum">20.3.4.8</span>Date.prototype.getMonth ( )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>t</var> be ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_5493"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>If <var>t</var> is <emu-val>NaN</emu-val>, return <emu-val>NaN</emu-val>.</li><li>Return <emu-xref aoid="MonthFromTime" id="_ref_5494"><a href="#eqn-MonthFromTime">MonthFromTime</a></emu-xref>(<emu-xref aoid="LocalTime" id="_ref_5495"><a href="#sec-localtime">LocalTime</a></emu-xref>(<var>t</var>)).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-date.prototype.getseconds">
<h1><span class="secnum">20.3.4.9</span>Date.prototype.getSeconds ( )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>t</var> be ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_5496"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>If <var>t</var> is <emu-val>NaN</emu-val>, return <emu-val>NaN</emu-val>.</li><li>Return <emu-xref aoid="SecFromTime" id="_ref_5497"><a href="#eqn-SecFromTime">SecFromTime</a></emu-xref>(<emu-xref aoid="LocalTime" id="_ref_5498"><a href="#sec-localtime">LocalTime</a></emu-xref>(<var>t</var>)).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-date.prototype.gettime">
<h1><span class="secnum">20.3.4.10</span>Date.prototype.getTime ( )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_5499"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-date.prototype.gettimezoneoffset">
<h1><span class="secnum">20.3.4.11</span>Date.prototype.getTimezoneOffset ( )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>t</var> be ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_5500"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>If <var>t</var> is <emu-val>NaN</emu-val>, return <emu-val>NaN</emu-val>.</li><li>Return (<var>t</var> - <emu-xref aoid="LocalTime" id="_ref_5501"><a href="#sec-localtime">LocalTime</a></emu-xref>(<var>t</var>)) / <emu-xref aoid="msPerMinute" id="_ref_5502"><a href="#eqn-msPerMinute">msPerMinute</a></emu-xref>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-date.prototype.getutcdate">
<h1><span class="secnum">20.3.4.12</span>Date.prototype.getUTCDate ( )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>t</var> be ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_5503"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>If <var>t</var> is <emu-val>NaN</emu-val>, return <emu-val>NaN</emu-val>.</li><li>Return <emu-xref aoid="DateFromTime" id="_ref_5504"><a href="#sec-date-number">DateFromTime</a></emu-xref>(<var>t</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-date.prototype.getutcday">
<h1><span class="secnum">20.3.4.13</span>Date.prototype.getUTCDay ( )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>t</var> be ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_5505"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>If <var>t</var> is <emu-val>NaN</emu-val>, return <emu-val>NaN</emu-val>.</li><li>Return <emu-xref aoid="WeekDay" id="_ref_5506"><a href="#sec-week-day">WeekDay</a></emu-xref>(<var>t</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-date.prototype.getutcfullyear">
<h1><span class="secnum">20.3.4.14</span>Date.prototype.getUTCFullYear ( )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>t</var> be ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_5507"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>If <var>t</var> is <emu-val>NaN</emu-val>, return <emu-val>NaN</emu-val>.</li><li>Return <emu-xref aoid="YearFromTime" id="_ref_5508"><a href="#eqn-YearFromTime">YearFromTime</a></emu-xref>(<var>t</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-date.prototype.getutchours">
<h1><span class="secnum">20.3.4.15</span>Date.prototype.getUTCHours ( )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>t</var> be ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_5509"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>If <var>t</var> is <emu-val>NaN</emu-val>, return <emu-val>NaN</emu-val>.</li><li>Return <emu-xref aoid="HourFromTime" id="_ref_5510"><a href="#eqn-HourFromTime">HourFromTime</a></emu-xref>(<var>t</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-date.prototype.getutcmilliseconds">
<h1><span class="secnum">20.3.4.16</span>Date.prototype.getUTCMilliseconds ( )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>t</var> be ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_5511"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>If <var>t</var> is <emu-val>NaN</emu-val>, return <emu-val>NaN</emu-val>.</li><li>Return <emu-xref aoid="msFromTime" id="_ref_5512"><a href="#eqn-msFromTime">msFromTime</a></emu-xref>(<var>t</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-date.prototype.getutcminutes">
<h1><span class="secnum">20.3.4.17</span>Date.prototype.getUTCMinutes ( )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>t</var> be ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_5513"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>If <var>t</var> is <emu-val>NaN</emu-val>, return <emu-val>NaN</emu-val>.</li><li>Return <emu-xref aoid="MinFromTime" id="_ref_5514"><a href="#eqn-MinFromTime">MinFromTime</a></emu-xref>(<var>t</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-date.prototype.getutcmonth">
<h1><span class="secnum">20.3.4.18</span>Date.prototype.getUTCMonth ( )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>t</var> be ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_5515"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>If <var>t</var> is <emu-val>NaN</emu-val>, return <emu-val>NaN</emu-val>.</li><li>Return <emu-xref aoid="MonthFromTime" id="_ref_5516"><a href="#eqn-MonthFromTime">MonthFromTime</a></emu-xref>(<var>t</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-date.prototype.getutcseconds">
<h1><span class="secnum">20.3.4.19</span>Date.prototype.getUTCSeconds ( )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>t</var> be ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_5517"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>If <var>t</var> is <emu-val>NaN</emu-val>, return <emu-val>NaN</emu-val>.</li><li>Return <emu-xref aoid="SecFromTime" id="_ref_5518"><a href="#eqn-SecFromTime">SecFromTime</a></emu-xref>(<var>t</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-date.prototype.setdate">
<h1><span class="secnum">20.3.4.20</span>Date.prototype.setDate ( <var>date</var> )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>t</var> be <emu-xref aoid="LocalTime" id="_ref_5519"><a href="#sec-localtime">LocalTime</a></emu-xref>(? <emu-xref aoid="thisTimeValue" id="_ref_5520"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value)).</li><li>Let <var>dt</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5521"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>date</var>).</li><li>Let <var>newDate</var> be <emu-xref aoid="MakeDate" id="_ref_5522"><a href="#sec-makedate">MakeDate</a></emu-xref>(<emu-xref aoid="MakeDay" id="_ref_5523"><a href="#sec-makeday">MakeDay</a></emu-xref>(<emu-xref aoid="YearFromTime" id="_ref_5524"><a href="#eqn-YearFromTime">YearFromTime</a></emu-xref>(<var>t</var>), <emu-xref aoid="MonthFromTime" id="_ref_5525"><a href="#eqn-MonthFromTime">MonthFromTime</a></emu-xref>(<var>t</var>), <var>dt</var>), <emu-xref aoid="TimeWithinDay" id="_ref_5526"><a href="#eqn-TimeWithinDay">TimeWithinDay</a></emu-xref>(<var>t</var>)).</li><li>Let <var>u</var> be <emu-xref aoid="TimeClip" id="_ref_5527"><a href="#sec-timeclip">TimeClip</a></emu-xref>(<emu-xref aoid="UTC" id="_ref_5528"><a href="#sec-utc-t">UTC</a></emu-xref>(<var>newDate</var>)).</li><li>Set the [[DateValue]] internal slot of <emu-xref href="#this-Date-object" id="_ref_5529"><a href="#this-Date-object">this Date object</a></emu-xref> to <var>u</var>.</li><li>Return <var>u</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-date.prototype.setfullyear">
<h1><span class="secnum">20.3.4.21</span>Date.prototype.setFullYear ( <var>year</var> [ , <var>month</var> [ , <var>date</var> ] ] )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>t</var> be ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_5530"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>If <var>t</var> is <emu-val>NaN</emu-val>, set <var>t</var> to <emu-val>+0</emu-val>; otherwise, set <var>t</var> to <emu-xref aoid="LocalTime" id="_ref_5531"><a href="#sec-localtime">LocalTime</a></emu-xref>(<var>t</var>).</li><li>Let <var>y</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5532"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>year</var>).</li><li>If <var>month</var> is not present, let <var>m</var> be <emu-xref aoid="MonthFromTime" id="_ref_5533"><a href="#eqn-MonthFromTime">MonthFromTime</a></emu-xref>(<var>t</var>); otherwise, let <var>m</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5534"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>month</var>).</li><li>If <var>date</var> is not present, let <var>dt</var> be <emu-xref aoid="DateFromTime" id="_ref_5535"><a href="#sec-date-number">DateFromTime</a></emu-xref>(<var>t</var>); otherwise, let <var>dt</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5536"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>date</var>).</li><li>Let <var>newDate</var> be <emu-xref aoid="MakeDate" id="_ref_5537"><a href="#sec-makedate">MakeDate</a></emu-xref>(<emu-xref aoid="MakeDay" id="_ref_5538"><a href="#sec-makeday">MakeDay</a></emu-xref>(<var>y</var>, <var>m</var>, <var>dt</var>), <emu-xref aoid="TimeWithinDay" id="_ref_5539"><a href="#eqn-TimeWithinDay">TimeWithinDay</a></emu-xref>(<var>t</var>)).</li><li>Let <var>u</var> be <emu-xref aoid="TimeClip" id="_ref_5540"><a href="#sec-timeclip">TimeClip</a></emu-xref>(<emu-xref aoid="UTC" id="_ref_5541"><a href="#sec-utc-t">UTC</a></emu-xref>(<var>newDate</var>)).</li><li>Set the [[DateValue]] internal slot of <emu-xref href="#this-Date-object" id="_ref_5542"><a href="#this-Date-object">this Date object</a></emu-xref> to <var>u</var>.</li><li>Return <var>u</var>.
</li></ol></emu-alg>
<p>The <code>"length"</code> property of the <code>setFullYear</code> method is 3.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>If <var>month</var> is not present, this method behaves as if <var>month</var> was present with the value <code>getMonth()</code>. If <var>date</var> is not present, it behaves as if <var>date</var> was present with the value <code>getDate()</code>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-date.prototype.sethours">
<h1><span class="secnum">20.3.4.22</span>Date.prototype.setHours ( <var>hour</var> [ , <var>min</var> [ , <var>sec</var> [ , <var>ms</var> ] ] ] )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>t</var> be <emu-xref aoid="LocalTime" id="_ref_5543"><a href="#sec-localtime">LocalTime</a></emu-xref>(? <emu-xref aoid="thisTimeValue" id="_ref_5544"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value)).</li><li>Let <var>h</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5545"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>hour</var>).</li><li>If <var>min</var> is not present, let <var>m</var> be <emu-xref aoid="MinFromTime" id="_ref_5546"><a href="#eqn-MinFromTime">MinFromTime</a></emu-xref>(<var>t</var>); otherwise, let <var>m</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5547"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>min</var>).</li><li>If <var>sec</var> is not present, let <var>s</var> be <emu-xref aoid="SecFromTime" id="_ref_5548"><a href="#eqn-SecFromTime">SecFromTime</a></emu-xref>(<var>t</var>); otherwise, let <var>s</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5549"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>sec</var>).</li><li>If <var>ms</var> is not present, let <var>milli</var> be <emu-xref aoid="msFromTime" id="_ref_5550"><a href="#eqn-msFromTime">msFromTime</a></emu-xref>(<var>t</var>); otherwise, let <var>milli</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5551"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>ms</var>).</li><li>Let <var>date</var> be <emu-xref aoid="MakeDate" id="_ref_5552"><a href="#sec-makedate">MakeDate</a></emu-xref>(<emu-xref aoid="Day" id="_ref_5553"><a href="#eqn-Day">Day</a></emu-xref>(<var>t</var>), <emu-xref aoid="MakeTime" id="_ref_5554"><a href="#sec-maketime">MakeTime</a></emu-xref>(<var>h</var>, <var>m</var>, <var>s</var>, <var>milli</var>)).</li><li>Let <var>u</var> be <emu-xref aoid="TimeClip" id="_ref_5555"><a href="#sec-timeclip">TimeClip</a></emu-xref>(<emu-xref aoid="UTC" id="_ref_5556"><a href="#sec-utc-t">UTC</a></emu-xref>(<var>date</var>)).</li><li>Set the [[DateValue]] internal slot of <emu-xref href="#this-Date-object" id="_ref_5557"><a href="#this-Date-object">this Date object</a></emu-xref> to <var>u</var>.</li><li>Return <var>u</var>.
</li></ol></emu-alg>
<p>The <code>"length"</code> property of the <code>setHours</code> method is 4.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>If <var>min</var> is not present, this method behaves as if <var>min</var> was present with the value <code>getMinutes()</code>. If <var>sec</var> is not present, it behaves as if <var>sec</var> was present with the value <code>getSeconds()</code>. If <var>ms</var> is not present, it behaves as if <var>ms</var> was present with the value <code>getMilliseconds()</code>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-date.prototype.setmilliseconds">
<h1><span class="secnum">20.3.4.23</span>Date.prototype.setMilliseconds ( <var>ms</var> )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>t</var> be <emu-xref aoid="LocalTime" id="_ref_5558"><a href="#sec-localtime">LocalTime</a></emu-xref>(? <emu-xref aoid="thisTimeValue" id="_ref_5559"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value)).</li><li>Set <var>ms</var> to ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5560"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>ms</var>).</li><li>Let <var>time</var> be <emu-xref aoid="MakeTime" id="_ref_5561"><a href="#sec-maketime">MakeTime</a></emu-xref>(<emu-xref aoid="HourFromTime" id="_ref_5562"><a href="#eqn-HourFromTime">HourFromTime</a></emu-xref>(<var>t</var>), <emu-xref aoid="MinFromTime" id="_ref_5563"><a href="#eqn-MinFromTime">MinFromTime</a></emu-xref>(<var>t</var>), <emu-xref aoid="SecFromTime" id="_ref_5564"><a href="#eqn-SecFromTime">SecFromTime</a></emu-xref>(<var>t</var>), <var>ms</var>).</li><li>Let <var>u</var> be <emu-xref aoid="TimeClip" id="_ref_5565"><a href="#sec-timeclip">TimeClip</a></emu-xref>(<emu-xref aoid="UTC" id="_ref_5566"><a href="#sec-utc-t">UTC</a></emu-xref>(<emu-xref aoid="MakeDate" id="_ref_5567"><a href="#sec-makedate">MakeDate</a></emu-xref>(<emu-xref aoid="Day" id="_ref_5568"><a href="#eqn-Day">Day</a></emu-xref>(<var>t</var>), <var>time</var>))).</li><li>Set the [[DateValue]] internal slot of <emu-xref href="#this-Date-object" id="_ref_5569"><a href="#this-Date-object">this Date object</a></emu-xref> to <var>u</var>.</li><li>Return <var>u</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-date.prototype.setminutes">
<h1><span class="secnum">20.3.4.24</span>Date.prototype.setMinutes ( <var>min</var> [ , <var>sec</var> [ , <var>ms</var> ] ] )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>t</var> be <emu-xref aoid="LocalTime" id="_ref_5570"><a href="#sec-localtime">LocalTime</a></emu-xref>(? <emu-xref aoid="thisTimeValue" id="_ref_5571"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value)).</li><li>Let <var>m</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5572"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>min</var>).</li><li>If <var>sec</var> is not present, let <var>s</var> be <emu-xref aoid="SecFromTime" id="_ref_5573"><a href="#eqn-SecFromTime">SecFromTime</a></emu-xref>(<var>t</var>); otherwise, let <var>s</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5574"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>sec</var>).</li><li>If <var>ms</var> is not present, let <var>milli</var> be <emu-xref aoid="msFromTime" id="_ref_5575"><a href="#eqn-msFromTime">msFromTime</a></emu-xref>(<var>t</var>); otherwise, let <var>milli</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5576"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>ms</var>).</li><li>Let <var>date</var> be <emu-xref aoid="MakeDate" id="_ref_5577"><a href="#sec-makedate">MakeDate</a></emu-xref>(<emu-xref aoid="Day" id="_ref_5578"><a href="#eqn-Day">Day</a></emu-xref>(<var>t</var>), <emu-xref aoid="MakeTime" id="_ref_5579"><a href="#sec-maketime">MakeTime</a></emu-xref>(<emu-xref aoid="HourFromTime" id="_ref_5580"><a href="#eqn-HourFromTime">HourFromTime</a></emu-xref>(<var>t</var>), <var>m</var>, <var>s</var>, <var>milli</var>)).</li><li>Let <var>u</var> be <emu-xref aoid="TimeClip" id="_ref_5581"><a href="#sec-timeclip">TimeClip</a></emu-xref>(<emu-xref aoid="UTC" id="_ref_5582"><a href="#sec-utc-t">UTC</a></emu-xref>(<var>date</var>)).</li><li>Set the [[DateValue]] internal slot of <emu-xref href="#this-Date-object" id="_ref_5583"><a href="#this-Date-object">this Date object</a></emu-xref> to <var>u</var>.</li><li>Return <var>u</var>.
</li></ol></emu-alg>
<p>The <code>"length"</code> property of the <code>setMinutes</code> method is 3.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>If <var>sec</var> is not present, this method behaves as if <var>sec</var> was present with the value <code>getSeconds()</code>. If <var>ms</var> is not present, this behaves as if <var>ms</var> was present with the value <code>getMilliseconds()</code>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-date.prototype.setmonth">
<h1><span class="secnum">20.3.4.25</span>Date.prototype.setMonth ( <var>month</var> [ , <var>date</var> ] )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>t</var> be <emu-xref aoid="LocalTime" id="_ref_5584"><a href="#sec-localtime">LocalTime</a></emu-xref>(? <emu-xref aoid="thisTimeValue" id="_ref_5585"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value)).</li><li>Let <var>m</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5586"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>month</var>).</li><li>If <var>date</var> is not present, let <var>dt</var> be <emu-xref aoid="DateFromTime" id="_ref_5587"><a href="#sec-date-number">DateFromTime</a></emu-xref>(<var>t</var>); otherwise, let <var>dt</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5588"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>date</var>).</li><li>Let <var>newDate</var> be <emu-xref aoid="MakeDate" id="_ref_5589"><a href="#sec-makedate">MakeDate</a></emu-xref>(<emu-xref aoid="MakeDay" id="_ref_5590"><a href="#sec-makeday">MakeDay</a></emu-xref>(<emu-xref aoid="YearFromTime" id="_ref_5591"><a href="#eqn-YearFromTime">YearFromTime</a></emu-xref>(<var>t</var>), <var>m</var>, <var>dt</var>), <emu-xref aoid="TimeWithinDay" id="_ref_5592"><a href="#eqn-TimeWithinDay">TimeWithinDay</a></emu-xref>(<var>t</var>)).</li><li>Let <var>u</var> be <emu-xref aoid="TimeClip" id="_ref_5593"><a href="#sec-timeclip">TimeClip</a></emu-xref>(<emu-xref aoid="UTC" id="_ref_5594"><a href="#sec-utc-t">UTC</a></emu-xref>(<var>newDate</var>)).</li><li>Set the [[DateValue]] internal slot of <emu-xref href="#this-Date-object" id="_ref_5595"><a href="#this-Date-object">this Date object</a></emu-xref> to <var>u</var>.</li><li>Return <var>u</var>.
</li></ol></emu-alg>
<p>The <code>"length"</code> property of the <code>setMonth</code> method is 2.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>If <var>date</var> is not present, this method behaves as if <var>date</var> was present with the value <code>getDate()</code>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-date.prototype.setseconds">
<h1><span class="secnum">20.3.4.26</span>Date.prototype.setSeconds ( <var>sec</var> [ , <var>ms</var> ] )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>t</var> be <emu-xref aoid="LocalTime" id="_ref_5596"><a href="#sec-localtime">LocalTime</a></emu-xref>(? <emu-xref aoid="thisTimeValue" id="_ref_5597"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value)).</li><li>Let <var>s</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5598"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>sec</var>).</li><li>If <var>ms</var> is not present, let <var>milli</var> be <emu-xref aoid="msFromTime" id="_ref_5599"><a href="#eqn-msFromTime">msFromTime</a></emu-xref>(<var>t</var>); otherwise, let <var>milli</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5600"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>ms</var>).</li><li>Let <var>date</var> be <emu-xref aoid="MakeDate" id="_ref_5601"><a href="#sec-makedate">MakeDate</a></emu-xref>(<emu-xref aoid="Day" id="_ref_5602"><a href="#eqn-Day">Day</a></emu-xref>(<var>t</var>), <emu-xref aoid="MakeTime" id="_ref_5603"><a href="#sec-maketime">MakeTime</a></emu-xref>(<emu-xref aoid="HourFromTime" id="_ref_5604"><a href="#eqn-HourFromTime">HourFromTime</a></emu-xref>(<var>t</var>), <emu-xref aoid="MinFromTime" id="_ref_5605"><a href="#eqn-MinFromTime">MinFromTime</a></emu-xref>(<var>t</var>), <var>s</var>, <var>milli</var>)).</li><li>Let <var>u</var> be <emu-xref aoid="TimeClip" id="_ref_5606"><a href="#sec-timeclip">TimeClip</a></emu-xref>(<emu-xref aoid="UTC" id="_ref_5607"><a href="#sec-utc-t">UTC</a></emu-xref>(<var>date</var>)).</li><li>Set the [[DateValue]] internal slot of <emu-xref href="#this-Date-object" id="_ref_5608"><a href="#this-Date-object">this Date object</a></emu-xref> to <var>u</var>.</li><li>Return <var>u</var>.
</li></ol></emu-alg>
<p>The <code>"length"</code> property of the <code>setSeconds</code> method is 2.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>If <var>ms</var> is not present, this method behaves as if <var>ms</var> was present with the value <code>getMilliseconds()</code>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-date.prototype.settime">
<h1><span class="secnum">20.3.4.27</span>Date.prototype.setTime ( <var>time</var> )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Perform ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_5609"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>t</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5610"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>time</var>).</li><li>Let <var>v</var> be <emu-xref aoid="TimeClip" id="_ref_5611"><a href="#sec-timeclip">TimeClip</a></emu-xref>(<var>t</var>).</li><li>Set the [[DateValue]] internal slot of <emu-xref href="#this-Date-object" id="_ref_5612"><a href="#this-Date-object">this Date object</a></emu-xref> to <var>v</var>.</li><li>Return <var>v</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-date.prototype.setutcdate">
<h1><span class="secnum">20.3.4.28</span>Date.prototype.setUTCDate ( <var>date</var> )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>t</var> be ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_5613"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>dt</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5614"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>date</var>).</li><li>Let <var>newDate</var> be <emu-xref aoid="MakeDate" id="_ref_5615"><a href="#sec-makedate">MakeDate</a></emu-xref>(<emu-xref aoid="MakeDay" id="_ref_5616"><a href="#sec-makeday">MakeDay</a></emu-xref>(<emu-xref aoid="YearFromTime" id="_ref_5617"><a href="#eqn-YearFromTime">YearFromTime</a></emu-xref>(<var>t</var>), <emu-xref aoid="MonthFromTime" id="_ref_5618"><a href="#eqn-MonthFromTime">MonthFromTime</a></emu-xref>(<var>t</var>), <var>dt</var>), <emu-xref aoid="TimeWithinDay" id="_ref_5619"><a href="#eqn-TimeWithinDay">TimeWithinDay</a></emu-xref>(<var>t</var>)).</li><li>Let <var>v</var> be <emu-xref aoid="TimeClip" id="_ref_5620"><a href="#sec-timeclip">TimeClip</a></emu-xref>(<var>newDate</var>).</li><li>Set the [[DateValue]] internal slot of <emu-xref href="#this-Date-object" id="_ref_5621"><a href="#this-Date-object">this Date object</a></emu-xref> to <var>v</var>.</li><li>Return <var>v</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-date.prototype.setutcfullyear">
<h1><span class="secnum">20.3.4.29</span>Date.prototype.setUTCFullYear ( <var>year</var> [ , <var>month</var> [ , <var>date</var> ] ] )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>t</var> be ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_5622"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>If <var>t</var> is <emu-val>NaN</emu-val>, set <var>t</var> to <emu-val>+0</emu-val>.</li><li>Let <var>y</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5623"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>year</var>).</li><li>If <var>month</var> is not present, let <var>m</var> be <emu-xref aoid="MonthFromTime" id="_ref_5624"><a href="#eqn-MonthFromTime">MonthFromTime</a></emu-xref>(<var>t</var>); otherwise, let <var>m</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5625"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>month</var>).</li><li>If <var>date</var> is not present, let <var>dt</var> be <emu-xref aoid="DateFromTime" id="_ref_5626"><a href="#sec-date-number">DateFromTime</a></emu-xref>(<var>t</var>); otherwise, let <var>dt</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5627"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>date</var>).</li><li>Let <var>newDate</var> be <emu-xref aoid="MakeDate" id="_ref_5628"><a href="#sec-makedate">MakeDate</a></emu-xref>(<emu-xref aoid="MakeDay" id="_ref_5629"><a href="#sec-makeday">MakeDay</a></emu-xref>(<var>y</var>, <var>m</var>, <var>dt</var>), <emu-xref aoid="TimeWithinDay" id="_ref_5630"><a href="#eqn-TimeWithinDay">TimeWithinDay</a></emu-xref>(<var>t</var>)).</li><li>Let <var>v</var> be <emu-xref aoid="TimeClip" id="_ref_5631"><a href="#sec-timeclip">TimeClip</a></emu-xref>(<var>newDate</var>).</li><li>Set the [[DateValue]] internal slot of <emu-xref href="#this-Date-object" id="_ref_5632"><a href="#this-Date-object">this Date object</a></emu-xref> to <var>v</var>.</li><li>Return <var>v</var>.
</li></ol></emu-alg>
<p>The <code>"length"</code> property of the <code>setUTCFullYear</code> method is 3.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>If <var>month</var> is not present, this method behaves as if <var>month</var> was present with the value <code>getUTCMonth()</code>. If <var>date</var> is not present, it behaves as if <var>date</var> was present with the value <code>getUTCDate()</code>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-date.prototype.setutchours">
<h1><span class="secnum">20.3.4.30</span>Date.prototype.setUTCHours ( <var>hour</var> [ , <var>min</var> [ , <var>sec</var> [ , <var>ms</var> ] ] ] )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>t</var> be ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_5633"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>h</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5634"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>hour</var>).</li><li>If <var>min</var> is not present, let <var>m</var> be <emu-xref aoid="MinFromTime" id="_ref_5635"><a href="#eqn-MinFromTime">MinFromTime</a></emu-xref>(<var>t</var>); otherwise, let <var>m</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5636"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>min</var>).</li><li>If <var>sec</var> is not present, let <var>s</var> be <emu-xref aoid="SecFromTime" id="_ref_5637"><a href="#eqn-SecFromTime">SecFromTime</a></emu-xref>(<var>t</var>); otherwise, let <var>s</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5638"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>sec</var>).</li><li>If <var>ms</var> is not present, let <var>milli</var> be <emu-xref aoid="msFromTime" id="_ref_5639"><a href="#eqn-msFromTime">msFromTime</a></emu-xref>(<var>t</var>); otherwise, let <var>milli</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5640"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>ms</var>).</li><li>Let <var>newDate</var> be <emu-xref aoid="MakeDate" id="_ref_5641"><a href="#sec-makedate">MakeDate</a></emu-xref>(<emu-xref aoid="Day" id="_ref_5642"><a href="#eqn-Day">Day</a></emu-xref>(<var>t</var>), <emu-xref aoid="MakeTime" id="_ref_5643"><a href="#sec-maketime">MakeTime</a></emu-xref>(<var>h</var>, <var>m</var>, <var>s</var>, <var>milli</var>)).</li><li>Let <var>v</var> be <emu-xref aoid="TimeClip" id="_ref_5644"><a href="#sec-timeclip">TimeClip</a></emu-xref>(<var>newDate</var>).</li><li>Set the [[DateValue]] internal slot of <emu-xref href="#this-Date-object" id="_ref_5645"><a href="#this-Date-object">this Date object</a></emu-xref> to <var>v</var>.</li><li>Return <var>v</var>.
</li></ol></emu-alg>
<p>The <code>"length"</code> property of the <code>setUTCHours</code> method is 4.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>If <var>min</var> is not present, this method behaves as if <var>min</var> was present with the value <code>getUTCMinutes()</code>. If <var>sec</var> is not present, it behaves as if <var>sec</var> was present with the value <code>getUTCSeconds()</code>. If <var>ms</var> is not present, it behaves as if <var>ms</var> was present with the value <code>getUTCMilliseconds()</code>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-date.prototype.setutcmilliseconds">
<h1><span class="secnum">20.3.4.31</span>Date.prototype.setUTCMilliseconds ( <var>ms</var> )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>t</var> be ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_5646"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>milli</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5647"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>ms</var>).</li><li>Let <var>time</var> be <emu-xref aoid="MakeTime" id="_ref_5648"><a href="#sec-maketime">MakeTime</a></emu-xref>(<emu-xref aoid="HourFromTime" id="_ref_5649"><a href="#eqn-HourFromTime">HourFromTime</a></emu-xref>(<var>t</var>), <emu-xref aoid="MinFromTime" id="_ref_5650"><a href="#eqn-MinFromTime">MinFromTime</a></emu-xref>(<var>t</var>), <emu-xref aoid="SecFromTime" id="_ref_5651"><a href="#eqn-SecFromTime">SecFromTime</a></emu-xref>(<var>t</var>), <var>milli</var>).</li><li>Let <var>v</var> be <emu-xref aoid="TimeClip" id="_ref_5652"><a href="#sec-timeclip">TimeClip</a></emu-xref>(<emu-xref aoid="MakeDate" id="_ref_5653"><a href="#sec-makedate">MakeDate</a></emu-xref>(<emu-xref aoid="Day" id="_ref_5654"><a href="#eqn-Day">Day</a></emu-xref>(<var>t</var>), <var>time</var>)).</li><li>Set the [[DateValue]] internal slot of <emu-xref href="#this-Date-object" id="_ref_5655"><a href="#this-Date-object">this Date object</a></emu-xref> to <var>v</var>.</li><li>Return <var>v</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-date.prototype.setutcminutes">
<h1><span class="secnum">20.3.4.32</span>Date.prototype.setUTCMinutes ( <var>min</var> [ , <var>sec</var> [ , <var>ms</var> ] ] )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>t</var> be ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_5656"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>m</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5657"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>min</var>).</li><li>If <var>sec</var> is not present, let <var>s</var> be <emu-xref aoid="SecFromTime" id="_ref_5658"><a href="#eqn-SecFromTime">SecFromTime</a></emu-xref>(<var>t</var>).</li><li>Else,<ol><li>Let <var>s</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5659"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>sec</var>).</li></ol></li><li>If <var>ms</var> is not present, let <var>milli</var> be <emu-xref aoid="msFromTime" id="_ref_5660"><a href="#eqn-msFromTime">msFromTime</a></emu-xref>(<var>t</var>).</li><li>Else,<ol><li>Let <var>milli</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5661"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>ms</var>).</li></ol></li><li>Let <var>date</var> be <emu-xref aoid="MakeDate" id="_ref_5662"><a href="#sec-makedate">MakeDate</a></emu-xref>(<emu-xref aoid="Day" id="_ref_5663"><a href="#eqn-Day">Day</a></emu-xref>(<var>t</var>), <emu-xref aoid="MakeTime" id="_ref_5664"><a href="#sec-maketime">MakeTime</a></emu-xref>(<emu-xref aoid="HourFromTime" id="_ref_5665"><a href="#eqn-HourFromTime">HourFromTime</a></emu-xref>(<var>t</var>), <var>m</var>, <var>s</var>, <var>milli</var>)).</li><li>Let <var>v</var> be <emu-xref aoid="TimeClip" id="_ref_5666"><a href="#sec-timeclip">TimeClip</a></emu-xref>(<var>date</var>).</li><li>Set the [[DateValue]] internal slot of <emu-xref href="#this-Date-object" id="_ref_5667"><a href="#this-Date-object">this Date object</a></emu-xref> to <var>v</var>.</li><li>Return <var>v</var>.
</li></ol></emu-alg>
<p>The <code>"length"</code> property of the <code>setUTCMinutes</code> method is 3.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>If <var>sec</var> is not present, this method behaves as if <var>sec</var> was present with the value <code>getUTCSeconds()</code>. If <var>ms</var> is not present, it function behaves as if <var>ms</var> was present with the value return by <code>getUTCMilliseconds()</code>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-date.prototype.setutcmonth">
<h1><span class="secnum">20.3.4.33</span>Date.prototype.setUTCMonth ( <var>month</var> [ , <var>date</var> ] )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>t</var> be ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_5668"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>m</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5669"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>month</var>).</li><li>If <var>date</var> is not present, let <var>dt</var> be <emu-xref aoid="DateFromTime" id="_ref_5670"><a href="#sec-date-number">DateFromTime</a></emu-xref>(<var>t</var>).</li><li>Else,<ol><li>Let <var>dt</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5671"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>date</var>).</li></ol></li><li>Let <var>newDate</var> be <emu-xref aoid="MakeDate" id="_ref_5672"><a href="#sec-makedate">MakeDate</a></emu-xref>(<emu-xref aoid="MakeDay" id="_ref_5673"><a href="#sec-makeday">MakeDay</a></emu-xref>(<emu-xref aoid="YearFromTime" id="_ref_5674"><a href="#eqn-YearFromTime">YearFromTime</a></emu-xref>(<var>t</var>), <var>m</var>, <var>dt</var>), <emu-xref aoid="TimeWithinDay" id="_ref_5675"><a href="#eqn-TimeWithinDay">TimeWithinDay</a></emu-xref>(<var>t</var>)).</li><li>Let <var>v</var> be <emu-xref aoid="TimeClip" id="_ref_5676"><a href="#sec-timeclip">TimeClip</a></emu-xref>(<var>newDate</var>).</li><li>Set the [[DateValue]] internal slot of <emu-xref href="#this-Date-object" id="_ref_5677"><a href="#this-Date-object">this Date object</a></emu-xref> to <var>v</var>.</li><li>Return <var>v</var>.
</li></ol></emu-alg>
<p>The <code>"length"</code> property of the <code>setUTCMonth</code> method is 2.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>If <var>date</var> is not present, this method behaves as if <var>date</var> was present with the value <code>getUTCDate()</code>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-date.prototype.setutcseconds">
<h1><span class="secnum">20.3.4.34</span>Date.prototype.setUTCSeconds ( <var>sec</var> [ , <var>ms</var> ] )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>t</var> be ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_5678"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>s</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5679"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>sec</var>).</li><li>If <var>ms</var> is not present, let <var>milli</var> be <emu-xref aoid="msFromTime" id="_ref_5680"><a href="#eqn-msFromTime">msFromTime</a></emu-xref>(<var>t</var>).</li><li>Else,<ol><li>Let <var>milli</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5681"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>ms</var>).</li></ol></li><li>Let <var>date</var> be <emu-xref aoid="MakeDate" id="_ref_5682"><a href="#sec-makedate">MakeDate</a></emu-xref>(<emu-xref aoid="Day" id="_ref_5683"><a href="#eqn-Day">Day</a></emu-xref>(<var>t</var>), <emu-xref aoid="MakeTime" id="_ref_5684"><a href="#sec-maketime">MakeTime</a></emu-xref>(<emu-xref aoid="HourFromTime" id="_ref_5685"><a href="#eqn-HourFromTime">HourFromTime</a></emu-xref>(<var>t</var>), <emu-xref aoid="MinFromTime" id="_ref_5686"><a href="#eqn-MinFromTime">MinFromTime</a></emu-xref>(<var>t</var>), <var>s</var>, <var>milli</var>)).</li><li>Let <var>v</var> be <emu-xref aoid="TimeClip" id="_ref_5687"><a href="#sec-timeclip">TimeClip</a></emu-xref>(<var>date</var>).</li><li>Set the [[DateValue]] internal slot of <emu-xref href="#this-Date-object" id="_ref_5688"><a href="#this-Date-object">this Date object</a></emu-xref> to <var>v</var>.</li><li>Return <var>v</var>.
</li></ol></emu-alg>
<p>The <code>"length"</code> property of the <code>setUTCSeconds</code> method is 2.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>If <var>ms</var> is not present, this method behaves as if <var>ms</var> was present with the value <code>getUTCMilliseconds()</code>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-date.prototype.todatestring">
<h1><span class="secnum">20.3.4.35</span>Date.prototype.toDateString ( )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>O</var> be <emu-xref href="#this-Date-object" id="_ref_5689"><a href="#this-Date-object">this Date object</a></emu-xref>.</li><li>Let <var>tv</var> be ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_5690"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<var>O</var>).</li><li>If <var>tv</var> is <emu-val>NaN</emu-val>, return <code>"Invalid Date"</code>.</li><li>Let <var>t</var> be <emu-xref aoid="LocalTime" id="_ref_5691"><a href="#sec-localtime">LocalTime</a></emu-xref>(<var>tv</var>).</li><li>Return <emu-xref aoid="DateString" id="_ref_5692"><a href="#sec-datestring">DateString</a></emu-xref>(<var>t</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-date.prototype.toisostring">
<h1><span class="secnum">20.3.4.36</span>Date.prototype.toISOString ( )</h1>
<p>This function returns a String value representing the instance in time corresponding to <emu-xref href="#this-time-value" id="_ref_5693"><a href="#this-time-value">this time value</a></emu-xref>. The format of the String is the Date Time string format defined in <emu-xref href="#sec-date-time-string-format" id="_ref_515"><a href="#sec-date-time-string-format">20.3.1.15</a></emu-xref>. All fields are present in the String. The time zone is always UTC, denoted by the suffix Z. If <emu-xref href="#this-time-value" id="_ref_5694"><a href="#this-time-value">this time value</a></emu-xref>
is not a finite Number or if the year is not a value that can be
represented in that format (if necessary using expanded year format), a <emu-val>RangeError</emu-val> exception is thrown.</p>
</emu-clause>
<emu-clause id="sec-date.prototype.tojson">
<h1><span class="secnum">20.3.4.37</span>Date.prototype.toJSON ( <var>key</var> )</h1>
<p>This function provides a String representation of a Date object for use by <code>JSON.stringify</code> (<emu-xref href="#sec-json.stringify" id="_ref_516"><a href="#sec-json.stringify">24.5.2</a></emu-xref>).</p>
<p>When the <code>toJSON</code> method is called with argument <var>key</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_5695"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>tv</var> be ?&nbsp;<emu-xref aoid="ToPrimitive" id="_ref_5696"><a href="#sec-toprimitive">ToPrimitive</a></emu-xref>(<var>O</var>, hint Number).</li><li>If <emu-xref aoid="Type" id="_ref_5697"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>tv</var>) is Number and <var>tv</var> is not finite, return <emu-val>null</emu-val>.</li><li>Return ?&nbsp;<emu-xref aoid="Invoke" id="_ref_5698"><a href="#sec-invoke">Invoke</a></emu-xref>(<var>O</var>, <code>"toISOString"</code>).
</li></ol></emu-alg>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>The argument is ignored.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <code>toJSON</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val>
value be a Date object. Therefore, it can be transferred to other kinds
of objects for use as a method. However, it does require that any such
object have a <code>toISOString</code> method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-date.prototype.tolocaledatestring">
<h1><span class="secnum">20.3.4.38</span>Date.prototype.toLocaleDateString ( [ <var>reserved1</var> [ , <var>reserved2</var> ] ] )</h1>
<p>An ECMAScript implementation that includes the ECMA-402 Internationalization API must implement the <code>Date.prototype.toLocaleDateString</code>
method as specified in the ECMA-402 specification. If an ECMAScript
implementation does not include the ECMA-402 API the following
specification of the <code>toLocaleDateString</code> method is used.</p>
<p>This function returns a String value. The contents of the
String are implementation-dependent, but are intended to represent the
“date” portion of the Date in the current time zone in a convenient,
human-readable form that corresponds to the conventions of the host
environment's current locale.</p>
<p>The meaning of the optional parameters to this method are
defined in the ECMA-402 specification; implementations that do not
include ECMA-402 support must not use those parameter positions for
anything else.</p>
</emu-clause>
<emu-clause id="sec-date.prototype.tolocalestring">
<h1><span class="secnum">20.3.4.39</span>Date.prototype.toLocaleString ( [ <var>reserved1</var> [ , <var>reserved2</var> ] ] )</h1>
<p>An ECMAScript implementation that includes the ECMA-402 Internationalization API must implement the <code>Date.prototype.toLocaleString</code>
method as specified in the ECMA-402 specification. If an ECMAScript
implementation does not include the ECMA-402 API the following
specification of the <code>toLocaleString</code> method is used.</p>
<p>This function returns a String value. The contents of the
String are implementation-dependent, but are intended to represent the
Date in the current time zone in a convenient, human-readable form that
corresponds to the conventions of the host environment's current locale.</p>
<p>The meaning of the optional parameters to this method are
defined in the ECMA-402 specification; implementations that do not
include ECMA-402 support must not use those parameter positions for
anything else.</p>
</emu-clause>
<emu-clause id="sec-date.prototype.tolocaletimestring">
<h1><span class="secnum">20.3.4.40</span>Date.prototype.toLocaleTimeString ( [ <var>reserved1</var> [ , <var>reserved2</var> ] ] )</h1>
<p>An ECMAScript implementation that includes the ECMA-402 Internationalization API must implement the <code>Date.prototype.toLocaleTimeString</code>
method as specified in the ECMA-402 specification. If an ECMAScript
implementation does not include the ECMA-402 API the following
specification of the <code>toLocaleTimeString</code> method is used.</p>
<p>This function returns a String value. The contents of the
String are implementation-dependent, but are intended to represent the
“time” portion of the Date in the current time zone in a convenient,
human-readable form that corresponds to the conventions of the host
environment's current locale.</p>
<p>The meaning of the optional parameters to this method are
defined in the ECMA-402 specification; implementations that do not
include ECMA-402 support must not use those parameter positions for
anything else.</p>
</emu-clause>
<emu-clause id="sec-date.prototype.tostring">
<h1><span class="secnum">20.3.4.41</span>Date.prototype.toString ( )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>tv</var> be ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_5699"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Return <emu-xref aoid="ToDateString" id="_ref_5700"><a href="#sec-todatestring">ToDateString</a></emu-xref>(<var>tv</var>).
</li></ol></emu-alg>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>For any Date object <code>d</code> whose milliseconds amount is zero, the result of <code>Date.parse(d.toString())</code> is equal to <code>d.valueOf()</code>. See <emu-xref href="#sec-date.parse" id="_ref_517"><a href="#sec-date.parse">20.3.3.2</a></emu-xref>.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <code>toString</code> function is not generic; it throws a <emu-val>TypeError</emu-val> exception if its <emu-val>this</emu-val> value is not a Date object. Therefore, it cannot be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
<emu-clause id="sec-timestring" aoid="TimeString">
<h1><span class="secnum">20.3.4.41.1</span>Runtime Semantics: TimeString ( <var>tv</var> )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_5701"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_5702"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>tv</var>) is Number.</li><li><emu-xref href="#assert" id="_ref_5703"><a href="#assert">Assert</a></emu-xref>: <var>tv</var> is not <emu-val>NaN</emu-val>.</li><li>Let <var>hour</var> be the String representation of <emu-xref aoid="HourFromTime" id="_ref_5704"><a href="#eqn-HourFromTime">HourFromTime</a></emu-xref>(<var>tv</var>), formatted as a two-digit decimal number, padded to the left with a zero if necessary.</li><li>Let <var>minute</var> be the String representation of <emu-xref aoid="MinFromTime" id="_ref_5705"><a href="#eqn-MinFromTime">MinFromTime</a></emu-xref>(<var>tv</var>), formatted as a two-digit decimal number, padded to the left with a zero if necessary.</li><li>Let <var>second</var> be the String representation of <emu-xref aoid="SecFromTime" id="_ref_5706"><a href="#eqn-SecFromTime">SecFromTime</a></emu-xref>(<var>tv</var>), formatted as a two-digit decimal number, padded to the left with a zero if necessary.</li><li>Return the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_5707"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>hour</var>, <code>":"</code>, <var>minute</var>, <code>":"</code>, <var>second</var>, the code unit 0x0020 (SPACE), and <code>"GMT"</code>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-datestring" aoid="DateString">
<h1><span class="secnum">20.3.4.41.2</span>Runtime Semantics: DateString ( <var>tv</var> )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_5708"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_5709"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>tv</var>) is Number.</li><li><emu-xref href="#assert" id="_ref_5710"><a href="#assert">Assert</a></emu-xref>: <var>tv</var> is not <emu-val>NaN</emu-val>.</li><li>Let <var>weekday</var> be the Name of the entry in <emu-xref href="#sec-todatestring-day-names" id="_ref_518"><a href="#sec-todatestring-day-names">Table 49</a></emu-xref> with the Number <emu-xref aoid="WeekDay" id="_ref_5711"><a href="#sec-week-day">WeekDay</a></emu-xref>(<var>tv</var>).</li><li>Let <var>month</var> be the Name of the entry in <emu-xref href="#sec-todatestring-month-names" id="_ref_519"><a href="#sec-todatestring-month-names">Table 50</a></emu-xref> with the Number <emu-xref aoid="MonthFromTime" id="_ref_5712"><a href="#eqn-MonthFromTime">MonthFromTime</a></emu-xref>(<var>tv</var>).</li><li>Let <var>day</var> be the String representation of <emu-xref aoid="DateFromTime" id="_ref_5713"><a href="#sec-date-number">DateFromTime</a></emu-xref>(<var>tv</var>), formatted as a two-digit decimal number, padded to the left with a zero if necessary.</li><li>Let <var>year</var> be the String representation of <emu-xref aoid="YearFromTime" id="_ref_5714"><a href="#eqn-YearFromTime">YearFromTime</a></emu-xref>(<var>tv</var>), formatted as a decimal number of at least four digits, padded to the left with zeroes if necessary.</li><li>Return the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_5715"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>weekday</var>, the code unit 0x0020 (SPACE), <var>month</var>, the code unit 0x0020 (SPACE), <var>day</var>, the code unit 0x0020 (SPACE), and <var>year</var>.
</li></ol></emu-alg>
<emu-table id="sec-todatestring-day-names" caption="Names of days of the week"><figure><figcaption>Table 49: Names of days of the week</figcaption>
<table>
<tbody>
<tr>
<th>
Number
</th>
<th>
Name
</th>
</tr>
<tr>
<td>
0
</td>
<td>
<code>"Sun"</code>
</td>
</tr>
<tr>
<td>
1
</td>
<td>
<code>"Mon"</code>
</td>
</tr>
<tr>
<td>
2
</td>
<td>
<code>"Tue"</code>
</td>
</tr>
<tr>
<td>
3
</td>
<td>
<code>"Wed"</code>
</td>
</tr>
<tr>
<td>
4
</td>
<td>
<code>"Thu"</code>
</td>
</tr>
<tr>
<td>
5
</td>
<td>
<code>"Fri"</code>
</td>
</tr>
<tr>
<td>
6
</td>
<td>
<code>"Sat"</code>
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<emu-table id="sec-todatestring-month-names" caption="Names of months of the year"><figure><figcaption>Table 50: Names of months of the year</figcaption>
<table>
<tbody>
<tr>
<th>
Number
</th>
<th>
Name
</th>
</tr>
<tr>
<td>
0
</td>
<td>
<code>"Jan"</code>
</td>
</tr>
<tr>
<td>
1
</td>
<td>
<code>"Feb"</code>
</td>
</tr>
<tr>
<td>
2
</td>
<td>
<code>"Mar"</code>
</td>
</tr>
<tr>
<td>
3
</td>
<td>
<code>"Apr"</code>
</td>
</tr>
<tr>
<td>
4
</td>
<td>
<code>"May"</code>
</td>
</tr>
<tr>
<td>
5
</td>
<td>
<code>"Jun"</code>
</td>
</tr>
<tr>
<td>
6
</td>
<td>
<code>"Jul"</code>
</td>
</tr>
<tr>
<td>
7
</td>
<td>
<code>"Aug"</code>
</td>
</tr>
<tr>
<td>
8
</td>
<td>
<code>"Sep"</code>
</td>
</tr>
<tr>
<td>
9
</td>
<td>
<code>"Oct"</code>
</td>
</tr>
<tr>
<td>
10
</td>
<td>
<code>"Nov"</code>
</td>
</tr>
<tr>
<td>
11
</td>
<td>
<code>"Dec"</code>
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
</emu-clause>
<emu-clause id="sec-timezoneestring" aoid="TimeZoneString">
<h1><span class="secnum">20.3.4.41.3</span>Runtime Semantics: TimeZoneString ( <var>tv</var> )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_5716"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_5717"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>tv</var>) is Number.</li><li><emu-xref href="#assert" id="_ref_5718"><a href="#assert">Assert</a></emu-xref>: <var>tv</var> is not <emu-val>NaN</emu-val>.</li><li>Let <var>offset</var> be <emu-xref href="#sec-local-time-zone-adjustment" id="_ref_5719"><a href="#sec-local-time-zone-adjustment">LocalTZA</a></emu-xref>(<var>tv</var>, <emu-val>true</emu-val>).</li><li>If <var>offset</var> ≥ 0, let <var>offsetSign</var> be <code>"+"</code>; otherwise, let <var>offsetSign</var> be <code>"-"</code>.</li><li>Let <var>offsetMin</var> be the String representation of <emu-xref aoid="MinFromTime" id="_ref_5720"><a href="#eqn-MinFromTime">MinFromTime</a></emu-xref>(<emu-xref aoid="abs" id="_ref_5721"><a href="#eqn-abs">abs</a></emu-xref>(<var>offset</var>)), formatted as a two-digit decimal number, padded to the left with a zero if necessary.</li><li>Let <var>offsetHour</var> be the String representation of <emu-xref aoid="HourFromTime" id="_ref_5722"><a href="#eqn-HourFromTime">HourFromTime</a></emu-xref>(<emu-xref aoid="abs" id="_ref_5723"><a href="#eqn-abs">abs</a></emu-xref>(<var>offset</var>)), formatted as a two-digit decimal number, padded to the left with a zero if necessary.</li><li>Let <var>tzName</var> be an implementation-defined string that is either the empty string or the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_5724"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref>
of the code unit 0x0020 (SPACE), the code unit 0x0028 (LEFT
PARENTHESIS), an implementation-dependent timezone name, and the code
unit 0x0029 (RIGHT PARENTHESIS).</li><li>Return the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_5725"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>offsetSign</var>, <var>offsetHour</var>, <var>offsetMin</var>, and <var>tzName</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-todatestring" aoid="ToDateString">
<h1><span class="secnum">20.3.4.41.4</span>Runtime Semantics: ToDateString ( <var>tv</var> )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_5726"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_5727"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>tv</var>) is Number.</li><li>If <var>tv</var> is <emu-val>NaN</emu-val>, return <code>"Invalid Date"</code>.</li><li>Let <var>t</var> be <emu-xref aoid="LocalTime" id="_ref_5728"><a href="#sec-localtime">LocalTime</a></emu-xref>(<var>tv</var>).</li><li>Return the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_5729"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <emu-xref aoid="DateString" id="_ref_5730"><a href="#sec-datestring">DateString</a></emu-xref>(<var>t</var>), the code unit 0x0020 (SPACE), <emu-xref aoid="TimeString" id="_ref_5731"><a href="#sec-timestring">TimeString</a></emu-xref>(<var>t</var>), and <emu-xref aoid="TimeZoneString" id="_ref_5732"><a href="#sec-timezoneestring">TimeZoneString</a></emu-xref>(<var>tv</var>).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-date.prototype.totimestring">
<h1><span class="secnum">20.3.4.42</span>Date.prototype.toTimeString ( )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>O</var> be <emu-xref href="#this-Date-object" id="_ref_5733"><a href="#this-Date-object">this Date object</a></emu-xref>.</li><li>Let <var>tv</var> be ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_5734"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<var>O</var>).</li><li>If <var>tv</var> is <emu-val>NaN</emu-val>, return <code>"Invalid Date"</code>.</li><li>Let <var>t</var> be <emu-xref aoid="LocalTime" id="_ref_5735"><a href="#sec-localtime">LocalTime</a></emu-xref>(<var>tv</var>).</li><li>Return the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_5736"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <emu-xref aoid="TimeString" id="_ref_5737"><a href="#sec-timestring">TimeString</a></emu-xref>(<var>t</var>) and <emu-xref aoid="TimeZoneString" id="_ref_5738"><a href="#sec-timezoneestring">TimeZoneString</a></emu-xref>(<var>tv</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-date.prototype.toutcstring">
<h1><span class="secnum">20.3.4.43</span>Date.prototype.toUTCString ( )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Let <var>O</var> be <emu-xref href="#this-Date-object" id="_ref_5739"><a href="#this-Date-object">this Date object</a></emu-xref>.</li><li>Let <var>tv</var> be ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_5740"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<var>O</var>).</li><li>If <var>tv</var> is <emu-val>NaN</emu-val>, return <code>"Invalid Date"</code>.</li><li>Let <var>weekday</var> be the Name of the entry in <emu-xref href="#sec-todatestring-day-names" id="_ref_520"><a href="#sec-todatestring-day-names">Table 49</a></emu-xref> with the Number <emu-xref aoid="WeekDay" id="_ref_5741"><a href="#sec-week-day">WeekDay</a></emu-xref>(<var>tv</var>).</li><li>Let <var>month</var> be the Name of the entry in <emu-xref href="#sec-todatestring-month-names" id="_ref_521"><a href="#sec-todatestring-month-names">Table 50</a></emu-xref> with the Number <emu-xref aoid="MonthFromTime" id="_ref_5742"><a href="#eqn-MonthFromTime">MonthFromTime</a></emu-xref>(<var>tv</var>).</li><li>Let <var>day</var> be the String representation of <emu-xref aoid="DateFromTime" id="_ref_5743"><a href="#sec-date-number">DateFromTime</a></emu-xref>(<var>tv</var>), formatted as a two-digit decimal number, padded to the left with a zero if necessary.</li><li>Let <var>year</var> be the String representation of <emu-xref aoid="YearFromTime" id="_ref_5744"><a href="#eqn-YearFromTime">YearFromTime</a></emu-xref>(<var>tv</var>), formatted as a decimal number of at least four digits, padded to the left with zeroes if necessary.</li><li>Return the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_5745"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>weekday</var>, <code>","</code>, the code unit 0x0020 (SPACE), <var>day</var>, the code unit 0x0020 (SPACE), <var>month</var>, the code unit 0x0020 (SPACE), <var>year</var>, the code unit 0x0020 (SPACE), and <emu-xref aoid="TimeString" id="_ref_5746"><a href="#sec-timestring">TimeString</a></emu-xref>(<var>tv</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-date.prototype.valueof">
<h1><span class="secnum">20.3.4.44</span>Date.prototype.valueOf ( )</h1>
<p>The following steps are performed:</p>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_5747"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-date.prototype-@@toprimitive">
<h1><span class="secnum">20.3.4.45</span>Date.prototype [ @@toPrimitive ] ( <var>hint</var> )</h1>
<p>This function is called by ECMAScript language operators to convert a Date object to a primitive value. The allowed values for <var>hint</var> are <code>"default"</code>, <code>"number"</code>, and <code>"string"</code>. Date objects, are unique among built-in ECMAScript object in that they treat <code>"default"</code> as being equivalent to <code>"string"</code>, All other built-in ECMAScript objects treat <code>"default"</code> as being equivalent to <code>"number"</code>.</p>
<p>When the <code>@@toPrimitive</code> method is called with argument <var>hint</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_5748"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>hint</var> is the String value <code>"string"</code> or the String value <code>"default"</code>, then<ol><li>Let <var>tryFirst</var> be <code>"string"</code>.</li></ol></li><li>Else if <var>hint</var> is the String value <code>"number"</code>, then<ol><li>Let <var>tryFirst</var> be <code>"number"</code>.</li></ol></li><li>Else, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return ?&nbsp;<emu-xref aoid="OrdinaryToPrimitive" id="_ref_5749"><a href="#sec-ordinarytoprimitive">OrdinaryToPrimitive</a></emu-xref>(<var>O</var>, <var>tryFirst</var>).
</li></ol></emu-alg>
<p>The value of the <code>name</code> property of this function is <code>"[Symbol.toPrimitive]"</code>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-date-instances">
<h1><span class="secnum">20.3.5</span>Properties of Date Instances</h1>
<p>Date instances are ordinary objects that inherit properties
from the Date prototype object. Date instances also have a [[DateValue]]
internal slot. The [[DateValue]] internal slot is the <emu-xref href="#sec-time-values-and-time-range" id="_ref_5750"><a href="#sec-time-values-and-time-range">time value</a></emu-xref> represented by <emu-xref href="#this-Date-object" id="_ref_5751"><a href="#this-Date-object">this Date object</a></emu-xref>.</p>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-text-processing">
<h1><span class="secnum">21</span>Text Processing</h1>
<emu-clause id="sec-string-objects">
<h1><span class="secnum">21.1</span>String Objects</h1>
<emu-clause id="sec-string-constructor">
<h1><span class="secnum">21.1.1</span>The String Constructor</h1>
<p>The String <emu-xref href="#constructor" id="_ref_5752"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>is the intrinsic object <dfn>%String%</dfn>.</li>
<li>is the initial value of the <code>String</code> property of the <emu-xref href="#sec-global-object" id="_ref_5753"><a href="#sec-global-object">global object</a></emu-xref>.</li>
<li>creates and initializes a new String object when called as a <emu-xref href="#constructor" id="_ref_5754"><a href="#constructor">constructor</a></emu-xref>.</li>
<li>performs a type conversion when called as a function rather than as a <emu-xref href="#constructor" id="_ref_5755"><a href="#constructor">constructor</a></emu-xref>.</li>
<li>is designed to be subclassable. It may be used as the value of an <code>extends</code> clause of a class definition. Subclass constructors that intend to inherit the specified <code>String</code> behaviour must include a <code>super</code> call to the <code>String</code> <emu-xref href="#constructor" id="_ref_5756"><a href="#constructor">constructor</a></emu-xref> to create and initialize the subclass instance with a [[StringData]] internal slot.</li>
</ul>
<emu-clause id="sec-string-constructor-string-value">
<h1><span class="secnum">21.1.1.1</span>String ( <var>value</var> )</h1>
<p>When <code>String</code> is called with argument <var>value</var>, the following steps are taken:</p>
<emu-alg><ol><li>If no arguments were passed to this function invocation, let <var>s</var> be <code>""</code>.</li><li>Else,<ol><li>If NewTarget is <emu-val>undefined</emu-val> and <emu-xref aoid="Type" id="_ref_5757"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>value</var>) is Symbol, return <emu-xref aoid="SymbolDescriptiveString" id="_ref_5758"><a href="#sec-symboldescriptivestring">SymbolDescriptiveString</a></emu-xref>(<var>value</var>).</li><li>Let <var>s</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5759"><a href="#sec-tostring">ToString</a></emu-xref>(<var>value</var>).</li></ol></li><li>If NewTarget is <emu-val>undefined</emu-val>, return <var>s</var>.</li><li>Return !&nbsp;<emu-xref aoid="StringCreate" id="_ref_5760"><a href="#sec-stringcreate">StringCreate</a></emu-xref>(<var>s</var>, ?&nbsp;<emu-xref aoid="GetPrototypeFromConstructor" id="_ref_5761"><a href="#sec-getprototypefromconstructor">GetPrototypeFromConstructor</a></emu-xref>(NewTarget, <code>"%StringPrototype%"</code>)).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-string-constructor">
<h1><span class="secnum">21.1.2</span>Properties of the String Constructor</h1>
<p>The String <emu-xref href="#constructor" id="_ref_5762"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_5763"><a href="#sec-properties-of-the-function-prototype-object">%FunctionPrototype%</a></emu-xref>.</li>
<li>has the following properties:</li>
</ul>
<emu-clause id="sec-string.fromcharcode">
<h1><span class="secnum">21.1.2.1</span>String.fromCharCode ( ...<var>codeUnits</var> )</h1>
<p>The <code>String.fromCharCode</code> function may be called with any number of arguments which form the rest parameter <var>codeUnits</var>. The following steps are taken:</p>
<emu-alg><ol><li>Let <var>codeUnits</var> be a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5764"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing the arguments passed to this function.</li><li>Let <var>length</var> be the number of elements in <var>codeUnits</var>.</li><li>Let <var>elements</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5765"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>nextIndex</var> be 0.</li><li>Repeat, while <var>nextIndex</var> &lt; <var>length</var><ol><li>Let <var>next</var> be <var>codeUnits</var>[<var>nextIndex</var>].</li><li>Let <var>nextCU</var> be ?&nbsp;<emu-xref aoid="ToUint16" id="_ref_5766"><a href="#sec-touint16">ToUint16</a></emu-xref>(<var>next</var>).</li><li>Append <var>nextCU</var> to the end of <var>elements</var>.</li><li>Increase <var>nextIndex</var> by 1.</li></ol></li><li>Return the String value whose code units are, in order, the elements in the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5767"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> <var>elements</var>. If <var>length</var> is 0, the empty string is returned.
</li></ol></emu-alg>
<p>The <code>"length"</code> property of the <code>fromCharCode</code> function is 1.</p>
</emu-clause>
<emu-clause id="sec-string.fromcodepoint">
<h1><span class="secnum">21.1.2.2</span>String.fromCodePoint ( ...<var>codePoints</var> )</h1>
<p>The <code>String.fromCodePoint</code> function may be called with any number of arguments which form the rest parameter <var>codePoints</var>. The following steps are taken:</p>
<emu-alg><ol><li>Let <var>codePoints</var> be a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5768"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing the arguments passed to this function.</li><li>Let <var>length</var> be the number of elements in <var>codePoints</var>.</li><li>Let <var>elements</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5769"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>nextIndex</var> be 0.</li><li>Repeat, while <var>nextIndex</var> &lt; <var>length</var><ol><li>Let <var>next</var> be <var>codePoints</var>[<var>nextIndex</var>].</li><li>Let <var>nextCP</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5770"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>next</var>).</li><li>If <emu-xref aoid="SameValue" id="_ref_5771"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>nextCP</var>, !&nbsp;<emu-xref aoid="ToInteger" id="_ref_5772"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>nextCP</var>)) is <emu-val>false</emu-val>, throw a <emu-val>RangeError</emu-val> exception.</li><li>If <var>nextCP</var> &lt; 0 or <var>nextCP</var> &gt; 0x10FFFF, throw a <emu-val>RangeError</emu-val> exception.</li><li>Append the elements of the <emu-xref aoid="UTF16Encoding" id="_ref_5773"><a href="#sec-utf16encoding">UTF16Encoding</a></emu-xref> of <var>nextCP</var> to the end of <var>elements</var>.</li><li>Increase <var>nextIndex</var> by 1.</li></ol></li><li>Return the String value whose code units are, in order, the elements in the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5774"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> <var>elements</var>. If <var>length</var> is 0, the empty string is returned.
</li></ol></emu-alg>
<p>The <code>"length"</code> property of the <code>fromCodePoint</code> function is 1.</p>
</emu-clause>
<emu-clause id="sec-string.prototype">
<h1><span class="secnum">21.1.2.3</span>String.prototype</h1>
<p>The initial value of <code>String.prototype</code> is the intrinsic object <emu-xref href="#sec-properties-of-the-string-prototype-object" id="_ref_5775"><a href="#sec-properties-of-the-string-prototype-object">%StringPrototype%</a></emu-xref>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-string.raw">
<h1><span class="secnum">21.1.2.4</span>String.raw ( <var>template</var>, ...<var>substitutions</var> )</h1>
<p>The <code>String.raw</code> function may be called with a variable number of arguments. The first argument is <var>template</var> and the remainder of the arguments form the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5776"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> <var>substitutions</var>. The following steps are taken:</p>
<emu-alg><ol><li>Let <var>substitutions</var> be a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5777"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>
consisting of all of the arguments passed to this function, starting
with the second argument. If fewer than two arguments were passed, the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5778"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> is empty.</li><li>Let <var>numberOfSubstitutions</var> be the number of elements in <var>substitutions</var>.</li><li>Let <var>cooked</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_5779"><a href="#sec-toobject">ToObject</a></emu-xref>(<var>template</var>).</li><li>Let <var>raw</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_5780"><a href="#sec-toobject">ToObject</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_5781"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>cooked</var>, <code>"raw"</code>)).</li><li>Let <var>literalSegments</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_5782"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_5783"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>raw</var>, <code>"length"</code>)).</li><li>If <var>literalSegments</var> ≤ 0, return the empty string.</li><li>Let <var>stringElements</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5784"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>nextIndex</var> be 0.</li><li>Repeat,<ol><li>Let <var>nextKey</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_5785"><a href="#sec-tostring">ToString</a></emu-xref>(<var>nextIndex</var>).</li><li>Let <var>nextSeg</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5786"><a href="#sec-tostring">ToString</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_5787"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>raw</var>, <var>nextKey</var>)).</li><li>Append in order the code unit elements of <var>nextSeg</var> to the end of <var>stringElements</var>.</li><li>If <var>nextIndex</var> + 1 = <var>literalSegments</var>, then<ol><li>Return the String value whose code units are, in order, the elements in the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5788"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> <var>stringElements</var>. If <var>stringElements</var> has no elements, the empty string is returned.</li></ol></li><li>If <var>nextIndex</var> &lt; <var>numberOfSubstitutions</var>, let <var>next</var> be <var>substitutions</var>[<var>nextIndex</var>].</li><li>Else, let <var>next</var> be the empty String.</li><li>Let <var>nextSub</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5789"><a href="#sec-tostring">ToString</a></emu-xref>(<var>next</var>).</li><li>Append in order the code unit elements of <var>nextSub</var> to the end of <var>stringElements</var>.</li><li>Increase <var>nextIndex</var> by 1.
</li></ol></li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>String.raw is intended for use as a tag function of a Tagged Template (<emu-xref href="#sec-tagged-templates" id="_ref_522"><a href="#sec-tagged-templates">12.3.7</a></emu-xref>).
When called as such, the first argument will be a well formed template
object and the rest parameter will contain the substitution values.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-string-prototype-object">
<h1><span class="secnum">21.1.3</span>Properties of the String Prototype Object</h1>
<p>The String prototype object:</p>
<ul>
<li>is the intrinsic object <dfn>%StringPrototype%</dfn>.</li>
<li>is a String <emu-xref href="#exotic-object" id="_ref_5790"><a href="#exotic-object">exotic object</a></emu-xref> and has the internal methods specified for such objects.</li>
<li>has a [[StringData]] internal slot whose value is the empty String.</li>
<li>has a <code>"length"</code> property whose initial value is 0 and whose attributes are { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</li>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_5791"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>.</li>
</ul>
<p>Unless explicitly stated otherwise, the methods of the String prototype object defined below are not generic and the <emu-val>this</emu-val>
value passed to them must be either a String value or an object that
has a [[StringData]] internal slot that has been initialized to a String
value.</p>
<p>The abstract operation <dfn id="sec-thisstringvalue" aoid="thisStringValue">thisStringValue</dfn>(<var>value</var>) performs the following steps:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_5792"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>value</var>) is String, return <var>value</var>.</li><li>If <emu-xref aoid="Type" id="_ref_5793"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>value</var>) is Object and <var>value</var> has a [[StringData]] internal slot, then<ol><li>Let <var>s</var> be <var>value</var>.[[StringData]].</li><li><emu-xref href="#assert" id="_ref_5794"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_5795"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>s</var>) is String.</li><li>Return <var>s</var>.</li></ol></li><li>Throw a <emu-val>TypeError</emu-val> exception.
</li></ol></emu-alg>
<emu-clause id="sec-string.prototype.charat">
<h1><span class="secnum">21.1.3.1</span>String.prototype.charAt ( <var>pos</var> )</h1>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>Returns a single element String containing the code unit at index <var>pos</var>
within the String value resulting from converting this object to a
String. If there is no element at that index, the result is the empty
String. The result is a String value, not a String object.</p>
<p>If <code>pos</code> is a value of Number type that is an integer, then the result of <code>x.charAt(pos)</code> is equal to the result of <code>x.substring(pos, pos + 1)</code>.</p>
</div></emu-note>
<p>When the <code>charAt</code> method is called with one argument <var>pos</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="RequireObjectCoercible" id="_ref_5796"><a href="#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>S</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5797"><a href="#sec-tostring">ToString</a></emu-xref>(<var>O</var>).</li><li>Let <var>position</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_5798"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>pos</var>).</li><li>Let <var>size</var> be the length of <var>S</var>.</li><li>If <var>position</var> &lt; 0 or <var>position</var> ≥ <var>size</var>, return the empty String.</li><li>Return the String value of length 1, containing one code unit from <var>S</var>, namely the code unit at index <var>position</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <code>charAt</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be a String object. Therefore, it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-string.prototype.charcodeat">
<h1><span class="secnum">21.1.3.2</span>String.prototype.charCodeAt ( <var>pos</var> )</h1>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>Returns a Number (a nonnegative integer less than 2<sup>16</sup>) that is the numeric value of the code unit at index <var>pos</var> within the String resulting from converting this object to a String. If there is no element at that index, the result is <emu-val>NaN</emu-val>.</p>
</div></emu-note>
<p>When the <code>charCodeAt</code> method is called with one argument <var>pos</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="RequireObjectCoercible" id="_ref_5799"><a href="#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>S</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5800"><a href="#sec-tostring">ToString</a></emu-xref>(<var>O</var>).</li><li>Let <var>position</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_5801"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>pos</var>).</li><li>Let <var>size</var> be the length of <var>S</var>.</li><li>If <var>position</var> &lt; 0 or <var>position</var> ≥ <var>size</var>, return <emu-val>NaN</emu-val>.</li><li>Return a value of Number type, whose value is the numeric value of the code unit at index <var>position</var> within the String <var>S</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <code>charCodeAt</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be a String object. Therefore it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-string.prototype.codepointat">
<h1><span class="secnum">21.1.3.3</span>String.prototype.codePointAt ( <var>pos</var> )</h1>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>Returns a nonnegative integer Number less than 0x110000 that is the code point value of the UTF-16 encoded code point (<emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_523"><a href="#sec-ecmascript-language-types-string-type">6.1.4</a></emu-xref>) starting at the string element at index <var>pos</var> within the String resulting from converting this object to a String. If there is no element at that index, the result is <emu-val>undefined</emu-val>. If a valid UTF-16 <emu-xref href="#surrogate-pair" id="_ref_524"><a href="#surrogate-pair">surrogate pair</a></emu-xref> does not begin at <var>pos</var>, the result is the code unit at <var>pos</var>.</p>
</div></emu-note>
<p>When the <code>codePointAt</code> method is called with one argument <var>pos</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="RequireObjectCoercible" id="_ref_5802"><a href="#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>S</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5803"><a href="#sec-tostring">ToString</a></emu-xref>(<var>O</var>).</li><li>Let <var>position</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_5804"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>pos</var>).</li><li>Let <var>size</var> be the length of <var>S</var>.</li><li>If <var>position</var> &lt; 0 or <var>position</var> ≥ <var>size</var>, return <emu-val>undefined</emu-val>.</li><li>Let <var>first</var> be the numeric value of the code unit at index <var>position</var> within the String <var>S</var>.</li><li>If <var>first</var> &lt; 0xD800 or <var>first</var> &gt; 0xDBFF or <var>position</var> + 1 = <var>size</var>, return <var>first</var>.</li><li>Let <var>second</var> be the numeric value of the code unit at index <var>position</var> + 1 within the String <var>S</var>.</li><li>If <var>second</var> &lt; 0xDC00 or <var>second</var> &gt; 0xDFFF, return <var>first</var>.</li><li>Return <emu-xref aoid="UTF16Decode" id="_ref_5805"><a href="#sec-utf16decode">UTF16Decode</a></emu-xref>(<var>first</var>, <var>second</var>).
</li></ol></emu-alg>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <code>codePointAt</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be a String object. Therefore it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-string.prototype.concat">
<h1><span class="secnum">21.1.3.4</span>String.prototype.concat ( ...<var>args</var> )</h1>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>When the <code>concat</code> method is called it returns the String value consisting of the code units of the <code>this</code>
object (converted to a String) followed by the code units of each of
the arguments converted to a String. The result is a String value, not a
String object.</p>
</div></emu-note>
<p>When the <code>concat</code> method is called with zero or more arguments, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="RequireObjectCoercible" id="_ref_5806"><a href="#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>S</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5807"><a href="#sec-tostring">ToString</a></emu-xref>(<var>O</var>).</li><li>Let <var>args</var> be a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5808"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> whose elements are the arguments passed to this function.</li><li>Let <var>R</var> be <var>S</var>.</li><li>Repeat, while <var>args</var> is not empty<ol><li>Remove the first element from <var>args</var> and let <var>next</var> be the value of that element.</li><li>Let <var>nextString</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5809"><a href="#sec-tostring">ToString</a></emu-xref>(<var>next</var>).</li><li>Set <var>R</var> to the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_5810"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of the previous value of <var>R</var> and <var>nextString</var>.</li></ol></li><li>Return <var>R</var>.
</li></ol></emu-alg>
<p>The <code>"length"</code> property of the <code>concat</code> method is 1.</p>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <code>concat</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be a String object. Therefore it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-string.prototype.constructor">
<h1><span class="secnum">21.1.3.5</span>String.prototype.constructor</h1>
<p>The initial value of <code>String.prototype.constructor</code> is the intrinsic object <emu-xref href="#sec-string-constructor" id="_ref_5811"><a href="#sec-string-constructor">%String%</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-string.prototype.endswith">
<h1><span class="secnum">21.1.3.6</span>String.prototype.endsWith ( <var>searchString</var> [ , <var>endPosition</var> ] )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="RequireObjectCoercible" id="_ref_5812"><a href="#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>S</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5813"><a href="#sec-tostring">ToString</a></emu-xref>(<var>O</var>).</li><li>Let <var>isRegExp</var> be ?&nbsp;<emu-xref aoid="IsRegExp" id="_ref_5814"><a href="#sec-isregexp">IsRegExp</a></emu-xref>(<var>searchString</var>).</li><li>If <var>isRegExp</var> is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>searchStr</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5815"><a href="#sec-tostring">ToString</a></emu-xref>(<var>searchString</var>).</li><li>Let <var>len</var> be the length of <var>S</var>.</li><li>If <var>endPosition</var> is <emu-val>undefined</emu-val>, let <var>pos</var> be <var>len</var>, else let <var>pos</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_5816"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>endPosition</var>).</li><li>Let <var>end</var> be <emu-xref aoid="min" id="_ref_5817"><a href="#eqn-min">min</a></emu-xref>(<emu-xref aoid="max" id="_ref_5818"><a href="#eqn-max">max</a></emu-xref>(<var>pos</var>, 0), <var>len</var>).</li><li>Let <var>searchLength</var> be the length of <var>searchStr</var>.</li><li>Let <var>start</var> be <var>end</var> - <var>searchLength</var>.</li><li>If <var>start</var> is less than 0, return <emu-val>false</emu-val>.</li><li>If the sequence of code units of <var>S</var> starting at <var>start</var> of length <var>searchLength</var> is the same as the full code unit sequence of <var>searchStr</var>, return <emu-val>true</emu-val>.</li><li>Otherwise, return <emu-val>false</emu-val>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>Returns <emu-val>true</emu-val> if the sequence of code units of <var>searchString</var> converted to a String is the same as the corresponding code units of this object (converted to a String) starting at <var>endPosition</var> - length(this). Otherwise returns <emu-val>false</emu-val>.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>Throwing an exception if the first argument is a RegExp is
specified in order to allow future editions to define extensions that
allow such argument values.</p>
</div></emu-note>
<emu-note><span class="note">Note 3</span><div class="note-contents">
<p>The <code>endsWith</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be a String object. Therefore, it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-string.prototype.includes">
<h1><span class="secnum">21.1.3.7</span>String.prototype.includes ( <var>searchString</var> [ , <var>position</var> ] )</h1>
<p>The <code>includes</code> method takes two arguments, <var>searchString</var> and <var>position</var>, and performs the following steps:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="RequireObjectCoercible" id="_ref_5819"><a href="#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>S</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5820"><a href="#sec-tostring">ToString</a></emu-xref>(<var>O</var>).</li><li>Let <var>isRegExp</var> be ?&nbsp;<emu-xref aoid="IsRegExp" id="_ref_5821"><a href="#sec-isregexp">IsRegExp</a></emu-xref>(<var>searchString</var>).</li><li>If <var>isRegExp</var> is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>searchStr</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5822"><a href="#sec-tostring">ToString</a></emu-xref>(<var>searchString</var>).</li><li>Let <var>pos</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_5823"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>position</var>).</li><li><emu-xref href="#assert" id="_ref_5824"><a href="#assert">Assert</a></emu-xref>: If <var>position</var> is <emu-val>undefined</emu-val>, then <var>pos</var> is 0.</li><li>Let <var>len</var> be the length of <var>S</var>.</li><li>Let <var>start</var> be <emu-xref aoid="min" id="_ref_5825"><a href="#eqn-min">min</a></emu-xref>(<emu-xref aoid="max" id="_ref_5826"><a href="#eqn-max">max</a></emu-xref>(<var>pos</var>, 0), <var>len</var>).</li><li>Let <var>searchLen</var> be the length of <var>searchStr</var>.</li><li>If there exists any integer <var>k</var> not smaller than <var>start</var> such that <var>k</var> + <var>searchLen</var> is not greater than <var>len</var>, and for all nonnegative integers <var>j</var> less than <var>searchLen</var>, the code unit at index <var>k</var> + <var>j</var> within <var>S</var> is the same as the code unit at index <var>j</var> within <var>searchStr</var>, return <emu-val>true</emu-val>; but if there is no such integer <var>k</var>, return <emu-val>false</emu-val>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>If <var>searchString</var> appears as a substring of the
result of converting this object to a String, at one or more indices
that are greater than or equal to <var>position</var>, return <emu-val>true</emu-val>; otherwise, returns <emu-val>false</emu-val>. If <var>position</var> is <emu-val>undefined</emu-val>, 0 is assumed, so as to search all of the String.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>Throwing an exception if the first argument is a RegExp is
specified in order to allow future editions to define extensions that
allow such argument values.</p>
</div></emu-note>
<emu-note><span class="note">Note 3</span><div class="note-contents">
<p>The <code>includes</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be a String object. Therefore, it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-string.prototype.indexof">
<h1><span class="secnum">21.1.3.8</span>String.prototype.indexOf ( <var>searchString</var> [ , <var>position</var> ] )</h1>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>If <var>searchString</var> appears as a substring of the
result of converting this object to a String, at one or more indices
that are greater than or equal to <var>position</var>, then the smallest such index is returned; otherwise, -1 is returned. If <var>position</var> is <emu-val>undefined</emu-val>, 0 is assumed, so as to search all of the String.</p>
</div></emu-note>
<p>The <code>indexOf</code> method takes two arguments, <var>searchString</var> and <var>position</var>, and performs the following steps:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="RequireObjectCoercible" id="_ref_5827"><a href="#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>S</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5828"><a href="#sec-tostring">ToString</a></emu-xref>(<var>O</var>).</li><li>Let <var>searchStr</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5829"><a href="#sec-tostring">ToString</a></emu-xref>(<var>searchString</var>).</li><li>Let <var>pos</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_5830"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>position</var>).</li><li><emu-xref href="#assert" id="_ref_5831"><a href="#assert">Assert</a></emu-xref>: If <var>position</var> is <emu-val>undefined</emu-val>, then <var>pos</var> is 0.</li><li>Let <var>len</var> be the length of <var>S</var>.</li><li>Let <var>start</var> be <emu-xref aoid="min" id="_ref_5832"><a href="#eqn-min">min</a></emu-xref>(<emu-xref aoid="max" id="_ref_5833"><a href="#eqn-max">max</a></emu-xref>(<var>pos</var>, 0), <var>len</var>).</li><li>Let <var>searchLen</var> be the length of <var>searchStr</var>.</li><li>Return the smallest possible integer <var>k</var> not smaller than <var>start</var> such that <var>k</var> + <var>searchLen</var> is not greater than <var>len</var>, and for all nonnegative integers <var>j</var> less than <var>searchLen</var>, the code unit at index <var>k</var> + <var>j</var> within <var>S</var> is the same as the code unit at index <var>j</var> within <var>searchStr</var>; but if there is no such integer <var>k</var>, return the value -1.
</li></ol></emu-alg>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <code>indexOf</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be a String object. Therefore, it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-string.prototype.lastindexof">
<h1><span class="secnum">21.1.3.9</span>String.prototype.lastIndexOf ( <var>searchString</var> [ , <var>position</var> ] )</h1>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>If <var>searchString</var> appears as a substring of the
result of converting this object to a String at one or more indices that
are smaller than or equal to <var>position</var>, then the greatest such index is returned; otherwise, -1 is returned. If <var>position</var> is <emu-val>undefined</emu-val>, the length of the String value is assumed, so as to search all of the String.</p>
</div></emu-note>
<p>The <code>lastIndexOf</code> method takes two arguments, <var>searchString</var> and <var>position</var>, and performs the following steps:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="RequireObjectCoercible" id="_ref_5834"><a href="#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>S</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5835"><a href="#sec-tostring">ToString</a></emu-xref>(<var>O</var>).</li><li>Let <var>searchStr</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5836"><a href="#sec-tostring">ToString</a></emu-xref>(<var>searchString</var>).</li><li>Let <var>numPos</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_5837"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>position</var>).</li><li><emu-xref href="#assert" id="_ref_5838"><a href="#assert">Assert</a></emu-xref>: If <var>position</var> is <emu-val>undefined</emu-val>, then <var>numPos</var> is <emu-val>NaN</emu-val>.</li><li>If <var>numPos</var> is <emu-val>NaN</emu-val>, let <var>pos</var> be <emu-val>+∞</emu-val>; otherwise, let <var>pos</var> be !&nbsp;<emu-xref aoid="ToInteger" id="_ref_5839"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>numPos</var>).</li><li>Let <var>len</var> be the length of <var>S</var>.</li><li>Let <var>start</var> be <emu-xref aoid="min" id="_ref_5840"><a href="#eqn-min">min</a></emu-xref>(<emu-xref aoid="max" id="_ref_5841"><a href="#eqn-max">max</a></emu-xref>(<var>pos</var>, 0), <var>len</var>).</li><li>Let <var>searchLen</var> be the length of <var>searchStr</var>.</li><li>Return the largest possible nonnegative integer <var>k</var> not larger than <var>start</var> such that <var>k</var> + <var>searchLen</var> is not greater than <var>len</var>, and for all nonnegative integers <var>j</var> less than <var>searchLen</var>, the code unit at index <var>k</var> + <var>j</var> within <var>S</var> is the same as the code unit at index <var>j</var> within <var>searchStr</var>; but if there is no such integer <var>k</var>, return the value -1.
</li></ol></emu-alg>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <code>lastIndexOf</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be a String object. Therefore, it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-string.prototype.localecompare">
<h1><span class="secnum">21.1.3.10</span>String.prototype.localeCompare ( <var>that</var> [ , <var>reserved1</var> [ , <var>reserved2</var> ] ] )</h1>
<p>An ECMAScript implementation that includes the ECMA-402 Internationalization API must implement the <code>localeCompare</code>
method as specified in the ECMA-402 specification. If an ECMAScript
implementation does not include the ECMA-402 API the following
specification of the <code>localeCompare</code> method is used.</p>
<p>When the <code>localeCompare</code> method is called with argument <var>that</var>, it returns a Number other than <emu-val>NaN</emu-val> that represents the result of a locale-sensitive String comparison of the <emu-val>this</emu-val> value (converted to a String) with <var>that</var> (converted to a String). The two Strings are <var>S</var> and <var>That</var>.
The two Strings are compared in an implementation-defined fashion. The
result is intended to order String values in the sort order specified by
a host default locale, and will be negative, zero, or positive,
depending on whether <var>S</var> comes before <var>That</var> in the sort order, the Strings are equal, or <var>S</var> comes after <var>That</var> in the sort order, respectively.</p>
<p>Before performing the comparisons, the following steps are performed to prepare the Strings:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="RequireObjectCoercible" id="_ref_5842"><a href="#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>S</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5843"><a href="#sec-tostring">ToString</a></emu-xref>(<var>O</var>).</li><li>Let <var>That</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5844"><a href="#sec-tostring">ToString</a></emu-xref>(<var>that</var>).
</li></ol></emu-alg>
<p>The meaning of the optional second and third parameters to
this method are defined in the ECMA-402 specification; implementations
that do not include ECMA-402 support must not assign any other
interpretation to those parameter positions.</p>
<p>The <code>localeCompare</code> method, if considered as a function of two arguments <emu-val>this</emu-val> and <var>that</var>, is a consistent comparison function (as defined in <emu-xref href="#sec-array.prototype.sort" id="_ref_525"><a href="#sec-array.prototype.sort">22.1.3.27</a></emu-xref>) on the set of all Strings.</p>
<p>The actual return values are implementation-defined to permit
implementers to encode additional information in the value, but the
function is required to define a total ordering on all Strings. This
function must treat Strings that are canonically equivalent according to
the Unicode standard as identical and must return <code>0</code> when comparing Strings that are considered canonically equivalent.</p>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>The <code>localeCompare</code> method itself is not directly suitable as an argument to <code>Array.prototype.sort</code> because the latter requires a function of two arguments.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>This function is intended to rely on whatever
language-sensitive comparison functionality is available to the
ECMAScript environment from the host environment, and to compare
according to the rules of the host environment's current locale.
However, regardless of the host provided comparison capabilities, this
function must treat Strings that are canonically equivalent according to
the Unicode standard as identical. It is recommended that this function
should not honour Unicode compatibility equivalences or decompositions.
For a definition and discussion of canonical equivalence see the
Unicode Standard, chapters 2 and 3, as well as Unicode Standard Annex
#15, Unicode Normalization Forms (<a href="https://unicode.org/reports/tr15/">https://unicode.org/reports/tr15/</a>) and Unicode Technical Note #5, Canonical Equivalence in Applications (<a href="https://unicode.org/notes/tn5/">https://www.unicode.org/notes/tn5/</a>). Also see Unicode Technical Standard #10, Unicode Collation Algorithm (<a href="https://unicode.org/reports/tr10/">https://unicode.org/reports/tr10/</a>).</p>
</div></emu-note>
<emu-note><span class="note">Note 3</span><div class="note-contents">
<p>The <code>localeCompare</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be a String object. Therefore, it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-string.prototype.match">
<h1><span class="secnum">21.1.3.11</span>String.prototype.match ( <var>regexp</var> )</h1>
<p>When the <code>match</code> method is called with argument <var>regexp</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="RequireObjectCoercible" id="_ref_5845"><a href="#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>If <var>regexp</var> is neither <emu-val>undefined</emu-val> nor <emu-val>null</emu-val>, then<ol><li>Let <var>matcher</var> be ?&nbsp;<emu-xref aoid="GetMethod" id="_ref_5846"><a href="#sec-getmethod">GetMethod</a></emu-xref>(<var>regexp</var>, @@match).</li><li>If <var>matcher</var> is not <emu-val>undefined</emu-val>, then<ol><li>Return ?&nbsp;<emu-xref aoid="Call" id="_ref_5847"><a href="#sec-call">Call</a></emu-xref>(<var>matcher</var>, <var>regexp</var>, « <var>O</var> »).</li></ol></li></ol></li><li>Let <var>S</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5848"><a href="#sec-tostring">ToString</a></emu-xref>(<var>O</var>).</li><li>Let <var>rx</var> be ?&nbsp;<emu-xref aoid="RegExpCreate" id="_ref_5849"><a href="#sec-regexpcreate">RegExpCreate</a></emu-xref>(<var>regexp</var>, <emu-val>undefined</emu-val>).</li><li>Return ?&nbsp;<emu-xref aoid="Invoke" id="_ref_5850"><a href="#sec-invoke">Invoke</a></emu-xref>(<var>rx</var>, @@match, « <var>S</var> »).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <code>match</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be a String object. Therefore, it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-string.prototype.normalize">
<h1><span class="secnum">21.1.3.12</span>String.prototype.normalize ( [ <var>form</var> ] )</h1>
<p>When the <code>normalize</code> method is called with one argument <var>form</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="RequireObjectCoercible" id="_ref_5851"><a href="#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>S</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5852"><a href="#sec-tostring">ToString</a></emu-xref>(<var>O</var>).</li><li>If <var>form</var> is not present or <var>form</var> is <emu-val>undefined</emu-val>, set <var>form</var> to <code>"NFC"</code>.</li><li>Let <var>f</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5853"><a href="#sec-tostring">ToString</a></emu-xref>(<var>form</var>).</li><li>If <var>f</var> is not one of <code>"NFC"</code>, <code>"NFD"</code>, <code>"NFKC"</code>, or <code>"NFKD"</code>, throw a <emu-val>RangeError</emu-val> exception.</li><li>Let <var>ns</var> be the String value that is the result of normalizing <var>S</var> into the normalization form named by <var>f</var> as specified in <a href="https://unicode.org/reports/tr15/">https://unicode.org/reports/tr15/</a>.</li><li>Return <var>ns</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <code>normalize</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be a String object. Therefore it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-string.prototype.padend">
<h1><span class="secnum">21.1.3.13</span>String.prototype.padEnd ( <var>maxLength</var> [ , <var>fillString</var> ] )</h1>
<p>When the <code>padEnd</code> method is called, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="RequireObjectCoercible" id="_ref_5854"><a href="#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>S</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5855"><a href="#sec-tostring">ToString</a></emu-xref>(<var>O</var>).</li><li>Let <var>intMaxLength</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_5856"><a href="#sec-tolength">ToLength</a></emu-xref>(<var>maxLength</var>).</li><li>Let <var>stringLength</var> be the length of <var>S</var>.</li><li>If <var>intMaxLength</var> is not greater than <var>stringLength</var>, return <var>S</var>.</li><li>If <var>fillString</var> is <emu-val>undefined</emu-val>, let <var>filler</var> be the String value consisting solely of the code unit 0x0020 (SPACE).</li><li>Else, let <var>filler</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5857"><a href="#sec-tostring">ToString</a></emu-xref>(<var>fillString</var>).</li><li>If <var>filler</var> is the empty String, return <var>S</var>.</li><li>Let <var>fillLen</var> be <var>intMaxLength</var> - <var>stringLength</var>.</li><li>Let <var>truncatedStringFiller</var> be the String value consisting of repeated concatenations of <var>filler</var> truncated to length <var>fillLen</var>.</li><li>Return the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_5858"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>S</var> and <var>truncatedStringFiller</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>The first argument <var>maxLength</var> will be clamped such that it can be no smaller than the length of the <emu-val>this</emu-val> value.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The optional second argument <var>fillString</var> defaults to <emu-val>" "</emu-val> (the String value consisting of the code unit 0x0020 SPACE).</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-string.prototype.padstart">
<h1><span class="secnum">21.1.3.14</span>String.prototype.padStart ( <var>maxLength</var> [ , <var>fillString</var> ] )</h1>
<p>When the <code>padStart</code> method is called, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="RequireObjectCoercible" id="_ref_5859"><a href="#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>S</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5860"><a href="#sec-tostring">ToString</a></emu-xref>(<var>O</var>).</li><li>Let <var>intMaxLength</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_5861"><a href="#sec-tolength">ToLength</a></emu-xref>(<var>maxLength</var>).</li><li>Let <var>stringLength</var> be the length of <var>S</var>.</li><li>If <var>intMaxLength</var> is not greater than <var>stringLength</var>, return <var>S</var>.</li><li>If <var>fillString</var> is <emu-val>undefined</emu-val>, let <var>filler</var> be the String value consisting solely of the code unit 0x0020 (SPACE).</li><li>Else, let <var>filler</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5862"><a href="#sec-tostring">ToString</a></emu-xref>(<var>fillString</var>).</li><li>If <var>filler</var> is the empty String, return <var>S</var>.</li><li>Let <var>fillLen</var> be <var>intMaxLength</var> - <var>stringLength</var>.</li><li>Let <var>truncatedStringFiller</var> be the String value consisting of repeated concatenations of <var>filler</var> truncated to length <var>fillLen</var>.</li><li>Return the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_5863"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>truncatedStringFiller</var> and <var>S</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>The first argument <var>maxLength</var> will be clamped such that it can be no smaller than the length of the <emu-val>this</emu-val> value.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The optional second argument <var>fillString</var> defaults to <emu-val>" "</emu-val> (the String value consisting of the code unit 0x0020 SPACE).</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-string.prototype.repeat">
<h1><span class="secnum">21.1.3.15</span>String.prototype.repeat ( <var>count</var> )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="RequireObjectCoercible" id="_ref_5864"><a href="#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>S</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5865"><a href="#sec-tostring">ToString</a></emu-xref>(<var>O</var>).</li><li>Let <var>n</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_5866"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>count</var>).</li><li>If <var>n</var> &lt; 0, throw a <emu-val>RangeError</emu-val> exception.</li><li>If <var>n</var> is <emu-val>+∞</emu-val>, throw a <emu-val>RangeError</emu-val> exception.</li><li>If <var>n</var> is 0, return the empty String.</li><li>Return the String value that is made from <var>n</var> copies of <var>S</var> appended together.
</li></ol></emu-alg>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>This method creates the String value consisting of the code units of the <code>this</code> object (converted to String) repeated <var>count</var> times.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <code>repeat</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be a String object. Therefore, it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-string.prototype.replace">
<h1><span class="secnum">21.1.3.16</span>String.prototype.replace ( <var>searchValue</var>, <var>replaceValue</var> )</h1>
<p>When the <code>replace</code> method is called with arguments <var>searchValue</var> and <var>replaceValue</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="RequireObjectCoercible" id="_ref_5867"><a href="#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>If <var>searchValue</var> is neither <emu-val>undefined</emu-val> nor <emu-val>null</emu-val>, then<ol><li>Let <var>replacer</var> be ?&nbsp;<emu-xref aoid="GetMethod" id="_ref_5868"><a href="#sec-getmethod">GetMethod</a></emu-xref>(<var>searchValue</var>, @@replace).</li><li>If <var>replacer</var> is not <emu-val>undefined</emu-val>, then<ol><li>Return ?&nbsp;<emu-xref aoid="Call" id="_ref_5869"><a href="#sec-call">Call</a></emu-xref>(<var>replacer</var>, <var>searchValue</var>, « <var>O</var>, <var>replaceValue</var> »).</li></ol></li></ol></li><li>Let <var>string</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5870"><a href="#sec-tostring">ToString</a></emu-xref>(<var>O</var>).</li><li>Let <var>searchString</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5871"><a href="#sec-tostring">ToString</a></emu-xref>(<var>searchValue</var>).</li><li>Let <var>functionalReplace</var> be <emu-xref aoid="IsCallable" id="_ref_5872"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>replaceValue</var>).</li><li>If <var>functionalReplace</var> is <emu-val>false</emu-val>, then<ol><li>Set <var>replaceValue</var> to ?&nbsp;<emu-xref aoid="ToString" id="_ref_5873"><a href="#sec-tostring">ToString</a></emu-xref>(<var>replaceValue</var>).</li></ol></li><li>Search <var>string</var> for the first occurrence of <var>searchString</var> and let <var>pos</var> be the index within <var>string</var> of the first code unit of the matched substring and let <var>matched</var> be <var>searchString</var>. If no occurrences of <var>searchString</var> were found, return <var>string</var>.</li><li>If <var>functionalReplace</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>replValue</var> be ?&nbsp;<emu-xref aoid="Call" id="_ref_5874"><a href="#sec-call">Call</a></emu-xref>(<var>replaceValue</var>, <emu-val>undefined</emu-val>, « <var>matched</var>, <var>pos</var>, <var>string</var> »).</li><li>Let <var>replStr</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5875"><a href="#sec-tostring">ToString</a></emu-xref>(<var>replValue</var>).</li></ol></li><li>Else,<ol><li>Let <var>captures</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5876"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>replStr</var> be <emu-xref aoid="GetSubstitution" id="_ref_5877"><a href="#sec-getsubstitution">GetSubstitution</a></emu-xref>(<var>matched</var>, <var>string</var>, <var>pos</var>, <var>captures</var>, <emu-val>undefined</emu-val>, <var>replaceValue</var>).</li></ol></li><li>Let <var>tailPos</var> be <var>pos</var> + the number of code units in <var>matched</var>.</li><li>Let <var>newString</var> be the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_5878"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of the first <var>pos</var> code units of <var>string</var>, <var>replStr</var>, and the trailing substring of <var>string</var> starting at index <var>tailPos</var>. If <var>pos</var> is 0, the first element of the concatenation will be the empty String.</li><li>Return <var>newString</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <code>replace</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be a String object. Therefore, it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
<emu-clause id="sec-getsubstitution" aoid="GetSubstitution">
<h1><span class="secnum">21.1.3.16.1</span>Runtime Semantics: GetSubstitution ( <var>matched</var>, <var>str</var>, <var>position</var>, <var>captures</var>, <var>namedCaptures</var>, <var>replacement</var> )</h1>
<p>The abstract operation GetSubstitution performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_5879"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_5880"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>matched</var>) is String.</li><li>Let <var>matchLength</var> be the number of code units in <var>matched</var>.</li><li><emu-xref href="#assert" id="_ref_5881"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_5882"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>str</var>) is String.</li><li>Let <var>stringLength</var> be the number of code units in <var>str</var>.</li><li><emu-xref href="#assert" id="_ref_5883"><a href="#assert">Assert</a></emu-xref>: <var>position</var> is a nonnegative integer.</li><li><emu-xref href="#assert" id="_ref_5884"><a href="#assert">Assert</a></emu-xref>: <var>position</var> ≤ <var>stringLength</var>.</li><li><emu-xref href="#assert" id="_ref_5885"><a href="#assert">Assert</a></emu-xref>: <var>captures</var> is a possibly empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5886"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of Strings.</li><li><emu-xref href="#assert" id="_ref_5887"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_5888"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>replacement</var>) is String.</li><li>Let <var>tailPos</var> be <var>position</var> + <var>matchLength</var>.</li><li>Let <var>m</var> be the number of elements in <var>captures</var>.</li><li>If <var>namedCaptures</var> is not <emu-val>undefined</emu-val>, then<ol><li>Set <var>namedCaptures</var> to ?&nbsp;<emu-xref aoid="ToObject" id="_ref_5889"><a href="#sec-toobject">ToObject</a></emu-xref>(<var>namedCaptures</var>).</li></ol></li><li>Let <var>result</var> be the String value derived from <var>replacement</var> by copying code unit elements from <var>replacement</var> to <var>result</var> while performing replacements as specified in <emu-xref href="#table-45" id="_ref_526"><a href="#table-45">Table 51</a></emu-xref>. These <code>$</code>
replacements are done left-to-right, and, once such a replacement is
performed, the new replacement text is not subject to further
replacements.</li><li>Return <var>result</var>.
</li></ol></emu-alg>
<emu-table id="table-45" caption="Replacement Text Symbol Substitutions"><figure><figcaption>Table 51: Replacement Text Symbol Substitutions</figcaption>
<table>
<tbody>
<tr>
<th>
Code units
</th>
<th>
Unicode Characters
</th>
<th>
Replacement text
</th>
</tr>
<tr>
<td>
0x0024, 0x0024
</td>
<td>
<code>$$</code>
</td>
<td>
<code>$</code>
</td>
</tr>
<tr>
<td>
0x0024, 0x0026
</td>
<td>
<code>$&amp;</code>
</td>
<td>
<var>matched</var>
</td>
</tr>
<tr>
<td>
0x0024, 0x0060
</td>
<td>
<code>$`</code>
</td>
<td>
If <var>position</var> is 0, the replacement is the empty String. Otherwise the replacement is the substring of <var>str</var> that starts at index 0 and whose last code unit is at index <var>position</var> - 1.
</td>
</tr>
<tr>
<td>
0x0024, 0x0027
</td>
<td>
<code>$'</code>
</td>
<td>
If <var>tailPos</var> ≥ <var>stringLength</var>, the replacement is the empty String. Otherwise the replacement is the substring of <var>str</var> that starts at index <var>tailPos</var> and continues to the end of <var>str</var>.
</td>
</tr>
<tr>
<td>
0x0024, N
<br>
Where
<br>
0x0031 ≤ N ≤ 0x0039
</td>
<td>
<code>$n</code> where
<br>
<code>n</code> is one of <code>1 2 3 4 5 6 7 8 9</code> and <code>$n</code> is not followed by a decimal digit
</td>
<td>
The <var>n</var><sup>th</sup> element of <var>captures</var>, where <var>n</var> is a single digit in the range 1 to 9. If <var>n</var> ≤ <var>m</var> and the <var>n</var><sup>th</sup> element of <var>captures</var> is <emu-val>undefined</emu-val>, use the empty String instead. If <var>n</var> &gt; <var>m</var>, no replacement is done.
</td>
</tr>
<tr>
<td>
0x0024, N, N
<br>
Where
<br>
0x0030 ≤ N ≤ 0x0039
</td>
<td>
<code>$nn</code> where
<br>
<code>n</code> is one of <code>0 1 2 3 4 5 6 7 8 9</code>
</td>
<td>
The <var>nn</var><sup>th</sup> element of <var>captures</var>, where <var>nn</var> is a two-digit decimal number in the range 01 to 99. If <var>nn</var> ≤ <var>m</var> and the <var>nn</var><sup>th</sup> element of <var>captures</var> is <emu-val>undefined</emu-val>, use the empty String instead. If <var>nn</var> is 00 or <var>nn</var> &gt; <var>m</var>, no replacement is done.
</td>
</tr>
<tr>
<td>
0x0024, 0x003C
</td>
<td>
<code>$&lt;</code>
</td>
<td>
<emu-alg><ol><li>If <var>namedCaptures</var> is <emu-val>undefined</emu-val>, the replacement text is the String <code>"$&lt;"</code>.</li><li>Else,<ol><li>Scan until the next <code>&gt;</code> U+003E (GREATER-THAN SIGN).</li><li>If none is found, the replacement text is the String <code>"$&lt;"</code>.</li><li>Else,<ol><li>Let <var>groupName</var> be the enclosed substring.</li><li>Let <var>capture</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_5890"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>namedCaptures</var>, <var>groupName</var>).</li><li>If <var>capture</var> is <emu-val>undefined</emu-val>, replace the text through <code>&gt;</code> with the empty string.</li><li>Otherwise, replace the text through <code>&gt;</code> with ?&nbsp;<emu-xref aoid="ToString" id="_ref_5891"><a href="#sec-tostring">ToString</a></emu-xref>(<var>capture</var>).
</li></ol></li></ol></li></ol></emu-alg>
</td>
</tr>
<tr>
<td>
0x0024
</td>
<td>
<code>$</code> in any context that does not match any of the above.
</td>
<td>
<code>$</code>
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
</emu-clause>
</emu-clause>
<emu-clause id="sec-string.prototype.search">
<h1><span class="secnum">21.1.3.17</span>String.prototype.search ( <var>regexp</var> )</h1>
<p>When the <code>search</code> method is called with argument <var>regexp</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="RequireObjectCoercible" id="_ref_5892"><a href="#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>If <var>regexp</var> is neither <emu-val>undefined</emu-val> nor <emu-val>null</emu-val>, then<ol><li>Let <var>searcher</var> be ?&nbsp;<emu-xref aoid="GetMethod" id="_ref_5893"><a href="#sec-getmethod">GetMethod</a></emu-xref>(<var>regexp</var>, @@search).</li><li>If <var>searcher</var> is not <emu-val>undefined</emu-val>, then<ol><li>Return ?&nbsp;<emu-xref aoid="Call" id="_ref_5894"><a href="#sec-call">Call</a></emu-xref>(<var>searcher</var>, <var>regexp</var>, « <var>O</var> »).</li></ol></li></ol></li><li>Let <var>string</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5895"><a href="#sec-tostring">ToString</a></emu-xref>(<var>O</var>).</li><li>Let <var>rx</var> be ?&nbsp;<emu-xref aoid="RegExpCreate" id="_ref_5896"><a href="#sec-regexpcreate">RegExpCreate</a></emu-xref>(<var>regexp</var>, <emu-val>undefined</emu-val>).</li><li>Return ?&nbsp;<emu-xref aoid="Invoke" id="_ref_5897"><a href="#sec-invoke">Invoke</a></emu-xref>(<var>rx</var>, @@search, « <var>string</var> »).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <code>search</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be a String object. Therefore, it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-string.prototype.slice">
<h1><span class="secnum">21.1.3.18</span>String.prototype.slice ( <var>start</var>, <var>end</var> )</h1>
<p>The <code>slice</code> method takes two arguments, <var>start</var> and <var>end</var>, and returns a substring of the result of converting this object to a String, starting from index <var>start</var> and running to, but not including, index <var>end</var> (or through the end of the String if <var>end</var> is <emu-val>undefined</emu-val>). If <var>start</var> is negative, it is treated as <emu-eqn class="inline"><var>sourceLength</var> + <var>start</var></emu-eqn> where <var>sourceLength</var> is the length of the String. If <var>end</var> is negative, it is treated as <emu-eqn class="inline"><var>sourceLength</var> + <var>end</var></emu-eqn> where <var>sourceLength</var> is the length of the String. The result is a String value, not a String object. The following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="RequireObjectCoercible" id="_ref_5898"><a href="#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>S</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5899"><a href="#sec-tostring">ToString</a></emu-xref>(<var>O</var>).</li><li>Let <var>len</var> be the length of <var>S</var>.</li><li>Let <var>intStart</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_5900"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>start</var>).</li><li>If <var>end</var> is <emu-val>undefined</emu-val>, let <var>intEnd</var> be <var>len</var>; else let <var>intEnd</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_5901"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>end</var>).</li><li>If <var>intStart</var> &lt; 0, let <var>from</var> be <emu-xref aoid="max" id="_ref_5902"><a href="#eqn-max">max</a></emu-xref>(<var>len</var> + <var>intStart</var>, 0); otherwise let <var>from</var> be <emu-xref aoid="min" id="_ref_5903"><a href="#eqn-min">min</a></emu-xref>(<var>intStart</var>, <var>len</var>).</li><li>If <var>intEnd</var> &lt; 0, let <var>to</var> be <emu-xref aoid="max" id="_ref_5904"><a href="#eqn-max">max</a></emu-xref>(<var>len</var> + <var>intEnd</var>, 0); otherwise let <var>to</var> be <emu-xref aoid="min" id="_ref_5905"><a href="#eqn-min">min</a></emu-xref>(<var>intEnd</var>, <var>len</var>).</li><li>Let <var>span</var> be <emu-xref aoid="max" id="_ref_5906"><a href="#eqn-max">max</a></emu-xref>(<var>to</var> - <var>from</var>, 0).</li><li>Return the String value containing <var>span</var> consecutive code units from <var>S</var> beginning with the code unit at index <var>from</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <code>slice</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be a String object. Therefore it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-string.prototype.split">
<h1><span class="secnum">21.1.3.19</span>String.prototype.split ( <var>separator</var>, <var>limit</var> )</h1>
<p>Returns an Array object into which substrings of the result
of converting this object to a String have been stored. The substrings
are determined by searching from left to right for occurrences of <var>separator</var>; these occurrences are not part of any substring in the returned array, but serve to divide up the String value. The value of <var>separator</var> may be a String of any length or it may be an object, such as a RegExp, that has a @@split method.</p>
<p>When the <code>split</code> method is called, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="RequireObjectCoercible" id="_ref_5907"><a href="#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>If <var>separator</var> is neither <emu-val>undefined</emu-val> nor <emu-val>null</emu-val>, then<ol><li>Let <var>splitter</var> be ?&nbsp;<emu-xref aoid="GetMethod" id="_ref_5908"><a href="#sec-getmethod">GetMethod</a></emu-xref>(<var>separator</var>, @@split).</li><li>If <var>splitter</var> is not <emu-val>undefined</emu-val>, then<ol><li>Return ?&nbsp;<emu-xref aoid="Call" id="_ref_5909"><a href="#sec-call">Call</a></emu-xref>(<var>splitter</var>, <var>separator</var>, « <var>O</var>, <var>limit</var> »).</li></ol></li></ol></li><li>Let <var>S</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5910"><a href="#sec-tostring">ToString</a></emu-xref>(<var>O</var>).</li><li>Let <var>A</var> be !&nbsp;<emu-xref aoid="ArrayCreate" id="_ref_5911"><a href="#sec-arraycreate">ArrayCreate</a></emu-xref>(0).</li><li>Let <var>lengthA</var> be 0.</li><li>If <var>limit</var> is <emu-val>undefined</emu-val>, let <var>lim</var> be 2<sup>32</sup> - 1; else let <var>lim</var> be ?&nbsp;<emu-xref aoid="ToUint32" id="_ref_5912"><a href="#sec-touint32">ToUint32</a></emu-xref>(<var>limit</var>).</li><li>Let <var>s</var> be the length of <var>S</var>.</li><li>Let <var>p</var> be 0.</li><li>Let <var>R</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5913"><a href="#sec-tostring">ToString</a></emu-xref>(<var>separator</var>).</li><li>If <var>lim</var> = 0, return <var>A</var>.</li><li>If <var>separator</var> is <emu-val>undefined</emu-val>, then<ol><li>Perform !&nbsp;<emu-xref aoid="CreateDataProperty" id="_ref_5914"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>A</var>, <code>"0"</code>, <var>S</var>).</li><li>Return <var>A</var>.</li></ol></li><li>If <var>s</var> = 0, then<ol><li>Let <var>z</var> be <emu-xref aoid="SplitMatch" id="_ref_5915"><a href="#sec-splitmatch">SplitMatch</a></emu-xref>(<var>S</var>, 0, <var>R</var>).</li><li>If <var>z</var> is not <emu-val>false</emu-val>, return <var>A</var>.</li><li>Perform !&nbsp;<emu-xref aoid="CreateDataProperty" id="_ref_5916"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>A</var>, <code>"0"</code>, <var>S</var>).</li><li>Return <var>A</var>.</li></ol></li><li>Let <var>q</var> be <var>p</var>.</li><li>Repeat, while <var>q</var> ≠ <var>s</var><ol><li>Let <var>e</var> be <emu-xref aoid="SplitMatch" id="_ref_5917"><a href="#sec-splitmatch">SplitMatch</a></emu-xref>(<var>S</var>, <var>q</var>, <var>R</var>).</li><li>If <var>e</var> is <emu-val>false</emu-val>, increase <var>q</var> by 1.</li><li>Else <var>e</var> is an <emu-xref href="#integer-index" id="_ref_5918"><a href="#integer-index">integer index</a></emu-xref> ≤ <var>s</var>,<ol><li>If <var>e</var> = <var>p</var>, increase <var>q</var> by 1.</li><li>Else <var>e</var> ≠ <var>p</var>,<ol><li>Let <var>T</var> be the String value equal to the substring of <var>S</var> consisting of the code units at indices <var>p</var> (inclusive) through <var>q</var> (exclusive).</li><li>Perform !&nbsp;<emu-xref aoid="CreateDataProperty" id="_ref_5919"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>A</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_5920"><a href="#sec-tostring">ToString</a></emu-xref>(<var>lengthA</var>), <var>T</var>).</li><li>Increment <var>lengthA</var> by 1.</li><li>If <var>lengthA</var> = <var>lim</var>, return <var>A</var>.</li><li>Set <var>p</var> to <var>e</var>.</li><li>Set <var>q</var> to <var>p</var>.</li></ol></li></ol></li></ol></li><li>Let <var>T</var> be the String value equal to the substring of <var>S</var> consisting of the code units at indices <var>p</var> (inclusive) through <var>s</var> (exclusive).</li><li>Perform !&nbsp;<emu-xref aoid="CreateDataProperty" id="_ref_5921"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>A</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_5922"><a href="#sec-tostring">ToString</a></emu-xref>(<var>lengthA</var>), <var>T</var>).</li><li>Return <var>A</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>The value of <var>separator</var> may be an empty String. In this case, <var>separator</var>
does not match the empty substring at the beginning or end of the input
String, nor does it match the empty substring at the end of the
previous separator match. If <var>separator</var> is the empty String,
the String is split up into individual code unit elements; the length of
the result array equals the length of the String, and each substring
contains one code unit.</p>
<p>If the <emu-val>this</emu-val> object is (or converts to) the empty String, the result depends on whether <var>separator</var>
can match the empty String. If it can, the result array contains no
elements. Otherwise, the result array contains one element, which is the
empty String.</p>
<p>If <var>separator</var> is <emu-val>undefined</emu-val>, then the result array contains just one String, which is the <emu-val>this</emu-val> value (converted to a String). If <var>limit</var> is not <emu-val>undefined</emu-val>, then the output array is truncated so that it contains no more than <var>limit</var> elements.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <code>split</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be a String object. Therefore, it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
<emu-clause id="sec-splitmatch" aoid="SplitMatch">
<h1><span class="secnum">21.1.3.19.1</span>Runtime Semantics: SplitMatch ( <var>S</var>, <var>q</var>, <var>R</var> )</h1>
<p>The abstract operation SplitMatch takes three parameters, a String <var>S</var>, an integer <var>q</var>, and a String <var>R</var>, and performs the following steps in order to return either <emu-val>false</emu-val> or the end index of a match:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_5923"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_5924"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>R</var>) is String.</li><li>Let <var>r</var> be the number of code units in <var>R</var>.</li><li>Let <var>s</var> be the number of code units in <var>S</var>.</li><li>If <var>q</var> + <var>r</var> &gt; <var>s</var>, return <emu-val>false</emu-val>.</li><li>If there exists an integer <var>i</var> between 0 (inclusive) and <var>r</var> (exclusive) such that the code unit at index <var>q</var> + <var>i</var> within <var>S</var> is different from the code unit at index <var>i</var> within <var>R</var>, return <emu-val>false</emu-val>.</li><li>Return <var>q</var> + <var>r</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-string.prototype.startswith">
<h1><span class="secnum">21.1.3.20</span>String.prototype.startsWith ( <var>searchString</var> [ , <var>position</var> ] )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="RequireObjectCoercible" id="_ref_5925"><a href="#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>S</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5926"><a href="#sec-tostring">ToString</a></emu-xref>(<var>O</var>).</li><li>Let <var>isRegExp</var> be ?&nbsp;<emu-xref aoid="IsRegExp" id="_ref_5927"><a href="#sec-isregexp">IsRegExp</a></emu-xref>(<var>searchString</var>).</li><li>If <var>isRegExp</var> is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>searchStr</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5928"><a href="#sec-tostring">ToString</a></emu-xref>(<var>searchString</var>).</li><li>Let <var>pos</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_5929"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>position</var>).</li><li><emu-xref href="#assert" id="_ref_5930"><a href="#assert">Assert</a></emu-xref>: If <var>position</var> is <emu-val>undefined</emu-val>, then <var>pos</var> is 0.</li><li>Let <var>len</var> be the length of <var>S</var>.</li><li>Let <var>start</var> be <emu-xref aoid="min" id="_ref_5931"><a href="#eqn-min">min</a></emu-xref>(<emu-xref aoid="max" id="_ref_5932"><a href="#eqn-max">max</a></emu-xref>(<var>pos</var>, 0), <var>len</var>).</li><li>Let <var>searchLength</var> be the length of <var>searchStr</var>.</li><li>If <var>searchLength</var> + <var>start</var> is greater than <var>len</var>, return <emu-val>false</emu-val>.</li><li>If the sequence of code units of <var>S</var> starting at <var>start</var> of length <var>searchLength</var> is the same as the full code unit sequence of <var>searchStr</var>, return <emu-val>true</emu-val>.</li><li>Otherwise, return <emu-val>false</emu-val>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>This method returns <emu-val>true</emu-val> if the sequence of code units of <var>searchString</var> converted to a String is the same as the corresponding code units of this object (converted to a String) starting at index <var>position</var>. Otherwise returns <emu-val>false</emu-val>.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>Throwing an exception if the first argument is a RegExp is
specified in order to allow future editions to define extensions that
allow such argument values.</p>
</div></emu-note>
<emu-note><span class="note">Note 3</span><div class="note-contents">
<p>The <code>startsWith</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be a String object. Therefore, it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-string.prototype.substring">
<h1><span class="secnum">21.1.3.21</span>String.prototype.substring ( <var>start</var>, <var>end</var> )</h1>
<p>The <code>substring</code> method takes two arguments, <var>start</var> and <var>end</var>, and returns a substring of the result of converting this object to a String, starting from index <var>start</var> and running to, but not including, index <var>end</var> of the String (or through the end of the String if <var>end</var> is <emu-val>undefined</emu-val>). The result is a String value, not a String object.</p>
<p>If either argument is <emu-val>NaN</emu-val> or negative, it
is replaced with zero; if either argument is larger than the length of
the String, it is replaced with the length of the String.</p>
<p>If <var>start</var> is larger than <var>end</var>, they are swapped.</p>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="RequireObjectCoercible" id="_ref_5933"><a href="#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>S</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5934"><a href="#sec-tostring">ToString</a></emu-xref>(<var>O</var>).</li><li>Let <var>len</var> be the length of <var>S</var>.</li><li>Let <var>intStart</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_5935"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>start</var>).</li><li>If <var>end</var> is <emu-val>undefined</emu-val>, let <var>intEnd</var> be <var>len</var>; else let <var>intEnd</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_5936"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>end</var>).</li><li>Let <var>finalStart</var> be <emu-xref aoid="min" id="_ref_5937"><a href="#eqn-min">min</a></emu-xref>(<emu-xref aoid="max" id="_ref_5938"><a href="#eqn-max">max</a></emu-xref>(<var>intStart</var>, 0), <var>len</var>).</li><li>Let <var>finalEnd</var> be <emu-xref aoid="min" id="_ref_5939"><a href="#eqn-min">min</a></emu-xref>(<emu-xref aoid="max" id="_ref_5940"><a href="#eqn-max">max</a></emu-xref>(<var>intEnd</var>, 0), <var>len</var>).</li><li>Let <var>from</var> be <emu-xref aoid="min" id="_ref_5941"><a href="#eqn-min">min</a></emu-xref>(<var>finalStart</var>, <var>finalEnd</var>).</li><li>Let <var>to</var> be <emu-xref aoid="max" id="_ref_5942"><a href="#eqn-max">max</a></emu-xref>(<var>finalStart</var>, <var>finalEnd</var>).</li><li>Return the String value whose length is <var>to</var> - <var>from</var>, containing code units from <var>S</var>, namely the code units with indices <var>from</var> through <var>to</var> - 1, in ascending order.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <code>substring</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be a String object. Therefore, it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-string.prototype.tolocalelowercase">
<h1><span class="secnum">21.1.3.22</span>String.prototype.toLocaleLowerCase ( [ <var>reserved1</var> [ , <var>reserved2</var> ] ] )</h1>
<p>An ECMAScript implementation that includes the ECMA-402 Internationalization API must implement the <code>toLocaleLowerCase</code>
method as specified in the ECMA-402 specification. If an ECMAScript
implementation does not include the ECMA-402 API the following
specification of the <code>toLocaleLowerCase</code> method is used.</p>
<p>This function interprets a String value as a sequence of UTF-16 encoded code points, as described in <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_527"><a href="#sec-ecmascript-language-types-string-type">6.1.4</a></emu-xref>.</p>
<p>This function works exactly the same as <code>toLowerCase</code>
except that its result is intended to yield the correct result for the
host environment's current locale, rather than a locale-independent
result. There will only be a difference in the few cases (such as
Turkish) where the rules for that language conflict with the regular
Unicode case mappings.</p>
<p>The meaning of the optional parameters to this method are
defined in the ECMA-402 specification; implementations that do not
include ECMA-402 support must not use those parameter positions for
anything else.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <code>toLocaleLowerCase</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be a String object. Therefore, it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-string.prototype.tolocaleuppercase">
<h1><span class="secnum">21.1.3.23</span>String.prototype.toLocaleUpperCase ( [ <var>reserved1</var> [ , <var>reserved2</var> ] ] )</h1>
<p>An ECMAScript implementation that includes the ECMA-402 Internationalization API must implement the <code>toLocaleUpperCase</code>
method as specified in the ECMA-402 specification. If an ECMAScript
implementation does not include the ECMA-402 API the following
specification of the <code>toLocaleUpperCase</code> method is used.</p>
<p>This function interprets a String value as a sequence of UTF-16 encoded code points, as described in <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_528"><a href="#sec-ecmascript-language-types-string-type">6.1.4</a></emu-xref>.</p>
<p>This function works exactly the same as <code>toUpperCase</code>
except that its result is intended to yield the correct result for the
host environment's current locale, rather than a locale-independent
result. There will only be a difference in the few cases (such as
Turkish) where the rules for that language conflict with the regular
Unicode case mappings.</p>
<p>The meaning of the optional parameters to this method are
defined in the ECMA-402 specification; implementations that do not
include ECMA-402 support must not use those parameter positions for
anything else.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <code>toLocaleUpperCase</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be a String object. Therefore, it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-string.prototype.tolowercase">
<h1><span class="secnum">21.1.3.24</span>String.prototype.toLowerCase ( )</h1>
<p>This function interprets a String value as a sequence of UTF-16 encoded code points, as described in <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_529"><a href="#sec-ecmascript-language-types-string-type">6.1.4</a></emu-xref>. The following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="RequireObjectCoercible" id="_ref_5943"><a href="#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>S</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5944"><a href="#sec-tostring">ToString</a></emu-xref>(<var>O</var>).</li><li>Let <var>cpList</var> be a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5945"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing in order the code points as defined in <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_530"><a href="#sec-ecmascript-language-types-string-type">6.1.4</a></emu-xref> of <var>S</var>, starting at the first element of <var>S</var>.</li><li>Let <var>cuList</var> be a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5946"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> where the elements are the result of toLowercase(<var>cpList</var>), according to the Unicode Default Case Conversion algorithm.</li><li>Let <var>L</var> be the String value whose code units are the <emu-xref aoid="UTF16Encoding" id="_ref_5947"><a href="#sec-utf16encoding">UTF16Encoding</a></emu-xref> of the code points of <var>cuList</var>.</li><li>Return <var>L</var>.
</li></ol></emu-alg>
<p>The result must be derived according to the
locale-insensitive case mappings in the Unicode Character Database (this
explicitly includes not only the UnicodeData.txt file, but also all
locale-insensitive mappings in the SpecialCasings.txt file that
accompanies it).</p>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>The case mapping of some code points may produce multiple
code points. In this case the result String may not be the same length
as the source String. Because both <code>toUpperCase</code> and <code>toLowerCase</code> have context-sensitive behaviour, the functions are not symmetrical. In other words, <code>s.toUpperCase().toLowerCase()</code> is not necessarily equal to <code>s.toLowerCase()</code>.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <code>toLowerCase</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be a String object. Therefore, it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-string.prototype.tostring">
<h1><span class="secnum">21.1.3.25</span>String.prototype.toString ( )</h1>
<p>When the <code>toString</code> method is called, the following steps are taken:</p>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref href="#sec-thisstringvalue" id="_ref_5948"><a href="#sec-thisstringvalue">thisStringValue</a></emu-xref>(<emu-val>this</emu-val> value).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>For a String object, the <code>toString</code> method happens to return the same thing as the <code>valueOf</code> method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-string.prototype.touppercase">
<h1><span class="secnum">21.1.3.26</span>String.prototype.toUpperCase ( )</h1>
<p>This function interprets a String value as a sequence of UTF-16 encoded code points, as described in <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_531"><a href="#sec-ecmascript-language-types-string-type">6.1.4</a></emu-xref>.</p>
<p>This function behaves in exactly the same way as <code>String.prototype.toLowerCase</code>, except that the String is mapped using the toUppercase algorithm of the Unicode Default Case Conversion.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <code>toUpperCase</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be a String object. Therefore, it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-string.prototype.trim">
<h1><span class="secnum">21.1.3.27</span>String.prototype.trim ( )</h1>
<p>This function interprets a String value as a sequence of UTF-16 encoded code points, as described in <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_532"><a href="#sec-ecmascript-language-types-string-type">6.1.4</a></emu-xref>.</p>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>S</var> be <emu-val>this</emu-val> value.</li><li>Return ?&nbsp;<emu-xref aoid="TrimString" id="_ref_5949"><a href="#sec-trimstring">TrimString</a></emu-xref>(<var>S</var>, <code>"start+end"</code>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <code>trim</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be a String object. Therefore, it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
<emu-clause id="sec-trimstring" aoid="TrimString">
<h1><span class="secnum">21.1.3.27.1</span>Runtime Semantics: TrimString ( <var>string</var>, <var>where</var> )</h1>
<p>The abstract operation TrimString is called with arguments <var>string</var> and <var>where</var>, and interprets the String value <var>string</var> as a sequence of UTF-16 encoded code points, as described in <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_533"><a href="#sec-ecmascript-language-types-string-type">6.1.4</a></emu-xref>. It performs the following steps:</p>
<emu-alg><ol><li>Let <var>str</var> be ?&nbsp;<emu-xref aoid="RequireObjectCoercible" id="_ref_5950"><a href="#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<var>string</var>).</li><li>Let <var>S</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5951"><a href="#sec-tostring">ToString</a></emu-xref>(<var>str</var>).</li><li>If <var>where</var> is <code>"start"</code>, let <var>T</var> be the String value that is a copy of <var>S</var> with leading white space removed.</li><li>Else if <var>where</var> is <code>"end"</code>, let <var>T</var> be the String value that is a copy of <var>S</var> with trailing white space removed.</li><li>Else,<ol><li><emu-xref href="#assert" id="_ref_5952"><a href="#assert">Assert</a></emu-xref>: <var>where</var> is <code>"start+end"</code>.</li><li>Let <var>T</var> be the String value that is a copy of <var>S</var> with both leading and trailing white space removed.</li></ol></li><li>Return <var>T</var>.
</li></ol></emu-alg>
<p>The definition of white space is the union of <emu-nt id="_ref_14359"><a href="#prod-WhiteSpace">WhiteSpace</a></emu-nt> and <emu-nt id="_ref_14360"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt>.
When determining whether a Unicode code point is in Unicode general
category “Space_Separator” (“Zs”), code unit sequences are interpreted
as UTF-16 encoded code point sequences as specified in <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_534"><a href="#sec-ecmascript-language-types-string-type">6.1.4</a></emu-xref>.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-string.prototype.trimend">
<h1><span class="secnum">21.1.3.28</span>String.prototype.trimEnd ( )</h1>
<p>This function interprets a String value as a sequence of UTF-16 encoded code points, as described in <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_535"><a href="#sec-ecmascript-language-types-string-type">6.1.4</a></emu-xref>.</p>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>S</var> be <emu-val>this</emu-val> value.</li><li>Return ?&nbsp;<emu-xref aoid="TrimString" id="_ref_5953"><a href="#sec-trimstring">TrimString</a></emu-xref>(<var>S</var>, <code>"end"</code>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <code>trimEnd</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be a String object. Therefore, it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-string.prototype.trimstart">
<h1><span class="secnum">21.1.3.29</span>String.prototype.trimStart ( )</h1>
<p>This function interprets a String value as a sequence of UTF-16 encoded code points, as described in <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_536"><a href="#sec-ecmascript-language-types-string-type">6.1.4</a></emu-xref>.</p>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>S</var> be <emu-val>this</emu-val> value.</li><li>Return ?&nbsp;<emu-xref aoid="TrimString" id="_ref_5954"><a href="#sec-trimstring">TrimString</a></emu-xref>(<var>S</var>, <code>"start"</code>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <code>trimStart</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be a String object. Therefore, it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-string.prototype.valueof">
<h1><span class="secnum">21.1.3.30</span>String.prototype.valueOf ( )</h1>
<p>When the <code>valueOf</code> method is called, the following steps are taken:</p>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref href="#sec-thisstringvalue" id="_ref_5955"><a href="#sec-thisstringvalue">thisStringValue</a></emu-xref>(<emu-val>this</emu-val> value).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-string.prototype-@@iterator">
<h1><span class="secnum">21.1.3.31</span>String.prototype [ @@iterator ] ( )</h1>
<p>When the <code>@@iterator</code> method is called it returns an Iterator object (<emu-xref href="#sec-iterator-interface" id="_ref_537"><a href="#sec-iterator-interface">25.1.1.2</a></emu-xref>)
that iterates over the code points of a String value, returning each
code point as a String value. The following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="RequireObjectCoercible" id="_ref_5956"><a href="#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>S</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_5957"><a href="#sec-tostring">ToString</a></emu-xref>(<var>O</var>).</li><li>Return <emu-xref aoid="CreateStringIterator" id="_ref_5958"><a href="#sec-createstringiterator">CreateStringIterator</a></emu-xref>(<var>S</var>).
</li></ol></emu-alg>
<p>The value of the <code>name</code> property of this function is <code>"[Symbol.iterator]"</code>.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-string-instances">
<h1><span class="secnum">21.1.4</span>Properties of String Instances</h1>
<p>String instances are String exotic objects and have the
internal methods specified for such objects. String instances inherit
properties from the String prototype object. String instances also have a
[[StringData]] internal slot.</p>
<p>String instances have a <code>"length"</code> property, and a set of enumerable properties with integer-indexed names.</p>
<emu-clause id="sec-properties-of-string-instances-length">
<h1><span class="secnum">21.1.4.1</span>length</h1>
<p>The number of elements in the String value represented by this String object.</p>
<p>Once a String object is initialized, this property is unchanging. It has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-string-iterator-objects">
<h1><span class="secnum">21.1.5</span>String Iterator Objects</h1>
<p>A String Iterator is an object, that represents a specific
iteration over some specific String instance object. There is not a
named <emu-xref href="#constructor" id="_ref_5959"><a href="#constructor">constructor</a></emu-xref>
for String Iterator objects. Instead, String iterator objects are
created by calling certain methods of String instance objects.</p>
<emu-clause id="sec-createstringiterator" aoid="CreateStringIterator">
<h1><span class="secnum">21.1.5.1</span>CreateStringIterator ( <var>string</var> )</h1>
<p>Several methods of String objects return Iterator objects. The abstract operation CreateStringIterator with argument <var>string</var> is used to create such iterator objects. It performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_5960"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_5961"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>string</var>) is String.</li><li>Let <var>iterator</var> be <emu-xref aoid="ObjectCreate" id="_ref_5962"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-%stringiteratorprototype%-object" id="_ref_5963"><a href="#sec-%stringiteratorprototype%-object">%StringIteratorPrototype%</a></emu-xref>, « [[IteratedString]], [[StringIteratorNextIndex]] »).</li><li>Set <var>iterator</var>.[[IteratedString]] to <var>string</var>.</li><li>Set <var>iterator</var>.[[StringIteratorNextIndex]] to 0.</li><li>Return <var>iterator</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-%stringiteratorprototype%-object">
<h1><span class="secnum">21.1.5.2</span>The %StringIteratorPrototype% Object</h1>
<p>The <dfn>%StringIteratorPrototype%</dfn> object:</p>
<ul>
<li>has properties that are inherited by all String Iterator Objects.</li>
<li>is an ordinary object.</li>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-%iteratorprototype%-object" id="_ref_5964"><a href="#sec-%iteratorprototype%-object">%IteratorPrototype%</a></emu-xref>.</li>
<li>has the following properties:</li>
</ul>
<emu-clause id="sec-%stringiteratorprototype%.next">
<h1><span class="secnum">21.1.5.2.1</span>%StringIteratorPrototype%.next ( )</h1>
<emu-alg><ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_5965"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>O</var> does not have all of the internal slots of a String Iterator Instance (<emu-xref href="#sec-properties-of-string-iterator-instances" id="_ref_538"><a href="#sec-properties-of-string-iterator-instances">21.1.5.3</a></emu-xref>), throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>s</var> be <var>O</var>.[[IteratedString]].</li><li>If <var>s</var> is <emu-val>undefined</emu-val>, return <emu-xref aoid="CreateIterResultObject" id="_ref_5966"><a href="#sec-createiterresultobject">CreateIterResultObject</a></emu-xref>(<emu-val>undefined</emu-val>, <emu-val>true</emu-val>).</li><li>Let <var>position</var> be <var>O</var>.[[StringIteratorNextIndex]].</li><li>Let <var>len</var> be the length of <var>s</var>.</li><li>If <var>position</var> ≥ <var>len</var>, then<ol><li>Set <var>O</var>.[[IteratedString]] to <emu-val>undefined</emu-val>.</li><li>Return <emu-xref aoid="CreateIterResultObject" id="_ref_5967"><a href="#sec-createiterresultobject">CreateIterResultObject</a></emu-xref>(<emu-val>undefined</emu-val>, <emu-val>true</emu-val>).</li></ol></li><li>Let <var>first</var> be the numeric value of the code unit at index <var>position</var> within <var>s</var>.</li><li>If <var>first</var> &lt; 0xD800 or <var>first</var> &gt; 0xDBFF or <var>position</var> + 1 = <var>len</var>, let <var>resultString</var> be the String value consisting of the single code unit <var>first</var>.</li><li>Else,<ol><li>Let <var>second</var> be the numeric value of the code unit at index <var>position</var> + 1 within the String <var>s</var>.</li><li>If <var>second</var> &lt; 0xDC00 or <var>second</var> &gt; 0xDFFF, let <var>resultString</var> be the String value consisting of the single code unit <var>first</var>.</li><li>Else, let <var>resultString</var> be the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_5968"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of the code unit <var>first</var> and the code unit <var>second</var>.</li></ol></li><li>Let <var>resultSize</var> be the number of code units in <var>resultString</var>.</li><li>Set <var>O</var>.[[StringIteratorNextIndex]] to <var>position</var> + <var>resultSize</var>.</li><li>Return <emu-xref aoid="CreateIterResultObject" id="_ref_5969"><a href="#sec-createiterresultobject">CreateIterResultObject</a></emu-xref>(<var>resultString</var>, <emu-val>false</emu-val>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-%stringiteratorprototype%-@@tostringtag">
<h1><span class="secnum">21.1.5.2.2</span>%StringIteratorPrototype% [ @@toStringTag ]</h1>
<p>The initial value of the @@toStringTag property is the String value <code>"String Iterator"</code>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-string-iterator-instances">
<h1><span class="secnum">21.1.5.3</span>Properties of String Iterator Instances</h1>
<p>String Iterator instances are ordinary objects that inherit properties from the <emu-xref href="#sec-%stringiteratorprototype%-object" id="_ref_5970"><a href="#sec-%stringiteratorprototype%-object">%StringIteratorPrototype%</a></emu-xref> intrinsic object. String Iterator instances are initially created with the internal slots listed in <emu-xref href="#table-46" id="_ref_539"><a href="#table-46">Table 52</a></emu-xref>.</p>
<emu-table id="table-46" caption="Internal Slots of String Iterator Instances"><figure><figcaption>Table 52: Internal Slots of String Iterator Instances</figcaption>
<table>
<tbody>
<tr>
<th>
Internal Slot
</th>
<th>
Description
</th>
</tr>
<tr>
<td>
[[IteratedString]]
</td>
<td>
The String value whose code units are being iterated.
</td>
</tr>
<tr>
<td>
[[StringIteratorNextIndex]]
</td>
<td>
The <emu-xref href="#integer-index" id="_ref_5971"><a href="#integer-index">integer index</a></emu-xref> of the next string index to be examined by this iteration.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-regexp-regular-expression-objects">
<h1><span class="secnum">21.2</span>RegExp (Regular Expression) Objects</h1>
<p>A RegExp object contains a regular expression and the associated flags.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The form and functionality of regular expressions is modelled
after the regular expression facility in the Perl 5 programming
language.</p>
</div></emu-note>
<emu-clause id="sec-patterns">
<h1><span class="secnum">21.2.1</span>Patterns</h1>
<p>The <code>RegExp</code> <emu-xref href="#constructor" id="_ref_5972"><a href="#constructor">constructor</a></emu-xref>
applies the following grammar to the input pattern String. An error
occurs if the grammar cannot interpret the String as an expansion of <emu-nt id="_ref_14361"><a href="#prod-Pattern">Pattern</a></emu-nt>.</p>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="Pattern" params="U, N" type="lexical" id="prod-Pattern">
<emu-nt params="U, N"><a href="#prod-Pattern">Pattern</a><emu-mods><emu-params>[U, N]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="ea2e8548"><emu-nt params="?U, ?N" id="_ref_14362"><a href="#prod-Disjunction">Disjunction</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="Disjunction" params="U, N" type="lexical" id="prod-Disjunction">
<emu-nt params="U, N"><a href="#prod-Disjunction">Disjunction</a><emu-mods><emu-params>[U, N]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="be4e1703"><emu-nt params="?U, ?N" id="_ref_14363"><a href="#prod-Alternative">Alternative</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="40349c54"><emu-nt params="?U, ?N" id="_ref_14364"><a href="#prod-Alternative">Alternative</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt><emu-t>|</emu-t><emu-nt params="?U, ?N" id="_ref_14365"><a href="#prod-Disjunction">Disjunction</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="Alternative" params="U, N" type="lexical" id="prod-Alternative">
<emu-nt params="U, N"><a href="#prod-Alternative">Alternative</a><emu-mods><emu-params>[U, N]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></emu-rhs>
<emu-rhs a="8e81495c"><emu-nt params="?U, ?N" id="_ref_14366"><a href="#prod-Alternative">Alternative</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt><emu-nt params="?U, ?N" id="_ref_14367"><a href="#prod-Term">Term</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="Term" params="U, N" type="lexical" id="prod-Term">
<emu-nt params="U, N"><a href="#prod-Term">Term</a><emu-mods><emu-params>[U, N]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="e8ded259"><emu-nt params="?U, ?N" id="_ref_14368"><a href="#prod-Assertion">Assertion</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="2eb78702"><emu-nt params="?U, ?N" id="_ref_14369"><a href="#prod-Atom">Atom</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="0870df0d"><emu-nt params="?U, ?N" id="_ref_14370"><a href="#prod-Atom">Atom</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt><emu-nt id="_ref_14371"><a href="#prod-Quantifier">Quantifier</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="Assertion" params="U, N" type="lexical" id="prod-Assertion">
<emu-nt params="U, N"><a href="#prod-Assertion">Assertion</a><emu-mods><emu-params>[U, N]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="e5878811"><emu-t>^</emu-t></emu-rhs>
<emu-rhs a="1262cc92"><emu-t>$</emu-t></emu-rhs>
<emu-rhs a="1e228da5"><emu-t>\</emu-t><emu-t>b</emu-t></emu-rhs>
<emu-rhs a="a5dc97fa"><emu-t>\</emu-t><emu-t>B</emu-t></emu-rhs>
<emu-rhs a="c54c9dce"><emu-t>(</emu-t><emu-t>?</emu-t><emu-t>=</emu-t><emu-nt params="?U, ?N" id="_ref_14372"><a href="#prod-Disjunction">Disjunction</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t></emu-rhs>
<emu-rhs a="84eb51e5"><emu-t>(</emu-t><emu-t>?</emu-t><emu-t>!</emu-t><emu-nt params="?U, ?N" id="_ref_14373"><a href="#prod-Disjunction">Disjunction</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t></emu-rhs>
<emu-rhs a="82aea0e5"><emu-t>(</emu-t><emu-t>?</emu-t><emu-t>&lt;=</emu-t><emu-nt params="?U, ?N" id="_ref_14374"><a href="#prod-Disjunction">Disjunction</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t></emu-rhs>
<emu-rhs a="9799bbf1"><emu-t>(</emu-t><emu-t>?</emu-t><emu-t>&lt;!</emu-t><emu-nt params="?U, ?N" id="_ref_14375"><a href="#prod-Disjunction">Disjunction</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t></emu-rhs>
</emu-production>
<emu-production name="Quantifier" type="lexical" id="prod-Quantifier">
<emu-nt><a href="#prod-Quantifier">Quantifier</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="0e588d23"><emu-nt id="_ref_14376"><a href="#prod-QuantifierPrefix">QuantifierPrefix</a></emu-nt></emu-rhs>
<emu-rhs a="0b0b5479"><emu-nt id="_ref_14377"><a href="#prod-QuantifierPrefix">QuantifierPrefix</a></emu-nt><emu-t>?</emu-t></emu-rhs>
</emu-production>
<emu-production name="QuantifierPrefix" type="lexical" id="prod-QuantifierPrefix">
<emu-nt><a href="#prod-QuantifierPrefix">QuantifierPrefix</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="b01e734d"><emu-t>*</emu-t></emu-rhs>
<emu-rhs a="e0370b05"><emu-t>+</emu-t></emu-rhs>
<emu-rhs a="232d7160"><emu-t>?</emu-t></emu-rhs>
<emu-rhs a="68a2b74e"><emu-t>{</emu-t><emu-nt id="_ref_14378"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="82e97391"><emu-t>{</emu-t><emu-nt id="_ref_14379"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-t>,</emu-t><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="f47829c0"><emu-t>{</emu-t><emu-nt id="_ref_14380"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_14381"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="Atom" params="U, N" type="lexical" id="prod-Atom">
<emu-nt params="U, N"><a href="#prod-Atom">Atom</a><emu-mods><emu-params>[U, N]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="beff52c4"><emu-nt id="_ref_14382"><a href="#prod-PatternCharacter">PatternCharacter</a></emu-nt></emu-rhs>
<emu-rhs a="9658e473"><emu-t>.</emu-t></emu-rhs>
<emu-rhs a="60fd7386"><emu-t>\</emu-t><emu-nt params="?U, ?N" id="_ref_14383"><a href="#prod-AtomEscape">AtomEscape</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="72a5dc04"><emu-nt params="?U" id="_ref_14384"><a href="#prod-CharacterClass">CharacterClass</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="9a015fb8"><emu-t>(</emu-t><emu-nt params="?U" id="_ref_14385"><a href="#prod-GroupSpecifier">GroupSpecifier</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt><emu-nt params="?U, ?N" id="_ref_14386"><a href="#prod-Disjunction">Disjunction</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t></emu-rhs>
<emu-rhs a="9d0775f7"><emu-t>(</emu-t><emu-t>?</emu-t><emu-t>:</emu-t><emu-nt params="?U, ?N" id="_ref_14387"><a href="#prod-Disjunction">Disjunction</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t></emu-rhs>
</emu-production>
<emu-production name="SyntaxCharacter" type="lexical" oneof="" id="prod-SyntaxCharacter">
<emu-nt><a href="#prod-SyntaxCharacter">SyntaxCharacter</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>+</emu-t><emu-t>?</emu-t><emu-t>(</emu-t><emu-t>)</emu-t><emu-t>[</emu-t><emu-t>]</emu-t><emu-t>{</emu-t><emu-t>}</emu-t><emu-t>|</emu-t></emu-rhs>
</emu-production>
<emu-production name="PatternCharacter" type="lexical" id="prod-PatternCharacter">
<emu-nt><a href="#prod-PatternCharacter">PatternCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="b94d4da1"><emu-nt id="_ref_14388"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-gmod>but not <emu-nt id="_ref_14389"><a href="#prod-SyntaxCharacter">SyntaxCharacter</a></emu-nt></emu-gmod></emu-rhs>
</emu-production>
<emu-production name="AtomEscape" params="U, N" type="lexical" id="prod-AtomEscape">
<emu-nt params="U, N"><a href="#prod-AtomEscape">AtomEscape</a><emu-mods><emu-params>[U, N]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="7ebff96c"><emu-nt id="_ref_14390"><a href="#prod-DecimalEscape">DecimalEscape</a></emu-nt></emu-rhs>
<emu-rhs a="da3d719e"><emu-nt params="?U" id="_ref_14391"><a href="#prod-CharacterClassEscape">CharacterClassEscape</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="4b80816a"><emu-nt params="?U" id="_ref_14392"><a href="#prod-CharacterEscape">CharacterEscape</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="f3e6826b" constraints="+N"><emu-constraints>[+N]</emu-constraints><emu-t>k</emu-t><emu-nt params="?U" id="_ref_14393"><a href="#prod-GroupName">GroupName</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="CharacterEscape" params="U" type="lexical" id="prod-CharacterEscape">
<emu-nt params="U"><a href="#prod-CharacterEscape">CharacterEscape</a><emu-mods><emu-params>[U]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="f88e7170"><emu-nt id="_ref_14394"><a href="#prod-ControlEscape">ControlEscape</a></emu-nt></emu-rhs>
<emu-rhs a="a14dae7e"><emu-t>c</emu-t><emu-nt id="_ref_14395"><a href="#prod-ControlLetter">ControlLetter</a></emu-nt></emu-rhs>
<emu-rhs a="6964a19d"><emu-t>0</emu-t><emu-gann>[lookahead ∉ <emu-nt id="_ref_14396"><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt>]</emu-gann></emu-rhs>
<emu-rhs a="a8071b85"><emu-nt id="_ref_14397"><a href="#prod-HexEscapeSequence">HexEscapeSequence</a></emu-nt></emu-rhs>
<emu-rhs a="2649a73f"><emu-nt params="?U" id="_ref_14398"><a href="#prod-RegExpUnicodeEscapeSequence">RegExpUnicodeEscapeSequence</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="2037e8bf"><emu-nt params="?U" id="_ref_14399"><a href="#prod-IdentityEscape">IdentityEscape</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ControlEscape" type="lexical" oneof="" id="prod-ControlEscape">
<emu-nt><a href="#prod-ControlEscape">ControlEscape</a></emu-nt><emu-geq>::</emu-geq><emu-oneof>one of</emu-oneof><emu-rhs><emu-t>f</emu-t><emu-t>n</emu-t><emu-t>r</emu-t><emu-t>t</emu-t><emu-t>v</emu-t></emu-rhs>
</emu-production>
<emu-production name="ControlLetter" type="lexical" oneof="" id="prod-ControlLetter">
<emu-nt><a href="#prod-ControlLetter">ControlLetter</a></emu-nt><emu-geq>::</emu-geq><emu-oneof>one of</emu-oneof><emu-rhs><emu-t>a</emu-t><emu-t>b</emu-t><emu-t>c</emu-t><emu-t>d</emu-t><emu-t>e</emu-t><emu-t>f</emu-t><emu-t>g</emu-t><emu-t>h</emu-t><emu-t>i</emu-t><emu-t>j</emu-t><emu-t>k</emu-t><emu-t>l</emu-t><emu-t>m</emu-t><emu-t>n</emu-t><emu-t>o</emu-t><emu-t>p</emu-t><emu-t>q</emu-t><emu-t>r</emu-t><emu-t>s</emu-t><emu-t>t</emu-t><emu-t>u</emu-t><emu-t>v</emu-t><emu-t>w</emu-t><emu-t>x</emu-t><emu-t>y</emu-t><emu-t>z</emu-t><emu-t>A</emu-t><emu-t>B</emu-t><emu-t>C</emu-t><emu-t>D</emu-t><emu-t>E</emu-t><emu-t>F</emu-t><emu-t>G</emu-t><emu-t>H</emu-t><emu-t>I</emu-t><emu-t>J</emu-t><emu-t>K</emu-t><emu-t>L</emu-t><emu-t>M</emu-t><emu-t>N</emu-t><emu-t>O</emu-t><emu-t>P</emu-t><emu-t>Q</emu-t><emu-t>R</emu-t><emu-t>S</emu-t><emu-t>T</emu-t><emu-t>U</emu-t><emu-t>V</emu-t><emu-t>W</emu-t><emu-t>X</emu-t><emu-t>Y</emu-t><emu-t>Z</emu-t></emu-rhs>
</emu-production>
<emu-production name="GroupSpecifier" params="U" type="lexical" id="prod-GroupSpecifier">
<emu-nt params="U"><a href="#prod-GroupSpecifier">GroupSpecifier</a><emu-mods><emu-params>[U]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></emu-rhs>
<emu-rhs a="0a6c1542"><emu-t>?</emu-t><emu-nt params="?U" id="_ref_14400"><a href="#prod-GroupName">GroupName</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="GroupName" params="U" type="lexical" id="prod-GroupName">
<emu-nt params="U"><a href="#prod-GroupName">GroupName</a><emu-mods><emu-params>[U]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="bca72b0c"><emu-t>&lt;</emu-t><emu-nt params="?U" id="_ref_14401"><a href="#prod-RegExpIdentifierName">RegExpIdentifierName</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt><emu-t>&gt;</emu-t></emu-rhs>
</emu-production>
<emu-production name="RegExpIdentifierName" params="U" type="lexical" id="prod-RegExpIdentifierName">
<emu-nt params="U"><a href="#prod-RegExpIdentifierName">RegExpIdentifierName</a><emu-mods><emu-params>[U]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="4aeafadc"><emu-nt params="?U" id="_ref_14402"><a href="#prod-RegExpIdentifierStart">RegExpIdentifierStart</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="d8644c18"><emu-nt params="?U" id="_ref_14403"><a href="#prod-RegExpIdentifierName">RegExpIdentifierName</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt><emu-nt params="?U" id="_ref_14404"><a href="#prod-RegExpIdentifierPart">RegExpIdentifierPart</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="RegExpIdentifierStart" params="U" type="lexical" id="prod-RegExpIdentifierStart">
<emu-nt params="U"><a href="#prod-RegExpIdentifierStart">RegExpIdentifierStart</a><emu-mods><emu-params>[U]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="0862e30c"><emu-nt id="_ref_14405"><a href="#prod-UnicodeIDStart">UnicodeIDStart</a></emu-nt></emu-rhs>
<emu-rhs a="1262cc92"><emu-t>$</emu-t></emu-rhs>
<emu-rhs a="07564b94"><emu-t>_</emu-t></emu-rhs>
<emu-rhs a="67e6af36"><emu-t>\</emu-t><emu-nt params="?U" id="_ref_14406"><a href="#prod-RegExpUnicodeEscapeSequence">RegExpUnicodeEscapeSequence</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="RegExpIdentifierPart" params="U" type="lexical" id="prod-RegExpIdentifierPart">
<emu-nt params="U"><a href="#prod-RegExpIdentifierPart">RegExpIdentifierPart</a><emu-mods><emu-params>[U]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="364ac675"><emu-nt id="_ref_14407"><a href="#prod-UnicodeIDContinue">UnicodeIDContinue</a></emu-nt></emu-rhs>
<emu-rhs a="1262cc92"><emu-t>$</emu-t></emu-rhs>
<emu-rhs a="67e6af36"><emu-t>\</emu-t><emu-nt params="?U" id="_ref_14408"><a href="#prod-RegExpUnicodeEscapeSequence">RegExpUnicodeEscapeSequence</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="a321d28b"><emu-gprose>&lt;ZWNJ&gt;</emu-gprose></emu-rhs>
<emu-rhs a="9543f0aa"><emu-gprose>&lt;ZWJ&gt;</emu-gprose></emu-rhs>
</emu-production>
<emu-production name="RegExpUnicodeEscapeSequence" params="U" type="lexical" id="prod-RegExpUnicodeEscapeSequence">
<emu-nt params="U"><a href="#prod-RegExpUnicodeEscapeSequence">RegExpUnicodeEscapeSequence</a><emu-mods><emu-params>[U]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="af8038f7" constraints="+U"><emu-constraints>[+U]</emu-constraints><emu-t>u</emu-t><emu-nt id="_ref_14409"><a href="#prod-LeadSurrogate">LeadSurrogate</a></emu-nt><emu-t>\u</emu-t><emu-nt id="_ref_14410"><a href="#prod-TrailSurrogate">TrailSurrogate</a></emu-nt></emu-rhs>
<emu-rhs a="67ed8617" constraints="+U"><emu-constraints>[+U]</emu-constraints><emu-t>u</emu-t><emu-nt id="_ref_14411"><a href="#prod-LeadSurrogate">LeadSurrogate</a></emu-nt></emu-rhs>
<emu-rhs a="0c510966" constraints="+U"><emu-constraints>[+U]</emu-constraints><emu-t>u</emu-t><emu-nt id="_ref_14412"><a href="#prod-TrailSurrogate">TrailSurrogate</a></emu-nt></emu-rhs>
<emu-rhs a="cea7c087" constraints="+U"><emu-constraints>[+U]</emu-constraints><emu-t>u</emu-t><emu-nt id="_ref_14413"><a href="#prod-NonSurrogate">NonSurrogate</a></emu-nt></emu-rhs>
<emu-rhs a="8dee6a61" constraints="~U"><emu-constraints>[~U]</emu-constraints><emu-t>u</emu-t><emu-nt id="_ref_14414"><a href="#prod-Hex4Digits">Hex4Digits</a></emu-nt></emu-rhs>
<emu-rhs a="7763ef41" constraints="+U"><emu-constraints>[+U]</emu-constraints><emu-t>u{</emu-t><emu-nt id="_ref_14415"><a href="#prod-CodePoint">CodePoint</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<p>Each <code>\u</code> <emu-nt id="_ref_14416"><a href="#prod-TrailSurrogate">TrailSurrogate</a></emu-nt> for which the choice of associated <code>u</code> <emu-nt id="_ref_14417"><a href="#prod-LeadSurrogate">LeadSurrogate</a></emu-nt> is ambiguous shall be associated with the nearest possible <code>u</code> <emu-nt id="_ref_14418"><a href="#prod-LeadSurrogate">LeadSurrogate</a></emu-nt> that would otherwise have no corresponding <code>\u</code> <emu-nt id="_ref_14419"><a href="#prod-TrailSurrogate">TrailSurrogate</a></emu-nt>.</p>
<emu-grammar type="definition"><emu-production name="LeadSurrogate" type="lexical" id="prod-LeadSurrogate">
<emu-nt><a href="#prod-LeadSurrogate">LeadSurrogate</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="b4266993"><emu-nt id="_ref_14420"><a href="#prod-Hex4Digits">Hex4Digits</a></emu-nt><emu-gmod>but only if the SV of <emu-nt id="_ref_14421"><a href="#prod-Hex4Digits">Hex4Digits</a></emu-nt> is in the inclusive range 0xD800 to 0xDBFF</emu-gmod></emu-rhs>
</emu-production>
<emu-production name="TrailSurrogate" type="lexical" id="prod-TrailSurrogate">
<emu-nt><a href="#prod-TrailSurrogate">TrailSurrogate</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="134361fc"><emu-nt id="_ref_14422"><a href="#prod-Hex4Digits">Hex4Digits</a></emu-nt><emu-gmod>but only if the SV of <emu-nt id="_ref_14423"><a href="#prod-Hex4Digits">Hex4Digits</a></emu-nt> is in the inclusive range 0xDC00 to 0xDFFF</emu-gmod></emu-rhs>
</emu-production>
<emu-production name="NonSurrogate" type="lexical" id="prod-NonSurrogate">
<emu-nt><a href="#prod-NonSurrogate">NonSurrogate</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="de3cc0ae"><emu-nt id="_ref_14424"><a href="#prod-Hex4Digits">Hex4Digits</a></emu-nt><emu-gmod>but only if the SV of <emu-nt id="_ref_14425"><a href="#prod-Hex4Digits">Hex4Digits</a></emu-nt> is not in the inclusive range 0xD800 to 0xDFFF</emu-gmod></emu-rhs>
</emu-production>
<emu-production name="IdentityEscape" params="U" type="lexical" id="prod-IdentityEscape">
<emu-nt params="U"><a href="#prod-IdentityEscape">IdentityEscape</a><emu-mods><emu-params>[U]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="59e8579a" constraints="+U"><emu-constraints>[+U]</emu-constraints><emu-nt id="_ref_14426"><a href="#prod-SyntaxCharacter">SyntaxCharacter</a></emu-nt></emu-rhs>
<emu-rhs a="85b4a3dd" constraints="+U"><emu-constraints>[+U]</emu-constraints><emu-t>/</emu-t></emu-rhs>
<emu-rhs a="fbcd1409" constraints="~U"><emu-constraints>[~U]</emu-constraints><emu-nt id="_ref_14427"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-gmod>but not <emu-nt id="_ref_14428"><a href="#prod-UnicodeIDContinue">UnicodeIDContinue</a></emu-nt></emu-gmod></emu-rhs>
</emu-production>
<emu-production name="DecimalEscape" type="lexical" id="prod-DecimalEscape">
<emu-nt><a href="#prod-DecimalEscape">DecimalEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="627951dd"><emu-nt id="_ref_14429"><a href="#prod-NonZeroDigit">NonZeroDigit</a></emu-nt><emu-nt optional="" id="_ref_14430"><a href="#prod-DecimalDigits">DecimalDigits</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-gann>[lookahead ∉ <emu-nt id="_ref_14431"><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt>]</emu-gann></emu-rhs>
</emu-production>
<emu-production name="CharacterClassEscape" params="U" type="lexical" id="prod-CharacterClassEscape">
<emu-nt params="U"><a href="#prod-CharacterClassEscape">CharacterClassEscape</a><emu-mods><emu-params>[U]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="f0f32729"><emu-t>d</emu-t></emu-rhs>
<emu-rhs a="919b1483"><emu-t>D</emu-t></emu-rhs>
<emu-rhs a="5b9c6c6e"><emu-t>s</emu-t></emu-rhs>
<emu-rhs a="6952cf48"><emu-t>S</emu-t></emu-rhs>
<emu-rhs a="2d8b484a"><emu-t>w</emu-t></emu-rhs>
<emu-rhs a="ae15e851"><emu-t>W</emu-t></emu-rhs>
<emu-rhs a="6f034769" constraints="+U"><emu-constraints>[+U]</emu-constraints><emu-t>p{</emu-t><emu-nt id="_ref_14432"><a href="#prod-UnicodePropertyValueExpression">UnicodePropertyValueExpression</a></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="9b2f96fc" constraints="+U"><emu-constraints>[+U]</emu-constraints><emu-t>P{</emu-t><emu-nt id="_ref_14433"><a href="#prod-UnicodePropertyValueExpression">UnicodePropertyValueExpression</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="UnicodePropertyValueExpression" type="lexical" id="prod-UnicodePropertyValueExpression">
<emu-nt><a href="#prod-UnicodePropertyValueExpression">UnicodePropertyValueExpression</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="b11de407"><emu-nt id="_ref_14434"><a href="#prod-UnicodePropertyName">UnicodePropertyName</a></emu-nt><emu-t>=</emu-t><emu-nt id="_ref_14435"><a href="#prod-UnicodePropertyValue">UnicodePropertyValue</a></emu-nt></emu-rhs>
<emu-rhs a="25d94190"><emu-nt id="_ref_14436"><a href="#prod-LoneUnicodePropertyNameOrValue">LoneUnicodePropertyNameOrValue</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="UnicodePropertyName" type="lexical" id="prod-UnicodePropertyName">
<emu-nt><a href="#prod-UnicodePropertyName">UnicodePropertyName</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="c0c2619f"><emu-nt id="_ref_14437"><a href="#prod-UnicodePropertyNameCharacters">UnicodePropertyNameCharacters</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="UnicodePropertyNameCharacters" type="lexical" id="prod-UnicodePropertyNameCharacters">
<emu-nt><a href="#prod-UnicodePropertyNameCharacters">UnicodePropertyNameCharacters</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="c1247f44"><emu-nt id="_ref_14438"><a href="#prod-UnicodePropertyNameCharacter">UnicodePropertyNameCharacter</a></emu-nt><emu-nt optional="" id="_ref_14439"><a href="#prod-UnicodePropertyNameCharacters">UnicodePropertyNameCharacters</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="UnicodePropertyValue" type="lexical" id="prod-UnicodePropertyValue">
<emu-nt><a href="#prod-UnicodePropertyValue">UnicodePropertyValue</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="526a9170"><emu-nt id="_ref_14440"><a href="#prod-UnicodePropertyValueCharacters">UnicodePropertyValueCharacters</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="LoneUnicodePropertyNameOrValue" type="lexical" id="prod-LoneUnicodePropertyNameOrValue">
<emu-nt><a href="#prod-LoneUnicodePropertyNameOrValue">LoneUnicodePropertyNameOrValue</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="526a9170"><emu-nt id="_ref_14441"><a href="#prod-UnicodePropertyValueCharacters">UnicodePropertyValueCharacters</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="UnicodePropertyValueCharacters" type="lexical" id="prod-UnicodePropertyValueCharacters">
<emu-nt><a href="#prod-UnicodePropertyValueCharacters">UnicodePropertyValueCharacters</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5a208aa0"><emu-nt id="_ref_14442"><a href="#prod-UnicodePropertyValueCharacter">UnicodePropertyValueCharacter</a></emu-nt><emu-nt optional="" id="_ref_14443"><a href="#prod-UnicodePropertyValueCharacters">UnicodePropertyValueCharacters</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="UnicodePropertyValueCharacter" type="lexical" id="prod-UnicodePropertyValueCharacter">
<emu-nt><a href="#prod-UnicodePropertyValueCharacter">UnicodePropertyValueCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="531254cc"><emu-nt id="_ref_14444"><a href="#prod-UnicodePropertyNameCharacter">UnicodePropertyNameCharacter</a></emu-nt></emu-rhs>
<emu-rhs a="5259a431"><emu-t>0</emu-t></emu-rhs>
<emu-rhs a="292aa5dd"><emu-t>1</emu-t></emu-rhs>
<emu-rhs a="5ca73105"><emu-t>2</emu-t></emu-rhs>
<emu-rhs a="ec6bb6b2"><emu-t>3</emu-t></emu-rhs>
<emu-rhs a="58ec4a73"><emu-t>4</emu-t></emu-rhs>
<emu-rhs a="8fcdef77"><emu-t>5</emu-t></emu-rhs>
<emu-rhs a="0b64877d"><emu-t>6</emu-t></emu-rhs>
<emu-rhs a="ea5e07a4"><emu-t>7</emu-t></emu-rhs>
<emu-rhs a="7a5bd8c3"><emu-t>8</emu-t></emu-rhs>
<emu-rhs a="163f4308"><emu-t>9</emu-t></emu-rhs>
</emu-production>
<emu-production name="UnicodePropertyNameCharacter" type="lexical" id="prod-UnicodePropertyNameCharacter">
<emu-nt><a href="#prod-UnicodePropertyNameCharacter">UnicodePropertyNameCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="69611eb2"><emu-nt id="_ref_14445"><a href="#prod-ControlLetter">ControlLetter</a></emu-nt></emu-rhs>
<emu-rhs a="07564b94"><emu-t>_</emu-t></emu-rhs>
</emu-production>
<emu-production name="CharacterClass" params="U" type="lexical" id="prod-CharacterClass">
<emu-nt params="U"><a href="#prod-CharacterClass">CharacterClass</a><emu-mods><emu-params>[U]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="4acdd45f"><emu-t>[</emu-t><emu-gann>[lookahead ∉ { <emu-t>^</emu-t> }]</emu-gann><emu-nt params="?U" id="_ref_14446"><a href="#prod-ClassRanges">ClassRanges</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt><emu-t>]</emu-t></emu-rhs>
<emu-rhs a="93d354c0"><emu-t>[</emu-t><emu-t>^</emu-t><emu-nt params="?U" id="_ref_14447"><a href="#prod-ClassRanges">ClassRanges</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt><emu-t>]</emu-t></emu-rhs>
</emu-production>
<emu-production name="ClassRanges" params="U" type="lexical" id="prod-ClassRanges">
<emu-nt params="U"><a href="#prod-ClassRanges">ClassRanges</a><emu-mods><emu-params>[U]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></emu-rhs>
<emu-rhs a="43c27130"><emu-nt params="?U" id="_ref_14448"><a href="#prod-NonemptyClassRanges">NonemptyClassRanges</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="NonemptyClassRanges" params="U" type="lexical" id="prod-NonemptyClassRanges">
<emu-nt params="U"><a href="#prod-NonemptyClassRanges">NonemptyClassRanges</a><emu-mods><emu-params>[U]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="cdf200f3"><emu-nt params="?U" id="_ref_14449"><a href="#prod-ClassAtom">ClassAtom</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="4a76f2ec"><emu-nt params="?U" id="_ref_14450"><a href="#prod-ClassAtom">ClassAtom</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt><emu-nt params="?U" id="_ref_14451"><a href="#prod-NonemptyClassRangesNoDash">NonemptyClassRangesNoDash</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="63fd2e03"><emu-nt params="?U" id="_ref_14452"><a href="#prod-ClassAtom">ClassAtom</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt><emu-t>-</emu-t><emu-nt params="?U" id="_ref_14453"><a href="#prod-ClassAtom">ClassAtom</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt><emu-nt params="?U" id="_ref_14454"><a href="#prod-ClassRanges">ClassRanges</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="NonemptyClassRangesNoDash" params="U" type="lexical" id="prod-NonemptyClassRangesNoDash">
<emu-nt params="U"><a href="#prod-NonemptyClassRangesNoDash">NonemptyClassRangesNoDash</a><emu-mods><emu-params>[U]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="cdf200f3"><emu-nt params="?U" id="_ref_14455"><a href="#prod-ClassAtom">ClassAtom</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="2d1a8609"><emu-nt params="?U" id="_ref_14456"><a href="#prod-ClassAtomNoDash">ClassAtomNoDash</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt><emu-nt params="?U" id="_ref_14457"><a href="#prod-NonemptyClassRangesNoDash">NonemptyClassRangesNoDash</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="b61280d4"><emu-nt params="?U" id="_ref_14458"><a href="#prod-ClassAtomNoDash">ClassAtomNoDash</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt><emu-t>-</emu-t><emu-nt params="?U" id="_ref_14459"><a href="#prod-ClassAtom">ClassAtom</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt><emu-nt params="?U" id="_ref_14460"><a href="#prod-ClassRanges">ClassRanges</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ClassAtom" params="U" type="lexical" id="prod-ClassAtom">
<emu-nt params="U"><a href="#prod-ClassAtom">ClassAtom</a><emu-mods><emu-params>[U]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="6f24a587"><emu-t>-</emu-t></emu-rhs>
<emu-rhs a="714140ac"><emu-nt params="?U" id="_ref_14461"><a href="#prod-ClassAtomNoDash">ClassAtomNoDash</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ClassAtomNoDash" params="U" type="lexical" id="prod-ClassAtomNoDash">
<emu-nt params="U"><a href="#prod-ClassAtomNoDash">ClassAtomNoDash</a><emu-mods><emu-params>[U]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="ecde6e28"><emu-nt id="_ref_14462"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-gmod>but not one of <emu-t>\</emu-t> or <emu-t>]</emu-t> or <emu-t>-</emu-t></emu-gmod></emu-rhs>
<emu-rhs a="379e2483"><emu-t>\</emu-t><emu-nt params="?U" id="_ref_14463"><a href="#prod-ClassEscape">ClassEscape</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ClassEscape" params="U" type="lexical" id="prod-ClassEscape">
<emu-nt params="U"><a href="#prod-ClassEscape">ClassEscape</a><emu-mods><emu-params>[U]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="0185ce89"><emu-t>b</emu-t></emu-rhs>
<emu-rhs a="ae60fdeb" constraints="+U"><emu-constraints>[+U]</emu-constraints><emu-t>-</emu-t></emu-rhs>
<emu-rhs a="da3d719e"><emu-nt params="?U" id="_ref_14464"><a href="#prod-CharacterClassEscape">CharacterClassEscape</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="4b80816a"><emu-nt params="?U" id="_ref_14465"><a href="#prod-CharacterEscape">CharacterEscape</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-clause id="sec-patterns-static-semantics-early-errors">
<h1><span class="secnum">21.2.1.1</span>Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="Pattern" type="lexical" collapsed="">
<emu-nt><a href="#prod-Pattern">Pattern</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="79a5bbd0"><emu-nt id="_ref_14466"><a href="#prod-Disjunction">Disjunction</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if <var>NcapturingParens</var> ≥ 2<sup>32</sup> - 1.
</li>
<li>
It is a Syntax Error if <emu-nt id="_ref_14467"><a href="#prod-Pattern">Pattern</a></emu-nt> contains multiple <emu-nt id="_ref_14468"><a href="#prod-GroupSpecifier">GroupSpecifier</a></emu-nt>s whose enclosed <emu-nt id="_ref_14469"><a href="#prod-RegExpIdentifierName">RegExpIdentifierName</a></emu-nt>s have the same StringValue.
</li>
</ul>
<emu-grammar><emu-production name="QuantifierPrefix" type="lexical" collapsed="">
<emu-nt><a href="#prod-QuantifierPrefix">QuantifierPrefix</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="f47829c0"><emu-t>{</emu-t><emu-nt id="_ref_14470"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_14471"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if the MV of the first <emu-nt id="_ref_14472"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt> is larger than the MV of the second <emu-nt id="_ref_14473"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt>.
</li>
</ul>
<emu-grammar><emu-production name="AtomEscape" type="lexical" collapsed="">
<emu-nt><a href="#prod-AtomEscape">AtomEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="743fd78c"><emu-t>k</emu-t><emu-nt id="_ref_14474"><a href="#prod-GroupName">GroupName</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if the enclosing <emu-nt id="_ref_14475"><a href="#prod-Pattern">Pattern</a></emu-nt> does not contain a <emu-nt id="_ref_14476"><a href="#prod-GroupSpecifier">GroupSpecifier</a></emu-nt> with an enclosed <emu-nt id="_ref_14477"><a href="#prod-RegExpIdentifierName">RegExpIdentifierName</a></emu-nt> whose StringValue equals the StringValue of the <emu-nt id="_ref_14478"><a href="#prod-RegExpIdentifierName">RegExpIdentifierName</a></emu-nt> of this production's <emu-nt id="_ref_14479"><a href="#prod-GroupName">GroupName</a></emu-nt>.
</li>
</ul>
<emu-grammar><emu-production name="AtomEscape" type="lexical" collapsed="">
<emu-nt><a href="#prod-AtomEscape">AtomEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="7ebff96c"><emu-nt id="_ref_14480"><a href="#prod-DecimalEscape">DecimalEscape</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if the CapturingGroupNumber of <emu-nt id="_ref_14481"><a href="#prod-DecimalEscape">DecimalEscape</a></emu-nt> is larger than <var>NcapturingParens</var> (<emu-xref href="#sec-notation" id="_ref_540"><a href="#sec-notation">21.2.2.1</a></emu-xref>).
</li>
</ul>
<emu-grammar><emu-production name="NonemptyClassRanges" type="lexical" collapsed="">
<emu-nt><a href="#prod-NonemptyClassRanges">NonemptyClassRanges</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="a5b9453b"><emu-nt id="_ref_14482"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt><emu-t>-</emu-t><emu-nt id="_ref_14483"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt><emu-nt id="_ref_14484"><a href="#prod-ClassRanges">ClassRanges</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if IsCharacterClass of the first <emu-nt id="_ref_14485"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt> is <emu-val>true</emu-val> or IsCharacterClass of the second <emu-nt id="_ref_14486"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt> is <emu-val>true</emu-val>.
</li>
<li>
It is a Syntax Error if IsCharacterClass of the first <emu-nt id="_ref_14487"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt> is <emu-val>false</emu-val> and IsCharacterClass of the second <emu-nt id="_ref_14488"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt> is <emu-val>false</emu-val> and the CharacterValue of the first <emu-nt id="_ref_14489"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt> is larger than the CharacterValue of the second <emu-nt id="_ref_14490"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt>.
</li>
</ul>
<emu-grammar><emu-production name="NonemptyClassRangesNoDash" type="lexical" collapsed="">
<emu-nt><a href="#prod-NonemptyClassRangesNoDash">NonemptyClassRangesNoDash</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="e9856041"><emu-nt id="_ref_14491"><a href="#prod-ClassAtomNoDash">ClassAtomNoDash</a></emu-nt><emu-t>-</emu-t><emu-nt id="_ref_14492"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt><emu-nt id="_ref_14493"><a href="#prod-ClassRanges">ClassRanges</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if IsCharacterClass of <emu-nt id="_ref_14494"><a href="#prod-ClassAtomNoDash">ClassAtomNoDash</a></emu-nt> is <emu-val>true</emu-val> or IsCharacterClass of <emu-nt id="_ref_14495"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt> is <emu-val>true</emu-val>.
</li>
<li>
It is a Syntax Error if IsCharacterClass of <emu-nt id="_ref_14496"><a href="#prod-ClassAtomNoDash">ClassAtomNoDash</a></emu-nt> is <emu-val>false</emu-val> and IsCharacterClass of <emu-nt id="_ref_14497"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt> is <emu-val>false</emu-val> and the CharacterValue of <emu-nt id="_ref_14498"><a href="#prod-ClassAtomNoDash">ClassAtomNoDash</a></emu-nt> is larger than the CharacterValue of <emu-nt id="_ref_14499"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt>.
</li>
</ul>
<emu-grammar><emu-production name="RegExpIdentifierStart" params="U" type="lexical" collapsed="">
<emu-nt params="U"><a href="#prod-RegExpIdentifierStart">RegExpIdentifierStart</a><emu-mods><emu-params>[U]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="67e6af36"><emu-t>\</emu-t><emu-nt params="?U" id="_ref_14500"><a href="#prod-RegExpUnicodeEscapeSequence">RegExpUnicodeEscapeSequence</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if SV(<emu-nt id="_ref_14501"><a href="#prod-RegExpUnicodeEscapeSequence">RegExpUnicodeEscapeSequence</a></emu-nt>) is none of <code>"$"</code>, or <code>"_"</code>, or the <emu-xref aoid="UTF16Encoding" id="_ref_5973"><a href="#sec-utf16encoding">UTF16Encoding</a></emu-xref> of a code point matched by the <emu-nt id="_ref_14502"><a href="#prod-UnicodeIDStart">UnicodeIDStart</a></emu-nt> lexical grammar production.
</li>
</ul>
<emu-grammar><emu-production name="RegExpIdentifierPart" params="U" type="lexical" collapsed="">
<emu-nt params="U"><a href="#prod-RegExpIdentifierPart">RegExpIdentifierPart</a><emu-mods><emu-params>[U]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="67e6af36"><emu-t>\</emu-t><emu-nt params="?U" id="_ref_14503"><a href="#prod-RegExpUnicodeEscapeSequence">RegExpUnicodeEscapeSequence</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if SV(<emu-nt id="_ref_14504"><a href="#prod-RegExpUnicodeEscapeSequence">RegExpUnicodeEscapeSequence</a></emu-nt>) is none of <code>"$"</code>, or <code>"_"</code>, or the <emu-xref aoid="UTF16Encoding" id="_ref_5974"><a href="#sec-utf16encoding">UTF16Encoding</a></emu-xref> of either &lt;ZWNJ&gt; or &lt;ZWJ&gt;, or the <emu-xref aoid="UTF16Encoding" id="_ref_5975"><a href="#sec-utf16encoding">UTF16Encoding</a></emu-xref> of a Unicode code point that would be matched by the <emu-nt id="_ref_14505"><a href="#prod-UnicodeIDContinue">UnicodeIDContinue</a></emu-nt> lexical grammar production.
</li>
</ul>
<emu-grammar><emu-production name="UnicodePropertyValueExpression" type="lexical" collapsed="">
<emu-nt><a href="#prod-UnicodePropertyValueExpression">UnicodePropertyValueExpression</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="b11de407"><emu-nt id="_ref_14506"><a href="#prod-UnicodePropertyName">UnicodePropertyName</a></emu-nt><emu-t>=</emu-t><emu-nt id="_ref_14507"><a href="#prod-UnicodePropertyValue">UnicodePropertyValue</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5976"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of Unicode code points that is SourceText of <emu-nt id="_ref_14508"><a href="#prod-UnicodePropertyName">UnicodePropertyName</a></emu-nt> is not identical to a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5977"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of Unicode code points that is a Unicode <emu-xref href="#property-name" id="_ref_5978"><a href="#property-name">property name</a></emu-xref> or property alias listed in the “<emu-xref href="#property-name" id="_ref_5979"><a href="#property-name">Property name</a></emu-xref> and aliases” column of <emu-xref href="#table-nonbinary-unicode-properties" id="_ref_541"><a href="#table-nonbinary-unicode-properties">Table 54</a></emu-xref>.
</li>
<li>
It is a Syntax Error if the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5980"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of Unicode code points that is SourceText of <emu-nt id="_ref_14509"><a href="#prod-UnicodePropertyValue">UnicodePropertyValue</a></emu-nt> is not identical to a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5981"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of Unicode code points that is a value or value alias for the Unicode property or property alias given by SourceText of <emu-nt id="_ref_14510"><a href="#prod-UnicodePropertyName">UnicodePropertyName</a></emu-nt> listed in the “Property value and aliases” column of the corresponding tables <emu-xref href="#table-unicode-general-category-values" id="_ref_542"><a href="#table-unicode-general-category-values">Table 56</a></emu-xref> or <emu-xref href="#table-unicode-script-values" id="_ref_543"><a href="#table-unicode-script-values">Table 57</a></emu-xref>.
</li>
</ul>
<emu-grammar><emu-production name="UnicodePropertyValueExpression" type="lexical" collapsed="">
<emu-nt><a href="#prod-UnicodePropertyValueExpression">UnicodePropertyValueExpression</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="25d94190"><emu-nt id="_ref_14511"><a href="#prod-LoneUnicodePropertyNameOrValue">LoneUnicodePropertyNameOrValue</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5982"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of Unicode code points that is SourceText of <emu-nt id="_ref_14512"><a href="#prod-LoneUnicodePropertyNameOrValue">LoneUnicodePropertyNameOrValue</a></emu-nt> is not identical to a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5983"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>
of Unicode code points that is a Unicode general category or general
category alias listed in the “Property value and aliases” column of <emu-xref href="#table-unicode-general-category-values" id="_ref_544"><a href="#table-unicode-general-category-values">Table 56</a></emu-xref>, nor a binary property or binary property alias listed in the “<emu-xref href="#property-name" id="_ref_5984"><a href="#property-name">Property name</a></emu-xref> and aliases” column of <emu-xref href="#table-binary-unicode-properties" id="_ref_545"><a href="#table-binary-unicode-properties">Table 55</a></emu-xref>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-patterns-static-semantics-capturing-group-number">
<h1><span class="secnum">21.2.1.2</span>Static Semantics: CapturingGroupNumber</h1>
<emu-grammar><emu-production name="DecimalEscape" type="lexical" collapsed="">
<emu-nt><a href="#prod-DecimalEscape">DecimalEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="d4c393e5"><emu-nt id="_ref_14513"><a href="#prod-NonZeroDigit">NonZeroDigit</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the MV of <emu-nt id="_ref_14514"><a href="#prod-NonZeroDigit">NonZeroDigit</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="DecimalEscape" type="lexical" collapsed="">
<emu-nt><a href="#prod-DecimalEscape">DecimalEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="3f4b150f"><emu-nt id="_ref_14515"><a href="#prod-NonZeroDigit">NonZeroDigit</a></emu-nt><emu-nt id="_ref_14516"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>n</var> be the number of code points in <emu-nt id="_ref_14517"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt>.</li><li>Return (the MV of <emu-nt id="_ref_14518"><a href="#prod-NonZeroDigit">NonZeroDigit</a></emu-nt> × 10<sup><var>n</var></sup>) plus the MV of <emu-nt id="_ref_14519"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt>.
</li></ol></emu-alg>
<p>The definitions of “the MV of <emu-nt id="_ref_14520"><a href="#prod-NonZeroDigit">NonZeroDigit</a></emu-nt>” and “the MV of <emu-nt id="_ref_14521"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt>” are in <emu-xref href="#sec-literals-numeric-literals" id="_ref_546"><a href="#sec-literals-numeric-literals">11.8.3</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-patterns-static-semantics-is-character-class">
<h1><span class="secnum">21.2.1.3</span>Static Semantics: IsCharacterClass</h1>
<emu-grammar><emu-production name="ClassAtom" type="lexical" collapsed="">
<emu-nt><a href="#prod-ClassAtom">ClassAtom</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="6f24a587"><emu-t>-</emu-t></emu-rhs>
</emu-production>
<emu-production name="ClassAtomNoDash" type="lexical" collapsed="">
<emu-nt><a href="#prod-ClassAtomNoDash">ClassAtomNoDash</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="ecde6e28"><emu-nt id="_ref_14522"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-gmod>but not one of <emu-t>\</emu-t> or <emu-t>]</emu-t> or <emu-t>-</emu-t></emu-gmod></emu-rhs>
</emu-production>
<emu-production name="ClassEscape" type="lexical" collapsed="">
<emu-nt><a href="#prod-ClassEscape">ClassEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="0185ce89"><emu-t>b</emu-t></emu-rhs>
</emu-production>
<emu-production name="ClassEscape" type="lexical" collapsed="">
<emu-nt><a href="#prod-ClassEscape">ClassEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="6f24a587"><emu-t>-</emu-t></emu-rhs>
</emu-production>
<emu-production name="ClassEscape" type="lexical" collapsed="">
<emu-nt><a href="#prod-ClassEscape">ClassEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="163011be"><emu-nt id="_ref_14523"><a href="#prod-CharacterEscape">CharacterEscape</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="ClassEscape" type="lexical" collapsed="">
<emu-nt><a href="#prod-ClassEscape">ClassEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="6f05bee4"><emu-nt id="_ref_14524"><a href="#prod-CharacterClassEscape">CharacterClassEscape</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-patterns-static-semantics-character-value">
<h1><span class="secnum">21.2.1.4</span>Static Semantics: CharacterValue</h1>
<emu-grammar><emu-production name="ClassAtom" type="lexical" collapsed="">
<emu-nt><a href="#prod-ClassAtom">ClassAtom</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="6f24a587"><emu-t>-</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the code point value of U+002D (HYPHEN-MINUS).
</li></ol></emu-alg>
<emu-grammar><emu-production name="ClassAtomNoDash" type="lexical" collapsed="">
<emu-nt><a href="#prod-ClassAtomNoDash">ClassAtomNoDash</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="ecde6e28"><emu-nt id="_ref_14525"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-gmod>but not one of <emu-t>\</emu-t> or <emu-t>]</emu-t> or <emu-t>-</emu-t></emu-gmod></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>ch</var> be the code point matched by <emu-nt id="_ref_14526"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt>.</li><li>Return the code point value of <var>ch</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ClassEscape" type="lexical" collapsed="">
<emu-nt><a href="#prod-ClassEscape">ClassEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="0185ce89"><emu-t>b</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the code point value of U+0008 (BACKSPACE).
</li></ol></emu-alg>
<emu-grammar><emu-production name="ClassEscape" type="lexical" collapsed="">
<emu-nt><a href="#prod-ClassEscape">ClassEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="6f24a587"><emu-t>-</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the code point value of U+002D (HYPHEN-MINUS).
</li></ol></emu-alg>
<emu-grammar><emu-production name="CharacterEscape" type="lexical" collapsed="">
<emu-nt><a href="#prod-CharacterEscape">CharacterEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="f88e7170"><emu-nt id="_ref_14527"><a href="#prod-ControlEscape">ControlEscape</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the code point value according to <emu-xref href="#table-47" id="_ref_547"><a href="#table-47">Table 53</a></emu-xref>.
</li></ol></emu-alg>
<emu-table id="table-47" caption="ControlEscape Code Point Values"><figure><figcaption>Table 53: ControlEscape Code Point Values</figcaption>
<table>
<tbody>
<tr>
<th>
ControlEscape
</th>
<th>
Code Point Value
</th>
<th>
Code Point
</th>
<th>
Unicode Name
</th>
<th>
Symbol
</th>
</tr>
<tr>
<td>
<code>t</code>
</td>
<td>
9
</td>
<td>
<code>U+0009</code>
</td>
<td>
CHARACTER TABULATION
</td>
<td>
&lt;HT&gt;
</td>
</tr>
<tr>
<td>
<code>n</code>
</td>
<td>
10
</td>
<td>
<code>U+000A</code>
</td>
<td>
LINE FEED (LF)
</td>
<td>
&lt;LF&gt;
</td>
</tr>
<tr>
<td>
<code>v</code>
</td>
<td>
11
</td>
<td>
<code>U+000B</code>
</td>
<td>
LINE TABULATION
</td>
<td>
&lt;VT&gt;
</td>
</tr>
<tr>
<td>
<code>f</code>
</td>
<td>
12
</td>
<td>
<code>U+000C</code>
</td>
<td>
FORM FEED (FF)
</td>
<td>
&lt;FF&gt;
</td>
</tr>
<tr>
<td>
<code>r</code>
</td>
<td>
13
</td>
<td>
<code>U+000D</code>
</td>
<td>
CARRIAGE RETURN (CR)
</td>
<td>
&lt;CR&gt;
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<emu-grammar><emu-production name="CharacterEscape" type="lexical" collapsed="">
<emu-nt><a href="#prod-CharacterEscape">CharacterEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="a14dae7e"><emu-t>c</emu-t><emu-nt id="_ref_14528"><a href="#prod-ControlLetter">ControlLetter</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>ch</var> be the code point matched by <emu-nt id="_ref_14529"><a href="#prod-ControlLetter">ControlLetter</a></emu-nt>.</li><li>Let <var>i</var> be <var>ch</var>'s code point value.</li><li>Return the remainder of dividing <var>i</var> by 32.
</li></ol></emu-alg>
<emu-grammar><emu-production name="CharacterEscape" type="lexical" collapsed="">
<emu-nt><a href="#prod-CharacterEscape">CharacterEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="6964a19d"><emu-t>0</emu-t><emu-gann>[lookahead ∉ <emu-nt id="_ref_14530"><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt>]</emu-gann></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the code point value of U+0000 (NULL).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p><code>\0</code> represents the &lt;NUL&gt; character and cannot be followed by a decimal digit.</p>
</div></emu-note>
<emu-grammar><emu-production name="CharacterEscape" type="lexical" collapsed="">
<emu-nt><a href="#prod-CharacterEscape">CharacterEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="a8071b85"><emu-nt id="_ref_14531"><a href="#prod-HexEscapeSequence">HexEscapeSequence</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the numeric value of the code unit that is the SV of <emu-nt id="_ref_14532"><a href="#prod-HexEscapeSequence">HexEscapeSequence</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="RegExpUnicodeEscapeSequence" type="lexical" collapsed="">
<emu-nt><a href="#prod-RegExpUnicodeEscapeSequence">RegExpUnicodeEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="8a1bc222"><emu-t>u</emu-t><emu-nt id="_ref_14533"><a href="#prod-LeadSurrogate">LeadSurrogate</a></emu-nt><emu-t>\u</emu-t><emu-nt id="_ref_14534"><a href="#prod-TrailSurrogate">TrailSurrogate</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>lead</var> be the CharacterValue of <emu-nt id="_ref_14535"><a href="#prod-LeadSurrogate">LeadSurrogate</a></emu-nt>.</li><li>Let <var>trail</var> be the CharacterValue of <emu-nt id="_ref_14536"><a href="#prod-TrailSurrogate">TrailSurrogate</a></emu-nt>.</li><li>Let <var>cp</var> be <emu-xref aoid="UTF16Decode" id="_ref_5985"><a href="#sec-utf16decode">UTF16Decode</a></emu-xref>(<var>lead</var>, <var>trail</var>).</li><li>Return the code point value of <var>cp</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="RegExpUnicodeEscapeSequence" type="lexical" collapsed="">
<emu-nt><a href="#prod-RegExpUnicodeEscapeSequence">RegExpUnicodeEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="36b8a3a6"><emu-t>u</emu-t><emu-nt id="_ref_14537"><a href="#prod-LeadSurrogate">LeadSurrogate</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the CharacterValue of <emu-nt id="_ref_14538"><a href="#prod-LeadSurrogate">LeadSurrogate</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="RegExpUnicodeEscapeSequence" type="lexical" collapsed="">
<emu-nt><a href="#prod-RegExpUnicodeEscapeSequence">RegExpUnicodeEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="d13554f7"><emu-t>u</emu-t><emu-nt id="_ref_14539"><a href="#prod-TrailSurrogate">TrailSurrogate</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the CharacterValue of <emu-nt id="_ref_14540"><a href="#prod-TrailSurrogate">TrailSurrogate</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="RegExpUnicodeEscapeSequence" type="lexical" collapsed="">
<emu-nt><a href="#prod-RegExpUnicodeEscapeSequence">RegExpUnicodeEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="603c9eb4"><emu-t>u</emu-t><emu-nt id="_ref_14541"><a href="#prod-NonSurrogate">NonSurrogate</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the CharacterValue of <emu-nt id="_ref_14542"><a href="#prod-NonSurrogate">NonSurrogate</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="RegExpUnicodeEscapeSequence" type="lexical" collapsed="">
<emu-nt><a href="#prod-RegExpUnicodeEscapeSequence">RegExpUnicodeEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="8072ad8d"><emu-t>u</emu-t><emu-nt id="_ref_14543"><a href="#prod-Hex4Digits">Hex4Digits</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the MV of <emu-nt id="_ref_14544"><a href="#prod-Hex4Digits">Hex4Digits</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="RegExpUnicodeEscapeSequence" type="lexical" collapsed="">
<emu-nt><a href="#prod-RegExpUnicodeEscapeSequence">RegExpUnicodeEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="b98063ef"><emu-t>u{</emu-t><emu-nt id="_ref_14545"><a href="#prod-CodePoint">CodePoint</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the MV of <emu-nt id="_ref_14546"><a href="#prod-CodePoint">CodePoint</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="LeadSurrogate" type="lexical" collapsed="">
<emu-nt><a href="#prod-LeadSurrogate">LeadSurrogate</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="a4fb442c"><emu-nt id="_ref_14547"><a href="#prod-Hex4Digits">Hex4Digits</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="TrailSurrogate" type="lexical" collapsed="">
<emu-nt><a href="#prod-TrailSurrogate">TrailSurrogate</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="a4fb442c"><emu-nt id="_ref_14548"><a href="#prod-Hex4Digits">Hex4Digits</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="NonSurrogate" type="lexical" collapsed="">
<emu-nt><a href="#prod-NonSurrogate">NonSurrogate</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="a4fb442c"><emu-nt id="_ref_14549"><a href="#prod-Hex4Digits">Hex4Digits</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the MV of <emu-nt id="_ref_14550"><a href="#prod-HexDigits">HexDigits</a></emu-nt>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="CharacterEscape" type="lexical" collapsed="">
<emu-nt><a href="#prod-CharacterEscape">CharacterEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="804f428d"><emu-nt id="_ref_14551"><a href="#prod-IdentityEscape">IdentityEscape</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>ch</var> be the code point matched by <emu-nt id="_ref_14552"><a href="#prod-IdentityEscape">IdentityEscape</a></emu-nt>.</li><li>Return the code point value of <var>ch</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-static-semantics-sourcetext">
<h1><span class="secnum">21.2.1.5</span>Static Semantics: SourceText</h1>
<emu-grammar><emu-production name="UnicodePropertyNameCharacters" type="lexical" collapsed="">
<emu-nt><a href="#prod-UnicodePropertyNameCharacters">UnicodePropertyNameCharacters</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="c1247f44"><emu-nt id="_ref_14553"><a href="#prod-UnicodePropertyNameCharacter">UnicodePropertyNameCharacter</a></emu-nt><emu-nt optional="" id="_ref_14554"><a href="#prod-UnicodePropertyNameCharacters">UnicodePropertyNameCharacters</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="UnicodePropertyValueCharacters" type="lexical" collapsed="">
<emu-nt><a href="#prod-UnicodePropertyValueCharacters">UnicodePropertyValueCharacters</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5a208aa0"><emu-nt id="_ref_14555"><a href="#prod-UnicodePropertyValueCharacter">UnicodePropertyValueCharacter</a></emu-nt><emu-nt optional="" id="_ref_14556"><a href="#prod-UnicodePropertyValueCharacters">UnicodePropertyValueCharacters</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5986"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>, in source text order, of Unicode code points in the source text matched by this production.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-regexp-identifier-names-static-semantics-stringvalue">
<h1><span class="secnum">21.2.1.6</span>Static Semantics: StringValue</h1>
<emu-see-also-para op="StringValue"></emu-see-also-para>
<emu-grammar><emu-production name="RegExpIdentifierName" params="U" type="lexical">
<emu-nt params="U"><a href="#prod-RegExpIdentifierName">RegExpIdentifierName</a><emu-mods><emu-params>[U]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="4aeafadc"><emu-nt params="?U" id="_ref_14557"><a href="#prod-RegExpIdentifierStart">RegExpIdentifierStart</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="d8644c18"><emu-nt params="?U" id="_ref_14558"><a href="#prod-RegExpIdentifierName">RegExpIdentifierName</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt><emu-nt params="?U" id="_ref_14559"><a href="#prod-RegExpIdentifierPart">RegExpIdentifierPart</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the String value consisting of the sequence of code units corresponding to <emu-nt id="_ref_14560"><a href="#prod-RegExpIdentifierName">RegExpIdentifierName</a></emu-nt>. In determining the sequence any occurrences of <code>\</code> <emu-nt id="_ref_14561"><a href="#prod-RegExpUnicodeEscapeSequence">RegExpUnicodeEscapeSequence</a></emu-nt> are first replaced with the code point represented by the <emu-nt id="_ref_14562"><a href="#prod-RegExpUnicodeEscapeSequence">RegExpUnicodeEscapeSequence</a></emu-nt> and then the code points of the entire <emu-nt id="_ref_14563"><a href="#prod-RegExpIdentifierName">RegExpIdentifierName</a></emu-nt> are converted to code units by <emu-xref aoid="UTF16Encoding" id="_ref_5987"><a href="#sec-utf16encoding">UTF16Encoding</a></emu-xref> each code point.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-pattern-semantics">
<h1><span class="secnum">21.2.2</span>Pattern Semantics</h1>
<p>A regular expression pattern is converted into an internal
procedure using the process described below. An implementation is
encouraged to use more efficient algorithms than the ones listed below,
as long as the results are the same. The internal procedure is used as
the value of a RegExp object's [[RegExpMatcher]] internal slot.</p>
<p>A <emu-nt id="_ref_14564"><a href="#prod-Pattern">Pattern</a></emu-nt> is either a BMP pattern or a Unicode pattern depending upon whether or not its associated flags contain a <code>"u"</code>.
A BMP pattern matches against a String interpreted as consisting of a
sequence of 16-bit values that are Unicode code points in the range of
the Basic Multilingual Plane. A Unicode pattern matches against a String
interpreted as consisting of Unicode code points encoded using UTF-16.
In the context of describing the behaviour of a BMP pattern “character”
means a single 16-bit Unicode BMP code point. In the context of
describing the behaviour of a Unicode pattern “character” means a UTF-16
encoded code point (<emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_548"><a href="#sec-ecmascript-language-types-string-type">6.1.4</a></emu-xref>). In either context, “character value” means the numeric value of the corresponding non-encoded code point.</p>
<p>The syntax and semantics of <emu-nt id="_ref_14565"><a href="#prod-Pattern">Pattern</a></emu-nt> is defined as if the source code for the <emu-nt id="_ref_14566"><a href="#prod-Pattern">Pattern</a></emu-nt> was a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5988"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of <emu-nt id="_ref_14567"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt> values where each <emu-nt id="_ref_14568"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt> corresponds to a Unicode code point. If a BMP pattern contains a non-BMP <emu-nt id="_ref_14569"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt> the entire pattern is encoded using UTF-16 and the individual code units of that encoding are used as the elements of the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5989"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>For example, consider a pattern expressed in source text as
the single non-BMP character U+1D11E (MUSICAL SYMBOL G CLEF).
Interpreted as a Unicode pattern, it would be a single element
(character) <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5990"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>
consisting of the single code point 0x1D11E. However, interpreted as a
BMP pattern, it is first UTF-16 encoded to produce a two element <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5991"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> consisting of the code units 0xD834 and 0xDD1E.</p>
<p>Patterns are passed to the RegExp <emu-xref href="#constructor" id="_ref_5992"><a href="#constructor">constructor</a></emu-xref>
as ECMAScript String values in which non-BMP characters are UTF-16
encoded. For example, the single character MUSICAL SYMBOL G CLEF
pattern, expressed as a String value, is a String of length 2 whose
elements were the code units 0xD834 and 0xDD1E. So no further
translation of the string would be necessary to process it as a BMP
pattern consisting of two pattern characters. However, to process it as a
Unicode pattern <emu-xref aoid="UTF16Decode" id="_ref_5993"><a href="#sec-utf16decode">UTF16Decode</a></emu-xref> must be used in producing a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5994"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> consisting of a single pattern character, the code point U+1D11E.</p>
<p>An implementation may not actually perform such translations
to or from UTF-16, but the semantics of this specification requires that
the result of pattern matching be as if such translations were
performed.</p>
</div></emu-note>
<emu-clause id="sec-notation">
<h1><span class="secnum">21.2.2.1</span>Notation</h1>
<p>The descriptions below use the following variables:</p>
<ul>
<li>
<var>Input</var> is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5995"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>
consisting of all of the characters, in order, of the String being
matched by the regular expression pattern. Each character is either a
code unit or a code point, depending upon the kind of pattern involved.
The notation <var>Input</var>[<var>n</var>] means the <var>n</var><sup>th</sup> character of <var>Input</var>, where <var>n</var> can range between 0 (inclusive) and <var>InputLength</var> (exclusive).
</li>
<li>
<var>InputLength</var> is the number of characters in <var>Input</var>.
</li>
<li>
<var>NcapturingParens</var> is the total number of left-capturing parentheses (i.e. the total number of <emu-grammar><emu-production name="Atom" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-Atom">Atom</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="59aa089b"><emu-t>(</emu-t><emu-nt id="_ref_14570"><a href="#prod-GroupSpecifier">GroupSpecifier</a></emu-nt><emu-nt id="_ref_14571"><a href="#prod-Disjunction">Disjunction</a></emu-nt><emu-t>)</emu-t></emu-rhs>
</emu-production></emu-grammar> Parse Nodes) in the pattern. A left-capturing parenthesis is any <code>(</code> pattern character that is matched by the <code>(</code> terminal of the <emu-grammar><emu-production name="Atom" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-Atom">Atom</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="59aa089b"><emu-t>(</emu-t><emu-nt id="_ref_14572"><a href="#prod-GroupSpecifier">GroupSpecifier</a></emu-nt><emu-nt id="_ref_14573"><a href="#prod-Disjunction">Disjunction</a></emu-nt><emu-t>)</emu-t></emu-rhs>
</emu-production></emu-grammar> production.
</li>
<li>
<var>DotAll</var> is <emu-val>true</emu-val> if the RegExp object's [[OriginalFlags]] internal slot contains <code>"s"</code> and otherwise is <emu-val>false</emu-val>.
</li>
<li>
<var>IgnoreCase</var> is <emu-val>true</emu-val> if the RegExp object's [[OriginalFlags]] internal slot contains <code>"i"</code> and otherwise is <emu-val>false</emu-val>.
</li>
<li>
<var>Multiline</var> is <emu-val>true</emu-val> if the RegExp object's [[OriginalFlags]] internal slot contains <code>"m"</code> and otherwise is <emu-val>false</emu-val>.
</li>
<li>
<var>Unicode</var> is <emu-val>true</emu-val> if the RegExp object's [[OriginalFlags]] internal slot contains <code>"u"</code> and otherwise is <emu-val>false</emu-val>.
</li>
</ul>
<p>Furthermore, the descriptions below use the following internal data structures:</p>
<ul>
<li>
A <em>CharSet</em> is a mathematical set of characters, either code units or code points depending up the state of the <var>Unicode</var> flag. “All characters” means either all code unit values or all code point values also depending upon the state of <var>Unicode</var>.
</li>
<li>
A <em>State</em> is an ordered pair (<var>endIndex</var>, <var>captures</var>) where <var>endIndex</var> is an integer and <var>captures</var> is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5996"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of <var>NcapturingParens</var> values. States are used to represent partial match states in the regular expression matching algorithms. The <var>endIndex</var> is one plus the index of the last input character matched so far by the pattern, while <var>captures</var> holds the results of capturing parentheses. The <var>n</var><sup>th</sup> element of <var>captures</var> is either a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5997"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> that represents the value obtained by the <var>n</var><sup>th</sup> set of capturing parentheses or <emu-val>undefined</emu-val> if the <var>n</var><sup>th</sup>
set of capturing parentheses hasn't been reached yet. Due to
backtracking, many States may be in use at any time during the matching
process.
</li>
<li>
A <em>MatchResult</em> is either a State or the special token <emu-const>failure</emu-const> that indicates that the match failed.
</li>
<li>
A <em>Continuation</em> procedure is an internal closure
(i.e. an internal procedure with some arguments already bound to values)
that takes one State argument and returns a MatchResult result. If an
internal closure references variables which are bound in the function
that creates the closure, the closure uses the values that these
variables had at the time the closure was created. The Continuation
attempts to match the remaining portion (specified by the closure's
already-bound arguments) of the pattern against <var>Input</var>,
starting at the intermediate state given by its State argument. If the
match succeeds, the Continuation returns the final State that it
reached; if the match fails, the Continuation returns <emu-const>failure</emu-const>.
</li>
<li>
A <em>Matcher</em> procedure is an internal closure that
takes two arguments — a State and a Continuation — and returns a
MatchResult result. A Matcher attempts to match a middle subpattern
(specified by the closure's already-bound arguments) of the pattern
against <var>Input</var>, starting at the intermediate state given by
its State argument. The Continuation argument should be a closure that
matches the rest of the pattern. After matching the subpattern of a
pattern to obtain a new State, the Matcher then calls Continuation on
that new State to test if the rest of the pattern can match as well. If
it can, the Matcher returns the State returned by Continuation; if not,
the Matcher may try different choices at its choice points, repeatedly
calling Continuation until it either succeeds or all possibilities have
been exhausted.
</li>
<li>
An <em>AssertionTester</em> procedure is an internal
closure that takes a State argument and returns a Boolean result. The
assertion tester tests a specific condition (specified by the closure's
already-bound arguments) against the current place in <var>Input</var> and returns <emu-val>true</emu-val> if the condition matched or <emu-val>false</emu-val> if not.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-pattern">
<h1><span class="secnum">21.2.2.2</span>Pattern</h1>
<p>The production <emu-grammar><emu-production name="Pattern" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-Pattern">Pattern</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="79a5bbd0"><emu-nt id="_ref_14574"><a href="#prod-Disjunction">Disjunction</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Evaluate <emu-nt id="_ref_14575"><a href="#prod-Disjunction">Disjunction</a></emu-nt> with +1 as its <var>direction</var> argument to obtain a Matcher <var>m</var>.</li><li>Return an internal closure that takes two arguments, a String <var>str</var> and an integer <var>index</var>, and performs the following steps:<ol><li><emu-xref href="#assert" id="_ref_5998"><a href="#assert">Assert</a></emu-xref>: <var>index</var> ≤ the length of <var>str</var>.</li><li>If <var>Unicode</var> is <emu-val>true</emu-val>, let <var>Input</var> be a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_5999"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> consisting of the sequence of code points of <var>str</var> interpreted as a UTF-16 encoded (<emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_549"><a href="#sec-ecmascript-language-types-string-type">6.1.4</a></emu-xref>) Unicode string. Otherwise, let <var>Input</var> be a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6000"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> consisting of the sequence of code units that are the elements of <var>str</var>. <var>Input</var> will be used throughout the algorithms in <emu-xref href="#sec-pattern-semantics" id="_ref_550"><a href="#sec-pattern-semantics">21.2.2</a></emu-xref>. Each element of <var>Input</var> is considered to be a character.</li><li>Let <var>InputLength</var> be the number of characters contained in <var>Input</var>. This variable will be used throughout the algorithms in <emu-xref href="#sec-pattern-semantics" id="_ref_551"><a href="#sec-pattern-semantics">21.2.2</a></emu-xref>.</li><li>Let <var>listIndex</var> be the index into <var>Input</var> of the character that was obtained from element <var>index</var> of <var>str</var>.</li><li>Let <var>c</var> be a Continuation that always returns its State argument as a successful MatchResult.</li><li>Let <var>cap</var> be a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6001"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of <var>NcapturingParens</var> <emu-val>undefined</emu-val> values, indexed 1 through <var>NcapturingParens</var>.</li><li>Let <var>x</var> be the State (<var>listIndex</var>, <var>cap</var>).</li><li>Call <var>m</var>(<var>x</var>, <var>c</var>) and return its result.
</li></ol></li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>A Pattern evaluates (“compiles”) to an internal procedure value. <emu-xref aoid="RegExpBuiltinExec" id="_ref_6002"><a href="#sec-regexpbuiltinexec">RegExpBuiltinExec</a></emu-xref>
can then apply this procedure to a String and an offset within the
String to determine whether the pattern would match starting at exactly
that offset within the String, and, if it does match, what the values of
the capturing parentheses would be. The algorithms in <emu-xref href="#sec-pattern-semantics" id="_ref_552"><a href="#sec-pattern-semantics">21.2.2</a></emu-xref> are designed so that compiling a pattern may throw a <emu-val>SyntaxError</emu-val>
exception; on the other hand, once the pattern is successfully
compiled, applying the resulting internal procedure to find a match in a
String cannot throw an exception (except for any host-defined
exceptions that can occur anywhere such as out-of-memory).</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-disjunction">
<h1><span class="secnum">21.2.2.3</span>Disjunction</h1>
<p>With parameter <var>direction</var>.</p>
<p>The production <emu-grammar><emu-production name="Disjunction" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-Disjunction">Disjunction</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="3b74e96e"><emu-nt id="_ref_14576"><a href="#prod-Alternative">Alternative</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Evaluate <emu-nt id="_ref_14577"><a href="#prod-Alternative">Alternative</a></emu-nt> with argument <var>direction</var> to obtain a Matcher <var>m</var>.</li><li>Return <var>m</var>.
</li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="Disjunction" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-Disjunction">Disjunction</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="253d8b05"><emu-nt id="_ref_14578"><a href="#prod-Alternative">Alternative</a></emu-nt><emu-t>|</emu-t><emu-nt id="_ref_14579"><a href="#prod-Disjunction">Disjunction</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Evaluate <emu-nt id="_ref_14580"><a href="#prod-Alternative">Alternative</a></emu-nt> with argument <var>direction</var> to obtain a Matcher <var>m1</var>.</li><li>Evaluate <emu-nt id="_ref_14581"><a href="#prod-Disjunction">Disjunction</a></emu-nt> with argument <var>direction</var> to obtain a Matcher <var>m2</var>.</li><li>Return an internal Matcher closure that takes two arguments, a State <var>x</var> and a Continuation <var>c</var>, and performs the following steps when evaluated:<ol><li>Call <var>m1</var>(<var>x</var>, <var>c</var>) and let <var>r</var> be its result.</li><li>If <var>r</var> is not <emu-const>failure</emu-const>, return <var>r</var>.</li><li>Call <var>m2</var>(<var>x</var>, <var>c</var>) and return its result.
</li></ol></li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <code>|</code> regular expression operator separates two alternatives. The pattern first tries to match the left <emu-nt id="_ref_14582"><a href="#prod-Alternative">Alternative</a></emu-nt> (followed by the sequel of the regular expression); if it fails, it tries to match the right <emu-nt id="_ref_14583"><a href="#prod-Disjunction">Disjunction</a></emu-nt> (followed by the sequel of the regular expression). If the left <emu-nt id="_ref_14584"><a href="#prod-Alternative">Alternative</a></emu-nt>, the right <emu-nt id="_ref_14585"><a href="#prod-Disjunction">Disjunction</a></emu-nt>, and the sequel all have choice points, all choices in the sequel are tried before moving on to the next choice in the left <emu-nt id="_ref_14586"><a href="#prod-Alternative">Alternative</a></emu-nt>. If choices in the left <emu-nt id="_ref_14587"><a href="#prod-Alternative">Alternative</a></emu-nt> are exhausted, the right <emu-nt id="_ref_14588"><a href="#prod-Disjunction">Disjunction</a></emu-nt> is tried instead of the left <emu-nt id="_ref_14589"><a href="#prod-Alternative">Alternative</a></emu-nt>. Any capturing parentheses inside a portion of the pattern skipped by <code>|</code> produce <emu-val>undefined</emu-val> values instead of Strings. Thus, for example,</p>
<pre><code class="javascript hljs">/a|ab/.exec(<span class="hljs-string">"abc"</span>)</code></pre>
<p>returns the result <code>"a"</code> and not <code>"ab"</code>. Moreover,</p>
<pre><code class="javascript hljs">/((a)|(ab))((c)|(bc))/.exec(<span class="hljs-string">"abc"</span>)</code></pre>
<p>returns the array</p>
<pre><code class="javascript hljs">[<span class="hljs-string">"abc"</span>, <span class="hljs-string">"a"</span>, <span class="hljs-string">"a"</span>, <span class="hljs-literal">undefined</span>, <span class="hljs-string">"bc"</span>, <span class="hljs-literal">undefined</span>, <span class="hljs-string">"bc"</span>]</code></pre>
<p>and not</p>
<pre><code class="javascript hljs">[<span class="hljs-string">"abc"</span>, <span class="hljs-string">"ab"</span>, <span class="hljs-literal">undefined</span>, <span class="hljs-string">"ab"</span>, <span class="hljs-string">"c"</span>, <span class="hljs-string">"c"</span>, <span class="hljs-literal">undefined</span>]</code></pre>
<p>The order in which the two alternatives are tried is independent of the value of <var>direction</var>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-alternative">
<h1><span class="secnum">21.2.2.4</span>Alternative</h1>
<p>With parameter <var>direction</var>.</p>
<p>The production <emu-grammar><emu-production name="Alternative" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-Alternative">Alternative</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Return a Matcher that takes two arguments, a State <var>x</var> and a Continuation <var>c</var>, and returns the result of calling <var>c</var>(<var>x</var>).
</li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="Alternative" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-Alternative">Alternative</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="bdc4c1a6"><emu-nt id="_ref_14590"><a href="#prod-Alternative">Alternative</a></emu-nt><emu-nt id="_ref_14591"><a href="#prod-Term">Term</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Evaluate <emu-nt id="_ref_14592"><a href="#prod-Alternative">Alternative</a></emu-nt> with argument <var>direction</var> to obtain a Matcher <var>m1</var>.</li><li>Evaluate <emu-nt id="_ref_14593"><a href="#prod-Term">Term</a></emu-nt> with argument <var>direction</var> to obtain a Matcher <var>m2</var>.</li><li>If <var>direction</var> is equal to +1, then<ol><li>Return an internal Matcher closure that takes two arguments, a State <var>x</var> and a Continuation <var>c</var>, and performs the following steps when evaluated:<ol><li>Let <var>d</var> be a Continuation that takes a State argument <var>y</var> and returns the result of calling <var>m2</var>(<var>y</var>, <var>c</var>).</li><li>Call <var>m1</var>(<var>x</var>, <var>d</var>) and return its result.</li></ol></li></ol></li><li>Else,<ol><li><emu-xref href="#assert" id="_ref_6003"><a href="#assert">Assert</a></emu-xref>: <var>direction</var> is equal to -1.</li><li>Return an internal Matcher closure that takes two arguments, a State <var>x</var> and a Continuation <var>c</var>, and performs the following steps when evaluated:<ol><li>Let <var>d</var> be a Continuation that takes a State argument <var>y</var> and returns the result of calling <var>m1</var>(<var>y</var>, <var>c</var>).</li><li>Call <var>m2</var>(<var>x</var>, <var>d</var>) and return its result.
</li></ol></li></ol></li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Consecutive <emu-nt id="_ref_14594"><a href="#prod-Term">Term</a></emu-nt>s try to simultaneously match consecutive portions of <var>Input</var>. When <var>direction</var> is equal to +1, if the left <emu-nt id="_ref_14595"><a href="#prod-Alternative">Alternative</a></emu-nt>, the right <emu-nt id="_ref_14596"><a href="#prod-Term">Term</a></emu-nt>,
and the sequel of the regular expression all have choice points, all
choices in the sequel are tried before moving on to the next choice in
the right <emu-nt id="_ref_14597"><a href="#prod-Term">Term</a></emu-nt>, and all choices in the right <emu-nt id="_ref_14598"><a href="#prod-Term">Term</a></emu-nt> are tried before moving on to the next choice in the left <emu-nt id="_ref_14599"><a href="#prod-Alternative">Alternative</a></emu-nt>. When <var>direction</var> is equal to -1, the evaluation order of <emu-nt id="_ref_14600"><a href="#prod-Alternative">Alternative</a></emu-nt> and <emu-nt id="_ref_14601"><a href="#prod-Term">Term</a></emu-nt> are reversed.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-term">
<h1><span class="secnum">21.2.2.5</span>Term</h1>
<p>With parameter <var>direction</var>.</p>
<p>The production <emu-grammar><emu-production name="Term" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-Term">Term</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="e03dc251"><emu-nt id="_ref_14602"><a href="#prod-Assertion">Assertion</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Return an internal Matcher closure that takes two arguments, a State <var>x</var> and a Continuation <var>c</var>, and performs the following steps when evaluated:<ol><li>Evaluate <emu-nt id="_ref_14603"><a href="#prod-Assertion">Assertion</a></emu-nt> to obtain an AssertionTester <var>t</var>.</li><li>Call <var>t</var>(<var>x</var>) and let <var>r</var> be the resulting Boolean value.</li><li>If <var>r</var> is <emu-val>false</emu-val>, return <emu-const>failure</emu-const>.</li><li>Call <var>c</var>(<var>x</var>) and return its result.
</li></ol></li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The AssertionTester is independent of <var>direction</var>.</p>
</div></emu-note>
<p>The production <emu-grammar><emu-production name="Term" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-Term">Term</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="41dded41"><emu-nt id="_ref_14604"><a href="#prod-Atom">Atom</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Return the Matcher that is the result of evaluating <emu-nt id="_ref_14605"><a href="#prod-Atom">Atom</a></emu-nt> with argument <var>direction</var>.
</li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="Term" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-Term">Term</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="44aed0a4"><emu-nt id="_ref_14606"><a href="#prod-Atom">Atom</a></emu-nt><emu-nt id="_ref_14607"><a href="#prod-Quantifier">Quantifier</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Evaluate <emu-nt id="_ref_14608"><a href="#prod-Atom">Atom</a></emu-nt> with argument <var>direction</var> to obtain a Matcher <var>m</var>.</li><li>Evaluate <emu-nt id="_ref_14609"><a href="#prod-Quantifier">Quantifier</a></emu-nt> to obtain the three results: an integer <var>min</var>, an integer (or ∞) <var>max</var>, and Boolean <var>greedy</var>.</li><li><emu-xref href="#assert" id="_ref_6004"><a href="#assert">Assert</a></emu-xref>: If <var>max</var> is finite, then <var>max</var> is not less than <var>min</var>.</li><li>Let <var>parenIndex</var> be the number of left-capturing parentheses in the entire regular expression that occur to the left of this <emu-nt id="_ref_14610"><a href="#prod-Term">Term</a></emu-nt>. This is the total number of <emu-grammar><emu-production name="Atom" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-Atom">Atom</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="59aa089b"><emu-t>(</emu-t><emu-nt id="_ref_14611"><a href="#prod-GroupSpecifier">GroupSpecifier</a></emu-nt><emu-nt id="_ref_14612"><a href="#prod-Disjunction">Disjunction</a></emu-nt><emu-t>)</emu-t></emu-rhs>
</emu-production></emu-grammar> Parse Nodes prior to or enclosing this <emu-nt id="_ref_14613"><a href="#prod-Term">Term</a></emu-nt>.</li><li>Let <var>parenCount</var> be the number of left-capturing parentheses in <emu-nt id="_ref_14614"><a href="#prod-Atom">Atom</a></emu-nt>. This is the total number of <emu-grammar><emu-production name="Atom" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-Atom">Atom</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="59aa089b"><emu-t>(</emu-t><emu-nt id="_ref_14615"><a href="#prod-GroupSpecifier">GroupSpecifier</a></emu-nt><emu-nt id="_ref_14616"><a href="#prod-Disjunction">Disjunction</a></emu-nt><emu-t>)</emu-t></emu-rhs>
</emu-production></emu-grammar> Parse Nodes enclosed by <emu-nt id="_ref_14617"><a href="#prod-Atom">Atom</a></emu-nt>.</li><li>Return an internal Matcher closure that takes two arguments, a State <var>x</var> and a Continuation <var>c</var>, and performs the following steps when evaluated:<ol><li>Call <emu-xref aoid="RepeatMatcher" id="_ref_6005"><a href="#sec-runtime-semantics-repeatmatcher-abstract-operation">RepeatMatcher</a></emu-xref>(<var>m</var>, <var>min</var>, <var>max</var>, <var>greedy</var>, <var>x</var>, <var>c</var>, <var>parenIndex</var>, <var>parenCount</var>) and return its result.
</li></ol></li></ol></emu-alg>
<emu-clause id="sec-runtime-semantics-repeatmatcher-abstract-operation" aoid="RepeatMatcher">
<h1><span class="secnum">21.2.2.5.1</span>Runtime Semantics: RepeatMatcher ( <var>m</var>, <var>min</var>, <var>max</var>, <var>greedy</var>, <var>x</var>, <var>c</var>, <var>parenIndex</var>, <var>parenCount</var> )</h1>
<p>The abstract operation RepeatMatcher takes eight parameters, a Matcher <var>m</var>, an integer <var>min</var>, an integer (or ∞) <var>max</var>, a Boolean <var>greedy</var>, a State <var>x</var>, a Continuation <var>c</var>, an integer <var>parenIndex</var>, and an integer <var>parenCount</var>, and performs the following steps:</p>
<emu-alg><ol><li>If <var>max</var> is zero, return <var>c</var>(<var>x</var>).</li><li>Let <var>d</var> be an internal Continuation closure that takes one State argument <var>y</var> and performs the following steps when evaluated:<ol><li>If <var>min</var> is zero and <var>y</var>'s <var>endIndex</var> is equal to <var>x</var>'s <var>endIndex</var>, return <emu-const>failure</emu-const>.</li><li>If <var>min</var> is zero, let <var>min2</var> be zero; otherwise let <var>min2</var> be <var>min</var> - 1.</li><li>If <var>max</var> is ∞, let <var>max2</var> be ∞; otherwise let <var>max2</var> be <var>max</var> - 1.</li><li>Call <emu-xref aoid="RepeatMatcher" id="_ref_6006"><a href="#sec-runtime-semantics-repeatmatcher-abstract-operation">RepeatMatcher</a></emu-xref>(<var>m</var>, <var>min2</var>, <var>max2</var>, <var>greedy</var>, <var>y</var>, <var>c</var>, <var>parenIndex</var>, <var>parenCount</var>) and return its result.</li></ol></li><li>Let <var>cap</var> be a copy of <var>x</var>'s <var>captures</var> <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6007"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>For each integer <var>k</var> that satisfies <var>parenIndex</var> &lt; <var>k</var> and <var>k</var> ≤ <var>parenIndex</var> + <var>parenCount</var>, set <var>cap</var>[<var>k</var>] to <emu-val>undefined</emu-val>.</li><li>Let <var>e</var> be <var>x</var>'s <var>endIndex</var>.</li><li>Let <var>xr</var> be the State (<var>e</var>, <var>cap</var>).</li><li>If <var>min</var> is not zero, return <var>m</var>(<var>xr</var>, <var>d</var>).</li><li>If <var>greedy</var> is <emu-val>false</emu-val>, then<ol><li>Call <var>c</var>(<var>x</var>) and let <var>z</var> be its result.</li><li>If <var>z</var> is not <emu-const>failure</emu-const>, return <var>z</var>.</li><li>Call <var>m</var>(<var>xr</var>, <var>d</var>) and return its result.</li></ol></li><li>Call <var>m</var>(<var>xr</var>, <var>d</var>) and let <var>z</var> be its result.</li><li>If <var>z</var> is not <emu-const>failure</emu-const>, return <var>z</var>.</li><li>Call <var>c</var>(<var>x</var>) and return its result.
</li></ol></emu-alg>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>An <emu-nt id="_ref_14618"><a href="#prod-Atom">Atom</a></emu-nt> followed by a <emu-nt id="_ref_14619"><a href="#prod-Quantifier">Quantifier</a></emu-nt> is repeated the number of times specified by the <emu-nt id="_ref_14620"><a href="#prod-Quantifier">Quantifier</a></emu-nt>. A <emu-nt id="_ref_14621"><a href="#prod-Quantifier">Quantifier</a></emu-nt> can be non-greedy, in which case the <emu-nt id="_ref_14622"><a href="#prod-Atom">Atom</a></emu-nt> pattern is repeated as few times as possible while still matching the sequel, or it can be greedy, in which case the <emu-nt id="_ref_14623"><a href="#prod-Atom">Atom</a></emu-nt> pattern is repeated as many times as possible while still matching the sequel. The <emu-nt id="_ref_14624"><a href="#prod-Atom">Atom</a></emu-nt> pattern is repeated rather than the input character sequence that it matches, so different repetitions of the <emu-nt id="_ref_14625"><a href="#prod-Atom">Atom</a></emu-nt> can match different input substrings.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>If the <emu-nt id="_ref_14626"><a href="#prod-Atom">Atom</a></emu-nt> and the sequel of the regular expression all have choice points, the <emu-nt id="_ref_14627"><a href="#prod-Atom">Atom</a></emu-nt>
is first matched as many (or as few, if non-greedy) times as possible.
All choices in the sequel are tried before moving on to the next choice
in the last repetition of <emu-nt id="_ref_14628"><a href="#prod-Atom">Atom</a></emu-nt>. All choices in the last (n<sup>th</sup>) repetition of <emu-nt id="_ref_14629"><a href="#prod-Atom">Atom</a></emu-nt> are tried before moving on to the next choice in the next-to-last (n - 1)<sup>st</sup> repetition of <emu-nt id="_ref_14630"><a href="#prod-Atom">Atom</a></emu-nt>; at which point it may turn out that more or fewer repetitions of <emu-nt id="_ref_14631"><a href="#prod-Atom">Atom</a></emu-nt>
are now possible; these are exhausted (again, starting with either as
few or as many as possible) before moving on to the next choice in the
(n - 1)<sup>st</sup> repetition of <emu-nt id="_ref_14632"><a href="#prod-Atom">Atom</a></emu-nt> and so on.</p>
<p>Compare</p>
<pre><code class="javascript hljs">/a[a-z]{<span class="hljs-number">2</span>,<span class="hljs-number">4</span>}/.exec(<span class="hljs-string">"abcdefghi"</span>)</code></pre>
<p>which returns <code>"abcde"</code> with</p>
<pre><code class="javascript hljs">/a[a-z]{<span class="hljs-number">2</span>,<span class="hljs-number">4</span>}?<span class="hljs-regexp">/.exec("abcdefghi")</span></code></pre>
<p>which returns <code>"abc"</code>.</p>
<p>Consider also</p>
<pre><code class="javascript hljs">/(aa|aabaac|ba|b|c)*<span class="hljs-regexp">/.exec("aabaac")</span></code></pre>
<p>which, by the choice point ordering above, returns the array</p>
<pre><code class="javascript hljs">[<span class="hljs-string">"aaba"</span>, <span class="hljs-string">"ba"</span>]</code></pre>
<p>and not any of:</p>
<pre><code class="javascript hljs">[<span class="hljs-string">"aabaac"</span>, <span class="hljs-string">"aabaac"</span>]
[<span class="hljs-string">"aabaac"</span>, <span class="hljs-string">"c"</span>]</code></pre>
<p>The above ordering of choice points can be used to write a
regular expression that calculates the greatest common divisor of two
numbers (represented in unary notation). The following example
calculates the gcd of 10 and 15:</p>
<pre><code class="javascript hljs"><span class="hljs-string">"aaaaaaaaaa,aaaaaaaaaaaaaaa"</span>.replace(<span class="hljs-regexp">/^(a+)\1*,\1+$/</span>, <span class="hljs-string">"$1"</span>)</code></pre>
<p>which returns the gcd in unary notation <code>"aaaaa"</code>.</p>
</div></emu-note>
<emu-note><span class="note">Note 3</span><div class="note-contents">
<p>Step 4 of the RepeatMatcher clears <emu-nt id="_ref_14633"><a href="#prod-Atom">Atom</a></emu-nt>'s captures each time <emu-nt id="_ref_14634"><a href="#prod-Atom">Atom</a></emu-nt> is repeated. We can see its behaviour in the regular expression</p>
<pre><code class="javascript hljs">/(z)((a+)?(b+)?(c))*<span class="hljs-regexp">/.exec("zaacbbbcac")</span></code></pre>
<p>which returns the array</p>
<pre><code class="javascript hljs">[<span class="hljs-string">"zaacbbbcac"</span>, <span class="hljs-string">"z"</span>, <span class="hljs-string">"ac"</span>, <span class="hljs-string">"a"</span>, <span class="hljs-literal">undefined</span>, <span class="hljs-string">"c"</span>]</code></pre>
<p>and not</p>
<pre><code class="javascript hljs">[<span class="hljs-string">"zaacbbbcac"</span>, <span class="hljs-string">"z"</span>, <span class="hljs-string">"ac"</span>, <span class="hljs-string">"a"</span>, <span class="hljs-string">"bbb"</span>, <span class="hljs-string">"c"</span>]</code></pre>
<p>because each iteration of the outermost <code>*</code> clears all captured Strings contained in the quantified <emu-nt id="_ref_14635"><a href="#prod-Atom">Atom</a></emu-nt>, which in this case includes capture Strings numbered 2, 3, 4, and 5.</p>
</div></emu-note>
<emu-note><span class="note">Note 4</span><div class="note-contents">
<p>Step 1 of the RepeatMatcher's <var>d</var> closure states that, once the minimum number of repetitions has been satisfied, any more expansions of <emu-nt id="_ref_14636"><a href="#prod-Atom">Atom</a></emu-nt>
that match the empty character sequence are not considered for further
repetitions. This prevents the regular expression engine from falling
into an infinite loop on patterns such as:</p>
<pre><code class="javascript hljs">/(a*)*<span class="hljs-regexp">/.exec("b")</span></code></pre>
<p>or the slightly more complicated:</p>
<pre><code class="javascript hljs">/(a*)b\<span class="hljs-number">1</span>+<span class="hljs-regexp">/.exec("baaaac")</span></code></pre>
<p>which returns the array</p>
<pre><code class="javascript hljs">[<span class="hljs-string">"b"</span>, <span class="hljs-string">""</span>]</code></pre>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-assertion">
<h1><span class="secnum">21.2.2.6</span>Assertion</h1>
<p>The production <emu-grammar><emu-production name="Assertion" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-Assertion">Assertion</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="e5878811"><emu-t>^</emu-t></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Return an internal AssertionTester closure that takes a State argument <var>x</var> and performs the following steps when evaluated:<ol><li>Let <var>e</var> be <var>x</var>'s <var>endIndex</var>.</li><li>If <var>e</var> is zero, return <emu-val>true</emu-val>.</li><li>If <var>Multiline</var> is <emu-val>false</emu-val>, return <emu-val>false</emu-val>.</li><li>If the character <var>Input</var>[<var>e</var> - 1] is one of <emu-nt id="_ref_14637"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt>, return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Even when the <code>y</code> flag is used with a pattern, <code>^</code> always matches only at the beginning of <var>Input</var>, or (if <var>Multiline</var> is <emu-val>true</emu-val>) at the beginning of a line.</p>
</div></emu-note>
<p>The production <emu-grammar><emu-production name="Assertion" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-Assertion">Assertion</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="1262cc92"><emu-t>$</emu-t></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Return an internal AssertionTester closure that takes a State argument <var>x</var> and performs the following steps when evaluated:<ol><li>Let <var>e</var> be <var>x</var>'s <var>endIndex</var>.</li><li>If <var>e</var> is equal to <var>InputLength</var>, return <emu-val>true</emu-val>.</li><li>If <var>Multiline</var> is <emu-val>false</emu-val>, return <emu-val>false</emu-val>.</li><li>If the character <var>Input</var>[<var>e</var>] is one of <emu-nt id="_ref_14638"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt>, return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="Assertion" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-Assertion">Assertion</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="1e228da5"><emu-t>\</emu-t><emu-t>b</emu-t></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Return an internal AssertionTester closure that takes a State argument <var>x</var> and performs the following steps when evaluated:<ol><li>Let <var>e</var> be <var>x</var>'s <var>endIndex</var>.</li><li>Call <emu-xref aoid="IsWordChar" id="_ref_6008"><a href="#sec-runtime-semantics-iswordchar-abstract-operation">IsWordChar</a></emu-xref>(<var>e</var> - 1) and let <var>a</var> be the Boolean result.</li><li>Call <emu-xref aoid="IsWordChar" id="_ref_6009"><a href="#sec-runtime-semantics-iswordchar-abstract-operation">IsWordChar</a></emu-xref>(<var>e</var>) and let <var>b</var> be the Boolean result.</li><li>If <var>a</var> is <emu-val>true</emu-val> and <var>b</var> is <emu-val>false</emu-val>, return <emu-val>true</emu-val>.</li><li>If <var>a</var> is <emu-val>false</emu-val> and <var>b</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="Assertion" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-Assertion">Assertion</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="a5dc97fa"><emu-t>\</emu-t><emu-t>B</emu-t></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Return an internal AssertionTester closure that takes a State argument <var>x</var> and performs the following steps when evaluated:<ol><li>Let <var>e</var> be <var>x</var>'s <var>endIndex</var>.</li><li>Call <emu-xref aoid="IsWordChar" id="_ref_6010"><a href="#sec-runtime-semantics-iswordchar-abstract-operation">IsWordChar</a></emu-xref>(<var>e</var> - 1) and let <var>a</var> be the Boolean result.</li><li>Call <emu-xref aoid="IsWordChar" id="_ref_6011"><a href="#sec-runtime-semantics-iswordchar-abstract-operation">IsWordChar</a></emu-xref>(<var>e</var>) and let <var>b</var> be the Boolean result.</li><li>If <var>a</var> is <emu-val>true</emu-val> and <var>b</var> is <emu-val>false</emu-val>, return <emu-val>false</emu-val>.</li><li>If <var>a</var> is <emu-val>false</emu-val> and <var>b</var> is <emu-val>true</emu-val>, return <emu-val>false</emu-val>.</li><li>Return <emu-val>true</emu-val>.
</li></ol></li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="Assertion" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-Assertion">Assertion</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="cfb94f94"><emu-t>(</emu-t><emu-t>?</emu-t><emu-t>=</emu-t><emu-nt id="_ref_14639"><a href="#prod-Disjunction">Disjunction</a></emu-nt><emu-t>)</emu-t></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Evaluate <emu-nt id="_ref_14640"><a href="#prod-Disjunction">Disjunction</a></emu-nt> with +1 as its <var>direction</var> argument to obtain a Matcher <var>m</var>.</li><li>Return an internal Matcher closure that takes two arguments, a State <var>x</var> and a Continuation <var>c</var>, and performs the following steps:<ol><li>Let <var>d</var> be a Continuation that always returns its State argument as a successful MatchResult.</li><li>Call <var>m</var>(<var>x</var>, <var>d</var>) and let <var>r</var> be its result.</li><li>If <var>r</var> is <emu-const>failure</emu-const>, return <emu-const>failure</emu-const>.</li><li>Let <var>y</var> be <var>r</var>'s State.</li><li>Let <var>cap</var> be <var>y</var>'s <var>captures</var> <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6012"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>xe</var> be <var>x</var>'s <var>endIndex</var>.</li><li>Let <var>z</var> be the State (<var>xe</var>, <var>cap</var>).</li><li>Call <var>c</var>(<var>z</var>) and return its result.
</li></ol></li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="Assertion" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-Assertion">Assertion</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="ba98f6e2"><emu-t>(</emu-t><emu-t>?</emu-t><emu-t>!</emu-t><emu-nt id="_ref_14641"><a href="#prod-Disjunction">Disjunction</a></emu-nt><emu-t>)</emu-t></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Evaluate <emu-nt id="_ref_14642"><a href="#prod-Disjunction">Disjunction</a></emu-nt> with +1 as its <var>direction</var> argument to obtain a Matcher <var>m</var>.</li><li>Return an internal Matcher closure that takes two arguments, a State <var>x</var> and a Continuation <var>c</var>, and performs the following steps:<ol><li>Let <var>d</var> be a Continuation that always returns its State argument as a successful MatchResult.</li><li>Call <var>m</var>(<var>x</var>, <var>d</var>) and let <var>r</var> be its result.</li><li>If <var>r</var> is not <emu-const>failure</emu-const>, return <emu-const>failure</emu-const>.</li><li>Call <var>c</var>(<var>x</var>) and return its result.
</li></ol></li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="Assertion" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-Assertion">Assertion</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="8db9fbbe"><emu-t>(</emu-t><emu-t>?</emu-t><emu-t>&lt;=</emu-t><emu-nt id="_ref_14643"><a href="#prod-Disjunction">Disjunction</a></emu-nt><emu-t>)</emu-t></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Evaluate <emu-nt id="_ref_14644"><a href="#prod-Disjunction">Disjunction</a></emu-nt> with -1 as its <var>direction</var> argument to obtain a Matcher <var>m</var>.</li><li>Return an internal Matcher closure that takes two arguments, a State <var>x</var> and a Continuation <var>c</var>, and performs the following steps:<ol><li>Let <var>d</var> be a Continuation that always returns its State argument as a successful MatchResult.</li><li>Call <var>m</var>(<var>x</var>, <var>d</var>) and let <var>r</var> be its result.</li><li>If <var>r</var> is <emu-const>failure</emu-const>, return <emu-const>failure</emu-const>.</li><li>Let <var>y</var> be <var>r</var>'s State.</li><li>Let <var>cap</var> be <var>y</var>'s <var>captures</var> <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6013"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>xe</var> be <var>x</var>'s <var>endIndex</var>.</li><li>Let <var>z</var> be the State (<var>xe</var>, <var>cap</var>).</li><li>Call <var>c</var>(<var>z</var>) and return its result.
</li></ol></li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="Assertion" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-Assertion">Assertion</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="1b07b2c0"><emu-t>(</emu-t><emu-t>?</emu-t><emu-t>&lt;!</emu-t><emu-nt id="_ref_14645"><a href="#prod-Disjunction">Disjunction</a></emu-nt><emu-t>)</emu-t></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Evaluate <emu-nt id="_ref_14646"><a href="#prod-Disjunction">Disjunction</a></emu-nt> with -1 as its <var>direction</var> argument to obtain a Matcher <var>m</var>.</li><li>Return an internal Matcher closure that takes two arguments, a State <var>x</var> and a Continuation <var>c</var>, and performs the following steps:<ol><li>Let <var>d</var> be a Continuation that always returns its State argument as a successful MatchResult.</li><li>Call <var>m</var>(<var>x</var>, <var>d</var>) and let <var>r</var> be its result.</li><li>If <var>r</var> is not <emu-const>failure</emu-const>, return <emu-const>failure</emu-const>.</li><li>Call <var>c</var>(<var>x</var>) and return its result.
</li></ol></li></ol></emu-alg>
<emu-clause id="sec-runtime-semantics-wordcharacters-abstract-operation" aoid="WordCharacters">
<h1><span class="secnum">21.2.2.6.1</span>Runtime Semantics: WordCharacters ( )</h1>
<p>The abstract operation WordCharacters performs the following steps:</p>
<emu-alg><ol><li>Let <var>A</var> be a set of characters containing the sixty-three characters:
<figure>
<table class="lightweight-table">
<tbody>
<tr>
<td>
<code>a</code>
</td>
<td>
<code>b</code>
</td>
<td>
<code>c</code>
</td>
<td>
<code>d</code>
</td>
<td>
<code>e</code>
</td>
<td>
<code>f</code>
</td>
<td>
<code>g</code>
</td>
<td>
<code>h</code>
</td>
<td>
<code>i</code>
</td>
<td>
<code>j</code>
</td>
<td>
<code>k</code>
</td>
<td>
<code>l</code>
</td>
<td>
<code>m</code>
</td>
<td>
<code>n</code>
</td>
<td>
<code>o</code>
</td>
<td>
<code>p</code>
</td>
<td>
<code>q</code>
</td>
<td>
<code>r</code>
</td>
<td>
<code>s</code>
</td>
<td>
<code>t</code>
</td>
<td>
<code>u</code>
</td>
<td>
<code>v</code>
</td>
<td>
<code>w</code>
</td>
<td>
<code>x</code>
</td>
<td>
<code>y</code>
</td>
<td>
<code>z</code>
</td>
</tr>
<tr>
<td>
<code>A</code>
</td>
<td>
<code>B</code>
</td>
<td>
<code>C</code>
</td>
<td>
<code>D</code>
</td>
<td>
<code>E</code>
</td>
<td>
<code>F</code>
</td>
<td>
<code>G</code>
</td>
<td>
<code>H</code>
</td>
<td>
<code>I</code>
</td>
<td>
<code>J</code>
</td>
<td>
<code>K</code>
</td>
<td>
<code>L</code>
</td>
<td>
<code>M</code>
</td>
<td>
<code>N</code>
</td>
<td>
<code>O</code>
</td>
<td>
<code>P</code>
</td>
<td>
<code>Q</code>
</td>
<td>
<code>R</code>
</td>
<td>
<code>S</code>
</td>
<td>
<code>T</code>
</td>
<td>
<code>U</code>
</td>
<td>
<code>V</code>
</td>
<td>
<code>W</code>
</td>
<td>
<code>X</code>
</td>
<td>
<code>Y</code>
</td>
<td>
<code>Z</code>
</td>
</tr>
<tr>
<td>
<code>0</code>
</td>
<td>
<code>1</code>
</td>
<td>
<code>2</code>
</td>
<td>
<code>3</code>
</td>
<td>
<code>4</code>
</td>
<td>
<code>5</code>
</td>
<td>
<code>6</code>
</td>
<td>
<code>7</code>
</td>
<td>
<code>8</code>
</td>
<td>
<code>9</code>
</td>
<td>
<code>_</code>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
</tbody>
</table>
</figure></li><li>Let <var>U</var> be an empty set.</li><li>For each character <var>c</var> not in set <var>A</var> where <emu-xref aoid="Canonicalize" id="_ref_6014"><a href="#sec-runtime-semantics-canonicalize-ch">Canonicalize</a></emu-xref>(<var>c</var>) is in <var>A</var>, add <var>c</var> to <var>U</var>.</li><li><emu-xref href="#assert" id="_ref_6015"><a href="#assert">Assert</a></emu-xref>: Unless <var>Unicode</var> and <var>IgnoreCase</var> are both <emu-val>true</emu-val>, <var>U</var> is empty.</li><li>Add the characters in set <var>U</var> to set <var>A</var>.</li><li>Return <var>A</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-runtime-semantics-iswordchar-abstract-operation" aoid="IsWordChar">
<h1><span class="secnum">21.2.2.6.2</span>Runtime Semantics: IsWordChar ( <var>e</var> )</h1>
<p>The abstract operation IsWordChar takes an integer parameter <var>e</var> and performs the following steps:</p>
<emu-alg><ol><li>If <var>e</var> is -1 or <var>e</var> is <var>InputLength</var>, return <emu-val>false</emu-val>.</li><li>Let <var>c</var> be the character <var>Input</var>[<var>e</var>].</li><li>Let <var>wordChars</var> be the result of !&nbsp;<emu-xref aoid="WordCharacters" id="_ref_6016"><a href="#sec-runtime-semantics-wordcharacters-abstract-operation">WordCharacters</a></emu-xref>().</li><li>If <var>c</var> is in <var>wordChars</var>, return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-quantifier">
<h1><span class="secnum">21.2.2.7</span>Quantifier</h1>
<p>The production <emu-grammar><emu-production name="Quantifier" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-Quantifier">Quantifier</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="0e588d23"><emu-nt id="_ref_14647"><a href="#prod-QuantifierPrefix">QuantifierPrefix</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Evaluate <emu-nt id="_ref_14648"><a href="#prod-QuantifierPrefix">QuantifierPrefix</a></emu-nt> to obtain the two results: an integer <var>min</var> and an integer (or ∞) <var>max</var>.</li><li>Return the three results <var>min</var>, <var>max</var>, and <emu-val>true</emu-val>.
</li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="Quantifier" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-Quantifier">Quantifier</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="0b0b5479"><emu-nt id="_ref_14649"><a href="#prod-QuantifierPrefix">QuantifierPrefix</a></emu-nt><emu-t>?</emu-t></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Evaluate <emu-nt id="_ref_14650"><a href="#prod-QuantifierPrefix">QuantifierPrefix</a></emu-nt> to obtain the two results: an integer <var>min</var> and an integer (or ∞) <var>max</var>.</li><li>Return the three results <var>min</var>, <var>max</var>, and <emu-val>false</emu-val>.
</li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="QuantifierPrefix" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-QuantifierPrefix">QuantifierPrefix</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="b01e734d"><emu-t>*</emu-t></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Return the two results 0 and ∞.
</li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="QuantifierPrefix" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-QuantifierPrefix">QuantifierPrefix</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="e0370b05"><emu-t>+</emu-t></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Return the two results 1 and ∞.
</li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="QuantifierPrefix" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-QuantifierPrefix">QuantifierPrefix</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="232d7160"><emu-t>?</emu-t></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Return the two results 0 and 1.
</li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="QuantifierPrefix" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-QuantifierPrefix">QuantifierPrefix</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="68a2b74e"><emu-t>{</emu-t><emu-nt id="_ref_14651"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Let <var>i</var> be the MV of <emu-nt id="_ref_14652"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt> (see <emu-xref href="#sec-literals-numeric-literals" id="_ref_553"><a href="#sec-literals-numeric-literals">11.8.3</a></emu-xref>).</li><li>Return the two results <var>i</var> and <var>i</var>.
</li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="QuantifierPrefix" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-QuantifierPrefix">QuantifierPrefix</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="82e97391"><emu-t>{</emu-t><emu-nt id="_ref_14653"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-t>,</emu-t><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Let <var>i</var> be the MV of <emu-nt id="_ref_14654"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt>.</li><li>Return the two results <var>i</var> and ∞.
</li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="QuantifierPrefix" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-QuantifierPrefix">QuantifierPrefix</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="f47829c0"><emu-t>{</emu-t><emu-nt id="_ref_14655"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_14656"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Let <var>i</var> be the MV of the first <emu-nt id="_ref_14657"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt>.</li><li>Let <var>j</var> be the MV of the second <emu-nt id="_ref_14658"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt>.</li><li>Return the two results <var>i</var> and <var>j</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-atom">
<h1><span class="secnum">21.2.2.8</span>Atom</h1>
<p>With parameter <var>direction</var>.</p>
<p>The production <emu-grammar><emu-production name="Atom" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-Atom">Atom</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="beff52c4"><emu-nt id="_ref_14659"><a href="#prod-PatternCharacter">PatternCharacter</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Let <var>ch</var> be the character matched by <emu-nt id="_ref_14660"><a href="#prod-PatternCharacter">PatternCharacter</a></emu-nt>.</li><li>Let <var>A</var> be a one-element CharSet containing the character <var>ch</var>.</li><li>Call <emu-xref aoid="CharacterSetMatcher" id="_ref_6017"><a href="#sec-runtime-semantics-charactersetmatcher-abstract-operation">CharacterSetMatcher</a></emu-xref>(<var>A</var>, <emu-val>false</emu-val>, <var>direction</var>) and return its Matcher result.
</li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="Atom" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-Atom">Atom</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="9658e473"><emu-t>.</emu-t></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>If <var>DotAll</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>A</var> be the set of all characters.</li></ol></li><li>Otherwise, let <var>A</var> be the set of all characters except <emu-nt id="_ref_14661"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt>.</li><li>Call <emu-xref aoid="CharacterSetMatcher" id="_ref_6018"><a href="#sec-runtime-semantics-charactersetmatcher-abstract-operation">CharacterSetMatcher</a></emu-xref>(<var>A</var>, <emu-val>false</emu-val>, <var>direction</var>) and return its Matcher result.
</li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="Atom" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-Atom">Atom</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="9ce67ea4"><emu-t>\</emu-t><emu-nt id="_ref_14662"><a href="#prod-AtomEscape">AtomEscape</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Return the Matcher that is the result of evaluating <emu-nt id="_ref_14663"><a href="#prod-AtomEscape">AtomEscape</a></emu-nt> with argument <var>direction</var>.
</li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="Atom" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-Atom">Atom</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="66aaa8b9"><emu-nt id="_ref_14664"><a href="#prod-CharacterClass">CharacterClass</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Evaluate <emu-nt id="_ref_14665"><a href="#prod-CharacterClass">CharacterClass</a></emu-nt> to obtain a CharSet <var>A</var> and a Boolean <var>invert</var>.</li><li>Call <emu-xref aoid="CharacterSetMatcher" id="_ref_6019"><a href="#sec-runtime-semantics-charactersetmatcher-abstract-operation">CharacterSetMatcher</a></emu-xref>(<var>A</var>, <var>invert</var>, <var>direction</var>) and return its Matcher result.
</li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="Atom" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-Atom">Atom</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="59aa089b"><emu-t>(</emu-t><emu-nt id="_ref_14666"><a href="#prod-GroupSpecifier">GroupSpecifier</a></emu-nt><emu-nt id="_ref_14667"><a href="#prod-Disjunction">Disjunction</a></emu-nt><emu-t>)</emu-t></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Evaluate <emu-nt id="_ref_14668"><a href="#prod-Disjunction">Disjunction</a></emu-nt> with argument <var>direction</var> to obtain a Matcher <var>m</var>.</li><li>Let <var>parenIndex</var> be the number of left-capturing parentheses in the entire regular expression that occur to the left of this <emu-nt id="_ref_14669"><a href="#prod-Atom">Atom</a></emu-nt>. This is the total number of <emu-grammar><emu-production name="Atom" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-Atom">Atom</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="59aa089b"><emu-t>(</emu-t><emu-nt id="_ref_14670"><a href="#prod-GroupSpecifier">GroupSpecifier</a></emu-nt><emu-nt id="_ref_14671"><a href="#prod-Disjunction">Disjunction</a></emu-nt><emu-t>)</emu-t></emu-rhs>
</emu-production></emu-grammar> Parse Nodes prior to or enclosing this <emu-nt id="_ref_14672"><a href="#prod-Atom">Atom</a></emu-nt>.</li><li>Return an internal Matcher closure that takes two arguments, a State <var>x</var> and a Continuation <var>c</var>, and performs the following steps:<ol><li>Let <var>d</var> be an internal Continuation closure that takes one State argument <var>y</var> and performs the following steps:<ol><li>Let <var>cap</var> be a copy of <var>y</var>'s <var>captures</var> <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6020"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>xe</var> be <var>x</var>'s <var>endIndex</var>.</li><li>Let <var>ye</var> be <var>y</var>'s <var>endIndex</var>.</li><li>If <var>direction</var> is equal to +1, then<ol><li><emu-xref href="#assert" id="_ref_6021"><a href="#assert">Assert</a></emu-xref>: <var>xe</var> ≤ <var>ye</var>.</li><li>Let <var>s</var> be a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6022"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> whose elements are the characters of <var>Input</var> at indices <var>xe</var> (inclusive) through <var>ye</var> (exclusive).</li></ol></li><li>Else,<ol><li><emu-xref href="#assert" id="_ref_6023"><a href="#assert">Assert</a></emu-xref>: <var>direction</var> is equal to -1.</li><li><emu-xref href="#assert" id="_ref_6024"><a href="#assert">Assert</a></emu-xref>: <var>ye</var> ≤ <var>xe</var>.</li><li>Let <var>s</var> be a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6025"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> whose elements are the characters of <var>Input</var> at indices <var>ye</var> (inclusive) through <var>xe</var> (exclusive).</li></ol></li><li>Set <var>cap</var>[<var>parenIndex</var> + 1] to <var>s</var>.</li><li>Let <var>z</var> be the State (<var>ye</var>, <var>cap</var>).</li><li>Call <var>c</var>(<var>z</var>) and return its result.</li></ol></li><li>Call <var>m</var>(<var>x</var>, <var>d</var>) and return its result.
</li></ol></li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="Atom" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-Atom">Atom</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="d76db7c5"><emu-t>(</emu-t><emu-t>?</emu-t><emu-t>:</emu-t><emu-nt id="_ref_14673"><a href="#prod-Disjunction">Disjunction</a></emu-nt><emu-t>)</emu-t></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Return the Matcher that is the result of evaluating <emu-nt id="_ref_14674"><a href="#prod-Disjunction">Disjunction</a></emu-nt> with argument <var>direction</var>.
</li></ol></emu-alg>
<emu-clause id="sec-runtime-semantics-charactersetmatcher-abstract-operation" aoid="CharacterSetMatcher">
<h1><span class="secnum">21.2.2.8.1</span>Runtime Semantics: CharacterSetMatcher ( <var>A</var>, <var>invert</var>, <var>direction</var> )</h1>
<p>The abstract operation CharacterSetMatcher takes three arguments, a CharSet <var>A</var>, a Boolean flag <var>invert</var>, and an integer <var>direction</var>, and performs the following steps:</p>
<emu-alg><ol><li>Return an internal Matcher closure that takes two arguments, a State <var>x</var> and a Continuation <var>c</var>, and performs the following steps when evaluated:<ol><li>Let <var>e</var> be <var>x</var>'s <var>endIndex</var>.</li><li>Let <var>f</var> be <var>e</var> + <var>direction</var>.</li><li>If <var>f</var> &lt; 0 or <var>f</var> &gt; <var>InputLength</var>, return <emu-const>failure</emu-const>.</li><li>Let <var>index</var> be <emu-xref aoid="min" id="_ref_6026"><a href="#eqn-min">min</a></emu-xref>(<var>e</var>, <var>f</var>).</li><li>Let <var>ch</var> be the character <var>Input</var>[<var>index</var>].</li><li>Let <var>cc</var> be <emu-xref aoid="Canonicalize" id="_ref_6027"><a href="#sec-runtime-semantics-canonicalize-ch">Canonicalize</a></emu-xref>(<var>ch</var>).</li><li>If <var>invert</var> is <emu-val>false</emu-val>, then<ol><li>If there does not exist a member <var>a</var> of set <var>A</var> such that <emu-xref aoid="Canonicalize" id="_ref_6028"><a href="#sec-runtime-semantics-canonicalize-ch">Canonicalize</a></emu-xref>(<var>a</var>) is <var>cc</var>, return <emu-const>failure</emu-const>.</li></ol></li><li>Else,<ol><li><emu-xref href="#assert" id="_ref_6029"><a href="#assert">Assert</a></emu-xref>: <var>invert</var> is <emu-val>true</emu-val>.</li><li>If there exists a member <var>a</var> of set <var>A</var> such that <emu-xref aoid="Canonicalize" id="_ref_6030"><a href="#sec-runtime-semantics-canonicalize-ch">Canonicalize</a></emu-xref>(<var>a</var>) is <var>cc</var>, return <emu-const>failure</emu-const>.</li></ol></li><li>Let <var>cap</var> be <var>x</var>'s <var>captures</var> <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6031"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>y</var> be the State (<var>f</var>, <var>cap</var>).</li><li>Call <var>c</var>(<var>y</var>) and return its result.
</li></ol></li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-runtime-semantics-canonicalize-ch" aoid="Canonicalize">
<h1><span class="secnum">21.2.2.8.2</span>Runtime Semantics: Canonicalize ( <var>ch</var> )</h1>
<p>The abstract operation Canonicalize takes a character parameter <var>ch</var> and performs the following steps:</p>
<emu-alg><ol><li>If <var>IgnoreCase</var> is <emu-val>false</emu-val>, return <var>ch</var>.</li><li>If <var>Unicode</var> is <emu-val>true</emu-val>, then<ol><li>If the file CaseFolding.txt of the Unicode Character Database provides a simple or common case folding mapping for <var>ch</var>, return the result of applying that mapping to <var>ch</var>.</li><li>Return <var>ch</var>.</li></ol></li><li>Else,<ol><li><emu-xref href="#assert" id="_ref_6032"><a href="#assert">Assert</a></emu-xref>: <var>ch</var> is a UTF-16 code unit.</li><li>Let <var>s</var> be the String value consisting of the single code unit <var>ch</var>.</li><li>Let <var>u</var> be the same result produced as if by performing the algorithm for <code>String.prototype.toUpperCase</code> using <var>s</var> as the <emu-val>this</emu-val> value.</li><li><emu-xref href="#assert" id="_ref_6033"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_6034"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>u</var>) is String.</li><li>If <var>u</var> does not consist of a single code unit, return <var>ch</var>.</li><li>Let <var>cu</var> be <var>u</var>'s single code unit element.</li><li>If the numeric value of <var>ch</var> ≥ 128 and the numeric value of <var>cu</var> &lt; 128, return <var>ch</var>.</li><li>Return <var>cu</var>.
</li></ol></li></ol></emu-alg>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>Parentheses of the form <code>(</code> <emu-nt id="_ref_14675"><a href="#prod-Disjunction">Disjunction</a></emu-nt> <code>)</code> serve both to group the components of the <emu-nt id="_ref_14676"><a href="#prod-Disjunction">Disjunction</a></emu-nt> pattern together and to save the result of the match. The result can be used either in a backreference (<code>\</code>
followed by a nonzero decimal number), referenced in a replace String,
or returned as part of an array from the regular expression matching
internal procedure. To inhibit the capturing behaviour of parentheses,
use the form <code>(?:</code> <emu-nt id="_ref_14677"><a href="#prod-Disjunction">Disjunction</a></emu-nt> <code>)</code> instead.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The form <code>(?=</code> <emu-nt id="_ref_14678"><a href="#prod-Disjunction">Disjunction</a></emu-nt> <code>)</code> specifies a zero-width positive lookahead. In order for it to succeed, the pattern inside <emu-nt id="_ref_14679"><a href="#prod-Disjunction">Disjunction</a></emu-nt> must match at the current position, but the current position is not advanced before matching the sequel. If <emu-nt id="_ref_14680"><a href="#prod-Disjunction">Disjunction</a></emu-nt>
can match at the current position in several ways, only the first one
is tried. Unlike other regular expression operators, there is no
backtracking into a <code>(?=</code> form (this unusual behaviour is inherited from Perl). This only matters when the <emu-nt id="_ref_14681"><a href="#prod-Disjunction">Disjunction</a></emu-nt> contains capturing parentheses and the sequel of the pattern contains backreferences to those captures.</p>
<p>For example,</p>
<pre><code class="javascript hljs">/(?=(a+))/.exec(<span class="hljs-string">"baaabac"</span>)</code></pre>
<p>matches the empty String immediately after the first <code>b</code> and therefore returns the array:</p>
<pre><code class="javascript hljs">[<span class="hljs-string">""</span>, <span class="hljs-string">"aaa"</span>]</code></pre>
<p>To illustrate the lack of backtracking into the lookahead, consider:</p>
<pre><code class="javascript hljs">/(?=(a+))a*b\<span class="hljs-number">1</span>/.exec(<span class="hljs-string">"baaabac"</span>)</code></pre>
<p>This expression returns</p>
<pre><code class="javascript hljs">[<span class="hljs-string">"aba"</span>, <span class="hljs-string">"a"</span>]</code></pre>
<p>and not:</p>
<pre><code class="javascript hljs">[<span class="hljs-string">"aaaba"</span>, <span class="hljs-string">"a"</span>]</code></pre>
</div></emu-note>
<emu-note><span class="note">Note 3</span><div class="note-contents">
<p>The form <code>(?!</code> <emu-nt id="_ref_14682"><a href="#prod-Disjunction">Disjunction</a></emu-nt> <code>)</code> specifies a zero-width negative lookahead. In order for it to succeed, the pattern inside <emu-nt id="_ref_14683"><a href="#prod-Disjunction">Disjunction</a></emu-nt> must fail to match at the current position. The current position is not advanced before matching the sequel. <emu-nt id="_ref_14684"><a href="#prod-Disjunction">Disjunction</a></emu-nt> can contain capturing parentheses, but backreferences to them only make sense from within <emu-nt id="_ref_14685"><a href="#prod-Disjunction">Disjunction</a></emu-nt> itself. Backreferences to these capturing parentheses from elsewhere in the pattern always return <emu-val>undefined</emu-val> because the negative lookahead must fail for the pattern to succeed. For example,</p>
<pre><code class="javascript hljs">/(.*?)a(?!(a+)b\<span class="hljs-number">2</span>c)\<span class="hljs-number">2</span>(.*)/.exec(<span class="hljs-string">"baaabaac"</span>)</code></pre>
<p>looks for an <code>a</code> not immediately followed by some positive number n of <code>a</code>'s, a <code>b</code>, another n <code>a</code>'s (specified by the first <code>\2</code>) and a <code>c</code>. The second <code>\2</code> is outside the negative lookahead, so it matches against <emu-val>undefined</emu-val> and therefore always succeeds. The whole expression returns the array:</p>
<pre><code class="javascript hljs">[<span class="hljs-string">"baaabaac"</span>, <span class="hljs-string">"ba"</span>, <span class="hljs-literal">undefined</span>, <span class="hljs-string">"abaac"</span>]</code></pre>
</div></emu-note>
<emu-note><span class="note">Note 4</span><div class="note-contents">
<p>In case-insignificant matches when <var>Unicode</var> is <emu-val>true</emu-val>,
all characters are implicitly case-folded using the simple mapping
provided by the Unicode standard immediately before they are compared.
The simple mapping always maps to a single code point, so it does not
map, for example, <code>"ß"</code> (U+00DF) to <code>"SS"</code>. It may however map a code point outside the Basic Latin range to a character within, for example, <code>"ſ"</code> (U+017F) to <code>"s"</code>. Such characters are not mapped if <var>Unicode</var> is <emu-val>false</emu-val>. This prevents Unicode code points such as U+017F and U+212A from matching regular expressions such as <code>/[a-z]/i</code>, but they will match <code>/[a-z]/ui</code>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-runtime-semantics-unicodematchproperty-p" aoid="UnicodeMatchProperty">
<h1><span class="secnum">21.2.2.8.3</span>Runtime Semantics: UnicodeMatchProperty ( <var>p</var> )</h1>
<p>The abstract operation UnicodeMatchProperty takes a parameter <var>p</var> that is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6035"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of Unicode code points and performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_6036"><a href="#assert">Assert</a></emu-xref>: <var>p</var> is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6037"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of Unicode code points that is identical to a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6038"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of Unicode code points that is a Unicode <emu-xref href="#property-name" id="_ref_6039"><a href="#property-name">property name</a></emu-xref> or property alias listed in the “<emu-xref href="#property-name" id="_ref_6040"><a href="#property-name">Property name</a></emu-xref> and aliases” column of <emu-xref href="#table-nonbinary-unicode-properties" id="_ref_554"><a href="#table-nonbinary-unicode-properties">Table 54</a></emu-xref> or <emu-xref href="#table-binary-unicode-properties" id="_ref_555"><a href="#table-binary-unicode-properties">Table 55</a></emu-xref>.</li><li>Let <var>c</var> be the canonical <emu-xref href="#property-name" id="_ref_6041"><a href="#property-name">property name</a></emu-xref> of <var>p</var> as given in the “Canonical <emu-xref href="#property-name" id="_ref_6042"><a href="#property-name">property name</a></emu-xref>” column of the corresponding row.</li><li>Return the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6043"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of Unicode code points of <var>c</var>.
</li></ol></emu-alg>
<p>Implementations must support the Unicode property names and aliases listed in <emu-xref href="#table-nonbinary-unicode-properties" id="_ref_556"><a href="#table-nonbinary-unicode-properties">Table 54</a></emu-xref> and <emu-xref href="#table-binary-unicode-properties" id="_ref_557"><a href="#table-binary-unicode-properties">Table 55</a></emu-xref>. To ensure interoperability, implementations must not support any other property names or aliases.</p>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>For example, <code>Script_Extensions</code> (<emu-xref href="#property-name" id="_ref_6044"><a href="#property-name">property name</a></emu-xref>) and <code>scx</code> (property alias) are valid, but <code>script_extensions</code> or <code>Scx</code> aren't.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The listed properties form a superset of what <a href="https://unicode.org/reports/tr18/#RL1.2">UTS18 RL1.2</a> requires.</p>
</div></emu-note>
<emu-import href="table-nonbinary-unicode-properties.html"><emu-table id="table-nonbinary-unicode-properties"><figure><figcaption>Table 54: Non-binary Unicode property aliases and their canonical property names</figcaption>
<table class="real-table unicode-property-table">
<thead>
<tr>
<th><emu-xref href="#property-name" id="_ref_6045"><a href="#property-name">Property name</a></emu-xref> and aliases</th>
<th>Canonical <emu-xref href="#property-name" id="_ref_6046"><a href="#property-name">property name</a></emu-xref></th>
</tr>
</thead>
<tbody><tr>
<td>
<ul>
<li><code>General_Category</code></li>
<li><code>gc</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr18/#General_Category_Property"><code>General_Category</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>Script</code></li>
<li><code>sc</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr24/#Script"><code>Script</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>Script_Extensions</code></li>
<li><code>scx</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr24/#Script_Extensions"><code>Script_Extensions</code></a></td>
</tr>
</tbody></table>
</figure></emu-table>
</emu-import>
<emu-import href="table-binary-unicode-properties.html"><emu-table id="table-binary-unicode-properties"><figure><figcaption>Table 55: Binary Unicode property aliases and their canonical property names</figcaption>
<table class="real-table unicode-property-table">
<thead>
<tr>
<th><emu-xref href="#property-name" id="_ref_6047"><a href="#property-name">Property name</a></emu-xref> and aliases</th>
<th>Canonical <emu-xref href="#property-name" id="_ref_6048"><a href="#property-name">property name</a></emu-xref></th>
</tr>
</thead>
<tbody><tr>
<td><code>ASCII</code></td>
<td><a href="https://unicode.org/reports/tr18/#General_Category_Property"><code>ASCII</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>ASCII_Hex_Digit</code></li>
<li><code>AHex</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#ASCII_Hex_Digit"><code>ASCII_Hex_Digit</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>Alphabetic</code></li>
<li><code>Alpha</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#Alphabetic"><code>Alphabetic</code></a></td>
</tr>
<tr>
<td><code>Any</code></td>
<td><a href="https://unicode.org/reports/tr18/#General_Category_Property"><code>Any</code></a></td>
</tr>
<tr>
<td><code>Assigned</code></td>
<td><a href="https://unicode.org/reports/tr18/#General_Category_Property"><code>Assigned</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>Bidi_Control</code></li>
<li><code>Bidi_C</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#Bidi_Control"><code>Bidi_Control</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>Bidi_Mirrored</code></li>
<li><code>Bidi_M</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#Bidi_Mirrored"><code>Bidi_Mirrored</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>Case_Ignorable</code></li>
<li><code>CI</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#Case_Ignorable"><code>Case_Ignorable</code></a></td>
</tr>
<tr>
<td><code>Cased</code></td>
<td><a href="https://unicode.org/reports/tr44/#Cased"><code>Cased</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>Changes_When_Casefolded</code></li>
<li><code>CWCF</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#CWCF"><code>Changes_When_Casefolded</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>Changes_When_Casemapped</code></li>
<li><code>CWCM</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#CWCM"><code>Changes_When_Casemapped</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>Changes_When_Lowercased</code></li>
<li><code>CWL</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#CWL"><code>Changes_When_Lowercased</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>Changes_When_NFKC_Casefolded</code></li>
<li><code>CWKCF</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#CWKCF"><code>Changes_When_NFKC_Casefolded</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>Changes_When_Titlecased</code></li>
<li><code>CWT</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#CWT"><code>Changes_When_Titlecased</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>Changes_When_Uppercased</code></li>
<li><code>CWU</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#CWU"><code>Changes_When_Uppercased</code></a></td>
</tr>
<tr>
<td><code>Dash</code></td>
<td><a href="https://unicode.org/reports/tr44/#Dash"><code>Dash</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>Default_Ignorable_Code_Point</code></li>
<li><code>DI</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#Default_Ignorable_Code_Point"><code>Default_Ignorable_Code_Point</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>Deprecated</code></li>
<li><code>Dep</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#Deprecated"><code>Deprecated</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>Diacritic</code></li>
<li><code>Dia</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#Diacritic"><code>Diacritic</code></a></td>
</tr>
<tr>
<td><code>Emoji</code></td>
<td><a href="https://unicode.org/reports/tr51/#Emoji_Properties"><code>Emoji</code></a></td>
</tr>
<tr>
<td><code>Emoji_Component</code></td>
<td><a href="https://unicode.org/reports/tr51/#Emoji_Properties"><code>Emoji_Component</code></a></td>
</tr>
<tr>
<td><code>Emoji_Modifier</code></td>
<td><a href="https://unicode.org/reports/tr51/#Emoji_Properties"><code>Emoji_Modifier</code></a></td>
</tr>
<tr>
<td><code>Emoji_Modifier_Base</code></td>
<td><a href="https://unicode.org/reports/tr51/#Emoji_Properties"><code>Emoji_Modifier_Base</code></a></td>
</tr>
<tr>
<td><code>Emoji_Presentation</code></td>
<td><a href="https://unicode.org/reports/tr51/#Emoji_Properties"><code>Emoji_Presentation</code></a></td>
</tr>
<tr>
<td><code>Extended_Pictographic</code></td>
<td><a href="https://unicode.org/reports/tr51/#Emoji_Properties"><code>Extended_Pictographic</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>Extender</code></li>
<li><code>Ext</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#Extender"><code>Extender</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>Grapheme_Base</code></li>
<li><code>Gr_Base</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#Grapheme_Base"><code>Grapheme_Base</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>Grapheme_Extend</code></li>
<li><code>Gr_Ext</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#Grapheme_Extend"><code>Grapheme_Extend</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>Hex_Digit</code></li>
<li><code>Hex</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#Hex_Digit"><code>Hex_Digit</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>IDS_Binary_Operator</code></li>
<li><code>IDSB</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#IDS_Binary_Operator"><code>IDS_Binary_Operator</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>IDS_Trinary_Operator</code></li>
<li><code>IDST</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#IDS_Trinary_Operator"><code>IDS_Trinary_Operator</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>ID_Continue</code></li>
<li><code>IDC</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#ID_Continue"><code>ID_Continue</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>ID_Start</code></li>
<li><code>IDS</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#ID_Start"><code>ID_Start</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>Ideographic</code></li>
<li><code>Ideo</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#Ideographic"><code>Ideographic</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>Join_Control</code></li>
<li><code>Join_C</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#Join_Control"><code>Join_Control</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>Logical_Order_Exception</code></li>
<li><code>LOE</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#Logical_Order_Exception"><code>Logical_Order_Exception</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>Lowercase</code></li>
<li><code>Lower</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#Lowercase"><code>Lowercase</code></a></td>
</tr>
<tr>
<td><code>Math</code></td>
<td><a href="https://unicode.org/reports/tr44/#Math"><code>Math</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>Noncharacter_Code_Point</code></li>
<li><code>NChar</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#Noncharacter_Code_Point"><code>Noncharacter_Code_Point</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>Pattern_Syntax</code></li>
<li><code>Pat_Syn</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#Pattern_Syntax"><code>Pattern_Syntax</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>Pattern_White_Space</code></li>
<li><code>Pat_WS</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#Pattern_White_Space"><code>Pattern_White_Space</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>Quotation_Mark</code></li>
<li><code>QMark</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#Quotation_Mark"><code>Quotation_Mark</code></a></td>
</tr>
<tr>
<td><code>Radical</code></td>
<td><a href="https://unicode.org/reports/tr44/#Radical"><code>Radical</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>Regional_Indicator</code></li>
<li><code>RI</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#Regional_Indicator"><code>Regional_Indicator</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>Sentence_Terminal</code></li>
<li><code>STerm</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#STerm"><code>Sentence_Terminal</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>Soft_Dotted</code></li>
<li><code>SD</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#Soft_Dotted"><code>Soft_Dotted</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>Terminal_Punctuation</code></li>
<li><code>Term</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#Terminal_Punctuation"><code>Terminal_Punctuation</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>Unified_Ideograph</code></li>
<li><code>UIdeo</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#Unified_Ideograph"><code>Unified_Ideograph</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>Uppercase</code></li>
<li><code>Upper</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#Uppercase"><code>Uppercase</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>Variation_Selector</code></li>
<li><code>VS</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#Variation_Selector"><code>Variation_Selector</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>White_Space</code></li>
<li><code>space</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#White_Space"><code>White_Space</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>XID_Continue</code></li>
<li><code>XIDC</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#XID_Continue"><code>XID_Continue</code></a></td>
</tr>
<tr>
<td>
<ul>
<li><code>XID_Start</code></li>
<li><code>XIDS</code></li>
</ul>
</td>
<td><a href="https://unicode.org/reports/tr44/#XID_Start"><code>XID_Start</code></a></td>
</tr>
</tbody></table>
</figure></emu-table>
</emu-import>
</emu-clause>
<emu-clause id="sec-runtime-semantics-unicodematchpropertyvalue-p-v" aoid="UnicodeMatchPropertyValue">
<h1><span class="secnum">21.2.2.8.4</span>Runtime Semantics: UnicodeMatchPropertyValue ( <var>p</var>, <var>v</var> )</h1>
<p>The abstract operation UnicodeMatchPropertyValue takes two parameters <var>p</var> and <var>v</var>, each of which is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6049"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of Unicode code points, and performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_6050"><a href="#assert">Assert</a></emu-xref>: <var>p</var> is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6051"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of Unicode code points that is identical to a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6052"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of Unicode code points that is a canonical, unaliased Unicode <emu-xref href="#property-name" id="_ref_6053"><a href="#property-name">property name</a></emu-xref> listed in the “Canonical <emu-xref href="#property-name" id="_ref_6054"><a href="#property-name">property name</a></emu-xref>” column of <emu-xref href="#table-nonbinary-unicode-properties" id="_ref_558"><a href="#table-nonbinary-unicode-properties">Table 54</a></emu-xref>.</li><li><emu-xref href="#assert" id="_ref_6055"><a href="#assert">Assert</a></emu-xref>: <var>v</var> is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6056"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of Unicode code points that is identical to a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6057"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of Unicode code points that is a property value or property value alias for Unicode property <var>p</var> listed in the “Property value and aliases” column of <emu-xref href="#table-unicode-general-category-values" id="_ref_559"><a href="#table-unicode-general-category-values">Table 56</a></emu-xref> or <emu-xref href="#table-unicode-script-values" id="_ref_560"><a href="#table-unicode-script-values">Table 57</a></emu-xref>.</li><li>Let <var>value</var> be the canonical property value of <var>v</var> as given in the “Canonical property value” column of the corresponding row.</li><li>Return the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6058"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of Unicode code points of <var>value</var>.
</li></ol></emu-alg>
<p>Implementations must support the Unicode property value names and aliases listed in <emu-xref href="#table-unicode-general-category-values" id="_ref_561"><a href="#table-unicode-general-category-values">Table 56</a></emu-xref> and <emu-xref href="#table-unicode-script-values" id="_ref_562"><a href="#table-unicode-script-values">Table 57</a></emu-xref>. To ensure interoperability, implementations must not support any other property value names or aliases.</p>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>For example, <code>Xpeo</code> and <code>Old_Persian</code> are valid <code>Script_Extensions</code> values, but <code>xpeo</code> and <code>Old Persian</code> aren't.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>This algorithm differs from <a href="https://unicode.org/reports/tr44/#Matching_Symbolic">the matching rules for symbolic values listed in UAX44</a>: case, <emu-xref href="#sec-white-space" id="_ref_563"><a href="#sec-white-space">white space</a></emu-xref>, U+002D (HYPHEN-MINUS), and U+005F (LOW LINE) are not ignored, and the <code>Is</code> prefix is not supported.</p>
</div></emu-note>
<emu-import href="table-unicode-general-category-values.html"><emu-table id="table-unicode-general-category-values"><figure><figcaption>Table 56: Value aliases and canonical values for the Unicode property <a href="https://unicode.org/reports/tr18/#General_Category_Property"><code>General_Category</code></a></figcaption>
<table class="real-table unicode-property-table">
<thead>
<tr>
<th>Property value and aliases</th>
<th>Canonical property value</th>
</tr>
</thead>
<tbody><tr>
<td>
<ul>
<li><code>Cased_Letter</code></li>
<li><code>LC</code></li>
</ul>
</td>
<td><code>Cased_Letter</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Close_Punctuation</code></li>
<li><code>Pe</code></li>
</ul>
</td>
<td><code>Close_Punctuation</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Connector_Punctuation</code></li>
<li><code>Pc</code></li>
</ul>
</td>
<td><code>Connector_Punctuation</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Control</code></li>
<li><code>Cc</code></li>
<li><code>cntrl</code></li>
</ul>
</td>
<td><code>Control</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Currency_Symbol</code></li>
<li><code>Sc</code></li>
</ul>
</td>
<td><code>Currency_Symbol</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Dash_Punctuation</code></li>
<li><code>Pd</code></li>
</ul>
</td>
<td><code>Dash_Punctuation</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Decimal_Number</code></li>
<li><code>Nd</code></li>
<li><code>digit</code></li>
</ul>
</td>
<td><code>Decimal_Number</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Enclosing_Mark</code></li>
<li><code>Me</code></li>
</ul>
</td>
<td><code>Enclosing_Mark</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Final_Punctuation</code></li>
<li><code>Pf</code></li>
</ul>
</td>
<td><code>Final_Punctuation</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Format</code></li>
<li><code>Cf</code></li>
</ul>
</td>
<td><code>Format</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Initial_Punctuation</code></li>
<li><code>Pi</code></li>
</ul>
</td>
<td><code>Initial_Punctuation</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Letter</code></li>
<li><code>L</code></li>
</ul>
</td>
<td><code>Letter</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Letter_Number</code></li>
<li><code>Nl</code></li>
</ul>
</td>
<td><code>Letter_Number</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Line_Separator</code></li>
<li><code>Zl</code></li>
</ul>
</td>
<td><code>Line_Separator</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Lowercase_Letter</code></li>
<li><code>Ll</code></li>
</ul>
</td>
<td><code>Lowercase_Letter</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Mark</code></li>
<li><code>M</code></li>
<li><code>Combining_Mark</code></li>
</ul>
</td>
<td><code>Mark</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Math_Symbol</code></li>
<li><code>Sm</code></li>
</ul>
</td>
<td><code>Math_Symbol</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Modifier_Letter</code></li>
<li><code>Lm</code></li>
</ul>
</td>
<td><code>Modifier_Letter</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Modifier_Symbol</code></li>
<li><code>Sk</code></li>
</ul>
</td>
<td><code>Modifier_Symbol</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Nonspacing_Mark</code></li>
<li><code>Mn</code></li>
</ul>
</td>
<td><code>Nonspacing_Mark</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Number</code></li>
<li><code>N</code></li>
</ul>
</td>
<td><code>Number</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Open_Punctuation</code></li>
<li><code>Ps</code></li>
</ul>
</td>
<td><code>Open_Punctuation</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Other</code></li>
<li><code>C</code></li>
</ul>
</td>
<td><code>Other</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Other_Letter</code></li>
<li><code>Lo</code></li>
</ul>
</td>
<td><code>Other_Letter</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Other_Number</code></li>
<li><code>No</code></li>
</ul>
</td>
<td><code>Other_Number</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Other_Punctuation</code></li>
<li><code>Po</code></li>
</ul>
</td>
<td><code>Other_Punctuation</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Other_Symbol</code></li>
<li><code>So</code></li>
</ul>
</td>
<td><code>Other_Symbol</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Paragraph_Separator</code></li>
<li><code>Zp</code></li>
</ul>
</td>
<td><code>Paragraph_Separator</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Private_Use</code></li>
<li><code>Co</code></li>
</ul>
</td>
<td><code>Private_Use</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Punctuation</code></li>
<li><code>P</code></li>
<li><code>punct</code></li>
</ul>
</td>
<td><code>Punctuation</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Separator</code></li>
<li><code>Z</code></li>
</ul>
</td>
<td><code>Separator</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Space_Separator</code></li>
<li><code>Zs</code></li>
</ul>
</td>
<td><code>Space_Separator</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Spacing_Mark</code></li>
<li><code>Mc</code></li>
</ul>
</td>
<td><code>Spacing_Mark</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Surrogate</code></li>
<li><code>Cs</code></li>
</ul>
</td>
<td><code>Surrogate</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Symbol</code></li>
<li><code>S</code></li>
</ul>
</td>
<td><code>Symbol</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Titlecase_Letter</code></li>
<li><code>Lt</code></li>
</ul>
</td>
<td><code>Titlecase_Letter</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Unassigned</code></li>
<li><code>Cn</code></li>
</ul>
</td>
<td><code>Unassigned</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Uppercase_Letter</code></li>
<li><code>Lu</code></li>
</ul>
</td>
<td><code>Uppercase_Letter</code></td>
</tr>
</tbody></table>
</figure></emu-table>
</emu-import>
<emu-import href="table-unicode-script-values.html"><emu-table id="table-unicode-script-values"><figure><figcaption>Table 57: Value aliases and canonical values for the Unicode properties <a href="https://unicode.org/reports/tr24/#Script"><code>Script</code></a> and <a href="https://unicode.org/reports/tr24/#Script_Extensions"><code>Script_Extensions</code></a></figcaption>
<table class="real-table unicode-property-table">
<thead>
<tr>
<th>Property value and aliases</th>
<th>Canonical property value</th>
</tr>
</thead>
<tbody><tr>
<td>
<ul>
<li><code>Adlam</code></li>
<li><code>Adlm</code></li>
</ul>
</td>
<td><code>Adlam</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Ahom</code></li>
<li><code>Ahom</code></li>
</ul>
</td>
<td><code>Ahom</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Anatolian_Hieroglyphs</code></li>
<li><code>Hluw</code></li>
</ul>
</td>
<td><code>Anatolian_Hieroglyphs</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Arabic</code></li>
<li><code>Arab</code></li>
</ul>
</td>
<td><code>Arabic</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Armenian</code></li>
<li><code>Armn</code></li>
</ul>
</td>
<td><code>Armenian</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Avestan</code></li>
<li><code>Avst</code></li>
</ul>
</td>
<td><code>Avestan</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Balinese</code></li>
<li><code>Bali</code></li>
</ul>
</td>
<td><code>Balinese</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Bamum</code></li>
<li><code>Bamu</code></li>
</ul>
</td>
<td><code>Bamum</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Bassa_Vah</code></li>
<li><code>Bass</code></li>
</ul>
</td>
<td><code>Bassa_Vah</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Batak</code></li>
<li><code>Batk</code></li>
</ul>
</td>
<td><code>Batak</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Bengali</code></li>
<li><code>Beng</code></li>
</ul>
</td>
<td><code>Bengali</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Bhaiksuki</code></li>
<li><code>Bhks</code></li>
</ul>
</td>
<td><code>Bhaiksuki</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Bopomofo</code></li>
<li><code>Bopo</code></li>
</ul>
</td>
<td><code>Bopomofo</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Brahmi</code></li>
<li><code>Brah</code></li>
</ul>
</td>
<td><code>Brahmi</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Braille</code></li>
<li><code>Brai</code></li>
</ul>
</td>
<td><code>Braille</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Buginese</code></li>
<li><code>Bugi</code></li>
</ul>
</td>
<td><code>Buginese</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Buhid</code></li>
<li><code>Buhd</code></li>
</ul>
</td>
<td><code>Buhid</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Canadian_Aboriginal</code></li>
<li><code>Cans</code></li>
</ul>
</td>
<td><code>Canadian_Aboriginal</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Carian</code></li>
<li><code>Cari</code></li>
</ul>
</td>
<td><code>Carian</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Caucasian_Albanian</code></li>
<li><code>Aghb</code></li>
</ul>
</td>
<td><code>Caucasian_Albanian</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Chakma</code></li>
<li><code>Cakm</code></li>
</ul>
</td>
<td><code>Chakma</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Cham</code></li>
<li><code>Cham</code></li>
</ul>
</td>
<td><code>Cham</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Cherokee</code></li>
<li><code>Cher</code></li>
</ul>
</td>
<td><code>Cherokee</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Common</code></li>
<li><code>Zyyy</code></li>
</ul>
</td>
<td><code>Common</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Coptic</code></li>
<li><code>Copt</code></li>
<li><code>Qaac</code></li>
</ul>
</td>
<td><code>Coptic</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Cuneiform</code></li>
<li><code>Xsux</code></li>
</ul>
</td>
<td><code>Cuneiform</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Cypriot</code></li>
<li><code>Cprt</code></li>
</ul>
</td>
<td><code>Cypriot</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Cyrillic</code></li>
<li><code>Cyrl</code></li>
</ul>
</td>
<td><code>Cyrillic</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Deseret</code></li>
<li><code>Dsrt</code></li>
</ul>
</td>
<td><code>Deseret</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Devanagari</code></li>
<li><code>Deva</code></li>
</ul>
</td>
<td><code>Devanagari</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Dogra</code></li>
<li><code>Dogr</code></li>
</ul>
</td>
<td><code>Dogra</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Duployan</code></li>
<li><code>Dupl</code></li>
</ul>
</td>
<td><code>Duployan</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Egyptian_Hieroglyphs</code></li>
<li><code>Egyp</code></li>
</ul>
</td>
<td><code>Egyptian_Hieroglyphs</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Elbasan</code></li>
<li><code>Elba</code></li>
</ul>
</td>
<td><code>Elbasan</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Ethiopic</code></li>
<li><code>Ethi</code></li>
</ul>
</td>
<td><code>Ethiopic</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Georgian</code></li>
<li><code>Geor</code></li>
</ul>
</td>
<td><code>Georgian</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Glagolitic</code></li>
<li><code>Glag</code></li>
</ul>
</td>
<td><code>Glagolitic</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Gothic</code></li>
<li><code>Goth</code></li>
</ul>
</td>
<td><code>Gothic</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Grantha</code></li>
<li><code>Gran</code></li>
</ul>
</td>
<td><code>Grantha</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Greek</code></li>
<li><code>Grek</code></li>
</ul>
</td>
<td><code>Greek</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Gujarati</code></li>
<li><code>Gujr</code></li>
</ul>
</td>
<td><code>Gujarati</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Gunjala_Gondi</code></li>
<li><code>Gong</code></li>
</ul>
</td>
<td><code>Gunjala_Gondi</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Gurmukhi</code></li>
<li><code>Guru</code></li>
</ul>
</td>
<td><code>Gurmukhi</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Han</code></li>
<li><code>Hani</code></li>
</ul>
</td>
<td><code>Han</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Hangul</code></li>
<li><code>Hang</code></li>
</ul>
</td>
<td><code>Hangul</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Hanifi_Rohingya</code></li>
<li><code>Rohg</code></li>
</ul>
</td>
<td><code>Hanifi_Rohingya</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Hanunoo</code></li>
<li><code>Hano</code></li>
</ul>
</td>
<td><code>Hanunoo</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Hatran</code></li>
<li><code>Hatr</code></li>
</ul>
</td>
<td><code>Hatran</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Hebrew</code></li>
<li><code>Hebr</code></li>
</ul>
</td>
<td><code>Hebrew</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Hiragana</code></li>
<li><code>Hira</code></li>
</ul>
</td>
<td><code>Hiragana</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Imperial_Aramaic</code></li>
<li><code>Armi</code></li>
</ul>
</td>
<td><code>Imperial_Aramaic</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Inherited</code></li>
<li><code>Zinh</code></li>
<li><code>Qaai</code></li>
</ul>
</td>
<td><code>Inherited</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Inscriptional_Pahlavi</code></li>
<li><code>Phli</code></li>
</ul>
</td>
<td><code>Inscriptional_Pahlavi</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Inscriptional_Parthian</code></li>
<li><code>Prti</code></li>
</ul>
</td>
<td><code>Inscriptional_Parthian</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Javanese</code></li>
<li><code>Java</code></li>
</ul>
</td>
<td><code>Javanese</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Kaithi</code></li>
<li><code>Kthi</code></li>
</ul>
</td>
<td><code>Kaithi</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Kannada</code></li>
<li><code>Knda</code></li>
</ul>
</td>
<td><code>Kannada</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Katakana</code></li>
<li><code>Kana</code></li>
</ul>
</td>
<td><code>Katakana</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Kayah_Li</code></li>
<li><code>Kali</code></li>
</ul>
</td>
<td><code>Kayah_Li</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Kharoshthi</code></li>
<li><code>Khar</code></li>
</ul>
</td>
<td><code>Kharoshthi</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Khmer</code></li>
<li><code>Khmr</code></li>
</ul>
</td>
<td><code>Khmer</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Khojki</code></li>
<li><code>Khoj</code></li>
</ul>
</td>
<td><code>Khojki</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Khudawadi</code></li>
<li><code>Sind</code></li>
</ul>
</td>
<td><code>Khudawadi</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Lao</code></li>
<li><code>Laoo</code></li>
</ul>
</td>
<td><code>Lao</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Latin</code></li>
<li><code>Latn</code></li>
</ul>
</td>
<td><code>Latin</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Lepcha</code></li>
<li><code>Lepc</code></li>
</ul>
</td>
<td><code>Lepcha</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Limbu</code></li>
<li><code>Limb</code></li>
</ul>
</td>
<td><code>Limbu</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Linear_A</code></li>
<li><code>Lina</code></li>
</ul>
</td>
<td><code>Linear_A</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Linear_B</code></li>
<li><code>Linb</code></li>
</ul>
</td>
<td><code>Linear_B</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Lisu</code></li>
<li><code>Lisu</code></li>
</ul>
</td>
<td><code>Lisu</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Lycian</code></li>
<li><code>Lyci</code></li>
</ul>
</td>
<td><code>Lycian</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Lydian</code></li>
<li><code>Lydi</code></li>
</ul>
</td>
<td><code>Lydian</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Mahajani</code></li>
<li><code>Mahj</code></li>
</ul>
</td>
<td><code>Mahajani</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Makasar</code></li>
<li><code>Maka</code></li>
</ul>
</td>
<td><code>Makasar</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Malayalam</code></li>
<li><code>Mlym</code></li>
</ul>
</td>
<td><code>Malayalam</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Mandaic</code></li>
<li><code>Mand</code></li>
</ul>
</td>
<td><code>Mandaic</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Manichaean</code></li>
<li><code>Mani</code></li>
</ul>
</td>
<td><code>Manichaean</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Marchen</code></li>
<li><code>Marc</code></li>
</ul>
</td>
<td><code>Marchen</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Medefaidrin</code></li>
<li><code>Medf</code></li>
</ul>
</td>
<td><code>Medefaidrin</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Masaram_Gondi</code></li>
<li><code>Gonm</code></li>
</ul>
</td>
<td><code>Masaram_Gondi</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Meetei_Mayek</code></li>
<li><code>Mtei</code></li>
</ul>
</td>
<td><code>Meetei_Mayek</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Mende_Kikakui</code></li>
<li><code>Mend</code></li>
</ul>
</td>
<td><code>Mende_Kikakui</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Meroitic_Cursive</code></li>
<li><code>Merc</code></li>
</ul>
</td>
<td><code>Meroitic_Cursive</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Meroitic_Hieroglyphs</code></li>
<li><code>Mero</code></li>
</ul>
</td>
<td><code>Meroitic_Hieroglyphs</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Miao</code></li>
<li><code>Plrd</code></li>
</ul>
</td>
<td><code>Miao</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Modi</code></li>
<li><code>Modi</code></li>
</ul>
</td>
<td><code>Modi</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Mongolian</code></li>
<li><code>Mong</code></li>
</ul>
</td>
<td><code>Mongolian</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Mro</code></li>
<li><code>Mroo</code></li>
</ul>
</td>
<td><code>Mro</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Multani</code></li>
<li><code>Mult</code></li>
</ul>
</td>
<td><code>Multani</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Myanmar</code></li>
<li><code>Mymr</code></li>
</ul>
</td>
<td><code>Myanmar</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Nabataean</code></li>
<li><code>Nbat</code></li>
</ul>
</td>
<td><code>Nabataean</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>New_Tai_Lue</code></li>
<li><code>Talu</code></li>
</ul>
</td>
<td><code>New_Tai_Lue</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Newa</code></li>
<li><code>Newa</code></li>
</ul>
</td>
<td><code>Newa</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Nko</code></li>
<li><code>Nkoo</code></li>
</ul>
</td>
<td><code>Nko</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Nushu</code></li>
<li><code>Nshu</code></li>
</ul>
</td>
<td><code>Nushu</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Ogham</code></li>
<li><code>Ogam</code></li>
</ul>
</td>
<td><code>Ogham</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Ol_Chiki</code></li>
<li><code>Olck</code></li>
</ul>
</td>
<td><code>Ol_Chiki</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Old_Hungarian</code></li>
<li><code>Hung</code></li>
</ul>
</td>
<td><code>Old_Hungarian</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Old_Italic</code></li>
<li><code>Ital</code></li>
</ul>
</td>
<td><code>Old_Italic</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Old_North_Arabian</code></li>
<li><code>Narb</code></li>
</ul>
</td>
<td><code>Old_North_Arabian</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Old_Permic</code></li>
<li><code>Perm</code></li>
</ul>
</td>
<td><code>Old_Permic</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Old_Persian</code></li>
<li><code>Xpeo</code></li>
</ul>
</td>
<td><code>Old_Persian</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Old_Sogdian</code></li>
<li><code>Sogo</code></li>
</ul>
</td>
<td><code>Old_Sogdian</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Old_South_Arabian</code></li>
<li><code>Sarb</code></li>
</ul>
</td>
<td><code>Old_South_Arabian</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Old_Turkic</code></li>
<li><code>Orkh</code></li>
</ul>
</td>
<td><code>Old_Turkic</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Oriya</code></li>
<li><code>Orya</code></li>
</ul>
</td>
<td><code>Oriya</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Osage</code></li>
<li><code>Osge</code></li>
</ul>
</td>
<td><code>Osage</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Osmanya</code></li>
<li><code>Osma</code></li>
</ul>
</td>
<td><code>Osmanya</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Pahawh_Hmong</code></li>
<li><code>Hmng</code></li>
</ul>
</td>
<td><code>Pahawh_Hmong</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Palmyrene</code></li>
<li><code>Palm</code></li>
</ul>
</td>
<td><code>Palmyrene</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Pau_Cin_Hau</code></li>
<li><code>Pauc</code></li>
</ul>
</td>
<td><code>Pau_Cin_Hau</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Phags_Pa</code></li>
<li><code>Phag</code></li>
</ul>
</td>
<td><code>Phags_Pa</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Phoenician</code></li>
<li><code>Phnx</code></li>
</ul>
</td>
<td><code>Phoenician</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Psalter_Pahlavi</code></li>
<li><code>Phlp</code></li>
</ul>
</td>
<td><code>Psalter_Pahlavi</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Rejang</code></li>
<li><code>Rjng</code></li>
</ul>
</td>
<td><code>Rejang</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Runic</code></li>
<li><code>Runr</code></li>
</ul>
</td>
<td><code>Runic</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Samaritan</code></li>
<li><code>Samr</code></li>
</ul>
</td>
<td><code>Samaritan</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Saurashtra</code></li>
<li><code>Saur</code></li>
</ul>
</td>
<td><code>Saurashtra</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Sharada</code></li>
<li><code>Shrd</code></li>
</ul>
</td>
<td><code>Sharada</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Shavian</code></li>
<li><code>Shaw</code></li>
</ul>
</td>
<td><code>Shavian</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Siddham</code></li>
<li><code>Sidd</code></li>
</ul>
</td>
<td><code>Siddham</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>SignWriting</code></li>
<li><code>Sgnw</code></li>
</ul>
</td>
<td><code>SignWriting</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Sinhala</code></li>
<li><code>Sinh</code></li>
</ul>
</td>
<td><code>Sinhala</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Sogdian</code></li>
<li><code>Sogd</code></li>
</ul>
</td>
<td><code>Sogdian</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Sora_Sompeng</code></li>
<li><code>Sora</code></li>
</ul>
</td>
<td><code>Sora_Sompeng</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Soyombo</code></li>
<li><code>Soyo</code></li>
</ul>
</td>
<td><code>Soyombo</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Sundanese</code></li>
<li><code>Sund</code></li>
</ul>
</td>
<td><code>Sundanese</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Syloti_Nagri</code></li>
<li><code>Sylo</code></li>
</ul>
</td>
<td><code>Syloti_Nagri</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Syriac</code></li>
<li><code>Syrc</code></li>
</ul>
</td>
<td><code>Syriac</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Tagalog</code></li>
<li><code>Tglg</code></li>
</ul>
</td>
<td><code>Tagalog</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Tagbanwa</code></li>
<li><code>Tagb</code></li>
</ul>
</td>
<td><code>Tagbanwa</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Tai_Le</code></li>
<li><code>Tale</code></li>
</ul>
</td>
<td><code>Tai_Le</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Tai_Tham</code></li>
<li><code>Lana</code></li>
</ul>
</td>
<td><code>Tai_Tham</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Tai_Viet</code></li>
<li><code>Tavt</code></li>
</ul>
</td>
<td><code>Tai_Viet</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Takri</code></li>
<li><code>Takr</code></li>
</ul>
</td>
<td><code>Takri</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Tamil</code></li>
<li><code>Taml</code></li>
</ul>
</td>
<td><code>Tamil</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Tangut</code></li>
<li><code>Tang</code></li>
</ul>
</td>
<td><code>Tangut</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Telugu</code></li>
<li><code>Telu</code></li>
</ul>
</td>
<td><code>Telugu</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Thaana</code></li>
<li><code>Thaa</code></li>
</ul>
</td>
<td><code>Thaana</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Thai</code></li>
<li><code>Thai</code></li>
</ul>
</td>
<td><code>Thai</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Tibetan</code></li>
<li><code>Tibt</code></li>
</ul>
</td>
<td><code>Tibetan</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Tifinagh</code></li>
<li><code>Tfng</code></li>
</ul>
</td>
<td><code>Tifinagh</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Tirhuta</code></li>
<li><code>Tirh</code></li>
</ul>
</td>
<td><code>Tirhuta</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Ugaritic</code></li>
<li><code>Ugar</code></li>
</ul>
</td>
<td><code>Ugaritic</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Vai</code></li>
<li><code>Vaii</code></li>
</ul>
</td>
<td><code>Vai</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Warang_Citi</code></li>
<li><code>Wara</code></li>
</ul>
</td>
<td><code>Warang_Citi</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Yi</code></li>
<li><code>Yiii</code></li>
</ul>
</td>
<td><code>Yi</code></td>
</tr>
<tr>
<td>
<ul>
<li><code>Zanabazar_Square</code></li>
<li><code>Zanb</code></li>
</ul>
</td>
<td><code>Zanabazar_Square</code></td>
</tr>
</tbody></table>
</figure></emu-table>
</emu-import>
</emu-clause>
</emu-clause>
<emu-clause id="sec-atomescape">
<h1><span class="secnum">21.2.2.9</span>AtomEscape</h1>
<p>With parameter <var>direction</var>.</p>
<p>The production <emu-grammar><emu-production name="AtomEscape" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-AtomEscape">AtomEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="7ebff96c"><emu-nt id="_ref_14686"><a href="#prod-DecimalEscape">DecimalEscape</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Evaluate <emu-nt id="_ref_14687"><a href="#prod-DecimalEscape">DecimalEscape</a></emu-nt> to obtain an integer <var>n</var>.</li><li><emu-xref href="#assert" id="_ref_6059"><a href="#assert">Assert</a></emu-xref>: <var>n</var> ≤ <var>NcapturingParens</var>.</li><li>Call <emu-xref aoid="BackreferenceMatcher" id="_ref_6060"><a href="#sec-backreference-matcher">BackreferenceMatcher</a></emu-xref>(<var>n</var>, <var>direction</var>) and return its Matcher result.
</li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="AtomEscape" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-AtomEscape">AtomEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="163011be"><emu-nt id="_ref_14688"><a href="#prod-CharacterEscape">CharacterEscape</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Evaluate <emu-nt id="_ref_14689"><a href="#prod-CharacterEscape">CharacterEscape</a></emu-nt> to obtain a character <var>ch</var>.</li><li>Let <var>A</var> be a one-element CharSet containing the character <var>ch</var>.</li><li>Call <emu-xref aoid="CharacterSetMatcher" id="_ref_6061"><a href="#sec-runtime-semantics-charactersetmatcher-abstract-operation">CharacterSetMatcher</a></emu-xref>(<var>A</var>, <emu-val>false</emu-val>, <var>direction</var>) and return its Matcher result.
</li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="AtomEscape" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-AtomEscape">AtomEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="6f05bee4"><emu-nt id="_ref_14690"><a href="#prod-CharacterClassEscape">CharacterClassEscape</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Evaluate <emu-nt id="_ref_14691"><a href="#prod-CharacterClassEscape">CharacterClassEscape</a></emu-nt> to obtain a CharSet <var>A</var>.</li><li>Call <emu-xref aoid="CharacterSetMatcher" id="_ref_6062"><a href="#sec-runtime-semantics-charactersetmatcher-abstract-operation">CharacterSetMatcher</a></emu-xref>(<var>A</var>, <emu-val>false</emu-val>, <var>direction</var>) and return its Matcher result.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>An escape sequence of the form <code>\</code> followed by a nonzero decimal number <var>n</var> matches the result of the <var>n</var>th set of capturing parentheses (<emu-xref href="#sec-notation" id="_ref_564"><a href="#sec-notation">21.2.2.1</a></emu-xref>). It is an error if the regular expression has fewer than <var>n</var> capturing parentheses. If the regular expression has <var>n</var> or more capturing parentheses but the <var>n</var>th one is <emu-val>undefined</emu-val> because it has not captured anything, then the backreference always succeeds.</p>
</div></emu-note>
<p>The production <emu-grammar><emu-production name="AtomEscape" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-AtomEscape">AtomEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="743fd78c"><emu-t>k</emu-t><emu-nt id="_ref_14692"><a href="#prod-GroupName">GroupName</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Search the enclosing <emu-nt id="_ref_14693"><a href="#prod-Pattern">Pattern</a></emu-nt> for an instance of a <emu-nt id="_ref_14694"><a href="#prod-GroupSpecifier">GroupSpecifier</a></emu-nt> for a <emu-nt id="_ref_14695"><a href="#prod-RegExpIdentifierName">RegExpIdentifierName</a></emu-nt> which has a StringValue equal to the StringValue of the <emu-nt id="_ref_14696"><a href="#prod-RegExpIdentifierName">RegExpIdentifierName</a></emu-nt> contained in <emu-nt id="_ref_14697"><a href="#prod-GroupName">GroupName</a></emu-nt>.</li><li><emu-xref href="#assert" id="_ref_6063"><a href="#assert">Assert</a></emu-xref>: A unique such <emu-nt id="_ref_14698"><a href="#prod-GroupSpecifier">GroupSpecifier</a></emu-nt> is found.</li><li>Let <var>parenIndex</var> be the number of left-capturing parentheses in the entire regular expression that occur to the left of the located <emu-nt id="_ref_14699"><a href="#prod-GroupSpecifier">GroupSpecifier</a></emu-nt>. This is the total number of <emu-grammar><emu-production name="Atom" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-Atom">Atom</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="59aa089b"><emu-t>(</emu-t><emu-nt id="_ref_14700"><a href="#prod-GroupSpecifier">GroupSpecifier</a></emu-nt><emu-nt id="_ref_14701"><a href="#prod-Disjunction">Disjunction</a></emu-nt><emu-t>)</emu-t></emu-rhs>
</emu-production></emu-grammar> Parse Nodes prior to or enclosing the located <emu-nt id="_ref_14702"><a href="#prod-GroupSpecifier">GroupSpecifier</a></emu-nt>.</li><li>Call <emu-xref aoid="BackreferenceMatcher" id="_ref_6064"><a href="#sec-backreference-matcher">BackreferenceMatcher</a></emu-xref>(<var>parenIndex</var>, <var>direction</var>) and return its Matcher result.
</li></ol></emu-alg>
<emu-clause id="sec-backreference-matcher" aoid="BackreferenceMatcher">
<h1><span class="secnum">21.2.2.9.1</span>Runtime Semantics: BackreferenceMatcher ( <var>n</var>, <var>direction</var> )</h1>
<p>The abstract operation BackreferenceMatcher takes two arguments, an integer <var>n</var> and an integer <var>direction</var>, and performs the following steps:</p>
<emu-alg><ol><li>Return an internal Matcher closure that takes two arguments, a State <var>x</var> and a Continuation <var>c</var>, and performs the following steps:<ol><li>Let <var>cap</var> be <var>x</var>'s <var>captures</var> <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6065"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>s</var> be <var>cap</var>[<var>n</var>].</li><li>If <var>s</var> is <emu-val>undefined</emu-val>, return <var>c</var>(<var>x</var>).</li><li>Let <var>e</var> be <var>x</var>'s <var>endIndex</var>.</li><li>Let <var>len</var> be the number of elements in <var>s</var>.</li><li>Let <var>f</var> be <var>e</var> + <var>direction</var> × <var>len</var>.</li><li>If <var>f</var> &lt; 0 or <var>f</var> &gt; <var>InputLength</var>, return <emu-const>failure</emu-const>.</li><li>Let <var>g</var> be <emu-xref aoid="min" id="_ref_6066"><a href="#eqn-min">min</a></emu-xref>(<var>e</var>, <var>f</var>).</li><li>If there exists an integer <var>i</var> between 0 (inclusive) and <var>len</var> (exclusive) such that <emu-xref aoid="Canonicalize" id="_ref_6067"><a href="#sec-runtime-semantics-canonicalize-ch">Canonicalize</a></emu-xref>(<var>s</var>[<var>i</var>]) is not the same character value as <emu-xref aoid="Canonicalize" id="_ref_6068"><a href="#sec-runtime-semantics-canonicalize-ch">Canonicalize</a></emu-xref>(<var>Input</var>[<var>g</var> + <var>i</var>]), return <emu-const>failure</emu-const>.</li><li>Let <var>y</var> be the State (<var>f</var>, <var>cap</var>).</li><li>Call <var>c</var>(<var>y</var>) and return its result.
</li></ol></li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-characterescape">
<h1><span class="secnum">21.2.2.10</span>CharacterEscape</h1>
<p>The <emu-nt id="_ref_14703"><a href="#prod-CharacterEscape">CharacterEscape</a></emu-nt> productions evaluate as follows:</p>
<emu-grammar><emu-production name="CharacterEscape" type="lexical">
<emu-nt><a href="#prod-CharacterEscape">CharacterEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="f88e7170"><emu-nt id="_ref_14704"><a href="#prod-ControlEscape">ControlEscape</a></emu-nt></emu-rhs>
<emu-rhs a="a14dae7e"><emu-t>c</emu-t><emu-nt id="_ref_14705"><a href="#prod-ControlLetter">ControlLetter</a></emu-nt></emu-rhs>
<emu-rhs a="6964a19d"><emu-t>0</emu-t><emu-gann>[lookahead ∉ <emu-nt id="_ref_14706"><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt>]</emu-gann></emu-rhs>
<emu-rhs a="a8071b85"><emu-nt id="_ref_14707"><a href="#prod-HexEscapeSequence">HexEscapeSequence</a></emu-nt></emu-rhs>
<emu-rhs a="a6d26255"><emu-nt id="_ref_14708"><a href="#prod-RegExpUnicodeEscapeSequence">RegExpUnicodeEscapeSequence</a></emu-nt></emu-rhs>
<emu-rhs a="804f428d"><emu-nt id="_ref_14709"><a href="#prod-IdentityEscape">IdentityEscape</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>cv</var> be the CharacterValue of this <emu-nt id="_ref_14710"><a href="#prod-CharacterEscape">CharacterEscape</a></emu-nt>.</li><li>Return the character whose character value is <var>cv</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-decimalescape">
<h1><span class="secnum">21.2.2.11</span>DecimalEscape</h1>
<p>The <emu-nt id="_ref_14711"><a href="#prod-DecimalEscape">DecimalEscape</a></emu-nt> productions evaluate as follows:</p>
<emu-grammar><emu-production name="DecimalEscape" type="lexical" collapsed="">
<emu-nt><a href="#prod-DecimalEscape">DecimalEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="2353f0a3"><emu-nt id="_ref_14712"><a href="#prod-NonZeroDigit">NonZeroDigit</a></emu-nt><emu-nt optional="" id="_ref_14713"><a href="#prod-DecimalDigits">DecimalDigits</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the CapturingGroupNumber of this <emu-nt id="_ref_14714"><a href="#prod-DecimalEscape">DecimalEscape</a></emu-nt>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>If <code>\</code> is followed by a decimal number <var>n</var> whose first digit is not <code>0</code>, then the escape sequence is considered to be a backreference. It is an error if <var>n</var> is greater than the total number of left-capturing parentheses in the entire regular expression.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-characterclassescape">
<h1><span class="secnum">21.2.2.12</span>CharacterClassEscape</h1>
<p>The production <emu-grammar><emu-production name="CharacterClassEscape" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-CharacterClassEscape">CharacterClassEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="f0f32729"><emu-t>d</emu-t></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Return the ten-element set of characters containing the characters <code>0</code> through <code>9</code> inclusive.
</li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="CharacterClassEscape" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-CharacterClassEscape">CharacterClassEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="919b1483"><emu-t>D</emu-t></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Return the set of all characters not included in the set returned by <emu-grammar><emu-production name="CharacterClassEscape" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-CharacterClassEscape">CharacterClassEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="f0f32729"><emu-t>d</emu-t></emu-rhs>
</emu-production></emu-grammar>.
</li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="CharacterClassEscape" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-CharacterClassEscape">CharacterClassEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5b9c6c6e"><emu-t>s</emu-t></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Return the set of characters containing the characters that are on the right-hand side of the <emu-nt id="_ref_14715"><a href="#prod-WhiteSpace">WhiteSpace</a></emu-nt> or <emu-nt id="_ref_14716"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> productions.
</li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="CharacterClassEscape" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-CharacterClassEscape">CharacterClassEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="6952cf48"><emu-t>S</emu-t></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Return the set of all characters not included in the set returned by <emu-grammar><emu-production name="CharacterClassEscape" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-CharacterClassEscape">CharacterClassEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5b9c6c6e"><emu-t>s</emu-t></emu-rhs>
</emu-production></emu-grammar> .
</li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="CharacterClassEscape" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-CharacterClassEscape">CharacterClassEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="2d8b484a"><emu-t>w</emu-t></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Return the set of all characters returned by <emu-xref aoid="WordCharacters" id="_ref_6069"><a href="#sec-runtime-semantics-wordcharacters-abstract-operation">WordCharacters</a></emu-xref>().
</li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="CharacterClassEscape" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-CharacterClassEscape">CharacterClassEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="ae15e851"><emu-t>W</emu-t></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Return the set of all characters not included in the set returned by <emu-grammar><emu-production name="CharacterClassEscape" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-CharacterClassEscape">CharacterClassEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="2d8b484a"><emu-t>w</emu-t></emu-rhs>
</emu-production></emu-grammar> .
</li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="CharacterClassEscape" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-CharacterClassEscape">CharacterClassEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="c3a04bb2"><emu-t>p{</emu-t><emu-nt id="_ref_14717"><a href="#prod-UnicodePropertyValueExpression">UnicodePropertyValueExpression</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar> evaluates by returning the CharSet containing all Unicode code points included in the CharSet returned by <emu-nt id="_ref_14718"><a href="#prod-UnicodePropertyValueExpression">UnicodePropertyValueExpression</a></emu-nt>.</p>
<p>The production <emu-grammar><emu-production name="CharacterClassEscape" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-CharacterClassEscape">CharacterClassEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="e281bb28"><emu-t>P{</emu-t><emu-nt id="_ref_14719"><a href="#prod-UnicodePropertyValueExpression">UnicodePropertyValueExpression</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar> evaluates by returning the CharSet containing all Unicode code points not included in the CharSet returned by <emu-nt id="_ref_14720"><a href="#prod-UnicodePropertyValueExpression">UnicodePropertyValueExpression</a></emu-nt>.</p>
<p>The production <emu-grammar><emu-production name="UnicodePropertyValueExpression" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-UnicodePropertyValueExpression">UnicodePropertyValueExpression</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="b11de407"><emu-nt id="_ref_14721"><a href="#prod-UnicodePropertyName">UnicodePropertyName</a></emu-nt><emu-t>=</emu-t><emu-nt id="_ref_14722"><a href="#prod-UnicodePropertyValue">UnicodePropertyValue</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Let <var>ps</var> be SourceText of <emu-nt id="_ref_14723"><a href="#prod-UnicodePropertyName">UnicodePropertyName</a></emu-nt>.</li><li>Let <var>p</var> be !&nbsp;<emu-xref aoid="UnicodeMatchProperty" id="_ref_6070"><a href="#sec-runtime-semantics-unicodematchproperty-p">UnicodeMatchProperty</a></emu-xref>(<var>ps</var>).</li><li><emu-xref href="#assert" id="_ref_6071"><a href="#assert">Assert</a></emu-xref>: <var>p</var> is a Unicode <emu-xref href="#property-name" id="_ref_6072"><a href="#property-name">property name</a></emu-xref> or property alias listed in the “<emu-xref href="#property-name" id="_ref_6073"><a href="#property-name">Property name</a></emu-xref> and aliases” column of <emu-xref href="#table-nonbinary-unicode-properties" id="_ref_565"><a href="#table-nonbinary-unicode-properties">Table 54</a></emu-xref>.</li><li>Let <var>vs</var> be SourceText of <emu-nt id="_ref_14724"><a href="#prod-UnicodePropertyValue">UnicodePropertyValue</a></emu-nt>.</li><li>Let <var>v</var> be !&nbsp;<emu-xref aoid="UnicodeMatchPropertyValue" id="_ref_6074"><a href="#sec-runtime-semantics-unicodematchpropertyvalue-p-v">UnicodeMatchPropertyValue</a></emu-xref>(<var>p</var>, <var>vs</var>).</li><li>Return the CharSet containing all Unicode code points whose character database definition includes the property <var>p</var> with value <var>v</var>.
</li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="UnicodePropertyValueExpression" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-UnicodePropertyValueExpression">UnicodePropertyValueExpression</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="25d94190"><emu-nt id="_ref_14725"><a href="#prod-LoneUnicodePropertyNameOrValue">LoneUnicodePropertyNameOrValue</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Let <var>s</var> be SourceText of <emu-nt id="_ref_14726"><a href="#prod-LoneUnicodePropertyNameOrValue">LoneUnicodePropertyNameOrValue</a></emu-nt>.</li><li>If !&nbsp;<emu-xref aoid="UnicodeMatchPropertyValue" id="_ref_6075"><a href="#sec-runtime-semantics-unicodematchpropertyvalue-p-v">UnicodeMatchPropertyValue</a></emu-xref>(<code>"General_Category"</code>, <var>s</var>) is identical to a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6076"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>
of Unicode code points that is the name of a Unicode general category
or general category alias listed in the “Property value and aliases”
column of <emu-xref href="#table-unicode-general-category-values" id="_ref_566"><a href="#table-unicode-general-category-values">Table 56</a></emu-xref>, then<ol><li>Return
the CharSet containing all Unicode code points whose character database
definition includes the property “General_Category” with value <var>s</var>.</li></ol></li><li>Let <var>p</var> be !&nbsp;<emu-xref aoid="UnicodeMatchProperty" id="_ref_6077"><a href="#sec-runtime-semantics-unicodematchproperty-p">UnicodeMatchProperty</a></emu-xref>(<var>s</var>).</li><li><emu-xref href="#assert" id="_ref_6078"><a href="#assert">Assert</a></emu-xref>: <var>p</var> is a binary Unicode property or binary property alias listed in the “<emu-xref href="#property-name" id="_ref_6079"><a href="#property-name">Property name</a></emu-xref> and aliases” column of <emu-xref href="#table-binary-unicode-properties" id="_ref_567"><a href="#table-binary-unicode-properties">Table 55</a></emu-xref>.</li><li>Return the CharSet containing all Unicode code points whose character database definition includes the property <var>p</var> with value “True”.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-characterclass">
<h1><span class="secnum">21.2.2.13</span>CharacterClass</h1>
<p>The production <emu-grammar><emu-production name="CharacterClass" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-CharacterClass">CharacterClass</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="75bec63e"><emu-t>[</emu-t><emu-nt id="_ref_14727"><a href="#prod-ClassRanges">ClassRanges</a></emu-nt><emu-t>]</emu-t></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Evaluate <emu-nt id="_ref_14728"><a href="#prod-ClassRanges">ClassRanges</a></emu-nt> to obtain a CharSet <var>A</var>.</li><li>Return the two results <var>A</var> and <emu-val>false</emu-val>.
</li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="CharacterClass" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-CharacterClass">CharacterClass</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="701636b8"><emu-t>[</emu-t><emu-t>^</emu-t><emu-nt id="_ref_14729"><a href="#prod-ClassRanges">ClassRanges</a></emu-nt><emu-t>]</emu-t></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Evaluate <emu-nt id="_ref_14730"><a href="#prod-ClassRanges">ClassRanges</a></emu-nt> to obtain a CharSet <var>A</var>.</li><li>Return the two results <var>A</var> and <emu-val>true</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-classranges">
<h1><span class="secnum">21.2.2.14</span>ClassRanges</h1>
<p>The production <emu-grammar><emu-production name="ClassRanges" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-ClassRanges">ClassRanges</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Return the empty CharSet.
</li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="ClassRanges" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-ClassRanges">ClassRanges</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="b74014d9"><emu-nt id="_ref_14731"><a href="#prod-NonemptyClassRanges">NonemptyClassRanges</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Return the CharSet that is the result of evaluating <emu-nt id="_ref_14732"><a href="#prod-NonemptyClassRanges">NonemptyClassRanges</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-nonemptyclassranges">
<h1><span class="secnum">21.2.2.15</span>NonemptyClassRanges</h1>
<p>The production <emu-grammar><emu-production name="NonemptyClassRanges" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-NonemptyClassRanges">NonemptyClassRanges</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="348b5cd2"><emu-nt id="_ref_14733"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Return the CharSet that is the result of evaluating <emu-nt id="_ref_14734"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt>.
</li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="NonemptyClassRanges" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-NonemptyClassRanges">NonemptyClassRanges</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="f5b7332d"><emu-nt id="_ref_14735"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt><emu-nt id="_ref_14736"><a href="#prod-NonemptyClassRangesNoDash">NonemptyClassRangesNoDash</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Evaluate <emu-nt id="_ref_14737"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt> to obtain a CharSet <var>A</var>.</li><li>Evaluate <emu-nt id="_ref_14738"><a href="#prod-NonemptyClassRangesNoDash">NonemptyClassRangesNoDash</a></emu-nt> to obtain a CharSet <var>B</var>.</li><li>Return the union of CharSets <var>A</var> and <var>B</var>.
</li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="NonemptyClassRanges" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-NonemptyClassRanges">NonemptyClassRanges</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="a5b9453b"><emu-nt id="_ref_14739"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt><emu-t>-</emu-t><emu-nt id="_ref_14740"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt><emu-nt id="_ref_14741"><a href="#prod-ClassRanges">ClassRanges</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Evaluate the first <emu-nt id="_ref_14742"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt> to obtain a CharSet <var>A</var>.</li><li>Evaluate the second <emu-nt id="_ref_14743"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt> to obtain a CharSet <var>B</var>.</li><li>Evaluate <emu-nt id="_ref_14744"><a href="#prod-ClassRanges">ClassRanges</a></emu-nt> to obtain a CharSet <var>C</var>.</li><li>Call <emu-xref aoid="CharacterRange" id="_ref_6080"><a href="#sec-runtime-semantics-characterrange-abstract-operation">CharacterRange</a></emu-xref>(<var>A</var>, <var>B</var>) and let <var>D</var> be the resulting CharSet.</li><li>Return the union of CharSets <var>D</var> and <var>C</var>.
</li></ol></emu-alg>
<emu-clause id="sec-runtime-semantics-characterrange-abstract-operation" aoid="CharacterRange">
<h1><span class="secnum">21.2.2.15.1</span>Runtime Semantics: CharacterRange ( <var>A</var>, <var>B</var> )</h1>
<p>The abstract operation CharacterRange takes two CharSet parameters <var>A</var> and <var>B</var> and performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_6081"><a href="#assert">Assert</a></emu-xref>: <var>A</var> and <var>B</var> each contain exactly one character.</li><li>Let <var>a</var> be the one character in CharSet <var>A</var>.</li><li>Let <var>b</var> be the one character in CharSet <var>B</var>.</li><li>Let <var>i</var> be the character value of character <var>a</var>.</li><li>Let <var>j</var> be the character value of character <var>b</var>.</li><li><emu-xref href="#assert" id="_ref_6082"><a href="#assert">Assert</a></emu-xref>: <var>i</var> ≤ <var>j</var>.</li><li>Return the set containing all characters numbered <var>i</var> through <var>j</var>, inclusive.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-nonemptyclassrangesnodash">
<h1><span class="secnum">21.2.2.16</span>NonemptyClassRangesNoDash</h1>
<p>The production <emu-grammar><emu-production name="NonemptyClassRangesNoDash" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-NonemptyClassRangesNoDash">NonemptyClassRangesNoDash</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="348b5cd2"><emu-nt id="_ref_14745"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Return the CharSet that is the result of evaluating <emu-nt id="_ref_14746"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt>.
</li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="NonemptyClassRangesNoDash" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-NonemptyClassRangesNoDash">NonemptyClassRangesNoDash</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="6762c921"><emu-nt id="_ref_14747"><a href="#prod-ClassAtomNoDash">ClassAtomNoDash</a></emu-nt><emu-nt id="_ref_14748"><a href="#prod-NonemptyClassRangesNoDash">NonemptyClassRangesNoDash</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Evaluate <emu-nt id="_ref_14749"><a href="#prod-ClassAtomNoDash">ClassAtomNoDash</a></emu-nt> to obtain a CharSet <var>A</var>.</li><li>Evaluate <emu-nt id="_ref_14750"><a href="#prod-NonemptyClassRangesNoDash">NonemptyClassRangesNoDash</a></emu-nt> to obtain a CharSet <var>B</var>.</li><li>Return the union of CharSets <var>A</var> and <var>B</var>.
</li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="NonemptyClassRangesNoDash" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-NonemptyClassRangesNoDash">NonemptyClassRangesNoDash</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="e9856041"><emu-nt id="_ref_14751"><a href="#prod-ClassAtomNoDash">ClassAtomNoDash</a></emu-nt><emu-t>-</emu-t><emu-nt id="_ref_14752"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt><emu-nt id="_ref_14753"><a href="#prod-ClassRanges">ClassRanges</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Evaluate <emu-nt id="_ref_14754"><a href="#prod-ClassAtomNoDash">ClassAtomNoDash</a></emu-nt> to obtain a CharSet <var>A</var>.</li><li>Evaluate <emu-nt id="_ref_14755"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt> to obtain a CharSet <var>B</var>.</li><li>Evaluate <emu-nt id="_ref_14756"><a href="#prod-ClassRanges">ClassRanges</a></emu-nt> to obtain a CharSet <var>C</var>.</li><li>Call <emu-xref aoid="CharacterRange" id="_ref_6083"><a href="#sec-runtime-semantics-characterrange-abstract-operation">CharacterRange</a></emu-xref>(<var>A</var>, <var>B</var>) and let <var>D</var> be the resulting CharSet.</li><li>Return the union of CharSets <var>D</var> and <var>C</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p><emu-nt id="_ref_14757"><a href="#prod-ClassRanges">ClassRanges</a></emu-nt> can expand into a single <emu-nt id="_ref_14758"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt> and/or ranges of two <emu-nt id="_ref_14759"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt> separated by dashes. In the latter case the <emu-nt id="_ref_14760"><a href="#prod-ClassRanges">ClassRanges</a></emu-nt> includes all characters between the first <emu-nt id="_ref_14761"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt> and the second <emu-nt id="_ref_14762"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt>, inclusive; an error occurs if either <emu-nt id="_ref_14763"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt> does not represent a single character (for example, if one is \w) or if the first <emu-nt id="_ref_14764"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt>'s character value is greater than the second <emu-nt id="_ref_14765"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt>'s character value.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>Even if the pattern ignores case, the case of the two ends
of a range is significant in determining which characters belong to the
range. Thus, for example, the pattern <code>/[E-F]/i</code> matches only the letters <code>E</code>, <code>F</code>, <code>e</code>, and <code>f</code>, while the pattern <code>/[E-f]/i</code> matches all upper and lower-case letters in the Unicode Basic Latin block as well as the symbols <code>[</code>, <code>\</code>, <code>]</code>, <code>^</code>, <code>_</code>, and <code>`</code>.</p>
</div></emu-note>
<emu-note><span class="note">Note 3</span><div class="note-contents">
<p>A <code>-</code> character can be treated literally or it can denote a range. It is treated literally if it is the first or last character of <emu-nt id="_ref_14766"><a href="#prod-ClassRanges">ClassRanges</a></emu-nt>, the beginning or end limit of a range specification, or immediately follows a range specification.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-classatom">
<h1><span class="secnum">21.2.2.17</span>ClassAtom</h1>
<p>The production <emu-grammar><emu-production name="ClassAtom" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-ClassAtom">ClassAtom</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="6f24a587"><emu-t>-</emu-t></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Return the CharSet containing the single character <code>-</code> U+002D (HYPHEN-MINUS).
</li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="ClassAtom" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-ClassAtom">ClassAtom</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="a91c9a11"><emu-nt id="_ref_14767"><a href="#prod-ClassAtomNoDash">ClassAtomNoDash</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Return the CharSet that is the result of evaluating <emu-nt id="_ref_14768"><a href="#prod-ClassAtomNoDash">ClassAtomNoDash</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-classatomnodash">
<h1><span class="secnum">21.2.2.18</span>ClassAtomNoDash</h1>
<p>The production <emu-grammar><emu-production name="ClassAtomNoDash" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-ClassAtomNoDash">ClassAtomNoDash</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="ecde6e28"><emu-nt id="_ref_14769"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-gmod>but not one of <emu-t>\</emu-t> or <emu-t>]</emu-t> or <emu-t>-</emu-t></emu-gmod></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Return the CharSet containing the character matched by <emu-nt id="_ref_14770"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt>.
</li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="ClassAtomNoDash" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-ClassAtomNoDash">ClassAtomNoDash</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="eed422e6"><emu-t>\</emu-t><emu-nt id="_ref_14771"><a href="#prod-ClassEscape">ClassEscape</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Return the CharSet that is the result of evaluating <emu-nt id="_ref_14772"><a href="#prod-ClassEscape">ClassEscape</a></emu-nt>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-classescape">
<h1><span class="secnum">21.2.2.19</span>ClassEscape</h1>
<p>The <emu-nt id="_ref_14773"><a href="#prod-ClassEscape">ClassEscape</a></emu-nt> productions evaluate as follows:</p>
<emu-grammar><emu-production name="ClassEscape" type="lexical" collapsed="">
<emu-nt><a href="#prod-ClassEscape">ClassEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="0185ce89"><emu-t>b</emu-t></emu-rhs>
</emu-production>
<emu-production name="ClassEscape" type="lexical" collapsed="">
<emu-nt><a href="#prod-ClassEscape">ClassEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="6f24a587"><emu-t>-</emu-t></emu-rhs>
</emu-production>
<emu-production name="ClassEscape" type="lexical" collapsed="">
<emu-nt><a href="#prod-ClassEscape">ClassEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="163011be"><emu-nt id="_ref_14774"><a href="#prod-CharacterEscape">CharacterEscape</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>cv</var> be the CharacterValue of this <emu-nt id="_ref_14775"><a href="#prod-ClassEscape">ClassEscape</a></emu-nt>.</li><li>Let <var>c</var> be the character whose character value is <var>cv</var>.</li><li>Return the CharSet containing the single character <var>c</var>.
</li></ol></emu-alg>
<emu-grammar><emu-production name="ClassEscape" type="lexical" collapsed="">
<emu-nt><a href="#prod-ClassEscape">ClassEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="6f05bee4"><emu-nt id="_ref_14776"><a href="#prod-CharacterClassEscape">CharacterClassEscape</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the CharSet that is the result of evaluating <emu-nt id="_ref_14777"><a href="#prod-CharacterClassEscape">CharacterClassEscape</a></emu-nt>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>A <emu-nt id="_ref_14778"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt> can use any of the escape sequences that are allowed in the rest of the regular expression except for <code>\b</code>, <code>\B</code>, and backreferences. Inside a <emu-nt id="_ref_14779"><a href="#prod-CharacterClass">CharacterClass</a></emu-nt>, <code>\b</code> means the backspace character, while <code>\B</code> and backreferences raise errors. Using a backreference inside a <emu-nt id="_ref_14780"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt> causes an error.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-regexp-constructor">
<h1><span class="secnum">21.2.3</span>The RegExp Constructor</h1>
<p>The RegExp <emu-xref href="#constructor" id="_ref_6084"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>is the intrinsic object <dfn>%RegExp%</dfn>.</li>
<li>is the initial value of the <code>RegExp</code> property of the <emu-xref href="#sec-global-object" id="_ref_6085"><a href="#sec-global-object">global object</a></emu-xref>.</li>
<li>creates and initializes a new RegExp object when called as a function rather than as a <emu-xref href="#constructor" id="_ref_6086"><a href="#constructor">constructor</a></emu-xref>. Thus the function call <code>RegExp(…)</code> is equivalent to the object creation expression <code>new RegExp(…)</code> with the same arguments.</li>
<li>is designed to be subclassable. It may be used as the value of an <code>extends</code> clause of a class definition. Subclass constructors that intend to inherit the specified <code>RegExp</code> behaviour must include a <code>super</code> call to the <code>RegExp</code> <emu-xref href="#constructor" id="_ref_6087"><a href="#constructor">constructor</a></emu-xref> to create and initialize subclass instances with the necessary internal slots.</li>
</ul>
<emu-clause id="sec-regexp-pattern-flags">
<h1><span class="secnum">21.2.3.1</span>RegExp ( <var>pattern</var>, <var>flags</var> )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>patternIsRegExp</var> be ?&nbsp;<emu-xref aoid="IsRegExp" id="_ref_6088"><a href="#sec-isregexp">IsRegExp</a></emu-xref>(<var>pattern</var>).</li><li>If NewTarget is <emu-val>undefined</emu-val>, then<ol><li>Let <var>newTarget</var> be the <emu-xref href="#active-function-object" id="_ref_6089"><a href="#active-function-object">active function object</a></emu-xref>.</li><li>If <var>patternIsRegExp</var> is <emu-val>true</emu-val> and <var>flags</var> is <emu-val>undefined</emu-val>, then<ol><li>Let <var>patternConstructor</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6090"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>pattern</var>, <code>"constructor"</code>).</li><li>If <emu-xref aoid="SameValue" id="_ref_6091"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>newTarget</var>, <var>patternConstructor</var>) is <emu-val>true</emu-val>, return <var>pattern</var>.</li></ol></li></ol></li><li>Else, let <var>newTarget</var> be NewTarget.</li><li>If <emu-xref aoid="Type" id="_ref_6092"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>pattern</var>) is Object and <var>pattern</var> has a [[RegExpMatcher]] internal slot, then<ol><li>Let <var>P</var> be <var>pattern</var>.[[OriginalSource]].</li><li>If <var>flags</var> is <emu-val>undefined</emu-val>, let <var>F</var> be <var>pattern</var>.[[OriginalFlags]].</li><li>Else, let <var>F</var> be <var>flags</var>.</li></ol></li><li>Else if <var>patternIsRegExp</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>P</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6093"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>pattern</var>, <code>"source"</code>).</li><li>If <var>flags</var> is <emu-val>undefined</emu-val>, then<ol><li>Let <var>F</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6094"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>pattern</var>, <code>"flags"</code>).</li></ol></li><li>Else, let <var>F</var> be <var>flags</var>.</li></ol></li><li>Else,<ol><li>Let <var>P</var> be <var>pattern</var>.</li><li>Let <var>F</var> be <var>flags</var>.</li></ol></li><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="RegExpAlloc" id="_ref_6095"><a href="#sec-regexpalloc">RegExpAlloc</a></emu-xref>(<var>newTarget</var>).</li><li>Return ?&nbsp;<emu-xref aoid="RegExpInitialize" id="_ref_6096"><a href="#sec-regexpinitialize">RegExpInitialize</a></emu-xref>(<var>O</var>, <var>P</var>, <var>F</var>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>If pattern is supplied using a <emu-nt id="_ref_14781"><a href="#prod-StringLiteral">StringLiteral</a></emu-nt>,
the usual escape sequence substitutions are performed before the String
is processed by RegExp. If pattern must contain an escape sequence to
be recognized by RegExp, any U+005C (REVERSE SOLIDUS) code points must
be escaped within the <emu-nt id="_ref_14782"><a href="#prod-StringLiteral">StringLiteral</a></emu-nt> to prevent them being removed when the contents of the <emu-nt id="_ref_14783"><a href="#prod-StringLiteral">StringLiteral</a></emu-nt> are formed.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-abstract-operations-for-the-regexp-constructor">
<h1><span class="secnum">21.2.3.2</span>Abstract Operations for the RegExp Constructor</h1>
<emu-clause id="sec-regexpalloc" aoid="RegExpAlloc">
<h1><span class="secnum">21.2.3.2.1</span>Runtime Semantics: RegExpAlloc ( <var>newTarget</var> )</h1>
<p>When the abstract operation RegExpAlloc with argument <var>newTarget</var> is called, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>obj</var> be ?&nbsp;<emu-xref aoid="OrdinaryCreateFromConstructor" id="_ref_6097"><a href="#sec-ordinarycreatefromconstructor">OrdinaryCreateFromConstructor</a></emu-xref>(<var>newTarget</var>, <code>"%RegExpPrototype%"</code>, « [[RegExpMatcher]], [[OriginalSource]], [[OriginalFlags]] »).</li><li>Perform !&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_6098"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>obj</var>, <code>"lastIndex"</code>, PropertyDescriptor { [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }).</li><li>Return <var>obj</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-regexpinitialize" aoid="RegExpInitialize">
<h1><span class="secnum">21.2.3.2.2</span>Runtime Semantics: RegExpInitialize ( <var>obj</var>, <var>pattern</var>, <var>flags</var> )</h1>
<p>When the abstract operation RegExpInitialize with arguments <var>obj</var>, <var>pattern</var>, and <var>flags</var> is called, the following steps are taken:</p>
<emu-alg><ol><li>If <var>pattern</var> is <emu-val>undefined</emu-val>, let <var>P</var> be the empty String.</li><li>Else, let <var>P</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_6099"><a href="#sec-tostring">ToString</a></emu-xref>(<var>pattern</var>).</li><li>If <var>flags</var> is <emu-val>undefined</emu-val>, let <var>F</var> be the empty String.</li><li>Else, let <var>F</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_6100"><a href="#sec-tostring">ToString</a></emu-xref>(<var>flags</var>).</li><li>If <var>F</var> contains any code unit other than <code>"g"</code>, <code>"i"</code>, <code>"m"</code>, <code>"s"</code>, <code>"u"</code>, or <code>"y"</code> or if it contains the same code unit more than once, throw a <emu-val>SyntaxError</emu-val> exception.</li><li>If <var>F</var> contains <code>"u"</code>, let <var>BMP</var> be <emu-val>false</emu-val>; else let <var>BMP</var> be <emu-val>true</emu-val>.</li><li>If <var>BMP</var> is <emu-val>true</emu-val>, then<ol><li>Parse <var>P</var> using the grammars in <emu-xref href="#sec-patterns" id="_ref_568"><a href="#sec-patterns">21.2.1</a></emu-xref> and interpreting each of its 16-bit elements as a Unicode BMP code point. UTF-16 decoding is not applied to the elements. The <emu-xref href="#sec-context-free-grammars" id="_ref_6101"><a href="#sec-context-free-grammars">goal symbol</a></emu-xref> for the parse is <emu-nt params="~U, ~N" id="_ref_14784"><a href="#prod-Pattern">Pattern</a><emu-mods><emu-params>[~U, ~N]</emu-params></emu-mods></emu-nt>. If the result of parsing contains a <emu-nt id="_ref_14785"><a href="#prod-GroupName">GroupName</a></emu-nt>, reparse with the <emu-xref href="#sec-context-free-grammars" id="_ref_6102"><a href="#sec-context-free-grammars">goal symbol</a></emu-xref> <emu-nt params="~U, +N" id="_ref_14786"><a href="#prod-Pattern">Pattern</a><emu-mods><emu-params>[~U, +N]</emu-params></emu-mods></emu-nt> and use this result instead. Throw a <emu-val>SyntaxError</emu-val> exception if <var>P</var> did not conform to the grammar, if any elements of <var>P</var> were not matched by the parse, or if any Early Error conditions exist.</li><li>Let <var>patternCharacters</var> be a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6103"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> whose elements are the code unit elements of <var>P</var>.</li></ol></li><li>Else,<ol><li>Parse <var>P</var> using the grammars in <emu-xref href="#sec-patterns" id="_ref_569"><a href="#sec-patterns">21.2.1</a></emu-xref> and interpreting <var>P</var> as UTF-16 encoded Unicode code points (<emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_570"><a href="#sec-ecmascript-language-types-string-type">6.1.4</a></emu-xref>). The <emu-xref href="#sec-context-free-grammars" id="_ref_6104"><a href="#sec-context-free-grammars">goal symbol</a></emu-xref> for the parse is <emu-nt params="+U, +N" id="_ref_14787"><a href="#prod-Pattern">Pattern</a><emu-mods><emu-params>[+U, +N]</emu-params></emu-mods></emu-nt>. Throw a <emu-val>SyntaxError</emu-val> exception if <var>P</var> did not conform to the grammar, if any elements of <var>P</var> were not matched by the parse, or if any Early Error conditions exist.</li><li>Let <var>patternCharacters</var> be a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6105"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> whose elements are the code points resulting from applying UTF-16 decoding to <var>P</var>'s sequence of elements.</li></ol></li><li>Set <var>obj</var>.[[OriginalSource]] to <var>P</var>.</li><li>Set <var>obj</var>.[[OriginalFlags]] to <var>F</var>.</li><li>Set <var>obj</var>.[[RegExpMatcher]] to the internal procedure that evaluates the above parse of <var>P</var> by applying the semantics provided in <emu-xref href="#sec-pattern-semantics" id="_ref_571"><a href="#sec-pattern-semantics">21.2.2</a></emu-xref> using <var>patternCharacters</var> as the pattern's <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6106"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of <emu-nt id="_ref_14788"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt> values and <var>F</var> as the flag parameters.</li><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6107"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>obj</var>, <code>"lastIndex"</code>, 0, <emu-val>true</emu-val>).</li><li>Return <var>obj</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-regexpcreate" aoid="RegExpCreate">
<h1><span class="secnum">21.2.3.2.3</span>Runtime Semantics: RegExpCreate ( <var>P</var>, <var>F</var> )</h1>
<p>When the abstract operation RegExpCreate with arguments <var>P</var> and <var>F</var> is called, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>obj</var> be ?&nbsp;<emu-xref aoid="RegExpAlloc" id="_ref_6108"><a href="#sec-regexpalloc">RegExpAlloc</a></emu-xref>(<emu-xref href="#sec-regexp-constructor" id="_ref_6109"><a href="#sec-regexp-constructor">%RegExp%</a></emu-xref>).</li><li>Return ?&nbsp;<emu-xref aoid="RegExpInitialize" id="_ref_6110"><a href="#sec-regexpinitialize">RegExpInitialize</a></emu-xref>(<var>obj</var>, <var>P</var>, <var>F</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-escaperegexppattern" aoid="EscapeRegExpPattern">
<h1><span class="secnum">21.2.3.2.4</span>Runtime Semantics: EscapeRegExpPattern ( <var>P</var>, <var>F</var> )</h1>
<p>When the abstract operation EscapeRegExpPattern with arguments <var>P</var> and <var>F</var> is called, the following occurs:</p>
<emu-alg><ol><li>Let <var>S</var> be a String in the form of a <emu-nt params="~U" id="_ref_14789"><a href="#prod-Pattern">Pattern</a><emu-mods><emu-params>[~U]</emu-params></emu-mods></emu-nt> (<emu-nt params="+U" id="_ref_14790"><a href="#prod-Pattern">Pattern</a><emu-mods><emu-params>[+U]</emu-params></emu-mods></emu-nt> if <var>F</var> contains <code>"u"</code>) equivalent to <var>P</var> interpreted as UTF-16 encoded Unicode code points (<emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_572"><a href="#sec-ecmascript-language-types-string-type">6.1.4</a></emu-xref>), in which certain code points are escaped as described below. <var>S</var> may or may not be identical to <var>P</var>; however, the internal procedure that would result from evaluating <var>S</var> as a <emu-nt params="~U" id="_ref_14791"><a href="#prod-Pattern">Pattern</a><emu-mods><emu-params>[~U]</emu-params></emu-mods></emu-nt> (<emu-nt params="+U" id="_ref_14792"><a href="#prod-Pattern">Pattern</a><emu-mods><emu-params>[+U]</emu-params></emu-mods></emu-nt> if <var>F</var> contains <code>"u"</code>)
must behave identically to the internal procedure given by the
constructed object's [[RegExpMatcher]] internal slot. Multiple calls to
this abstract operation using the same values for <var>P</var> and <var>F</var> must produce identical results.</li><li>The code points <code>/</code> or any <emu-nt id="_ref_14793"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> occurring in the pattern shall be escaped in <var>S</var> as necessary to ensure that the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_6111"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <code>"/"</code>, <var>S</var>, <code>"/"</code>, and <var>F</var> can be parsed (in an appropriate lexical context) as a <emu-nt id="_ref_14794"><a href="#prod-RegularExpressionLiteral">RegularExpressionLiteral</a></emu-nt> that behaves identically to the constructed regular expression. For example, if <var>P</var> is <code>"/"</code>, then <var>S</var> could be <code>"\/"</code> or <code>"\u002F"</code>, among other possibilities, but not <code>"/"</code>, because <code>///</code> followed by <var>F</var> would be parsed as a <emu-nt id="_ref_14795"><a href="#prod-SingleLineComment">SingleLineComment</a></emu-nt> rather than a <emu-nt id="_ref_14796"><a href="#prod-RegularExpressionLiteral">RegularExpressionLiteral</a></emu-nt>. If <var>P</var> is the empty String, this specification can be met by letting <var>S</var> be <code>"(?:)"</code>.</li><li>Return <var>S</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-regexp-constructor">
<h1><span class="secnum">21.2.4</span>Properties of the RegExp Constructor</h1>
<p>The RegExp <emu-xref href="#constructor" id="_ref_6112"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_6113"><a href="#sec-properties-of-the-function-prototype-object">%FunctionPrototype%</a></emu-xref>.</li>
<li>has the following properties:</li>
</ul>
<emu-clause id="sec-regexp.prototype">
<h1><span class="secnum">21.2.4.1</span>RegExp.prototype</h1>
<p>The initial value of <code>RegExp.prototype</code> is the intrinsic object <emu-xref href="#sec-properties-of-the-regexp-prototype-object" id="_ref_6114"><a href="#sec-properties-of-the-regexp-prototype-object">%RegExpPrototype%</a></emu-xref>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-get-regexp-@@species">
<h1><span class="secnum">21.2.4.2</span>get RegExp [ @@species ]</h1>
<p><code>RegExp[@@species]</code> is an <emu-xref href="#sec-object-type" id="_ref_6115"><a href="#sec-object-type">accessor property</a></emu-xref> whose set accessor function is <emu-val>undefined</emu-val>. Its get accessor function performs the following steps:</p>
<emu-alg><ol><li>Return the <emu-val>this</emu-val> value.
</li></ol></emu-alg>
<p>The value of the <code>name</code> property of this function is <code>"get [Symbol.species]"</code>.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>RegExp prototype methods normally use their <code>this</code> object's <emu-xref href="#constructor" id="_ref_6116"><a href="#constructor">constructor</a></emu-xref> to create a derived object. However, a subclass <emu-xref href="#constructor" id="_ref_6117"><a href="#constructor">constructor</a></emu-xref> may over-ride that default behaviour by redefining its @@species property.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-regexp-prototype-object">
<h1><span class="secnum">21.2.5</span>Properties of the RegExp Prototype Object</h1>
<p>The RegExp prototype object:</p>
<ul>
<li>is the intrinsic object <dfn>%RegExpPrototype%</dfn>.</li>
<li>is an ordinary object.</li>
<li>is not a RegExp instance and does not have a
[[RegExpMatcher]] internal slot or any of the other internal slots of
RegExp instance objects.</li>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_6118"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>.</li>
</ul>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The RegExp prototype object does not have a <code>valueOf</code> property of its own; however, it inherits the <code>valueOf</code> property from the Object prototype object.</p>
</div></emu-note>
<emu-clause id="sec-regexp.prototype.constructor">
<h1><span class="secnum">21.2.5.1</span>RegExp.prototype.constructor</h1>
<p>The initial value of <code>RegExp.prototype.constructor</code> is the intrinsic object <emu-xref href="#sec-regexp-constructor" id="_ref_6119"><a href="#sec-regexp-constructor">%RegExp%</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-regexp.prototype.exec">
<h1><span class="secnum">21.2.5.2</span>RegExp.prototype.exec ( <var>string</var> )</h1>
<p>Performs a regular expression match of <var>string</var> against the regular expression and returns an Array object containing the results of the match, or <emu-val>null</emu-val> if <var>string</var> did not match.</p>
<p>The String <emu-xref aoid="ToString" id="_ref_6120"><a href="#sec-tostring">ToString</a></emu-xref>(<var>string</var>) is searched for an occurrence of the regular expression pattern as follows:</p>
<emu-alg><ol><li>Let <var>R</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_6121"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>R</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>R</var> does not have a [[RegExpMatcher]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>S</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_6122"><a href="#sec-tostring">ToString</a></emu-xref>(<var>string</var>).</li><li>Return ?&nbsp;<emu-xref aoid="RegExpBuiltinExec" id="_ref_6123"><a href="#sec-regexpbuiltinexec">RegExpBuiltinExec</a></emu-xref>(<var>R</var>, <var>S</var>).
</li></ol></emu-alg>
<emu-clause id="sec-regexpexec" aoid="RegExpExec">
<h1><span class="secnum">21.2.5.2.1</span>Runtime Semantics: RegExpExec ( <var>R</var>, <var>S</var> )</h1>
<p>The abstract operation RegExpExec with arguments <var>R</var> and <var>S</var> performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_6124"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_6125"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>R</var>) is Object.</li><li><emu-xref href="#assert" id="_ref_6126"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_6127"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>S</var>) is String.</li><li>Let <var>exec</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6128"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>R</var>, <code>"exec"</code>).</li><li>If <emu-xref aoid="IsCallable" id="_ref_6129"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>exec</var>) is <emu-val>true</emu-val>, then<ol><li>Let <var>result</var> be ?&nbsp;<emu-xref aoid="Call" id="_ref_6130"><a href="#sec-call">Call</a></emu-xref>(<var>exec</var>, <var>R</var>, « <var>S</var> »).</li><li>If <emu-xref aoid="Type" id="_ref_6131"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>result</var>) is neither Object or Null, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return <var>result</var>.</li></ol></li><li>If <var>R</var> does not have a [[RegExpMatcher]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return ?&nbsp;<emu-xref aoid="RegExpBuiltinExec" id="_ref_6132"><a href="#sec-regexpbuiltinexec">RegExpBuiltinExec</a></emu-xref>(<var>R</var>, <var>S</var>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>If a callable <code>exec</code> property is not found
this algorithm falls back to attempting to use the built-in RegExp
matching algorithm. This provides compatible behaviour for code written
for prior editions where most built-in algorithms that use regular
expressions did not perform a dynamic property lookup of <code>exec</code>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-regexpbuiltinexec" aoid="RegExpBuiltinExec">
<h1><span class="secnum">21.2.5.2.2</span>Runtime Semantics: RegExpBuiltinExec ( <var>R</var>, <var>S</var> )</h1>
<p>The abstract operation RegExpBuiltinExec with arguments <var>R</var> and <var>S</var> performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_6133"><a href="#assert">Assert</a></emu-xref>: <var>R</var> is an initialized RegExp instance.</li><li><emu-xref href="#assert" id="_ref_6134"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_6135"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>S</var>) is String.</li><li>Let <var>length</var> be the number of code units in <var>S</var>.</li><li>Let <var>lastIndex</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6136"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6137"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>R</var>, <code>"lastIndex"</code>)).</li><li>Let <var>flags</var> be <var>R</var>.[[OriginalFlags]].</li><li>If <var>flags</var> contains <code>"g"</code>, let <var>global</var> be <emu-val>true</emu-val>, else let <var>global</var> be <emu-val>false</emu-val>.</li><li>If <var>flags</var> contains <code>"y"</code>, let <var>sticky</var> be <emu-val>true</emu-val>, else let <var>sticky</var> be <emu-val>false</emu-val>.</li><li>If <var>global</var> is <emu-val>false</emu-val> and <var>sticky</var> is <emu-val>false</emu-val>, set <var>lastIndex</var> to 0.</li><li>Let <var>matcher</var> be <var>R</var>.[[RegExpMatcher]].</li><li>If <var>flags</var> contains <code>"u"</code>, let <var>fullUnicode</var> be <emu-val>true</emu-val>, else let <var>fullUnicode</var> be <emu-val>false</emu-val>.</li><li>Let <var>matchSucceeded</var> be <emu-val>false</emu-val>.</li><li>Repeat, while <var>matchSucceeded</var> is <emu-val>false</emu-val><ol><li>If <var>lastIndex</var> &gt; <var>length</var>, then<ol><li>If <var>global</var> is <emu-val>true</emu-val> or <var>sticky</var> is <emu-val>true</emu-val>, then<ol><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6138"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>R</var>, <code>"lastIndex"</code>, 0, <emu-val>true</emu-val>).</li></ol></li><li>Return <emu-val>null</emu-val>.</li></ol></li><li>Let <var>r</var> be <var>matcher</var>(<var>S</var>, <var>lastIndex</var>).</li><li>If <var>r</var> is <emu-const>failure</emu-const>, then<ol><li>If <var>sticky</var> is <emu-val>true</emu-val>, then<ol><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6139"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>R</var>, <code>"lastIndex"</code>, 0, <emu-val>true</emu-val>).</li><li>Return <emu-val>null</emu-val>.</li></ol></li><li>Set <var>lastIndex</var> to <emu-xref aoid="AdvanceStringIndex" id="_ref_6140"><a href="#sec-advancestringindex">AdvanceStringIndex</a></emu-xref>(<var>S</var>, <var>lastIndex</var>, <var>fullUnicode</var>).</li></ol></li><li>Else,<ol><li><emu-xref href="#assert" id="_ref_6141"><a href="#assert">Assert</a></emu-xref>: <var>r</var> is a State.</li><li>Set <var>matchSucceeded</var> to <emu-val>true</emu-val>.</li></ol></li></ol></li><li>Let <var>e</var> be <var>r</var>'s <var>endIndex</var> value.</li><li>If <var>fullUnicode</var> is <emu-val>true</emu-val>, then<ol><li><var>e</var> is an index into the <var>Input</var> character list, derived from <var>S</var>, matched by <var>matcher</var>. Let <var>eUTF</var> be the smallest index into <var>S</var> that corresponds to the character at element <var>e</var> of <var>Input</var>. If <var>e</var> is greater than or equal to the number of elements in <var>Input</var>, then <var>eUTF</var> is the number of code units in <var>S</var>.</li><li>Set <var>e</var> to <var>eUTF</var>.</li></ol></li><li>If <var>global</var> is <emu-val>true</emu-val> or <var>sticky</var> is <emu-val>true</emu-val>, then<ol><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6142"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>R</var>, <code>"lastIndex"</code>, <var>e</var>, <emu-val>true</emu-val>).</li></ol></li><li>Let <var>n</var> be the number of elements in <var>r</var>'s <var>captures</var> <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6143"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>. (This is the same value as <emu-xref href="#sec-notation" id="_ref_573"><a href="#sec-notation">21.2.2.1</a></emu-xref>'s <var>NcapturingParens</var>.)</li><li><emu-xref href="#assert" id="_ref_6144"><a href="#assert">Assert</a></emu-xref>: <var>n</var> &lt; 2<sup>32</sup> - 1.</li><li>Let <var>A</var> be !&nbsp;<emu-xref aoid="ArrayCreate" id="_ref_6145"><a href="#sec-arraycreate">ArrayCreate</a></emu-xref>(<var>n</var> + 1).</li><li><emu-xref href="#assert" id="_ref_6146"><a href="#assert">Assert</a></emu-xref>: The value of <var>A</var>'s <code>"length"</code> property is <var>n</var> + 1.</li><li>Perform !&nbsp;<emu-xref aoid="CreateDataProperty" id="_ref_6147"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>A</var>, <code>"index"</code>, <var>lastIndex</var>).</li><li>Perform !&nbsp;<emu-xref aoid="CreateDataProperty" id="_ref_6148"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>A</var>, <code>"input"</code>, <var>S</var>).</li><li>Let <var>matchedSubstr</var> be the matched substring (i.e. the portion of <var>S</var> between offset <var>lastIndex</var> inclusive and offset <var>e</var> exclusive).</li><li>Perform !&nbsp;<emu-xref aoid="CreateDataProperty" id="_ref_6149"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>A</var>, <code>"0"</code>, <var>matchedSubstr</var>).</li><li>If <var>R</var> contains any <emu-nt id="_ref_14797"><a href="#prod-GroupName">GroupName</a></emu-nt>, then<ol><li>Let <var>groups</var> be <emu-xref aoid="ObjectCreate" id="_ref_6150"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-val>null</emu-val>).</li></ol></li><li>Else,<ol><li>Let <var>groups</var> be <emu-val>undefined</emu-val>.</li></ol></li><li>Perform !&nbsp;<emu-xref aoid="CreateDataProperty" id="_ref_6151"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>A</var>, <code>"groups"</code>, <var>groups</var>).</li><li>For each integer <var>i</var> such that <var>i</var> &gt; 0 and <var>i</var> ≤ <var>n</var>, do<ol><li>Let <var>captureI</var> be <var>i</var><sup>th</sup> element of <var>r</var>'s <var>captures</var> <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6152"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>If <var>captureI</var> is <emu-val>undefined</emu-val>, let <var>capturedValue</var> be <emu-val>undefined</emu-val>.</li><li>Else if <var>fullUnicode</var> is <emu-val>true</emu-val>, then<ol><li><emu-xref href="#assert" id="_ref_6153"><a href="#assert">Assert</a></emu-xref>: <var>captureI</var> is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6154"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of code points.</li><li>Let <var>capturedValue</var> be the String value whose code units are the <emu-xref aoid="UTF16Encoding" id="_ref_6155"><a href="#sec-utf16encoding">UTF16Encoding</a></emu-xref> of the code points of <var>captureI</var>.</li></ol></li><li>Else <var>fullUnicode</var> is <emu-val>false</emu-val>,<ol><li><emu-xref href="#assert" id="_ref_6156"><a href="#assert">Assert</a></emu-xref>: <var>captureI</var> is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6157"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of code units.</li><li>Let <var>capturedValue</var> be the String value consisting of the code units of <var>captureI</var>.</li></ol></li><li>Perform !&nbsp;<emu-xref aoid="CreateDataProperty" id="_ref_6158"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>A</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_6159"><a href="#sec-tostring">ToString</a></emu-xref>(<var>i</var>), <var>capturedValue</var>).</li><li>If the <var>i</var>th capture of <var>R</var> was defined with a <emu-nt id="_ref_14798"><a href="#prod-GroupName">GroupName</a></emu-nt>, then<ol><li>Let <var>s</var> be the StringValue of the corresponding <emu-nt id="_ref_14799"><a href="#prod-RegExpIdentifierName">RegExpIdentifierName</a></emu-nt>.</li><li>Perform !&nbsp;<emu-xref aoid="CreateDataProperty" id="_ref_6160"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>groups</var>, <var>s</var>, <var>capturedValue</var>).</li></ol></li></ol></li><li>Return <var>A</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-advancestringindex" aoid="AdvanceStringIndex">
<h1><span class="secnum">21.2.5.2.3</span>AdvanceStringIndex ( <var>S</var>, <var>index</var>, <var>unicode</var> )</h1>
<p>The abstract operation AdvanceStringIndex with arguments <var>S</var>, <var>index</var>, and <var>unicode</var> performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_6161"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_6162"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>S</var>) is String.</li><li><emu-xref href="#assert" id="_ref_6163"><a href="#assert">Assert</a></emu-xref>: <var>index</var> is an integer such that 0 ≤ <var>index</var> ≤ 2<sup>53</sup> - 1.</li><li><emu-xref href="#assert" id="_ref_6164"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_6165"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>unicode</var>) is Boolean.</li><li>If <var>unicode</var> is <emu-val>false</emu-val>, return <var>index</var> + 1.</li><li>Let <var>length</var> be the number of code units in <var>S</var>.</li><li>If <var>index</var> + 1 ≥ <var>length</var>, return <var>index</var> + 1.</li><li>Let <var>first</var> be the numeric value of the code unit at index <var>index</var> within <var>S</var>.</li><li>If <var>first</var> &lt; 0xD800 or <var>first</var> &gt; 0xDBFF, return <var>index</var> + 1.</li><li>Let <var>second</var> be the numeric value of the code unit at index <var>index</var> + 1 within <var>S</var>.</li><li>If <var>second</var> &lt; 0xDC00 or <var>second</var> &gt; 0xDFFF, return <var>index</var> + 1.</li><li>Return <var>index</var> + 2.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-get-regexp.prototype.dotAll">
<h1><span class="secnum">21.2.5.3</span>get RegExp.prototype.dotAll</h1>
<p><code>RegExp.prototype.dotAll</code> is an <emu-xref href="#sec-object-type" id="_ref_6166"><a href="#sec-object-type">accessor property</a></emu-xref> whose set accessor function is <emu-val>undefined</emu-val>. Its get accessor function performs the following steps:</p>
<emu-alg><ol><li>Let <var>R</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_6167"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>R</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>R</var> does not have an [[OriginalFlags]] internal slot, then<ol><li>If <emu-xref aoid="SameValue" id="_ref_6168"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>R</var>, <emu-xref href="#sec-properties-of-the-regexp-prototype-object" id="_ref_6169"><a href="#sec-properties-of-the-regexp-prototype-object">%RegExpPrototype%</a></emu-xref>) is <emu-val>true</emu-val>, return <emu-val>undefined</emu-val>.</li><li>Otherwise, throw a <emu-val>TypeError</emu-val> exception.</li></ol></li><li>Let <var>flags</var> be <var>R</var>.[[OriginalFlags]].</li><li>If <var>flags</var> contains the code unit 0x0073 (LATIN SMALL LETTER S), return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-get-regexp.prototype.flags">
<h1><span class="secnum">21.2.5.4</span>get RegExp.prototype.flags</h1>
<p><code>RegExp.prototype.flags</code> is an <emu-xref href="#sec-object-type" id="_ref_6170"><a href="#sec-object-type">accessor property</a></emu-xref> whose set accessor function is <emu-val>undefined</emu-val>. Its get accessor function performs the following steps:</p>
<emu-alg><ol><li>Let <var>R</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_6171"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>R</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>result</var> be the empty String.</li><li>Let <var>global</var> be <emu-xref aoid="ToBoolean" id="_ref_6172"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6173"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>R</var>, <code>"global"</code>)).</li><li>If <var>global</var> is <emu-val>true</emu-val>, append the code unit 0x0067 (LATIN SMALL LETTER G) as the last code unit of <var>result</var>.</li><li>Let <var>ignoreCase</var> be <emu-xref aoid="ToBoolean" id="_ref_6174"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6175"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>R</var>, <code>"ignoreCase"</code>)).</li><li>If <var>ignoreCase</var> is <emu-val>true</emu-val>, append the code unit 0x0069 (LATIN SMALL LETTER I) as the last code unit of <var>result</var>.</li><li>Let <var>multiline</var> be <emu-xref aoid="ToBoolean" id="_ref_6176"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6177"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>R</var>, <code>"multiline"</code>)).</li><li>If <var>multiline</var> is <emu-val>true</emu-val>, append the code unit 0x006D (LATIN SMALL LETTER M) as the last code unit of <var>result</var>.</li><li>Let <var>dotAll</var> be <emu-xref aoid="ToBoolean" id="_ref_6178"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6179"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>R</var>, <code>"dotAll"</code>)).</li><li>If <var>dotAll</var> is <emu-val>true</emu-val>, append the code unit 0x0073 (LATIN SMALL LETTER S) as the last code unit of <var>result</var>.</li><li>Let <var>unicode</var> be <emu-xref aoid="ToBoolean" id="_ref_6180"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6181"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>R</var>, <code>"unicode"</code>)).</li><li>If <var>unicode</var> is <emu-val>true</emu-val>, append the code unit 0x0075 (LATIN SMALL LETTER U) as the last code unit of <var>result</var>.</li><li>Let <var>sticky</var> be <emu-xref aoid="ToBoolean" id="_ref_6182"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6183"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>R</var>, <code>"sticky"</code>)).</li><li>If <var>sticky</var> is <emu-val>true</emu-val>, append the code unit 0x0079 (LATIN SMALL LETTER Y) as the last code unit of <var>result</var>.</li><li>Return <var>result</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-get-regexp.prototype.global">
<h1><span class="secnum">21.2.5.5</span>get RegExp.prototype.global</h1>
<p><code>RegExp.prototype.global</code> is an <emu-xref href="#sec-object-type" id="_ref_6184"><a href="#sec-object-type">accessor property</a></emu-xref> whose set accessor function is <emu-val>undefined</emu-val>. Its get accessor function performs the following steps:</p>
<emu-alg><ol><li>Let <var>R</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_6185"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>R</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>R</var> does not have an [[OriginalFlags]] internal slot, then<ol><li>If <emu-xref aoid="SameValue" id="_ref_6186"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>R</var>, <emu-xref href="#sec-properties-of-the-regexp-prototype-object" id="_ref_6187"><a href="#sec-properties-of-the-regexp-prototype-object">%RegExpPrototype%</a></emu-xref>) is <emu-val>true</emu-val>, return <emu-val>undefined</emu-val>.</li><li>Otherwise, throw a <emu-val>TypeError</emu-val> exception.</li></ol></li><li>Let <var>flags</var> be <var>R</var>.[[OriginalFlags]].</li><li>If <var>flags</var> contains the code unit 0x0067 (LATIN SMALL LETTER G), return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-get-regexp.prototype.ignorecase">
<h1><span class="secnum">21.2.5.6</span>get RegExp.prototype.ignoreCase</h1>
<p><code>RegExp.prototype.ignoreCase</code> is an <emu-xref href="#sec-object-type" id="_ref_6188"><a href="#sec-object-type">accessor property</a></emu-xref> whose set accessor function is <emu-val>undefined</emu-val>. Its get accessor function performs the following steps:</p>
<emu-alg><ol><li>Let <var>R</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_6189"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>R</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>R</var> does not have an [[OriginalFlags]] internal slot, then<ol><li>If <emu-xref aoid="SameValue" id="_ref_6190"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>R</var>, <emu-xref href="#sec-properties-of-the-regexp-prototype-object" id="_ref_6191"><a href="#sec-properties-of-the-regexp-prototype-object">%RegExpPrototype%</a></emu-xref>) is <emu-val>true</emu-val>, return <emu-val>undefined</emu-val>.</li><li>Otherwise, throw a <emu-val>TypeError</emu-val> exception.</li></ol></li><li>Let <var>flags</var> be <var>R</var>.[[OriginalFlags]].</li><li>If <var>flags</var> contains the code unit 0x0069 (LATIN SMALL LETTER I), return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-regexp.prototype-@@match">
<h1><span class="secnum">21.2.5.7</span>RegExp.prototype [ @@match ] ( <var>string</var> )</h1>
<p>When the <code>@@match</code> method is called with argument <var>string</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>rx</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_6192"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>rx</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>S</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_6193"><a href="#sec-tostring">ToString</a></emu-xref>(<var>string</var>).</li><li>Let <var>global</var> be <emu-xref aoid="ToBoolean" id="_ref_6194"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6195"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>rx</var>, <code>"global"</code>)).</li><li>If <var>global</var> is <emu-val>false</emu-val>, then<ol><li>Return ?&nbsp;<emu-xref aoid="RegExpExec" id="_ref_6196"><a href="#sec-regexpexec">RegExpExec</a></emu-xref>(<var>rx</var>, <var>S</var>).</li></ol></li><li>Else <var>global</var> is <emu-val>true</emu-val>,<ol><li>Let <var>fullUnicode</var> be <emu-xref aoid="ToBoolean" id="_ref_6197"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6198"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>rx</var>, <code>"unicode"</code>)).</li><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6199"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>rx</var>, <code>"lastIndex"</code>, 0, <emu-val>true</emu-val>).</li><li>Let <var>A</var> be !&nbsp;<emu-xref aoid="ArrayCreate" id="_ref_6200"><a href="#sec-arraycreate">ArrayCreate</a></emu-xref>(0).</li><li>Let <var>n</var> be 0.</li><li>Repeat,<ol><li>Let <var>result</var> be ?&nbsp;<emu-xref aoid="RegExpExec" id="_ref_6201"><a href="#sec-regexpexec">RegExpExec</a></emu-xref>(<var>rx</var>, <var>S</var>).</li><li>If <var>result</var> is <emu-val>null</emu-val>, then<ol><li>If <var>n</var> = 0, return <emu-val>null</emu-val>.</li><li>Return <var>A</var>.</li></ol></li><li>Else <var>result</var> is not <emu-val>null</emu-val>,<ol><li>Let <var>matchStr</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_6202"><a href="#sec-tostring">ToString</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6203"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>result</var>, <code>"0"</code>)).</li><li>Let <var>status</var> be <emu-xref aoid="CreateDataProperty" id="_ref_6204"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>A</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_6205"><a href="#sec-tostring">ToString</a></emu-xref>(<var>n</var>), <var>matchStr</var>).</li><li><emu-xref href="#assert" id="_ref_6206"><a href="#assert">Assert</a></emu-xref>: <var>status</var> is <emu-val>true</emu-val>.</li><li>If <var>matchStr</var> is the empty String, then<ol><li>Let <var>thisIndex</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6207"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6208"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>rx</var>, <code>"lastIndex"</code>)).</li><li>Let <var>nextIndex</var> be <emu-xref aoid="AdvanceStringIndex" id="_ref_6209"><a href="#sec-advancestringindex">AdvanceStringIndex</a></emu-xref>(<var>S</var>, <var>thisIndex</var>, <var>fullUnicode</var>).</li><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6210"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>rx</var>, <code>"lastIndex"</code>, <var>nextIndex</var>, <emu-val>true</emu-val>).</li></ol></li><li>Increment <var>n</var>.
</li></ol></li></ol></li></ol></li></ol></emu-alg>
<p>The value of the <code>name</code> property of this function is <code>"[Symbol.match]"</code>.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The @@match property is used by the <emu-xref aoid="IsRegExp" id="_ref_6211"><a href="#sec-isregexp">IsRegExp</a></emu-xref>
abstract operation to identify objects that have the basic behaviour of
regular expressions. The absence of a @@match property or the existence
of such a property whose value does not Boolean coerce to <emu-val>true</emu-val> indicates that the object is not intended to be used as a regular expression object.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-get-regexp.prototype.multiline">
<h1><span class="secnum">21.2.5.8</span>get RegExp.prototype.multiline</h1>
<p><code>RegExp.prototype.multiline</code> is an <emu-xref href="#sec-object-type" id="_ref_6212"><a href="#sec-object-type">accessor property</a></emu-xref> whose set accessor function is <emu-val>undefined</emu-val>. Its get accessor function performs the following steps:</p>
<emu-alg><ol><li>Let <var>R</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_6213"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>R</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>R</var> does not have an [[OriginalFlags]] internal slot, then<ol><li>If <emu-xref aoid="SameValue" id="_ref_6214"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>R</var>, <emu-xref href="#sec-properties-of-the-regexp-prototype-object" id="_ref_6215"><a href="#sec-properties-of-the-regexp-prototype-object">%RegExpPrototype%</a></emu-xref>) is <emu-val>true</emu-val>, return <emu-val>undefined</emu-val>.</li><li>Otherwise, throw a <emu-val>TypeError</emu-val> exception.</li></ol></li><li>Let <var>flags</var> be <var>R</var>.[[OriginalFlags]].</li><li>If <var>flags</var> contains the code unit 0x006D (LATIN SMALL LETTER M), return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-regexp.prototype-@@replace">
<h1><span class="secnum">21.2.5.9</span>RegExp.prototype [ @@replace ] ( <var>string</var>, <var>replaceValue</var> )</h1>
<p>When the <code>@@replace</code> method is called with arguments <var>string</var> and <var>replaceValue</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>rx</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_6216"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>rx</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>S</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_6217"><a href="#sec-tostring">ToString</a></emu-xref>(<var>string</var>).</li><li>Let <var>lengthS</var> be the number of code unit elements in <var>S</var>.</li><li>Let <var>functionalReplace</var> be <emu-xref aoid="IsCallable" id="_ref_6218"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>replaceValue</var>).</li><li>If <var>functionalReplace</var> is <emu-val>false</emu-val>, then<ol><li>Set <var>replaceValue</var> to ?&nbsp;<emu-xref aoid="ToString" id="_ref_6219"><a href="#sec-tostring">ToString</a></emu-xref>(<var>replaceValue</var>).</li></ol></li><li>Let <var>global</var> be <emu-xref aoid="ToBoolean" id="_ref_6220"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6221"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>rx</var>, <code>"global"</code>)).</li><li>If <var>global</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>fullUnicode</var> be <emu-xref aoid="ToBoolean" id="_ref_6222"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6223"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>rx</var>, <code>"unicode"</code>)).</li><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6224"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>rx</var>, <code>"lastIndex"</code>, 0, <emu-val>true</emu-val>).</li></ol></li><li>Let <var>results</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6225"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>done</var> be <emu-val>false</emu-val>.</li><li>Repeat, while <var>done</var> is <emu-val>false</emu-val><ol><li>Let <var>result</var> be ?&nbsp;<emu-xref aoid="RegExpExec" id="_ref_6226"><a href="#sec-regexpexec">RegExpExec</a></emu-xref>(<var>rx</var>, <var>S</var>).</li><li>If <var>result</var> is <emu-val>null</emu-val>, set <var>done</var> to <emu-val>true</emu-val>.</li><li>Else <var>result</var> is not <emu-val>null</emu-val>,<ol><li>Append <var>result</var> to the end of <var>results</var>.</li><li>If <var>global</var> is <emu-val>false</emu-val>, set <var>done</var> to <emu-val>true</emu-val>.</li><li>Else,<ol><li>Let <var>matchStr</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_6227"><a href="#sec-tostring">ToString</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6228"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>result</var>, <code>"0"</code>)).</li><li>If <var>matchStr</var> is the empty String, then<ol><li>Let <var>thisIndex</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6229"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6230"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>rx</var>, <code>"lastIndex"</code>)).</li><li>Let <var>nextIndex</var> be <emu-xref aoid="AdvanceStringIndex" id="_ref_6231"><a href="#sec-advancestringindex">AdvanceStringIndex</a></emu-xref>(<var>S</var>, <var>thisIndex</var>, <var>fullUnicode</var>).</li><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6232"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>rx</var>, <code>"lastIndex"</code>, <var>nextIndex</var>, <emu-val>true</emu-val>).</li></ol></li></ol></li></ol></li></ol></li><li>Let <var>accumulatedResult</var> be the empty String value.</li><li>Let <var>nextSourcePosition</var> be 0.</li><li>For each <var>result</var> in <var>results</var>, do<ol><li>Let <var>nCaptures</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6233"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6234"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>result</var>, <code>"length"</code>)).</li><li>Set <var>nCaptures</var> to <emu-xref aoid="max" id="_ref_6235"><a href="#eqn-max">max</a></emu-xref>(<var>nCaptures</var> - 1, 0).</li><li>Let <var>matched</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_6236"><a href="#sec-tostring">ToString</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6237"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>result</var>, <code>"0"</code>)).</li><li>Let <var>matchLength</var> be the number of code units in <var>matched</var>.</li><li>Let <var>position</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_6238"><a href="#sec-tointeger">ToInteger</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6239"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>result</var>, <code>"index"</code>)).</li><li>Set <var>position</var> to <emu-xref aoid="max" id="_ref_6240"><a href="#eqn-max">max</a></emu-xref>(<emu-xref aoid="min" id="_ref_6241"><a href="#eqn-min">min</a></emu-xref>(<var>position</var>, <var>lengthS</var>), 0).</li><li>Let <var>n</var> be 1.</li><li>Let <var>captures</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6242"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Repeat, while <var>n</var> ≤ <var>nCaptures</var><ol><li>Let <var>capN</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6243"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>result</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_6244"><a href="#sec-tostring">ToString</a></emu-xref>(<var>n</var>)).</li><li>If <var>capN</var> is not <emu-val>undefined</emu-val>, then<ol><li>Set <var>capN</var> to ?&nbsp;<emu-xref aoid="ToString" id="_ref_6245"><a href="#sec-tostring">ToString</a></emu-xref>(<var>capN</var>).</li></ol></li><li>Append <var>capN</var> as the last element of <var>captures</var>.</li><li>Increase <var>n</var> by 1.</li></ol></li><li>Let <var>namedCaptures</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6246"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>result</var>, <code>"groups"</code>).</li><li>If <var>functionalReplace</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>replacerArgs</var> be « <var>matched</var> ».</li><li>Append in list order the elements of <var>captures</var> to the end of the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6247"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> <var>replacerArgs</var>.</li><li>Append <var>position</var> and <var>S</var> to <var>replacerArgs</var>.</li><li>If <var>namedCaptures</var> is not <emu-val>undefined</emu-val>, then<ol><li>Append <var>namedCaptures</var> as the last element of <var>replacerArgs</var>.</li></ol></li><li>Let <var>replValue</var> be ?&nbsp;<emu-xref aoid="Call" id="_ref_6248"><a href="#sec-call">Call</a></emu-xref>(<var>replaceValue</var>, <emu-val>undefined</emu-val>, <var>replacerArgs</var>).</li><li>Let <var>replacement</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_6249"><a href="#sec-tostring">ToString</a></emu-xref>(<var>replValue</var>).</li></ol></li><li>Else,<ol><li>Let <var>replacement</var> be <emu-xref aoid="GetSubstitution" id="_ref_6250"><a href="#sec-getsubstitution">GetSubstitution</a></emu-xref>(<var>matched</var>, <var>S</var>, <var>position</var>, <var>captures</var>, <var>namedCaptures</var>, <var>replaceValue</var>).</li></ol></li><li>If <var>position</var> ≥ <var>nextSourcePosition</var>, then<ol><li>NOTE: <var>position</var>
should not normally move backwards. If it does, it is an indication of
an ill-behaving RegExp subclass or use of an access triggered
side-effect to change the global flag or other characteristics of <var>rx</var>. In such cases, the corresponding substitution is ignored.</li><li>Set <var>accumulatedResult</var> to the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_6251"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of the current value of <var>accumulatedResult</var>, the substring of <var>S</var> consisting of the code units from <var>nextSourcePosition</var> (inclusive) up to <var>position</var> (exclusive), and <var>replacement</var>.</li><li>Set <var>nextSourcePosition</var> to <var>position</var> + <var>matchLength</var>.</li></ol></li></ol></li><li>If <var>nextSourcePosition</var> ≥ <var>lengthS</var>, return <var>accumulatedResult</var>.</li><li>Return the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_6252"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>accumulatedResult</var> and the substring of <var>S</var> consisting of the code units from <var>nextSourcePosition</var> (inclusive) up through the final code unit of <var>S</var> (inclusive).
</li></ol></emu-alg>
<p>The value of the <code>name</code> property of this function is <code>"[Symbol.replace]"</code>.</p>
</emu-clause>
<emu-clause id="sec-regexp.prototype-@@search">
<h1><span class="secnum">21.2.5.10</span>RegExp.prototype [ @@search ] ( <var>string</var> )</h1>
<p>When the <code>@@search</code> method is called with argument <var>string</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>rx</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_6253"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>rx</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>S</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_6254"><a href="#sec-tostring">ToString</a></emu-xref>(<var>string</var>).</li><li>Let <var>previousLastIndex</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6255"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>rx</var>, <code>"lastIndex"</code>).</li><li>If <emu-xref aoid="SameValue" id="_ref_6256"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>previousLastIndex</var>, 0) is <emu-val>false</emu-val>, then<ol><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6257"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>rx</var>, <code>"lastIndex"</code>, 0, <emu-val>true</emu-val>).</li></ol></li><li>Let <var>result</var> be ?&nbsp;<emu-xref aoid="RegExpExec" id="_ref_6258"><a href="#sec-regexpexec">RegExpExec</a></emu-xref>(<var>rx</var>, <var>S</var>).</li><li>Let <var>currentLastIndex</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6259"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>rx</var>, <code>"lastIndex"</code>).</li><li>If <emu-xref aoid="SameValue" id="_ref_6260"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>currentLastIndex</var>, <var>previousLastIndex</var>) is <emu-val>false</emu-val>, then<ol><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6261"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>rx</var>, <code>"lastIndex"</code>, <var>previousLastIndex</var>, <emu-val>true</emu-val>).</li></ol></li><li>If <var>result</var> is <emu-val>null</emu-val>, return -1.</li><li>Return ?&nbsp;<emu-xref aoid="Get" id="_ref_6262"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>result</var>, <code>"index"</code>).
</li></ol></emu-alg>
<p>The value of the <code>name</code> property of this function is <code>"[Symbol.search]"</code>.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <code>lastIndex</code> and <code>global</code> properties of this RegExp object are ignored when performing the search. The <code>lastIndex</code> property is left unchanged.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-get-regexp.prototype.source">
<h1><span class="secnum">21.2.5.11</span>get RegExp.prototype.source</h1>
<p><code>RegExp.prototype.source</code> is an <emu-xref href="#sec-object-type" id="_ref_6263"><a href="#sec-object-type">accessor property</a></emu-xref> whose set accessor function is <emu-val>undefined</emu-val>. Its get accessor function performs the following steps:</p>
<emu-alg><ol><li>Let <var>R</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_6264"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>R</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>R</var> does not have an [[OriginalSource]] internal slot, then<ol><li>If <emu-xref aoid="SameValue" id="_ref_6265"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>R</var>, <emu-xref href="#sec-properties-of-the-regexp-prototype-object" id="_ref_6266"><a href="#sec-properties-of-the-regexp-prototype-object">%RegExpPrototype%</a></emu-xref>) is <emu-val>true</emu-val>, return <code>"(?:)"</code>.</li><li>Otherwise, throw a <emu-val>TypeError</emu-val> exception.</li></ol></li><li><emu-xref href="#assert" id="_ref_6267"><a href="#assert">Assert</a></emu-xref>: <var>R</var> has an [[OriginalFlags]] internal slot.</li><li>Let <var>src</var> be <var>R</var>.[[OriginalSource]].</li><li>Let <var>flags</var> be <var>R</var>.[[OriginalFlags]].</li><li>Return <emu-xref aoid="EscapeRegExpPattern" id="_ref_6268"><a href="#sec-escaperegexppattern">EscapeRegExpPattern</a></emu-xref>(<var>src</var>, <var>flags</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-regexp.prototype-@@split">
<h1><span class="secnum">21.2.5.12</span>RegExp.prototype [ @@split ] ( <var>string</var>, <var>limit</var> )</h1>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>Returns an Array object into which substrings of the result of converting <var>string</var> to a String have been stored. The substrings are determined by searching from left to right for matches of the <emu-val>this</emu-val>
value regular expression; these occurrences are not part of any
substring in the returned array, but serve to divide up the String
value.</p>
<p>The <emu-val>this</emu-val> value may be an empty regular
expression or a regular expression that can match an empty String. In
this case, the regular expression does not match the empty substring at
the beginning or end of the input String, nor does it match the empty
substring at the end of the previous separator match. (For example, if
the regular expression matches the empty String, the String is split up
into individual code unit elements; the length of the result array
equals the length of the String, and each substring contains one code
unit.) Only the first match at a given index of the String is
considered, even if backtracking could yield a non-empty-substring match
at that index. (For example, <code>/a*?/[Symbol.split]("ab")</code> evaluates to the array <code>["a", "b"]</code>, while <code>/a*/[Symbol.split]("ab")</code> evaluates to the array <code>["","b"]</code>.)</p>
<p>If the <var>string</var> is (or converts to) the empty
String, the result depends on whether the regular expression can match
the empty String. If it can, the result array contains no elements.
Otherwise, the result array contains one element, which is the empty
String.</p>
<p>If the regular expression contains capturing parentheses, then each time <var>separator</var> is matched the results (including any <emu-val>undefined</emu-val> results) of the capturing parentheses are spliced into the output array. For example,</p>
<pre><code class="javascript hljs">/<span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">(\</span>/)?([^&lt;&gt;</span>]+)&gt;/[Symbol.split]("A<span class="hljs-tag">&lt;<span class="hljs-name">B</span>&gt;</span>bold<span class="hljs-tag">&lt;/<span class="hljs-name">B</span>&gt;</span>and<span class="hljs-tag">&lt;<span class="hljs-name">CODE</span>&gt;</span>coded<span class="hljs-tag">&lt;/<span class="hljs-name">CODE</span>&gt;</span>")</span></code></pre>
<p>evaluates to the array</p>
<pre><code class="javascript hljs">[<span class="hljs-string">"A"</span>, <span class="hljs-literal">undefined</span>, <span class="hljs-string">"B"</span>, <span class="hljs-string">"bold"</span>, <span class="hljs-string">"/"</span>, <span class="hljs-string">"B"</span>, <span class="hljs-string">"and"</span>, <span class="hljs-literal">undefined</span>, <span class="hljs-string">"CODE"</span>, <span class="hljs-string">"coded"</span>, <span class="hljs-string">"/"</span>, <span class="hljs-string">"CODE"</span>, <span class="hljs-string">""</span>]</code></pre>
<p>If <var>limit</var> is not <emu-val>undefined</emu-val>, then the output array is truncated so that it contains no more than <var>limit</var> elements.</p>
</div></emu-note>
<p>When the <code>@@split</code> method is called, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>rx</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_6269"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>rx</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>S</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_6270"><a href="#sec-tostring">ToString</a></emu-xref>(<var>string</var>).</li><li>Let <var>C</var> be ?&nbsp;<emu-xref aoid="SpeciesConstructor" id="_ref_6271"><a href="#sec-speciesconstructor">SpeciesConstructor</a></emu-xref>(<var>rx</var>, <emu-xref href="#sec-regexp-constructor" id="_ref_6272"><a href="#sec-regexp-constructor">%RegExp%</a></emu-xref>).</li><li>Let <var>flags</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_6273"><a href="#sec-tostring">ToString</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6274"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>rx</var>, <code>"flags"</code>)).</li><li>If <var>flags</var> contains <code>"u"</code>, let <var>unicodeMatching</var> be <emu-val>true</emu-val>.</li><li>Else, let <var>unicodeMatching</var> be <emu-val>false</emu-val>.</li><li>If <var>flags</var> contains <code>"y"</code>, let <var>newFlags</var> be <var>flags</var>.</li><li>Else, let <var>newFlags</var> be the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_6275"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>flags</var> and <code>"y"</code>.</li><li>Let <var>splitter</var> be ?&nbsp;<emu-xref aoid="Construct" id="_ref_6276"><a href="#sec-construct">Construct</a></emu-xref>(<var>C</var>, « <var>rx</var>, <var>newFlags</var> »).</li><li>Let <var>A</var> be !&nbsp;<emu-xref aoid="ArrayCreate" id="_ref_6277"><a href="#sec-arraycreate">ArrayCreate</a></emu-xref>(0).</li><li>Let <var>lengthA</var> be 0.</li><li>If <var>limit</var> is <emu-val>undefined</emu-val>, let <var>lim</var> be 2<sup>32</sup> - 1; else let <var>lim</var> be ?&nbsp;<emu-xref aoid="ToUint32" id="_ref_6278"><a href="#sec-touint32">ToUint32</a></emu-xref>(<var>limit</var>).</li><li>Let <var>size</var> be the length of <var>S</var>.</li><li>Let <var>p</var> be 0.</li><li>If <var>lim</var> = 0, return <var>A</var>.</li><li>If <var>size</var> = 0, then<ol><li>Let <var>z</var> be ?&nbsp;<emu-xref aoid="RegExpExec" id="_ref_6279"><a href="#sec-regexpexec">RegExpExec</a></emu-xref>(<var>splitter</var>, <var>S</var>).</li><li>If <var>z</var> is not <emu-val>null</emu-val>, return <var>A</var>.</li><li>Perform !&nbsp;<emu-xref aoid="CreateDataProperty" id="_ref_6280"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>A</var>, <code>"0"</code>, <var>S</var>).</li><li>Return <var>A</var>.</li></ol></li><li>Let <var>q</var> be <var>p</var>.</li><li>Repeat, while <var>q</var> &lt; <var>size</var><ol><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6281"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>splitter</var>, <code>"lastIndex"</code>, <var>q</var>, <emu-val>true</emu-val>).</li><li>Let <var>z</var> be ?&nbsp;<emu-xref aoid="RegExpExec" id="_ref_6282"><a href="#sec-regexpexec">RegExpExec</a></emu-xref>(<var>splitter</var>, <var>S</var>).</li><li>If <var>z</var> is <emu-val>null</emu-val>, set <var>q</var> to <emu-xref aoid="AdvanceStringIndex" id="_ref_6283"><a href="#sec-advancestringindex">AdvanceStringIndex</a></emu-xref>(<var>S</var>, <var>q</var>, <var>unicodeMatching</var>).</li><li>Else <var>z</var> is not <emu-val>null</emu-val>,<ol><li>Let <var>e</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6284"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6285"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>splitter</var>, <code>"lastIndex"</code>)).</li><li>Set <var>e</var> to <emu-xref aoid="min" id="_ref_6286"><a href="#eqn-min">min</a></emu-xref>(<var>e</var>, <var>size</var>).</li><li>If <var>e</var> = <var>p</var>, set <var>q</var> to <emu-xref aoid="AdvanceStringIndex" id="_ref_6287"><a href="#sec-advancestringindex">AdvanceStringIndex</a></emu-xref>(<var>S</var>, <var>q</var>, <var>unicodeMatching</var>).</li><li>Else <var>e</var> ≠ <var>p</var>,<ol><li>Let <var>T</var> be the String value equal to the substring of <var>S</var> consisting of the code units at indices <var>p</var> (inclusive) through <var>q</var> (exclusive).</li><li>Perform !&nbsp;<emu-xref aoid="CreateDataProperty" id="_ref_6288"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>A</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_6289"><a href="#sec-tostring">ToString</a></emu-xref>(<var>lengthA</var>), <var>T</var>).</li><li>Increase <var>lengthA</var> by 1.</li><li>If <var>lengthA</var> = <var>lim</var>, return <var>A</var>.</li><li>Set <var>p</var> to <var>e</var>.</li><li>Let <var>numberOfCaptures</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6290"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6291"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>z</var>, <code>"length"</code>)).</li><li>Set <var>numberOfCaptures</var> to <emu-xref aoid="max" id="_ref_6292"><a href="#eqn-max">max</a></emu-xref>(<var>numberOfCaptures</var> - 1, 0).</li><li>Let <var>i</var> be 1.</li><li>Repeat, while <var>i</var> ≤ <var>numberOfCaptures</var>,<ol><li>Let <var>nextCapture</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6293"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>z</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_6294"><a href="#sec-tostring">ToString</a></emu-xref>(<var>i</var>)).</li><li>Perform !&nbsp;<emu-xref aoid="CreateDataProperty" id="_ref_6295"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>A</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_6296"><a href="#sec-tostring">ToString</a></emu-xref>(<var>lengthA</var>), <var>nextCapture</var>).</li><li>Increase <var>i</var> by 1.</li><li>Increase <var>lengthA</var> by 1.</li><li>If <var>lengthA</var> = <var>lim</var>, return <var>A</var>.</li></ol></li><li>Set <var>q</var> to <var>p</var>.</li></ol></li></ol></li></ol></li><li>Let <var>T</var> be the String value equal to the substring of <var>S</var> consisting of the code units at indices <var>p</var> (inclusive) through <var>size</var> (exclusive).</li><li>Perform !&nbsp;<emu-xref aoid="CreateDataProperty" id="_ref_6297"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>A</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_6298"><a href="#sec-tostring">ToString</a></emu-xref>(<var>lengthA</var>), <var>T</var>).</li><li>Return <var>A</var>.
</li></ol></emu-alg>
<p>The value of the <code>name</code> property of this function is <code>"[Symbol.split]"</code>.</p>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <code>@@split</code> method ignores the value of the <code>global</code> and <code>sticky</code> properties of this RegExp object.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-get-regexp.prototype.sticky">
<h1><span class="secnum">21.2.5.13</span>get RegExp.prototype.sticky</h1>
<p><code>RegExp.prototype.sticky</code> is an <emu-xref href="#sec-object-type" id="_ref_6299"><a href="#sec-object-type">accessor property</a></emu-xref> whose set accessor function is <emu-val>undefined</emu-val>. Its get accessor function performs the following steps:</p>
<emu-alg><ol><li>Let <var>R</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_6300"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>R</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>R</var> does not have an [[OriginalFlags]] internal slot, then<ol><li>If <emu-xref aoid="SameValue" id="_ref_6301"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>R</var>, <emu-xref href="#sec-properties-of-the-regexp-prototype-object" id="_ref_6302"><a href="#sec-properties-of-the-regexp-prototype-object">%RegExpPrototype%</a></emu-xref>) is <emu-val>true</emu-val>, return <emu-val>undefined</emu-val>.</li><li>Otherwise, throw a <emu-val>TypeError</emu-val> exception.</li></ol></li><li>Let <var>flags</var> be <var>R</var>.[[OriginalFlags]].</li><li>If <var>flags</var> contains the code unit 0x0079 (LATIN SMALL LETTER Y), return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-regexp.prototype.test">
<h1><span class="secnum">21.2.5.14</span>RegExp.prototype.test ( <var>S</var> )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>R</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_6303"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>R</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>string</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_6304"><a href="#sec-tostring">ToString</a></emu-xref>(<var>S</var>).</li><li>Let <var>match</var> be ?&nbsp;<emu-xref aoid="RegExpExec" id="_ref_6305"><a href="#sec-regexpexec">RegExpExec</a></emu-xref>(<var>R</var>, <var>string</var>).</li><li>If <var>match</var> is not <emu-val>null</emu-val>, return <emu-val>true</emu-val>; else return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-regexp.prototype.tostring">
<h1><span class="secnum">21.2.5.15</span>RegExp.prototype.toString ( )</h1>
<emu-alg><ol><li>Let <var>R</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_6306"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>R</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>pattern</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_6307"><a href="#sec-tostring">ToString</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6308"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>R</var>, <code>"source"</code>)).</li><li>Let <var>flags</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_6309"><a href="#sec-tostring">ToString</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6310"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>R</var>, <code>"flags"</code>)).</li><li>Let <var>result</var> be the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_6311"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <code>"/"</code>, <var>pattern</var>, <code>"/"</code>, and <var>flags</var>.</li><li>Return <var>result</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The returned String has the form of a <emu-nt id="_ref_14800"><a href="#prod-RegularExpressionLiteral">RegularExpressionLiteral</a></emu-nt> that evaluates to another RegExp object with the same behaviour as this object.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-get-regexp.prototype.unicode">
<h1><span class="secnum">21.2.5.16</span>get RegExp.prototype.unicode</h1>
<p><code>RegExp.prototype.unicode</code> is an <emu-xref href="#sec-object-type" id="_ref_6312"><a href="#sec-object-type">accessor property</a></emu-xref> whose set accessor function is <emu-val>undefined</emu-val>. Its get accessor function performs the following steps:</p>
<emu-alg><ol><li>Let <var>R</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_6313"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>R</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>R</var> does not have an [[OriginalFlags]] internal slot, then<ol><li>If <emu-xref aoid="SameValue" id="_ref_6314"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>R</var>, <emu-xref href="#sec-properties-of-the-regexp-prototype-object" id="_ref_6315"><a href="#sec-properties-of-the-regexp-prototype-object">%RegExpPrototype%</a></emu-xref>) is <emu-val>true</emu-val>, return <emu-val>undefined</emu-val>.</li><li>Otherwise, throw a <emu-val>TypeError</emu-val> exception.</li></ol></li><li>Let <var>flags</var> be <var>R</var>.[[OriginalFlags]].</li><li>If <var>flags</var> contains the code unit 0x0075 (LATIN SMALL LETTER U), return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-regexp-instances">
<h1><span class="secnum">21.2.6</span>Properties of RegExp Instances</h1>
<p>RegExp instances are ordinary objects that inherit properties
from the RegExp prototype object. RegExp instances have internal slots
[[RegExpMatcher]], [[OriginalSource]], and [[OriginalFlags]]. The value
of the [[RegExpMatcher]] internal slot is an implementation-dependent
representation of the <emu-nt id="_ref_14801"><a href="#prod-Pattern">Pattern</a></emu-nt> of the RegExp object.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Prior to ECMAScript 2015, <code>RegExp</code> instances were specified as having the own data properties <code>source</code>, <code>global</code>, <code>ignoreCase</code>, and <code>multiline</code>. Those properties are now specified as accessor properties of RegExp.prototype.</p>
</div></emu-note>
<p>RegExp instances also have the following property:</p>
<emu-clause id="sec-lastindex">
<h1><span class="secnum">21.2.6.1</span>lastIndex</h1>
<p>The value of the <code>lastIndex</code> property specifies the String index at which to start the next match. It is coerced to an integer when used (see <emu-xref href="#sec-regexpbuiltinexec" id="_ref_574"><a href="#sec-regexpbuiltinexec">21.2.5.2.2</a></emu-xref>). This property shall have the attributes { [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-indexed-collections">
<h1><span class="secnum">22</span>Indexed Collections</h1>
<emu-clause id="sec-array-objects">
<h1><span class="secnum">22.1</span>Array Objects</h1>
<p>Array objects are exotic objects that give special treatment to a certain class of property names. See <emu-xref href="#sec-array-exotic-objects" id="_ref_575"><a href="#sec-array-exotic-objects">9.4.2</a></emu-xref> for a definition of this special treatment.</p>
<emu-clause id="sec-array-constructor">
<h1><span class="secnum">22.1.1</span>The Array Constructor</h1>
<p>The Array <emu-xref href="#constructor" id="_ref_6316"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>is the intrinsic object <dfn>%Array%</dfn>.</li>
<li>is the initial value of the <code>Array</code> property of the <emu-xref href="#sec-global-object" id="_ref_6317"><a href="#sec-global-object">global object</a></emu-xref>.</li>
<li>creates and initializes a new Array <emu-xref href="#exotic-object" id="_ref_6318"><a href="#exotic-object">exotic object</a></emu-xref> when called as a <emu-xref href="#constructor" id="_ref_6319"><a href="#constructor">constructor</a></emu-xref>.</li>
<li>also creates and initializes a new Array object when called as a function rather than as a <emu-xref href="#constructor" id="_ref_6320"><a href="#constructor">constructor</a></emu-xref>. Thus the function call <code>Array(…)</code> is equivalent to the object creation expression <code>new Array(…)</code> with the same arguments.</li>
<li>is a single function whose behaviour is overloaded based upon the number and types of its arguments.</li>
<li>is designed to be subclassable. It may be used as the value of an <code>extends</code> clause of a class definition. Subclass constructors that intend to inherit the exotic <code>Array</code> behaviour must include a <code>super</code> call to the <code>Array</code> <emu-xref href="#constructor" id="_ref_6321"><a href="#constructor">constructor</a></emu-xref> to initialize subclass instances that are Array exotic objects. However, most of the <code>Array.prototype</code> methods are generic methods that are not dependent upon their <code>this</code> value being an Array <emu-xref href="#exotic-object" id="_ref_6322"><a href="#exotic-object">exotic object</a></emu-xref>.</li>
<li>has a <code>"length"</code> property whose value is 1.</li>
</ul>
<emu-clause id="sec-array-constructor-array">
<h1><span class="secnum">22.1.1.1</span>Array ( )</h1>
<p>This description applies if and only if the Array <emu-xref href="#constructor" id="_ref_6323"><a href="#constructor">constructor</a></emu-xref> is called with no arguments.</p>
<emu-alg><ol><li>Let <var>numberOfArgs</var> be the number of arguments passed to this function call.</li><li><emu-xref href="#assert" id="_ref_6324"><a href="#assert">Assert</a></emu-xref>: <var>numberOfArgs</var> = 0.</li><li>If NewTarget is <emu-val>undefined</emu-val>, let <var>newTarget</var> be the <emu-xref href="#active-function-object" id="_ref_6325"><a href="#active-function-object">active function object</a></emu-xref>, else let <var>newTarget</var> be NewTarget.</li><li>Let <var>proto</var> be ?&nbsp;<emu-xref aoid="GetPrototypeFromConstructor" id="_ref_6326"><a href="#sec-getprototypefromconstructor">GetPrototypeFromConstructor</a></emu-xref>(<var>newTarget</var>, <code>"%ArrayPrototype%"</code>).</li><li>Return !&nbsp;<emu-xref aoid="ArrayCreate" id="_ref_6327"><a href="#sec-arraycreate">ArrayCreate</a></emu-xref>(0, <var>proto</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-array-len">
<h1><span class="secnum">22.1.1.2</span>Array ( <var>len</var> )</h1>
<p>This description applies if and only if the Array <emu-xref href="#constructor" id="_ref_6328"><a href="#constructor">constructor</a></emu-xref> is called with exactly one argument.</p>
<emu-alg><ol><li>Let <var>numberOfArgs</var> be the number of arguments passed to this function call.</li><li><emu-xref href="#assert" id="_ref_6329"><a href="#assert">Assert</a></emu-xref>: <var>numberOfArgs</var> = 1.</li><li>If NewTarget is <emu-val>undefined</emu-val>, let <var>newTarget</var> be the <emu-xref href="#active-function-object" id="_ref_6330"><a href="#active-function-object">active function object</a></emu-xref>, else let <var>newTarget</var> be NewTarget.</li><li>Let <var>proto</var> be ?&nbsp;<emu-xref aoid="GetPrototypeFromConstructor" id="_ref_6331"><a href="#sec-getprototypefromconstructor">GetPrototypeFromConstructor</a></emu-xref>(<var>newTarget</var>, <code>"%ArrayPrototype%"</code>).</li><li>Let <var>array</var> be !&nbsp;<emu-xref aoid="ArrayCreate" id="_ref_6332"><a href="#sec-arraycreate">ArrayCreate</a></emu-xref>(0, <var>proto</var>).</li><li>If <emu-xref aoid="Type" id="_ref_6333"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>len</var>) is not Number, then<ol><li>Let <var>defineStatus</var> be <emu-xref aoid="CreateDataProperty" id="_ref_6334"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>array</var>, <code>"0"</code>, <var>len</var>).</li><li><emu-xref href="#assert" id="_ref_6335"><a href="#assert">Assert</a></emu-xref>: <var>defineStatus</var> is <emu-val>true</emu-val>.</li><li>Let <var>intLen</var> be 1.</li></ol></li><li>Else,<ol><li>Let <var>intLen</var> be <emu-xref aoid="ToUint32" id="_ref_6336"><a href="#sec-touint32">ToUint32</a></emu-xref>(<var>len</var>).</li><li>If <var>intLen</var> ≠ <var>len</var>, throw a <emu-val>RangeError</emu-val> exception.</li></ol></li><li>Perform !&nbsp;<emu-xref aoid="Set" id="_ref_6337"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>array</var>, <code>"length"</code>, <var>intLen</var>, <emu-val>true</emu-val>).</li><li>Return <var>array</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-array-items">
<h1><span class="secnum">22.1.1.3</span>Array ( ...<var>items</var> )</h1>
<p>This description applies if and only if the Array <emu-xref href="#constructor" id="_ref_6338"><a href="#constructor">constructor</a></emu-xref> is called with at least two arguments.</p>
<p>When the <code>Array</code> function is called, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>numberOfArgs</var> be the number of arguments passed to this function call.</li><li><emu-xref href="#assert" id="_ref_6339"><a href="#assert">Assert</a></emu-xref>: <var>numberOfArgs</var> ≥ 2.</li><li>If NewTarget is <emu-val>undefined</emu-val>, let <var>newTarget</var> be the <emu-xref href="#active-function-object" id="_ref_6340"><a href="#active-function-object">active function object</a></emu-xref>, else let <var>newTarget</var> be NewTarget.</li><li>Let <var>proto</var> be ?&nbsp;<emu-xref aoid="GetPrototypeFromConstructor" id="_ref_6341"><a href="#sec-getprototypefromconstructor">GetPrototypeFromConstructor</a></emu-xref>(<var>newTarget</var>, <code>"%ArrayPrototype%"</code>).</li><li>Let <var>array</var> be ?&nbsp;<emu-xref aoid="ArrayCreate" id="_ref_6342"><a href="#sec-arraycreate">ArrayCreate</a></emu-xref>(<var>numberOfArgs</var>, <var>proto</var>).</li><li>Let <var>k</var> be 0.</li><li>Let <var>items</var> be a zero-origined <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6343"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing the argument items in order.</li><li>Repeat, while <var>k</var> &lt; <var>numberOfArgs</var><ol><li>Let <var>Pk</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6344"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>).</li><li>Let <var>itemK</var> be <var>items</var>[<var>k</var>].</li><li>Let <var>defineStatus</var> be <emu-xref aoid="CreateDataProperty" id="_ref_6345"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>array</var>, <var>Pk</var>, <var>itemK</var>).</li><li><emu-xref href="#assert" id="_ref_6346"><a href="#assert">Assert</a></emu-xref>: <var>defineStatus</var> is <emu-val>true</emu-val>.</li><li>Increase <var>k</var> by 1.</li></ol></li><li><emu-xref href="#assert" id="_ref_6347"><a href="#assert">Assert</a></emu-xref>: The value of <var>array</var>'s <code>"length"</code> property is <var>numberOfArgs</var>.</li><li>Return <var>array</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-array-constructor">
<h1><span class="secnum">22.1.2</span>Properties of the Array Constructor</h1>
<p>The Array <emu-xref href="#constructor" id="_ref_6348"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_6349"><a href="#sec-properties-of-the-function-prototype-object">%FunctionPrototype%</a></emu-xref>.</li>
<li>has the following properties:</li>
</ul>
<emu-clause id="sec-array.from">
<h1><span class="secnum">22.1.2.1</span>Array.from ( <var>items</var> [ , <var>mapfn</var> [ , <var>thisArg</var> ] ] )</h1>
<p>When the <code>from</code> method is called with argument <var>items</var> and optional arguments <var>mapfn</var> and <var>thisArg</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>C</var> be the <emu-val>this</emu-val> value.</li><li>If <var>mapfn</var> is <emu-val>undefined</emu-val>, let <var>mapping</var> be <emu-val>false</emu-val>.</li><li>Else,<ol><li>If <emu-xref aoid="IsCallable" id="_ref_6350"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>mapfn</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>thisArg</var> is present, let <var>T</var> be <var>thisArg</var>; else let <var>T</var> be <emu-val>undefined</emu-val>.</li><li>Let <var>mapping</var> be <emu-val>true</emu-val>.</li></ol></li><li>Let <var>usingIterator</var> be ?&nbsp;<emu-xref aoid="GetMethod" id="_ref_6351"><a href="#sec-getmethod">GetMethod</a></emu-xref>(<var>items</var>, @@iterator).</li><li>If <var>usingIterator</var> is not <emu-val>undefined</emu-val>, then<ol><li>If <emu-xref aoid="IsConstructor" id="_ref_6352"><a href="#sec-isconstructor">IsConstructor</a></emu-xref>(<var>C</var>) is <emu-val>true</emu-val>, then<ol><li>Let <var>A</var> be ?&nbsp;<emu-xref aoid="Construct" id="_ref_6353"><a href="#sec-construct">Construct</a></emu-xref>(<var>C</var>).</li></ol></li><li>Else,<ol><li>Let <var>A</var> be !&nbsp;<emu-xref aoid="ArrayCreate" id="_ref_6354"><a href="#sec-arraycreate">ArrayCreate</a></emu-xref>(0).</li></ol></li><li>Let <var>iteratorRecord</var> be ?&nbsp;<emu-xref aoid="GetIterator" id="_ref_6355"><a href="#sec-getiterator">GetIterator</a></emu-xref>(<var>items</var>, <emu-const>sync</emu-const>, <var>usingIterator</var>).</li><li>Let <var>k</var> be 0.</li><li>Repeat,<ol><li>If <var>k</var> ≥ 2<sup>53</sup> - 1, then<ol><li>Let <var>error</var> be <emu-xref aoid="ThrowCompletion" id="_ref_6356"><a href="#sec-throwcompletion">ThrowCompletion</a></emu-xref>(a newly created <emu-val>TypeError</emu-val> object).</li><li>Return ?&nbsp;<emu-xref aoid="IteratorClose" id="_ref_6357"><a href="#sec-iteratorclose">IteratorClose</a></emu-xref>(<var>iteratorRecord</var>, <var>error</var>).</li></ol></li><li>Let <var>Pk</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6358"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>).</li><li>Let <var>next</var> be ?&nbsp;<emu-xref aoid="IteratorStep" id="_ref_6359"><a href="#sec-iteratorstep">IteratorStep</a></emu-xref>(<var>iteratorRecord</var>).</li><li>If <var>next</var> is <emu-val>false</emu-val>, then<ol><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6360"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>A</var>, <code>"length"</code>, <var>k</var>, <emu-val>true</emu-val>).</li><li>Return <var>A</var>.</li></ol></li><li>Let <var>nextValue</var> be ?&nbsp;<emu-xref aoid="IteratorValue" id="_ref_6361"><a href="#sec-iteratorvalue">IteratorValue</a></emu-xref>(<var>next</var>).</li><li>If <var>mapping</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>mappedValue</var> be <emu-xref aoid="Call" id="_ref_6362"><a href="#sec-call">Call</a></emu-xref>(<var>mapfn</var>, <var>T</var>, « <var>nextValue</var>, <var>k</var> »).</li><li>If <var>mappedValue</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_6363"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, return ?&nbsp;<emu-xref aoid="IteratorClose" id="_ref_6364"><a href="#sec-iteratorclose">IteratorClose</a></emu-xref>(<var>iteratorRecord</var>, <var>mappedValue</var>).</li><li>Set <var>mappedValue</var> to <var>mappedValue</var>.[[Value]].</li></ol></li><li>Else, let <var>mappedValue</var> be <var>nextValue</var>.</li><li>Let <var>defineStatus</var> be <emu-xref aoid="CreateDataPropertyOrThrow" id="_ref_6365"><a href="#sec-createdatapropertyorthrow">CreateDataPropertyOrThrow</a></emu-xref>(<var>A</var>, <var>Pk</var>, <var>mappedValue</var>).</li><li>If <var>defineStatus</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_6366"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, return ?&nbsp;<emu-xref aoid="IteratorClose" id="_ref_6367"><a href="#sec-iteratorclose">IteratorClose</a></emu-xref>(<var>iteratorRecord</var>, <var>defineStatus</var>).</li><li>Increase <var>k</var> by 1.</li></ol></li></ol></li><li>NOTE: <var>items</var> is not an Iterable so assume it is an array-like object.</li><li>Let <var>arrayLike</var> be !&nbsp;<emu-xref aoid="ToObject" id="_ref_6368"><a href="#sec-toobject">ToObject</a></emu-xref>(<var>items</var>).</li><li>Let <var>len</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6369"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6370"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>arrayLike</var>, <code>"length"</code>)).</li><li>If <emu-xref aoid="IsConstructor" id="_ref_6371"><a href="#sec-isconstructor">IsConstructor</a></emu-xref>(<var>C</var>) is <emu-val>true</emu-val>, then<ol><li>Let <var>A</var> be ?&nbsp;<emu-xref aoid="Construct" id="_ref_6372"><a href="#sec-construct">Construct</a></emu-xref>(<var>C</var>, « <var>len</var> »).</li></ol></li><li>Else,<ol><li>Let <var>A</var> be ?&nbsp;<emu-xref aoid="ArrayCreate" id="_ref_6373"><a href="#sec-arraycreate">ArrayCreate</a></emu-xref>(<var>len</var>).</li></ol></li><li>Let <var>k</var> be 0.</li><li>Repeat, while <var>k</var> &lt; <var>len</var><ol><li>Let <var>Pk</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6374"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>).</li><li>Let <var>kValue</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6375"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>arrayLike</var>, <var>Pk</var>).</li><li>If <var>mapping</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>mappedValue</var> be ?&nbsp;<emu-xref aoid="Call" id="_ref_6376"><a href="#sec-call">Call</a></emu-xref>(<var>mapfn</var>, <var>T</var>, « <var>kValue</var>, <var>k</var> »).</li></ol></li><li>Else, let <var>mappedValue</var> be <var>kValue</var>.</li><li>Perform ?&nbsp;<emu-xref aoid="CreateDataPropertyOrThrow" id="_ref_6377"><a href="#sec-createdatapropertyorthrow">CreateDataPropertyOrThrow</a></emu-xref>(<var>A</var>, <var>Pk</var>, <var>mappedValue</var>).</li><li>Increase <var>k</var> by 1.</li></ol></li><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6378"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>A</var>, <code>"length"</code>, <var>len</var>, <emu-val>true</emu-val>).</li><li>Return <var>A</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <code>from</code> function is an intentionally generic factory method; it does not require that its <emu-val>this</emu-val> value be the Array <emu-xref href="#constructor" id="_ref_6379"><a href="#constructor">constructor</a></emu-xref>. Therefore it can be transferred to or inherited by any other constructors that may be called with a single numeric argument.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-array.isarray">
<h1><span class="secnum">22.1.2.2</span>Array.isArray ( <var>arg</var> )</h1>
<p>The <code>isArray</code> function takes one argument <var>arg</var>, and performs the following steps:</p>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="IsArray" id="_ref_6380"><a href="#sec-isarray">IsArray</a></emu-xref>(<var>arg</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-array.of">
<h1><span class="secnum">22.1.2.3</span>Array.of ( ...<var>items</var> )</h1>
<p>When the <code>of</code> method is called with any number of arguments, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>len</var> be the actual number of arguments passed to this function.</li><li>Let <var>items</var> be the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6381"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of arguments passed to this function.</li><li>Let <var>C</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="IsConstructor" id="_ref_6382"><a href="#sec-isconstructor">IsConstructor</a></emu-xref>(<var>C</var>) is <emu-val>true</emu-val>, then<ol><li>Let <var>A</var> be ?&nbsp;<emu-xref aoid="Construct" id="_ref_6383"><a href="#sec-construct">Construct</a></emu-xref>(<var>C</var>, « <var>len</var> »).</li></ol></li><li>Else,<ol><li>Let <var>A</var> be ?&nbsp;<emu-xref aoid="ArrayCreate" id="_ref_6384"><a href="#sec-arraycreate">ArrayCreate</a></emu-xref>(<var>len</var>).</li></ol></li><li>Let <var>k</var> be 0.</li><li>Repeat, while <var>k</var> &lt; <var>len</var><ol><li>Let <var>kValue</var> be <var>items</var>[<var>k</var>].</li><li>Let <var>Pk</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6385"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>).</li><li>Perform ?&nbsp;<emu-xref aoid="CreateDataPropertyOrThrow" id="_ref_6386"><a href="#sec-createdatapropertyorthrow">CreateDataPropertyOrThrow</a></emu-xref>(<var>A</var>, <var>Pk</var>, <var>kValue</var>).</li><li>Increase <var>k</var> by 1.</li></ol></li><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6387"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>A</var>, <code>"length"</code>, <var>len</var>, <emu-val>true</emu-val>).</li><li>Return <var>A</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>The <var>items</var> argument is assumed to be a well-formed rest argument value.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <code>of</code> function is an intentionally generic factory method; it does not require that its <emu-val>this</emu-val> value be the Array <emu-xref href="#constructor" id="_ref_6388"><a href="#constructor">constructor</a></emu-xref>. Therefore it can be transferred to or inherited by other constructors that may be called with a single numeric argument.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-array.prototype">
<h1><span class="secnum">22.1.2.4</span>Array.prototype</h1>
<p>The value of <code>Array.prototype</code> is <emu-xref href="#sec-properties-of-the-array-prototype-object" id="_ref_6389"><a href="#sec-properties-of-the-array-prototype-object">%ArrayPrototype%</a></emu-xref>, the intrinsic Array prototype object.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-get-array-@@species">
<h1><span class="secnum">22.1.2.5</span>get Array [ @@species ]</h1>
<p><code>Array[@@species]</code> is an <emu-xref href="#sec-object-type" id="_ref_6390"><a href="#sec-object-type">accessor property</a></emu-xref> whose set accessor function is <emu-val>undefined</emu-val>. Its get accessor function performs the following steps:</p>
<emu-alg><ol><li>Return the <emu-val>this</emu-val> value.
</li></ol></emu-alg>
<p>The value of the <code>name</code> property of this function is <code>"get [Symbol.species]"</code>.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Array prototype methods normally use their <code>this</code> object's <emu-xref href="#constructor" id="_ref_6391"><a href="#constructor">constructor</a></emu-xref> to create a derived object. However, a subclass <emu-xref href="#constructor" id="_ref_6392"><a href="#constructor">constructor</a></emu-xref> may over-ride that default behaviour by redefining its @@species property.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-array-prototype-object">
<h1><span class="secnum">22.1.3</span>Properties of the Array Prototype Object</h1>
<p>The Array prototype object:</p>
<ul>
<li>is the intrinsic object <dfn>%ArrayPrototype%</dfn>.</li>
<li>is an Array <emu-xref href="#exotic-object" id="_ref_6393"><a href="#exotic-object">exotic object</a></emu-xref> and has the internal methods specified for such objects.</li>
<li>has a <code>"length"</code> property whose initial value is 0 and whose attributes are { [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</li>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_6394"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>.</li>
</ul>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The Array prototype object is specified to be an Array <emu-xref href="#exotic-object" id="_ref_6395"><a href="#exotic-object">exotic object</a></emu-xref> to ensure compatibility with ECMAScript code that was created prior to the ECMAScript 2015 specification.</p>
</div></emu-note>
<emu-clause id="sec-array.prototype.concat">
<h1><span class="secnum">22.1.3.1</span>Array.prototype.concat ( ...<var>arguments</var> )</h1>
<p>When the <code>concat</code> method is called with zero or
more arguments, it returns an array containing the array elements of the
object followed by the array elements of each argument in order.</p>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_6396"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>A</var> be ?&nbsp;<emu-xref aoid="ArraySpeciesCreate" id="_ref_6397"><a href="#sec-arrayspeciescreate">ArraySpeciesCreate</a></emu-xref>(<var>O</var>, 0).</li><li>Let <var>n</var> be 0.</li><li>Let <var>items</var> be a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6398"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> whose first element is <var>O</var> and whose subsequent elements are, in left to right order, the arguments that were passed to this function invocation.</li><li>Repeat, while <var>items</var> is not empty<ol><li>Remove the first element from <var>items</var> and let <var>E</var> be the value of the element.</li><li>Let <var>spreadable</var> be ?&nbsp;<emu-xref aoid="IsConcatSpreadable" id="_ref_6399"><a href="#sec-isconcatspreadable">IsConcatSpreadable</a></emu-xref>(<var>E</var>).</li><li>If <var>spreadable</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>k</var> be 0.</li><li>Let <var>len</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6400"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6401"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>E</var>, <code>"length"</code>)).</li><li>If <var>n</var> + <var>len</var> &gt; 2<sup>53</sup> - 1, throw a <emu-val>TypeError</emu-val> exception.</li><li>Repeat, while <var>k</var> &lt; <var>len</var><ol><li>Let <var>P</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6402"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>).</li><li>Let <var>exists</var> be ?&nbsp;<emu-xref aoid="HasProperty" id="_ref_6403"><a href="#sec-hasproperty">HasProperty</a></emu-xref>(<var>E</var>, <var>P</var>).</li><li>If <var>exists</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>subElement</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6404"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>E</var>, <var>P</var>).</li><li>Perform ?&nbsp;<emu-xref aoid="CreateDataPropertyOrThrow" id="_ref_6405"><a href="#sec-createdatapropertyorthrow">CreateDataPropertyOrThrow</a></emu-xref>(<var>A</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_6406"><a href="#sec-tostring">ToString</a></emu-xref>(<var>n</var>), <var>subElement</var>).</li></ol></li><li>Increase <var>n</var> by 1.</li><li>Increase <var>k</var> by 1.</li></ol></li></ol></li><li>Else <var>E</var> is added as a single item rather than spread,<ol><li>If <var>n</var> ≥ 2<sup>53</sup> - 1, throw a <emu-val>TypeError</emu-val> exception.</li><li>Perform ?&nbsp;<emu-xref aoid="CreateDataPropertyOrThrow" id="_ref_6407"><a href="#sec-createdatapropertyorthrow">CreateDataPropertyOrThrow</a></emu-xref>(<var>A</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_6408"><a href="#sec-tostring">ToString</a></emu-xref>(<var>n</var>), <var>E</var>).</li><li>Increase <var>n</var> by 1.</li></ol></li></ol></li><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6409"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>A</var>, <code>"length"</code>, <var>n</var>, <emu-val>true</emu-val>).</li><li>Return <var>A</var>.
</li></ol></emu-alg>
<p>The <code>"length"</code> property of the <code>concat</code> method is 1.</p>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>The explicit setting of the <code>"length"</code> property
in step 6 is necessary to ensure that its value is correct in situations
where the trailing elements of the result Array are not present.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <code>concat</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be an Array object. Therefore it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
<emu-clause id="sec-isconcatspreadable" aoid="IsConcatSpreadable">
<h1><span class="secnum">22.1.3.1.1</span>Runtime Semantics: IsConcatSpreadable ( <var>O</var> )</h1>
<p>The abstract operation IsConcatSpreadable with argument <var>O</var> performs the following steps:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_6410"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, return <emu-val>false</emu-val>.</li><li>Let <var>spreadable</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6411"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, @@isConcatSpreadable).</li><li>If <var>spreadable</var> is not <emu-val>undefined</emu-val>, return <emu-xref aoid="ToBoolean" id="_ref_6412"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(<var>spreadable</var>).</li><li>Return ?&nbsp;<emu-xref aoid="IsArray" id="_ref_6413"><a href="#sec-isarray">IsArray</a></emu-xref>(<var>O</var>).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-array.prototype.constructor">
<h1><span class="secnum">22.1.3.2</span>Array.prototype.constructor</h1>
<p>The initial value of <code>Array.prototype.constructor</code> is the intrinsic object <emu-xref href="#sec-array-constructor" id="_ref_6414"><a href="#sec-array-constructor">%Array%</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-array.prototype.copywithin">
<h1><span class="secnum">22.1.3.3</span>Array.prototype.copyWithin ( <var>target</var>, <var>start</var> [ , <var>end</var> ] )</h1>
<p>The <code>copyWithin</code> method takes up to three arguments <var>target</var>, <var>start</var> and <var>end</var>.</p>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>The <var>end</var> argument is optional with the length of the <emu-val>this</emu-val> object as its default value. If <var>target</var> is negative, it is treated as <emu-eqn class="inline"><var>length</var> + <var>target</var></emu-eqn> where <var>length</var> is the length of the array. If <var>start</var> is negative, it is treated as <emu-eqn class="inline"><var>length</var> + <var>start</var></emu-eqn>. If <var>end</var> is negative, it is treated as <emu-eqn class="inline"><var>length</var> + <var>end</var></emu-eqn>.</p>
</div></emu-note>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_6415"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>len</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6416"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6417"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <code>"length"</code>)).</li><li>Let <var>relativeTarget</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_6418"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>target</var>).</li><li>If <var>relativeTarget</var> &lt; 0, let <var>to</var> be <emu-xref aoid="max" id="_ref_6419"><a href="#eqn-max">max</a></emu-xref>((<var>len</var> + <var>relativeTarget</var>), 0); else let <var>to</var> be <emu-xref aoid="min" id="_ref_6420"><a href="#eqn-min">min</a></emu-xref>(<var>relativeTarget</var>, <var>len</var>).</li><li>Let <var>relativeStart</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_6421"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>start</var>).</li><li>If <var>relativeStart</var> &lt; 0, let <var>from</var> be <emu-xref aoid="max" id="_ref_6422"><a href="#eqn-max">max</a></emu-xref>((<var>len</var> + <var>relativeStart</var>), 0); else let <var>from</var> be <emu-xref aoid="min" id="_ref_6423"><a href="#eqn-min">min</a></emu-xref>(<var>relativeStart</var>, <var>len</var>).</li><li>If <var>end</var> is <emu-val>undefined</emu-val>, let <var>relativeEnd</var> be <var>len</var>; else let <var>relativeEnd</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_6424"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>end</var>).</li><li>If <var>relativeEnd</var> &lt; 0, let <var>final</var> be <emu-xref aoid="max" id="_ref_6425"><a href="#eqn-max">max</a></emu-xref>((<var>len</var> + <var>relativeEnd</var>), 0); else let <var>final</var> be <emu-xref aoid="min" id="_ref_6426"><a href="#eqn-min">min</a></emu-xref>(<var>relativeEnd</var>, <var>len</var>).</li><li>Let <var>count</var> be <emu-xref aoid="min" id="_ref_6427"><a href="#eqn-min">min</a></emu-xref>(<var>final</var> - <var>from</var>, <var>len</var> - <var>to</var>).</li><li>If <var>from</var> &lt; <var>to</var> and <var>to</var> &lt; <var>from</var> + <var>count</var>, then<ol><li>Let <var>direction</var> be -1.</li><li>Set <var>from</var> to <var>from</var> + <var>count</var> - 1.</li><li>Set <var>to</var> to <var>to</var> + <var>count</var> - 1.</li></ol></li><li>Else,<ol><li>Let <var>direction</var> be 1.</li></ol></li><li>Repeat, while <var>count</var> &gt; 0<ol><li>Let <var>fromKey</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6428"><a href="#sec-tostring">ToString</a></emu-xref>(<var>from</var>).</li><li>Let <var>toKey</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6429"><a href="#sec-tostring">ToString</a></emu-xref>(<var>to</var>).</li><li>Let <var>fromPresent</var> be ?&nbsp;<emu-xref aoid="HasProperty" id="_ref_6430"><a href="#sec-hasproperty">HasProperty</a></emu-xref>(<var>O</var>, <var>fromKey</var>).</li><li>If <var>fromPresent</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>fromVal</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6431"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <var>fromKey</var>).</li><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6432"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>O</var>, <var>toKey</var>, <var>fromVal</var>, <emu-val>true</emu-val>).</li></ol></li><li>Else <var>fromPresent</var> is <emu-val>false</emu-val>,<ol><li>Perform ?&nbsp;<emu-xref aoid="DeletePropertyOrThrow" id="_ref_6433"><a href="#sec-deletepropertyorthrow">DeletePropertyOrThrow</a></emu-xref>(<var>O</var>, <var>toKey</var>).</li></ol></li><li>Set <var>from</var> to <var>from</var> + <var>direction</var>.</li><li>Set <var>to</var> to <var>to</var> + <var>direction</var>.</li><li>Decrease <var>count</var> by 1.</li></ol></li><li>Return <var>O</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <code>copyWithin</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be an Array object. Therefore it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-array.prototype.entries">
<h1><span class="secnum">22.1.3.4</span>Array.prototype.entries ( )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_6434"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Return <emu-xref aoid="CreateArrayIterator" id="_ref_6435"><a href="#sec-createarrayiterator">CreateArrayIterator</a></emu-xref>(<var>O</var>, <code>"key+value"</code>).
</li></ol></emu-alg>
<p>This function is the <dfn>%ArrayProto_entries%</dfn> intrinsic object.</p>
</emu-clause>
<emu-clause id="sec-array.prototype.every">
<h1><span class="secnum">22.1.3.5</span>Array.prototype.every ( <var>callbackfn</var> [ , <var>thisArg</var> ] )</h1>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p><var>callbackfn</var> should be a function that accepts three arguments and returns a value that is coercible to the Boolean value <emu-val>true</emu-val> or <emu-val>false</emu-val>. <code>every</code> calls <var>callbackfn</var> once for each element present in the array, in ascending order, until it finds one where <var>callbackfn</var> returns <emu-val>false</emu-val>. If such an element is found, <code>every</code> immediately returns <emu-val>false</emu-val>. Otherwise, if <var>callbackfn</var> returned <emu-val>true</emu-val> for all elements, <code>every</code> will return <emu-val>true</emu-val>. <var>callbackfn</var> is called only for elements of the array which actually exist; it is not called for missing elements of the array.</p>
<p>If a <var>thisArg</var> parameter is provided, it will be used as the <emu-val>this</emu-val> value for each invocation of <var>callbackfn</var>. If it is not provided, <emu-val>undefined</emu-val> is used instead.</p>
<p><var>callbackfn</var> is called with three arguments: the value of the element, the index of the element, and the object being traversed.</p>
<p><code>every</code> does not directly mutate the object on which it is called but the object may be mutated by the calls to <var>callbackfn</var>.</p>
<p>The range of elements processed by <code>every</code> is set before the first call to <var>callbackfn</var>. Elements which are appended to the array after the call to <code>every</code> begins will not be visited by <var>callbackfn</var>. If existing elements of the array are changed, their value as passed to <var>callbackfn</var> will be the value at the time <code>every</code> visits them; elements that are deleted after the call to <code>every</code> begins and before being visited are not visited. <code>every</code> acts like the "for all" quantifier in mathematics. In particular, for an empty array, it returns <emu-val>true</emu-val>.</p>
</div></emu-note>
<p>When the <code>every</code> method is called with one or two arguments, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_6436"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>len</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6437"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6438"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <code>"length"</code>)).</li><li>If <emu-xref aoid="IsCallable" id="_ref_6439"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>callbackfn</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>thisArg</var> is present, let <var>T</var> be <var>thisArg</var>; else let <var>T</var> be <emu-val>undefined</emu-val>.</li><li>Let <var>k</var> be 0.</li><li>Repeat, while <var>k</var> &lt; <var>len</var><ol><li>Let <var>Pk</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6440"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>).</li><li>Let <var>kPresent</var> be ?&nbsp;<emu-xref aoid="HasProperty" id="_ref_6441"><a href="#sec-hasproperty">HasProperty</a></emu-xref>(<var>O</var>, <var>Pk</var>).</li><li>If <var>kPresent</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>kValue</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6442"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <var>Pk</var>).</li><li>Let <var>testResult</var> be <emu-xref aoid="ToBoolean" id="_ref_6443"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="Call" id="_ref_6444"><a href="#sec-call">Call</a></emu-xref>(<var>callbackfn</var>, <var>T</var>, « <var>kValue</var>, <var>k</var>, <var>O</var> »)).</li><li>If <var>testResult</var> is <emu-val>false</emu-val>, return <emu-val>false</emu-val>.</li></ol></li><li>Increase <var>k</var> by 1.</li></ol></li><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <code>every</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be an Array object. Therefore it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-array.prototype.fill">
<h1><span class="secnum">22.1.3.6</span>Array.prototype.fill ( <var>value</var> [ , <var>start</var> [ , <var>end</var> ] ] )</h1>
<p>The <code>fill</code> method takes up to three arguments <var>value</var>, <var>start</var> and <var>end</var>.</p>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>The <var>start</var> and <var>end</var> arguments are optional with default values of 0 and the length of the <emu-val>this</emu-val> object. If <var>start</var> is negative, it is treated as <emu-eqn class="inline"><var>length</var> + <var>start</var></emu-eqn> where <var>length</var> is the length of the array. If <var>end</var> is negative, it is treated as <emu-eqn class="inline"><var>length</var> + <var>end</var></emu-eqn>.</p>
</div></emu-note>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_6445"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>len</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6446"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6447"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <code>"length"</code>)).</li><li>Let <var>relativeStart</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_6448"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>start</var>).</li><li>If <var>relativeStart</var> &lt; 0, let <var>k</var> be <emu-xref aoid="max" id="_ref_6449"><a href="#eqn-max">max</a></emu-xref>((<var>len</var> + <var>relativeStart</var>), 0); else let <var>k</var> be <emu-xref aoid="min" id="_ref_6450"><a href="#eqn-min">min</a></emu-xref>(<var>relativeStart</var>, <var>len</var>).</li><li>If <var>end</var> is <emu-val>undefined</emu-val>, let <var>relativeEnd</var> be <var>len</var>; else let <var>relativeEnd</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_6451"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>end</var>).</li><li>If <var>relativeEnd</var> &lt; 0, let <var>final</var> be <emu-xref aoid="max" id="_ref_6452"><a href="#eqn-max">max</a></emu-xref>((<var>len</var> + <var>relativeEnd</var>), 0); else let <var>final</var> be <emu-xref aoid="min" id="_ref_6453"><a href="#eqn-min">min</a></emu-xref>(<var>relativeEnd</var>, <var>len</var>).</li><li>Repeat, while <var>k</var> &lt; <var>final</var><ol><li>Let <var>Pk</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6454"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>).</li><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6455"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>O</var>, <var>Pk</var>, <var>value</var>, <emu-val>true</emu-val>).</li><li>Increase <var>k</var> by 1.</li></ol></li><li>Return <var>O</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <code>fill</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be an Array object. Therefore it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-array.prototype.filter">
<h1><span class="secnum">22.1.3.7</span>Array.prototype.filter ( <var>callbackfn</var> [ , <var>thisArg</var> ] )</h1>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p><var>callbackfn</var> should be a function that accepts three arguments and returns a value that is coercible to the Boolean value <emu-val>true</emu-val> or <emu-val>false</emu-val>. <code>filter</code> calls <var>callbackfn</var> once for each element in the array, in ascending order, and constructs a new array of all the values for which <var>callbackfn</var> returns <emu-val>true</emu-val>. <var>callbackfn</var> is called only for elements of the array which actually exist; it is not called for missing elements of the array.</p>
<p>If a <var>thisArg</var> parameter is provided, it will be used as the <emu-val>this</emu-val> value for each invocation of <var>callbackfn</var>. If it is not provided, <emu-val>undefined</emu-val> is used instead.</p>
<p><var>callbackfn</var> is called with three arguments: the value of the element, the index of the element, and the object being traversed.</p>
<p><code>filter</code> does not directly mutate the object on which it is called but the object may be mutated by the calls to <var>callbackfn</var>.</p>
<p>The range of elements processed by <code>filter</code> is set before the first call to <var>callbackfn</var>. Elements which are appended to the array after the call to <code>filter</code> begins will not be visited by <var>callbackfn</var>. If existing elements of the array are changed their value as passed to <var>callbackfn</var> will be the value at the time <code>filter</code> visits them; elements that are deleted after the call to <code>filter</code> begins and before being visited are not visited.</p>
</div></emu-note>
<p>When the <code>filter</code> method is called with one or two arguments, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_6456"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>len</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6457"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6458"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <code>"length"</code>)).</li><li>If <emu-xref aoid="IsCallable" id="_ref_6459"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>callbackfn</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>thisArg</var> is present, let <var>T</var> be <var>thisArg</var>; else let <var>T</var> be <emu-val>undefined</emu-val>.</li><li>Let <var>A</var> be ?&nbsp;<emu-xref aoid="ArraySpeciesCreate" id="_ref_6460"><a href="#sec-arrayspeciescreate">ArraySpeciesCreate</a></emu-xref>(<var>O</var>, 0).</li><li>Let <var>k</var> be 0.</li><li>Let <var>to</var> be 0.</li><li>Repeat, while <var>k</var> &lt; <var>len</var><ol><li>Let <var>Pk</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6461"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>).</li><li>Let <var>kPresent</var> be ?&nbsp;<emu-xref aoid="HasProperty" id="_ref_6462"><a href="#sec-hasproperty">HasProperty</a></emu-xref>(<var>O</var>, <var>Pk</var>).</li><li>If <var>kPresent</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>kValue</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6463"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <var>Pk</var>).</li><li>Let <var>selected</var> be <emu-xref aoid="ToBoolean" id="_ref_6464"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="Call" id="_ref_6465"><a href="#sec-call">Call</a></emu-xref>(<var>callbackfn</var>, <var>T</var>, « <var>kValue</var>, <var>k</var>, <var>O</var> »)).</li><li>If <var>selected</var> is <emu-val>true</emu-val>, then<ol><li>Perform ?&nbsp;<emu-xref aoid="CreateDataPropertyOrThrow" id="_ref_6466"><a href="#sec-createdatapropertyorthrow">CreateDataPropertyOrThrow</a></emu-xref>(<var>A</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_6467"><a href="#sec-tostring">ToString</a></emu-xref>(<var>to</var>), <var>kValue</var>).</li><li>Increase <var>to</var> by 1.</li></ol></li></ol></li><li>Increase <var>k</var> by 1.</li></ol></li><li>Return <var>A</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <code>filter</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be an Array object. Therefore it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-array.prototype.find">
<h1><span class="secnum">22.1.3.8</span>Array.prototype.find ( <var>predicate</var> [ , <var>thisArg</var> ] )</h1>
<p>The <code>find</code> method is called with one or two arguments, <var>predicate</var> and <var>thisArg</var>.</p>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p><var>predicate</var> should be a function that accepts three arguments and returns a value that is coercible to a Boolean value. <code>find</code> calls <var>predicate</var> once for each element of the array, in ascending order, until it finds one where <var>predicate</var> returns <emu-val>true</emu-val>. If such an element is found, <code>find</code> immediately returns that element value. Otherwise, <code>find</code> returns <emu-val>undefined</emu-val>.</p>
<p>If a <var>thisArg</var> parameter is provided, it will be used as the <emu-val>this</emu-val> value for each invocation of <var>predicate</var>. If it is not provided, <emu-val>undefined</emu-val> is used instead.</p>
<p><var>predicate</var> is called with three arguments: the value of the element, the index of the element, and the object being traversed.</p>
<p><code>find</code> does not directly mutate the object on which it is called but the object may be mutated by the calls to <var>predicate</var>.</p>
<p>The range of elements processed by <code>find</code> is set before the first call to <var>predicate</var>. Elements that are appended to the array after the call to <code>find</code> begins will not be visited by <var>predicate</var>. If existing elements of the array are changed, their value as passed to <var>predicate</var> will be the value at the time that <code>find</code> visits them.</p>
</div></emu-note>
<p>When the <code>find</code> method is called, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_6468"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>len</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6469"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6470"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <code>"length"</code>)).</li><li>If <emu-xref aoid="IsCallable" id="_ref_6471"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>predicate</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>thisArg</var> is present, let <var>T</var> be <var>thisArg</var>; else let <var>T</var> be <emu-val>undefined</emu-val>.</li><li>Let <var>k</var> be 0.</li><li>Repeat, while <var>k</var> &lt; <var>len</var><ol><li>Let <var>Pk</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6472"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>).</li><li>Let <var>kValue</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6473"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <var>Pk</var>).</li><li>Let <var>testResult</var> be <emu-xref aoid="ToBoolean" id="_ref_6474"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="Call" id="_ref_6475"><a href="#sec-call">Call</a></emu-xref>(<var>predicate</var>, <var>T</var>, « <var>kValue</var>, <var>k</var>, <var>O</var> »)).</li><li>If <var>testResult</var> is <emu-val>true</emu-val>, return <var>kValue</var>.</li><li>Increase <var>k</var> by 1.</li></ol></li><li>Return <emu-val>undefined</emu-val>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <code>find</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be an Array object. Therefore it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-array.prototype.findindex">
<h1><span class="secnum">22.1.3.9</span>Array.prototype.findIndex ( <var>predicate</var> [ , <var>thisArg</var> ] )</h1>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p><var>predicate</var> should be a function that accepts three arguments and returns a value that is coercible to the Boolean value <emu-val>true</emu-val> or <emu-val>false</emu-val>. <code>findIndex</code> calls <var>predicate</var> once for each element of the array, in ascending order, until it finds one where <var>predicate</var> returns <emu-val>true</emu-val>. If such an element is found, <code>findIndex</code> immediately returns the index of that element value. Otherwise, <code>findIndex</code> returns -1.</p>
<p>If a <var>thisArg</var> parameter is provided, it will be used as the <emu-val>this</emu-val> value for each invocation of <var>predicate</var>. If it is not provided, <emu-val>undefined</emu-val> is used instead.</p>
<p><var>predicate</var> is called with three arguments: the value of the element, the index of the element, and the object being traversed.</p>
<p><code>findIndex</code> does not directly mutate the object on which it is called but the object may be mutated by the calls to <var>predicate</var>.</p>
<p>The range of elements processed by <code>findIndex</code> is set before the first call to <var>predicate</var>. Elements that are appended to the array after the call to <code>findIndex</code> begins will not be visited by <var>predicate</var>. If existing elements of the array are changed, their value as passed to <var>predicate</var> will be the value at the time that <code>findIndex</code> visits them.</p>
</div></emu-note>
<p>When the <code>findIndex</code> method is called with one or two arguments, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_6476"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>len</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6477"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6478"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <code>"length"</code>)).</li><li>If <emu-xref aoid="IsCallable" id="_ref_6479"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>predicate</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>thisArg</var> is present, let <var>T</var> be <var>thisArg</var>; else let <var>T</var> be <emu-val>undefined</emu-val>.</li><li>Let <var>k</var> be 0.</li><li>Repeat, while <var>k</var> &lt; <var>len</var><ol><li>Let <var>Pk</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6480"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>).</li><li>Let <var>kValue</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6481"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <var>Pk</var>).</li><li>Let <var>testResult</var> be <emu-xref aoid="ToBoolean" id="_ref_6482"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="Call" id="_ref_6483"><a href="#sec-call">Call</a></emu-xref>(<var>predicate</var>, <var>T</var>, « <var>kValue</var>, <var>k</var>, <var>O</var> »)).</li><li>If <var>testResult</var> is <emu-val>true</emu-val>, return <var>k</var>.</li><li>Increase <var>k</var> by 1.</li></ol></li><li>Return -1.
</li></ol></emu-alg>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <code>findIndex</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be an Array object. Therefore it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-array.prototype.flat">
<h1><span class="secnum">22.1.3.10</span>Array.prototype.flat( [ <var>depth</var> ] )</h1>
<p>When the <code>flat</code> method is called with zero or one arguments, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_6484"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>sourceLen</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6485"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6486"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <code>"length"</code>)).</li><li>Let <var>depthNum</var> be 1.</li><li>If <var>depth</var> is not <emu-val>undefined</emu-val>, then<ol><li>Set <var>depthNum</var> to ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_6487"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>depth</var>).</li></ol></li><li>Let <var>A</var> be ?&nbsp;<emu-xref aoid="ArraySpeciesCreate" id="_ref_6488"><a href="#sec-arrayspeciescreate">ArraySpeciesCreate</a></emu-xref>(<var>O</var>, 0).</li><li>Perform ?&nbsp;<emu-xref aoid="FlattenIntoArray" id="_ref_6489"><a href="#sec-flattenintoarray">FlattenIntoArray</a></emu-xref>(<var>A</var>, <var>O</var>, <var>sourceLen</var>, 0, <var>depthNum</var>).</li><li>Return <var>A</var>.
</li></ol></emu-alg>
<emu-clause id="sec-flattenintoarray" aoid="FlattenIntoArray">
<h1><span class="secnum">22.1.3.10.1</span>FlattenIntoArray(<var>target</var>, <var>source</var>, <var>sourceLen</var>, <var>start</var>, <var>depth</var> [ , <var>mapperFunction</var>, <var>thisArg</var> ])</h1>
<emu-alg><ol><li>Let <var>targetIndex</var> be <var>start</var>.</li><li>Let <var>sourceIndex</var> be 0.</li><li>Repeat, while <var>sourceIndex</var> &lt; <var>sourceLen</var><ol><li>Let <var>P</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6490"><a href="#sec-tostring">ToString</a></emu-xref>(<var>sourceIndex</var>).</li><li>Let <var>exists</var> be ?&nbsp;<emu-xref aoid="HasProperty" id="_ref_6491"><a href="#sec-hasproperty">HasProperty</a></emu-xref>(<var>source</var>, <var>P</var>).</li><li>If <var>exists</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>element</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6492"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>source</var>, <var>P</var>).</li><li>If <var>mapperFunction</var> is present, then<ol><li><emu-xref href="#assert" id="_ref_6493"><a href="#assert">Assert</a></emu-xref>: <var>thisArg</var> is present.</li><li>Set <var>element</var> to ?&nbsp;<emu-xref aoid="Call" id="_ref_6494"><a href="#sec-call">Call</a></emu-xref>(<var>mapperFunction</var>, <var>thisArg</var> , « <var>element</var>, <var>sourceIndex</var>, <var>source</var> »).</li></ol></li><li>Let <var>shouldFlatten</var> be <emu-val>false</emu-val>.</li><li>If <var>depth</var> &gt; 0, then<ol><li>Set <var>shouldFlatten</var> to ?&nbsp;<emu-xref aoid="IsArray" id="_ref_6495"><a href="#sec-isarray">IsArray</a></emu-xref>(<var>element</var>).</li></ol></li><li>If <var>shouldFlatten</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>elementLen</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6496"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6497"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>element</var>, <code>"length"</code>)).</li><li>Set <var>targetIndex</var> to ?&nbsp;<emu-xref aoid="FlattenIntoArray" id="_ref_6498"><a href="#sec-flattenintoarray">FlattenIntoArray</a></emu-xref>(<var>target</var>, <var>element</var>, <var>elementLen</var>, <var>targetIndex</var>, <var>depth</var> - 1).</li></ol></li><li>Else,<ol><li>If <var>targetIndex</var> ≥ 2<sup>53</sup>-1, throw a <emu-val>TypeError</emu-val> exception.</li><li>Perform ?&nbsp;<emu-xref aoid="CreateDataPropertyOrThrow" id="_ref_6499"><a href="#sec-createdatapropertyorthrow">CreateDataPropertyOrThrow</a></emu-xref>(<var>target</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_6500"><a href="#sec-tostring">ToString</a></emu-xref>(<var>targetIndex</var>), <var>element</var>).</li><li>Increase <var>targetIndex</var> by 1.</li></ol></li></ol></li><li>Increase <var>sourceIndex</var> by 1.</li></ol></li><li>Return <var>targetIndex</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-array.prototype.flatmap">
<h1><span class="secnum">22.1.3.11</span>Array.prototype.flatMap ( <var>mapperFunction</var> [ , <var>thisArg</var> ] )</h1>
<p>When the <code>flatMap</code> method is called with one or two arguments, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_6501"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>sourceLen</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6502"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6503"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <code>"length"</code>)).</li><li>If <emu-xref aoid="IsCallable" id="_ref_6504"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>mapperFunction</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>thisArg</var> is present, let <var>T</var> be <var>thisArg</var>; else let <var>T</var> be <emu-val>undefined</emu-val>.</li><li>Let <var>A</var> be ?&nbsp;<emu-xref aoid="ArraySpeciesCreate" id="_ref_6505"><a href="#sec-arrayspeciescreate">ArraySpeciesCreate</a></emu-xref>(<var>O</var>, 0).</li><li>Perform ?&nbsp;<emu-xref aoid="FlattenIntoArray" id="_ref_6506"><a href="#sec-flattenintoarray">FlattenIntoArray</a></emu-xref>(<var>A</var>, <var>O</var>, <var>sourceLen</var>, 0, 1, <var>mapperFunction</var>, <var>T</var>).</li><li>Return <var>A</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-array.prototype.foreach">
<h1><span class="secnum">22.1.3.12</span>Array.prototype.forEach ( <var>callbackfn</var> [ , <var>thisArg</var> ] )</h1>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p><var>callbackfn</var> should be a function that accepts three arguments. <code>forEach</code> calls <var>callbackfn</var> once for each element present in the array, in ascending order. <var>callbackfn</var> is called only for elements of the array which actually exist; it is not called for missing elements of the array.</p>
<p>If a <var>thisArg</var> parameter is provided, it will be used as the <emu-val>this</emu-val> value for each invocation of <var>callbackfn</var>. If it is not provided, <emu-val>undefined</emu-val> is used instead.</p>
<p><var>callbackfn</var> is called with three arguments: the value of the element, the index of the element, and the object being traversed.</p>
<p><code>forEach</code> does not directly mutate the object on which it is called but the object may be mutated by the calls to <var>callbackfn</var>.</p>
</div></emu-note>
<p>When the <code>forEach</code> method is called with one or two arguments, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_6507"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>len</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6508"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6509"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <code>"length"</code>)).</li><li>If <emu-xref aoid="IsCallable" id="_ref_6510"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>callbackfn</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>thisArg</var> is present, let <var>T</var> be <var>thisArg</var>; else let <var>T</var> be <emu-val>undefined</emu-val>.</li><li>Let <var>k</var> be 0.</li><li>Repeat, while <var>k</var> &lt; <var>len</var><ol><li>Let <var>Pk</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6511"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>).</li><li>Let <var>kPresent</var> be ?&nbsp;<emu-xref aoid="HasProperty" id="_ref_6512"><a href="#sec-hasproperty">HasProperty</a></emu-xref>(<var>O</var>, <var>Pk</var>).</li><li>If <var>kPresent</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>kValue</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6513"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <var>Pk</var>).</li><li>Perform ?&nbsp;<emu-xref aoid="Call" id="_ref_6514"><a href="#sec-call">Call</a></emu-xref>(<var>callbackfn</var>, <var>T</var>, « <var>kValue</var>, <var>k</var>, <var>O</var> »).</li></ol></li><li>Increase <var>k</var> by 1.</li></ol></li><li>Return <emu-val>undefined</emu-val>.
</li></ol></emu-alg>
<p>This function is the <dfn>%ArrayProto_forEach%</dfn> intrinsic object.</p>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <code>forEach</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be an Array object. Therefore it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-array.prototype.includes">
<h1><span class="secnum">22.1.3.13</span>Array.prototype.includes ( <var>searchElement</var> [ , <var>fromIndex</var> ] )</h1>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p><code>includes</code> compares <var>searchElement</var> to the elements of the array, in ascending order, using the <emu-xref aoid="SameValueZero" id="_ref_6515"><a href="#sec-samevaluezero">SameValueZero</a></emu-xref> algorithm, and if found at any position, returns <emu-val>true</emu-val>; otherwise, <emu-val>false</emu-val> is returned.</p>
<p>The optional second argument <var>fromIndex</var> defaults to 0 (i.e. the whole array is searched). If it is greater than or equal to the length of the array, <emu-val>false</emu-val>
is returned, i.e. the array will not be searched. If it is negative, it
is used as the offset from the end of the array to compute <var>fromIndex</var>. If the computed index is less than 0, the whole array will be searched.</p>
</div></emu-note>
<p>When the <code>includes</code> method is called, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_6516"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>len</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6517"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6518"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <code>"length"</code>)).</li><li>If <var>len</var> is 0, return <emu-val>false</emu-val>.</li><li>Let <var>n</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_6519"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>fromIndex</var>).</li><li><emu-xref href="#assert" id="_ref_6520"><a href="#assert">Assert</a></emu-xref>: If <var>fromIndex</var> is <emu-val>undefined</emu-val>, then <var>n</var> is 0.</li><li>If <var>n</var> ≥ 0, then<ol><li>Let <var>k</var> be <var>n</var>.</li></ol></li><li>Else <var>n</var> &lt; 0,<ol><li>Let <var>k</var> be <var>len</var> + <var>n</var>.</li><li>If <var>k</var> &lt; 0, set <var>k</var> to 0.</li></ol></li><li>Repeat, while <var>k</var> &lt; <var>len</var><ol><li>Let <var>elementK</var> be the result of ?&nbsp;<emu-xref aoid="Get" id="_ref_6521"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_6522"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>)).</li><li>If <emu-xref aoid="SameValueZero" id="_ref_6523"><a href="#sec-samevaluezero">SameValueZero</a></emu-xref>(<var>searchElement</var>, <var>elementK</var>) is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li><li>Increase <var>k</var> by 1.</li></ol></li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <code>includes</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be an Array object. Therefore it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
<emu-note><span class="note">Note 3</span><div class="note-contents">
<p>The <code>includes</code> method intentionally differs from the similar <code>indexOf</code> method in two ways. First, it uses the <emu-xref aoid="SameValueZero" id="_ref_6524"><a href="#sec-samevaluezero">SameValueZero</a></emu-xref> algorithm, instead of <emu-xref aoid="Strict Equality Comparison" id="_ref_6525"><a href="#sec-strict-equality-comparison">Strict Equality Comparison</a></emu-xref>, allowing it to detect <emu-val>NaN</emu-val> array elements. Second, it does not skip missing array elements, instead treating them as <emu-val>undefined</emu-val>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-array.prototype.indexof">
<h1><span class="secnum">22.1.3.14</span>Array.prototype.indexOf ( <var>searchElement</var> [ , <var>fromIndex</var> ] )</h1>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p><code>indexOf</code> compares <var>searchElement</var> to the elements of the array, in ascending order, using the <emu-xref aoid="Strict Equality Comparison" id="_ref_6526"><a href="#sec-strict-equality-comparison">Strict Equality Comparison</a></emu-xref> algorithm, and if found at one or more indices, returns the smallest such index; otherwise, -1 is returned.</p>
<p>The optional second argument <var>fromIndex</var> defaults
to 0 (i.e. the whole array is searched). If it is greater than or equal
to the length of the array, -1 is returned, i.e. the array will not be
searched. If it is negative, it is used as the offset from the end of
the array to compute <var>fromIndex</var>. If the computed index is less than 0, the whole array will be searched.</p>
</div></emu-note>
<p>When the <code>indexOf</code> method is called with one or two arguments, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_6527"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>len</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6528"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6529"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <code>"length"</code>)).</li><li>If <var>len</var> is 0, return -1.</li><li>Let <var>n</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_6530"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>fromIndex</var>).</li><li><emu-xref href="#assert" id="_ref_6531"><a href="#assert">Assert</a></emu-xref>: If <var>fromIndex</var> is <emu-val>undefined</emu-val>, then <var>n</var> is 0.</li><li>If <var>n</var> ≥ <var>len</var>, return -1.</li><li>If <var>n</var> ≥ 0, then<ol><li>If <var>n</var> is <emu-val>-0</emu-val>, let <var>k</var> be <emu-val>+0</emu-val>; else let <var>k</var> be <var>n</var>.</li></ol></li><li>Else <var>n</var> &lt; 0,<ol><li>Let <var>k</var> be <var>len</var> + <var>n</var>.</li><li>If <var>k</var> &lt; 0, set <var>k</var> to 0.</li></ol></li><li>Repeat, while <var>k</var> &lt; <var>len</var><ol><li>Let <var>kPresent</var> be ?&nbsp;<emu-xref aoid="HasProperty" id="_ref_6532"><a href="#sec-hasproperty">HasProperty</a></emu-xref>(<var>O</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_6533"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>)).</li><li>If <var>kPresent</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>elementK</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6534"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_6535"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>)).</li><li>Let <var>same</var> be the result of performing <emu-xref aoid="Strict Equality Comparison" id="_ref_6536"><a href="#sec-strict-equality-comparison">Strict Equality Comparison</a></emu-xref> <var>searchElement</var> === <var>elementK</var>.</li><li>If <var>same</var> is <emu-val>true</emu-val>, return <var>k</var>.</li></ol></li><li>Increase <var>k</var> by 1.</li></ol></li><li>Return -1.
</li></ol></emu-alg>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <code>indexOf</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be an Array object. Therefore it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-array.prototype.join">
<h1><span class="secnum">22.1.3.15</span>Array.prototype.join ( <var>separator</var> )</h1>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>The elements of the array are converted to Strings, and these Strings are then concatenated, separated by occurrences of the <var>separator</var>. If no separator is provided, a single comma is used as the separator.</p>
</div></emu-note>
<p>The <code>join</code> method takes one argument, <var>separator</var>, and performs the following steps:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_6537"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>len</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6538"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6539"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <code>"length"</code>)).</li><li>If <var>separator</var> is <emu-val>undefined</emu-val>, let <var>sep</var> be the single-element String <code>","</code>.</li><li>Else, let <var>sep</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_6540"><a href="#sec-tostring">ToString</a></emu-xref>(<var>separator</var>).</li><li>Let <var>R</var> be the empty String.</li><li>Let <var>k</var> be 0.</li><li>Repeat, while <var>k</var> &lt; <var>len</var><ol><li>If <var>k</var> &gt; 0, set <var>R</var> to the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_6541"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>R</var> and <var>sep</var>.</li><li>Let <var>element</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6542"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_6543"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>)).</li><li>If <var>element</var> is <emu-val>undefined</emu-val> or <emu-val>null</emu-val>, let <var>next</var> be the empty String; otherwise, let <var>next</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_6544"><a href="#sec-tostring">ToString</a></emu-xref>(<var>element</var>).</li><li>Set <var>R</var> to the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_6545"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>R</var> and <var>next</var>.</li><li>Increase <var>k</var> by 1.</li></ol></li><li>Return <var>R</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <code>join</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be an Array object. Therefore, it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-array.prototype.keys">
<h1><span class="secnum">22.1.3.16</span>Array.prototype.keys ( )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_6546"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Return <emu-xref aoid="CreateArrayIterator" id="_ref_6547"><a href="#sec-createarrayiterator">CreateArrayIterator</a></emu-xref>(<var>O</var>, <code>"key"</code>).
</li></ol></emu-alg>
<p>This function is the <dfn>%ArrayProto_keys%</dfn> intrinsic object.</p>
</emu-clause>
<emu-clause id="sec-array.prototype.lastindexof">
<h1><span class="secnum">22.1.3.17</span>Array.prototype.lastIndexOf ( <var>searchElement</var> [ , <var>fromIndex</var> ] )</h1>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p><code>lastIndexOf</code> compares <var>searchElement</var> to the elements of the array in descending order using the <emu-xref aoid="Strict Equality Comparison" id="_ref_6548"><a href="#sec-strict-equality-comparison">Strict Equality Comparison</a></emu-xref> algorithm, and if found at one or more indices, returns the largest such index; otherwise, -1 is returned.</p>
<p>The optional second argument <var>fromIndex</var> defaults
to the array's length minus one (i.e. the whole array is searched). If
it is greater than or equal to the length of the array, the whole array
will be searched. If it is negative, it is used as the offset from the
end of the array to compute <var>fromIndex</var>. If the computed index is less than 0, -1 is returned.</p>
</div></emu-note>
<p>When the <code>lastIndexOf</code> method is called with one or two arguments, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_6549"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>len</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6550"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6551"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <code>"length"</code>)).</li><li>If <var>len</var> is 0, return -1.</li><li>If <var>fromIndex</var> is present, let <var>n</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_6552"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>fromIndex</var>); else let <var>n</var> be <var>len</var> - 1.</li><li>If <var>n</var> ≥ 0, then<ol><li>If <var>n</var> is <emu-val>-0</emu-val>, let <var>k</var> be <emu-val>+0</emu-val>; else let <var>k</var> be <emu-xref aoid="min" id="_ref_6553"><a href="#eqn-min">min</a></emu-xref>(<var>n</var>, <var>len</var> - 1).</li></ol></li><li>Else <var>n</var> &lt; 0,<ol><li>Let <var>k</var> be <var>len</var> + <var>n</var>.</li></ol></li><li>Repeat, while <var>k</var> ≥ 0<ol><li>Let <var>kPresent</var> be ?&nbsp;<emu-xref aoid="HasProperty" id="_ref_6554"><a href="#sec-hasproperty">HasProperty</a></emu-xref>(<var>O</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_6555"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>)).</li><li>If <var>kPresent</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>elementK</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6556"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_6557"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>)).</li><li>Let <var>same</var> be the result of performing <emu-xref aoid="Strict Equality Comparison" id="_ref_6558"><a href="#sec-strict-equality-comparison">Strict Equality Comparison</a></emu-xref> <var>searchElement</var> === <var>elementK</var>.</li><li>If <var>same</var> is <emu-val>true</emu-val>, return <var>k</var>.</li></ol></li><li>Decrease <var>k</var> by 1.</li></ol></li><li>Return -1.
</li></ol></emu-alg>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <code>lastIndexOf</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be an Array object. Therefore it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-array.prototype.map">
<h1><span class="secnum">22.1.3.18</span>Array.prototype.map ( <var>callbackfn</var> [ , <var>thisArg</var> ] )</h1>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p><var>callbackfn</var> should be a function that accepts three arguments. <code>map</code> calls <var>callbackfn</var> once for each element in the array, in ascending order, and constructs a new Array from the results. <var>callbackfn</var> is called only for elements of the array which actually exist; it is not called for missing elements of the array.</p>
<p>If a <var>thisArg</var> parameter is provided, it will be used as the <emu-val>this</emu-val> value for each invocation of <var>callbackfn</var>. If it is not provided, <emu-val>undefined</emu-val> is used instead.</p>
<p><var>callbackfn</var> is called with three arguments: the value of the element, the index of the element, and the object being traversed.</p>
<p><code>map</code> does not directly mutate the object on which it is called but the object may be mutated by the calls to <var>callbackfn</var>.</p>
<p>The range of elements processed by <code>map</code> is set before the first call to <var>callbackfn</var>. Elements which are appended to the array after the call to <code>map</code> begins will not be visited by <var>callbackfn</var>. If existing elements of the array are changed, their value as passed to <var>callbackfn</var> will be the value at the time <code>map</code> visits them; elements that are deleted after the call to <code>map</code> begins and before being visited are not visited.</p>
</div></emu-note>
<p>When the <code>map</code> method is called with one or two arguments, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_6559"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>len</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6560"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6561"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <code>"length"</code>)).</li><li>If <emu-xref aoid="IsCallable" id="_ref_6562"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>callbackfn</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>thisArg</var> is present, let <var>T</var> be <var>thisArg</var>; else let <var>T</var> be <emu-val>undefined</emu-val>.</li><li>Let <var>A</var> be ?&nbsp;<emu-xref aoid="ArraySpeciesCreate" id="_ref_6563"><a href="#sec-arrayspeciescreate">ArraySpeciesCreate</a></emu-xref>(<var>O</var>, <var>len</var>).</li><li>Let <var>k</var> be 0.</li><li>Repeat, while <var>k</var> &lt; <var>len</var><ol><li>Let <var>Pk</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6564"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>).</li><li>Let <var>kPresent</var> be ?&nbsp;<emu-xref aoid="HasProperty" id="_ref_6565"><a href="#sec-hasproperty">HasProperty</a></emu-xref>(<var>O</var>, <var>Pk</var>).</li><li>If <var>kPresent</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>kValue</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6566"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <var>Pk</var>).</li><li>Let <var>mappedValue</var> be ?&nbsp;<emu-xref aoid="Call" id="_ref_6567"><a href="#sec-call">Call</a></emu-xref>(<var>callbackfn</var>, <var>T</var>, « <var>kValue</var>, <var>k</var>, <var>O</var> »).</li><li>Perform ?&nbsp;<emu-xref aoid="CreateDataPropertyOrThrow" id="_ref_6568"><a href="#sec-createdatapropertyorthrow">CreateDataPropertyOrThrow</a></emu-xref>(<var>A</var>, <var>Pk</var>, <var>mappedValue</var>).</li></ol></li><li>Increase <var>k</var> by 1.</li></ol></li><li>Return <var>A</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <code>map</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be an Array object. Therefore it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-array.prototype.pop">
<h1><span class="secnum">22.1.3.19</span>Array.prototype.pop ( )</h1>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>The last element of the array is removed from the array and returned.</p>
</div></emu-note>
<p>When the <code>pop</code> method is called, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_6569"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>len</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6570"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6571"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <code>"length"</code>)).</li><li>If <var>len</var> is zero, then<ol><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6572"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>O</var>, <code>"length"</code>, 0, <emu-val>true</emu-val>).</li><li>Return <emu-val>undefined</emu-val>.</li></ol></li><li>Else <var>len</var> &gt; 0,<ol><li>Let <var>newLen</var> be <var>len</var> - 1.</li><li>Let <var>index</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6573"><a href="#sec-tostring">ToString</a></emu-xref>(<var>newLen</var>).</li><li>Let <var>element</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6574"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <var>index</var>).</li><li>Perform ?&nbsp;<emu-xref aoid="DeletePropertyOrThrow" id="_ref_6575"><a href="#sec-deletepropertyorthrow">DeletePropertyOrThrow</a></emu-xref>(<var>O</var>, <var>index</var>).</li><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6576"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>O</var>, <code>"length"</code>, <var>newLen</var>, <emu-val>true</emu-val>).</li><li>Return <var>element</var>.
</li></ol></li></ol></emu-alg>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <code>pop</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be an Array object. Therefore it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-array.prototype.push">
<h1><span class="secnum">22.1.3.20</span>Array.prototype.push ( ...<var>items</var> )</h1>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>The arguments are appended to the end of the array, in the
order in which they appear. The new length of the array is returned as
the result of the call.</p>
</div></emu-note>
<p>When the <code>push</code> method is called with zero or more arguments, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_6577"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>len</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6578"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6579"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <code>"length"</code>)).</li><li>Let <var>items</var> be a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6580"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> whose elements are, in left to right order, the arguments that were passed to this function invocation.</li><li>Let <var>argCount</var> be the number of elements in <var>items</var>.</li><li>If <var>len</var> + <var>argCount</var> &gt; 2<sup>53</sup> - 1, throw a <emu-val>TypeError</emu-val> exception.</li><li>Repeat, while <var>items</var> is not empty<ol><li>Remove the first element from <var>items</var> and let <var>E</var> be the value of the element.</li><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6581"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>O</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_6582"><a href="#sec-tostring">ToString</a></emu-xref>(<var>len</var>), <var>E</var>, <emu-val>true</emu-val>).</li><li>Increase <var>len</var> by 1.</li></ol></li><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6583"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>O</var>, <code>"length"</code>, <var>len</var>, <emu-val>true</emu-val>).</li><li>Return <var>len</var>.
</li></ol></emu-alg>
<p>The <code>"length"</code> property of the <code>push</code> method is 1.</p>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <code>push</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be an Array object. Therefore it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-array.prototype.reduce">
<h1><span class="secnum">22.1.3.21</span>Array.prototype.reduce ( <var>callbackfn</var> [ , <var>initialValue</var> ] )</h1>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p><var>callbackfn</var> should be a function that takes four arguments. <code>reduce</code> calls the callback, as a function, once for each element after the first element present in the array, in ascending order.</p>
<p><var>callbackfn</var> is called with four arguments: the <var>previousValue</var> (value from the previous call to <var>callbackfn</var>), the <var>currentValue</var> (value of the current element), the <var>currentIndex</var>, and the object being traversed. The first time that callback is called, the <var>previousValue</var> and <var>currentValue</var> can be one of two values. If an <var>initialValue</var> was supplied in the call to <code>reduce</code>, then <var>previousValue</var> will be equal to <var>initialValue</var> and <var>currentValue</var> will be equal to the first value in the array. If no <var>initialValue</var> was supplied, then <var>previousValue</var> will be equal to the first value in the array and <var>currentValue</var> will be equal to the second. It is a <emu-val>TypeError</emu-val> if the array contains no elements and <var>initialValue</var> is not provided.</p>
<p><code>reduce</code> does not directly mutate the object on which it is called but the object may be mutated by the calls to <var>callbackfn</var>.</p>
<p>The range of elements processed by <code>reduce</code> is set before the first call to <var>callbackfn</var>. Elements that are appended to the array after the call to <code>reduce</code> begins will not be visited by <var>callbackfn</var>. If existing elements of the array are changed, their value as passed to <var>callbackfn</var> will be the value at the time <code>reduce</code> visits them; elements that are deleted after the call to <code>reduce</code> begins and before being visited are not visited.</p>
</div></emu-note>
<p>When the <code>reduce</code> method is called with one or two arguments, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_6584"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>len</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6585"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6586"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <code>"length"</code>)).</li><li>If <emu-xref aoid="IsCallable" id="_ref_6587"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>callbackfn</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>len</var> is 0 and <var>initialValue</var> is not present, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>k</var> be 0.</li><li>Let <var>accumulator</var> be <emu-val>undefined</emu-val>.</li><li>If <var>initialValue</var> is present, then<ol><li>Set <var>accumulator</var> to <var>initialValue</var>.</li></ol></li><li>Else <var>initialValue</var> is not present,<ol><li>Let <var>kPresent</var> be <emu-val>false</emu-val>.</li><li>Repeat, while <var>kPresent</var> is <emu-val>false</emu-val> and <var>k</var> &lt; <var>len</var><ol><li>Let <var>Pk</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6588"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>).</li><li>Set <var>kPresent</var> to ?&nbsp;<emu-xref aoid="HasProperty" id="_ref_6589"><a href="#sec-hasproperty">HasProperty</a></emu-xref>(<var>O</var>, <var>Pk</var>).</li><li>If <var>kPresent</var> is <emu-val>true</emu-val>, then<ol><li>Set <var>accumulator</var> to ?&nbsp;<emu-xref aoid="Get" id="_ref_6590"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <var>Pk</var>).</li></ol></li><li>Increase <var>k</var> by 1.</li></ol></li><li>If <var>kPresent</var> is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li></ol></li><li>Repeat, while <var>k</var> &lt; <var>len</var><ol><li>Let <var>Pk</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6591"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>).</li><li>Let <var>kPresent</var> be ?&nbsp;<emu-xref aoid="HasProperty" id="_ref_6592"><a href="#sec-hasproperty">HasProperty</a></emu-xref>(<var>O</var>, <var>Pk</var>).</li><li>If <var>kPresent</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>kValue</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6593"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <var>Pk</var>).</li><li>Set <var>accumulator</var> to ?&nbsp;<emu-xref aoid="Call" id="_ref_6594"><a href="#sec-call">Call</a></emu-xref>(<var>callbackfn</var>, <emu-val>undefined</emu-val>, « <var>accumulator</var>, <var>kValue</var>, <var>k</var>, <var>O</var> »).</li></ol></li><li>Increase <var>k</var> by 1.</li></ol></li><li>Return <var>accumulator</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <code>reduce</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be an Array object. Therefore it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-array.prototype.reduceright">
<h1><span class="secnum">22.1.3.22</span>Array.prototype.reduceRight ( <var>callbackfn</var> [ , <var>initialValue</var> ] )</h1>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p><var>callbackfn</var> should be a function that takes four arguments. <code>reduceRight</code> calls the callback, as a function, once for each element after the first element present in the array, in descending order.</p>
<p><var>callbackfn</var> is called with four arguments: the <var>previousValue</var> (value from the previous call to <var>callbackfn</var>), the <var>currentValue</var> (value of the current element), the <var>currentIndex</var>, and the object being traversed. The first time the function is called, the <var>previousValue</var> and <var>currentValue</var> can be one of two values. If an <var>initialValue</var> was supplied in the call to <code>reduceRight</code>, then <var>previousValue</var> will be equal to <var>initialValue</var> and <var>currentValue</var> will be equal to the last value in the array. If no <var>initialValue</var> was supplied, then <var>previousValue</var> will be equal to the last value in the array and <var>currentValue</var> will be equal to the second-to-last value. It is a <emu-val>TypeError</emu-val> if the array contains no elements and <var>initialValue</var> is not provided.</p>
<p><code>reduceRight</code> does not directly mutate the object on which it is called but the object may be mutated by the calls to <var>callbackfn</var>.</p>
<p>The range of elements processed by <code>reduceRight</code> is set before the first call to <var>callbackfn</var>. Elements that are appended to the array after the call to <code>reduceRight</code> begins will not be visited by <var>callbackfn</var>. If existing elements of the array are changed by <var>callbackfn</var>, their value as passed to <var>callbackfn</var> will be the value at the time <code>reduceRight</code> visits them; elements that are deleted after the call to <code>reduceRight</code> begins and before being visited are not visited.</p>
</div></emu-note>
<p>When the <code>reduceRight</code> method is called with one or two arguments, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_6595"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>len</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6596"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6597"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <code>"length"</code>)).</li><li>If <emu-xref aoid="IsCallable" id="_ref_6598"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>callbackfn</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>len</var> is 0 and <var>initialValue</var> is not present, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>k</var> be <var>len</var> - 1.</li><li>Let <var>accumulator</var> be <emu-val>undefined</emu-val>.</li><li>If <var>initialValue</var> is present, then<ol><li>Set <var>accumulator</var> to <var>initialValue</var>.</li></ol></li><li>Else <var>initialValue</var> is not present,<ol><li>Let <var>kPresent</var> be <emu-val>false</emu-val>.</li><li>Repeat, while <var>kPresent</var> is <emu-val>false</emu-val> and <var>k</var> ≥ 0<ol><li>Let <var>Pk</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6599"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>).</li><li>Set <var>kPresent</var> to ?&nbsp;<emu-xref aoid="HasProperty" id="_ref_6600"><a href="#sec-hasproperty">HasProperty</a></emu-xref>(<var>O</var>, <var>Pk</var>).</li><li>If <var>kPresent</var> is <emu-val>true</emu-val>, then<ol><li>Set <var>accumulator</var> to ?&nbsp;<emu-xref aoid="Get" id="_ref_6601"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <var>Pk</var>).</li></ol></li><li>Decrease <var>k</var> by 1.</li></ol></li><li>If <var>kPresent</var> is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li></ol></li><li>Repeat, while <var>k</var> ≥ 0<ol><li>Let <var>Pk</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6602"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>).</li><li>Let <var>kPresent</var> be ?&nbsp;<emu-xref aoid="HasProperty" id="_ref_6603"><a href="#sec-hasproperty">HasProperty</a></emu-xref>(<var>O</var>, <var>Pk</var>).</li><li>If <var>kPresent</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>kValue</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6604"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <var>Pk</var>).</li><li>Set <var>accumulator</var> to ?&nbsp;<emu-xref aoid="Call" id="_ref_6605"><a href="#sec-call">Call</a></emu-xref>(<var>callbackfn</var>, <emu-val>undefined</emu-val>, « <var>accumulator</var>, <var>kValue</var>, <var>k</var>, <var>O</var> »).</li></ol></li><li>Decrease <var>k</var> by 1.</li></ol></li><li>Return <var>accumulator</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <code>reduceRight</code> function is intentionally
generic; it does not require that its this value be an Array object.
Therefore it can be transferred to other kinds of objects for use as a
method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-array.prototype.reverse">
<h1><span class="secnum">22.1.3.23</span>Array.prototype.reverse ( )</h1>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>The elements of the array are rearranged so as to reverse their order. The object is returned as the result of the call.</p>
</div></emu-note>
<p>When the <code>reverse</code> method is called, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_6606"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>len</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6607"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6608"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <code>"length"</code>)).</li><li>Let <var>middle</var> be <emu-xref aoid="floor" id="_ref_6609"><a href="#eqn-floor">floor</a></emu-xref>(<var>len</var> / 2).</li><li>Let <var>lower</var> be 0.</li><li>Repeat, while <var>lower</var> ≠ <var>middle</var><ol><li>Let <var>upper</var> be <var>len</var> - <var>lower</var> - 1.</li><li>Let <var>upperP</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6610"><a href="#sec-tostring">ToString</a></emu-xref>(<var>upper</var>).</li><li>Let <var>lowerP</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6611"><a href="#sec-tostring">ToString</a></emu-xref>(<var>lower</var>).</li><li>Let <var>lowerExists</var> be ?&nbsp;<emu-xref aoid="HasProperty" id="_ref_6612"><a href="#sec-hasproperty">HasProperty</a></emu-xref>(<var>O</var>, <var>lowerP</var>).</li><li>If <var>lowerExists</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>lowerValue</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6613"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <var>lowerP</var>).</li></ol></li><li>Let <var>upperExists</var> be ?&nbsp;<emu-xref aoid="HasProperty" id="_ref_6614"><a href="#sec-hasproperty">HasProperty</a></emu-xref>(<var>O</var>, <var>upperP</var>).</li><li>If <var>upperExists</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>upperValue</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6615"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <var>upperP</var>).</li></ol></li><li>If <var>lowerExists</var> is <emu-val>true</emu-val> and <var>upperExists</var> is <emu-val>true</emu-val>, then<ol><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6616"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>O</var>, <var>lowerP</var>, <var>upperValue</var>, <emu-val>true</emu-val>).</li><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6617"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>O</var>, <var>upperP</var>, <var>lowerValue</var>, <emu-val>true</emu-val>).</li></ol></li><li>Else if <var>lowerExists</var> is <emu-val>false</emu-val> and <var>upperExists</var> is <emu-val>true</emu-val>, then<ol><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6618"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>O</var>, <var>lowerP</var>, <var>upperValue</var>, <emu-val>true</emu-val>).</li><li>Perform ?&nbsp;<emu-xref aoid="DeletePropertyOrThrow" id="_ref_6619"><a href="#sec-deletepropertyorthrow">DeletePropertyOrThrow</a></emu-xref>(<var>O</var>, <var>upperP</var>).</li></ol></li><li>Else if <var>lowerExists</var> is <emu-val>true</emu-val> and <var>upperExists</var> is <emu-val>false</emu-val>, then<ol><li>Perform ?&nbsp;<emu-xref aoid="DeletePropertyOrThrow" id="_ref_6620"><a href="#sec-deletepropertyorthrow">DeletePropertyOrThrow</a></emu-xref>(<var>O</var>, <var>lowerP</var>).</li><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6621"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>O</var>, <var>upperP</var>, <var>lowerValue</var>, <emu-val>true</emu-val>).</li></ol></li><li>Else both <var>lowerExists</var> and <var>upperExists</var> are <emu-val>false</emu-val>,<ol><li>No action is required.</li></ol></li><li>Increase <var>lower</var> by 1.</li></ol></li><li>Return <var>O</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <code>reverse</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be an Array object. Therefore, it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-array.prototype.shift">
<h1><span class="secnum">22.1.3.24</span>Array.prototype.shift ( )</h1>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>The first element of the array is removed from the array and returned.</p>
</div></emu-note>
<p>When the <code>shift</code> method is called, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_6622"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>len</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6623"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6624"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <code>"length"</code>)).</li><li>If <var>len</var> is zero, then<ol><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6625"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>O</var>, <code>"length"</code>, 0, <emu-val>true</emu-val>).</li><li>Return <emu-val>undefined</emu-val>.</li></ol></li><li>Let <var>first</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6626"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <code>"0"</code>).</li><li>Let <var>k</var> be 1.</li><li>Repeat, while <var>k</var> &lt; <var>len</var><ol><li>Let <var>from</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6627"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>).</li><li>Let <var>to</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6628"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var> - 1).</li><li>Let <var>fromPresent</var> be ?&nbsp;<emu-xref aoid="HasProperty" id="_ref_6629"><a href="#sec-hasproperty">HasProperty</a></emu-xref>(<var>O</var>, <var>from</var>).</li><li>If <var>fromPresent</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>fromVal</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6630"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <var>from</var>).</li><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6631"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>O</var>, <var>to</var>, <var>fromVal</var>, <emu-val>true</emu-val>).</li></ol></li><li>Else <var>fromPresent</var> is <emu-val>false</emu-val>,<ol><li>Perform ?&nbsp;<emu-xref aoid="DeletePropertyOrThrow" id="_ref_6632"><a href="#sec-deletepropertyorthrow">DeletePropertyOrThrow</a></emu-xref>(<var>O</var>, <var>to</var>).</li></ol></li><li>Increase <var>k</var> by 1.</li></ol></li><li>Perform ?&nbsp;<emu-xref aoid="DeletePropertyOrThrow" id="_ref_6633"><a href="#sec-deletepropertyorthrow">DeletePropertyOrThrow</a></emu-xref>(<var>O</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_6634"><a href="#sec-tostring">ToString</a></emu-xref>(<var>len</var> - 1)).</li><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6635"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>O</var>, <code>"length"</code>, <var>len</var> - 1, <emu-val>true</emu-val>).</li><li>Return <var>first</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <code>shift</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be an Array object. Therefore it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-array.prototype.slice">
<h1><span class="secnum">22.1.3.25</span>Array.prototype.slice ( <var>start</var>, <var>end</var> )</h1>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>The <code>slice</code> method takes two arguments, <var>start</var> and <var>end</var>, and returns an array containing the elements of the array from element <var>start</var> up to, but not including, element <var>end</var> (or through the end of the array if <var>end</var> is <emu-val>undefined</emu-val>). If <var>start</var> is negative, it is treated as <emu-eqn class="inline"><var>length</var> + <var>start</var></emu-eqn> where <var>length</var> is the length of the array. If <var>end</var> is negative, it is treated as <emu-eqn class="inline"><var>length</var> + <var>end</var></emu-eqn> where <var>length</var> is the length of the array.</p>
</div></emu-note>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_6636"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>len</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6637"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6638"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <code>"length"</code>)).</li><li>Let <var>relativeStart</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_6639"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>start</var>).</li><li>If <var>relativeStart</var> &lt; 0, let <var>k</var> be <emu-xref aoid="max" id="_ref_6640"><a href="#eqn-max">max</a></emu-xref>((<var>len</var> + <var>relativeStart</var>), 0); else let <var>k</var> be <emu-xref aoid="min" id="_ref_6641"><a href="#eqn-min">min</a></emu-xref>(<var>relativeStart</var>, <var>len</var>).</li><li>If <var>end</var> is <emu-val>undefined</emu-val>, let <var>relativeEnd</var> be <var>len</var>; else let <var>relativeEnd</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_6642"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>end</var>).</li><li>If <var>relativeEnd</var> &lt; 0, let <var>final</var> be <emu-xref aoid="max" id="_ref_6643"><a href="#eqn-max">max</a></emu-xref>((<var>len</var> + <var>relativeEnd</var>), 0); else let <var>final</var> be <emu-xref aoid="min" id="_ref_6644"><a href="#eqn-min">min</a></emu-xref>(<var>relativeEnd</var>, <var>len</var>).</li><li>Let <var>count</var> be <emu-xref aoid="max" id="_ref_6645"><a href="#eqn-max">max</a></emu-xref>(<var>final</var> - <var>k</var>, 0).</li><li>Let <var>A</var> be ?&nbsp;<emu-xref aoid="ArraySpeciesCreate" id="_ref_6646"><a href="#sec-arrayspeciescreate">ArraySpeciesCreate</a></emu-xref>(<var>O</var>, <var>count</var>).</li><li>Let <var>n</var> be 0.</li><li>Repeat, while <var>k</var> &lt; <var>final</var><ol><li>Let <var>Pk</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6647"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>).</li><li>Let <var>kPresent</var> be ?&nbsp;<emu-xref aoid="HasProperty" id="_ref_6648"><a href="#sec-hasproperty">HasProperty</a></emu-xref>(<var>O</var>, <var>Pk</var>).</li><li>If <var>kPresent</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>kValue</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6649"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <var>Pk</var>).</li><li>Perform ?&nbsp;<emu-xref aoid="CreateDataPropertyOrThrow" id="_ref_6650"><a href="#sec-createdatapropertyorthrow">CreateDataPropertyOrThrow</a></emu-xref>(<var>A</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_6651"><a href="#sec-tostring">ToString</a></emu-xref>(<var>n</var>), <var>kValue</var>).</li></ol></li><li>Increase <var>k</var> by 1.</li><li>Increase <var>n</var> by 1.</li></ol></li><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6652"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>A</var>, <code>"length"</code>, <var>n</var>, <emu-val>true</emu-val>).</li><li>Return <var>A</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The explicit setting of the <code>"length"</code> property
of the result Array in step 11 was necessary in previous editions of
ECMAScript to ensure that its length was correct in situations where the
trailing elements of the result Array were not present. Setting <code>"length"</code>
became unnecessary starting in ES2015 when the result Array was
initialized to its proper length rather than an empty Array but is
carried forward to preserve backward compatibility.</p>
</div></emu-note>
<emu-note><span class="note">Note 3</span><div class="note-contents">
<p>The <code>slice</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be an Array object. Therefore it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-array.prototype.some">
<h1><span class="secnum">22.1.3.26</span>Array.prototype.some ( <var>callbackfn</var> [ , <var>thisArg</var> ] )</h1>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p><var>callbackfn</var> should be a function that accepts three arguments and returns a value that is coercible to the Boolean value <emu-val>true</emu-val> or <emu-val>false</emu-val>. <code>some</code> calls <var>callbackfn</var> once for each element present in the array, in ascending order, until it finds one where <var>callbackfn</var> returns <emu-val>true</emu-val>. If such an element is found, <code>some</code> immediately returns <emu-val>true</emu-val>. Otherwise, <code>some</code> returns <emu-val>false</emu-val>. <var>callbackfn</var> is called only for elements of the array which actually exist; it is not called for missing elements of the array.</p>
<p>If a <var>thisArg</var> parameter is provided, it will be used as the <emu-val>this</emu-val> value for each invocation of <var>callbackfn</var>. If it is not provided, <emu-val>undefined</emu-val> is used instead.</p>
<p><var>callbackfn</var> is called with three arguments: the value of the element, the index of the element, and the object being traversed.</p>
<p><code>some</code> does not directly mutate the object on which it is called but the object may be mutated by the calls to <var>callbackfn</var>.</p>
<p>The range of elements processed by <code>some</code> is set before the first call to <var>callbackfn</var>. Elements that are appended to the array after the call to <code>some</code> begins will not be visited by <var>callbackfn</var>. If existing elements of the array are changed, their value as passed to <var>callbackfn</var> will be the value at the time that <code>some</code> visits them; elements that are deleted after the call to <code>some</code> begins and before being visited are not visited. <code>some</code> acts like the "exists" quantifier in mathematics. In particular, for an empty array, it returns <emu-val>false</emu-val>.</p>
</div></emu-note>
<p>When the <code>some</code> method is called with one or two arguments, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_6653"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>len</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6654"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6655"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <code>"length"</code>)).</li><li>If <emu-xref aoid="IsCallable" id="_ref_6656"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>callbackfn</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>thisArg</var> is present, let <var>T</var> be <var>thisArg</var>; else let <var>T</var> be <emu-val>undefined</emu-val>.</li><li>Let <var>k</var> be 0.</li><li>Repeat, while <var>k</var> &lt; <var>len</var><ol><li>Let <var>Pk</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6657"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>).</li><li>Let <var>kPresent</var> be ?&nbsp;<emu-xref aoid="HasProperty" id="_ref_6658"><a href="#sec-hasproperty">HasProperty</a></emu-xref>(<var>O</var>, <var>Pk</var>).</li><li>If <var>kPresent</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>kValue</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6659"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <var>Pk</var>).</li><li>Let <var>testResult</var> be <emu-xref aoid="ToBoolean" id="_ref_6660"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="Call" id="_ref_6661"><a href="#sec-call">Call</a></emu-xref>(<var>callbackfn</var>, <var>T</var>, « <var>kValue</var>, <var>k</var>, <var>O</var> »)).</li><li>If <var>testResult</var> is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li></ol></li><li>Increase <var>k</var> by 1.</li></ol></li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <code>some</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be an Array object. Therefore it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-array.prototype.sort">
<h1><span class="secnum">22.1.3.27</span>Array.prototype.sort ( <var>comparefn</var> )</h1>
<p>The elements of this array are sorted. The sort must be
stable (that is, elements that compare equal must remain in their
original order). If <var>comparefn</var> is not <emu-val>undefined</emu-val>, it should be a function that accepts two arguments <var>x</var> and <var>y</var> and returns a negative value if <var>x</var> &lt; <var>y</var>, zero if <var>x</var> = <var>y</var>, or a positive value if <var>x</var> &gt; <var>y</var>.</p>
<p>Upon entry, the following steps are performed to initialize evaluation of the <code>sort</code> function:</p>
<emu-alg><ol><li>If <var>comparefn</var> is not <emu-val>undefined</emu-val> and <emu-xref aoid="IsCallable" id="_ref_6662"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>comparefn</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>obj</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_6663"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>len</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6664"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6665"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>obj</var>, <code>"length"</code>)).
</li></ol></emu-alg>
<p>Within this specification of the <code>sort</code> method, an object, <var>obj</var>, is said to be <em>sparse</em> if the following algorithm returns <emu-val>true</emu-val>:</p>
<emu-alg><ol><li>For each integer <var>i</var> in the range 0 ≤ <var>i</var> &lt; <var>len</var>, do<ol><li>Let <var>elem</var> be <var>obj</var>.[[GetOwnProperty]](! <emu-xref aoid="ToString" id="_ref_6666"><a href="#sec-tostring">ToString</a></emu-xref>(<var>i</var>)).</li><li>If <var>elem</var> is <emu-val>undefined</emu-val>, return <emu-val>true</emu-val>.</li></ol></li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
<p>The <em>sort order</em> is the ordering, after completion of this function, of the <emu-xref href="#integer-index" id="_ref_576"><a href="#integer-index">integer-indexed</a></emu-xref> property values of <var>obj</var> whose integer indexes are less than <var>len</var>. The result of the <code>sort</code> function is then determined as follows:</p>
<p>If <var>comparefn</var> is not <emu-val>undefined</emu-val>
and is not a consistent comparison function for the elements of this
array (see below), the sort order is implementation-defined. The sort
order is also implementation-defined if <var>comparefn</var> is <emu-val>undefined</emu-val> and <emu-xref aoid="SortCompare" id="_ref_6667"><a href="#sec-sortcompare">SortCompare</a></emu-xref> does not act as a consistent comparison function.</p>
<p>Let <var>proto</var> be <var>obj</var>.[[GetPrototypeOf]](). If <var>proto</var> is not <emu-val>null</emu-val> and there exists an integer <var>j</var> such that all of the conditions below are satisfied then the sort order is implementation-defined:</p>
<ul>
<li>
<var>obj</var> is sparse
</li>
<li>
0 ≤ <var>j</var> &lt; <var>len</var>
</li>
<li>
<emu-xref aoid="HasProperty" id="_ref_6668"><a href="#sec-hasproperty">HasProperty</a></emu-xref>(<var>proto</var>, <emu-xref aoid="ToString" id="_ref_6669"><a href="#sec-tostring">ToString</a></emu-xref>(<var>j</var>)) is <emu-val>true</emu-val>.
</li>
</ul>
<p>The sort order is also implementation-defined if <var>obj</var> is sparse and any of the following conditions are true:</p>
<ul>
<li>
<emu-xref aoid="IsExtensible" id="_ref_6670"><a href="#sec-isextensible-o">IsExtensible</a></emu-xref>(<var>obj</var>) is <emu-val>false</emu-val>.
</li>
<li>
Any <emu-xref href="#integer-index" id="_ref_6671"><a href="#integer-index">integer index</a></emu-xref> property of <var>obj</var> whose name is a nonnegative integer less than <var>len</var> is a <emu-xref href="#sec-object-type" id="_ref_6672"><a href="#sec-object-type">data property</a></emu-xref> whose [[Configurable]] attribute is <emu-val>false</emu-val>.
</li>
</ul>
<p>The sort order is also implementation-defined if any of the following conditions are true:</p>
<ul>
<li>
If <var>obj</var> is an <emu-xref href="#exotic-object" id="_ref_6673"><a href="#exotic-object">exotic object</a></emu-xref>
(including Proxy exotic objects) whose behaviour for [[Get]], [[Set]],
[[Delete]], and [[GetOwnProperty]] is not the ordinary object
implementation of these internal methods.
</li>
<li>
If any index property of <var>obj</var> whose name is a nonnegative integer less than <var>len</var> is an <emu-xref href="#sec-object-type" id="_ref_6674"><a href="#sec-object-type">accessor property</a></emu-xref> or is a <emu-xref href="#sec-object-type" id="_ref_6675"><a href="#sec-object-type">data property</a></emu-xref> whose [[Writable]] attribute is <emu-val>false</emu-val>.
</li>
<li>
If <var>comparefn</var> is <emu-val>undefined</emu-val> and the application of <emu-xref aoid="ToString" id="_ref_6676"><a href="#sec-tostring">ToString</a></emu-xref> to any value passed as an argument to <emu-xref aoid="SortCompare" id="_ref_6677"><a href="#sec-sortcompare">SortCompare</a></emu-xref> modifies <var>obj</var> or any object on <var>obj</var>'s prototype chain.
</li>
<li>
If <var>comparefn</var> is <emu-val>undefined</emu-val> and all applications of <emu-xref aoid="ToString" id="_ref_6678"><a href="#sec-tostring">ToString</a></emu-xref>, to any specific value passed as an argument to <emu-xref aoid="SortCompare" id="_ref_6679"><a href="#sec-sortcompare">SortCompare</a></emu-xref>, do not produce the same result.
</li>
</ul>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Perform an implementation-dependent sequence of calls to the [[Get]] and [[Set]] internal methods of <var>obj</var>, to the <emu-xref aoid="DeletePropertyOrThrow" id="_ref_6680"><a href="#sec-deletepropertyorthrow">DeletePropertyOrThrow</a></emu-xref> and <emu-xref aoid="HasOwnProperty" id="_ref_6681"><a href="#sec-hasownproperty">HasOwnProperty</a></emu-xref> abstract operation with <var>obj</var> as the first argument, and to <emu-xref aoid="SortCompare" id="_ref_6682"><a href="#sec-sortcompare">SortCompare</a></emu-xref> (described below), such that:<ul><li>The property key argument for each call to [[Get]], [[Set]], <emu-xref aoid="HasOwnProperty" id="_ref_6683"><a href="#sec-hasownproperty">HasOwnProperty</a></emu-xref>, or <emu-xref aoid="DeletePropertyOrThrow" id="_ref_6684"><a href="#sec-deletepropertyorthrow">DeletePropertyOrThrow</a></emu-xref> is the string representation of a nonnegative integer less than <var>len</var>.</li><li>The arguments for calls to <emu-xref aoid="SortCompare" id="_ref_6685"><a href="#sec-sortcompare">SortCompare</a></emu-xref>
are values returned by a previous call to the [[Get]] internal method,
unless the properties accessed by those previous calls did not exist
according to <emu-xref aoid="HasOwnProperty" id="_ref_6686"><a href="#sec-hasownproperty">HasOwnProperty</a></emu-xref>. If both prospective arguments to <emu-xref aoid="SortCompare" id="_ref_6687"><a href="#sec-sortcompare">SortCompare</a></emu-xref> correspond to non-existent properties, use <emu-val>+0</emu-val> instead of calling <emu-xref aoid="SortCompare" id="_ref_6688"><a href="#sec-sortcompare">SortCompare</a></emu-xref>. If only the first prospective argument is non-existent use +1. If only the second prospective argument is non-existent use -1.</li><li>If <var>obj</var> is not sparse then <emu-xref aoid="DeletePropertyOrThrow" id="_ref_6689"><a href="#sec-deletepropertyorthrow">DeletePropertyOrThrow</a></emu-xref> must not be called.</li><li>If any [[Set]] call returns <emu-val>false</emu-val> a <emu-val>TypeError</emu-val> exception is thrown.</li><li>If an <emu-xref href="#sec-completion-record-specification-type" id="_ref_6690"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref> is returned from any of these operations, it is immediately returned as the value of this function.</li></ul></li><li>Return <var>obj</var>.
</li></ol></emu-alg>
<p>Unless the sort order is specified above to be
implementation-defined, the returned object must have the following two
characteristics:</p>
<ul>
<li>
There must be some mathematical permutation π of the nonnegative integers less than <var>len</var>, such that for every nonnegative integer <var>j</var> less than <var>len</var>, if property <emu-eqn class="inline">old[<var>j</var>]</emu-eqn> existed, then <emu-eqn class="inline">new[π(<var>j</var>)]</emu-eqn> is exactly the same value as <emu-eqn class="inline">old[<var>j</var>]</emu-eqn>. But if property <emu-eqn class="inline">old[<var>j</var>]</emu-eqn> did not exist, then <emu-eqn class="inline">new[π(<var>j</var>)]</emu-eqn> does not exist.
</li>
<li>
Then for all nonnegative integers <var>j</var> and <var>k</var>, each less than <var>len</var>, if <emu-eqn class="inline"><emu-xref aoid="SortCompare" id="_ref_6691"><a href="#sec-sortcompare">SortCompare</a></emu-xref>(old[<var>j</var>], old[<var>k</var>]) &lt; 0</emu-eqn> (see <emu-xref aoid="SortCompare" id="_ref_6692"><a href="#sec-sortcompare">SortCompare</a></emu-xref> below), then <emu-eqn class="inline">new[π(<var>j</var>)] &lt; new[π(<var>k</var>)]</emu-eqn>.
</li>
</ul>
<p>Here the notation <emu-eqn class="inline">old[<var>j</var>]</emu-eqn> is used to refer to the hypothetical result of calling <var>obj</var>.[[Get]](<var>j</var>) before this function is executed, and the notation <emu-eqn class="inline">new[<var>j</var>]</emu-eqn> to refer to the hypothetical result of calling <var>obj</var>.[[Get]](<var>j</var>) after this function has been executed.</p>
<p>A function <var>comparefn</var> is a consistent comparison function for a set of values <var>S</var> if all of the requirements below are met for all values <var>a</var>, <var>b</var>, and <var>c</var> (possibly the same value) in the set <var>S</var>: The notation <emu-eqn class="inline"><var>a</var> &lt;<sub>CF</sub> <var>b</var></emu-eqn> means <emu-eqn class="inline"><var>comparefn</var>(<var>a</var>, <var>b</var>) &lt; 0</emu-eqn>; <emu-eqn class="inline"><var>a</var> =<sub>CF</sub> <var>b</var></emu-eqn> means <emu-eqn class="inline"><var>comparefn</var>(<var>a</var>, <var>b</var>) = 0</emu-eqn> (of either sign); and <emu-eqn class="inline"><var>a</var> &gt;<sub>CF</sub> <var>b</var></emu-eqn> means <emu-eqn class="inline"><var>comparefn</var>(<var>a</var>, <var>b</var>) &gt; 0</emu-eqn>.</p>
<ul>
<li>
Calling <var>comparefn</var>(<var>a</var>, <var>b</var>) always returns the same value <var>v</var> when given a specific pair of values <var>a</var> and <var>b</var> as its two arguments. Furthermore, <emu-xref aoid="Type" id="_ref_6693"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>v</var>) is Number, and <var>v</var> is not <emu-val>NaN</emu-val>. Note that this implies that exactly one of <var>a</var> &lt;<sub>CF</sub> <var>b</var>, <var>a</var> =<sub>CF</sub> <var>b</var>, and <var>a</var> &gt;<sub>CF</sub> <var>b</var> will be true for a given pair of <var>a</var> and <var>b</var>.
</li>
<li>
Calling <var>comparefn</var>(<var>a</var>, <var>b</var>) does not modify <var>obj</var> or any object on <var>obj</var>'s prototype chain.
</li>
<li>
<var>a</var> =<sub>CF</sub> <var>a</var> (reflexivity)
</li>
<li>
If <var>a</var> =<sub>CF</sub> <var>b</var>, then <var>b</var> =<sub>CF</sub> <var>a</var> (symmetry)
</li>
<li>
If <var>a</var> =<sub>CF</sub> <var>b</var> and <var>b</var> =<sub>CF</sub> <var>c</var>, then <var>a</var> =<sub>CF</sub> <var>c</var> (transitivity of =<sub>CF</sub>)
</li>
<li>
If <var>a</var> &lt;<sub>CF</sub> <var>b</var> and <var>b</var> &lt;<sub>CF</sub> <var>c</var>, then <var>a</var> &lt;<sub>CF</sub> <var>c</var> (transitivity of &lt;<sub>CF</sub>)
</li>
<li>
If <var>a</var> &gt;<sub>CF</sub> <var>b</var> and <var>b</var> &gt;<sub>CF</sub> <var>c</var>, then <var>a</var> &gt;<sub>CF</sub> <var>c</var> (transitivity of &gt;<sub>CF</sub>)
</li>
</ul>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>The above conditions are necessary and sufficient to ensure that <var>comparefn</var> divides the set <var>S</var> into equivalence classes and that these equivalence classes are totally ordered.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <code>sort</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be an Array object. Therefore, it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
<emu-clause id="sec-sortcompare" aoid="SortCompare">
<h1><span class="secnum">22.1.3.27.1</span>Runtime Semantics: SortCompare ( <var>x</var>, <var>y</var> )</h1>
<p>The SortCompare abstract operation is called with two arguments <var>x</var> and <var>y</var>. It also has access to the <var>comparefn</var> argument passed to the current invocation of the <code>sort</code> method. The following steps are taken:</p>
<emu-alg><ol><li>If <var>x</var> and <var>y</var> are both <emu-val>undefined</emu-val>, return <emu-val>+0</emu-val>.</li><li>If <var>x</var> is <emu-val>undefined</emu-val>, return 1.</li><li>If <var>y</var> is <emu-val>undefined</emu-val>, return -1.</li><li>If <var>comparefn</var> is not <emu-val>undefined</emu-val>, then<ol><li>Let <var>v</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_6694"><a href="#sec-tonumber">ToNumber</a></emu-xref>(? <emu-xref aoid="Call" id="_ref_6695"><a href="#sec-call">Call</a></emu-xref>(<var>comparefn</var>, <emu-val>undefined</emu-val>, « <var>x</var>, <var>y</var> »)).</li><li>If <var>v</var> is <emu-val>NaN</emu-val>, return <emu-val>+0</emu-val>.</li><li>Return <var>v</var>.</li></ol></li><li>Let <var>xString</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_6696"><a href="#sec-tostring">ToString</a></emu-xref>(<var>x</var>).</li><li>Let <var>yString</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_6697"><a href="#sec-tostring">ToString</a></emu-xref>(<var>y</var>).</li><li>Let <var>xSmaller</var> be the result of performing <emu-xref aoid="Abstract Relational Comparison" id="_ref_6698"><a href="#sec-abstract-relational-comparison">Abstract Relational Comparison</a></emu-xref> <var>xString</var> &lt; <var>yString</var>.</li><li>If <var>xSmaller</var> is <emu-val>true</emu-val>, return -1.</li><li>Let <var>ySmaller</var> be the result of performing <emu-xref aoid="Abstract Relational Comparison" id="_ref_6699"><a href="#sec-abstract-relational-comparison">Abstract Relational Comparison</a></emu-xref> <var>yString</var> &lt; <var>xString</var>.</li><li>If <var>ySmaller</var> is <emu-val>true</emu-val>, return 1.</li><li>Return <emu-val>+0</emu-val>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>Because non-existent property values always compare greater than <emu-val>undefined</emu-val> property values, and <emu-val>undefined</emu-val> always compares greater than any other value, <emu-val>undefined</emu-val> property values always sort to the end of the result, followed by non-existent property values.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>Method calls performed by the <emu-xref aoid="ToString" id="_ref_6700"><a href="#sec-tostring">ToString</a></emu-xref> <emu-xref href="#sec-algorithm-conventions-abstract-operations" id="_ref_6701"><a href="#sec-algorithm-conventions-abstract-operations">abstract operations</a></emu-xref> in steps 5 and 7 have the potential to cause SortCompare to not behave as a consistent comparison function.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-array.prototype.splice">
<h1><span class="secnum">22.1.3.28</span>Array.prototype.splice ( <var>start</var>, <var>deleteCount</var>, ...<var>items</var> )</h1>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>When the <code>splice</code> method is called with two or more arguments <var>start</var>, <var>deleteCount</var> and zero or more <var>items</var>, the <var>deleteCount</var> elements of the array starting at <emu-xref href="#integer-index" id="_ref_6702"><a href="#integer-index">integer index</a></emu-xref> <var>start</var> are replaced by the arguments <var>items</var>. An Array object containing the deleted elements (if any) is returned.</p>
</div></emu-note>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_6703"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>len</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6704"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6705"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <code>"length"</code>)).</li><li>Let <var>relativeStart</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_6706"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>start</var>).</li><li>If <var>relativeStart</var> &lt; 0, let <var>actualStart</var> be <emu-xref aoid="max" id="_ref_6707"><a href="#eqn-max">max</a></emu-xref>((<var>len</var> + <var>relativeStart</var>), 0); else let <var>actualStart</var> be <emu-xref aoid="min" id="_ref_6708"><a href="#eqn-min">min</a></emu-xref>(<var>relativeStart</var>, <var>len</var>).</li><li>If the number of actual arguments is 0, then<ol><li>Let <var>insertCount</var> be 0.</li><li>Let <var>actualDeleteCount</var> be 0.</li></ol></li><li>Else if the number of actual arguments is 1, then<ol><li>Let <var>insertCount</var> be 0.</li><li>Let <var>actualDeleteCount</var> be <var>len</var> - <var>actualStart</var>.</li></ol></li><li>Else,<ol><li>Let <var>insertCount</var> be the number of actual arguments minus 2.</li><li>Let <var>dc</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_6709"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>deleteCount</var>).</li><li>Let <var>actualDeleteCount</var> be <emu-xref aoid="min" id="_ref_6710"><a href="#eqn-min">min</a></emu-xref>(<emu-xref aoid="max" id="_ref_6711"><a href="#eqn-max">max</a></emu-xref>(<var>dc</var>, 0), <var>len</var> - <var>actualStart</var>).</li></ol></li><li>If <var>len</var> + <var>insertCount</var> - <var>actualDeleteCount</var> &gt; 2<sup>53</sup> - 1, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>A</var> be ?&nbsp;<emu-xref aoid="ArraySpeciesCreate" id="_ref_6712"><a href="#sec-arrayspeciescreate">ArraySpeciesCreate</a></emu-xref>(<var>O</var>, <var>actualDeleteCount</var>).</li><li>Let <var>k</var> be 0.</li><li>Repeat, while <var>k</var> &lt; <var>actualDeleteCount</var><ol><li>Let <var>from</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6713"><a href="#sec-tostring">ToString</a></emu-xref>(<var>actualStart</var> + <var>k</var>).</li><li>Let <var>fromPresent</var> be ?&nbsp;<emu-xref aoid="HasProperty" id="_ref_6714"><a href="#sec-hasproperty">HasProperty</a></emu-xref>(<var>O</var>, <var>from</var>).</li><li>If <var>fromPresent</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>fromValue</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6715"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <var>from</var>).</li><li>Perform ?&nbsp;<emu-xref aoid="CreateDataPropertyOrThrow" id="_ref_6716"><a href="#sec-createdatapropertyorthrow">CreateDataPropertyOrThrow</a></emu-xref>(<var>A</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_6717"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>), <var>fromValue</var>).</li></ol></li><li>Increment <var>k</var> by 1.</li></ol></li><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6718"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>A</var>, <code>"length"</code>, <var>actualDeleteCount</var>, <emu-val>true</emu-val>).</li><li>Let <var>items</var> be a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6719"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>
whose elements are, in left to right order, the portion of the actual
argument list starting with the third argument. The list is empty if
fewer than three arguments were passed.</li><li>Let <var>itemCount</var> be the number of elements in <var>items</var>.</li><li>If <var>itemCount</var> &lt; <var>actualDeleteCount</var>, then<ol><li>Set <var>k</var> to <var>actualStart</var>.</li><li>Repeat, while <var>k</var> &lt; (<var>len</var> - <var>actualDeleteCount</var>)<ol><li>Let <var>from</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6720"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var> + <var>actualDeleteCount</var>).</li><li>Let <var>to</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6721"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var> + <var>itemCount</var>).</li><li>Let <var>fromPresent</var> be ?&nbsp;<emu-xref aoid="HasProperty" id="_ref_6722"><a href="#sec-hasproperty">HasProperty</a></emu-xref>(<var>O</var>, <var>from</var>).</li><li>If <var>fromPresent</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>fromValue</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6723"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <var>from</var>).</li><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6724"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>O</var>, <var>to</var>, <var>fromValue</var>, <emu-val>true</emu-val>).</li></ol></li><li>Else <var>fromPresent</var> is <emu-val>false</emu-val>,<ol><li>Perform ?&nbsp;<emu-xref aoid="DeletePropertyOrThrow" id="_ref_6725"><a href="#sec-deletepropertyorthrow">DeletePropertyOrThrow</a></emu-xref>(<var>O</var>, <var>to</var>).</li></ol></li><li>Increase <var>k</var> by 1.</li></ol></li><li>Set <var>k</var> to <var>len</var>.</li><li>Repeat, while <var>k</var> &gt; (<var>len</var> - <var>actualDeleteCount</var> + <var>itemCount</var>)<ol><li>Perform ?&nbsp;<emu-xref aoid="DeletePropertyOrThrow" id="_ref_6726"><a href="#sec-deletepropertyorthrow">DeletePropertyOrThrow</a></emu-xref>(<var>O</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_6727"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var> - 1)).</li><li>Decrease <var>k</var> by 1.</li></ol></li></ol></li><li>Else if <var>itemCount</var> &gt; <var>actualDeleteCount</var>, then<ol><li>Set <var>k</var> to (<var>len</var> - <var>actualDeleteCount</var>).</li><li>Repeat, while <var>k</var> &gt; <var>actualStart</var><ol><li>Let <var>from</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6728"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var> + <var>actualDeleteCount</var> - 1).</li><li>Let <var>to</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6729"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var> + <var>itemCount</var> - 1).</li><li>Let <var>fromPresent</var> be ?&nbsp;<emu-xref aoid="HasProperty" id="_ref_6730"><a href="#sec-hasproperty">HasProperty</a></emu-xref>(<var>O</var>, <var>from</var>).</li><li>If <var>fromPresent</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>fromValue</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6731"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <var>from</var>).</li><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6732"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>O</var>, <var>to</var>, <var>fromValue</var>, <emu-val>true</emu-val>).</li></ol></li><li>Else <var>fromPresent</var> is <emu-val>false</emu-val>,<ol><li>Perform ?&nbsp;<emu-xref aoid="DeletePropertyOrThrow" id="_ref_6733"><a href="#sec-deletepropertyorthrow">DeletePropertyOrThrow</a></emu-xref>(<var>O</var>, <var>to</var>).</li></ol></li><li>Decrease <var>k</var> by 1.</li></ol></li></ol></li><li>Set <var>k</var> to <var>actualStart</var>.</li><li>Repeat, while <var>items</var> is not empty<ol><li>Remove the first element from <var>items</var> and let <var>E</var> be the value of that element.</li><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6734"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>O</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_6735"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>), <var>E</var>, <emu-val>true</emu-val>).</li><li>Increase <var>k</var> by 1.</li></ol></li><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6736"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>O</var>, <code>"length"</code>, <var>len</var> - <var>actualDeleteCount</var> + <var>itemCount</var>, <emu-val>true</emu-val>).</li><li>Return <var>A</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The explicit setting of the <code>"length"</code> property
of the result Array in step 19 was necessary in previous editions of
ECMAScript to ensure that its length was correct in situations where the
trailing elements of the result Array were not present. Setting <code>"length"</code>
became unnecessary starting in ES2015 when the result Array was
initialized to its proper length rather than an empty Array but is
carried forward to preserve backward compatibility.</p>
</div></emu-note>
<emu-note><span class="note">Note 3</span><div class="note-contents">
<p>The <code>splice</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be an Array object. Therefore it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-array.prototype.tolocalestring">
<h1><span class="secnum">22.1.3.29</span>Array.prototype.toLocaleString ( [ <var>reserved1</var> [ , <var>reserved2</var> ] ] )</h1>
<p>An ECMAScript implementation that includes the ECMA-402 Internationalization API must implement the <code>Array.prototype.toLocaleString</code>
method as specified in the ECMA-402 specification. If an ECMAScript
implementation does not include the ECMA-402 API the following
specification of the <code>toLocaleString</code> method is used.</p>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>The first edition of ECMA-402 did not include a replacement specification for the <code>Array.prototype.toLocaleString</code> method.</p>
</div></emu-note>
<p>The meanings of the optional parameters to this method are
defined in the ECMA-402 specification; implementations that do not
include ECMA-402 support must not use those parameter positions for
anything else.</p>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>array</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_6737"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>len</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6738"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6739"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>array</var>, <code>"length"</code>)).</li><li>Let <var>separator</var>
be the String value for the list-separator String appropriate for the
host environment's current locale (this is derived in an
implementation-defined way).</li><li>Let <var>R</var> be the empty String.</li><li>Let <var>k</var> be 0.</li><li>Repeat, while <var>k</var> &lt; <var>len</var><ol><li>If <var>k</var> &gt; 0, then<ol><li>Set <var>R</var> to the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_6740"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>R</var> and <var>separator</var>.</li></ol></li><li>Let <var>nextElement</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6741"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>array</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_6742"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>)).</li><li>If <var>nextElement</var> is not <emu-val>undefined</emu-val> or <emu-val>null</emu-val>, then<ol><li>Let <var>S</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_6743"><a href="#sec-tostring">ToString</a></emu-xref>(? <emu-xref aoid="Invoke" id="_ref_6744"><a href="#sec-invoke">Invoke</a></emu-xref>(<var>nextElement</var>, <code>"toLocaleString"</code>)).</li><li>Set <var>R</var> to the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_6745"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>R</var> and <var>S</var>.</li></ol></li><li>Increase <var>k</var> by 1.</li></ol></li><li>Return <var>R</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The elements of the array are converted to Strings using their <code>toLocaleString</code>
methods, and these Strings are then concatenated, separated by
occurrences of a separator String that has been derived in an
implementation-defined locale-specific way. The result of calling this
function is intended to be analogous to the result of <code>toString</code>, except that the result of this function is intended to be locale-specific.</p>
</div></emu-note>
<emu-note><span class="note">Note 3</span><div class="note-contents">
<p>The <code>toLocaleString</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be an Array object. Therefore it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-array.prototype.tostring">
<h1><span class="secnum">22.1.3.30</span>Array.prototype.toString ( )</h1>
<p>When the <code>toString</code> method is called, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>array</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_6746"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>func</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6747"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>array</var>, <code>"join"</code>).</li><li>If <emu-xref aoid="IsCallable" id="_ref_6748"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>func</var>) is <emu-val>false</emu-val>, set <var>func</var> to the intrinsic function <emu-xref href="#sec-object.prototype.tostring" id="_ref_6749"><a href="#sec-object.prototype.tostring">%ObjProto_toString%</a></emu-xref>.</li><li>Return ?&nbsp;<emu-xref aoid="Call" id="_ref_6750"><a href="#sec-call">Call</a></emu-xref>(<var>func</var>, <var>array</var>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <code>toString</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be an Array object. Therefore it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-array.prototype.unshift">
<h1><span class="secnum">22.1.3.31</span>Array.prototype.unshift ( ...<var>items</var> )</h1>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>The arguments are prepended to the start of the array, such
that their order within the array is the same as the order in which
they appear in the argument list.</p>
</div></emu-note>
<p>When the <code>unshift</code> method is called with zero or more arguments <var>item1</var>, <var>item2</var>, etc., the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_6751"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>len</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6752"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6753"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <code>"length"</code>)).</li><li>Let <var>argCount</var> be the number of actual arguments.</li><li>If <var>argCount</var> &gt; 0, then<ol><li>If <var>len</var> + <var>argCount</var> &gt; 2<sup>53</sup> - 1, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>k</var> be <var>len</var>.</li><li>Repeat, while <var>k</var> &gt; 0,<ol><li>Let <var>from</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6754"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var> - 1).</li><li>Let <var>to</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6755"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var> + <var>argCount</var> - 1).</li><li>Let <var>fromPresent</var> be ?&nbsp;<emu-xref aoid="HasProperty" id="_ref_6756"><a href="#sec-hasproperty">HasProperty</a></emu-xref>(<var>O</var>, <var>from</var>).</li><li>If <var>fromPresent</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>fromValue</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6757"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <var>from</var>).</li><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6758"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>O</var>, <var>to</var>, <var>fromValue</var>, <emu-val>true</emu-val>).</li></ol></li><li>Else <var>fromPresent</var> is <emu-val>false</emu-val>,<ol><li>Perform ?&nbsp;<emu-xref aoid="DeletePropertyOrThrow" id="_ref_6759"><a href="#sec-deletepropertyorthrow">DeletePropertyOrThrow</a></emu-xref>(<var>O</var>, <var>to</var>).</li></ol></li><li>Decrease <var>k</var> by 1.</li></ol></li><li>Let <var>j</var> be 0.</li><li>Let <var>items</var> be a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6760"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> whose elements are, in left to right order, the arguments that were passed to this function invocation.</li><li>Repeat, while <var>items</var> is not empty<ol><li>Remove the first element from <var>items</var> and let <var>E</var> be the value of that element.</li><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6761"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>O</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_6762"><a href="#sec-tostring">ToString</a></emu-xref>(<var>j</var>), <var>E</var>, <emu-val>true</emu-val>).</li><li>Increase <var>j</var> by 1.</li></ol></li></ol></li><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6763"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>O</var>, <code>"length"</code>, <var>len</var> + <var>argCount</var>, <emu-val>true</emu-val>).</li><li>Return <var>len</var> + <var>argCount</var>.
</li></ol></emu-alg>
<p>The <code>"length"</code> property of the <code>unshift</code> method is 1.</p>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <code>unshift</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be an Array object. Therefore it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-array.prototype.values">
<h1><span class="secnum">22.1.3.32</span>Array.prototype.values ( )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_6764"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Return <emu-xref aoid="CreateArrayIterator" id="_ref_6765"><a href="#sec-createarrayiterator">CreateArrayIterator</a></emu-xref>(<var>O</var>, <code>"value"</code>).
</li></ol></emu-alg>
<p>This function is the <dfn>%ArrayProto_values%</dfn> intrinsic object.</p>
</emu-clause>
<emu-clause id="sec-array.prototype-@@iterator">
<h1><span class="secnum">22.1.3.33</span>Array.prototype [ @@iterator ] ( )</h1>
<p>The initial value of the @@iterator property is the same <emu-xref href="#function-object" id="_ref_6766"><a href="#function-object">function object</a></emu-xref> as the initial value of the <code>Array.prototype.values</code> property.</p>
</emu-clause>
<emu-clause id="sec-array.prototype-@@unscopables">
<h1><span class="secnum">22.1.3.34</span>Array.prototype [ @@unscopables ]</h1>
<p>The initial value of the @@unscopables <emu-xref href="#sec-object-type" id="_ref_6767"><a href="#sec-object-type">data property</a></emu-xref> is an object created by the following steps:</p>
<emu-alg><ol><li>Let <var>unscopableList</var> be <emu-xref aoid="ObjectCreate" id="_ref_6768"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-val>null</emu-val>).</li><li>Perform <emu-xref aoid="CreateDataProperty" id="_ref_6769"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>unscopableList</var>, <code>"copyWithin"</code>, <emu-val>true</emu-val>).</li><li>Perform <emu-xref aoid="CreateDataProperty" id="_ref_6770"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>unscopableList</var>, <code>"entries"</code>, <emu-val>true</emu-val>).</li><li>Perform <emu-xref aoid="CreateDataProperty" id="_ref_6771"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>unscopableList</var>, <code>"fill"</code>, <emu-val>true</emu-val>).</li><li>Perform <emu-xref aoid="CreateDataProperty" id="_ref_6772"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>unscopableList</var>, <code>"find"</code>, <emu-val>true</emu-val>).</li><li>Perform <emu-xref aoid="CreateDataProperty" id="_ref_6773"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>unscopableList</var>, <code>"findIndex"</code>, <emu-val>true</emu-val>).</li><li>Perform <emu-xref aoid="CreateDataProperty" id="_ref_6774"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>unscopableList</var>, <code>"flat"</code>, <emu-val>true</emu-val>).</li><li>Perform <emu-xref aoid="CreateDataProperty" id="_ref_6775"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>unscopableList</var>, <code>"flatMap"</code>, <emu-val>true</emu-val>).</li><li>Perform <emu-xref aoid="CreateDataProperty" id="_ref_6776"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>unscopableList</var>, <code>"includes"</code>, <emu-val>true</emu-val>).</li><li>Perform <emu-xref aoid="CreateDataProperty" id="_ref_6777"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>unscopableList</var>, <code>"keys"</code>, <emu-val>true</emu-val>).</li><li>Perform <emu-xref aoid="CreateDataProperty" id="_ref_6778"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>unscopableList</var>, <code>"values"</code>, <emu-val>true</emu-val>).</li><li><emu-xref href="#assert" id="_ref_6779"><a href="#assert">Assert</a></emu-xref>: Each of the above calls returns <emu-val>true</emu-val>.</li><li>Return <var>unscopableList</var>.
</li></ol></emu-alg>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The own property names of this object are property names that were not included as standard properties of <code>Array.prototype</code> prior to the ECMAScript 2015 specification. These names are ignored for <code>with</code>
statement binding purposes in order to preserve the behaviour of
existing code that might use one of these names as a binding in an outer
scope that is shadowed by a <code>with</code> statement whose binding object is an Array object.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-array-instances">
<h1><span class="secnum">22.1.4</span>Properties of Array Instances</h1>
<p>Array instances are Array exotic objects and have the internal
methods specified for such objects. Array instances inherit properties
from the Array prototype object.</p>
<p>Array instances have a <code>"length"</code> property, and a set of enumerable properties with <emu-xref href="#array-index" id="_ref_6780"><a href="#array-index">array index</a></emu-xref> names.</p>
<emu-clause id="sec-properties-of-array-instances-length">
<h1><span class="secnum">22.1.4.1</span>length</h1>
<p>The <code>"length"</code> property of an Array instance is a <emu-xref href="#sec-object-type" id="_ref_6781"><a href="#sec-object-type">data property</a></emu-xref> whose value is always numerically greater than the name of every configurable own property whose name is an <emu-xref href="#array-index" id="_ref_6782"><a href="#array-index">array index</a></emu-xref>.</p>
<p>The <code>"length"</code> property initially has the attributes { [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Reducing the value of the <code>"length"</code> property has the side-effect of deleting own array elements whose <emu-xref href="#array-index" id="_ref_6783"><a href="#array-index">array index</a></emu-xref> is between the old and new length values. However, non-configurable properties can not be deleted. Attempting to set the <code>"length"</code> property of an Array object to a value that is numerically less than or equal to the largest numeric own <emu-xref href="#property-name" id="_ref_6784"><a href="#property-name">property name</a></emu-xref> of an existing non-configurable <emu-xref href="#array-index" id="_ref_577"><a href="#array-index">array-indexed</a></emu-xref>
property of the array will result in the length being set to a numeric
value that is one greater than that non-configurable numeric own <emu-xref href="#property-name" id="_ref_6785"><a href="#property-name">property name</a></emu-xref>. See <emu-xref href="#sec-array-exotic-objects-defineownproperty-p-desc" id="_ref_578"><a href="#sec-array-exotic-objects-defineownproperty-p-desc">9.4.2.1</a></emu-xref>.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-array-iterator-objects">
<h1><span class="secnum">22.1.5</span>Array Iterator Objects</h1>
<p>An Array Iterator is an object, that represents a specific
iteration over some specific Array instance object. There is not a named
<emu-xref href="#constructor" id="_ref_6786"><a href="#constructor">constructor</a></emu-xref> for Array Iterator objects. Instead, Array iterator objects are created by calling certain methods of Array instance objects.</p>
<emu-clause id="sec-createarrayiterator" aoid="CreateArrayIterator">
<h1><span class="secnum">22.1.5.1</span>CreateArrayIterator ( <var>array</var>, <var>kind</var> )</h1>
<p>Several methods of Array objects return Iterator objects. The abstract operation CreateArrayIterator with arguments <var>array</var> and <var>kind</var> is used to create such iterator objects. It performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_6787"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_6788"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>array</var>) is Object.</li><li>Let <var>iterator</var> be <emu-xref aoid="ObjectCreate" id="_ref_6789"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-%arrayiteratorprototype%-object" id="_ref_6790"><a href="#sec-%arrayiteratorprototype%-object">%ArrayIteratorPrototype%</a></emu-xref>, « [[IteratedObject]], [[ArrayIteratorNextIndex]], [[ArrayIterationKind]] »).</li><li>Set <var>iterator</var>.[[IteratedObject]] to <var>array</var>.</li><li>Set <var>iterator</var>.[[ArrayIteratorNextIndex]] to 0.</li><li>Set <var>iterator</var>.[[ArrayIterationKind]] to <var>kind</var>.</li><li>Return <var>iterator</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-%arrayiteratorprototype%-object">
<h1><span class="secnum">22.1.5.2</span>The %ArrayIteratorPrototype% Object</h1>
<p>The <dfn>%ArrayIteratorPrototype%</dfn> object:</p>
<ul>
<li>has properties that are inherited by all Array Iterator Objects.</li>
<li>is an ordinary object.</li>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-%iteratorprototype%-object" id="_ref_6791"><a href="#sec-%iteratorprototype%-object">%IteratorPrototype%</a></emu-xref>.</li>
<li>has the following properties:</li>
</ul>
<emu-clause id="sec-%arrayiteratorprototype%.next">
<h1><span class="secnum">22.1.5.2.1</span>%ArrayIteratorPrototype%.next ( )</h1>
<emu-alg><ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_6792"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>O</var> does not have all of the internal slots of an Array Iterator Instance (<emu-xref href="#sec-properties-of-array-iterator-instances" id="_ref_579"><a href="#sec-properties-of-array-iterator-instances">22.1.5.3</a></emu-xref>), throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>a</var> be <var>O</var>.[[IteratedObject]].</li><li>If <var>a</var> is <emu-val>undefined</emu-val>, return <emu-xref aoid="CreateIterResultObject" id="_ref_6793"><a href="#sec-createiterresultobject">CreateIterResultObject</a></emu-xref>(<emu-val>undefined</emu-val>, <emu-val>true</emu-val>).</li><li>Let <var>index</var> be <var>O</var>.[[ArrayIteratorNextIndex]].</li><li>Let <var>itemKind</var> be <var>O</var>.[[ArrayIterationKind]].</li><li>If <var>a</var> has a [[TypedArrayName]] internal slot, then<ol><li>If <emu-xref aoid="IsDetachedBuffer" id="_ref_6794"><a href="#sec-isdetachedbuffer">IsDetachedBuffer</a></emu-xref>(<var>a</var>.[[ViewedArrayBuffer]]) is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>len</var> be <var>a</var>.[[ArrayLength]].</li></ol></li><li>Else,<ol><li>Let <var>len</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6795"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6796"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>a</var>, <code>"length"</code>)).</li></ol></li><li>If <var>index</var> ≥ <var>len</var>, then<ol><li>Set <var>O</var>.[[IteratedObject]] to <emu-val>undefined</emu-val>.</li><li>Return <emu-xref aoid="CreateIterResultObject" id="_ref_6797"><a href="#sec-createiterresultobject">CreateIterResultObject</a></emu-xref>(<emu-val>undefined</emu-val>, <emu-val>true</emu-val>).</li></ol></li><li>Set <var>O</var>.[[ArrayIteratorNextIndex]] to <var>index</var> + 1.</li><li>If <var>itemKind</var> is <code>"key"</code>, return <emu-xref aoid="CreateIterResultObject" id="_ref_6798"><a href="#sec-createiterresultobject">CreateIterResultObject</a></emu-xref>(<var>index</var>, <emu-val>false</emu-val>).</li><li>Let <var>elementKey</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6799"><a href="#sec-tostring">ToString</a></emu-xref>(<var>index</var>).</li><li>Let <var>elementValue</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6800"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>a</var>, <var>elementKey</var>).</li><li>If <var>itemKind</var> is <code>"value"</code>, let <var>result</var> be <var>elementValue</var>.</li><li>Else,<ol><li><emu-xref href="#assert" id="_ref_6801"><a href="#assert">Assert</a></emu-xref>: <var>itemKind</var> is <code>"key+value"</code>.</li><li>Let <var>result</var> be <emu-xref aoid="CreateArrayFromList" id="_ref_6802"><a href="#sec-createarrayfromlist">CreateArrayFromList</a></emu-xref>(« <var>index</var>, <var>elementValue</var> »).</li></ol></li><li>Return <emu-xref aoid="CreateIterResultObject" id="_ref_6803"><a href="#sec-createiterresultobject">CreateIterResultObject</a></emu-xref>(<var>result</var>, <emu-val>false</emu-val>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-%arrayiteratorprototype%-@@tostringtag">
<h1><span class="secnum">22.1.5.2.2</span>%ArrayIteratorPrototype% [ @@toStringTag ]</h1>
<p>The initial value of the @@toStringTag property is the String value <code>"Array Iterator"</code>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-array-iterator-instances">
<h1><span class="secnum">22.1.5.3</span>Properties of Array Iterator Instances</h1>
<p>Array Iterator instances are ordinary objects that inherit properties from the <emu-xref href="#sec-%arrayiteratorprototype%-object" id="_ref_6804"><a href="#sec-%arrayiteratorprototype%-object">%ArrayIteratorPrototype%</a></emu-xref> intrinsic object. Array Iterator instances are initially created with the internal slots listed in <emu-xref href="#table-48" id="_ref_580"><a href="#table-48">Table 58</a></emu-xref>.</p>
<emu-table id="table-48" caption="Internal Slots of Array Iterator Instances"><figure><figcaption>Table 58: Internal Slots of Array Iterator Instances</figcaption>
<table>
<tbody>
<tr>
<th>
Internal Slot
</th>
<th>
Description
</th>
</tr>
<tr>
<td>
[[IteratedObject]]
</td>
<td>
The object whose array elements are being iterated.
</td>
</tr>
<tr>
<td>
[[ArrayIteratorNextIndex]]
</td>
<td>
The <emu-xref href="#integer-index" id="_ref_6805"><a href="#integer-index">integer index</a></emu-xref> of the next <emu-xref href="#integer-index" id="_ref_6806"><a href="#integer-index">integer index</a></emu-xref> to be examined by this iteration.
</td>
</tr>
<tr>
<td>
[[ArrayIterationKind]]
</td>
<td>
A String value that identifies what is returned for each element of the iteration. The possible values are: <code>"key"</code>, <code>"value"</code>, <code>"key+value"</code>.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-typedarray-objects">
<h1><span class="secnum">22.2</span>TypedArray Objects</h1>
<p><var>TypedArray</var> objects present an array-like view of an underlying binary data buffer (<emu-xref href="#sec-arraybuffer-objects" id="_ref_581"><a href="#sec-arraybuffer-objects">24.1</a></emu-xref>). Each element of a <var>TypedArray</var> instance has the same underlying binary scalar data type. There is a distinct <var>TypedArray</var> <emu-xref href="#constructor" id="_ref_6807"><a href="#constructor">constructor</a></emu-xref>, listed in <emu-xref href="#table-49" id="_ref_582"><a href="#table-49">Table 59</a></emu-xref>, for each of the nine supported element types. Each <emu-xref href="#constructor" id="_ref_6808"><a href="#constructor">constructor</a></emu-xref> in <emu-xref href="#table-49" id="_ref_583"><a href="#table-49">Table 59</a></emu-xref> has a corresponding distinct prototype object.</p>
<emu-table id="table-49" caption="The TypedArray Constructors"><figure><figcaption>Table 59: The TypedArray Constructors</figcaption>
<table>
<tbody>
<tr>
<th>
<emu-xref href="#constructor" id="_ref_6809"><a href="#constructor">Constructor</a></emu-xref> Name and Intrinsic
</th>
<th>
Element Type
</th>
<th>
Element Size
</th>
<th>
Conversion Operation
</th>
<th>
Description
</th>
<th>
Equivalent C Type
</th>
</tr>
<tr>
<td>
Int8Array
<br>
%Int8Array%
</td>
<td>
Int8
</td>
<td>
1
</td>
<td>
<emu-xref aoid="ToInt8" id="_ref_6810"><a href="#sec-toint8">ToInt8</a></emu-xref>
</td>
<td>
8-bit 2's complement signed integer
</td>
<td>
signed char
</td>
</tr>
<tr>
<td>
Uint8Array
<br>
%Uint8Array%
</td>
<td>
Uint8
</td>
<td>
1
</td>
<td>
<emu-xref aoid="ToUint8" id="_ref_6811"><a href="#sec-touint8">ToUint8</a></emu-xref>
</td>
<td>
8-bit unsigned integer
</td>
<td>
unsigned char
</td>
</tr>
<tr>
<td>
Uint8ClampedArray
<br>
%Uint8ClampedArray%
</td>
<td>
Uint8C
</td>
<td>
1
</td>
<td>
<emu-xref aoid="ToUint8Clamp" id="_ref_6812"><a href="#sec-touint8clamp">ToUint8Clamp</a></emu-xref>
</td>
<td>
8-bit unsigned integer (clamped conversion)
</td>
<td>
unsigned char
</td>
</tr>
<tr>
<td>
Int16Array
<br>
%Int16Array%
</td>
<td>
Int16
</td>
<td>
2
</td>
<td>
<emu-xref aoid="ToInt16" id="_ref_6813"><a href="#sec-toint16">ToInt16</a></emu-xref>
</td>
<td>
16-bit 2's complement signed integer
</td>
<td>
short
</td>
</tr>
<tr>
<td>
Uint16Array
<br>
%Uint16Array%
</td>
<td>
Uint16
</td>
<td>
2
</td>
<td>
<emu-xref aoid="ToUint16" id="_ref_6814"><a href="#sec-touint16">ToUint16</a></emu-xref>
</td>
<td>
16-bit unsigned integer
</td>
<td>
unsigned short
</td>
</tr>
<tr>
<td>
Int32Array
<br>
%Int32Array%
</td>
<td>
Int32
</td>
<td>
4
</td>
<td>
<emu-xref aoid="ToInt32" id="_ref_6815"><a href="#sec-toint32">ToInt32</a></emu-xref>
</td>
<td>
32-bit 2's complement signed integer
</td>
<td>
int
</td>
</tr>
<tr>
<td>
Uint32Array
<br>
%Uint32Array%
</td>
<td>
Uint32
</td>
<td>
4
</td>
<td>
<emu-xref aoid="ToUint32" id="_ref_6816"><a href="#sec-touint32">ToUint32</a></emu-xref>
</td>
<td>
32-bit unsigned integer
</td>
<td>
unsigned int
</td>
</tr>
<tr>
<td>
Float32Array
<br>
%Float32Array%
</td>
<td>
Float32
</td>
<td>
4
</td>
<td>
</td>
<td>
32-bit IEEE floating point
</td>
<td>
float
</td>
</tr>
<tr>
<td>
Float64Array
<br>
%Float64Array%
</td>
<td>
Float64
</td>
<td>
8
</td>
<td>
</td>
<td>
64-bit IEEE floating point
</td>
<td>
double
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<p>In the definitions below, references to <var>TypedArray</var> should be replaced with the appropriate <emu-xref href="#constructor" id="_ref_6817"><a href="#constructor">constructor</a></emu-xref>
name from the above table. The phrase “the element size in bytes”
refers to the value in the Element Size column of the table in the row
corresponding to the <emu-xref href="#constructor" id="_ref_6818"><a href="#constructor">constructor</a></emu-xref>. The phrase “element Type” refers to the value in the Element Type column for that row.</p>
<emu-clause id="sec-%typedarray%-intrinsic-object">
<h1><span class="secnum">22.2.1</span>The %TypedArray% Intrinsic Object</h1>
<p>The <dfn>%TypedArray%</dfn> intrinsic object:</p>
<ul>
<li>is a <emu-xref href="#constructor" id="_ref_6819"><a href="#constructor">constructor</a></emu-xref> <emu-xref href="#function-object" id="_ref_6820"><a href="#function-object">function object</a></emu-xref> that all of the <var>TypedArray</var> <emu-xref href="#constructor" id="_ref_6821"><a href="#constructor">constructor</a></emu-xref> objects inherit from.</li>
<li>along with its corresponding prototype object, provides common properties that are inherited by all <var>TypedArray</var> constructors and their instances.</li>
<li>does not have a global name or appear as a property of the <emu-xref href="#sec-global-object" id="_ref_6822"><a href="#sec-global-object">global object</a></emu-xref>.</li>
<li>acts as the abstract superclass of the various <var>TypedArray</var> constructors.</li>
<li>will throw an error when invoked, because it is an abstract class <emu-xref href="#constructor" id="_ref_6823"><a href="#constructor">constructor</a></emu-xref>. The <var>TypedArray</var> constructors do not perform a <code>super</code> call to it.</li>
</ul>
<emu-clause id="sec-%typedarray%">
<h1><span class="secnum">22.2.1.1</span>%TypedArray% ( )</h1>
<p>The <emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_6824"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref> <emu-xref href="#constructor" id="_ref_6825"><a href="#constructor">constructor</a></emu-xref> performs the following steps:</p>
<emu-alg><ol><li>Throw a <emu-val>TypeError</emu-val> exception.
</li></ol></emu-alg>
<p>The <code>"length"</code> property of the <emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_6826"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref> <emu-xref href="#constructor" id="_ref_6827"><a href="#constructor">constructor</a></emu-xref> function is 0.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-%typedarray%-intrinsic-object">
<h1><span class="secnum">22.2.2</span>Properties of the %TypedArray% Intrinsic Object</h1>
<p>The <emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_6828"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref> intrinsic object:</p>
<ul>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_6829"><a href="#sec-properties-of-the-function-prototype-object">%FunctionPrototype%</a></emu-xref>.</li>
<li>has a <code>name</code> property whose value is <code>"TypedArray"</code>.</li>
<li>has the following properties:</li>
</ul>
<emu-clause id="sec-%typedarray%.from">
<h1><span class="secnum">22.2.2.1</span>%TypedArray%.from ( <var>source</var> [ , <var>mapfn</var> [ , <var>thisArg</var> ] ] )</h1>
<p>When the <code>from</code> method is called with argument <var>source</var>, and optional arguments <var>mapfn</var> and <var>thisArg</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>C</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="IsConstructor" id="_ref_6830"><a href="#sec-isconstructor">IsConstructor</a></emu-xref>(<var>C</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>mapfn</var> is present and <var>mapfn</var> is not <emu-val>undefined</emu-val>, then<ol><li>If <emu-xref aoid="IsCallable" id="_ref_6831"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>mapfn</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>mapping</var> be <emu-val>true</emu-val>.</li></ol></li><li>Else, let <var>mapping</var> be <emu-val>false</emu-val>.</li><li>If <var>thisArg</var> is present, let <var>T</var> be <var>thisArg</var>; else let <var>T</var> be <emu-val>undefined</emu-val>.</li><li>Let <var>usingIterator</var> be ?&nbsp;<emu-xref aoid="GetMethod" id="_ref_6832"><a href="#sec-getmethod">GetMethod</a></emu-xref>(<var>source</var>, @@iterator).</li><li>If <var>usingIterator</var> is not <emu-val>undefined</emu-val>, then<ol><li>Let <var>values</var> be ?&nbsp;<emu-xref aoid="IterableToList" id="_ref_6833"><a href="#sec-iterabletolist">IterableToList</a></emu-xref>(<var>source</var>, <var>usingIterator</var>).</li><li>Let <var>len</var> be the number of elements in <var>values</var>.</li><li>Let <var>targetObj</var> be ?&nbsp;<emu-xref aoid="TypedArrayCreate" id="_ref_6834"><a href="#typedarray-create">TypedArrayCreate</a></emu-xref>(<var>C</var>, « <var>len</var> »).</li><li>Let <var>k</var> be 0.</li><li>Repeat, while <var>k</var> &lt; <var>len</var><ol><li>Let <var>Pk</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6835"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>).</li><li>Let <var>kValue</var> be the first element of <var>values</var> and remove that element from <var>values</var>.</li><li>If <var>mapping</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>mappedValue</var> be ?&nbsp;<emu-xref aoid="Call" id="_ref_6836"><a href="#sec-call">Call</a></emu-xref>(<var>mapfn</var>, <var>T</var>, « <var>kValue</var>, <var>k</var> »).</li></ol></li><li>Else, let <var>mappedValue</var> be <var>kValue</var>.</li><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6837"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>targetObj</var>, <var>Pk</var>, <var>mappedValue</var>, <emu-val>true</emu-val>).</li><li>Increase <var>k</var> by 1.</li></ol></li><li><emu-xref href="#assert" id="_ref_6838"><a href="#assert">Assert</a></emu-xref>: <var>values</var> is now an empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6839"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Return <var>targetObj</var>.</li></ol></li><li>NOTE: <var>source</var> is not an Iterable so assume it is already an array-like object.</li><li>Let <var>arrayLike</var> be !&nbsp;<emu-xref aoid="ToObject" id="_ref_6840"><a href="#sec-toobject">ToObject</a></emu-xref>(<var>source</var>).</li><li>Let <var>len</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6841"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6842"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>arrayLike</var>, <code>"length"</code>)).</li><li>Let <var>targetObj</var> be ?&nbsp;<emu-xref aoid="TypedArrayCreate" id="_ref_6843"><a href="#typedarray-create">TypedArrayCreate</a></emu-xref>(<var>C</var>, « <var>len</var> »).</li><li>Let <var>k</var> be 0.</li><li>Repeat, while <var>k</var> &lt; <var>len</var><ol><li>Let <var>Pk</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6844"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>).</li><li>Let <var>kValue</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6845"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>arrayLike</var>, <var>Pk</var>).</li><li>If <var>mapping</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>mappedValue</var> be ?&nbsp;<emu-xref aoid="Call" id="_ref_6846"><a href="#sec-call">Call</a></emu-xref>(<var>mapfn</var>, <var>T</var>, « <var>kValue</var>, <var>k</var> »).</li></ol></li><li>Else, let <var>mappedValue</var> be <var>kValue</var>.</li><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6847"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>targetObj</var>, <var>Pk</var>, <var>mappedValue</var>, <emu-val>true</emu-val>).</li><li>Increase <var>k</var> by 1.</li></ol></li><li>Return <var>targetObj</var>.
</li></ol></emu-alg>
<emu-clause id="sec-iterabletolist" aoid="IterableToList">
<h1><span class="secnum">22.2.2.1.1</span>Runtime Semantics: IterableToList ( <var>items</var>, <var>method</var> )</h1>
<p>The abstract operation IterableToList performs the following steps:</p>
<emu-alg><ol><li>Let <var>iteratorRecord</var> be ?&nbsp;<emu-xref aoid="GetIterator" id="_ref_6848"><a href="#sec-getiterator">GetIterator</a></emu-xref>(<var>items</var>, <emu-const>sync</emu-const>, <var>method</var>).</li><li>Let <var>values</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6849"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>next</var> be <emu-val>true</emu-val>.</li><li>Repeat, while <var>next</var> is not <emu-val>false</emu-val><ol><li>Set <var>next</var> to ?&nbsp;<emu-xref aoid="IteratorStep" id="_ref_6850"><a href="#sec-iteratorstep">IteratorStep</a></emu-xref>(<var>iteratorRecord</var>).</li><li>If <var>next</var> is not <emu-val>false</emu-val>, then<ol><li>Let <var>nextValue</var> be ?&nbsp;<emu-xref aoid="IteratorValue" id="_ref_6851"><a href="#sec-iteratorvalue">IteratorValue</a></emu-xref>(<var>next</var>).</li><li>Append <var>nextValue</var> to the end of the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6852"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> <var>values</var>.</li></ol></li></ol></li><li>Return <var>values</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-%typedarray%.of">
<h1><span class="secnum">22.2.2.2</span>%TypedArray%.of ( ...<var>items</var> )</h1>
<p>When the <code>of</code> method is called with any number of arguments, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>len</var> be the actual number of arguments passed to this function.</li><li>Let <var>items</var> be the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6853"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of arguments passed to this function.</li><li>Let <var>C</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="IsConstructor" id="_ref_6854"><a href="#sec-isconstructor">IsConstructor</a></emu-xref>(<var>C</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>newObj</var> be ?&nbsp;<emu-xref aoid="TypedArrayCreate" id="_ref_6855"><a href="#typedarray-create">TypedArrayCreate</a></emu-xref>(<var>C</var>, « <var>len</var> »).</li><li>Let <var>k</var> be 0.</li><li>Repeat, while <var>k</var> &lt; <var>len</var><ol><li>Let <var>kValue</var> be <var>items</var>[<var>k</var>].</li><li>Let <var>Pk</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6856"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>).</li><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6857"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>newObj</var>, <var>Pk</var>, <var>kValue</var>, <emu-val>true</emu-val>).</li><li>Increase <var>k</var> by 1.</li></ol></li><li>Return <var>newObj</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <var>items</var> argument is assumed to be a well-formed rest argument value.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-%typedarray%.prototype">
<h1><span class="secnum">22.2.2.3</span>%TypedArray%.prototype</h1>
<p>The initial value of <emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_6858"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref><code>.prototype</code> is the <emu-xref href="#sec-properties-of-the-%typedarrayprototype%-object" id="_ref_6859"><a href="#sec-properties-of-the-%typedarrayprototype%-object">%TypedArrayPrototype%</a></emu-xref> intrinsic object.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-get-%typedarray%-@@species">
<h1><span class="secnum">22.2.2.4</span>get %TypedArray% [ @@species ]</h1>
<p><emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_6860"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref><code>[@@species]</code> is an <emu-xref href="#sec-object-type" id="_ref_6861"><a href="#sec-object-type">accessor property</a></emu-xref> whose set accessor function is <emu-val>undefined</emu-val>. Its get accessor function performs the following steps:</p>
<emu-alg><ol><li>Return the <emu-val>this</emu-val> value.
</li></ol></emu-alg>
<p>The value of the <code>name</code> property of this function is <code>"get [Symbol.species]"</code>.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p><emu-xref href="#sec-properties-of-the-%typedarrayprototype%-object" id="_ref_6862"><a href="#sec-properties-of-the-%typedarrayprototype%-object">%TypedArrayPrototype%</a></emu-xref> methods normally use their <code>this</code> object's <emu-xref href="#constructor" id="_ref_6863"><a href="#constructor">constructor</a></emu-xref> to create a derived object. However, a subclass <emu-xref href="#constructor" id="_ref_6864"><a href="#constructor">constructor</a></emu-xref> may over-ride that default behaviour by redefining its @@species property.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-%typedarrayprototype%-object">
<h1><span class="secnum">22.2.3</span>Properties of the %TypedArrayPrototype% Object</h1>
<p>The <dfn>%TypedArrayPrototype%</dfn> object:</p>
<ul>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_6865"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>.</li>
<li>is an ordinary object.</li>
<li>does not have a [[ViewedArrayBuffer]] or any other of the internal slots that are specific to <var>TypedArray</var> instance objects.</li>
</ul>
<emu-clause id="sec-get-%typedarray%.prototype.buffer">
<h1><span class="secnum">22.2.3.1</span>get %TypedArray%.prototype.buffer</h1>
<p><emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_6866"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref><code>.prototype.buffer</code> is an <emu-xref href="#sec-object-type" id="_ref_6867"><a href="#sec-object-type">accessor property</a></emu-xref> whose set accessor function is <emu-val>undefined</emu-val>. Its get accessor function performs the following steps:</p>
<emu-alg><ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_6868"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>O</var> does not have a [[TypedArrayName]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li><emu-xref href="#assert" id="_ref_6869"><a href="#assert">Assert</a></emu-xref>: <var>O</var> has a [[ViewedArrayBuffer]] internal slot.</li><li>Let <var>buffer</var> be <var>O</var>.[[ViewedArrayBuffer]].</li><li>Return <var>buffer</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-get-%typedarray%.prototype.bytelength">
<h1><span class="secnum">22.2.3.2</span>get %TypedArray%.prototype.byteLength</h1>
<p><emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_6870"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref><code>.prototype.byteLength</code> is an <emu-xref href="#sec-object-type" id="_ref_6871"><a href="#sec-object-type">accessor property</a></emu-xref> whose set accessor function is <emu-val>undefined</emu-val>. Its get accessor function performs the following steps:</p>
<emu-alg><ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_6872"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>O</var> does not have a [[TypedArrayName]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li><emu-xref href="#assert" id="_ref_6873"><a href="#assert">Assert</a></emu-xref>: <var>O</var> has a [[ViewedArrayBuffer]] internal slot.</li><li>Let <var>buffer</var> be <var>O</var>.[[ViewedArrayBuffer]].</li><li>If <emu-xref aoid="IsDetachedBuffer" id="_ref_6874"><a href="#sec-isdetachedbuffer">IsDetachedBuffer</a></emu-xref>(<var>buffer</var>) is <emu-val>true</emu-val>, return 0.</li><li>Let <var>size</var> be <var>O</var>.[[ByteLength]].</li><li>Return <var>size</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-get-%typedarray%.prototype.byteoffset">
<h1><span class="secnum">22.2.3.3</span>get %TypedArray%.prototype.byteOffset</h1>
<p><emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_6875"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref><code>.prototype.byteOffset</code> is an <emu-xref href="#sec-object-type" id="_ref_6876"><a href="#sec-object-type">accessor property</a></emu-xref> whose set accessor function is <emu-val>undefined</emu-val>. Its get accessor function performs the following steps:</p>
<emu-alg><ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_6877"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>O</var> does not have a [[TypedArrayName]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li><emu-xref href="#assert" id="_ref_6878"><a href="#assert">Assert</a></emu-xref>: <var>O</var> has a [[ViewedArrayBuffer]] internal slot.</li><li>Let <var>buffer</var> be <var>O</var>.[[ViewedArrayBuffer]].</li><li>If <emu-xref aoid="IsDetachedBuffer" id="_ref_6879"><a href="#sec-isdetachedbuffer">IsDetachedBuffer</a></emu-xref>(<var>buffer</var>) is <emu-val>true</emu-val>, return 0.</li><li>Let <var>offset</var> be <var>O</var>.[[ByteOffset]].</li><li>Return <var>offset</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-%typedarray%.prototype.constructor">
<h1><span class="secnum">22.2.3.4</span>%TypedArray%.prototype.constructor</h1>
<p>The initial value of <emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_6880"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref><code>.prototype.constructor</code> is the <emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_6881"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref> intrinsic object.</p>
</emu-clause>
<emu-clause id="sec-%typedarray%.prototype.copywithin">
<h1><span class="secnum">22.2.3.5</span>%TypedArray%.prototype.copyWithin ( <var>target</var>, <var>start</var> [ , <var>end</var> ] )</h1>
<p>The interpretation and use of the arguments of <emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_6882"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref><code>.prototype.copyWithin</code> are the same as for <code>Array.prototype.copyWithin</code> as defined in <emu-xref href="#sec-array.prototype.copywithin" id="_ref_584"><a href="#sec-array.prototype.copywithin">22.1.3.3</a></emu-xref>.</p>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be <emu-val>this</emu-val> value.</li><li>Perform ?&nbsp;<emu-xref aoid="ValidateTypedArray" id="_ref_6883"><a href="#sec-validatetypedarray">ValidateTypedArray</a></emu-xref>(<var>O</var>).</li><li>Let <var>len</var> be <var>O</var>.[[ArrayLength]].</li><li>Let <var>relativeTarget</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_6884"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>target</var>).</li><li>If <var>relativeTarget</var> &lt; 0, let <var>to</var> be <emu-xref aoid="max" id="_ref_6885"><a href="#eqn-max">max</a></emu-xref>((<var>len</var> + <var>relativeTarget</var>), 0); else let <var>to</var> be <emu-xref aoid="min" id="_ref_6886"><a href="#eqn-min">min</a></emu-xref>(<var>relativeTarget</var>, <var>len</var>).</li><li>Let <var>relativeStart</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_6887"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>start</var>).</li><li>If <var>relativeStart</var> &lt; 0, let <var>from</var> be <emu-xref aoid="max" id="_ref_6888"><a href="#eqn-max">max</a></emu-xref>((<var>len</var> + <var>relativeStart</var>), 0); else let <var>from</var> be <emu-xref aoid="min" id="_ref_6889"><a href="#eqn-min">min</a></emu-xref>(<var>relativeStart</var>, <var>len</var>).</li><li>If <var>end</var> is <emu-val>undefined</emu-val>, let <var>relativeEnd</var> be <var>len</var>; else let <var>relativeEnd</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_6890"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>end</var>).</li><li>If <var>relativeEnd</var> &lt; 0, let <var>final</var> be <emu-xref aoid="max" id="_ref_6891"><a href="#eqn-max">max</a></emu-xref>((<var>len</var> + <var>relativeEnd</var>), 0); else let <var>final</var> be <emu-xref aoid="min" id="_ref_6892"><a href="#eqn-min">min</a></emu-xref>(<var>relativeEnd</var>, <var>len</var>).</li><li>Let <var>count</var> be <emu-xref aoid="min" id="_ref_6893"><a href="#eqn-min">min</a></emu-xref>(<var>final</var> - <var>from</var>, <var>len</var> - <var>to</var>).</li><li>If <var>count</var> &gt; 0, then<ol><li>NOTE: The copying must be performed in a manner that preserves the bit-level encoding of the source data.</li><li>Let <var>buffer</var> be <var>O</var>.[[ViewedArrayBuffer]].</li><li>If <emu-xref aoid="IsDetachedBuffer" id="_ref_6894"><a href="#sec-isdetachedbuffer">IsDetachedBuffer</a></emu-xref>(<var>buffer</var>) is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>typedArrayName</var> be the String value of <var>O</var>.[[TypedArrayName]].</li><li>Let <var>elementSize</var> be the Number value of the Element Size value specified in <emu-xref href="#table-49" id="_ref_585"><a href="#table-49">Table 59</a></emu-xref> for <var>typedArrayName</var>.</li><li>Let <var>byteOffset</var> be <var>O</var>.[[ByteOffset]].</li><li>Let <var>toByteIndex</var> be <var>to</var> × <var>elementSize</var> + <var>byteOffset</var>.</li><li>Let <var>fromByteIndex</var> be <var>from</var> × <var>elementSize</var> + <var>byteOffset</var>.</li><li>Let <var>countBytes</var> be <var>count</var> × <var>elementSize</var>.</li><li>If <var>fromByteIndex</var> &lt; <var>toByteIndex</var> and <var>toByteIndex</var> &lt; <var>fromByteIndex</var> + <var>countBytes</var>, then<ol><li>Let <var>direction</var> be -1.</li><li>Set <var>fromByteIndex</var> to <var>fromByteIndex</var> + <var>countBytes</var> - 1.</li><li>Set <var>toByteIndex</var> to <var>toByteIndex</var> + <var>countBytes</var> - 1.</li></ol></li><li>Else,<ol><li>Let <var>direction</var> be 1.</li></ol></li><li>Repeat, while <var>countBytes</var> &gt; 0<ol><li>Let <var>value</var> be <emu-xref aoid="GetValueFromBuffer" id="_ref_6895"><a href="#sec-getvaluefrombuffer">GetValueFromBuffer</a></emu-xref>(<var>buffer</var>, <var>fromByteIndex</var>, <code>"Uint8"</code>, <emu-val>true</emu-val>, <code>"Unordered"</code>).</li><li>Perform <emu-xref aoid="SetValueInBuffer" id="_ref_6896"><a href="#sec-setvalueinbuffer">SetValueInBuffer</a></emu-xref>(<var>buffer</var>, <var>toByteIndex</var>, <code>"Uint8"</code>, <var>value</var>, <emu-val>true</emu-val>, <code>"Unordered"</code>).</li><li>Set <var>fromByteIndex</var> to <var>fromByteIndex</var> + <var>direction</var>.</li><li>Set <var>toByteIndex</var> to <var>toByteIndex</var> + <var>direction</var>.</li><li>Decrease <var>countBytes</var> by 1.</li></ol></li></ol></li><li>Return <var>O</var>.
</li></ol></emu-alg>
<emu-clause id="sec-validatetypedarray" aoid="ValidateTypedArray">
<h1><span class="secnum">22.2.3.5.1</span>Runtime Semantics: ValidateTypedArray ( <var>O</var> )</h1>
<p>When called with argument <var>O</var>, the following steps are taken:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_6897"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>O</var> does not have a [[TypedArrayName]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li><emu-xref href="#assert" id="_ref_6898"><a href="#assert">Assert</a></emu-xref>: <var>O</var> has a [[ViewedArrayBuffer]] internal slot.</li><li>Let <var>buffer</var> be <var>O</var>.[[ViewedArrayBuffer]].</li><li>If <emu-xref aoid="IsDetachedBuffer" id="_ref_6899"><a href="#sec-isdetachedbuffer">IsDetachedBuffer</a></emu-xref>(<var>buffer</var>) is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return <var>buffer</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-%typedarray%.prototype.entries">
<h1><span class="secnum">22.2.3.6</span>%TypedArray%.prototype.entries ( )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li>Perform ?&nbsp;<emu-xref aoid="ValidateTypedArray" id="_ref_6900"><a href="#sec-validatetypedarray">ValidateTypedArray</a></emu-xref>(<var>O</var>).</li><li>Return <emu-xref aoid="CreateArrayIterator" id="_ref_6901"><a href="#sec-createarrayiterator">CreateArrayIterator</a></emu-xref>(<var>O</var>, <code>"key+value"</code>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-%typedarray%.prototype.every">
<h1><span class="secnum">22.2.3.7</span>%TypedArray%.prototype.every ( <var>callbackfn</var> [ , <var>thisArg</var> ] )</h1>
<p><emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_6902"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref><code>.prototype.every</code> is a distinct function that implements the same algorithm as <code>Array.prototype.every</code> as defined in <emu-xref href="#sec-array.prototype.every" id="_ref_586"><a href="#sec-array.prototype.every">22.1.3.5</a></emu-xref> except that the <emu-val>this</emu-val> object's [[ArrayLength]] internal slot is accessed in place of performing a [[Get]] of <code>"length"</code>. The implementation of the algorithm may be optimized with the knowledge that the <emu-val>this</emu-val>
value is an object that has a fixed length and whose integer-indexed
properties are not sparse. However, such optimization must not introduce
any observable changes in the specified behaviour of the algorithm and
must take into account the possibility that calls to <var>callbackfn</var> may cause the <emu-val>this</emu-val> value to become detached.</p>
<p>This function is not generic. <emu-xref aoid="ValidateTypedArray" id="_ref_6903"><a href="#sec-validatetypedarray">ValidateTypedArray</a></emu-xref> is applied to the <emu-val>this</emu-val> value prior to evaluating the algorithm. If its result is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_6904"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref> that exception is thrown instead of evaluating the algorithm.</p>
</emu-clause>
<emu-clause id="sec-%typedarray%.prototype.fill">
<h1><span class="secnum">22.2.3.8</span>%TypedArray%.prototype.fill ( <var>value</var> [ , <var>start</var> [ , <var>end</var> ] ] )</h1>
<p>The interpretation and use of the arguments of <emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_6905"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref><code>.prototype.fill</code> are the same as for <code>Array.prototype.fill</code> as defined in <emu-xref href="#sec-array.prototype.fill" id="_ref_587"><a href="#sec-array.prototype.fill">22.1.3.6</a></emu-xref>.</p>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li>Perform ?&nbsp;<emu-xref aoid="ValidateTypedArray" id="_ref_6906"><a href="#sec-validatetypedarray">ValidateTypedArray</a></emu-xref>(<var>O</var>).</li><li>Let <var>len</var> be <var>O</var>.[[ArrayLength]].</li><li>Set <var>value</var> to ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_6907"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>value</var>).</li><li>Let <var>relativeStart</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_6908"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>start</var>).</li><li>If <var>relativeStart</var> &lt; 0, let <var>k</var> be <emu-xref aoid="max" id="_ref_6909"><a href="#eqn-max">max</a></emu-xref>((<var>len</var> + <var>relativeStart</var>), 0); else let <var>k</var> be <emu-xref aoid="min" id="_ref_6910"><a href="#eqn-min">min</a></emu-xref>(<var>relativeStart</var>, <var>len</var>).</li><li>If <var>end</var> is <emu-val>undefined</emu-val>, let <var>relativeEnd</var> be <var>len</var>; else let <var>relativeEnd</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_6911"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>end</var>).</li><li>If <var>relativeEnd</var> &lt; 0, let <var>final</var> be <emu-xref aoid="max" id="_ref_6912"><a href="#eqn-max">max</a></emu-xref>((<var>len</var> + <var>relativeEnd</var>), 0); else let <var>final</var> be <emu-xref aoid="min" id="_ref_6913"><a href="#eqn-min">min</a></emu-xref>(<var>relativeEnd</var>, <var>len</var>).</li><li>If <emu-xref aoid="IsDetachedBuffer" id="_ref_6914"><a href="#sec-isdetachedbuffer">IsDetachedBuffer</a></emu-xref>(<var>O</var>.[[ViewedArrayBuffer]]) is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Repeat, while <var>k</var> &lt; <var>final</var><ol><li>Let <var>Pk</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6915"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>).</li><li>Perform !&nbsp;<emu-xref aoid="Set" id="_ref_6916"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>O</var>, <var>Pk</var>, <var>value</var>, <emu-val>true</emu-val>).</li><li>Increase <var>k</var> by 1.</li></ol></li><li>Return <var>O</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-%typedarray%.prototype.filter">
<h1><span class="secnum">22.2.3.9</span>%TypedArray%.prototype.filter ( <var>callbackfn</var> [ , <var>thisArg</var> ] )</h1>
<p>The interpretation and use of the arguments of <emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_6917"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref><code>.prototype.filter</code> are the same as for <code>Array.prototype.filter</code> as defined in <emu-xref href="#sec-array.prototype.filter" id="_ref_588"><a href="#sec-array.prototype.filter">22.1.3.7</a></emu-xref>.</p>
<p>When the <code>filter</code> method is called with one or two arguments, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li>Perform ?&nbsp;<emu-xref aoid="ValidateTypedArray" id="_ref_6918"><a href="#sec-validatetypedarray">ValidateTypedArray</a></emu-xref>(<var>O</var>).</li><li>Let <var>len</var> be <var>O</var>.[[ArrayLength]].</li><li>If <emu-xref aoid="IsCallable" id="_ref_6919"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>callbackfn</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>thisArg</var> is present, let <var>T</var> be <var>thisArg</var>; else let <var>T</var> be <emu-val>undefined</emu-val>.</li><li>Let <var>kept</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6920"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>k</var> be 0.</li><li>Let <var>captured</var> be 0.</li><li>Repeat, while <var>k</var> &lt; <var>len</var><ol><li>Let <var>Pk</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6921"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>).</li><li>Let <var>kValue</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6922"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <var>Pk</var>).</li><li>Let <var>selected</var> be <emu-xref aoid="ToBoolean" id="_ref_6923"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="Call" id="_ref_6924"><a href="#sec-call">Call</a></emu-xref>(<var>callbackfn</var>, <var>T</var>, « <var>kValue</var>, <var>k</var>, <var>O</var> »)).</li><li>If <var>selected</var> is <emu-val>true</emu-val>, then<ol><li>Append <var>kValue</var> to the end of <var>kept</var>.</li><li>Increase <var>captured</var> by 1.</li></ol></li><li>Increase <var>k</var> by 1.</li></ol></li><li>Let <var>A</var> be ?&nbsp;<emu-xref aoid="TypedArraySpeciesCreate" id="_ref_6925"><a href="#typedarray-species-create">TypedArraySpeciesCreate</a></emu-xref>(<var>O</var>, « <var>captured</var> »).</li><li>Let <var>n</var> be 0.</li><li>For each element <var>e</var> of <var>kept</var>, do<ol><li>Perform !&nbsp;<emu-xref aoid="Set" id="_ref_6926"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>A</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_6927"><a href="#sec-tostring">ToString</a></emu-xref>(<var>n</var>), <var>e</var>, <emu-val>true</emu-val>).</li><li>Increment <var>n</var> by 1.</li></ol></li><li>Return <var>A</var>.
</li></ol></emu-alg>
<p>This function is not generic. The <emu-val>this</emu-val> value must be an object with a [[TypedArrayName]] internal slot.</p>
</emu-clause>
<emu-clause id="sec-%typedarray%.prototype.find">
<h1><span class="secnum">22.2.3.10</span>%TypedArray%.prototype.find ( <var>predicate</var> [ , <var>thisArg</var> ] )</h1>
<p><emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_6928"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref><code>.prototype.find</code> is a distinct function that implements the same algorithm as <code>Array.prototype.find</code> as defined in <emu-xref href="#sec-array.prototype.find" id="_ref_589"><a href="#sec-array.prototype.find">22.1.3.8</a></emu-xref> except that the <emu-val>this</emu-val> object's [[ArrayLength]] internal slot is accessed in place of performing a [[Get]] of <code>"length"</code>. The implementation of the algorithm may be optimized with the knowledge that the <emu-val>this</emu-val> value is an object that has a fixed length and whose <emu-xref href="#integer-index" id="_ref_590"><a href="#integer-index">integer-indexed</a></emu-xref>
properties are not sparse. However, such optimization must not
introduce any observable changes in the specified behaviour of the
algorithm and must take into account the possibility that calls to <var>predicate</var> may cause the <emu-val>this</emu-val> value to become detached.</p>
<p>This function is not generic. <emu-xref aoid="ValidateTypedArray" id="_ref_6929"><a href="#sec-validatetypedarray">ValidateTypedArray</a></emu-xref> is applied to the <emu-val>this</emu-val> value prior to evaluating the algorithm. If its result is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_6930"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref> that exception is thrown instead of evaluating the algorithm.</p>
</emu-clause>
<emu-clause id="sec-%typedarray%.prototype.findindex">
<h1><span class="secnum">22.2.3.11</span>%TypedArray%.prototype.findIndex ( <var>predicate</var> [ , <var>thisArg</var> ] )</h1>
<p><emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_6931"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref><code>.prototype.findIndex</code> is a distinct function that implements the same algorithm as <code>Array.prototype.findIndex</code> as defined in <emu-xref href="#sec-array.prototype.findindex" id="_ref_591"><a href="#sec-array.prototype.findindex">22.1.3.9</a></emu-xref> except that the <emu-val>this</emu-val> object's [[ArrayLength]] internal slot is accessed in place of performing a [[Get]] of <code>"length"</code>. The implementation of the algorithm may be optimized with the knowledge that the <emu-val>this</emu-val> value is an object that has a fixed length and whose <emu-xref href="#integer-index" id="_ref_592"><a href="#integer-index">integer-indexed</a></emu-xref>
properties are not sparse. However, such optimization must not
introduce any observable changes in the specified behaviour of the
algorithm and must take into account the possibility that calls to <var>predicate</var> may cause the <emu-val>this</emu-val> value to become detached.</p>
<p>This function is not generic. <emu-xref aoid="ValidateTypedArray" id="_ref_6932"><a href="#sec-validatetypedarray">ValidateTypedArray</a></emu-xref> is applied to the <emu-val>this</emu-val> value prior to evaluating the algorithm. If its result is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_6933"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref> that exception is thrown instead of evaluating the algorithm.</p>
</emu-clause>
<emu-clause id="sec-%typedarray%.prototype.foreach">
<h1><span class="secnum">22.2.3.12</span>%TypedArray%.prototype.forEach ( <var>callbackfn</var> [ , <var>thisArg</var> ] )</h1>
<p><emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_6934"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref><code>.prototype.forEach</code> is a distinct function that implements the same algorithm as <code>Array.prototype.forEach</code> as defined in <emu-xref href="#sec-array.prototype.foreach" id="_ref_593"><a href="#sec-array.prototype.foreach">22.1.3.12</a></emu-xref> except that the <emu-val>this</emu-val> object's [[ArrayLength]] internal slot is accessed in place of performing a [[Get]] of <code>"length"</code>. The implementation of the algorithm may be optimized with the knowledge that the <emu-val>this</emu-val> value is an object that has a fixed length and whose <emu-xref href="#integer-index" id="_ref_594"><a href="#integer-index">integer-indexed</a></emu-xref>
properties are not sparse. However, such optimization must not
introduce any observable changes in the specified behaviour of the
algorithm and must take into account the possibility that calls to <var>callbackfn</var> may cause the <emu-val>this</emu-val> value to become detached.</p>
<p>This function is not generic. <emu-xref aoid="ValidateTypedArray" id="_ref_6935"><a href="#sec-validatetypedarray">ValidateTypedArray</a></emu-xref> is applied to the <emu-val>this</emu-val> value prior to evaluating the algorithm. If its result is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_6936"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref> that exception is thrown instead of evaluating the algorithm.</p>
</emu-clause>
<emu-clause id="sec-%typedarray%.prototype.includes">
<h1><span class="secnum">22.2.3.13</span>%TypedArray%.prototype.includes ( <var>searchElement</var> [ , <var>fromIndex</var> ] )</h1>
<p><emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_6937"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref><code>.prototype.includes</code> is a distinct function that implements the same algorithm as <code>Array.prototype.includes</code> as defined in <emu-xref href="#sec-array.prototype.includes" id="_ref_595"><a href="#sec-array.prototype.includes">22.1.3.13</a></emu-xref> except that the <emu-val>this</emu-val> object's [[ArrayLength]] internal slot is accessed in place of performing a [[Get]] of <code>"length"</code>. The implementation of the algorithm may be optimized with the knowledge that the <emu-val>this</emu-val> value is an object that has a fixed length and whose <emu-xref href="#integer-index" id="_ref_596"><a href="#integer-index">integer-indexed</a></emu-xref>
properties are not sparse. However, such optimization must not
introduce any observable changes in the specified behaviour of the
algorithm.</p>
<p>This function is not generic. <emu-xref aoid="ValidateTypedArray" id="_ref_6938"><a href="#sec-validatetypedarray">ValidateTypedArray</a></emu-xref> is applied to the <emu-val>this</emu-val> value prior to evaluating the algorithm. If its result is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_6939"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref> that exception is thrown instead of evaluating the algorithm.</p>
</emu-clause>
<emu-clause id="sec-%typedarray%.prototype.indexof">
<h1><span class="secnum">22.2.3.14</span>%TypedArray%.prototype.indexOf ( <var>searchElement</var> [ , <var>fromIndex</var> ] )</h1>
<p><emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_6940"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref><code>.prototype.indexOf</code> is a distinct function that implements the same algorithm as <code>Array.prototype.indexOf</code> as defined in <emu-xref href="#sec-array.prototype.indexof" id="_ref_597"><a href="#sec-array.prototype.indexof">22.1.3.14</a></emu-xref> except that the <emu-val>this</emu-val> object's [[ArrayLength]] internal slot is accessed in place of performing a [[Get]] of <code>"length"</code>. The implementation of the algorithm may be optimized with the knowledge that the <emu-val>this</emu-val> value is an object that has a fixed length and whose <emu-xref href="#integer-index" id="_ref_598"><a href="#integer-index">integer-indexed</a></emu-xref>
properties are not sparse. However, such optimization must not
introduce any observable changes in the specified behaviour of the
algorithm.</p>
<p>This function is not generic. <emu-xref aoid="ValidateTypedArray" id="_ref_6941"><a href="#sec-validatetypedarray">ValidateTypedArray</a></emu-xref> is applied to the <emu-val>this</emu-val> value prior to evaluating the algorithm. If its result is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_6942"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref> that exception is thrown instead of evaluating the algorithm.</p>
</emu-clause>
<emu-clause id="sec-%typedarray%.prototype.join">
<h1><span class="secnum">22.2.3.15</span>%TypedArray%.prototype.join ( <var>separator</var> )</h1>
<p><emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_6943"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref><code>.prototype.join</code> is a distinct function that implements the same algorithm as <code>Array.prototype.join</code> as defined in <emu-xref href="#sec-array.prototype.join" id="_ref_599"><a href="#sec-array.prototype.join">22.1.3.15</a></emu-xref> except that the <emu-val>this</emu-val> object's [[ArrayLength]] internal slot is accessed in place of performing a [[Get]] of <code>"length"</code>. The implementation of the algorithm may be optimized with the knowledge that the <emu-val>this</emu-val> value is an object that has a fixed length and whose <emu-xref href="#integer-index" id="_ref_600"><a href="#integer-index">integer-indexed</a></emu-xref>
properties are not sparse. However, such optimization must not
introduce any observable changes in the specified behaviour of the
algorithm.</p>
<p>This function is not generic. <emu-xref aoid="ValidateTypedArray" id="_ref_6944"><a href="#sec-validatetypedarray">ValidateTypedArray</a></emu-xref> is applied to the <emu-val>this</emu-val> value prior to evaluating the algorithm. If its result is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_6945"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref> that exception is thrown instead of evaluating the algorithm.</p>
</emu-clause>
<emu-clause id="sec-%typedarray%.prototype.keys">
<h1><span class="secnum">22.2.3.16</span>%TypedArray%.prototype.keys ( )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li>Perform ?&nbsp;<emu-xref aoid="ValidateTypedArray" id="_ref_6946"><a href="#sec-validatetypedarray">ValidateTypedArray</a></emu-xref>(<var>O</var>).</li><li>Return <emu-xref aoid="CreateArrayIterator" id="_ref_6947"><a href="#sec-createarrayiterator">CreateArrayIterator</a></emu-xref>(<var>O</var>, <code>"key"</code>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-%typedarray%.prototype.lastindexof">
<h1><span class="secnum">22.2.3.17</span>%TypedArray%.prototype.lastIndexOf ( <var>searchElement</var> [ , <var>fromIndex</var> ] )</h1>
<p><emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_6948"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref><code>.prototype.lastIndexOf</code> is a distinct function that implements the same algorithm as <code>Array.prototype.lastIndexOf</code> as defined in <emu-xref href="#sec-array.prototype.lastindexof" id="_ref_601"><a href="#sec-array.prototype.lastindexof">22.1.3.17</a></emu-xref> except that the <emu-val>this</emu-val> object's [[ArrayLength]] internal slot is accessed in place of performing a [[Get]] of <code>"length"</code>. The implementation of the algorithm may be optimized with the knowledge that the <emu-val>this</emu-val> value is an object that has a fixed length and whose <emu-xref href="#integer-index" id="_ref_602"><a href="#integer-index">integer-indexed</a></emu-xref>
properties are not sparse. However, such optimization must not
introduce any observable changes in the specified behaviour of the
algorithm.</p>
<p>This function is not generic. <emu-xref aoid="ValidateTypedArray" id="_ref_6949"><a href="#sec-validatetypedarray">ValidateTypedArray</a></emu-xref> is applied to the <emu-val>this</emu-val> value prior to evaluating the algorithm. If its result is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_6950"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref> that exception is thrown instead of evaluating the algorithm.</p>
</emu-clause>
<emu-clause id="sec-get-%typedarray%.prototype.length">
<h1><span class="secnum">22.2.3.18</span>get %TypedArray%.prototype.length</h1>
<p><emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_6951"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref><code>.prototype.length</code> is an <emu-xref href="#sec-object-type" id="_ref_6952"><a href="#sec-object-type">accessor property</a></emu-xref> whose set accessor function is <emu-val>undefined</emu-val>. Its get accessor function performs the following steps:</p>
<emu-alg><ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_6953"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>O</var> does not have a [[TypedArrayName]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li><emu-xref href="#assert" id="_ref_6954"><a href="#assert">Assert</a></emu-xref>: <var>O</var> has [[ViewedArrayBuffer]] and [[ArrayLength]] internal slots.</li><li>Let <var>buffer</var> be <var>O</var>.[[ViewedArrayBuffer]].</li><li>If <emu-xref aoid="IsDetachedBuffer" id="_ref_6955"><a href="#sec-isdetachedbuffer">IsDetachedBuffer</a></emu-xref>(<var>buffer</var>) is <emu-val>true</emu-val>, return 0.</li><li>Let <var>length</var> be <var>O</var>.[[ArrayLength]].</li><li>Return <var>length</var>.
</li></ol></emu-alg>
<p>This function is not generic. The <emu-val>this</emu-val> value must be an object with a [[TypedArrayName]] internal slot.</p>
</emu-clause>
<emu-clause id="sec-%typedarray%.prototype.map">
<h1><span class="secnum">22.2.3.19</span>%TypedArray%.prototype.map ( <var>callbackfn</var> [ , <var>thisArg</var> ] )</h1>
<p>The interpretation and use of the arguments of <emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_6956"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref><code>.prototype.map</code> are the same as for <code>Array.prototype.map</code> as defined in <emu-xref href="#sec-array.prototype.map" id="_ref_603"><a href="#sec-array.prototype.map">22.1.3.18</a></emu-xref>.</p>
<p>When the <code>map</code> method is called with one or two arguments, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li>Perform ?&nbsp;<emu-xref aoid="ValidateTypedArray" id="_ref_6957"><a href="#sec-validatetypedarray">ValidateTypedArray</a></emu-xref>(<var>O</var>).</li><li>Let <var>len</var> be <var>O</var>.[[ArrayLength]].</li><li>If <emu-xref aoid="IsCallable" id="_ref_6958"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>callbackfn</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>thisArg</var> is present, let <var>T</var> be <var>thisArg</var>; else let <var>T</var> be <emu-val>undefined</emu-val>.</li><li>Let <var>A</var> be ?&nbsp;<emu-xref aoid="TypedArraySpeciesCreate" id="_ref_6959"><a href="#typedarray-species-create">TypedArraySpeciesCreate</a></emu-xref>(<var>O</var>, « <var>len</var> »).</li><li>Let <var>k</var> be 0.</li><li>Repeat, while <var>k</var> &lt; <var>len</var><ol><li>Let <var>Pk</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6960"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>).</li><li>Let <var>kValue</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_6961"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <var>Pk</var>).</li><li>Let <var>mappedValue</var> be ?&nbsp;<emu-xref aoid="Call" id="_ref_6962"><a href="#sec-call">Call</a></emu-xref>(<var>callbackfn</var>, <var>T</var>, « <var>kValue</var>, <var>k</var>, <var>O</var> »).</li><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_6963"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>A</var>, <var>Pk</var>, <var>mappedValue</var>, <emu-val>true</emu-val>).</li><li>Increase <var>k</var> by 1.</li></ol></li><li>Return <var>A</var>.
</li></ol></emu-alg>
<p>This function is not generic. The <emu-val>this</emu-val> value must be an object with a [[TypedArrayName]] internal slot.</p>
</emu-clause>
<emu-clause id="sec-%typedarray%.prototype.reduce">
<h1><span class="secnum">22.2.3.20</span>%TypedArray%.prototype.reduce ( <var>callbackfn</var> [ , <var>initialValue</var> ] )</h1>
<p><emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_6964"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref><code>.prototype.reduce</code> is a distinct function that implements the same algorithm as <code>Array.prototype.reduce</code> as defined in <emu-xref href="#sec-array.prototype.reduce" id="_ref_604"><a href="#sec-array.prototype.reduce">22.1.3.21</a></emu-xref> except that the <emu-val>this</emu-val> object's [[ArrayLength]] internal slot is accessed in place of performing a [[Get]] of <code>"length"</code>. The implementation of the algorithm may be optimized with the knowledge that the <emu-val>this</emu-val> value is an object that has a fixed length and whose <emu-xref href="#integer-index" id="_ref_605"><a href="#integer-index">integer-indexed</a></emu-xref>
properties are not sparse. However, such optimization must not
introduce any observable changes in the specified behaviour of the
algorithm and must take into account the possibility that calls to <var>callbackfn</var> may cause the <emu-val>this</emu-val> value to become detached.</p>
<p>This function is not generic. <emu-xref aoid="ValidateTypedArray" id="_ref_6965"><a href="#sec-validatetypedarray">ValidateTypedArray</a></emu-xref> is applied to the <emu-val>this</emu-val> value prior to evaluating the algorithm. If its result is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_6966"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref> that exception is thrown instead of evaluating the algorithm.</p>
</emu-clause>
<emu-clause id="sec-%typedarray%.prototype.reduceright">
<h1><span class="secnum">22.2.3.21</span>%TypedArray%.prototype.reduceRight ( <var>callbackfn</var> [ , <var>initialValue</var> ] )</h1>
<p><emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_6967"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref><code>.prototype.reduceRight</code> is a distinct function that implements the same algorithm as <code>Array.prototype.reduceRight</code> as defined in <emu-xref href="#sec-array.prototype.reduceright" id="_ref_606"><a href="#sec-array.prototype.reduceright">22.1.3.22</a></emu-xref> except that the <emu-val>this</emu-val> object's [[ArrayLength]] internal slot is accessed in place of performing a [[Get]] of <code>"length"</code>. The implementation of the algorithm may be optimized with the knowledge that the <emu-val>this</emu-val> value is an object that has a fixed length and whose <emu-xref href="#integer-index" id="_ref_607"><a href="#integer-index">integer-indexed</a></emu-xref>
properties are not sparse. However, such optimization must not
introduce any observable changes in the specified behaviour of the
algorithm and must take into account the possibility that calls to <var>callbackfn</var> may cause the <emu-val>this</emu-val> value to become detached.</p>
<p>This function is not generic. <emu-xref aoid="ValidateTypedArray" id="_ref_6968"><a href="#sec-validatetypedarray">ValidateTypedArray</a></emu-xref> is applied to the <emu-val>this</emu-val> value prior to evaluating the algorithm. If its result is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_6969"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref> that exception is thrown instead of evaluating the algorithm.</p>
</emu-clause>
<emu-clause id="sec-%typedarray%.prototype.reverse">
<h1><span class="secnum">22.2.3.22</span>%TypedArray%.prototype.reverse ( )</h1>
<p><emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_6970"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref><code>.prototype.reverse</code> is a distinct function that implements the same algorithm as <code>Array.prototype.reverse</code> as defined in <emu-xref href="#sec-array.prototype.reverse" id="_ref_608"><a href="#sec-array.prototype.reverse">22.1.3.23</a></emu-xref> except that the <emu-val>this</emu-val> object's [[ArrayLength]] internal slot is accessed in place of performing a [[Get]] of <code>"length"</code>. The implementation of the algorithm may be optimized with the knowledge that the <emu-val>this</emu-val> value is an object that has a fixed length and whose <emu-xref href="#integer-index" id="_ref_609"><a href="#integer-index">integer-indexed</a></emu-xref>
properties are not sparse. However, such optimization must not
introduce any observable changes in the specified behaviour of the
algorithm.</p>
<p>This function is not generic. <emu-xref aoid="ValidateTypedArray" id="_ref_6971"><a href="#sec-validatetypedarray">ValidateTypedArray</a></emu-xref> is applied to the <emu-val>this</emu-val> value prior to evaluating the algorithm. If its result is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_6972"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref> that exception is thrown instead of evaluating the algorithm.</p>
</emu-clause>
<emu-clause id="sec-%typedarray%.prototype.set-overloaded-offset">
<h1><span class="secnum">22.2.3.23</span>%TypedArray%.prototype.set ( <var>overloaded</var> [ , <var>offset</var> ] )</h1>
<p><emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_6973"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref><code>.prototype.set</code> is a single function whose behaviour is overloaded based upon the type of its first argument.</p>
<p>This function is not generic. The <emu-val>this</emu-val> value must be an object with a [[TypedArrayName]] internal slot.</p>
<emu-clause id="sec-%typedarray%.prototype.set-array-offset">
<h1><span class="secnum">22.2.3.23.1</span>%TypedArray%.prototype.set ( <var>array</var> [ , <var>offset</var> ] )</h1>
<p>Sets multiple values in this <var>TypedArray</var>, reading the values from the object <var>array</var>. The optional <var>offset</var> value indicates the first element index in this <var>TypedArray</var> where values are written. If omitted, it is assumed to be 0.</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_6974"><a href="#assert">Assert</a></emu-xref>: <var>array</var> is any <emu-xref href="#sec-ecmascript-language-types" id="_ref_6975"><a href="#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref> other than an Object with a [[TypedArrayName]] internal slot. If it is such an Object, the definition in <emu-xref href="#sec-%typedarray%.prototype.set-typedarray-offset" id="_ref_610"><a href="#sec-%typedarray%.prototype.set-typedarray-offset">22.2.3.23.2</a></emu-xref> applies.</li><li>Let <var>target</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_6976"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>target</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>target</var> does not have a [[TypedArrayName]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li><emu-xref href="#assert" id="_ref_6977"><a href="#assert">Assert</a></emu-xref>: <var>target</var> has a [[ViewedArrayBuffer]] internal slot.</li><li>Let <var>targetOffset</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_6978"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>offset</var>).</li><li>If <var>targetOffset</var> &lt; 0, throw a <emu-val>RangeError</emu-val> exception.</li><li>Let <var>targetBuffer</var> be <var>target</var>.[[ViewedArrayBuffer]].</li><li>If <emu-xref aoid="IsDetachedBuffer" id="_ref_6979"><a href="#sec-isdetachedbuffer">IsDetachedBuffer</a></emu-xref>(<var>targetBuffer</var>) is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>targetLength</var> be <var>target</var>.[[ArrayLength]].</li><li>Let <var>targetName</var> be the String value of <var>target</var>.[[TypedArrayName]].</li><li>Let <var>targetElementSize</var> be the Number value of the Element Size value specified in <emu-xref href="#table-49" id="_ref_611"><a href="#table-49">Table 59</a></emu-xref> for <var>targetName</var>.</li><li>Let <var>targetType</var> be the String value of the Element Type value in <emu-xref href="#table-49" id="_ref_612"><a href="#table-49">Table 59</a></emu-xref> for <var>targetName</var>.</li><li>Let <var>targetByteOffset</var> be <var>target</var>.[[ByteOffset]].</li><li>Let <var>src</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_6980"><a href="#sec-toobject">ToObject</a></emu-xref>(<var>array</var>).</li><li>Let <var>srcLength</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_6981"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6982"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>src</var>, <code>"length"</code>)).</li><li>If <var>srcLength</var> + <var>targetOffset</var> &gt; <var>targetLength</var>, throw a <emu-val>RangeError</emu-val> exception.</li><li>Let <var>targetByteIndex</var> be <var>targetOffset</var> × <var>targetElementSize</var> + <var>targetByteOffset</var>.</li><li>Let <var>k</var> be 0.</li><li>Let <var>limit</var> be <var>targetByteIndex</var> + <var>targetElementSize</var> × <var>srcLength</var>.</li><li>Repeat, while <var>targetByteIndex</var> &lt; <var>limit</var><ol><li>Let <var>Pk</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6983"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>).</li><li>Let <var>kNumber</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_6984"><a href="#sec-tonumber">ToNumber</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_6985"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>src</var>, <var>Pk</var>)).</li><li>If <emu-xref aoid="IsDetachedBuffer" id="_ref_6986"><a href="#sec-isdetachedbuffer">IsDetachedBuffer</a></emu-xref>(<var>targetBuffer</var>) is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Perform <emu-xref aoid="SetValueInBuffer" id="_ref_6987"><a href="#sec-setvalueinbuffer">SetValueInBuffer</a></emu-xref>(<var>targetBuffer</var>, <var>targetByteIndex</var>, <var>targetType</var>, <var>kNumber</var>, <emu-val>true</emu-val>, <code>"Unordered"</code>).</li><li>Increase <var>k</var> by 1.</li><li>Set <var>targetByteIndex</var> to <var>targetByteIndex</var> + <var>targetElementSize</var>.</li></ol></li><li>Return <emu-val>undefined</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-%typedarray%.prototype.set-typedarray-offset">
<h1><span class="secnum">22.2.3.23.2</span>%TypedArray%.prototype.set ( <var>typedArray</var> [ , <var>offset</var> ] )</h1>
<p>Sets multiple values in this <var>TypedArray</var>, reading the values from the <var>typedArray</var> argument object. The optional <var>offset</var> value indicates the first element index in this <var>TypedArray</var> where values are written. If omitted, it is assumed to be 0.</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_6988"><a href="#assert">Assert</a></emu-xref>: <var>typedArray</var> has a [[TypedArrayName]] internal slot. If it does not, the definition in <emu-xref href="#sec-%typedarray%.prototype.set-array-offset" id="_ref_613"><a href="#sec-%typedarray%.prototype.set-array-offset">22.2.3.23.1</a></emu-xref> applies.</li><li>Let <var>target</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_6989"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>target</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>target</var> does not have a [[TypedArrayName]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li><emu-xref href="#assert" id="_ref_6990"><a href="#assert">Assert</a></emu-xref>: <var>target</var> has a [[ViewedArrayBuffer]] internal slot.</li><li>Let <var>targetOffset</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_6991"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>offset</var>).</li><li>If <var>targetOffset</var> &lt; 0, throw a <emu-val>RangeError</emu-val> exception.</li><li>Let <var>targetBuffer</var> be <var>target</var>.[[ViewedArrayBuffer]].</li><li>If <emu-xref aoid="IsDetachedBuffer" id="_ref_6992"><a href="#sec-isdetachedbuffer">IsDetachedBuffer</a></emu-xref>(<var>targetBuffer</var>) is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>targetLength</var> be <var>target</var>.[[ArrayLength]].</li><li>Let <var>srcBuffer</var> be <var>typedArray</var>.[[ViewedArrayBuffer]].</li><li>If <emu-xref aoid="IsDetachedBuffer" id="_ref_6993"><a href="#sec-isdetachedbuffer">IsDetachedBuffer</a></emu-xref>(<var>srcBuffer</var>) is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>targetName</var> be the String value of <var>target</var>.[[TypedArrayName]].</li><li>Let <var>targetType</var> be the String value of the Element Type value in <emu-xref href="#table-49" id="_ref_614"><a href="#table-49">Table 59</a></emu-xref> for <var>targetName</var>.</li><li>Let <var>targetElementSize</var> be the Number value of the Element Size value specified in <emu-xref href="#table-49" id="_ref_615"><a href="#table-49">Table 59</a></emu-xref> for <var>targetName</var>.</li><li>Let <var>targetByteOffset</var> be <var>target</var>.[[ByteOffset]].</li><li>Let <var>srcName</var> be the String value of <var>typedArray</var>.[[TypedArrayName]].</li><li>Let <var>srcType</var> be the String value of the Element Type value in <emu-xref href="#table-49" id="_ref_616"><a href="#table-49">Table 59</a></emu-xref> for <var>srcName</var>.</li><li>Let <var>srcElementSize</var> be the Number value of the Element Size value specified in <emu-xref href="#table-49" id="_ref_617"><a href="#table-49">Table 59</a></emu-xref> for <var>srcName</var>.</li><li>Let <var>srcLength</var> be <var>typedArray</var>.[[ArrayLength]].</li><li>Let <var>srcByteOffset</var> be <var>typedArray</var>.[[ByteOffset]].</li><li>If <var>srcLength</var> + <var>targetOffset</var> &gt; <var>targetLength</var>, throw a <emu-val>RangeError</emu-val> exception.</li><li>If both <emu-xref aoid="IsSharedArrayBuffer" id="_ref_6994"><a href="#sec-issharedarraybuffer">IsSharedArrayBuffer</a></emu-xref>(<var>srcBuffer</var>) and <emu-xref aoid="IsSharedArrayBuffer" id="_ref_6995"><a href="#sec-issharedarraybuffer">IsSharedArrayBuffer</a></emu-xref>(<var>targetBuffer</var>) are <emu-val>true</emu-val>, then<ol><li>If <var>srcBuffer</var>.[[ArrayBufferData]] and <var>targetBuffer</var>.[[ArrayBufferData]] are the same <emu-xref href="#sec-data-blocks" id="_ref_6996"><a href="#sec-data-blocks">Shared Data Block</a></emu-xref> values, let <var>same</var> be <emu-val>true</emu-val>; else let <var>same</var> be <emu-val>false</emu-val>.</li></ol></li><li>Else, let <var>same</var> be <emu-xref aoid="SameValue" id="_ref_6997"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>srcBuffer</var>, <var>targetBuffer</var>).</li><li>If <var>same</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>srcByteLength</var> be <var>typedArray</var>.[[ByteLength]].</li><li>Set <var>srcBuffer</var> to ?&nbsp;<emu-xref aoid="CloneArrayBuffer" id="_ref_6998"><a href="#sec-clonearraybuffer">CloneArrayBuffer</a></emu-xref>(<var>srcBuffer</var>, <var>srcByteOffset</var>, <var>srcByteLength</var>, <emu-xref href="#sec-arraybuffer-constructor" id="_ref_6999"><a href="#sec-arraybuffer-constructor">%ArrayBuffer%</a></emu-xref>).</li><li>NOTE: <emu-xref href="#sec-arraybuffer-constructor" id="_ref_7000"><a href="#sec-arraybuffer-constructor">%ArrayBuffer%</a></emu-xref> is used to clone <var>srcBuffer</var> because is it known to not have any observable side-effects.</li><li>Let <var>srcByteIndex</var> be 0.</li></ol></li><li>Else, let <var>srcByteIndex</var> be <var>srcByteOffset</var>.</li><li>Let <var>targetByteIndex</var> be <var>targetOffset</var> × <var>targetElementSize</var> + <var>targetByteOffset</var>.</li><li>Let <var>limit</var> be <var>targetByteIndex</var> + <var>targetElementSize</var> × <var>srcLength</var>.</li><li>If <emu-xref aoid="SameValue" id="_ref_7001"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>srcType</var>, <var>targetType</var>) is <emu-val>true</emu-val>, then<ol><li>NOTE: If <var>srcType</var> and <var>targetType</var> are the same, the transfer must be performed in a manner that preserves the bit-level encoding of the source data.</li><li>Repeat, while <var>targetByteIndex</var> &lt; <var>limit</var><ol><li>Let <var>value</var> be <emu-xref aoid="GetValueFromBuffer" id="_ref_7002"><a href="#sec-getvaluefrombuffer">GetValueFromBuffer</a></emu-xref>(<var>srcBuffer</var>, <var>srcByteIndex</var>, <code>"Uint8"</code>, <emu-val>true</emu-val>, <code>"Unordered"</code>).</li><li>Perform <emu-xref aoid="SetValueInBuffer" id="_ref_7003"><a href="#sec-setvalueinbuffer">SetValueInBuffer</a></emu-xref>(<var>targetBuffer</var>, <var>targetByteIndex</var>, <code>"Uint8"</code>, <var>value</var>, <emu-val>true</emu-val>, <code>"Unordered"</code>).</li><li>Increase <var>srcByteIndex</var> by 1.</li><li>Increase <var>targetByteIndex</var> by 1.</li></ol></li></ol></li><li>Else,<ol><li>Repeat, while <var>targetByteIndex</var> &lt; <var>limit</var><ol><li>Let <var>value</var> be <emu-xref aoid="GetValueFromBuffer" id="_ref_7004"><a href="#sec-getvaluefrombuffer">GetValueFromBuffer</a></emu-xref>(<var>srcBuffer</var>, <var>srcByteIndex</var>, <var>srcType</var>, <emu-val>true</emu-val>, <code>"Unordered"</code>).</li><li>Perform <emu-xref aoid="SetValueInBuffer" id="_ref_7005"><a href="#sec-setvalueinbuffer">SetValueInBuffer</a></emu-xref>(<var>targetBuffer</var>, <var>targetByteIndex</var>, <var>targetType</var>, <var>value</var>, <emu-val>true</emu-val>, <code>"Unordered"</code>).</li><li>Set <var>srcByteIndex</var> to <var>srcByteIndex</var> + <var>srcElementSize</var>.</li><li>Set <var>targetByteIndex</var> to <var>targetByteIndex</var> + <var>targetElementSize</var>.</li></ol></li></ol></li><li>Return <emu-val>undefined</emu-val>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-%typedarray%.prototype.slice">
<h1><span class="secnum">22.2.3.24</span>%TypedArray%.prototype.slice ( <var>start</var>, <var>end</var> )</h1>
<p>The interpretation and use of the arguments of <emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_7006"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref><code>.prototype.slice</code> are the same as for <code>Array.prototype.slice</code> as defined in <emu-xref href="#sec-array.prototype.slice" id="_ref_618"><a href="#sec-array.prototype.slice">22.1.3.25</a></emu-xref>. The following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li>Perform ?&nbsp;<emu-xref aoid="ValidateTypedArray" id="_ref_7007"><a href="#sec-validatetypedarray">ValidateTypedArray</a></emu-xref>(<var>O</var>).</li><li>Let <var>len</var> be <var>O</var>.[[ArrayLength]].</li><li>Let <var>relativeStart</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_7008"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>start</var>).</li><li>If <var>relativeStart</var> &lt; 0, let <var>k</var> be <emu-xref aoid="max" id="_ref_7009"><a href="#eqn-max">max</a></emu-xref>((<var>len</var> + <var>relativeStart</var>), 0); else let <var>k</var> be <emu-xref aoid="min" id="_ref_7010"><a href="#eqn-min">min</a></emu-xref>(<var>relativeStart</var>, <var>len</var>).</li><li>If <var>end</var> is <emu-val>undefined</emu-val>, let <var>relativeEnd</var> be <var>len</var>; else let <var>relativeEnd</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_7011"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>end</var>).</li><li>If <var>relativeEnd</var> &lt; 0, let <var>final</var> be <emu-xref aoid="max" id="_ref_7012"><a href="#eqn-max">max</a></emu-xref>((<var>len</var> + <var>relativeEnd</var>), 0); else let <var>final</var> be <emu-xref aoid="min" id="_ref_7013"><a href="#eqn-min">min</a></emu-xref>(<var>relativeEnd</var>, <var>len</var>).</li><li>Let <var>count</var> be <emu-xref aoid="max" id="_ref_7014"><a href="#eqn-max">max</a></emu-xref>(<var>final</var> - <var>k</var>, 0).</li><li>Let <var>A</var> be ?&nbsp;<emu-xref aoid="TypedArraySpeciesCreate" id="_ref_7015"><a href="#typedarray-species-create">TypedArraySpeciesCreate</a></emu-xref>(<var>O</var>, « <var>count</var> »).</li><li>Let <var>srcName</var> be the String value of <var>O</var>.[[TypedArrayName]].</li><li>Let <var>srcType</var> be the String value of the Element Type value in <emu-xref href="#table-49" id="_ref_619"><a href="#table-49">Table 59</a></emu-xref> for <var>srcName</var>.</li><li>Let <var>targetName</var> be the String value of <var>A</var>.[[TypedArrayName]].</li><li>Let <var>targetType</var> be the String value of the Element Type value in <emu-xref href="#table-49" id="_ref_620"><a href="#table-49">Table 59</a></emu-xref> for <var>targetName</var>.</li><li>If <emu-xref aoid="SameValue" id="_ref_7016"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>srcType</var>, <var>targetType</var>) is <emu-val>false</emu-val>, then<ol><li>Let <var>n</var> be 0.</li><li>Repeat, while <var>k</var> &lt; <var>final</var><ol><li>Let <var>Pk</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_7017"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>).</li><li>Let <var>kValue</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_7018"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <var>Pk</var>).</li><li>Perform !&nbsp;<emu-xref aoid="Set" id="_ref_7019"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>A</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_7020"><a href="#sec-tostring">ToString</a></emu-xref>(<var>n</var>), <var>kValue</var>, <emu-val>true</emu-val>).</li><li>Increase <var>k</var> by 1.</li><li>Increase <var>n</var> by 1.</li></ol></li></ol></li><li>Else if <var>count</var> &gt; 0, then<ol><li>Let <var>srcBuffer</var> be <var>O</var>.[[ViewedArrayBuffer]].</li><li>If <emu-xref aoid="IsDetachedBuffer" id="_ref_7021"><a href="#sec-isdetachedbuffer">IsDetachedBuffer</a></emu-xref>(<var>srcBuffer</var>) is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>targetBuffer</var> be <var>A</var>.[[ViewedArrayBuffer]].</li><li>Let <var>elementSize</var> be the Number value of the Element Size value specified in <emu-xref href="#table-49" id="_ref_621"><a href="#table-49">Table 59</a></emu-xref> for <var>srcType</var>.</li><li>NOTE: If <var>srcType</var> and <var>targetType</var> are the same, the transfer must be performed in a manner that preserves the bit-level encoding of the source data.</li><li>Let <var>srcByteOffet</var> be <var>O</var>.[[ByteOffset]].</li><li>Let <var>targetByteIndex</var> be <var>A</var>.[[ByteOffset]].</li><li>Let <var>srcByteIndex</var> be (<var>k</var> × <var>elementSize</var>) + <var>srcByteOffet</var>.</li><li>Let <var>limit</var> be <var>targetByteIndex</var> + <var>count</var> × <var>elementSize</var>.</li><li>Repeat, while <var>targetByteIndex</var> &lt; <var>limit</var><ol><li>Let <var>value</var> be <emu-xref aoid="GetValueFromBuffer" id="_ref_7022"><a href="#sec-getvaluefrombuffer">GetValueFromBuffer</a></emu-xref>(<var>srcBuffer</var>, <var>srcByteIndex</var>, <code>"Uint8"</code>, <emu-val>true</emu-val>, <code>"Unordered"</code>).</li><li>Perform <emu-xref aoid="SetValueInBuffer" id="_ref_7023"><a href="#sec-setvalueinbuffer">SetValueInBuffer</a></emu-xref>(<var>targetBuffer</var>, <var>targetByteIndex</var>, <code>"Uint8"</code>, <var>value</var>, <emu-val>true</emu-val>, <code>"Unordered"</code>).</li><li>Increase <var>srcByteIndex</var> by 1.</li><li>Increase <var>targetByteIndex</var> by 1.</li></ol></li></ol></li><li>Return <var>A</var>.
</li></ol></emu-alg>
<p>This function is not generic. The <emu-val>this</emu-val> value must be an object with a [[TypedArrayName]] internal slot.</p>
</emu-clause>
<emu-clause id="sec-%typedarray%.prototype.some">
<h1><span class="secnum">22.2.3.25</span>%TypedArray%.prototype.some ( <var>callbackfn</var> [ , <var>thisArg</var> ] )</h1>
<p><emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_7024"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref><code>.prototype.some</code> is a distinct function that implements the same algorithm as <code>Array.prototype.some</code> as defined in <emu-xref href="#sec-array.prototype.some" id="_ref_622"><a href="#sec-array.prototype.some">22.1.3.26</a></emu-xref> except that the <emu-val>this</emu-val> object's [[ArrayLength]] internal slot is accessed in place of performing a [[Get]] of <code>"length"</code>. The implementation of the algorithm may be optimized with the knowledge that the <emu-val>this</emu-val> value is an object that has a fixed length and whose <emu-xref href="#integer-index" id="_ref_623"><a href="#integer-index">integer-indexed</a></emu-xref>
properties are not sparse. However, such optimization must not
introduce any observable changes in the specified behaviour of the
algorithm and must take into account the possibility that calls to <var>callbackfn</var> may cause the <emu-val>this</emu-val> value to become detached.</p>
<p>This function is not generic. <emu-xref aoid="ValidateTypedArray" id="_ref_7025"><a href="#sec-validatetypedarray">ValidateTypedArray</a></emu-xref> is applied to the <emu-val>this</emu-val> value prior to evaluating the algorithm. If its result is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_7026"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref> that exception is thrown instead of evaluating the algorithm.</p>
</emu-clause>
<emu-clause id="sec-%typedarray%.prototype.sort">
<h1><span class="secnum">22.2.3.26</span>%TypedArray%.prototype.sort ( <var>comparefn</var> )</h1>
<p><emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_7027"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref><code>.prototype.sort</code> is a distinct function that, except as described below, implements the same requirements as those of <code>Array.prototype.sort</code> as defined in <emu-xref href="#sec-array.prototype.sort" id="_ref_624"><a href="#sec-array.prototype.sort">22.1.3.27</a></emu-xref>. The implementation of the <emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_7028"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref><code>.prototype.sort</code> specification may be optimized with the knowledge that the <emu-val>this</emu-val> value is an object that has a fixed length and whose <emu-xref href="#integer-index" id="_ref_625"><a href="#integer-index">integer-indexed</a></emu-xref> properties are not sparse. The only internal methods of the <emu-val>this</emu-val> object that the algorithm may call are [[Get]] and [[Set]].</p>
<p>This function is not generic. The <emu-val>this</emu-val> value must be an object with a [[TypedArrayName]] internal slot.</p>
<p>Upon entry, the following steps are performed to initialize evaluation of the <code>sort</code> function. These steps are used instead of the entry steps in <emu-xref href="#sec-array.prototype.sort" id="_ref_626"><a href="#sec-array.prototype.sort">22.1.3.27</a></emu-xref>:</p>
<emu-alg><ol><li>If <var>comparefn</var> is not <emu-val>undefined</emu-val> and <emu-xref aoid="IsCallable" id="_ref_7029"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>comparefn</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>obj</var> be the <emu-val>this</emu-val> value.</li><li>Let <var>buffer</var> be ?&nbsp;<emu-xref aoid="ValidateTypedArray" id="_ref_7030"><a href="#sec-validatetypedarray">ValidateTypedArray</a></emu-xref>(<var>obj</var>).</li><li>Let <var>len</var> be <var>obj</var>.[[ArrayLength]].
</li></ol></emu-alg>
<p>The implementation-defined sort order condition for exotic objects is not applied by <emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_7031"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref><code>.prototype.sort</code>.</p>
<p>The following version of <emu-xref aoid="SortCompare" id="_ref_7032"><a href="#sec-sortcompare">SortCompare</a></emu-xref> is used by <emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_7033"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref><code>.prototype.sort</code>. It performs a numeric comparison rather than the string comparison used in <emu-xref href="#sec-array.prototype.sort" id="_ref_627"><a href="#sec-array.prototype.sort">22.1.3.27</a></emu-xref>. <emu-xref aoid="SortCompare" id="_ref_7034"><a href="#sec-sortcompare">SortCompare</a></emu-xref> has access to the <var>comparefn</var> and <var>buffer</var> values of the current invocation of the <code>sort</code> method.</p>
<p>When the TypedArray <emu-xref aoid="SortCompare" id="_ref_7035"><a href="#sec-sortcompare">SortCompare</a></emu-xref> abstract operation is called with two arguments <var>x</var> and <var>y</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_7036"><a href="#assert">Assert</a></emu-xref>: Both <emu-xref aoid="Type" id="_ref_7037"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>x</var>) and <emu-xref aoid="Type" id="_ref_7038"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>y</var>) is Number.</li><li>If <var>comparefn</var> is not <emu-val>undefined</emu-val>, then<ol><li>Let <var>v</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_7039"><a href="#sec-tonumber">ToNumber</a></emu-xref>(? <emu-xref aoid="Call" id="_ref_7040"><a href="#sec-call">Call</a></emu-xref>(<var>comparefn</var>, <emu-val>undefined</emu-val>, « <var>x</var>, <var>y</var> »)).</li><li>If <emu-xref aoid="IsDetachedBuffer" id="_ref_7041"><a href="#sec-isdetachedbuffer">IsDetachedBuffer</a></emu-xref>(<var>buffer</var>) is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>v</var> is <emu-val>NaN</emu-val>, return <emu-val>+0</emu-val>.</li><li>Return <var>v</var>.</li></ol></li><li>If <var>x</var> and <var>y</var> are both <emu-val>NaN</emu-val>, return <emu-val>+0</emu-val>.</li><li>If <var>x</var> is <emu-val>NaN</emu-val>, return 1.</li><li>If <var>y</var> is <emu-val>NaN</emu-val>, return -1.</li><li>If <var>x</var> &lt; <var>y</var>, return -1.</li><li>If <var>x</var> &gt; <var>y</var>, return 1.</li><li>If <var>x</var> is <emu-val>-0</emu-val> and <var>y</var> is <emu-val>+0</emu-val>, return -1.</li><li>If <var>x</var> is <emu-val>+0</emu-val> and <var>y</var> is <emu-val>-0</emu-val>, return 1.</li><li>Return <emu-val>+0</emu-val>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Because <emu-val>NaN</emu-val> always compares greater than any other value, <emu-val>NaN</emu-val> property values always sort to the end of the result when <var>comparefn</var> is not provided.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-%typedarray%.prototype.subarray">
<h1><span class="secnum">22.2.3.27</span>%TypedArray%.prototype.subarray ( <var>begin</var>, <var>end</var> )</h1>
<p>Returns a new <var>TypedArray</var> object whose element type is the same as this <var>TypedArray</var> and whose ArrayBuffer is the same as the ArrayBuffer of this <var>TypedArray</var>, referencing the elements at <var>begin</var>, inclusive, up to <var>end</var>, exclusive. If either <var>begin</var> or <var>end</var> is negative, it refers to an index from the end of the array, as opposed to from the beginning.</p>
<emu-alg><ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_7042"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>O</var> does not have a [[TypedArrayName]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li><emu-xref href="#assert" id="_ref_7043"><a href="#assert">Assert</a></emu-xref>: <var>O</var> has a [[ViewedArrayBuffer]] internal slot.</li><li>Let <var>buffer</var> be <var>O</var>.[[ViewedArrayBuffer]].</li><li>Let <var>srcLength</var> be <var>O</var>.[[ArrayLength]].</li><li>Let <var>relativeBegin</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_7044"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>begin</var>).</li><li>If <var>relativeBegin</var> &lt; 0, let <var>beginIndex</var> be <emu-xref aoid="max" id="_ref_7045"><a href="#eqn-max">max</a></emu-xref>((<var>srcLength</var> + <var>relativeBegin</var>), 0); else let <var>beginIndex</var> be <emu-xref aoid="min" id="_ref_7046"><a href="#eqn-min">min</a></emu-xref>(<var>relativeBegin</var>, <var>srcLength</var>).</li><li>If <var>end</var> is <emu-val>undefined</emu-val>, let <var>relativeEnd</var> be <var>srcLength</var>; else, let <var>relativeEnd</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_7047"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>end</var>).</li><li>If <var>relativeEnd</var> &lt; 0, let <var>endIndex</var> be <emu-xref aoid="max" id="_ref_7048"><a href="#eqn-max">max</a></emu-xref>((<var>srcLength</var> + <var>relativeEnd</var>), 0); else let <var>endIndex</var> be <emu-xref aoid="min" id="_ref_7049"><a href="#eqn-min">min</a></emu-xref>(<var>relativeEnd</var>, <var>srcLength</var>).</li><li>Let <var>newLength</var> be <emu-xref aoid="max" id="_ref_7050"><a href="#eqn-max">max</a></emu-xref>(<var>endIndex</var> - <var>beginIndex</var>, 0).</li><li>Let <var>constructorName</var> be the String value of <var>O</var>.[[TypedArrayName]].</li><li>Let <var>elementSize</var> be the Number value of the Element Size value specified in <emu-xref href="#table-49" id="_ref_628"><a href="#table-49">Table 59</a></emu-xref> for <var>constructorName</var>.</li><li>Let <var>srcByteOffset</var> be <var>O</var>.[[ByteOffset]].</li><li>Let <var>beginByteOffset</var> be <var>srcByteOffset</var> + <var>beginIndex</var> × <var>elementSize</var>.</li><li>Let <var>argumentsList</var> be « <var>buffer</var>, <var>beginByteOffset</var>, <var>newLength</var> ».</li><li>Return ?&nbsp;<emu-xref aoid="TypedArraySpeciesCreate" id="_ref_7051"><a href="#typedarray-species-create">TypedArraySpeciesCreate</a></emu-xref>(<var>O</var>, <var>argumentsList</var>).
</li></ol></emu-alg>
<p>This function is not generic. The <emu-val>this</emu-val> value must be an object with a [[TypedArrayName]] internal slot.</p>
</emu-clause>
<emu-clause id="sec-%typedarray%.prototype.tolocalestring">
<h1><span class="secnum">22.2.3.28</span>%TypedArray%.prototype.toLocaleString ( [ <var>reserved1</var> [ , <var>reserved2</var> ] ] )</h1>
<p><emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_7052"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref><code>.prototype.toLocaleString</code> is a distinct function that implements the same algorithm as <code>Array.prototype.toLocaleString</code> as defined in <emu-xref href="#sec-array.prototype.tolocalestring" id="_ref_629"><a href="#sec-array.prototype.tolocalestring">22.1.3.29</a></emu-xref> except that the <emu-val>this</emu-val> object's [[ArrayLength]] internal slot is accessed in place of performing a [[Get]] of <code>"length"</code>. The implementation of the algorithm may be optimized with the knowledge that the <emu-val>this</emu-val> value is an object that has a fixed length and whose <emu-xref href="#integer-index" id="_ref_630"><a href="#integer-index">integer-indexed</a></emu-xref>
properties are not sparse. However, such optimization must not
introduce any observable changes in the specified behaviour of the
algorithm.</p>
<p>This function is not generic. <emu-xref aoid="ValidateTypedArray" id="_ref_7053"><a href="#sec-validatetypedarray">ValidateTypedArray</a></emu-xref> is applied to the <emu-val>this</emu-val> value prior to evaluating the algorithm. If its result is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_7054"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref> that exception is thrown instead of evaluating the algorithm.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>If the ECMAScript implementation includes the ECMA-402 Internationalization API this function is based upon the algorithm for <code>Array.prototype.toLocaleString</code> that is in the ECMA-402 specification.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-%typedarray%.prototype.tostring">
<h1><span class="secnum">22.2.3.29</span>%TypedArray%.prototype.toString ( )</h1>
<p>The initial value of the <emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_7055"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref><code>.prototype.toString</code> <emu-xref href="#sec-object-type" id="_ref_7056"><a href="#sec-object-type">data property</a></emu-xref> is the same built-in <emu-xref href="#function-object" id="_ref_7057"><a href="#function-object">function object</a></emu-xref> as the <code>Array.prototype.toString</code> method defined in <emu-xref href="#sec-array.prototype.tostring" id="_ref_631"><a href="#sec-array.prototype.tostring">22.1.3.30</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-%typedarray%.prototype.values">
<h1><span class="secnum">22.2.3.30</span>%TypedArray%.prototype.values ( )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li>Perform ?&nbsp;<emu-xref aoid="ValidateTypedArray" id="_ref_7058"><a href="#sec-validatetypedarray">ValidateTypedArray</a></emu-xref>(<var>O</var>).</li><li>Return <emu-xref aoid="CreateArrayIterator" id="_ref_7059"><a href="#sec-createarrayiterator">CreateArrayIterator</a></emu-xref>(<var>O</var>, <code>"value"</code>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-%typedarray%.prototype-@@iterator">
<h1><span class="secnum">22.2.3.31</span>%TypedArray%.prototype [ @@iterator ] ( )</h1>
<p>The initial value of the @@iterator property is the same <emu-xref href="#function-object" id="_ref_7060"><a href="#function-object">function object</a></emu-xref> as the initial value of the <emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_7061"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref><code>.prototype.values</code> property.</p>
</emu-clause>
<emu-clause id="sec-get-%typedarray%.prototype-@@tostringtag">
<h1><span class="secnum">22.2.3.32</span>get %TypedArray%.prototype [ @@toStringTag ]</h1>
<p><emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_7062"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref><code>.prototype[@@toStringTag]</code> is an <emu-xref href="#sec-object-type" id="_ref_7063"><a href="#sec-object-type">accessor property</a></emu-xref> whose set accessor function is <emu-val>undefined</emu-val>. Its get accessor function performs the following steps:</p>
<emu-alg><ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_7064"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, return <emu-val>undefined</emu-val>.</li><li>If <var>O</var> does not have a [[TypedArrayName]] internal slot, return <emu-val>undefined</emu-val>.</li><li>Let <var>name</var> be <var>O</var>.[[TypedArrayName]].</li><li><emu-xref href="#assert" id="_ref_7065"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_7066"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>name</var>) is String.</li><li>Return <var>name</var>.
</li></ol></emu-alg>
<p>This property has the attributes { [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
<p>The initial value of the <code>name</code> property of this function is <code>"get [Symbol.toStringTag]"</code>.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-typedarray-constructors">
<h1><span class="secnum">22.2.4</span>The <var>TypedArray</var> Constructors</h1>
<p>Each <var>TypedArray</var> <emu-xref href="#constructor" id="_ref_7067"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>is an intrinsic object that has the structure described below, differing only in the name used as the <emu-xref href="#constructor" id="_ref_7068"><a href="#constructor">constructor</a></emu-xref> name instead of <var>TypedArray</var>, in <emu-xref href="#table-49" id="_ref_632"><a href="#table-49">Table 59</a></emu-xref>.</li>
<li>is a single function whose behaviour is overloaded based
upon the number and types of its arguments. The actual behaviour of a
call of <var>TypedArray</var> depends upon the number and kind of arguments that are passed to it.</li>
<li>is not intended to be called as a function and will throw an exception when called in that manner.</li>
<li>is designed to be subclassable. It may be used as the value of an <code>extends</code> clause of a class definition. Subclass constructors that intend to inherit the specified <var>TypedArray</var> behaviour must include a <code>super</code> call to the <var>TypedArray</var> <emu-xref href="#constructor" id="_ref_7069"><a href="#constructor">constructor</a></emu-xref> to create and initialize the subclass instance with the internal state necessary to support the <emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_7070"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref><code>.prototype</code> built-in methods.</li>
<li>has a <code>"length"</code> property whose value is 3.</li>
</ul>
<emu-clause id="sec-typedarray">
<h1><span class="secnum">22.2.4.1</span><var>TypedArray</var> ( )</h1>
<p>This description applies only if the <var>TypedArray</var> function is called with no arguments.</p>
<emu-alg><ol><li>If NewTarget is <emu-val>undefined</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>constructorName</var> be the String value of the <emu-xref href="#constructor" id="_ref_7071"><a href="#constructor">Constructor</a></emu-xref> Name value specified in <emu-xref href="#table-49" id="_ref_633"><a href="#table-49">Table 59</a></emu-xref> for this <var>TypedArray</var> <emu-xref href="#constructor" id="_ref_7072"><a href="#constructor">constructor</a></emu-xref>.</li><li>Return ?&nbsp;<emu-xref aoid="AllocateTypedArray" id="_ref_7073"><a href="#sec-allocatetypedarray">AllocateTypedArray</a></emu-xref>(<var>constructorName</var>, NewTarget, <code>"%<var>TypedArray</var>Prototype%"</code>, 0).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-typedarray-length">
<h1><span class="secnum">22.2.4.2</span><var>TypedArray</var> ( <var>length</var> )</h1>
<p>This description applies only if the <var>TypedArray</var> function is called with at least one argument and the Type of the first argument is not Object.</p>
<p><var>TypedArray</var> called with argument <var>length</var> performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_7074"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_7075"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>length</var>) is not Object.</li><li>If NewTarget is <emu-val>undefined</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>elementLength</var> be ?&nbsp;<emu-xref aoid="ToIndex" id="_ref_7076"><a href="#sec-toindex">ToIndex</a></emu-xref>(<var>length</var>).</li><li>Let <var>constructorName</var> be the String value of the <emu-xref href="#constructor" id="_ref_7077"><a href="#constructor">Constructor</a></emu-xref> Name value specified in <emu-xref href="#table-49" id="_ref_634"><a href="#table-49">Table 59</a></emu-xref> for this <var>TypedArray</var> <emu-xref href="#constructor" id="_ref_7078"><a href="#constructor">constructor</a></emu-xref>.</li><li>Return ?&nbsp;<emu-xref aoid="AllocateTypedArray" id="_ref_7079"><a href="#sec-allocatetypedarray">AllocateTypedArray</a></emu-xref>(<var>constructorName</var>, NewTarget, <code>"%<var>TypedArray</var>Prototype%"</code>, <var>elementLength</var>).
</li></ol></emu-alg>
<emu-clause id="sec-allocatetypedarray" aoid="AllocateTypedArray">
<h1><span class="secnum">22.2.4.2.1</span>Runtime Semantics: AllocateTypedArray ( <var>constructorName</var>, <var>newTarget</var>, <var>defaultProto</var> [ , <var>length</var> ] )</h1>
<p>The abstract operation AllocateTypedArray with arguments <var>constructorName</var>, <var>newTarget</var>, <var>defaultProto</var> and optional argument <var>length</var> is used to validate and create an instance of a TypedArray <emu-xref href="#constructor" id="_ref_7080"><a href="#constructor">constructor</a></emu-xref>. <var>constructorName</var> is required to be the name of a TypedArray <emu-xref href="#constructor" id="_ref_7081"><a href="#constructor">constructor</a></emu-xref> in <emu-xref href="#table-49" id="_ref_635"><a href="#table-49">Table 59</a></emu-xref>. If the <var>length</var>
argument is passed, an ArrayBuffer of that length is also allocated and
associated with the new TypedArray instance. AllocateTypedArray
provides common semantics that is used by all of the <var>TypedArray</var> overloads. AllocateTypedArray performs the following steps:</p>
<emu-alg><ol><li>Let <var>proto</var> be ?&nbsp;<emu-xref aoid="GetPrototypeFromConstructor" id="_ref_7082"><a href="#sec-getprototypefromconstructor">GetPrototypeFromConstructor</a></emu-xref>(<var>newTarget</var>, <var>defaultProto</var>).</li><li>Let <var>obj</var> be <emu-xref aoid="IntegerIndexedObjectCreate" id="_ref_7083"><a href="#sec-integerindexedobjectcreate">IntegerIndexedObjectCreate</a></emu-xref>(<var>proto</var>, « [[ViewedArrayBuffer]], [[TypedArrayName]], [[ByteLength]], [[ByteOffset]], [[ArrayLength]] »).</li><li><emu-xref href="#assert" id="_ref_7084"><a href="#assert">Assert</a></emu-xref>: <var>obj</var>.[[ViewedArrayBuffer]] is <emu-val>undefined</emu-val>.</li><li>Set <var>obj</var>.[[TypedArrayName]] to <var>constructorName</var>.</li><li>If <var>length</var> is not present, then<ol><li>Set <var>obj</var>.[[ByteLength]] to 0.</li><li>Set <var>obj</var>.[[ByteOffset]] to 0.</li><li>Set <var>obj</var>.[[ArrayLength]] to 0.</li></ol></li><li>Else,<ol><li>Perform ?&nbsp;<emu-xref aoid="AllocateTypedArrayBuffer" id="_ref_7085"><a href="#sec-allocatetypedarraybuffer">AllocateTypedArrayBuffer</a></emu-xref>(<var>obj</var>, <var>length</var>).</li></ol></li><li>Return <var>obj</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-allocatetypedarraybuffer" aoid="AllocateTypedArrayBuffer">
<h1><span class="secnum">22.2.4.2.2</span>Runtime Semantics: AllocateTypedArrayBuffer ( <var>O</var>, <var>length</var> )</h1>
<p>The abstract operation AllocateTypedArrayBuffer with arguments <var>O</var> and <var>length</var> allocates and associates an ArrayBuffer with the TypedArray instance <var>O</var>. It performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_7086"><a href="#assert">Assert</a></emu-xref>: <var>O</var> is an Object that has a [[ViewedArrayBuffer]] internal slot.</li><li><emu-xref href="#assert" id="_ref_7087"><a href="#assert">Assert</a></emu-xref>: <var>O</var>.[[ViewedArrayBuffer]] is <emu-val>undefined</emu-val>.</li><li><emu-xref href="#assert" id="_ref_7088"><a href="#assert">Assert</a></emu-xref>: <var>length</var> ≥ 0.</li><li>Let <var>constructorName</var> be the String value of <var>O</var>.[[TypedArrayName]].</li><li>Let <var>elementSize</var> be the Element Size value in <emu-xref href="#table-49" id="_ref_636"><a href="#table-49">Table 59</a></emu-xref> for <var>constructorName</var>.</li><li>Let <var>byteLength</var> be <var>elementSize</var> × <var>length</var>.</li><li>Let <var>data</var> be ?&nbsp;<emu-xref aoid="AllocateArrayBuffer" id="_ref_7089"><a href="#sec-allocatearraybuffer">AllocateArrayBuffer</a></emu-xref>(<emu-xref href="#sec-arraybuffer-constructor" id="_ref_7090"><a href="#sec-arraybuffer-constructor">%ArrayBuffer%</a></emu-xref>, <var>byteLength</var>).</li><li>Set <var>O</var>.[[ViewedArrayBuffer]] to <var>data</var>.</li><li>Set <var>O</var>.[[ByteLength]] to <var>byteLength</var>.</li><li>Set <var>O</var>.[[ByteOffset]] to 0.</li><li>Set <var>O</var>.[[ArrayLength]] to <var>length</var>.</li><li>Return <var>O</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-typedarray-typedarray">
<h1><span class="secnum">22.2.4.3</span><var>TypedArray</var> ( <var>typedArray</var> )</h1>
<p>This description applies only if the <var>TypedArray</var>
function is called with at least one argument and the Type of the first
argument is Object and that object has a [[TypedArrayName]] internal
slot.</p>
<p><var>TypedArray</var> called with argument <var>typedArray</var> performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_7091"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_7092"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>typedArray</var>) is Object and <var>typedArray</var> has a [[TypedArrayName]] internal slot.</li><li>If NewTarget is <emu-val>undefined</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>constructorName</var> be the String value of the <emu-xref href="#constructor" id="_ref_7093"><a href="#constructor">Constructor</a></emu-xref> Name value specified in <emu-xref href="#table-49" id="_ref_637"><a href="#table-49">Table 59</a></emu-xref> for this <var>TypedArray</var> <emu-xref href="#constructor" id="_ref_7094"><a href="#constructor">constructor</a></emu-xref>.</li><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="AllocateTypedArray" id="_ref_7095"><a href="#sec-allocatetypedarray">AllocateTypedArray</a></emu-xref>(<var>constructorName</var>, NewTarget, <code>"%<var>TypedArray</var>Prototype%"</code>).</li><li>Let <var>srcArray</var> be <var>typedArray</var>.</li><li>Let <var>srcData</var> be <var>srcArray</var>.[[ViewedArrayBuffer]].</li><li>If <emu-xref aoid="IsDetachedBuffer" id="_ref_7096"><a href="#sec-isdetachedbuffer">IsDetachedBuffer</a></emu-xref>(<var>srcData</var>) is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>elementType</var> be the String value of the Element Type value in <emu-xref href="#table-49" id="_ref_638"><a href="#table-49">Table 59</a></emu-xref> for <var>constructorName</var>.</li><li>Let <var>elementLength</var> be <var>srcArray</var>.[[ArrayLength]].</li><li>Let <var>srcName</var> be the String value of <var>srcArray</var>.[[TypedArrayName]].</li><li>Let <var>srcType</var> be the String value of the Element Type value in <emu-xref href="#table-49" id="_ref_639"><a href="#table-49">Table 59</a></emu-xref> for <var>srcName</var>.</li><li>Let <var>srcElementSize</var> be the Element Size value in <emu-xref href="#table-49" id="_ref_640"><a href="#table-49">Table 59</a></emu-xref> for <var>srcName</var>.</li><li>Let <var>srcByteOffset</var> be <var>srcArray</var>.[[ByteOffset]].</li><li>Let <var>elementSize</var> be the Element Size value in <emu-xref href="#table-49" id="_ref_641"><a href="#table-49">Table 59</a></emu-xref> for <var>constructorName</var>.</li><li>Let <var>byteLength</var> be <var>elementSize</var> × <var>elementLength</var>.</li><li>If <emu-xref aoid="IsSharedArrayBuffer" id="_ref_7097"><a href="#sec-issharedarraybuffer">IsSharedArrayBuffer</a></emu-xref>(<var>srcData</var>) is <emu-val>false</emu-val>, then<ol><li>Let <var>bufferConstructor</var> be ?&nbsp;<emu-xref aoid="SpeciesConstructor" id="_ref_7098"><a href="#sec-speciesconstructor">SpeciesConstructor</a></emu-xref>(<var>srcData</var>, <emu-xref href="#sec-arraybuffer-constructor" id="_ref_7099"><a href="#sec-arraybuffer-constructor">%ArrayBuffer%</a></emu-xref>).</li></ol></li><li>Else,<ol><li>Let <var>bufferConstructor</var> be <emu-xref href="#sec-arraybuffer-constructor" id="_ref_7100"><a href="#sec-arraybuffer-constructor">%ArrayBuffer%</a></emu-xref>.</li></ol></li><li>If <emu-xref aoid="SameValue" id="_ref_7101"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>elementType</var>, <var>srcType</var>) is <emu-val>true</emu-val>, then<ol><li>Let <var>data</var> be ?&nbsp;<emu-xref aoid="CloneArrayBuffer" id="_ref_7102"><a href="#sec-clonearraybuffer">CloneArrayBuffer</a></emu-xref>(<var>srcData</var>, <var>srcByteOffset</var>, <var>byteLength</var>, <var>bufferConstructor</var>).</li></ol></li><li>Else,<ol><li>Let <var>data</var> be ?&nbsp;<emu-xref aoid="AllocateArrayBuffer" id="_ref_7103"><a href="#sec-allocatearraybuffer">AllocateArrayBuffer</a></emu-xref>(<var>bufferConstructor</var>, <var>byteLength</var>).</li><li>If <emu-xref aoid="IsDetachedBuffer" id="_ref_7104"><a href="#sec-isdetachedbuffer">IsDetachedBuffer</a></emu-xref>(<var>srcData</var>) is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>srcByteIndex</var> be <var>srcByteOffset</var>.</li><li>Let <var>targetByteIndex</var> be 0.</li><li>Let <var>count</var> be <var>elementLength</var>.</li><li>Repeat, while <var>count</var> &gt; 0<ol><li>Let <var>value</var> be <emu-xref aoid="GetValueFromBuffer" id="_ref_7105"><a href="#sec-getvaluefrombuffer">GetValueFromBuffer</a></emu-xref>(<var>srcData</var>, <var>srcByteIndex</var>, <var>srcType</var>, <emu-val>true</emu-val>, <code>"Unordered"</code>).</li><li>Perform <emu-xref aoid="SetValueInBuffer" id="_ref_7106"><a href="#sec-setvalueinbuffer">SetValueInBuffer</a></emu-xref>(<var>data</var>, <var>targetByteIndex</var>, <var>elementType</var>, <var>value</var>, <emu-val>true</emu-val>, <code>"Unordered"</code>).</li><li>Set <var>srcByteIndex</var> to <var>srcByteIndex</var> + <var>srcElementSize</var>.</li><li>Set <var>targetByteIndex</var> to <var>targetByteIndex</var> + <var>elementSize</var>.</li><li>Decrement <var>count</var> by 1.</li></ol></li></ol></li><li>Set <var>O</var>.[[ViewedArrayBuffer]] to <var>data</var>.</li><li>Set <var>O</var>.[[ByteLength]] to <var>byteLength</var>.</li><li>Set <var>O</var>.[[ByteOffset]] to 0.</li><li>Set <var>O</var>.[[ArrayLength]] to <var>elementLength</var>.</li><li>Return <var>O</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-typedarray-object">
<h1><span class="secnum">22.2.4.4</span><var>TypedArray</var> ( <var>object</var> )</h1>
<p>This description applies only if the <var>TypedArray</var>
function is called with at least one argument and the Type of the first
argument is Object and that object does not have either a
[[TypedArrayName]] or an [[ArrayBufferData]] internal slot.</p>
<p><var>TypedArray</var> called with argument <var>object</var> performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_7107"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_7108"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>object</var>) is Object and <var>object</var> does not have either a [[TypedArrayName]] or an [[ArrayBufferData]] internal slot.</li><li>If NewTarget is <emu-val>undefined</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>constructorName</var> be the String value of the <emu-xref href="#constructor" id="_ref_7109"><a href="#constructor">Constructor</a></emu-xref> Name value specified in <emu-xref href="#table-49" id="_ref_642"><a href="#table-49">Table 59</a></emu-xref> for this <var>TypedArray</var> <emu-xref href="#constructor" id="_ref_7110"><a href="#constructor">constructor</a></emu-xref>.</li><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="AllocateTypedArray" id="_ref_7111"><a href="#sec-allocatetypedarray">AllocateTypedArray</a></emu-xref>(<var>constructorName</var>, NewTarget, <code>"%<var>TypedArray</var>Prototype%"</code>).</li><li>Let <var>usingIterator</var> be ?&nbsp;<emu-xref aoid="GetMethod" id="_ref_7112"><a href="#sec-getmethod">GetMethod</a></emu-xref>(<var>object</var>, @@iterator).</li><li>If <var>usingIterator</var> is not <emu-val>undefined</emu-val>, then<ol><li>Let <var>values</var> be ?&nbsp;<emu-xref aoid="IterableToList" id="_ref_7113"><a href="#sec-iterabletolist">IterableToList</a></emu-xref>(<var>object</var>, <var>usingIterator</var>).</li><li>Let <var>len</var> be the number of elements in <var>values</var>.</li><li>Perform ?&nbsp;<emu-xref aoid="AllocateTypedArrayBuffer" id="_ref_7114"><a href="#sec-allocatetypedarraybuffer">AllocateTypedArrayBuffer</a></emu-xref>(<var>O</var>, <var>len</var>).</li><li>Let <var>k</var> be 0.</li><li>Repeat, while <var>k</var> &lt; <var>len</var><ol><li>Let <var>Pk</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_7115"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>).</li><li>Let <var>kValue</var> be the first element of <var>values</var> and remove that element from <var>values</var>.</li><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_7116"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>O</var>, <var>Pk</var>, <var>kValue</var>, <emu-val>true</emu-val>).</li><li>Increase <var>k</var> by 1.</li></ol></li><li><emu-xref href="#assert" id="_ref_7117"><a href="#assert">Assert</a></emu-xref>: <var>values</var> is now an empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7118"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Return <var>O</var>.</li></ol></li><li>NOTE: <var>object</var> is not an Iterable so assume it is already an array-like object.</li><li>Let <var>arrayLike</var> be <var>object</var>.</li><li>Let <var>len</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_7119"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_7120"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>arrayLike</var>, <code>"length"</code>)).</li><li>Perform ?&nbsp;<emu-xref aoid="AllocateTypedArrayBuffer" id="_ref_7121"><a href="#sec-allocatetypedarraybuffer">AllocateTypedArrayBuffer</a></emu-xref>(<var>O</var>, <var>len</var>).</li><li>Let <var>k</var> be 0.</li><li>Repeat, while <var>k</var> &lt; <var>len</var><ol><li>Let <var>Pk</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_7122"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>).</li><li>Let <var>kValue</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_7123"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>arrayLike</var>, <var>Pk</var>).</li><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_7124"><a href="#sec-set-o-p-v-throw">Set</a></emu-xref>(<var>O</var>, <var>Pk</var>, <var>kValue</var>, <emu-val>true</emu-val>).</li><li>Increase <var>k</var> by 1.</li></ol></li><li>Return <var>O</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-typedarray-buffer-byteoffset-length">
<h1><span class="secnum">22.2.4.5</span><var>TypedArray</var> ( <var>buffer</var> [ , <var>byteOffset</var> [ , <var>length</var> ] ] )</h1>
<p>This description applies only if the <var>TypedArray</var>
function is called with at least one argument and the Type of the first
argument is Object and that object has an [[ArrayBufferData]] internal
slot.</p>
<p><var>TypedArray</var> called with at least one argument <var>buffer</var> performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_7125"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_7126"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>buffer</var>) is Object and <var>buffer</var> has an [[ArrayBufferData]] internal slot.</li><li>If NewTarget is <emu-val>undefined</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>constructorName</var> be the String value of the <emu-xref href="#constructor" id="_ref_7127"><a href="#constructor">Constructor</a></emu-xref> Name value specified in <emu-xref href="#table-49" id="_ref_643"><a href="#table-49">Table 59</a></emu-xref> for this <var>TypedArray</var> <emu-xref href="#constructor" id="_ref_7128"><a href="#constructor">constructor</a></emu-xref>.</li><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="AllocateTypedArray" id="_ref_7129"><a href="#sec-allocatetypedarray">AllocateTypedArray</a></emu-xref>(<var>constructorName</var>, NewTarget, <code>"%<var>TypedArray</var>Prototype%"</code>).</li><li>Let <var>elementSize</var> be the Number value of the Element Size value in <emu-xref href="#table-49" id="_ref_644"><a href="#table-49">Table 59</a></emu-xref> for <var>constructorName</var>.</li><li>Let <var>offset</var> be ?&nbsp;<emu-xref aoid="ToIndex" id="_ref_7130"><a href="#sec-toindex">ToIndex</a></emu-xref>(<var>byteOffset</var>).</li><li>If <var>offset</var> <emu-xref aoid="modulo" id="_ref_7131"><a href="#eqn-modulo">modulo</a></emu-xref> <var>elementSize</var> ≠ 0, throw a <emu-val>RangeError</emu-val> exception.</li><li>If <var>length</var> is present and <var>length</var> is not <emu-val>undefined</emu-val>, then<ol><li>Let <var>newLength</var> be ?&nbsp;<emu-xref aoid="ToIndex" id="_ref_7132"><a href="#sec-toindex">ToIndex</a></emu-xref>(<var>length</var>).</li></ol></li><li>If <emu-xref aoid="IsDetachedBuffer" id="_ref_7133"><a href="#sec-isdetachedbuffer">IsDetachedBuffer</a></emu-xref>(<var>buffer</var>) is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>bufferByteLength</var> be <var>buffer</var>.[[ArrayBufferByteLength]].</li><li>If <var>length</var> is either not present or <emu-val>undefined</emu-val>, then<ol><li>If <var>bufferByteLength</var> <emu-xref aoid="modulo" id="_ref_7134"><a href="#eqn-modulo">modulo</a></emu-xref> <var>elementSize</var> ≠ 0, throw a <emu-val>RangeError</emu-val> exception.</li><li>Let <var>newByteLength</var> be <var>bufferByteLength</var> - <var>offset</var>.</li><li>If <var>newByteLength</var> &lt; 0, throw a <emu-val>RangeError</emu-val> exception.</li></ol></li><li>Else,<ol><li>Let <var>newByteLength</var> be <var>newLength</var> × <var>elementSize</var>.</li><li>If <var>offset</var> + <var>newByteLength</var> &gt; <var>bufferByteLength</var>, throw a <emu-val>RangeError</emu-val> exception.</li></ol></li><li>Set <var>O</var>.[[ViewedArrayBuffer]] to <var>buffer</var>.</li><li>Set <var>O</var>.[[ByteLength]] to <var>newByteLength</var>.</li><li>Set <var>O</var>.[[ByteOffset]] to <var>offset</var>.</li><li>Set <var>O</var>.[[ArrayLength]] to <var>newByteLength</var> / <var>elementSize</var>.</li><li>Return <var>O</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="typedarray-create" aoid="TypedArrayCreate">
<h1><span class="secnum">22.2.4.6</span>TypedArrayCreate ( <var>constructor</var>, <var>argumentList</var> )</h1>
<p>The abstract operation TypedArrayCreate with arguments <var>constructor</var> and <var>argumentList</var> is used to specify the creation of a new TypedArray object using a <emu-xref href="#constructor" id="_ref_7135"><a href="#constructor">constructor</a></emu-xref> function. It performs the following steps:</p>
<emu-alg><ol><li>Let <var>newTypedArray</var> be ?&nbsp;<emu-xref aoid="Construct" id="_ref_7136"><a href="#sec-construct">Construct</a></emu-xref>(<var>constructor</var>, <var>argumentList</var>).</li><li>Perform ?&nbsp;<emu-xref aoid="ValidateTypedArray" id="_ref_7137"><a href="#sec-validatetypedarray">ValidateTypedArray</a></emu-xref>(<var>newTypedArray</var>).</li><li>If <var>argumentList</var> is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7138"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of a single Number, then<ol><li>If <var>newTypedArray</var>.[[ArrayLength]] &lt; <var>argumentList</var>[0], throw a <emu-val>TypeError</emu-val> exception.</li></ol></li><li>Return <var>newTypedArray</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="typedarray-species-create" aoid="TypedArraySpeciesCreate">
<h1><span class="secnum">22.2.4.7</span>TypedArraySpeciesCreate ( <var>exemplar</var>, <var>argumentList</var> )</h1>
<p>The abstract operation TypedArraySpeciesCreate with arguments <var>exemplar</var> and <var>argumentList</var> is used to specify the creation of a new TypedArray object using a <emu-xref href="#constructor" id="_ref_7139"><a href="#constructor">constructor</a></emu-xref> function that is derived from <var>exemplar</var>. It performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_7140"><a href="#assert">Assert</a></emu-xref>: <var>exemplar</var> is an Object that has a [[TypedArrayName]] internal slot.</li><li>Let <var>defaultConstructor</var> be the intrinsic object listed in column one of <emu-xref href="#table-49" id="_ref_645"><a href="#table-49">Table 59</a></emu-xref> for <var>exemplar</var>.[[TypedArrayName]].</li><li>Let <var>constructor</var> be ?&nbsp;<emu-xref aoid="SpeciesConstructor" id="_ref_7141"><a href="#sec-speciesconstructor">SpeciesConstructor</a></emu-xref>(<var>exemplar</var>, <var>defaultConstructor</var>).</li><li>Return ?&nbsp;<emu-xref aoid="TypedArrayCreate" id="_ref_7142"><a href="#typedarray-create">TypedArrayCreate</a></emu-xref>(<var>constructor</var>, <var>argumentList</var>).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-typedarray-constructors">
<h1><span class="secnum">22.2.5</span>Properties of the <var>TypedArray</var> Constructors</h1>
<p>Each <var>TypedArray</var> <emu-xref href="#constructor" id="_ref_7143"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-%typedarray%-intrinsic-object" id="_ref_7144"><a href="#sec-%typedarray%-intrinsic-object">%TypedArray%</a></emu-xref>.</li>
<li>has a <code>name</code> property whose value is the String value of the <emu-xref href="#constructor" id="_ref_7145"><a href="#constructor">constructor</a></emu-xref> name specified for it in <emu-xref href="#table-49" id="_ref_646"><a href="#table-49">Table 59</a></emu-xref>.</li>
<li>has the following properties:</li>
</ul>
<emu-clause id="sec-typedarray.bytes_per_element">
<h1><span class="secnum">22.2.5.1</span><var>TypedArray</var>.BYTES_PER_ELEMENT</h1>
<p>The value of <var>TypedArray</var>.BYTES_PER_ELEMENT is the Number value of the Element Size value specified in <emu-xref href="#table-49" id="_ref_647"><a href="#table-49">Table 59</a></emu-xref> for <var>TypedArray</var>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-typedarray.prototype">
<h1><span class="secnum">22.2.5.2</span><var>TypedArray</var>.prototype</h1>
<p>The initial value of <var>TypedArray</var><code>.prototype</code> is the corresponding <var>TypedArray</var> prototype intrinsic object (<emu-xref href="#sec-properties-of-typedarray-prototype-objects" id="_ref_648"><a href="#sec-properties-of-typedarray-prototype-objects">22.2.6</a></emu-xref>).</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-typedarray-prototype-objects">
<h1><span class="secnum">22.2.6</span>Properties of the <var>TypedArray</var> Prototype Objects</h1>
<p>Each <var>TypedArray</var> prototype object:</p>
<ul>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-%typedarrayprototype%-object" id="_ref_7146"><a href="#sec-properties-of-the-%typedarrayprototype%-object">%TypedArrayPrototype%</a></emu-xref>.</li>
<li>is an ordinary object.</li>
<li>does not have a [[ViewedArrayBuffer]] or any other of the internal slots that are specific to <var>TypedArray</var> instance objects.</li>
</ul>
<emu-clause id="sec-typedarray.prototype.bytes_per_element">
<h1><span class="secnum">22.2.6.1</span><var>TypedArray</var>.prototype.BYTES_PER_ELEMENT</h1>
<p>The value of <code><var>TypedArray</var>.prototype.BYTES_PER_ELEMENT</code> is the Number value of the Element Size value specified in <emu-xref href="#table-49" id="_ref_649"><a href="#table-49">Table 59</a></emu-xref> for <var>TypedArray</var>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-typedarray.prototype.constructor">
<h1><span class="secnum">22.2.6.2</span><var>TypedArray</var>.prototype.constructor</h1>
<p>The initial value of a <code><var>TypedArray</var>.prototype.constructor</code> is the corresponding %<var>TypedArray</var>% intrinsic object.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-typedarray-instances">
<h1><span class="secnum">22.2.7</span>Properties of <var>TypedArray</var> Instances</h1>
<p><var>TypedArray</var> instances are <emu-xref href="#integer-indexed-exotic-object" id="_ref_650"><a href="#integer-indexed-exotic-object">Integer-Indexed exotic objects</a></emu-xref>. Each <var>TypedArray</var> instance inherits properties from the corresponding <var>TypedArray</var> prototype object. Each <var>TypedArray</var>
instance has the following internal slots: [[TypedArrayName]],
[[ViewedArrayBuffer]], [[ByteLength]], [[ByteOffset]], and
[[ArrayLength]].</p>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-keyed-collections" oldids="sec-keyed-collection">
<span id="sec-keyed-collection"></span><h1><span class="secnum">23</span>Keyed Collections</h1>
<emu-clause id="sec-map-objects">
<h1><span class="secnum">23.1</span>Map Objects</h1>
<p>Map objects are collections of key/value pairs where both the
keys and values may be arbitrary ECMAScript language values. A distinct
key value may only occur in one key/value pair within the Map's
collection. Distinct key values are discriminated using the <emu-xref aoid="SameValueZero" id="_ref_7147"><a href="#sec-samevaluezero">SameValueZero</a></emu-xref> comparison algorithm.</p>
<p>Map object must be implemented using either hash tables or other
mechanisms that, on average, provide access times that are sublinear on
the number of elements in the collection. The data structures used in
this Map objects specification is only intended to describe the required
observable semantics of Map objects. It is not intended to be a viable
implementation model.</p>
<emu-clause id="sec-map-constructor">
<h1><span class="secnum">23.1.1</span>The Map Constructor</h1>
<p>The Map <emu-xref href="#constructor" id="_ref_7148"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>is the intrinsic object <dfn>%Map%</dfn>.</li>
<li>is the initial value of the <code>Map</code> property of the <emu-xref href="#sec-global-object" id="_ref_7149"><a href="#sec-global-object">global object</a></emu-xref>.</li>
<li>creates and initializes a new Map object when called as a <emu-xref href="#constructor" id="_ref_7150"><a href="#constructor">constructor</a></emu-xref>.</li>
<li>is not intended to be called as a function and will throw an exception when called in that manner.</li>
<li>is designed to be subclassable. It may be used as the value in an <code>extends</code> clause of a class definition. Subclass constructors that intend to inherit the specified <code>Map</code> behaviour must include a <code>super</code> call to the <code>Map</code> <emu-xref href="#constructor" id="_ref_7151"><a href="#constructor">constructor</a></emu-xref> to create and initialize the subclass instance with the internal state necessary to support the <code>Map.prototype</code> built-in methods.</li>
</ul>
<emu-clause id="sec-map-iterable">
<h1><span class="secnum">23.1.1.1</span>Map ( [ <var>iterable</var> ] )</h1>
<p>When the <code>Map</code> function is called with optional argument <var>iterable</var>, the following steps are taken:</p>
<emu-alg><ol><li>If NewTarget is <emu-val>undefined</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>map</var> be ?&nbsp;<emu-xref aoid="OrdinaryCreateFromConstructor" id="_ref_7152"><a href="#sec-ordinarycreatefromconstructor">OrdinaryCreateFromConstructor</a></emu-xref>(NewTarget, <code>"%MapPrototype%"</code>, « [[MapData]] »).</li><li>Set <var>map</var>.[[MapData]] to a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7153"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>If <var>iterable</var> is not present, or is either <emu-val>undefined</emu-val> or <emu-val>null</emu-val>, return <var>map</var>.</li><li>Let <var>adder</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_7154"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>map</var>, <code>"set"</code>).</li><li>Return ?&nbsp;<emu-xref aoid="AddEntriesFromIterable" id="_ref_7155"><a href="#sec-add-entries-from-iterable">AddEntriesFromIterable</a></emu-xref>(<var>map</var>, <var>iterable</var>, <var>adder</var>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>If the parameter <var>iterable</var> is present, it is
expected to be an object that implements an @@iterator method that
returns an iterator object that produces a two element array-like object
whose first element is a value that will be used as a Map key and whose
second element is the value to associate with that key.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-add-entries-from-iterable" aoid="AddEntriesFromIterable">
<h1><span class="secnum">23.1.1.2</span>AddEntriesFromIterable ( <var>target</var>, <var>iterable</var>, <var>adder</var> )</h1>
<p>The abstract operation AddEntriesFromIterable accepts a <var>target</var> object, an <var>iterable</var> of entries, and an <var>adder</var> function to be invoked, with <var>target</var> as the receiver.</p>
<emu-alg><ol><li>If <emu-xref aoid="IsCallable" id="_ref_7156"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>adder</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li><emu-xref href="#assert" id="_ref_7157"><a href="#assert">Assert</a></emu-xref>: <var>iterable</var> is present, and is neither <emu-val>undefined</emu-val> nor <emu-val>null</emu-val>.</li><li>Let <var>iteratorRecord</var> be ?&nbsp;<emu-xref aoid="GetIterator" id="_ref_7158"><a href="#sec-getiterator">GetIterator</a></emu-xref>(<var>iterable</var>).</li><li>Repeat,<ol><li>Let <var>next</var> be ?&nbsp;<emu-xref aoid="IteratorStep" id="_ref_7159"><a href="#sec-iteratorstep">IteratorStep</a></emu-xref>(<var>iteratorRecord</var>).</li><li>If <var>next</var> is <emu-val>false</emu-val>, return <var>target</var>.</li><li>Let <var>nextItem</var> be ?&nbsp;<emu-xref aoid="IteratorValue" id="_ref_7160"><a href="#sec-iteratorvalue">IteratorValue</a></emu-xref>(<var>next</var>).</li><li>If <emu-xref aoid="Type" id="_ref_7161"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>nextItem</var>) is not Object, then<ol><li>Let <var>error</var> be <emu-xref aoid="ThrowCompletion" id="_ref_7162"><a href="#sec-throwcompletion">ThrowCompletion</a></emu-xref>(a newly created <emu-val>TypeError</emu-val> object).</li><li>Return ?&nbsp;<emu-xref aoid="IteratorClose" id="_ref_7163"><a href="#sec-iteratorclose">IteratorClose</a></emu-xref>(<var>iteratorRecord</var>, <var>error</var>).</li></ol></li><li>Let <var>k</var> be <emu-xref aoid="Get" id="_ref_7164"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>nextItem</var>, <code>"0"</code>).</li><li>If <var>k</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_7165"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, return ?&nbsp;<emu-xref aoid="IteratorClose" id="_ref_7166"><a href="#sec-iteratorclose">IteratorClose</a></emu-xref>(<var>iteratorRecord</var>, <var>k</var>).</li><li>Let <var>v</var> be <emu-xref aoid="Get" id="_ref_7167"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>nextItem</var>, <code>"1"</code>).</li><li>If <var>v</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_7168"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, return ?&nbsp;<emu-xref aoid="IteratorClose" id="_ref_7169"><a href="#sec-iteratorclose">IteratorClose</a></emu-xref>(<var>iteratorRecord</var>, <var>v</var>).</li><li>Let <var>status</var> be <emu-xref aoid="Call" id="_ref_7170"><a href="#sec-call">Call</a></emu-xref>(<var>adder</var>, <var>target</var>, « <var>k</var>.[[Value]], <var>v</var>.[[Value]] »).</li><li>If <var>status</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_7171"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, return ?&nbsp;<emu-xref aoid="IteratorClose" id="_ref_7172"><a href="#sec-iteratorclose">IteratorClose</a></emu-xref>(<var>iteratorRecord</var>, <var>status</var>).
</li></ol></li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The parameter <var>iterable</var> is expected to be an
object that implements an @@iterator method that returns an iterator
object that produces a two element array-like object whose first element
is a value that will be used as a Map key and whose second element is
the value to associate with that key.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-map-constructor">
<h1><span class="secnum">23.1.2</span>Properties of the Map Constructor</h1>
<p>The Map <emu-xref href="#constructor" id="_ref_7173"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_7174"><a href="#sec-properties-of-the-function-prototype-object">%FunctionPrototype%</a></emu-xref>.</li>
<li>has the following properties:</li>
</ul>
<emu-clause id="sec-map.prototype">
<h1><span class="secnum">23.1.2.1</span>Map.prototype</h1>
<p>The initial value of <code>Map.prototype</code> is the intrinsic object <emu-xref href="#sec-properties-of-the-map-prototype-object" id="_ref_7175"><a href="#sec-properties-of-the-map-prototype-object">%MapPrototype%</a></emu-xref>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-get-map-@@species">
<h1><span class="secnum">23.1.2.2</span>get Map [ @@species ]</h1>
<p><code>Map[@@species]</code> is an <emu-xref href="#sec-object-type" id="_ref_7176"><a href="#sec-object-type">accessor property</a></emu-xref> whose set accessor function is <emu-val>undefined</emu-val>. Its get accessor function performs the following steps:</p>
<emu-alg><ol><li>Return the <emu-val>this</emu-val> value.
</li></ol></emu-alg>
<p>The value of the <code>name</code> property of this function is <code>"get [Symbol.species]"</code>.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Methods that create derived collection objects should call @@species to determine the <emu-xref href="#constructor" id="_ref_7177"><a href="#constructor">constructor</a></emu-xref> to use to create the derived objects. Subclass <emu-xref href="#constructor" id="_ref_7178"><a href="#constructor">constructor</a></emu-xref> may over-ride @@species to change the default <emu-xref href="#constructor" id="_ref_7179"><a href="#constructor">constructor</a></emu-xref> assignment.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-map-prototype-object">
<h1><span class="secnum">23.1.3</span>Properties of the Map Prototype Object</h1>
<p>The Map prototype object:</p>
<ul>
<li>is the intrinsic object <dfn>%MapPrototype%</dfn>.</li>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_7180"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>.</li>
<li>is an ordinary object.</li>
<li>does not have a [[MapData]] internal slot.</li>
</ul>
<emu-clause id="sec-map.prototype.clear">
<h1><span class="secnum">23.1.3.1</span>Map.prototype.clear ( )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>M</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_7181"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>M</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>M</var> does not have a [[MapData]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>entries</var> be the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7182"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> that is <var>M</var>.[[MapData]].</li><li>For each <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7183"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Key]], [[Value]] } <var>p</var> that is an element of <var>entries</var>, do<ol><li>Set <var>p</var>.[[Key]] to <emu-const>empty</emu-const>.</li><li>Set <var>p</var>.[[Value]] to <emu-const>empty</emu-const>.</li></ol></li><li>Return <emu-val>undefined</emu-val>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The existing [[MapData]] <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7184"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> is preserved because there may be existing Map Iterator objects that are suspended midway through iterating over that <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7185"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-map.prototype.constructor">
<h1><span class="secnum">23.1.3.2</span>Map.prototype.constructor</h1>
<p>The initial value of <code>Map.prototype.constructor</code> is the intrinsic object <emu-xref href="#sec-map-constructor" id="_ref_7186"><a href="#sec-map-constructor">%Map%</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-map.prototype.delete">
<h1><span class="secnum">23.1.3.3</span>Map.prototype.delete ( <var>key</var> )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>M</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_7187"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>M</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>M</var> does not have a [[MapData]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>entries</var> be the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7188"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> that is <var>M</var>.[[MapData]].</li><li>For each <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7189"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Key]], [[Value]] } <var>p</var> that is an element of <var>entries</var>, do<ol><li>If <var>p</var>.[[Key]] is not <emu-const>empty</emu-const> and <emu-xref aoid="SameValueZero" id="_ref_7190"><a href="#sec-samevaluezero">SameValueZero</a></emu-xref>(<var>p</var>.[[Key]], <var>key</var>) is <emu-val>true</emu-val>, then<ol><li>Set <var>p</var>.[[Key]] to <emu-const>empty</emu-const>.</li><li>Set <var>p</var>.[[Value]] to <emu-const>empty</emu-const>.</li><li>Return <emu-val>true</emu-val>.</li></ol></li></ol></li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The value <emu-const>empty</emu-const> is used as a
specification device to indicate that an entry has been deleted. Actual
implementations may take other actions such as physically removing the
entry from internal data structures.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-map.prototype.entries">
<h1><span class="secnum">23.1.3.4</span>Map.prototype.entries ( )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>M</var> be the <emu-val>this</emu-val> value.</li><li>Return ?&nbsp;<emu-xref aoid="CreateMapIterator" id="_ref_7191"><a href="#sec-createmapiterator">CreateMapIterator</a></emu-xref>(<var>M</var>, <code>"key+value"</code>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-map.prototype.foreach">
<h1><span class="secnum">23.1.3.5</span>Map.prototype.forEach ( <var>callbackfn</var> [ , <var>thisArg</var> ] )</h1>
<p>When the <code>forEach</code> method is called with one or two arguments, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>M</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_7192"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>M</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>M</var> does not have a [[MapData]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <emu-xref aoid="IsCallable" id="_ref_7193"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>callbackfn</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>thisArg</var> is present, let <var>T</var> be <var>thisArg</var>; else let <var>T</var> be <emu-val>undefined</emu-val>.</li><li>Let <var>entries</var> be the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7194"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> that is <var>M</var>.[[MapData]].</li><li>For each <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7195"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Key]], [[Value]] } <var>e</var> that is an element of <var>entries</var>, in original key insertion order, do<ol><li>If <var>e</var>.[[Key]] is not <emu-const>empty</emu-const>, then<ol><li>Perform ?&nbsp;<emu-xref aoid="Call" id="_ref_7196"><a href="#sec-call">Call</a></emu-xref>(<var>callbackfn</var>, <var>T</var>, « <var>e</var>.[[Value]], <var>e</var>.[[Key]], <var>M</var> »).</li></ol></li></ol></li><li>Return <emu-val>undefined</emu-val>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p><var>callbackfn</var> should be a function that accepts three arguments. <code>forEach</code> calls <var>callbackfn</var> once for each key/value pair present in the map object, in key insertion order. <var>callbackfn</var> is called only for keys of the map which actually exist; it is not called for keys that have been deleted from the map.</p>
<p>If a <var>thisArg</var> parameter is provided, it will be used as the <emu-val>this</emu-val> value for each invocation of <var>callbackfn</var>. If it is not provided, <emu-val>undefined</emu-val> is used instead.</p>
<p><var>callbackfn</var> is called with three arguments: the value of the item, the key of the item, and the Map object being traversed.</p>
<p><code>forEach</code> does not directly mutate the object on which it is called but the object may be mutated by the calls to <var>callbackfn</var>. Each entry of a map's [[MapData]] is only visited once. New keys added after the call to <code>forEach</code> begins are visited. A key will be revisited if it is deleted after it has been visited and then re-added before the <code>forEach</code> call completes. Keys that are deleted after the call to <code>forEach</code> begins and before being visited are not visited unless the key is added again before the <code>forEach</code> call completes.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-map.prototype.get">
<h1><span class="secnum">23.1.3.6</span>Map.prototype.get ( <var>key</var> )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>M</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_7197"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>M</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>M</var> does not have a [[MapData]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>entries</var> be the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7198"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> that is <var>M</var>.[[MapData]].</li><li>For each <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7199"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Key]], [[Value]] } <var>p</var> that is an element of <var>entries</var>, do<ol><li>If <var>p</var>.[[Key]] is not <emu-const>empty</emu-const> and <emu-xref aoid="SameValueZero" id="_ref_7200"><a href="#sec-samevaluezero">SameValueZero</a></emu-xref>(<var>p</var>.[[Key]], <var>key</var>) is <emu-val>true</emu-val>, return <var>p</var>.[[Value]].</li></ol></li><li>Return <emu-val>undefined</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-map.prototype.has">
<h1><span class="secnum">23.1.3.7</span>Map.prototype.has ( <var>key</var> )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>M</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_7201"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>M</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>M</var> does not have a [[MapData]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>entries</var> be the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7202"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> that is <var>M</var>.[[MapData]].</li><li>For each <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7203"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Key]], [[Value]] } <var>p</var> that is an element of <var>entries</var>, do<ol><li>If <var>p</var>.[[Key]] is not <emu-const>empty</emu-const> and <emu-xref aoid="SameValueZero" id="_ref_7204"><a href="#sec-samevaluezero">SameValueZero</a></emu-xref>(<var>p</var>.[[Key]], <var>key</var>) is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li></ol></li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-map.prototype.keys">
<h1><span class="secnum">23.1.3.8</span>Map.prototype.keys ( )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>M</var> be the <emu-val>this</emu-val> value.</li><li>Return ?&nbsp;<emu-xref aoid="CreateMapIterator" id="_ref_7205"><a href="#sec-createmapiterator">CreateMapIterator</a></emu-xref>(<var>M</var>, <code>"key"</code>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-map.prototype.set">
<h1><span class="secnum">23.1.3.9</span>Map.prototype.set ( <var>key</var>, <var>value</var> )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>M</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_7206"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>M</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>M</var> does not have a [[MapData]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>entries</var> be the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7207"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> that is <var>M</var>.[[MapData]].</li><li>For each <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7208"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Key]], [[Value]] } <var>p</var> that is an element of <var>entries</var>, do<ol><li>If <var>p</var>.[[Key]] is not <emu-const>empty</emu-const> and <emu-xref aoid="SameValueZero" id="_ref_7209"><a href="#sec-samevaluezero">SameValueZero</a></emu-xref>(<var>p</var>.[[Key]], <var>key</var>) is <emu-val>true</emu-val>, then<ol><li>Set <var>p</var>.[[Value]] to <var>value</var>.</li><li>Return <var>M</var>.</li></ol></li></ol></li><li>If <var>key</var> is <emu-val>-0</emu-val>, set <var>key</var> to <emu-val>+0</emu-val>.</li><li>Let <var>p</var> be the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7210"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Key]]: <var>key</var>, [[Value]]: <var>value</var> }.</li><li>Append <var>p</var> as the last element of <var>entries</var>.</li><li>Return <var>M</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-get-map.prototype.size">
<h1><span class="secnum">23.1.3.10</span>get Map.prototype.size</h1>
<p><code>Map.prototype.size</code> is an <emu-xref href="#sec-object-type" id="_ref_7211"><a href="#sec-object-type">accessor property</a></emu-xref> whose set accessor function is <emu-val>undefined</emu-val>. Its get accessor function performs the following steps:</p>
<emu-alg><ol><li>Let <var>M</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_7212"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>M</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>M</var> does not have a [[MapData]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>entries</var> be the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7213"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> that is <var>M</var>.[[MapData]].</li><li>Let <var>count</var> be 0.</li><li>For each <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7214"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Key]], [[Value]] } <var>p</var> that is an element of <var>entries</var>, do<ol><li>If <var>p</var>.[[Key]] is not <emu-const>empty</emu-const>, increase <var>count</var> by 1.</li></ol></li><li>Return <var>count</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-map.prototype.values">
<h1><span class="secnum">23.1.3.11</span>Map.prototype.values ( )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>M</var> be the <emu-val>this</emu-val> value.</li><li>Return ?&nbsp;<emu-xref aoid="CreateMapIterator" id="_ref_7215"><a href="#sec-createmapiterator">CreateMapIterator</a></emu-xref>(<var>M</var>, <code>"value"</code>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-map.prototype-@@iterator">
<h1><span class="secnum">23.1.3.12</span>Map.prototype [ @@iterator ] ( )</h1>
<p>The initial value of the @@iterator property is the same <emu-xref href="#function-object" id="_ref_7216"><a href="#function-object">function object</a></emu-xref> as the initial value of the <code>entries</code> property.</p>
</emu-clause>
<emu-clause id="sec-map.prototype-@@tostringtag">
<h1><span class="secnum">23.1.3.13</span>Map.prototype [ @@toStringTag ]</h1>
<p>The initial value of the @@toStringTag property is the String value <code>"Map"</code>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-map-instances">
<h1><span class="secnum">23.1.4</span>Properties of Map Instances</h1>
<p>Map instances are ordinary objects that inherit properties from
the Map prototype. Map instances also have a [[MapData]] internal slot.</p>
</emu-clause>
<emu-clause id="sec-map-iterator-objects">
<h1><span class="secnum">23.1.5</span>Map Iterator Objects</h1>
<p>A Map Iterator is an object, that represents a specific iteration over some specific Map instance object. There is not a named <emu-xref href="#constructor" id="_ref_7217"><a href="#constructor">constructor</a></emu-xref> for Map Iterator objects. Instead, map iterator objects are created by calling certain methods of Map instance objects.</p>
<emu-clause id="sec-createmapiterator" aoid="CreateMapIterator">
<h1><span class="secnum">23.1.5.1</span>CreateMapIterator ( <var>map</var>, <var>kind</var> )</h1>
<p>Several methods of Map objects return Iterator objects. The abstract operation CreateMapIterator with arguments <var>map</var> and <var>kind</var> is used to create such iterator objects. It performs the following steps:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_7218"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>map</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>map</var> does not have a [[MapData]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>iterator</var> be <emu-xref aoid="ObjectCreate" id="_ref_7219"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-%mapiteratorprototype%-object" id="_ref_7220"><a href="#sec-%mapiteratorprototype%-object">%MapIteratorPrototype%</a></emu-xref>, « [[Map]], [[MapNextIndex]], [[MapIterationKind]] »).</li><li>Set <var>iterator</var>.[[Map]] to <var>map</var>.</li><li>Set <var>iterator</var>.[[MapNextIndex]] to 0.</li><li>Set <var>iterator</var>.[[MapIterationKind]] to <var>kind</var>.</li><li>Return <var>iterator</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-%mapiteratorprototype%-object">
<h1><span class="secnum">23.1.5.2</span>The %MapIteratorPrototype% Object</h1>
<p>The <dfn>%MapIteratorPrototype%</dfn> object:</p>
<ul>
<li>has properties that are inherited by all Map Iterator Objects.</li>
<li>is an ordinary object.</li>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-%iteratorprototype%-object" id="_ref_7221"><a href="#sec-%iteratorprototype%-object">%IteratorPrototype%</a></emu-xref>.</li>
<li>has the following properties:</li>
</ul>
<emu-clause id="sec-%mapiteratorprototype%.next">
<h1><span class="secnum">23.1.5.2.1</span>%MapIteratorPrototype%.next ( )</h1>
<emu-alg><ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_7222"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>O</var> does not have all of the internal slots of a Map Iterator Instance (<emu-xref href="#sec-properties-of-map-iterator-instances" id="_ref_651"><a href="#sec-properties-of-map-iterator-instances">23.1.5.3</a></emu-xref>), throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>m</var> be <var>O</var>.[[Map]].</li><li>Let <var>index</var> be <var>O</var>.[[MapNextIndex]].</li><li>Let <var>itemKind</var> be <var>O</var>.[[MapIterationKind]].</li><li>If <var>m</var> is <emu-val>undefined</emu-val>, return <emu-xref aoid="CreateIterResultObject" id="_ref_7223"><a href="#sec-createiterresultobject">CreateIterResultObject</a></emu-xref>(<emu-val>undefined</emu-val>, <emu-val>true</emu-val>).</li><li><emu-xref href="#assert" id="_ref_7224"><a href="#assert">Assert</a></emu-xref>: <var>m</var> has a [[MapData]] internal slot.</li><li>Let <var>entries</var> be the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7225"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> that is <var>m</var>.[[MapData]].</li><li>Let <var>numEntries</var> be the number of elements of <var>entries</var>.</li><li>NOTE: <var>numEntries</var> must be redetermined each time this method is evaluated.</li><li>Repeat, while <var>index</var> is less than <var>numEntries</var>,<ol><li>Let <var>e</var> be the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7226"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Key]], [[Value]] } that is the value of <var>entries</var>[<var>index</var>].</li><li>Increase <var>index</var> by 1.</li><li>Set <var>O</var>.[[MapNextIndex]] to <var>index</var>.</li><li>If <var>e</var>.[[Key]] is not <emu-const>empty</emu-const>, then<ol><li>If <var>itemKind</var> is <code>"key"</code>, let <var>result</var> be <var>e</var>.[[Key]].</li><li>Else if <var>itemKind</var> is <code>"value"</code>, let <var>result</var> be <var>e</var>.[[Value]].</li><li>Else,<ol><li><emu-xref href="#assert" id="_ref_7227"><a href="#assert">Assert</a></emu-xref>: <var>itemKind</var> is <code>"key+value"</code>.</li><li>Let <var>result</var> be <emu-xref aoid="CreateArrayFromList" id="_ref_7228"><a href="#sec-createarrayfromlist">CreateArrayFromList</a></emu-xref>(« <var>e</var>.[[Key]], <var>e</var>.[[Value]] »).</li></ol></li><li>Return <emu-xref aoid="CreateIterResultObject" id="_ref_7229"><a href="#sec-createiterresultobject">CreateIterResultObject</a></emu-xref>(<var>result</var>, <emu-val>false</emu-val>).</li></ol></li></ol></li><li>Set <var>O</var>.[[Map]] to <emu-val>undefined</emu-val>.</li><li>Return <emu-xref aoid="CreateIterResultObject" id="_ref_7230"><a href="#sec-createiterresultobject">CreateIterResultObject</a></emu-xref>(<emu-val>undefined</emu-val>, <emu-val>true</emu-val>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-%mapiteratorprototype%-@@tostringtag">
<h1><span class="secnum">23.1.5.2.2</span>%MapIteratorPrototype% [ @@toStringTag ]</h1>
<p>The initial value of the @@toStringTag property is the String value <code>"Map Iterator"</code>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-map-iterator-instances">
<h1><span class="secnum">23.1.5.3</span>Properties of Map Iterator Instances</h1>
<p>Map Iterator instances are ordinary objects that inherit properties from the <emu-xref href="#sec-%mapiteratorprototype%-object" id="_ref_7231"><a href="#sec-%mapiteratorprototype%-object">%MapIteratorPrototype%</a></emu-xref> intrinsic object. Map Iterator instances are initially created with the internal slots described in <emu-xref href="#table-50" id="_ref_652"><a href="#table-50">Table 60</a></emu-xref>.</p>
<emu-table id="table-50" caption="Internal Slots of Map Iterator Instances"><figure><figcaption>Table 60: Internal Slots of Map Iterator Instances</figcaption>
<table>
<tbody>
<tr>
<th>
Internal Slot
</th>
<th>
Description
</th>
</tr>
<tr>
<td>
[[Map]]
</td>
<td>
The Map object that is being iterated.
</td>
</tr>
<tr>
<td>
[[MapNextIndex]]
</td>
<td>
The <emu-xref href="#integer-index" id="_ref_7232"><a href="#integer-index">integer index</a></emu-xref> of the next Map data element to be examined by this iterator.
</td>
</tr>
<tr>
<td>
[[MapIterationKind]]
</td>
<td>
A String value that identifies what is to be returned
for each element of the iteration. The possible values are: <code>"key"</code>, <code>"value"</code>, <code>"key+value"</code>.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-set-objects">
<h1><span class="secnum">23.2</span>Set Objects</h1>
<p>Set objects are collections of ECMAScript language values. A
distinct value may only occur once as an element of a Set's collection.
Distinct values are discriminated using the <emu-xref aoid="SameValueZero" id="_ref_7233"><a href="#sec-samevaluezero">SameValueZero</a></emu-xref> comparison algorithm.</p>
<p>Set objects must be implemented using either hash tables or other
mechanisms that, on average, provide access times that are sublinear on
the number of elements in the collection. The data structures used in
this Set objects specification is only intended to describe the required
observable semantics of Set objects. It is not intended to be a viable
implementation model.</p>
<emu-clause id="sec-set-constructor">
<h1><span class="secnum">23.2.1</span>The Set Constructor</h1>
<p>The Set <emu-xref href="#constructor" id="_ref_7234"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>is the intrinsic object <dfn>%Set%</dfn>.</li>
<li>is the initial value of the <code>Set</code> property of the <emu-xref href="#sec-global-object" id="_ref_7235"><a href="#sec-global-object">global object</a></emu-xref>.</li>
<li>creates and initializes a new Set object when called as a <emu-xref href="#constructor" id="_ref_7236"><a href="#constructor">constructor</a></emu-xref>.</li>
<li>is not intended to be called as a function and will throw an exception when called in that manner.</li>
<li>is designed to be subclassable. It may be used as the value in an <code>extends</code> clause of a class definition. Subclass constructors that intend to inherit the specified <code>Set</code> behaviour must include a <code>super</code> call to the <code>Set</code> <emu-xref href="#constructor" id="_ref_7237"><a href="#constructor">constructor</a></emu-xref> to create and initialize the subclass instance with the internal state necessary to support the <code>Set.prototype</code> built-in methods.</li>
</ul>
<emu-clause id="sec-set-iterable">
<h1><span class="secnum">23.2.1.1</span>Set ( [ <var>iterable</var> ] )</h1>
<p>When the <code>Set</code> function is called with optional argument <var>iterable</var>, the following steps are taken:</p>
<emu-alg><ol><li>If NewTarget is <emu-val>undefined</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>set</var> be ?&nbsp;<emu-xref aoid="OrdinaryCreateFromConstructor" id="_ref_7238"><a href="#sec-ordinarycreatefromconstructor">OrdinaryCreateFromConstructor</a></emu-xref>(NewTarget, <code>"%SetPrototype%"</code>, « [[SetData]] »).</li><li>Set <var>set</var>.[[SetData]] to a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7239"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>If <var>iterable</var> is not present, set <var>iterable</var> to <emu-val>undefined</emu-val>.</li><li>If <var>iterable</var> is either <emu-val>undefined</emu-val> or <emu-val>null</emu-val>, return <var>set</var>.</li><li>Let <var>adder</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_7240"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>set</var>, <code>"add"</code>).</li><li>If <emu-xref aoid="IsCallable" id="_ref_7241"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>adder</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>iteratorRecord</var> be ?&nbsp;<emu-xref aoid="GetIterator" id="_ref_7242"><a href="#sec-getiterator">GetIterator</a></emu-xref>(<var>iterable</var>).</li><li>Repeat,<ol><li>Let <var>next</var> be ?&nbsp;<emu-xref aoid="IteratorStep" id="_ref_7243"><a href="#sec-iteratorstep">IteratorStep</a></emu-xref>(<var>iteratorRecord</var>).</li><li>If <var>next</var> is <emu-val>false</emu-val>, return <var>set</var>.</li><li>Let <var>nextValue</var> be ?&nbsp;<emu-xref aoid="IteratorValue" id="_ref_7244"><a href="#sec-iteratorvalue">IteratorValue</a></emu-xref>(<var>next</var>).</li><li>Let <var>status</var> be <emu-xref aoid="Call" id="_ref_7245"><a href="#sec-call">Call</a></emu-xref>(<var>adder</var>, <var>set</var>, « <var>nextValue</var> »).</li><li>If <var>status</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_7246"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, return ?&nbsp;<emu-xref aoid="IteratorClose" id="_ref_7247"><a href="#sec-iteratorclose">IteratorClose</a></emu-xref>(<var>iteratorRecord</var>, <var>status</var>).
</li></ol></li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-set-constructor">
<h1><span class="secnum">23.2.2</span>Properties of the Set Constructor</h1>
<p>The Set <emu-xref href="#constructor" id="_ref_7248"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_7249"><a href="#sec-properties-of-the-function-prototype-object">%FunctionPrototype%</a></emu-xref>.</li>
<li>has the following properties:</li>
</ul>
<emu-clause id="sec-set.prototype">
<h1><span class="secnum">23.2.2.1</span>Set.prototype</h1>
<p>The initial value of <code>Set.prototype</code> is the intrinsic <emu-xref href="#sec-properties-of-the-set-prototype-object" id="_ref_7250"><a href="#sec-properties-of-the-set-prototype-object">%SetPrototype%</a></emu-xref> object.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-get-set-@@species">
<h1><span class="secnum">23.2.2.2</span>get Set [ @@species ]</h1>
<p><code>Set[@@species]</code> is an <emu-xref href="#sec-object-type" id="_ref_7251"><a href="#sec-object-type">accessor property</a></emu-xref> whose set accessor function is <emu-val>undefined</emu-val>. Its get accessor function performs the following steps:</p>
<emu-alg><ol><li>Return the <emu-val>this</emu-val> value.
</li></ol></emu-alg>
<p>The value of the <code>name</code> property of this function is <code>"get [Symbol.species]"</code>.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Methods that create derived collection objects should call @@species to determine the <emu-xref href="#constructor" id="_ref_7252"><a href="#constructor">constructor</a></emu-xref> to use to create the derived objects. Subclass <emu-xref href="#constructor" id="_ref_7253"><a href="#constructor">constructor</a></emu-xref> may over-ride @@species to change the default <emu-xref href="#constructor" id="_ref_7254"><a href="#constructor">constructor</a></emu-xref> assignment.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-set-prototype-object">
<h1><span class="secnum">23.2.3</span>Properties of the Set Prototype Object</h1>
<p>The Set prototype object:</p>
<ul>
<li>is the intrinsic object <dfn>%SetPrototype%</dfn>.</li>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_7255"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>.</li>
<li>is an ordinary object.</li>
<li>does not have a [[SetData]] internal slot.</li>
</ul>
<emu-clause id="sec-set.prototype.add">
<h1><span class="secnum">23.2.3.1</span>Set.prototype.add ( <var>value</var> )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>S</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_7256"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>S</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>S</var> does not have a [[SetData]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>entries</var> be the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7257"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> that is <var>S</var>.[[SetData]].</li><li>For each <var>e</var> that is an element of <var>entries</var>, do<ol><li>If <var>e</var> is not <emu-const>empty</emu-const> and <emu-xref aoid="SameValueZero" id="_ref_7258"><a href="#sec-samevaluezero">SameValueZero</a></emu-xref>(<var>e</var>, <var>value</var>) is <emu-val>true</emu-val>, then<ol><li>Return <var>S</var>.</li></ol></li></ol></li><li>If <var>value</var> is <emu-val>-0</emu-val>, set <var>value</var> to <emu-val>+0</emu-val>.</li><li>Append <var>value</var> as the last element of <var>entries</var>.</li><li>Return <var>S</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-set.prototype.clear">
<h1><span class="secnum">23.2.3.2</span>Set.prototype.clear ( )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>S</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_7259"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>S</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>S</var> does not have a [[SetData]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>entries</var> be the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7260"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> that is <var>S</var>.[[SetData]].</li><li>For each <var>e</var> that is an element of <var>entries</var>, do<ol><li>Replace the element of <var>entries</var> whose value is <var>e</var> with an element whose value is <emu-const>empty</emu-const>.</li></ol></li><li>Return <emu-val>undefined</emu-val>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The existing [[SetData]] <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7261"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> is preserved because there may be existing Set Iterator objects that are suspended midway through iterating over that <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7262"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-set.prototype.constructor">
<h1><span class="secnum">23.2.3.3</span>Set.prototype.constructor</h1>
<p>The initial value of <code>Set.prototype.constructor</code> is the intrinsic object <emu-xref href="#sec-set-constructor" id="_ref_7263"><a href="#sec-set-constructor">%Set%</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-set.prototype.delete">
<h1><span class="secnum">23.2.3.4</span>Set.prototype.delete ( <var>value</var> )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>S</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_7264"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>S</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>S</var> does not have a [[SetData]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>entries</var> be the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7265"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> that is <var>S</var>.[[SetData]].</li><li>For each <var>e</var> that is an element of <var>entries</var>, do<ol><li>If <var>e</var> is not <emu-const>empty</emu-const> and <emu-xref aoid="SameValueZero" id="_ref_7266"><a href="#sec-samevaluezero">SameValueZero</a></emu-xref>(<var>e</var>, <var>value</var>) is <emu-val>true</emu-val>, then<ol><li>Replace the element of <var>entries</var> whose value is <var>e</var> with an element whose value is <emu-const>empty</emu-const>.</li><li>Return <emu-val>true</emu-val>.</li></ol></li></ol></li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The value <emu-const>empty</emu-const> is used as a
specification device to indicate that an entry has been deleted. Actual
implementations may take other actions such as physically removing the
entry from internal data structures.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-set.prototype.entries">
<h1><span class="secnum">23.2.3.5</span>Set.prototype.entries ( )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>S</var> be the <emu-val>this</emu-val> value.</li><li>Return ?&nbsp;<emu-xref aoid="CreateSetIterator" id="_ref_7267"><a href="#sec-createsetiterator">CreateSetIterator</a></emu-xref>(<var>S</var>, <code>"key+value"</code>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>For iteration purposes, a Set appears similar to a Map where each entry has the same value for its key and value.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-set.prototype.foreach">
<h1><span class="secnum">23.2.3.6</span>Set.prototype.forEach ( <var>callbackfn</var> [ , <var>thisArg</var> ] )</h1>
<p>When the <code>forEach</code> method is called with one or two arguments, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>S</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_7268"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>S</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>S</var> does not have a [[SetData]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <emu-xref aoid="IsCallable" id="_ref_7269"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>callbackfn</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>thisArg</var> is present, let <var>T</var> be <var>thisArg</var>; else let <var>T</var> be <emu-val>undefined</emu-val>.</li><li>Let <var>entries</var> be the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7270"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> that is <var>S</var>.[[SetData]].</li><li>For each <var>e</var> that is an element of <var>entries</var>, in original insertion order, do<ol><li>If <var>e</var> is not <emu-const>empty</emu-const>, then<ol><li>Perform ?&nbsp;<emu-xref aoid="Call" id="_ref_7271"><a href="#sec-call">Call</a></emu-xref>(<var>callbackfn</var>, <var>T</var>, « <var>e</var>, <var>e</var>, <var>S</var> »).</li></ol></li></ol></li><li>Return <emu-val>undefined</emu-val>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p><var>callbackfn</var> should be a function that accepts three arguments. <code>forEach</code> calls <var>callbackfn</var> once for each value present in the set object, in value insertion order. <var>callbackfn</var> is called only for values of the Set which actually exist; it is not called for keys that have been deleted from the set.</p>
<p>If a <var>thisArg</var> parameter is provided, it will be used as the <emu-val>this</emu-val> value for each invocation of <var>callbackfn</var>. If it is not provided, <emu-val>undefined</emu-val> is used instead.</p>
<p><var>callbackfn</var> is called with three arguments: the
first two arguments are a value contained in the Set. The same value is
passed for both arguments. The Set object being traversed is passed as
the third argument.</p>
<p>The <var>callbackfn</var> is called with three arguments to be consistent with the call back functions used by <code>forEach</code> methods for Map and Array. For Sets, each item value is considered to be both the key and the value.</p>
<p><code>forEach</code> does not directly mutate the object on which it is called but the object may be mutated by the calls to <var>callbackfn</var>.</p>
<p>Each value is normally visited only once. However, a value
will be revisited if it is deleted after it has been visited and then
re-added before the <code>forEach</code> call completes. Values that are deleted after the call to <code>forEach</code> begins and before being visited are not visited unless the value is added again before the <code>forEach</code> call completes. New values added after the call to <code>forEach</code> begins are visited.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-set.prototype.has">
<h1><span class="secnum">23.2.3.7</span>Set.prototype.has ( <var>value</var> )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>S</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_7272"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>S</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>S</var> does not have a [[SetData]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>entries</var> be the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7273"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> that is <var>S</var>.[[SetData]].</li><li>For each <var>e</var> that is an element of <var>entries</var>, do<ol><li>If <var>e</var> is not <emu-const>empty</emu-const> and <emu-xref aoid="SameValueZero" id="_ref_7274"><a href="#sec-samevaluezero">SameValueZero</a></emu-xref>(<var>e</var>, <var>value</var>) is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li></ol></li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-set.prototype.keys">
<h1><span class="secnum">23.2.3.8</span>Set.prototype.keys ( )</h1>
<p>The initial value of the <code>keys</code> property is the same <emu-xref href="#function-object" id="_ref_7275"><a href="#function-object">function object</a></emu-xref> as the initial value of the <code>values</code> property.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>For iteration purposes, a Set appears similar to a Map where each entry has the same value for its key and value.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-get-set.prototype.size">
<h1><span class="secnum">23.2.3.9</span>get Set.prototype.size</h1>
<p><code>Set.prototype.size</code> is an <emu-xref href="#sec-object-type" id="_ref_7276"><a href="#sec-object-type">accessor property</a></emu-xref> whose set accessor function is <emu-val>undefined</emu-val>. Its get accessor function performs the following steps:</p>
<emu-alg><ol><li>Let <var>S</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_7277"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>S</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>S</var> does not have a [[SetData]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>entries</var> be the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7278"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> that is <var>S</var>.[[SetData]].</li><li>Let <var>count</var> be 0.</li><li>For each <var>e</var> that is an element of <var>entries</var>, do<ol><li>If <var>e</var> is not <emu-const>empty</emu-const>, increase <var>count</var> by 1.</li></ol></li><li>Return <var>count</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-set.prototype.values">
<h1><span class="secnum">23.2.3.10</span>Set.prototype.values ( )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>S</var> be the <emu-val>this</emu-val> value.</li><li>Return ?&nbsp;<emu-xref aoid="CreateSetIterator" id="_ref_7279"><a href="#sec-createsetiterator">CreateSetIterator</a></emu-xref>(<var>S</var>, <code>"value"</code>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-set.prototype-@@iterator">
<h1><span class="secnum">23.2.3.11</span>Set.prototype [ @@iterator ] ( )</h1>
<p>The initial value of the @@iterator property is the same <emu-xref href="#function-object" id="_ref_7280"><a href="#function-object">function object</a></emu-xref> as the initial value of the <code>values</code> property.</p>
</emu-clause>
<emu-clause id="sec-set.prototype-@@tostringtag">
<h1><span class="secnum">23.2.3.12</span>Set.prototype [ @@toStringTag ]</h1>
<p>The initial value of the @@toStringTag property is the String value <code>"Set"</code>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-set-instances">
<h1><span class="secnum">23.2.4</span>Properties of Set Instances</h1>
<p>Set instances are ordinary objects that inherit properties from
the Set prototype. Set instances also have a [[SetData]] internal slot.</p>
</emu-clause>
<emu-clause id="sec-set-iterator-objects">
<h1><span class="secnum">23.2.5</span>Set Iterator Objects</h1>
<p>A Set Iterator is an ordinary object, with the structure
defined below, that represents a specific iteration over some specific
Set instance object. There is not a named <emu-xref href="#constructor" id="_ref_7281"><a href="#constructor">constructor</a></emu-xref> for Set Iterator objects. Instead, set iterator objects are created by calling certain methods of Set instance objects.</p>
<emu-clause id="sec-createsetiterator" aoid="CreateSetIterator">
<h1><span class="secnum">23.2.5.1</span>CreateSetIterator ( <var>set</var>, <var>kind</var> )</h1>
<p>Several methods of Set objects return Iterator objects. The abstract operation CreateSetIterator with arguments <var>set</var> and <var>kind</var> is used to create such iterator objects. It performs the following steps:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_7282"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>set</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>set</var> does not have a [[SetData]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>iterator</var> be <emu-xref aoid="ObjectCreate" id="_ref_7283"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-%setiteratorprototype%-object" id="_ref_7284"><a href="#sec-%setiteratorprototype%-object">%SetIteratorPrototype%</a></emu-xref>, « [[IteratedSet]], [[SetNextIndex]], [[SetIterationKind]] »).</li><li>Set <var>iterator</var>.[[IteratedSet]] to <var>set</var>.</li><li>Set <var>iterator</var>.[[SetNextIndex]] to 0.</li><li>Set <var>iterator</var>.[[SetIterationKind]] to <var>kind</var>.</li><li>Return <var>iterator</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-%setiteratorprototype%-object">
<h1><span class="secnum">23.2.5.2</span>The %SetIteratorPrototype% Object</h1>
<p>The <dfn>%SetIteratorPrototype%</dfn> object:</p>
<ul>
<li>has properties that are inherited by all Set Iterator Objects.</li>
<li>is an ordinary object.</li>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-%iteratorprototype%-object" id="_ref_7285"><a href="#sec-%iteratorprototype%-object">%IteratorPrototype%</a></emu-xref>.</li>
<li>has the following properties:</li>
</ul>
<emu-clause id="sec-%setiteratorprototype%.next">
<h1><span class="secnum">23.2.5.2.1</span>%SetIteratorPrototype%.next ( )</h1>
<emu-alg><ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_7286"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>O</var> does not have all of the internal slots of a Set Iterator Instance (<emu-xref href="#sec-properties-of-set-iterator-instances" id="_ref_653"><a href="#sec-properties-of-set-iterator-instances">23.2.5.3</a></emu-xref>), throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>s</var> be <var>O</var>.[[IteratedSet]].</li><li>Let <var>index</var> be <var>O</var>.[[SetNextIndex]].</li><li>Let <var>itemKind</var> be <var>O</var>.[[SetIterationKind]].</li><li>If <var>s</var> is <emu-val>undefined</emu-val>, return <emu-xref aoid="CreateIterResultObject" id="_ref_7287"><a href="#sec-createiterresultobject">CreateIterResultObject</a></emu-xref>(<emu-val>undefined</emu-val>, <emu-val>true</emu-val>).</li><li><emu-xref href="#assert" id="_ref_7288"><a href="#assert">Assert</a></emu-xref>: <var>s</var> has a [[SetData]] internal slot.</li><li>Let <var>entries</var> be the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7289"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> that is <var>s</var>.[[SetData]].</li><li>Let <var>numEntries</var> be the number of elements of <var>entries</var>.</li><li>NOTE: <var>numEntries</var> must be redetermined each time this method is evaluated.</li><li>Repeat, while <var>index</var> is less than <var>numEntries</var>,<ol><li>Let <var>e</var> be <var>entries</var>[<var>index</var>].</li><li>Increase <var>index</var> by 1.</li><li>Set <var>O</var>.[[SetNextIndex]] to <var>index</var>.</li><li>If <var>e</var> is not <emu-const>empty</emu-const>, then<ol><li>If <var>itemKind</var> is <code>"key+value"</code>, then<ol><li>Return <emu-xref aoid="CreateIterResultObject" id="_ref_7290"><a href="#sec-createiterresultobject">CreateIterResultObject</a></emu-xref>(<emu-xref aoid="CreateArrayFromList" id="_ref_7291"><a href="#sec-createarrayfromlist">CreateArrayFromList</a></emu-xref>(« <var>e</var>, <var>e</var> »), <emu-val>false</emu-val>).</li></ol></li><li>Return <emu-xref aoid="CreateIterResultObject" id="_ref_7292"><a href="#sec-createiterresultobject">CreateIterResultObject</a></emu-xref>(<var>e</var>, <emu-val>false</emu-val>).</li></ol></li></ol></li><li>Set <var>O</var>.[[IteratedSet]] to <emu-val>undefined</emu-val>.</li><li>Return <emu-xref aoid="CreateIterResultObject" id="_ref_7293"><a href="#sec-createiterresultobject">CreateIterResultObject</a></emu-xref>(<emu-val>undefined</emu-val>, <emu-val>true</emu-val>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-%setiteratorprototype%-@@tostringtag">
<h1><span class="secnum">23.2.5.2.2</span>%SetIteratorPrototype% [ @@toStringTag ]</h1>
<p>The initial value of the @@toStringTag property is the String value <code>"Set Iterator"</code>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-set-iterator-instances">
<h1><span class="secnum">23.2.5.3</span>Properties of Set Iterator Instances</h1>
<p>Set Iterator instances are ordinary objects that inherit properties from the <emu-xref href="#sec-%setiteratorprototype%-object" id="_ref_7294"><a href="#sec-%setiteratorprototype%-object">%SetIteratorPrototype%</a></emu-xref> intrinsic object. Set Iterator instances are initially created with the internal slots specified in <emu-xref href="#table-51" id="_ref_654"><a href="#table-51">Table 61</a></emu-xref>.</p>
<emu-table id="table-51" caption="Internal Slots of Set Iterator Instances"><figure><figcaption>Table 61: Internal Slots of Set Iterator Instances</figcaption>
<table>
<tbody>
<tr>
<th>
Internal Slot
</th>
<th>
Description
</th>
</tr>
<tr>
<td>
[[IteratedSet]]
</td>
<td>
The Set object that is being iterated.
</td>
</tr>
<tr>
<td>
[[SetNextIndex]]
</td>
<td>
The <emu-xref href="#integer-index" id="_ref_7295"><a href="#integer-index">integer index</a></emu-xref> of the next Set data element to be examined by this iterator
</td>
</tr>
<tr>
<td>
[[SetIterationKind]]
</td>
<td>
A String value that identifies what is to be returned
for each element of the iteration. The possible values are: <code>"key"</code>, <code>"value"</code>, <code>"key+value"</code>. <code>"key"</code> and <code>"value"</code> have the same meaning.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-weakmap-objects">
<h1><span class="secnum">23.3</span>WeakMap Objects</h1>
<p>WeakMap objects are collections of key/value pairs where the keys
are objects and values may be arbitrary ECMAScript language values. A
WeakMap may be queried to see if it contains a key/value pair with a
specific key, but no mechanism is provided for enumerating the objects
it holds as keys. If an object that is being used as the key of a
WeakMap key/value pair is only reachable by following a chain of
references that start within that WeakMap, then that key/value pair is
inaccessible and is automatically removed from the WeakMap. WeakMap
implementations must detect and remove such key/value pairs and any
associated resources.</p>
<p>An implementation may impose an arbitrarily determined latency
between the time a key/value pair of a WeakMap becomes inaccessible and
the time when the key/value pair is removed from the WeakMap. If this
latency was observable to ECMAScript program, it would be a source of
indeterminacy that could impact program execution. For that reason, an
ECMAScript implementation must not provide any means to observe a key of
a WeakMap that does not require the observer to present the observed
key.</p>
<p>WeakMap objects must be implemented using either hash tables or
other mechanisms that, on average, provide access times that are
sublinear on the number of key/value pairs in the collection. The data
structure used in this WeakMap objects specification are only intended
to describe the required observable semantics of WeakMap objects. It is
not intended to be a viable implementation model.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>WeakMap and WeakSets are intended to provide mechanisms for
dynamically associating state with an object in a manner that does not
“leak” memory resources if, in the absence of the WeakMap or WeakSet,
the object otherwise became inaccessible and subject to resource
reclamation by the implementation's garbage collection mechanisms. This
characteristic can be achieved by using an inverted per-object mapping
of weak map instances to keys. Alternatively each weak map may
internally store its key to value mappings but this approach requires
coordination between the WeakMap or WeakSet implementation and the
garbage collector. The following references describe mechanism that may
be useful to implementations of WeakMap and WeakSets:</p>
<p>Barry Hayes. 1997. Ephemerons: a new finalization mechanism. In <i>Proceedings of the 12th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications (OOPSLA '97)</i>, A. Michael Berman (Ed.). ACM, New York, NY, USA, 176-183, <a href="http://doi.acm.org/10.1145/263698.263733">http://doi.acm.org/10.1145/263698.263733</a>.</p>
<p>Alexandra Barros, Roberto Ierusalimschy, Eliminating Cycles in
Weak Tables. Journal of Universal Computer Science - J.UCS, vol. 14, no.
21, pp. 3481-3497, 2008, <a href="http://www.jucs.org/jucs_14_21/eliminating_cycles_in_weak">http://www.jucs.org/jucs_14_21/eliminating_cycles_in_weak</a></p>
</div></emu-note>
<emu-clause id="sec-weakmap-constructor">
<h1><span class="secnum">23.3.1</span>The WeakMap Constructor</h1>
<p>The WeakMap <emu-xref href="#constructor" id="_ref_7296"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>is the intrinsic object <dfn>%WeakMap%</dfn>.</li>
<li>is the initial value of the <code>WeakMap</code> property of the <emu-xref href="#sec-global-object" id="_ref_7297"><a href="#sec-global-object">global object</a></emu-xref>.</li>
<li>creates and initializes a new WeakMap object when called as a <emu-xref href="#constructor" id="_ref_7298"><a href="#constructor">constructor</a></emu-xref>.</li>
<li>is not intended to be called as a function and will throw an exception when called in that manner.</li>
<li>is designed to be subclassable. It may be used as the value in an <code>extends</code> clause of a class definition. Subclass constructors that intend to inherit the specified <code>WeakMap</code> behaviour must include a <code>super</code> call to the <code>WeakMap</code> <emu-xref href="#constructor" id="_ref_7299"><a href="#constructor">constructor</a></emu-xref> to create and initialize the subclass instance with the internal state necessary to support the <code>WeakMap.prototype</code> built-in methods.</li>
</ul>
<emu-clause id="sec-weakmap-iterable">
<h1><span class="secnum">23.3.1.1</span>WeakMap ( [ <var>iterable</var> ] )</h1>
<p>When the <code>WeakMap</code> function is called with optional argument <var>iterable</var>, the following steps are taken:</p>
<emu-alg><ol><li>If NewTarget is <emu-val>undefined</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>map</var> be ?&nbsp;<emu-xref aoid="OrdinaryCreateFromConstructor" id="_ref_7300"><a href="#sec-ordinarycreatefromconstructor">OrdinaryCreateFromConstructor</a></emu-xref>(NewTarget, <code>"%WeakMapPrototype%"</code>, « [[WeakMapData]] »).</li><li>Set <var>map</var>.[[WeakMapData]] to a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7301"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>If <var>iterable</var> is not present, or is either <emu-val>undefined</emu-val> or <emu-val>null</emu-val>, return <var>map</var>.</li><li>Let <var>adder</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_7302"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>map</var>, <code>"set"</code>).</li><li>Return ?&nbsp;<emu-xref aoid="AddEntriesFromIterable" id="_ref_7303"><a href="#sec-add-entries-from-iterable">AddEntriesFromIterable</a></emu-xref>(<var>map</var>, <var>iterable</var>, <var>adder</var>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>If the parameter <var>iterable</var> is present, it is
expected to be an object that implements an @@iterator method that
returns an iterator object that produces a two element array-like object
whose first element is a value that will be used as a WeakMap key and
whose second element is the value to associate with that key.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-weakmap-constructor">
<h1><span class="secnum">23.3.2</span>Properties of the WeakMap Constructor</h1>
<p>The WeakMap <emu-xref href="#constructor" id="_ref_7304"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_7305"><a href="#sec-properties-of-the-function-prototype-object">%FunctionPrototype%</a></emu-xref>.</li>
<li>has the following properties:</li>
</ul>
<emu-clause id="sec-weakmap.prototype">
<h1><span class="secnum">23.3.2.1</span>WeakMap.prototype</h1>
<p>The initial value of <code>WeakMap.prototype</code> is the intrinsic object <emu-xref href="#sec-properties-of-the-weakmap-prototype-object" id="_ref_7306"><a href="#sec-properties-of-the-weakmap-prototype-object">%WeakMapPrototype%</a></emu-xref>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-weakmap-prototype-object">
<h1><span class="secnum">23.3.3</span>Properties of the WeakMap Prototype Object</h1>
<p>The WeakMap prototype object:</p>
<ul>
<li>is the intrinsic object <dfn>%WeakMapPrototype%</dfn>.</li>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_7307"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>.</li>
<li>is an ordinary object.</li>
<li>does not have a [[WeakMapData]] internal slot.</li>
</ul>
<emu-clause id="sec-weakmap.prototype.constructor">
<h1><span class="secnum">23.3.3.1</span>WeakMap.prototype.constructor</h1>
<p>The initial value of <code>WeakMap.prototype.constructor</code> is the intrinsic object <emu-xref href="#sec-weakmap-constructor" id="_ref_7308"><a href="#sec-weakmap-constructor">%WeakMap%</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-weakmap.prototype.delete">
<h1><span class="secnum">23.3.3.2</span>WeakMap.prototype.delete ( <var>key</var> )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>M</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_7309"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>M</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>M</var> does not have a [[WeakMapData]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>entries</var> be the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7310"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> that is <var>M</var>.[[WeakMapData]].</li><li>If <emu-xref aoid="Type" id="_ref_7311"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>key</var>) is not Object, return <emu-val>false</emu-val>.</li><li>For each <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7312"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Key]], [[Value]] } <var>p</var> that is an element of <var>entries</var>, do<ol><li>If <var>p</var>.[[Key]] is not <emu-const>empty</emu-const> and <emu-xref aoid="SameValue" id="_ref_7313"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>p</var>.[[Key]], <var>key</var>) is <emu-val>true</emu-val>, then<ol><li>Set <var>p</var>.[[Key]] to <emu-const>empty</emu-const>.</li><li>Set <var>p</var>.[[Value]] to <emu-const>empty</emu-const>.</li><li>Return <emu-val>true</emu-val>.</li></ol></li></ol></li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The value <emu-const>empty</emu-const> is used as a
specification device to indicate that an entry has been deleted. Actual
implementations may take other actions such as physically removing the
entry from internal data structures.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-weakmap.prototype.get">
<h1><span class="secnum">23.3.3.3</span>WeakMap.prototype.get ( <var>key</var> )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>M</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_7314"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>M</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>M</var> does not have a [[WeakMapData]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>entries</var> be the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7315"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> that is <var>M</var>.[[WeakMapData]].</li><li>If <emu-xref aoid="Type" id="_ref_7316"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>key</var>) is not Object, return <emu-val>undefined</emu-val>.</li><li>For each <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7317"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Key]], [[Value]] } <var>p</var> that is an element of <var>entries</var>, do<ol><li>If <var>p</var>.[[Key]] is not <emu-const>empty</emu-const> and <emu-xref aoid="SameValue" id="_ref_7318"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>p</var>.[[Key]], <var>key</var>) is <emu-val>true</emu-val>, return <var>p</var>.[[Value]].</li></ol></li><li>Return <emu-val>undefined</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-weakmap.prototype.has">
<h1><span class="secnum">23.3.3.4</span>WeakMap.prototype.has ( <var>key</var> )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>M</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_7319"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>M</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>M</var> does not have a [[WeakMapData]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>entries</var> be the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7320"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> that is <var>M</var>.[[WeakMapData]].</li><li>If <emu-xref aoid="Type" id="_ref_7321"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>key</var>) is not Object, return <emu-val>false</emu-val>.</li><li>For each <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7322"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Key]], [[Value]] } <var>p</var> that is an element of <var>entries</var>, do<ol><li>If <var>p</var>.[[Key]] is not <emu-const>empty</emu-const> and <emu-xref aoid="SameValue" id="_ref_7323"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>p</var>.[[Key]], <var>key</var>) is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li></ol></li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-weakmap.prototype.set">
<h1><span class="secnum">23.3.3.5</span>WeakMap.prototype.set ( <var>key</var>, <var>value</var> )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>M</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_7324"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>M</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>M</var> does not have a [[WeakMapData]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>entries</var> be the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7325"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> that is <var>M</var>.[[WeakMapData]].</li><li>If <emu-xref aoid="Type" id="_ref_7326"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>key</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>For each <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7327"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Key]], [[Value]] } <var>p</var> that is an element of <var>entries</var>, do<ol><li>If <var>p</var>.[[Key]] is not <emu-const>empty</emu-const> and <emu-xref aoid="SameValue" id="_ref_7328"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>p</var>.[[Key]], <var>key</var>) is <emu-val>true</emu-val>, then<ol><li>Set <var>p</var>.[[Value]] to <var>value</var>.</li><li>Return <var>M</var>.</li></ol></li></ol></li><li>Let <var>p</var> be the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7329"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Key]]: <var>key</var>, [[Value]]: <var>value</var> }.</li><li>Append <var>p</var> as the last element of <var>entries</var>.</li><li>Return <var>M</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-weakmap.prototype-@@tostringtag">
<h1><span class="secnum">23.3.3.6</span>WeakMap.prototype [ @@toStringTag ]</h1>
<p>The initial value of the @@toStringTag property is the String value <code>"WeakMap"</code>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-weakmap-instances">
<h1><span class="secnum">23.3.4</span>Properties of WeakMap Instances</h1>
<p>WeakMap instances are ordinary objects that inherit properties
from the WeakMap prototype. WeakMap instances also have a
[[WeakMapData]] internal slot.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-weakset-objects">
<h1><span class="secnum">23.4</span>WeakSet Objects</h1>
<p>WeakSet objects are collections of objects. A distinct object may
only occur once as an element of a WeakSet's collection. A WeakSet may
be queried to see if it contains a specific object, but no mechanism is
provided for enumerating the objects it holds. If an object that is
contained by a WeakSet is only reachable by following a chain of
references that start within that WeakSet, then that object is
inaccessible and is automatically removed from the WeakSet. WeakSet
implementations must detect and remove such objects and any associated
resources.</p>
<p>An implementation may impose an arbitrarily determined latency
between the time an object contained in a WeakSet becomes inaccessible
and the time when the object is removed from the WeakSet. If this
latency was observable to ECMAScript program, it would be a source of
indeterminacy that could impact program execution. For that reason, an
ECMAScript implementation must not provide any means to determine if a
WeakSet contains a particular object that does not require the observer
to present the observed object.</p>
<p>WeakSet objects must be implemented using either hash tables or
other mechanisms that, on average, provide access times that are
sublinear on the number of elements in the collection. The data
structure used in this WeakSet objects specification is only intended to
describe the required observable semantics of WeakSet objects. It is
not intended to be a viable implementation model.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>See the NOTE in <emu-xref href="#sec-weakmap-objects" id="_ref_655"><a href="#sec-weakmap-objects">23.3</a></emu-xref>.</p>
</div></emu-note>
<emu-clause id="sec-weakset-constructor">
<h1><span class="secnum">23.4.1</span>The WeakSet Constructor</h1>
<p>The WeakSet <emu-xref href="#constructor" id="_ref_7330"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>is the intrinsic object <dfn>%WeakSet%</dfn>.</li>
<li>is the initial value of the <code>WeakSet</code> property of the <emu-xref href="#sec-global-object" id="_ref_7331"><a href="#sec-global-object">global object</a></emu-xref>.</li>
<li>creates and initializes a new WeakSet object when called as a <emu-xref href="#constructor" id="_ref_7332"><a href="#constructor">constructor</a></emu-xref>.</li>
<li>is not intended to be called as a function and will throw an exception when called in that manner.</li>
<li>is designed to be subclassable. It may be used as the value in an <code>extends</code> clause of a class definition. Subclass constructors that intend to inherit the specified <code>WeakSet</code> behaviour must include a <code>super</code> call to the <code>WeakSet</code> <emu-xref href="#constructor" id="_ref_7333"><a href="#constructor">constructor</a></emu-xref> to create and initialize the subclass instance with the internal state necessary to support the <code>WeakSet.prototype</code> built-in methods.</li>
</ul>
<emu-clause id="sec-weakset-iterable">
<h1><span class="secnum">23.4.1.1</span>WeakSet ( [ <var>iterable</var> ] )</h1>
<p>When the <code>WeakSet</code> function is called with optional argument <var>iterable</var>, the following steps are taken:</p>
<emu-alg><ol><li>If NewTarget is <emu-val>undefined</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>set</var> be ?&nbsp;<emu-xref aoid="OrdinaryCreateFromConstructor" id="_ref_7334"><a href="#sec-ordinarycreatefromconstructor">OrdinaryCreateFromConstructor</a></emu-xref>(NewTarget, <code>"%WeakSetPrototype%"</code>, « [[WeakSetData]] »).</li><li>Set <var>set</var>.[[WeakSetData]] to a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7335"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>If <var>iterable</var> is not present, set <var>iterable</var> to <emu-val>undefined</emu-val>.</li><li>If <var>iterable</var> is either <emu-val>undefined</emu-val> or <emu-val>null</emu-val>, return <var>set</var>.</li><li>Let <var>adder</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_7336"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>set</var>, <code>"add"</code>).</li><li>If <emu-xref aoid="IsCallable" id="_ref_7337"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>adder</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>iteratorRecord</var> be ?&nbsp;<emu-xref aoid="GetIterator" id="_ref_7338"><a href="#sec-getiterator">GetIterator</a></emu-xref>(<var>iterable</var>).</li><li>Repeat,<ol><li>Let <var>next</var> be ?&nbsp;<emu-xref aoid="IteratorStep" id="_ref_7339"><a href="#sec-iteratorstep">IteratorStep</a></emu-xref>(<var>iteratorRecord</var>).</li><li>If <var>next</var> is <emu-val>false</emu-val>, return <var>set</var>.</li><li>Let <var>nextValue</var> be ?&nbsp;<emu-xref aoid="IteratorValue" id="_ref_7340"><a href="#sec-iteratorvalue">IteratorValue</a></emu-xref>(<var>next</var>).</li><li>Let <var>status</var> be <emu-xref aoid="Call" id="_ref_7341"><a href="#sec-call">Call</a></emu-xref>(<var>adder</var>, <var>set</var>, « <var>nextValue</var> »).</li><li>If <var>status</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_7342"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, return ?&nbsp;<emu-xref aoid="IteratorClose" id="_ref_7343"><a href="#sec-iteratorclose">IteratorClose</a></emu-xref>(<var>iteratorRecord</var>, <var>status</var>).
</li></ol></li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-weakset-constructor">
<h1><span class="secnum">23.4.2</span>Properties of the WeakSet Constructor</h1>
<p>The WeakSet <emu-xref href="#constructor" id="_ref_7344"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_7345"><a href="#sec-properties-of-the-function-prototype-object">%FunctionPrototype%</a></emu-xref>.</li>
<li>has the following properties:</li>
</ul>
<emu-clause id="sec-weakset.prototype">
<h1><span class="secnum">23.4.2.1</span>WeakSet.prototype</h1>
<p>The initial value of <code>WeakSet.prototype</code> is the intrinsic <emu-xref href="#sec-properties-of-the-weakset-prototype-object" id="_ref_7346"><a href="#sec-properties-of-the-weakset-prototype-object">%WeakSetPrototype%</a></emu-xref> object.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-weakset-prototype-object">
<h1><span class="secnum">23.4.3</span>Properties of the WeakSet Prototype Object</h1>
<p>The WeakSet prototype object:</p>
<ul>
<li>is the intrinsic object <dfn>%WeakSetPrototype%</dfn>.</li>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_7347"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>.</li>
<li>is an ordinary object.</li>
<li>does not have a [[WeakSetData]] internal slot.</li>
</ul>
<emu-clause id="sec-weakset.prototype.add">
<h1><span class="secnum">23.4.3.1</span>WeakSet.prototype.add ( <var>value</var> )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>S</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_7348"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>S</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>S</var> does not have a [[WeakSetData]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <emu-xref aoid="Type" id="_ref_7349"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>value</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>entries</var> be the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7350"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> that is <var>S</var>.[[WeakSetData]].</li><li>For each <var>e</var> that is an element of <var>entries</var>, do<ol><li>If <var>e</var> is not <emu-const>empty</emu-const> and <emu-xref aoid="SameValue" id="_ref_7351"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>e</var>, <var>value</var>) is <emu-val>true</emu-val>, then<ol><li>Return <var>S</var>.</li></ol></li></ol></li><li>Append <var>value</var> as the last element of <var>entries</var>.</li><li>Return <var>S</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-weakset.prototype.constructor">
<h1><span class="secnum">23.4.3.2</span>WeakSet.prototype.constructor</h1>
<p>The initial value of <code>WeakSet.prototype.constructor</code> is the <emu-xref href="#sec-weakset-constructor" id="_ref_7352"><a href="#sec-weakset-constructor">%WeakSet%</a></emu-xref> intrinsic object.</p>
</emu-clause>
<emu-clause id="sec-weakset.prototype.delete">
<h1><span class="secnum">23.4.3.3</span>WeakSet.prototype.delete ( <var>value</var> )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>S</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_7353"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>S</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>S</var> does not have a [[WeakSetData]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <emu-xref aoid="Type" id="_ref_7354"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>value</var>) is not Object, return <emu-val>false</emu-val>.</li><li>Let <var>entries</var> be the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7355"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> that is <var>S</var>.[[WeakSetData]].</li><li>For each <var>e</var> that is an element of <var>entries</var>, do<ol><li>If <var>e</var> is not <emu-const>empty</emu-const> and <emu-xref aoid="SameValue" id="_ref_7356"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>e</var>, <var>value</var>) is <emu-val>true</emu-val>, then<ol><li>Replace the element of <var>entries</var> whose value is <var>e</var> with an element whose value is <emu-const>empty</emu-const>.</li><li>Return <emu-val>true</emu-val>.</li></ol></li></ol></li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The value <emu-const>empty</emu-const> is used as a
specification device to indicate that an entry has been deleted. Actual
implementations may take other actions such as physically removing the
entry from internal data structures.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-weakset.prototype.has">
<h1><span class="secnum">23.4.3.4</span>WeakSet.prototype.has ( <var>value</var> )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>S</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_7357"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>S</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>S</var> does not have a [[WeakSetData]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>entries</var> be the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7358"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> that is <var>S</var>.[[WeakSetData]].</li><li>If <emu-xref aoid="Type" id="_ref_7359"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>value</var>) is not Object, return <emu-val>false</emu-val>.</li><li>For each <var>e</var> that is an element of <var>entries</var>, do<ol><li>If <var>e</var> is not <emu-const>empty</emu-const> and <emu-xref aoid="SameValue" id="_ref_7360"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>e</var>, <var>value</var>) is <emu-val>true</emu-val>, return <emu-val>true</emu-val>.</li></ol></li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-weakset.prototype-@@tostringtag">
<h1><span class="secnum">23.4.3.5</span>WeakSet.prototype [ @@toStringTag ]</h1>
<p>The initial value of the @@toStringTag property is the String value <code>"WeakSet"</code>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-weakset-instances">
<h1><span class="secnum">23.4.4</span>Properties of WeakSet Instances</h1>
<p>WeakSet instances are ordinary objects that inherit properties
from the WeakSet prototype. WeakSet instances also have a
[[WeakSetData]] internal slot.</p>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-structured-data">
<h1><span class="secnum">24</span>Structured Data</h1>
<emu-clause id="sec-arraybuffer-objects">
<h1><span class="secnum">24.1</span>ArrayBuffer Objects</h1>
<emu-clause id="sec-abstract-operations-for-arraybuffer-objects">
<h1><span class="secnum">24.1.1</span>Abstract Operations For ArrayBuffer Objects</h1>
<emu-clause id="sec-allocatearraybuffer" aoid="AllocateArrayBuffer">
<h1><span class="secnum">24.1.1.1</span>AllocateArrayBuffer ( <var>constructor</var>, <var>byteLength</var> )</h1>
<p>The abstract operation AllocateArrayBuffer with arguments <var>constructor</var> and <var>byteLength</var> is used to create an ArrayBuffer object. It performs the following steps:</p>
<emu-alg><ol><li>Let <var>obj</var> be ?&nbsp;<emu-xref aoid="OrdinaryCreateFromConstructor" id="_ref_7361"><a href="#sec-ordinarycreatefromconstructor">OrdinaryCreateFromConstructor</a></emu-xref>(<var>constructor</var>, <code>"%ArrayBufferPrototype%"</code>, « [[ArrayBufferData]], [[ArrayBufferByteLength]], [[ArrayBufferDetachKey]] »).</li><li><emu-xref href="#assert" id="_ref_7362"><a href="#assert">Assert</a></emu-xref>: <var>byteLength</var> is an integer value ≥ 0.</li><li>Let <var>block</var> be ?&nbsp;<emu-xref aoid="CreateByteDataBlock" id="_ref_7363"><a href="#sec-createbytedatablock">CreateByteDataBlock</a></emu-xref>(<var>byteLength</var>).</li><li>Set <var>obj</var>.[[ArrayBufferData]] to <var>block</var>.</li><li>Set <var>obj</var>.[[ArrayBufferByteLength]] to <var>byteLength</var>.</li><li>Return <var>obj</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-isdetachedbuffer" aoid="IsDetachedBuffer">
<h1><span class="secnum">24.1.1.2</span>IsDetachedBuffer ( <var>arrayBuffer</var> )</h1>
<p>The abstract operation IsDetachedBuffer with argument <var>arrayBuffer</var> performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_7364"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_7365"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>arrayBuffer</var>) is Object and it has an [[ArrayBufferData]] internal slot.</li><li>If <var>arrayBuffer</var>.[[ArrayBufferData]] is <emu-val>null</emu-val>, return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-detacharraybuffer" aoid="DetachArrayBuffer">
<h1><span class="secnum">24.1.1.3</span>DetachArrayBuffer ( <var>arrayBuffer</var> [ , <var>key</var> ] )</h1>
<p>The abstract operation DetachArrayBuffer with argument <var>arrayBuffer</var> and optional argument <var>key</var> performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_7366"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_7367"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>arrayBuffer</var>) is Object and it has [[ArrayBufferData]], [[ArrayBufferByteLength]], and [[ArrayBufferDetachKey]] internal slots.</li><li><emu-xref href="#assert" id="_ref_7368"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsSharedArrayBuffer" id="_ref_7369"><a href="#sec-issharedarraybuffer">IsSharedArrayBuffer</a></emu-xref>(<var>arrayBuffer</var>) is <emu-val>false</emu-val>.</li><li>If <var>key</var> is not present, set <var>key</var> to <emu-val>undefined</emu-val>.</li><li>If <emu-xref aoid="SameValue" id="_ref_7370"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>arrayBuffer</var>.[[ArrayBufferDetachKey]], <var>key</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Set <var>arrayBuffer</var>.[[ArrayBufferData]] to <emu-val>null</emu-val>.</li><li>Set <var>arrayBuffer</var>.[[ArrayBufferByteLength]] to 0.</li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_7371"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-val>null</emu-val>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Detaching an ArrayBuffer instance disassociates the <emu-xref href="#sec-data-blocks" id="_ref_7372"><a href="#sec-data-blocks">Data Block</a></emu-xref>
used as its backing store from the instance and sets the byte length of
the buffer to 0. No operations defined by this specification use the
DetachArrayBuffer abstract operation. However, an ECMAScript
implementation or host environment may define such operations.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-clonearraybuffer" aoid="CloneArrayBuffer">
<h1><span class="secnum">24.1.1.4</span>CloneArrayBuffer ( <var>srcBuffer</var>, <var>srcByteOffset</var>, <var>srcLength</var>, <var>cloneConstructor</var> )</h1>
<p>The abstract operation CloneArrayBuffer takes four parameters, an ArrayBuffer <var>srcBuffer</var>, an integer offset <var>srcByteOffset</var>, an integer length <var>srcLength</var>, and a <emu-xref href="#constructor" id="_ref_7373"><a href="#constructor">constructor</a></emu-xref> function <var>cloneConstructor</var>. It creates a new ArrayBuffer whose data is a copy of <var>srcBuffer</var>'s data over the range starting at <var>srcByteOffset</var> and continuing for <var>srcLength</var> bytes. This operation performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_7374"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_7375"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>srcBuffer</var>) is Object and it has an [[ArrayBufferData]] internal slot.</li><li><emu-xref href="#assert" id="_ref_7376"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsConstructor" id="_ref_7377"><a href="#sec-isconstructor">IsConstructor</a></emu-xref>(<var>cloneConstructor</var>) is <emu-val>true</emu-val>.</li><li>Let <var>targetBuffer</var> be ?&nbsp;<emu-xref aoid="AllocateArrayBuffer" id="_ref_7378"><a href="#sec-allocatearraybuffer">AllocateArrayBuffer</a></emu-xref>(<var>cloneConstructor</var>, <var>srcLength</var>).</li><li>If <emu-xref aoid="IsDetachedBuffer" id="_ref_7379"><a href="#sec-isdetachedbuffer">IsDetachedBuffer</a></emu-xref>(<var>srcBuffer</var>) is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>srcBlock</var> be <var>srcBuffer</var>.[[ArrayBufferData]].</li><li>Let <var>targetBlock</var> be <var>targetBuffer</var>.[[ArrayBufferData]].</li><li>Perform <emu-xref aoid="CopyDataBlockBytes" id="_ref_7380"><a href="#sec-copydatablockbytes">CopyDataBlockBytes</a></emu-xref>(<var>targetBlock</var>, 0, <var>srcBlock</var>, <var>srcByteOffset</var>, <var>srcLength</var>).</li><li>Return <var>targetBuffer</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-rawbytestonumber" aoid="RawBytesToNumber">
<h1><span class="secnum">24.1.1.5</span>RawBytesToNumber ( <var>type</var>, <var>rawBytes</var>, <var>isLittleEndian</var> )</h1>
<p>The abstract operation RawBytesToNumber takes three parameters, a String <var>type</var>, a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7381"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> <var>rawBytes</var>, and a Boolean <var>isLittleEndian</var>. This operation performs the following steps:</p>
<emu-alg><ol><li>Let <var>elementSize</var> be the Number value of the Element Size value specified in <emu-xref href="#table-49" id="_ref_656"><a href="#table-49">Table 59</a></emu-xref> for Element Type <var>type</var>.</li><li>If <var>isLittleEndian</var> is <emu-val>false</emu-val>, reverse the order of the elements of <var>rawBytes</var>.</li><li>If <var>type</var> is <code>"Float32"</code>, then<ol><li>Let <var>value</var> be the byte elements of <var>rawBytes</var> concatenated and interpreted as a little-endian bit string encoding of an IEEE 754-2008 binary32 value.</li><li>If <var>value</var> is an IEEE 754-2008 binary32 NaN value, return the <emu-val>NaN</emu-val> Number value.</li><li>Return the Number value that corresponds to <var>value</var>.</li></ol></li><li>If <var>type</var> is <code>"Float64"</code>, then<ol><li>Let <var>value</var> be the byte elements of <var>rawBytes</var> concatenated and interpreted as a little-endian bit string encoding of an IEEE 754-2008 binary64 value.</li><li>If <var>value</var> is an IEEE 754-2008 binary64 NaN value, return the <emu-val>NaN</emu-val> Number value.</li><li>Return the Number value that corresponds to <var>value</var>.</li></ol></li><li>If the first code unit of <var>type</var> is the code unit 0x0055 (LATIN CAPITAL LETTER U), then<ol><li>Let <var>intValue</var> be the byte elements of <var>rawBytes</var> concatenated and interpreted as a bit string encoding of an unsigned little-endian binary number.</li></ol></li><li>Else,<ol><li>Let <var>intValue</var> be the byte elements of <var>rawBytes</var> concatenated and interpreted as a bit string encoding of a binary little-endian 2's complement number of bit length <var>elementSize</var> × 8.</li></ol></li><li>Return the Number value that corresponds to <var>intValue</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-getvaluefrombuffer" aoid="GetValueFromBuffer">
<h1><span class="secnum">24.1.1.6</span>GetValueFromBuffer ( <var>arrayBuffer</var>, <var>byteIndex</var>, <var>type</var>, <var>isTypedArray</var>, <var>order</var> [ , <var>isLittleEndian</var> ] )</h1>
<p>The abstract operation GetValueFromBuffer takes six parameters, an ArrayBuffer or SharedArrayBuffer <var>arrayBuffer</var>, an integer <var>byteIndex</var>, a String <var>type</var>, a Boolean <var>isTypedArray</var>, a String <var>order</var>, and optionally a Boolean <var>isLittleEndian</var>. This operation performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_7382"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsDetachedBuffer" id="_ref_7383"><a href="#sec-isdetachedbuffer">IsDetachedBuffer</a></emu-xref>(<var>arrayBuffer</var>) is <emu-val>false</emu-val>.</li><li><emu-xref href="#assert" id="_ref_7384"><a href="#assert">Assert</a></emu-xref>: There are sufficient bytes in <var>arrayBuffer</var> starting at <var>byteIndex</var> to represent a value of <var>type</var>.</li><li><emu-xref href="#assert" id="_ref_7385"><a href="#assert">Assert</a></emu-xref>: <var>byteIndex</var> is an integer value ≥ 0.</li><li>Let <var>block</var> be <var>arrayBuffer</var>.[[ArrayBufferData]].</li><li>Let <var>elementSize</var> be the Number value of the Element Size value specified in <emu-xref href="#table-49" id="_ref_657"><a href="#table-49">Table 59</a></emu-xref> for Element Type <var>type</var>.</li><li>If <emu-xref aoid="IsSharedArrayBuffer" id="_ref_7386"><a href="#sec-issharedarraybuffer">IsSharedArrayBuffer</a></emu-xref>(<var>arrayBuffer</var>) is <emu-val>true</emu-val>, then<ol><li>Let <var>execution</var> be the [[CandidateExecution]] field of the <emu-xref href="#surrounding-agent" id="_ref_7387"><a href="#surrounding-agent">surrounding agent</a></emu-xref>'s <emu-xref href="#agent-record" id="_ref_7388"><a href="#agent-record">Agent Record</a></emu-xref>.</li><li>Let <var>eventList</var> be the [[EventList]] field of the element in <var>execution</var>.[[EventsRecords]] whose [[AgentSignifier]] is <emu-xref aoid="AgentSignifier" id="_ref_7389"><a href="#sec-agentsignifier">AgentSignifier</a></emu-xref>().</li><li>If <var>isTypedArray</var> is <emu-val>true</emu-val> and <var>type</var> is <code>"Int8"</code>, <code>"Uint8"</code>, <code>"Int16"</code>, <code>"Uint16"</code>, <code>"Int32"</code>, or <code>"Uint32"</code>, let <var>noTear</var> be <emu-val>true</emu-val>; otherwise let <var>noTear</var> be <emu-val>false</emu-val>.</li><li>Let <var>rawValue</var> be a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7390"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of length <var>elementSize</var> of nondeterministically chosen byte values.</li><li>NOTE: In implementations, <var>rawValue</var>
is the result of a non-atomic or atomic read instruction on the
underlying hardware. The nondeterminism is a semantic prescription of
the <emu-xref href="#sec-memory-model" id="_ref_7391"><a href="#sec-memory-model">memory model</a></emu-xref> to describe observable behaviour of hardware with weak consistency.</li><li>Let <var>readEvent</var> be <emu-xref href="#sec-memory-model-fundamentals" id="_ref_7392"><a href="#sec-memory-model-fundamentals">ReadSharedMemory</a></emu-xref> { [[Order]]: <var>order</var>, [[NoTear]]: <var>noTear</var>, [[Block]]: <var>block</var>, [[ByteIndex]]: <var>byteIndex</var>, [[ElementSize]]: <var>elementSize</var> }.</li><li>Append <var>readEvent</var> to <var>eventList</var>.</li><li>Append <emu-xref href="#sec-chosen-value-records" id="_ref_7393"><a href="#sec-chosen-value-records">Chosen Value Record</a></emu-xref> { [[Event]]: <var>readEvent</var>, [[ChosenValue]]: <var>rawValue</var> } to <var>execution</var>.[[ChosenValues]].</li></ol></li><li>Else, let <var>rawValue</var> be a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7394"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of <var>elementSize</var> containing, in order, the <var>elementSize</var> sequence of bytes starting with <var>block</var>[<var>byteIndex</var>].</li><li>If <var>isLittleEndian</var> is not present, set <var>isLittleEndian</var> to the value of the [[LittleEndian]] field of the <emu-xref href="#surrounding-agent" id="_ref_7395"><a href="#surrounding-agent">surrounding agent</a></emu-xref>'s <emu-xref href="#agent-record" id="_ref_7396"><a href="#agent-record">Agent Record</a></emu-xref>.</li><li>Return <emu-xref aoid="RawBytesToNumber" id="_ref_7397"><a href="#sec-rawbytestonumber">RawBytesToNumber</a></emu-xref>(<var>type</var>, <var>rawValue</var>, <var>isLittleEndian</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-numbertorawbytes" aoid="NumberToRawBytes">
<h1><span class="secnum">24.1.1.7</span>NumberToRawBytes ( <var>type</var>, <var>value</var>, <var>isLittleEndian</var> )</h1>
<p>The abstract operation NumberToRawBytes takes three parameters, a String <var>type</var>, a Number <var>value</var>, and a Boolean <var>isLittleEndian</var>. This operation performs the following steps:</p>
<emu-alg><ol><li>If <var>type</var> is <code>"Float32"</code>, then<ol><li>Let <var>rawBytes</var> be a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7398"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing the 4 bytes that are the result of converting <var>value</var> to IEEE 754-2008 binary32 format using “Round to nearest, ties to even” rounding mode. If <var>isLittleEndian</var> is <emu-val>false</emu-val>, the bytes are arranged in big endian order. Otherwise, the bytes are arranged in little endian order. If <var>value</var> is <emu-val>NaN</emu-val>, <var>rawBytes</var>
may be set to any implementation chosen IEEE 754-2008 binary32 format
Not-a-Number encoding. An implementation must always choose the same
encoding for each implementation distinguishable <emu-val>NaN</emu-val> value.</li></ol></li><li>Else if <var>type</var> is <code>"Float64"</code>, then<ol><li>Let <var>rawBytes</var> be a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7399"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing the 8 bytes that are the IEEE 754-2008 binary64 format encoding of <var>value</var>. If <var>isLittleEndian</var> is <emu-val>false</emu-val>, the bytes are arranged in big endian order. Otherwise, the bytes are arranged in little endian order. If <var>value</var> is <emu-val>NaN</emu-val>, <var>rawBytes</var>
may be set to any implementation chosen IEEE 754-2008 binary64 format
Not-a-Number encoding. An implementation must always choose the same
encoding for each implementation distinguishable <emu-val>NaN</emu-val> value.</li></ol></li><li>Else,<ol><li>Let <var>n</var> be the Number value of the Element Size specified in <emu-xref href="#table-49" id="_ref_658"><a href="#table-49">Table 59</a></emu-xref> for Element Type <var>type</var>.</li><li>Let <var>convOp</var> be the abstract operation named in the Conversion Operation column in <emu-xref href="#table-49" id="_ref_659"><a href="#table-49">Table 59</a></emu-xref> for Element Type <var>type</var>.</li><li>Let <var>intValue</var> be <var>convOp</var>(<var>value</var>).</li><li>If <var>intValue</var> ≥ 0, then<ol><li>Let <var>rawBytes</var> be a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7400"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing the <var>n</var>-byte binary encoding of <var>intValue</var>. If <var>isLittleEndian</var> is <emu-val>false</emu-val>, the bytes are ordered in big endian order. Otherwise, the bytes are ordered in little endian order.</li></ol></li><li>Else,<ol><li>Let <var>rawBytes</var> be a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7401"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing the <var>n</var>-byte binary 2's complement encoding of <var>intValue</var>. If <var>isLittleEndian</var> is <emu-val>false</emu-val>, the bytes are ordered in big endian order. Otherwise, the bytes are ordered in little endian order.</li></ol></li></ol></li><li>Return <var>rawBytes</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-setvalueinbuffer" aoid="SetValueInBuffer">
<h1><span class="secnum">24.1.1.8</span>SetValueInBuffer ( <var>arrayBuffer</var>, <var>byteIndex</var>, <var>type</var>, <var>value</var>, <var>isTypedArray</var>, <var>order</var> [ , <var>isLittleEndian</var> ] )</h1>
<p>The abstract operation SetValueInBuffer takes seven parameters, an ArrayBuffer or SharedArrayBuffer <var>arrayBuffer</var>, an integer <var>byteIndex</var>, a String <var>type</var>, a Number <var>value</var>, a Boolean <var>isTypedArray</var>, a String <var>order</var>, and optionally a Boolean <var>isLittleEndian</var>. This operation performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_7402"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsDetachedBuffer" id="_ref_7403"><a href="#sec-isdetachedbuffer">IsDetachedBuffer</a></emu-xref>(<var>arrayBuffer</var>) is <emu-val>false</emu-val>.</li><li><emu-xref href="#assert" id="_ref_7404"><a href="#assert">Assert</a></emu-xref>: There are sufficient bytes in <var>arrayBuffer</var> starting at <var>byteIndex</var> to represent a value of <var>type</var>.</li><li><emu-xref href="#assert" id="_ref_7405"><a href="#assert">Assert</a></emu-xref>: <var>byteIndex</var> is an integer value ≥ 0.</li><li><emu-xref href="#assert" id="_ref_7406"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_7407"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>value</var>) is Number.</li><li>Let <var>block</var> be <var>arrayBuffer</var>.[[ArrayBufferData]].</li><li>Let <var>elementSize</var> be the Number value of the Element Size value specified in <emu-xref href="#table-49" id="_ref_660"><a href="#table-49">Table 59</a></emu-xref> for Element Type <var>type</var>.</li><li>If <var>isLittleEndian</var> is not present, set <var>isLittleEndian</var> to the value of the [[LittleEndian]] field of the <emu-xref href="#surrounding-agent" id="_ref_7408"><a href="#surrounding-agent">surrounding agent</a></emu-xref>'s <emu-xref href="#agent-record" id="_ref_7409"><a href="#agent-record">Agent Record</a></emu-xref>.</li><li>Let <var>rawBytes</var> be <emu-xref aoid="NumberToRawBytes" id="_ref_7410"><a href="#sec-numbertorawbytes">NumberToRawBytes</a></emu-xref>(<var>type</var>, <var>value</var>, <var>isLittleEndian</var>).</li><li>If <emu-xref aoid="IsSharedArrayBuffer" id="_ref_7411"><a href="#sec-issharedarraybuffer">IsSharedArrayBuffer</a></emu-xref>(<var>arrayBuffer</var>) is <emu-val>true</emu-val>, then<ol><li>Let <var>execution</var> be the [[CandidateExecution]] field of the <emu-xref href="#surrounding-agent" id="_ref_7412"><a href="#surrounding-agent">surrounding agent</a></emu-xref>'s <emu-xref href="#agent-record" id="_ref_7413"><a href="#agent-record">Agent Record</a></emu-xref>.</li><li>Let <var>eventList</var> be the [[EventList]] field of the element in <var>execution</var>.[[EventsRecords]] whose [[AgentSignifier]] is <emu-xref aoid="AgentSignifier" id="_ref_7414"><a href="#sec-agentsignifier">AgentSignifier</a></emu-xref>().</li><li>If <var>isTypedArray</var> is <emu-val>true</emu-val> and <var>type</var> is <code>"Int8"</code>, <code>"Uint8"</code>, <code>"Int16"</code>, <code>"Uint16"</code>, <code>"Int32"</code>, or <code>"Uint32"</code>, let <var>noTear</var> be <emu-val>true</emu-val>; otherwise let <var>noTear</var> be <emu-val>false</emu-val>.</li><li>Append <emu-xref href="#sec-memory-model-fundamentals" id="_ref_7415"><a href="#sec-memory-model-fundamentals">WriteSharedMemory</a></emu-xref> { [[Order]]: <var>order</var>, [[NoTear]]: <var>noTear</var>, [[Block]]: <var>block</var>, [[ByteIndex]]: <var>byteIndex</var>, [[ElementSize]]: <var>elementSize</var>, [[Payload]]: <var>rawBytes</var> } to <var>eventList</var>.</li></ol></li><li>Else, store the individual bytes of <var>rawBytes</var> into <var>block</var>, in order, starting at <var>block</var>[<var>byteIndex</var>].</li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_7416"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-val>undefined</emu-val>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-getmodifysetvalueinbuffer" aoid="GetModifySetValueInBuffer">
<h1><span class="secnum">24.1.1.9</span>GetModifySetValueInBuffer ( <var>arrayBuffer</var>, <var>byteIndex</var>, <var>type</var>, <var>value</var>, <var>op</var> [ , <var>isLittleEndian</var> ] )</h1>
<p>The abstract operation GetModifySetValueInBuffer takes six parameters, a SharedArrayBuffer <var>arrayBuffer</var>, a nonnegative integer <var>byteIndex</var>, a String <var>type</var>, a Number <var>value</var>, a semantic function <var>op</var>, and optionally a Boolean <var>isLittleEndian</var>. This operation performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_7417"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsSharedArrayBuffer" id="_ref_7418"><a href="#sec-issharedarraybuffer">IsSharedArrayBuffer</a></emu-xref>(<var>arrayBuffer</var>) is <emu-val>true</emu-val>.</li><li><emu-xref href="#assert" id="_ref_7419"><a href="#assert">Assert</a></emu-xref>: There are sufficient bytes in <var>arrayBuffer</var> starting at <var>byteIndex</var> to represent a value of <var>type</var>.</li><li><emu-xref href="#assert" id="_ref_7420"><a href="#assert">Assert</a></emu-xref>: <var>byteIndex</var> is an integer value ≥ 0.</li><li><emu-xref href="#assert" id="_ref_7421"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_7422"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>value</var>) is Number.</li><li>Let <var>block</var> be <var>arrayBuffer</var>.[[ArrayBufferData]].</li><li>Let <var>elementSize</var> be the Number value of the Element Size value specified in <emu-xref href="#table-49" id="_ref_661"><a href="#table-49">Table 59</a></emu-xref> for Element Type <var>type</var>.</li><li>If <var>isLittleEndian</var> is not present, set <var>isLittleEndian</var> to the value of the [[LittleEndian]] field of the <emu-xref href="#surrounding-agent" id="_ref_7423"><a href="#surrounding-agent">surrounding agent</a></emu-xref>'s <emu-xref href="#agent-record" id="_ref_7424"><a href="#agent-record">Agent Record</a></emu-xref>.</li><li>Let <var>rawBytes</var> be <emu-xref aoid="NumberToRawBytes" id="_ref_7425"><a href="#sec-numbertorawbytes">NumberToRawBytes</a></emu-xref>(<var>type</var>, <var>value</var>, <var>isLittleEndian</var>).</li><li>Let <var>execution</var> be the [[CandidateExecution]] field of the <emu-xref href="#surrounding-agent" id="_ref_7426"><a href="#surrounding-agent">surrounding agent</a></emu-xref>'s <emu-xref href="#agent-record" id="_ref_7427"><a href="#agent-record">Agent Record</a></emu-xref>.</li><li>Let <var>eventList</var> be the [[EventList]] field of the element in <var>execution</var>.[[EventsRecords]] whose [[AgentSignifier]] is <emu-xref aoid="AgentSignifier" id="_ref_7428"><a href="#sec-agentsignifier">AgentSignifier</a></emu-xref>().</li><li>Let <var>rawBytesRead</var> be a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7429"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of length <var>elementSize</var> of nondeterministically chosen byte values.</li><li>NOTE: In implementations, <var>rawBytesRead</var>
is the result of a load-link, of a load-exclusive, or of an operand of a
read-modify-write instruction on the underlying hardware. The
nondeterminism is a semantic prescription of the <emu-xref href="#sec-memory-model" id="_ref_7430"><a href="#sec-memory-model">memory model</a></emu-xref> to describe observable behaviour of hardware with weak consistency.</li><li>Let <var>rmwEvent</var> be <emu-xref href="#sec-memory-model-fundamentals" id="_ref_7431"><a href="#sec-memory-model-fundamentals">ReadModifyWriteSharedMemory</a></emu-xref> { [[Order]]: <code>"SeqCst"</code>, [[NoTear]]: <emu-val>true</emu-val>, [[Block]]: <var>block</var>, [[ByteIndex]]: <var>byteIndex</var>, [[ElementSize]]: <var>elementSize</var>, [[Payload]]: <var>rawBytes</var>, [[ModifyOp]]: <var>op</var> }.</li><li>Append <var>rmwEvent</var> to <var>eventList</var>.</li><li>Append <emu-xref href="#sec-chosen-value-records" id="_ref_7432"><a href="#sec-chosen-value-records">Chosen Value Record</a></emu-xref> { [[Event]]: <var>rmwEvent</var>, [[ChosenValue]]: <var>rawBytesRead</var> } to <var>execution</var>.[[ChosenValues]].</li><li>Return <emu-xref aoid="RawBytesToNumber" id="_ref_7433"><a href="#sec-rawbytestonumber">RawBytesToNumber</a></emu-xref>(<var>type</var>, <var>rawBytesRead</var>, <var>isLittleEndian</var>).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-arraybuffer-constructor">
<h1><span class="secnum">24.1.2</span>The ArrayBuffer Constructor</h1>
<p>The ArrayBuffer <emu-xref href="#constructor" id="_ref_7434"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>is the intrinsic object <dfn>%ArrayBuffer%</dfn>.</li>
<li>is the initial value of the <code>ArrayBuffer</code> property of the <emu-xref href="#sec-global-object" id="_ref_7435"><a href="#sec-global-object">global object</a></emu-xref>.</li>
<li>creates and initializes a new ArrayBuffer object when called as a <emu-xref href="#constructor" id="_ref_7436"><a href="#constructor">constructor</a></emu-xref>.</li>
<li>is not intended to be called as a function and will throw an exception when called in that manner.</li>
<li>is designed to be subclassable. It may be used as the value of an <code>extends</code> clause of a class definition. Subclass constructors that intend to inherit the specified <code>ArrayBuffer</code> behaviour must include a <code>super</code> call to the <code>ArrayBuffer</code> <emu-xref href="#constructor" id="_ref_7437"><a href="#constructor">constructor</a></emu-xref> to create and initialize subclass instances with the internal state necessary to support the <code>ArrayBuffer.prototype</code> built-in methods.</li>
</ul>
<emu-clause id="sec-arraybuffer-length">
<h1><span class="secnum">24.1.2.1</span>ArrayBuffer ( <var>length</var> )</h1>
<p>When the <code>ArrayBuffer</code> function is called with argument <var>length</var>, the following steps are taken:</p>
<emu-alg><ol><li>If NewTarget is <emu-val>undefined</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>byteLength</var> be ?&nbsp;<emu-xref aoid="ToIndex" id="_ref_7438"><a href="#sec-toindex">ToIndex</a></emu-xref>(<var>length</var>).</li><li>Return ?&nbsp;<emu-xref aoid="AllocateArrayBuffer" id="_ref_7439"><a href="#sec-allocatearraybuffer">AllocateArrayBuffer</a></emu-xref>(NewTarget, <var>byteLength</var>).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-arraybuffer-constructor">
<h1><span class="secnum">24.1.3</span>Properties of the ArrayBuffer Constructor</h1>
<p>The ArrayBuffer <emu-xref href="#constructor" id="_ref_7440"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_7441"><a href="#sec-properties-of-the-function-prototype-object">%FunctionPrototype%</a></emu-xref>.</li>
<li>has the following properties:</li>
</ul>
<emu-clause id="sec-arraybuffer.isview">
<h1><span class="secnum">24.1.3.1</span>ArrayBuffer.isView ( <var>arg</var> )</h1>
<p>The <code>isView</code> function takes one argument <var>arg</var>, and performs the following steps:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_7442"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>arg</var>) is not Object, return <emu-val>false</emu-val>.</li><li>If <var>arg</var> has a [[ViewedArrayBuffer]] internal slot, return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-arraybuffer.prototype">
<h1><span class="secnum">24.1.3.2</span>ArrayBuffer.prototype</h1>
<p>The initial value of <code>ArrayBuffer.prototype</code> is the intrinsic object <emu-xref href="#sec-properties-of-the-arraybuffer-prototype-object" id="_ref_7443"><a href="#sec-properties-of-the-arraybuffer-prototype-object">%ArrayBufferPrototype%</a></emu-xref>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-get-arraybuffer-@@species">
<h1><span class="secnum">24.1.3.3</span>get ArrayBuffer [ @@species ]</h1>
<p><code>ArrayBuffer[@@species]</code> is an <emu-xref href="#sec-object-type" id="_ref_7444"><a href="#sec-object-type">accessor property</a></emu-xref> whose set accessor function is <emu-val>undefined</emu-val>. Its get accessor function performs the following steps:</p>
<emu-alg><ol><li>Return the <emu-val>this</emu-val> value.
</li></ol></emu-alg>
<p>The value of the <code>name</code> property of this function is <code>"get [Symbol.species]"</code>.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>ArrayBuffer prototype methods normally use their <code>this</code> object's <emu-xref href="#constructor" id="_ref_7445"><a href="#constructor">constructor</a></emu-xref> to create a derived object. However, a subclass <emu-xref href="#constructor" id="_ref_7446"><a href="#constructor">constructor</a></emu-xref> may over-ride that default behaviour by redefining its @@species property.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-arraybuffer-prototype-object">
<h1><span class="secnum">24.1.4</span>Properties of the ArrayBuffer Prototype Object</h1>
<p>The ArrayBuffer prototype object:</p>
<ul>
<li>is the intrinsic object <dfn>%ArrayBufferPrototype%</dfn>.</li>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_7447"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>.</li>
<li>is an ordinary object.</li>
<li>does not have an [[ArrayBufferData]] or [[ArrayBufferByteLength]] internal slot.</li>
</ul>
<emu-clause id="sec-get-arraybuffer.prototype.bytelength">
<h1><span class="secnum">24.1.4.1</span>get ArrayBuffer.prototype.byteLength</h1>
<p><code>ArrayBuffer.prototype.byteLength</code> is an <emu-xref href="#sec-object-type" id="_ref_7448"><a href="#sec-object-type">accessor property</a></emu-xref> whose set accessor function is <emu-val>undefined</emu-val>. Its get accessor function performs the following steps:</p>
<emu-alg><ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_7449"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>O</var> does not have an [[ArrayBufferData]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <emu-xref aoid="IsSharedArrayBuffer" id="_ref_7450"><a href="#sec-issharedarraybuffer">IsSharedArrayBuffer</a></emu-xref>(<var>O</var>) is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <emu-xref aoid="IsDetachedBuffer" id="_ref_7451"><a href="#sec-isdetachedbuffer">IsDetachedBuffer</a></emu-xref>(<var>O</var>) is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>length</var> be <var>O</var>.[[ArrayBufferByteLength]].</li><li>Return <var>length</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-arraybuffer.prototype.constructor">
<h1><span class="secnum">24.1.4.2</span>ArrayBuffer.prototype.constructor</h1>
<p>The initial value of <code>ArrayBuffer.prototype.constructor</code> is the intrinsic object <emu-xref href="#sec-arraybuffer-constructor" id="_ref_7452"><a href="#sec-arraybuffer-constructor">%ArrayBuffer%</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-arraybuffer.prototype.slice">
<h1><span class="secnum">24.1.4.3</span>ArrayBuffer.prototype.slice ( <var>start</var>, <var>end</var> )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_7453"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>O</var> does not have an [[ArrayBufferData]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <emu-xref aoid="IsSharedArrayBuffer" id="_ref_7454"><a href="#sec-issharedarraybuffer">IsSharedArrayBuffer</a></emu-xref>(<var>O</var>) is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <emu-xref aoid="IsDetachedBuffer" id="_ref_7455"><a href="#sec-isdetachedbuffer">IsDetachedBuffer</a></emu-xref>(<var>O</var>) is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>len</var> be <var>O</var>.[[ArrayBufferByteLength]].</li><li>Let <var>relativeStart</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_7456"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>start</var>).</li><li>If <var>relativeStart</var> &lt; 0, let <var>first</var> be <emu-xref aoid="max" id="_ref_7457"><a href="#eqn-max">max</a></emu-xref>((<var>len</var> + <var>relativeStart</var>), 0); else let <var>first</var> be <emu-xref aoid="min" id="_ref_7458"><a href="#eqn-min">min</a></emu-xref>(<var>relativeStart</var>, <var>len</var>).</li><li>If <var>end</var> is <emu-val>undefined</emu-val>, let <var>relativeEnd</var> be <var>len</var>; else let <var>relativeEnd</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_7459"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>end</var>).</li><li>If <var>relativeEnd</var> &lt; 0, let <var>final</var> be <emu-xref aoid="max" id="_ref_7460"><a href="#eqn-max">max</a></emu-xref>((<var>len</var> + <var>relativeEnd</var>), 0); else let <var>final</var> be <emu-xref aoid="min" id="_ref_7461"><a href="#eqn-min">min</a></emu-xref>(<var>relativeEnd</var>, <var>len</var>).</li><li>Let <var>newLen</var> be <emu-xref aoid="max" id="_ref_7462"><a href="#eqn-max">max</a></emu-xref>(<var>final</var> - <var>first</var>, 0).</li><li>Let <var>ctor</var> be ?&nbsp;<emu-xref aoid="SpeciesConstructor" id="_ref_7463"><a href="#sec-speciesconstructor">SpeciesConstructor</a></emu-xref>(<var>O</var>, <emu-xref href="#sec-arraybuffer-constructor" id="_ref_7464"><a href="#sec-arraybuffer-constructor">%ArrayBuffer%</a></emu-xref>).</li><li>Let <var>new</var> be ?&nbsp;<emu-xref aoid="Construct" id="_ref_7465"><a href="#sec-construct">Construct</a></emu-xref>(<var>ctor</var>, « <var>newLen</var> »).</li><li>If <var>new</var> does not have an [[ArrayBufferData]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <emu-xref aoid="IsSharedArrayBuffer" id="_ref_7466"><a href="#sec-issharedarraybuffer">IsSharedArrayBuffer</a></emu-xref>(<var>new</var>) is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <emu-xref aoid="IsDetachedBuffer" id="_ref_7467"><a href="#sec-isdetachedbuffer">IsDetachedBuffer</a></emu-xref>(<var>new</var>) is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <emu-xref aoid="SameValue" id="_ref_7468"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>new</var>, <var>O</var>) is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>new</var>.[[ArrayBufferByteLength]] &lt; <var>newLen</var>, throw a <emu-val>TypeError</emu-val> exception.</li><li>NOTE: Side-effects of the above steps may have detached <var>O</var>.</li><li>If <emu-xref aoid="IsDetachedBuffer" id="_ref_7469"><a href="#sec-isdetachedbuffer">IsDetachedBuffer</a></emu-xref>(<var>O</var>) is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>fromBuf</var> be <var>O</var>.[[ArrayBufferData]].</li><li>Let <var>toBuf</var> be <var>new</var>.[[ArrayBufferData]].</li><li>Perform <emu-xref aoid="CopyDataBlockBytes" id="_ref_7470"><a href="#sec-copydatablockbytes">CopyDataBlockBytes</a></emu-xref>(<var>toBuf</var>, 0, <var>fromBuf</var>, <var>first</var>, <var>newLen</var>).</li><li>Return <var>new</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-arraybuffer.prototype-@@tostringtag">
<h1><span class="secnum">24.1.4.4</span>ArrayBuffer.prototype [ @@toStringTag ]</h1>
<p>The initial value of the @@toStringTag property is the String value <code>"ArrayBuffer"</code>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-arraybuffer-instances">
<h1><span class="secnum">24.1.5</span>Properties of ArrayBuffer Instances</h1>
<p>ArrayBuffer instances inherit properties from the ArrayBuffer
prototype object. ArrayBuffer instances each have an [[ArrayBufferData]]
internal slot, an [[ArrayBufferByteLength]] internal slot, and an
[[ArrayBufferDetachKey]] internal slot.</p>
<p>ArrayBuffer instances whose [[ArrayBufferData]] is <emu-val>null</emu-val> are considered to be detached and all operators to access or modify data contained in the ArrayBuffer instance will fail.</p>
<p>ArrayBuffer instances whose [[ArrayBufferDetachKey]] is set to a value other than <emu-val>undefined</emu-val> need to have all <emu-xref aoid="DetachArrayBuffer" id="_ref_7471"><a href="#sec-detacharraybuffer">DetachArrayBuffer</a></emu-xref>
calls passing that same "detach key" as an argument, otherwise a
TypeError will result. This internal slot is only ever set by certain
embedding environments, not by algorithms in this specification.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-sharedarraybuffer-objects">
<h1><span class="secnum">24.2</span>SharedArrayBuffer Objects</h1>
<emu-clause id="sec-abstract-operations-for-sharedarraybuffer-objects">
<h1><span class="secnum">24.2.1</span>Abstract Operations for SharedArrayBuffer Objects</h1>
<emu-clause id="sec-allocatesharedarraybuffer" aoid="AllocateSharedArrayBuffer">
<h1><span class="secnum">24.2.1.1</span>AllocateSharedArrayBuffer ( <var>constructor</var>, <var>byteLength</var> )</h1>
<p>The abstract operation AllocateSharedArrayBuffer with arguments <var>constructor</var> and <var>byteLength</var> is used to create a SharedArrayBuffer object. It performs the following steps:</p>
<emu-alg><ol><li>Let <var>obj</var> be ?&nbsp;<emu-xref aoid="OrdinaryCreateFromConstructor" id="_ref_7472"><a href="#sec-ordinarycreatefromconstructor">OrdinaryCreateFromConstructor</a></emu-xref>(<var>constructor</var>, <code>"%SharedArrayBufferPrototype%"</code>, « [[ArrayBufferData]], [[ArrayBufferByteLength]] »).</li><li><emu-xref href="#assert" id="_ref_7473"><a href="#assert">Assert</a></emu-xref>: <var>byteLength</var> is a nonnegative integer.</li><li>Let <var>block</var> be ?&nbsp;<emu-xref aoid="CreateSharedByteDataBlock" id="_ref_7474"><a href="#sec-createsharedbytedatablock">CreateSharedByteDataBlock</a></emu-xref>(<var>byteLength</var>).</li><li>Set <var>obj</var>.[[ArrayBufferData]] to <var>block</var>.</li><li>Set <var>obj</var>.[[ArrayBufferByteLength]] to <var>byteLength</var>.</li><li>Return <var>obj</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-issharedarraybuffer" aoid="IsSharedArrayBuffer">
<h1><span class="secnum">24.2.1.2</span>IsSharedArrayBuffer ( <var>obj</var> )</h1>
<p>IsSharedArrayBuffer tests whether an object is an
ArrayBuffer, a SharedArrayBuffer, or a subtype of either. It performs
the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_7475"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_7476"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>obj</var>) is Object and it has an [[ArrayBufferData]] internal slot.</li><li>Let <var>bufferData</var> be <var>obj</var>.[[ArrayBufferData]].</li><li>If <var>bufferData</var> is <emu-val>null</emu-val>, return <emu-val>false</emu-val>.</li><li>If <var>bufferData</var> is a <emu-xref href="#sec-data-blocks" id="_ref_7477"><a href="#sec-data-blocks">Data Block</a></emu-xref>, return <emu-val>false</emu-val>.</li><li><emu-xref href="#assert" id="_ref_7478"><a href="#assert">Assert</a></emu-xref>: <var>bufferData</var> is a <emu-xref href="#sec-data-blocks" id="_ref_7479"><a href="#sec-data-blocks">Shared Data Block</a></emu-xref>.</li><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-sharedarraybuffer-constructor">
<h1><span class="secnum">24.2.2</span>The SharedArrayBuffer Constructor</h1>
<p>The SharedArrayBuffer <emu-xref href="#constructor" id="_ref_7480"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>is the intrinsic object <dfn>%SharedArrayBuffer%</dfn>.</li>
<li>is the initial value of the <code>SharedArrayBuffer</code> property of the <emu-xref href="#sec-global-object" id="_ref_7481"><a href="#sec-global-object">global object</a></emu-xref>.</li>
<li>creates and initializes a new SharedArrayBuffer object when called as a <emu-xref href="#constructor" id="_ref_7482"><a href="#constructor">constructor</a></emu-xref>.</li>
<li>is not intended to be called as a function and will throw an exception when called in that manner.</li>
<li>is designed to be subclassable. It may be used as the value of an <code>extends</code> clause of a class definition. Subclass constructors that intend to inherit the specified <code>SharedArrayBuffer</code> behaviour must include a <code>super</code> call to the <code>SharedArrayBuffer</code> <emu-xref href="#constructor" id="_ref_7483"><a href="#constructor">constructor</a></emu-xref> to create and initialize subclass instances with the internal state necessary to support the <code>SharedArrayBuffer.prototype</code> built-in methods.</li>
</ul>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Unlike an <code>ArrayBuffer</code>, a <code>SharedArrayBuffer</code> cannot become detached, and its internal [[ArrayBufferData]] slot is never <emu-val>null</emu-val>.</p>
</div></emu-note>
<emu-clause id="sec-sharedarraybuffer-length">
<h1><span class="secnum">24.2.2.1</span>SharedArrayBuffer ( [ <var>length</var> ] )</h1>
<p>When the <code>SharedArrayBuffer</code> function is called with optional argument <var>length</var>, the following steps are taken:</p>
<emu-alg><ol><li>If NewTarget is <emu-val>undefined</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>byteLength</var> be ?&nbsp;<emu-xref aoid="ToIndex" id="_ref_7484"><a href="#sec-toindex">ToIndex</a></emu-xref>(<var>length</var>).</li><li>Return ?&nbsp;<emu-xref aoid="AllocateSharedArrayBuffer" id="_ref_7485"><a href="#sec-allocatesharedarraybuffer">AllocateSharedArrayBuffer</a></emu-xref>(NewTarget, <var>byteLength</var>).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-sharedarraybuffer-constructor">
<h1><span class="secnum">24.2.3</span>Properties of the SharedArrayBuffer Constructor</h1>
<p>The SharedArrayBuffer <emu-xref href="#constructor" id="_ref_7486"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_7487"><a href="#sec-properties-of-the-function-prototype-object">%FunctionPrototype%</a></emu-xref>.</li>
<li>has the following properties:</li>
</ul>
<emu-clause id="sec-sharedarraybuffer.prototype">
<h1><span class="secnum">24.2.3.1</span>SharedArrayBuffer.prototype</h1>
<p>The initial value of <code>SharedArrayBuffer.prototype</code> is the intrinsic object <emu-xref href="#sec-properties-of-the-sharedarraybuffer-prototype-object" id="_ref_7488"><a href="#sec-properties-of-the-sharedarraybuffer-prototype-object">%SharedArrayBufferPrototype%</a></emu-xref>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-sharedarraybuffer-@@species">
<h1><span class="secnum">24.2.3.2</span>get SharedArrayBuffer [ @@species ]</h1>
<p><code>SharedArrayBuffer[@@species]</code> is an <emu-xref href="#sec-object-type" id="_ref_7489"><a href="#sec-object-type">accessor property</a></emu-xref> whose set accessor function is <emu-val>undefined</emu-val>. Its get accessor function performs the following steps:</p>
<emu-alg><ol><li>Return the <emu-val>this</emu-val> value.
</li></ol></emu-alg>
<p>The value of the <code>name</code> property of this function is <code>"get [Symbol.species]"</code>.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-sharedarraybuffer-prototype-object">
<h1><span class="secnum">24.2.4</span>Properties of the SharedArrayBuffer Prototype Object</h1>
<p>The SharedArrayBuffer prototype object:</p>
<ul>
<li>is the intrinsic object <dfn>%SharedArrayBufferPrototype%</dfn>.</li>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_7490"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>.</li>
<li>is an ordinary object.</li>
<li>does not have an [[ArrayBufferData]] or [[ArrayBufferByteLength]] internal slot.</li>
</ul>
<emu-clause id="sec-get-sharedarraybuffer.prototype.bytelength">
<h1><span class="secnum">24.2.4.1</span>get SharedArrayBuffer.prototype.byteLength</h1>
<p><code>SharedArrayBuffer.prototype.byteLength</code> is an <emu-xref href="#sec-object-type" id="_ref_7491"><a href="#sec-object-type">accessor property</a></emu-xref> whose set accessor function is <emu-val>undefined</emu-val>. Its get accessor function performs the following steps:</p>
<emu-alg><ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_7492"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>O</var> does not have an [[ArrayBufferData]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <emu-xref aoid="IsSharedArrayBuffer" id="_ref_7493"><a href="#sec-issharedarraybuffer">IsSharedArrayBuffer</a></emu-xref>(<var>O</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>length</var> be <var>O</var>.[[ArrayBufferByteLength]].</li><li>Return <var>length</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-sharedarraybuffer.prototype.constructor">
<h1><span class="secnum">24.2.4.2</span>SharedArrayBuffer.prototype.constructor</h1>
<p>The initial value of <code>SharedArrayBuffer.prototype.constructor</code> is the intrinsic object <emu-xref href="#sec-sharedarraybuffer-constructor" id="_ref_7494"><a href="#sec-sharedarraybuffer-constructor">%SharedArrayBuffer%</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-sharedarraybuffer.prototype.slice">
<h1><span class="secnum">24.2.4.3</span>SharedArrayBuffer.prototype.slice ( <var>start</var>, <var>end</var> )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_7495"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>O</var> does not have an [[ArrayBufferData]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <emu-xref aoid="IsSharedArrayBuffer" id="_ref_7496"><a href="#sec-issharedarraybuffer">IsSharedArrayBuffer</a></emu-xref>(<var>O</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>len</var> be <var>O</var>.[[ArrayBufferByteLength]].</li><li>Let <var>relativeStart</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_7497"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>start</var>).</li><li>If <var>relativeStart</var> &lt; 0, let <var>first</var> be <emu-xref aoid="max" id="_ref_7498"><a href="#eqn-max">max</a></emu-xref>((<var>len</var> + <var>relativeStart</var>), 0); else let <var>first</var> be <emu-xref aoid="min" id="_ref_7499"><a href="#eqn-min">min</a></emu-xref>(<var>relativeStart</var>, <var>len</var>).</li><li>If <var>end</var> is <emu-val>undefined</emu-val>, let <var>relativeEnd</var> be <var>len</var>; else let <var>relativeEnd</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_7500"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>end</var>).</li><li>If <var>relativeEnd</var> &lt; 0, let <var>final</var> be <emu-xref aoid="max" id="_ref_7501"><a href="#eqn-max">max</a></emu-xref>((<var>len</var> + <var>relativeEnd</var>), 0); else let <var>final</var> be <emu-xref aoid="min" id="_ref_7502"><a href="#eqn-min">min</a></emu-xref>(<var>relativeEnd</var>, <var>len</var>).</li><li>Let <var>newLen</var> be <emu-xref aoid="max" id="_ref_7503"><a href="#eqn-max">max</a></emu-xref>(<var>final</var> - <var>first</var>, 0).</li><li>Let <var>ctor</var> be ?&nbsp;<emu-xref aoid="SpeciesConstructor" id="_ref_7504"><a href="#sec-speciesconstructor">SpeciesConstructor</a></emu-xref>(<var>O</var>, <emu-xref href="#sec-sharedarraybuffer-constructor" id="_ref_7505"><a href="#sec-sharedarraybuffer-constructor">%SharedArrayBuffer%</a></emu-xref>).</li><li>Let <var>new</var> be ?&nbsp;<emu-xref aoid="Construct" id="_ref_7506"><a href="#sec-construct">Construct</a></emu-xref>(<var>ctor</var>, « <var>newLen</var> »).</li><li>If <var>new</var> does not have an [[ArrayBufferData]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <emu-xref aoid="IsSharedArrayBuffer" id="_ref_7507"><a href="#sec-issharedarraybuffer">IsSharedArrayBuffer</a></emu-xref>(<var>new</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>new</var>.[[ArrayBufferData]] and <var>O</var>.[[ArrayBufferData]] are the same <emu-xref href="#sec-data-blocks" id="_ref_7508"><a href="#sec-data-blocks">Shared Data Block</a></emu-xref> values, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>new</var>.[[ArrayBufferByteLength]] &lt; <var>newLen</var>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>fromBuf</var> be <var>O</var>.[[ArrayBufferData]].</li><li>Let <var>toBuf</var> be <var>new</var>.[[ArrayBufferData]].</li><li>Perform <emu-xref aoid="CopyDataBlockBytes" id="_ref_7509"><a href="#sec-copydatablockbytes">CopyDataBlockBytes</a></emu-xref>(<var>toBuf</var>, 0, <var>fromBuf</var>, <var>first</var>, <var>newLen</var>).</li><li>Return <var>new</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-sharedarraybuffer.prototype.toString">
<h1><span class="secnum">24.2.4.4</span>SharedArrayBuffer.prototype [ @@toStringTag ]</h1>
<p>The initial value of the @@toStringTag property is the String value <code>"SharedArrayBuffer"</code>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-sharedarraybuffer-instances">
<h1><span class="secnum">24.2.5</span>Properties of SharedArrayBuffer Instances</h1>
<p>SharedArrayBuffer instances inherit properties from the
SharedArrayBuffer prototype object. SharedArrayBuffer instances each
have an [[ArrayBufferData]] internal slot and an
[[ArrayBufferByteLength]] internal slot.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>SharedArrayBuffer instances, unlike ArrayBuffer instances, are never detached.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-dataview-objects">
<h1><span class="secnum">24.3</span>DataView Objects</h1>
<emu-clause id="sec-abstract-operations-for-dataview-objects">
<h1><span class="secnum">24.3.1</span>Abstract Operations For DataView Objects</h1>
<emu-clause id="sec-getviewvalue" aoid="GetViewValue">
<h1><span class="secnum">24.3.1.1</span>GetViewValue ( <var>view</var>, <var>requestIndex</var>, <var>isLittleEndian</var>, <var>type</var> )</h1>
<p>The abstract operation GetViewValue with arguments <var>view</var>, <var>requestIndex</var>, <var>isLittleEndian</var>, and <var>type</var> is used by functions on DataView instances to retrieve values from the view's buffer. It performs the following steps:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_7510"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>view</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>view</var> does not have a [[DataView]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li><emu-xref href="#assert" id="_ref_7511"><a href="#assert">Assert</a></emu-xref>: <var>view</var> has a [[ViewedArrayBuffer]] internal slot.</li><li>Let <var>getIndex</var> be ?&nbsp;<emu-xref aoid="ToIndex" id="_ref_7512"><a href="#sec-toindex">ToIndex</a></emu-xref>(<var>requestIndex</var>).</li><li>Set <var>isLittleEndian</var> to <emu-xref aoid="ToBoolean" id="_ref_7513"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(<var>isLittleEndian</var>).</li><li>Let <var>buffer</var> be <var>view</var>.[[ViewedArrayBuffer]].</li><li>If <emu-xref aoid="IsDetachedBuffer" id="_ref_7514"><a href="#sec-isdetachedbuffer">IsDetachedBuffer</a></emu-xref>(<var>buffer</var>) is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>viewOffset</var> be <var>view</var>.[[ByteOffset]].</li><li>Let <var>viewSize</var> be <var>view</var>.[[ByteLength]].</li><li>Let <var>elementSize</var> be the Number value of the Element Size value specified in <emu-xref href="#table-49" id="_ref_662"><a href="#table-49">Table 59</a></emu-xref> for Element Type <var>type</var>.</li><li>If <var>getIndex</var> + <var>elementSize</var> &gt; <var>viewSize</var>, throw a <emu-val>RangeError</emu-val> exception.</li><li>Let <var>bufferIndex</var> be <var>getIndex</var> + <var>viewOffset</var>.</li><li>Return <emu-xref aoid="GetValueFromBuffer" id="_ref_7515"><a href="#sec-getvaluefrombuffer">GetValueFromBuffer</a></emu-xref>(<var>buffer</var>, <var>bufferIndex</var>, <var>type</var>, <emu-val>false</emu-val>, <code>"Unordered"</code>, <var>isLittleEndian</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-setviewvalue" aoid="SetViewValue">
<h1><span class="secnum">24.3.1.2</span>SetViewValue ( <var>view</var>, <var>requestIndex</var>, <var>isLittleEndian</var>, <var>type</var>, <var>value</var> )</h1>
<p>The abstract operation SetViewValue with arguments <var>view</var>, <var>requestIndex</var>, <var>isLittleEndian</var>, <var>type</var>, and <var>value</var> is used by functions on DataView instances to store values into the view's buffer. It performs the following steps:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_7516"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>view</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>view</var> does not have a [[DataView]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li><emu-xref href="#assert" id="_ref_7517"><a href="#assert">Assert</a></emu-xref>: <var>view</var> has a [[ViewedArrayBuffer]] internal slot.</li><li>Let <var>getIndex</var> be ?&nbsp;<emu-xref aoid="ToIndex" id="_ref_7518"><a href="#sec-toindex">ToIndex</a></emu-xref>(<var>requestIndex</var>).</li><li>Let <var>numberValue</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_7519"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>value</var>).</li><li>Set <var>isLittleEndian</var> to <emu-xref aoid="ToBoolean" id="_ref_7520"><a href="#sec-toboolean">ToBoolean</a></emu-xref>(<var>isLittleEndian</var>).</li><li>Let <var>buffer</var> be <var>view</var>.[[ViewedArrayBuffer]].</li><li>If <emu-xref aoid="IsDetachedBuffer" id="_ref_7521"><a href="#sec-isdetachedbuffer">IsDetachedBuffer</a></emu-xref>(<var>buffer</var>) is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>viewOffset</var> be <var>view</var>.[[ByteOffset]].</li><li>Let <var>viewSize</var> be <var>view</var>.[[ByteLength]].</li><li>Let <var>elementSize</var> be the Number value of the Element Size value specified in <emu-xref href="#table-49" id="_ref_663"><a href="#table-49">Table 59</a></emu-xref> for Element Type <var>type</var>.</li><li>If <var>getIndex</var> + <var>elementSize</var> &gt; <var>viewSize</var>, throw a <emu-val>RangeError</emu-val> exception.</li><li>Let <var>bufferIndex</var> be <var>getIndex</var> + <var>viewOffset</var>.</li><li>Return <emu-xref aoid="SetValueInBuffer" id="_ref_7522"><a href="#sec-setvalueinbuffer">SetValueInBuffer</a></emu-xref>(<var>buffer</var>, <var>bufferIndex</var>, <var>type</var>, <var>numberValue</var>, <emu-val>false</emu-val>, <code>"Unordered"</code>, <var>isLittleEndian</var>).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-dataview-constructor">
<h1><span class="secnum">24.3.2</span>The DataView Constructor</h1>
<p>The DataView <emu-xref href="#constructor" id="_ref_7523"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>is the intrinsic object <dfn>%DataView%</dfn>.</li>
<li>is the initial value of the <code>DataView</code> property of the <emu-xref href="#sec-global-object" id="_ref_7524"><a href="#sec-global-object">global object</a></emu-xref>.</li>
<li>creates and initializes a new DataView object when called as a <emu-xref href="#constructor" id="_ref_7525"><a href="#constructor">constructor</a></emu-xref>.</li>
<li>is not intended to be called as a function and will throw an exception when called in that manner.</li>
<li>is designed to be subclassable. It may be used as the value of an <code>extends</code> clause of a class definition. Subclass constructors that intend to inherit the specified <code>DataView</code> behaviour must include a <code>super</code> call to the <code>DataView</code> <emu-xref href="#constructor" id="_ref_7526"><a href="#constructor">constructor</a></emu-xref> to create and initialize subclass instances with the internal state necessary to support the <code>DataView.prototype</code> built-in methods.</li>
</ul>
<emu-clause id="sec-dataview-buffer-byteoffset-bytelength">
<h1><span class="secnum">24.3.2.1</span>DataView ( <var>buffer</var> [ , <var>byteOffset</var> [ , <var>byteLength</var> ] ] )</h1>
<p>When the <code>DataView</code> function is called with at least one argument <var>buffer</var>, the following steps are taken:</p>
<emu-alg><ol><li>If NewTarget is <emu-val>undefined</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <emu-xref aoid="Type" id="_ref_7527"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>buffer</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>buffer</var> does not have an [[ArrayBufferData]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>offset</var> be ?&nbsp;<emu-xref aoid="ToIndex" id="_ref_7528"><a href="#sec-toindex">ToIndex</a></emu-xref>(<var>byteOffset</var>).</li><li>If <emu-xref aoid="IsDetachedBuffer" id="_ref_7529"><a href="#sec-isdetachedbuffer">IsDetachedBuffer</a></emu-xref>(<var>buffer</var>) is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>bufferByteLength</var> be <var>buffer</var>.[[ArrayBufferByteLength]].</li><li>If <var>offset</var> &gt; <var>bufferByteLength</var>, throw a <emu-val>RangeError</emu-val> exception.</li><li>If <var>byteLength</var> is either not present or <emu-val>undefined</emu-val>, then<ol><li>Let <var>viewByteLength</var> be <var>bufferByteLength</var> - <var>offset</var>.</li></ol></li><li>Else,<ol><li>Let <var>viewByteLength</var> be ?&nbsp;<emu-xref aoid="ToIndex" id="_ref_7530"><a href="#sec-toindex">ToIndex</a></emu-xref>(<var>byteLength</var>).</li><li>If <var>offset</var> + <var>viewByteLength</var> &gt; <var>bufferByteLength</var>, throw a <emu-val>RangeError</emu-val> exception.</li></ol></li><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="OrdinaryCreateFromConstructor" id="_ref_7531"><a href="#sec-ordinarycreatefromconstructor">OrdinaryCreateFromConstructor</a></emu-xref>(NewTarget, <code>"%DataViewPrototype%"</code>, « [[DataView]], [[ViewedArrayBuffer]], [[ByteLength]], [[ByteOffset]] »).</li><li>If <emu-xref aoid="IsDetachedBuffer" id="_ref_7532"><a href="#sec-isdetachedbuffer">IsDetachedBuffer</a></emu-xref>(<var>buffer</var>) is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Set <var>O</var>.[[ViewedArrayBuffer]] to <var>buffer</var>.</li><li>Set <var>O</var>.[[ByteLength]] to <var>viewByteLength</var>.</li><li>Set <var>O</var>.[[ByteOffset]] to <var>offset</var>.</li><li>Return <var>O</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-dataview-constructor">
<h1><span class="secnum">24.3.3</span>Properties of the DataView Constructor</h1>
<p>The DataView <emu-xref href="#constructor" id="_ref_7533"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_7534"><a href="#sec-properties-of-the-function-prototype-object">%FunctionPrototype%</a></emu-xref>.</li>
<li>has the following properties:</li>
</ul>
<emu-clause id="sec-dataview.prototype">
<h1><span class="secnum">24.3.3.1</span>DataView.prototype</h1>
<p>The initial value of <code>DataView.prototype</code> is the intrinsic object <emu-xref href="#sec-properties-of-the-dataview-prototype-object" id="_ref_7535"><a href="#sec-properties-of-the-dataview-prototype-object">%DataViewPrototype%</a></emu-xref>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-dataview-prototype-object">
<h1><span class="secnum">24.3.4</span>Properties of the DataView Prototype Object</h1>
<p>The DataView prototype object:</p>
<ul>
<li>is the intrinsic object <dfn>%DataViewPrototype%</dfn>.</li>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_7536"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>.</li>
<li>is an ordinary object.</li>
<li>does not have a [[DataView]], [[ViewedArrayBuffer]], [[ByteLength]], or [[ByteOffset]] internal slot.</li>
</ul>
<emu-clause id="sec-get-dataview.prototype.buffer">
<h1><span class="secnum">24.3.4.1</span>get DataView.prototype.buffer</h1>
<p><code>DataView.prototype.buffer</code> is an <emu-xref href="#sec-object-type" id="_ref_7537"><a href="#sec-object-type">accessor property</a></emu-xref> whose set accessor function is <emu-val>undefined</emu-val>. Its get accessor function performs the following steps:</p>
<emu-alg><ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_7538"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>O</var> does not have a [[DataView]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li><emu-xref href="#assert" id="_ref_7539"><a href="#assert">Assert</a></emu-xref>: <var>O</var> has a [[ViewedArrayBuffer]] internal slot.</li><li>Let <var>buffer</var> be <var>O</var>.[[ViewedArrayBuffer]].</li><li>Return <var>buffer</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-get-dataview.prototype.bytelength">
<h1><span class="secnum">24.3.4.2</span>get DataView.prototype.byteLength</h1>
<p><code>DataView.prototype.byteLength</code> is an <emu-xref href="#sec-object-type" id="_ref_7540"><a href="#sec-object-type">accessor property</a></emu-xref> whose set accessor function is <emu-val>undefined</emu-val>. Its get accessor function performs the following steps:</p>
<emu-alg><ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_7541"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>O</var> does not have a [[DataView]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li><emu-xref href="#assert" id="_ref_7542"><a href="#assert">Assert</a></emu-xref>: <var>O</var> has a [[ViewedArrayBuffer]] internal slot.</li><li>Let <var>buffer</var> be <var>O</var>.[[ViewedArrayBuffer]].</li><li>If <emu-xref aoid="IsDetachedBuffer" id="_ref_7543"><a href="#sec-isdetachedbuffer">IsDetachedBuffer</a></emu-xref>(<var>buffer</var>) is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>size</var> be <var>O</var>.[[ByteLength]].</li><li>Return <var>size</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-get-dataview.prototype.byteoffset">
<h1><span class="secnum">24.3.4.3</span>get DataView.prototype.byteOffset</h1>
<p><code>DataView.prototype.byteOffset</code> is an <emu-xref href="#sec-object-type" id="_ref_7544"><a href="#sec-object-type">accessor property</a></emu-xref> whose set accessor function is <emu-val>undefined</emu-val>. Its get accessor function performs the following steps:</p>
<emu-alg><ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_7545"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>O</var> does not have a [[DataView]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li><emu-xref href="#assert" id="_ref_7546"><a href="#assert">Assert</a></emu-xref>: <var>O</var> has a [[ViewedArrayBuffer]] internal slot.</li><li>Let <var>buffer</var> be <var>O</var>.[[ViewedArrayBuffer]].</li><li>If <emu-xref aoid="IsDetachedBuffer" id="_ref_7547"><a href="#sec-isdetachedbuffer">IsDetachedBuffer</a></emu-xref>(<var>buffer</var>) is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>offset</var> be <var>O</var>.[[ByteOffset]].</li><li>Return <var>offset</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-dataview.prototype.constructor">
<h1><span class="secnum">24.3.4.4</span>DataView.prototype.constructor</h1>
<p>The initial value of <code>DataView.prototype.constructor</code> is the intrinsic object <emu-xref href="#sec-dataview-constructor" id="_ref_7548"><a href="#sec-dataview-constructor">%DataView%</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-dataview.prototype.getfloat32">
<h1><span class="secnum">24.3.4.5</span>DataView.prototype.getFloat32 ( <var>byteOffset</var> [ , <var>littleEndian</var> ] )</h1>
<p>When the <code>getFloat32</code> method is called with argument <var>byteOffset</var> and optional argument <var>littleEndian</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>v</var> be the <emu-val>this</emu-val> value.</li><li>If <var>littleEndian</var> is not present, set <var>littleEndian</var> to <emu-val>false</emu-val>.</li><li>Return ?&nbsp;<emu-xref aoid="GetViewValue" id="_ref_7549"><a href="#sec-getviewvalue">GetViewValue</a></emu-xref>(<var>v</var>, <var>byteOffset</var>, <var>littleEndian</var>, <code>"Float32"</code>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-dataview.prototype.getfloat64">
<h1><span class="secnum">24.3.4.6</span>DataView.prototype.getFloat64 ( <var>byteOffset</var> [ , <var>littleEndian</var> ] )</h1>
<p>When the <code>getFloat64</code> method is called with argument <var>byteOffset</var> and optional argument <var>littleEndian</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>v</var> be the <emu-val>this</emu-val> value.</li><li>If <var>littleEndian</var> is not present, set <var>littleEndian</var> to <emu-val>false</emu-val>.</li><li>Return ?&nbsp;<emu-xref aoid="GetViewValue" id="_ref_7550"><a href="#sec-getviewvalue">GetViewValue</a></emu-xref>(<var>v</var>, <var>byteOffset</var>, <var>littleEndian</var>, <code>"Float64"</code>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-dataview.prototype.getint8">
<h1><span class="secnum">24.3.4.7</span>DataView.prototype.getInt8 ( <var>byteOffset</var> )</h1>
<p>When the <code>getInt8</code> method is called with argument <var>byteOffset</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>v</var> be the <emu-val>this</emu-val> value.</li><li>Return ?&nbsp;<emu-xref aoid="GetViewValue" id="_ref_7551"><a href="#sec-getviewvalue">GetViewValue</a></emu-xref>(<var>v</var>, <var>byteOffset</var>, <emu-val>true</emu-val>, <code>"Int8"</code>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-dataview.prototype.getint16">
<h1><span class="secnum">24.3.4.8</span>DataView.prototype.getInt16 ( <var>byteOffset</var> [ , <var>littleEndian</var> ] )</h1>
<p>When the <code>getInt16</code> method is called with argument <var>byteOffset</var> and optional argument <var>littleEndian</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>v</var> be the <emu-val>this</emu-val> value.</li><li>If <var>littleEndian</var> is not present, set <var>littleEndian</var> to <emu-val>false</emu-val>.</li><li>Return ?&nbsp;<emu-xref aoid="GetViewValue" id="_ref_7552"><a href="#sec-getviewvalue">GetViewValue</a></emu-xref>(<var>v</var>, <var>byteOffset</var>, <var>littleEndian</var>, <code>"Int16"</code>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-dataview.prototype.getint32">
<h1><span class="secnum">24.3.4.9</span>DataView.prototype.getInt32 ( <var>byteOffset</var> [ , <var>littleEndian</var> ] )</h1>
<p>When the <code>getInt32</code> method is called with argument <var>byteOffset</var> and optional argument <var>littleEndian</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>v</var> be the <emu-val>this</emu-val> value.</li><li>If <var>littleEndian</var> is not present, set <var>littleEndian</var> to <emu-val>false</emu-val>.</li><li>Return ?&nbsp;<emu-xref aoid="GetViewValue" id="_ref_7553"><a href="#sec-getviewvalue">GetViewValue</a></emu-xref>(<var>v</var>, <var>byteOffset</var>, <var>littleEndian</var>, <code>"Int32"</code>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-dataview.prototype.getuint8">
<h1><span class="secnum">24.3.4.10</span>DataView.prototype.getUint8 ( <var>byteOffset</var> )</h1>
<p>When the <code>getUint8</code> method is called with argument <var>byteOffset</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>v</var> be the <emu-val>this</emu-val> value.</li><li>Return ?&nbsp;<emu-xref aoid="GetViewValue" id="_ref_7554"><a href="#sec-getviewvalue">GetViewValue</a></emu-xref>(<var>v</var>, <var>byteOffset</var>, <emu-val>true</emu-val>, <code>"Uint8"</code>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-dataview.prototype.getuint16">
<h1><span class="secnum">24.3.4.11</span>DataView.prototype.getUint16 ( <var>byteOffset</var> [ , <var>littleEndian</var> ] )</h1>
<p>When the <code>getUint16</code> method is called with argument <var>byteOffset</var> and optional argument <var>littleEndian</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>v</var> be the <emu-val>this</emu-val> value.</li><li>If <var>littleEndian</var> is not present, set <var>littleEndian</var> to <emu-val>false</emu-val>.</li><li>Return ?&nbsp;<emu-xref aoid="GetViewValue" id="_ref_7555"><a href="#sec-getviewvalue">GetViewValue</a></emu-xref>(<var>v</var>, <var>byteOffset</var>, <var>littleEndian</var>, <code>"Uint16"</code>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-dataview.prototype.getuint32">
<h1><span class="secnum">24.3.4.12</span>DataView.prototype.getUint32 ( <var>byteOffset</var> [ , <var>littleEndian</var> ] )</h1>
<p>When the <code>getUint32</code> method is called with argument <var>byteOffset</var> and optional argument <var>littleEndian</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>v</var> be the <emu-val>this</emu-val> value.</li><li>If <var>littleEndian</var> is not present, set <var>littleEndian</var> to <emu-val>false</emu-val>.</li><li>Return ?&nbsp;<emu-xref aoid="GetViewValue" id="_ref_7556"><a href="#sec-getviewvalue">GetViewValue</a></emu-xref>(<var>v</var>, <var>byteOffset</var>, <var>littleEndian</var>, <code>"Uint32"</code>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-dataview.prototype.setfloat32">
<h1><span class="secnum">24.3.4.13</span>DataView.prototype.setFloat32 ( <var>byteOffset</var>, <var>value</var> [ , <var>littleEndian</var> ] )</h1>
<p>When the <code>setFloat32</code> method is called with arguments <var>byteOffset</var> and <var>value</var> and optional argument <var>littleEndian</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>v</var> be the <emu-val>this</emu-val> value.</li><li>If <var>littleEndian</var> is not present, set <var>littleEndian</var> to <emu-val>false</emu-val>.</li><li>Return ?&nbsp;<emu-xref aoid="SetViewValue" id="_ref_7557"><a href="#sec-setviewvalue">SetViewValue</a></emu-xref>(<var>v</var>, <var>byteOffset</var>, <var>littleEndian</var>, <code>"Float32"</code>, <var>value</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-dataview.prototype.setfloat64">
<h1><span class="secnum">24.3.4.14</span>DataView.prototype.setFloat64 ( <var>byteOffset</var>, <var>value</var> [ , <var>littleEndian</var> ] )</h1>
<p>When the <code>setFloat64</code> method is called with arguments <var>byteOffset</var> and <var>value</var> and optional argument <var>littleEndian</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>v</var> be the <emu-val>this</emu-val> value.</li><li>If <var>littleEndian</var> is not present, set <var>littleEndian</var> to <emu-val>false</emu-val>.</li><li>Return ?&nbsp;<emu-xref aoid="SetViewValue" id="_ref_7558"><a href="#sec-setviewvalue">SetViewValue</a></emu-xref>(<var>v</var>, <var>byteOffset</var>, <var>littleEndian</var>, <code>"Float64"</code>, <var>value</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-dataview.prototype.setint8">
<h1><span class="secnum">24.3.4.15</span>DataView.prototype.setInt8 ( <var>byteOffset</var>, <var>value</var> )</h1>
<p>When the <code>setInt8</code> method is called with arguments <var>byteOffset</var> and <var>value</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>v</var> be the <emu-val>this</emu-val> value.</li><li>Return ?&nbsp;<emu-xref aoid="SetViewValue" id="_ref_7559"><a href="#sec-setviewvalue">SetViewValue</a></emu-xref>(<var>v</var>, <var>byteOffset</var>, <emu-val>true</emu-val>, <code>"Int8"</code>, <var>value</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-dataview.prototype.setint16">
<h1><span class="secnum">24.3.4.16</span>DataView.prototype.setInt16 ( <var>byteOffset</var>, <var>value</var> [ , <var>littleEndian</var> ] )</h1>
<p>When the <code>setInt16</code> method is called with arguments <var>byteOffset</var> and <var>value</var> and optional argument <var>littleEndian</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>v</var> be the <emu-val>this</emu-val> value.</li><li>If <var>littleEndian</var> is not present, set <var>littleEndian</var> to <emu-val>false</emu-val>.</li><li>Return ?&nbsp;<emu-xref aoid="SetViewValue" id="_ref_7560"><a href="#sec-setviewvalue">SetViewValue</a></emu-xref>(<var>v</var>, <var>byteOffset</var>, <var>littleEndian</var>, <code>"Int16"</code>, <var>value</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-dataview.prototype.setint32">
<h1><span class="secnum">24.3.4.17</span>DataView.prototype.setInt32 ( <var>byteOffset</var>, <var>value</var> [ , <var>littleEndian</var> ] )</h1>
<p>When the <code>setInt32</code> method is called with arguments <var>byteOffset</var> and <var>value</var> and optional argument <var>littleEndian</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>v</var> be the <emu-val>this</emu-val> value.</li><li>If <var>littleEndian</var> is not present, set <var>littleEndian</var> to <emu-val>false</emu-val>.</li><li>Return ?&nbsp;<emu-xref aoid="SetViewValue" id="_ref_7561"><a href="#sec-setviewvalue">SetViewValue</a></emu-xref>(<var>v</var>, <var>byteOffset</var>, <var>littleEndian</var>, <code>"Int32"</code>, <var>value</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-dataview.prototype.setuint8">
<h1><span class="secnum">24.3.4.18</span>DataView.prototype.setUint8 ( <var>byteOffset</var>, <var>value</var> )</h1>
<p>When the <code>setUint8</code> method is called with arguments <var>byteOffset</var> and <var>value</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>v</var> be the <emu-val>this</emu-val> value.</li><li>Return ?&nbsp;<emu-xref aoid="SetViewValue" id="_ref_7562"><a href="#sec-setviewvalue">SetViewValue</a></emu-xref>(<var>v</var>, <var>byteOffset</var>, <emu-val>true</emu-val>, <code>"Uint8"</code>, <var>value</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-dataview.prototype.setuint16">
<h1><span class="secnum">24.3.4.19</span>DataView.prototype.setUint16 ( <var>byteOffset</var>, <var>value</var> [ , <var>littleEndian</var> ] )</h1>
<p>When the <code>setUint16</code> method is called with arguments <var>byteOffset</var> and <var>value</var> and optional argument <var>littleEndian</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>v</var> be the <emu-val>this</emu-val> value.</li><li>If <var>littleEndian</var> is not present, set <var>littleEndian</var> to <emu-val>false</emu-val>.</li><li>Return ?&nbsp;<emu-xref aoid="SetViewValue" id="_ref_7563"><a href="#sec-setviewvalue">SetViewValue</a></emu-xref>(<var>v</var>, <var>byteOffset</var>, <var>littleEndian</var>, <code>"Uint16"</code>, <var>value</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-dataview.prototype.setuint32">
<h1><span class="secnum">24.3.4.20</span>DataView.prototype.setUint32 ( <var>byteOffset</var>, <var>value</var> [ , <var>littleEndian</var> ] )</h1>
<p>When the <code>setUint32</code> method is called with arguments <var>byteOffset</var> and <var>value</var> and optional argument <var>littleEndian</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>v</var> be the <emu-val>this</emu-val> value.</li><li>If <var>littleEndian</var> is not present, set <var>littleEndian</var> to <emu-val>false</emu-val>.</li><li>Return ?&nbsp;<emu-xref aoid="SetViewValue" id="_ref_7564"><a href="#sec-setviewvalue">SetViewValue</a></emu-xref>(<var>v</var>, <var>byteOffset</var>, <var>littleEndian</var>, <code>"Uint32"</code>, <var>value</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-dataview.prototype-@@tostringtag">
<h1><span class="secnum">24.3.4.21</span>DataView.prototype [ @@toStringTag ]</h1>
<p>The initial value of the @@toStringTag property is the String value <code>"DataView"</code>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-dataview-instances">
<h1><span class="secnum">24.3.5</span>Properties of DataView Instances</h1>
<p>DataView instances are ordinary objects that inherit properties
from the DataView prototype object. DataView instances each have
[[DataView]], [[ViewedArrayBuffer]], [[ByteLength]], and [[ByteOffset]]
internal slots.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The value of the [[DataView]] internal slot is not used
within this specification. The simple presence of that internal slot is
used within the specification to identify objects created using the <code>DataView</code> <emu-xref href="#constructor" id="_ref_7565"><a href="#constructor">constructor</a></emu-xref>.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-atomics-object">
<h1><span class="secnum">24.4</span>The Atomics Object</h1>
<p>The Atomics object:</p>
<ul>
<li>is the intrinsic object <dfn>%Atomics%</dfn>.</li>
<li>is the initial value of the <code>Atomics</code> property of the <emu-xref href="#sec-global-object" id="_ref_7566"><a href="#sec-global-object">global object</a></emu-xref>.</li>
<li>is an ordinary object.</li>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_7567"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>.</li>
<li>does not have a [[Construct]] internal method; it cannot be used as a <emu-xref href="#constructor" id="_ref_7568"><a href="#constructor">constructor</a></emu-xref> with the <code>new</code> operator.</li>
<li>does not have a [[Call]] internal method; it cannot be invoked as a function.</li>
</ul>
<p>The Atomics object provides functions that operate indivisibly
(atomically) on shared memory array cells as well as functions that let
agents wait for and dispatch primitive events. When used with
discipline, the Atomics functions allow multi-<emu-xref href="#agent" id="_ref_7569"><a href="#agent">agent</a></emu-xref>
programs that communicate through shared memory to execute in a
well-understood order even on parallel CPUs. The rules that govern
shared-memory communication are provided by the <emu-xref href="#sec-memory-model" id="_ref_7570"><a href="#sec-memory-model">memory model</a></emu-xref>, defined below.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>For informative guidelines for programming and implementing shared memory in ECMAScript, please see the notes at the end of the <emu-xref href="#sec-memory-model" id="_ref_7571"><a href="#sec-memory-model">memory model</a></emu-xref> section.</p>
</div></emu-note>
<emu-clause id="sec-abstract-operations-for-atomics">
<h1><span class="secnum">24.4.1</span>Abstract Operations for Atomics</h1>
<emu-clause id="sec-validatesharedintegertypedarray" aoid="ValidateSharedIntegerTypedArray">
<h1><span class="secnum">24.4.1.1</span>ValidateSharedIntegerTypedArray ( <var>typedArray</var> [ , <var>onlyInt32</var> ] )</h1>
<p>The abstract operation ValidateSharedIntegerTypedArray takes one argument <var>typedArray</var> and an optional Boolean <var>onlyInt32</var>. It performs the following steps:</p>
<emu-alg><ol><li>If <var>onlyInt32</var> is not present, set <var>onlyInt32</var> to <emu-val>false</emu-val>.</li><li>If <emu-xref aoid="Type" id="_ref_7572"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>typedArray</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>typedArray</var> does not have a [[TypedArrayName]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>typeName</var> be <var>typedArray</var>.[[TypedArrayName]].</li><li>If <var>onlyInt32</var> is <emu-val>true</emu-val>, then<ol><li>If <var>typeName</var> is not <code>"Int32Array"</code>, throw a <emu-val>TypeError</emu-val> exception.</li></ol></li><li>Else,<ol><li>If <var>typeName</var> is not <code>"Int8Array"</code>, <code>"Uint8Array"</code>, <code>"Int16Array"</code>, <code>"Uint16Array"</code>, <code>"Int32Array"</code>, or <code>"Uint32Array"</code>, throw a <emu-val>TypeError</emu-val> exception.</li></ol></li><li><emu-xref href="#assert" id="_ref_7573"><a href="#assert">Assert</a></emu-xref>: <var>typedArray</var> has a [[ViewedArrayBuffer]] internal slot.</li><li>Let <var>buffer</var> be <var>typedArray</var>.[[ViewedArrayBuffer]].</li><li>If <emu-xref aoid="IsSharedArrayBuffer" id="_ref_7574"><a href="#sec-issharedarraybuffer">IsSharedArrayBuffer</a></emu-xref>(<var>buffer</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return <var>buffer</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-validateatomicaccess" aoid="ValidateAtomicAccess">
<h1><span class="secnum">24.4.1.2</span>ValidateAtomicAccess ( <var>typedArray</var>, <var>requestIndex</var> )</h1>
<p>The abstract operation ValidateAtomicAccess takes two arguments, <var>typedArray</var> and <var>requestIndex</var>. It performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_7575"><a href="#assert">Assert</a></emu-xref>: <var>typedArray</var> is an Object that has a [[ViewedArrayBuffer]] internal slot.</li><li>Let <var>accessIndex</var> be ?&nbsp;<emu-xref aoid="ToIndex" id="_ref_7576"><a href="#sec-toindex">ToIndex</a></emu-xref>(<var>requestIndex</var>).</li><li>Let <var>length</var> be <var>typedArray</var>.[[ArrayLength]].</li><li><emu-xref href="#assert" id="_ref_7577"><a href="#assert">Assert</a></emu-xref>: <var>accessIndex</var> ≥ 0.</li><li>If <var>accessIndex</var> ≥ <var>length</var>, throw a <emu-val>RangeError</emu-val> exception.</li><li>Return <var>accessIndex</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-getwaiterlist" aoid="GetWaiterList">
<h1><span class="secnum">24.4.1.3</span>GetWaiterList ( <var>block</var>, <var>i</var> )</h1>
<p>A <dfn>WaiterList</dfn> is a semantic object that contains an ordered list of those agents that are waiting on a location (<var>block</var>, <var>i</var>) in shared memory; <var>block</var> is a <emu-xref href="#sec-data-blocks" id="_ref_7578"><a href="#sec-data-blocks">Shared Data Block</a></emu-xref> and <var>i</var> a byte offset into the memory of <var>block</var>.</p>
<p>The <emu-xref href="#sec-agent-clusters" id="_ref_7579"><a href="#sec-agent-clusters">agent cluster</a></emu-xref> has a store of WaiterList objects; the store is indexed by (<var>block</var>, <var>i</var>). WaiterLists are <emu-xref href="#agent" id="_ref_7580"><a href="#agent">agent</a></emu-xref>-independent: a lookup in the store of WaiterLists by (<var>block</var>, <var>i</var>) will result in the same WaiterList object in any <emu-xref href="#agent" id="_ref_7581"><a href="#agent">agent</a></emu-xref> in the <emu-xref href="#sec-agent-clusters" id="_ref_7582"><a href="#sec-agent-clusters">agent cluster</a></emu-xref>.</p>
<p>Operations on a WaiterList -- adding and removing waiting
agents, traversing the list of agents, suspending and notifying agents
on the list -- may only be performed by agents that have entered the
WaiterList's critical section.</p>
<p>The abstract operation GetWaiterList takes two arguments, a <emu-xref href="#sec-data-blocks" id="_ref_7583"><a href="#sec-data-blocks">Shared Data Block</a></emu-xref> <var>block</var> and a nonnegative integer <var>i</var>. It performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_7584"><a href="#assert">Assert</a></emu-xref>: <var>block</var> is a <emu-xref href="#sec-data-blocks" id="_ref_7585"><a href="#sec-data-blocks">Shared Data Block</a></emu-xref>.</li><li><emu-xref href="#assert" id="_ref_7586"><a href="#assert">Assert</a></emu-xref>: <var>i</var> and <var>i</var> + 3 are valid byte offsets within the memory of <var>block</var>.</li><li><emu-xref href="#assert" id="_ref_7587"><a href="#assert">Assert</a></emu-xref>: <var>i</var> is divisible by 4.</li><li>Return the <emu-xref href="#sec-getwaiterlist" id="_ref_7588"><a href="#sec-getwaiterlist">WaiterList</a></emu-xref> that is referenced by the pair (<var>block</var>, <var>i</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-entercriticalsection" aoid="EnterCriticalSection">
<h1><span class="secnum">24.4.1.4</span>EnterCriticalSection ( <var>WL</var> )</h1>
<p>The abstract operation EnterCriticalSection takes one argument, a <emu-xref href="#sec-getwaiterlist" id="_ref_7589"><a href="#sec-getwaiterlist">WaiterList</a></emu-xref> <var>WL</var>. It performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_7590"><a href="#assert">Assert</a></emu-xref>: The calling <emu-xref href="#agent" id="_ref_7591"><a href="#agent">agent</a></emu-xref> is not in the critical section for any <emu-xref href="#sec-getwaiterlist" id="_ref_7592"><a href="#sec-getwaiterlist">WaiterList</a></emu-xref>.</li><li>Wait until no <emu-xref href="#agent" id="_ref_7593"><a href="#agent">agent</a></emu-xref> is in the critical section for <var>WL</var>, then enter the critical section for <var>WL</var> (without allowing any other <emu-xref href="#agent" id="_ref_7594"><a href="#agent">agent</a></emu-xref> to enter).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-leavecriticalsection" aoid="LeaveCriticalSection">
<h1><span class="secnum">24.4.1.5</span>LeaveCriticalSection ( <var>WL</var> )</h1>
<p>The abstract operation LeaveCriticalSection takes one argument, a <emu-xref href="#sec-getwaiterlist" id="_ref_7595"><a href="#sec-getwaiterlist">WaiterList</a></emu-xref> <var>WL</var>. It performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_7596"><a href="#assert">Assert</a></emu-xref>: The calling <emu-xref href="#agent" id="_ref_7597"><a href="#agent">agent</a></emu-xref> is in the critical section for <var>WL</var>.</li><li>Leave the critical section for <var>WL</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-addwaiter" aoid="AddWaiter">
<h1><span class="secnum">24.4.1.6</span>AddWaiter ( <var>WL</var>, <var>W</var> )</h1>
<p>The abstract operation AddWaiter takes two arguments, a <emu-xref href="#sec-getwaiterlist" id="_ref_7598"><a href="#sec-getwaiterlist">WaiterList</a></emu-xref> <var>WL</var> and an <emu-xref href="#agent" id="_ref_7599"><a href="#agent">agent</a></emu-xref> signifier <var>W</var>. It performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_7600"><a href="#assert">Assert</a></emu-xref>: The calling <emu-xref href="#agent" id="_ref_7601"><a href="#agent">agent</a></emu-xref> is in the critical section for <var>WL</var>.</li><li><emu-xref href="#assert" id="_ref_7602"><a href="#assert">Assert</a></emu-xref>: <var>W</var> is not on the list of waiters in any <emu-xref href="#sec-getwaiterlist" id="_ref_7603"><a href="#sec-getwaiterlist">WaiterList</a></emu-xref>.</li><li>Add <var>W</var> to the end of the list of waiters in <var>WL</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-removewaiter" aoid="RemoveWaiter">
<h1><span class="secnum">24.4.1.7</span>RemoveWaiter ( <var>WL</var>, <var>W</var> )</h1>
<p>The abstract operation RemoveWaiter takes two arguments, a <emu-xref href="#sec-getwaiterlist" id="_ref_7604"><a href="#sec-getwaiterlist">WaiterList</a></emu-xref> <var>WL</var> and an <emu-xref href="#agent" id="_ref_7605"><a href="#agent">agent</a></emu-xref> signifier <var>W</var>. It performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_7606"><a href="#assert">Assert</a></emu-xref>: The calling <emu-xref href="#agent" id="_ref_7607"><a href="#agent">agent</a></emu-xref> is in the critical section for <var>WL</var>.</li><li><emu-xref href="#assert" id="_ref_7608"><a href="#assert">Assert</a></emu-xref>: <var>W</var> is on the list of waiters in <var>WL</var>.</li><li>Remove <var>W</var> from the list of waiters in <var>WL</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-removewaiters" aoid="RemoveWaiters">
<h1><span class="secnum">24.4.1.8</span>RemoveWaiters ( <var>WL</var>, <var>c</var> )</h1>
<p>The abstract operation RemoveWaiters takes two arguments, a <emu-xref href="#sec-getwaiterlist" id="_ref_7609"><a href="#sec-getwaiterlist">WaiterList</a></emu-xref> <var>WL</var> and nonnegative integer <var>c</var>. It performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_7610"><a href="#assert">Assert</a></emu-xref>: The calling <emu-xref href="#agent" id="_ref_7611"><a href="#agent">agent</a></emu-xref> is in the critical section for <var>WL</var>.</li><li>Let <var>L</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7612"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>S</var> be a reference to the list of waiters in <var>WL</var>.</li><li>Repeat, while <var>c</var> &gt; 0 and <var>S</var> is not an empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7613"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>,<ol><li>Let <var>W</var> be the first waiter in <var>S</var>.</li><li>Add <var>W</var> to the end of <var>L</var>.</li><li>Remove <var>W</var> from <var>S</var>.</li><li>Subtract 1 from <var>c</var>.</li></ol></li><li>Return <var>L</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-suspend" aoid="Suspend">
<h1><span class="secnum">24.4.1.9</span>Suspend ( <var>WL</var>, <var>W</var>, <var>timeout</var> )</h1>
<p>The abstract operation Suspend takes three arguments, a <emu-xref href="#sec-getwaiterlist" id="_ref_7614"><a href="#sec-getwaiterlist">WaiterList</a></emu-xref> <var>WL</var>, an <emu-xref href="#agent" id="_ref_7615"><a href="#agent">agent</a></emu-xref> signifier <var>W</var>, and a nonnegative, non-<emu-val>NaN</emu-val> Number <var>timeout</var>. It performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_7616"><a href="#assert">Assert</a></emu-xref>: The calling <emu-xref href="#agent" id="_ref_7617"><a href="#agent">agent</a></emu-xref> is in the critical section for <var>WL</var>.</li><li><emu-xref href="#assert" id="_ref_7618"><a href="#assert">Assert</a></emu-xref>: <var>W</var> is equal to <emu-xref aoid="AgentSignifier" id="_ref_7619"><a href="#sec-agentsignifier">AgentSignifier</a></emu-xref>().</li><li><emu-xref href="#assert" id="_ref_7620"><a href="#assert">Assert</a></emu-xref>: <var>W</var> is on the list of waiters in <var>WL</var>.</li><li><emu-xref href="#assert" id="_ref_7621"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="AgentCanSuspend" id="_ref_7622"><a href="#sec-agentcansuspend">AgentCanSuspend</a></emu-xref>() is <emu-val>true</emu-val>.</li><li>Perform <emu-xref aoid="LeaveCriticalSection" id="_ref_7623"><a href="#sec-leavecriticalsection">LeaveCriticalSection</a></emu-xref>(<var>WL</var>) and suspend <var>W</var> for up to <var>timeout</var>
milliseconds, performing the combined operation in such a way that a
notification that arrives after the critical section is exited but
before the suspension takes effect is not lost. <var>W</var> can notify either because the timeout expired or because it was notified explicitly by another <emu-xref href="#agent" id="_ref_7624"><a href="#agent">agent</a></emu-xref> calling <emu-xref aoid="NotifyWaiter" id="_ref_7625"><a href="#sec-notifywaiter">NotifyWaiter</a></emu-xref>(<var>WL</var>, <var>W</var>), and not for any other reasons at all.</li><li>Perform <emu-xref aoid="EnterCriticalSection" id="_ref_7626"><a href="#sec-entercriticalsection">EnterCriticalSection</a></emu-xref>(<var>WL</var>).</li><li>If <var>W</var> was notified explicitly by another <emu-xref href="#agent" id="_ref_7627"><a href="#agent">agent</a></emu-xref> calling <emu-xref aoid="NotifyWaiter" id="_ref_7628"><a href="#sec-notifywaiter">NotifyWaiter</a></emu-xref>(<var>WL</var>, <var>W</var>), return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-notifywaiter" aoid="NotifyWaiter">
<h1><span class="secnum">24.4.1.10</span>NotifyWaiter ( <var>WL</var>, <var>W</var> )</h1>
<p>The abstract operation NotifyWaiter takes two arguments, a <emu-xref href="#sec-getwaiterlist" id="_ref_7629"><a href="#sec-getwaiterlist">WaiterList</a></emu-xref> <var>WL</var> and an <emu-xref href="#agent" id="_ref_7630"><a href="#agent">agent</a></emu-xref> signifier <var>W</var>. It performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_7631"><a href="#assert">Assert</a></emu-xref>: The calling <emu-xref href="#agent" id="_ref_7632"><a href="#agent">agent</a></emu-xref> is in the critical section for <var>WL</var>.</li><li><emu-xref href="#assert" id="_ref_7633"><a href="#assert">Assert</a></emu-xref>: <var>W</var> is on the list of waiters in <var>WL</var>.</li><li>Let <var>execution</var> be the [[CandidateExecution]] field of the <emu-xref href="#surrounding-agent" id="_ref_7634"><a href="#surrounding-agent">surrounding agent</a></emu-xref>'s <emu-xref href="#agent-record" id="_ref_7635"><a href="#agent-record">Agent Record</a></emu-xref>.</li><li>Let <var>eventsRecord</var> be the <emu-xref href="#sec-agent-event-records" id="_ref_7636"><a href="#sec-agent-event-records">Agent Events Record</a></emu-xref> in <var>execution</var>.[[EventsRecords]] whose [[AgentSignifier]] is <emu-xref aoid="AgentSignifier" id="_ref_7637"><a href="#sec-agentsignifier">AgentSignifier</a></emu-xref>().</li><li>Let <var>agentSynchronizesWith</var> be <var>eventsRecord</var>.[[AgentSynchronizesWith]].</li><li>Let <var>notifierEventList</var> be <var>eventsRecord</var>.[[EventList]].</li><li>Let <var>waiterEventList</var> be the [[EventList]] field of the element in <var>execution</var>.[[EventsRecords]] whose [[AgentSignifier]] is <var>W</var>.</li><li>Let <var>notifyEvent</var> and <var>waitEvent</var> be new <emu-xref href="#sec-memory-model-fundamentals" id="_ref_7638"><a href="#sec-memory-model-fundamentals">Synchronize</a></emu-xref> events.</li><li>Append <var>notifyEvent</var> to <var>notifierEventList</var>.</li><li>Append <var>waitEvent</var> to <var>waiterEventList</var>.</li><li>Append (<var>notifyEvent</var>, <var>waitEvent</var>) to <var>agentSynchronizesWith</var>.</li><li>Notify the <emu-xref href="#agent" id="_ref_7639"><a href="#agent">agent</a></emu-xref> <var>W</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The embedding may delay notifying <var>W</var>, e.g. for resource management reasons, but <var>W</var> must eventually be notified in order to guarantee forward progress.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-atomicreadmodifywrite" aoid="AtomicReadModifyWrite">
<h1><span class="secnum">24.4.1.11</span>AtomicReadModifyWrite ( <var>typedArray</var>, <var>index</var>, <var>value</var>, <var>op</var> )</h1>
<p>The abstract operation AtomicReadModifyWrite takes four arguments, <var>typedArray</var>, <var>index</var>, <var>value</var>, and a pure combining operation <var>op</var>. The pure combining operation <var>op</var> takes two <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7640"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of byte values arguments and returns a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7641"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>
of byte values. The operation atomically loads a value, combines it
with another value, and stores the result of the combination. It returns
the loaded value. It performs the following steps:</p>
<emu-alg><ol><li>Let <var>buffer</var> be ?&nbsp;<emu-xref aoid="ValidateSharedIntegerTypedArray" id="_ref_7642"><a href="#sec-validatesharedintegertypedarray">ValidateSharedIntegerTypedArray</a></emu-xref>(<var>typedArray</var>).</li><li>Let <var>i</var> be ?&nbsp;<emu-xref aoid="ValidateAtomicAccess" id="_ref_7643"><a href="#sec-validateatomicaccess">ValidateAtomicAccess</a></emu-xref>(<var>typedArray</var>, <var>index</var>).</li><li>Let <var>v</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_7644"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>value</var>).</li><li>Let <var>arrayTypeName</var> be <var>typedArray</var>.[[TypedArrayName]].</li><li>Let <var>elementSize</var> be the Number value of the Element Size value specified in <emu-xref href="#table-49" id="_ref_664"><a href="#table-49">Table 59</a></emu-xref> for <var>arrayTypeName</var>.</li><li>Let <var>elementType</var> be the String value of the Element Type value in <emu-xref href="#table-49" id="_ref_665"><a href="#table-49">Table 59</a></emu-xref> for <var>arrayTypeName</var>.</li><li>Let <var>offset</var> be <var>typedArray</var>.[[ByteOffset]].</li><li>Let <var>indexedPosition</var> be (<var>i</var> × <var>elementSize</var>) + <var>offset</var>.</li><li>Return <emu-xref aoid="GetModifySetValueInBuffer" id="_ref_7645"><a href="#sec-getmodifysetvalueinbuffer">GetModifySetValueInBuffer</a></emu-xref>(<var>buffer</var>, <var>indexedPosition</var>, <var>elementType</var>, <var>v</var>, <var>op</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-atomicload" aoid="AtomicLoad">
<h1><span class="secnum">24.4.1.12</span>AtomicLoad ( <var>typedArray</var>, <var>index</var> )</h1>
<p>The abstract operation AtomicLoad takes two arguments, <var>typedArray</var>, <var>index</var>. The operation atomically loads a value and returns the loaded value. It performs the following steps:</p>
<emu-alg><ol><li>Let <var>buffer</var> be ?&nbsp;<emu-xref aoid="ValidateSharedIntegerTypedArray" id="_ref_7646"><a href="#sec-validatesharedintegertypedarray">ValidateSharedIntegerTypedArray</a></emu-xref>(<var>typedArray</var>).</li><li>Let <var>i</var> be ?&nbsp;<emu-xref aoid="ValidateAtomicAccess" id="_ref_7647"><a href="#sec-validateatomicaccess">ValidateAtomicAccess</a></emu-xref>(<var>typedArray</var>, <var>index</var>).</li><li>Let <var>arrayTypeName</var> be <var>typedArray</var>.[[TypedArrayName]].</li><li>Let <var>elementSize</var> be the Number value of the Element Size value specified in <emu-xref href="#table-49" id="_ref_666"><a href="#table-49">Table 59</a></emu-xref> for <var>arrayTypeName</var>.</li><li>Let <var>elementType</var> be the String value of the Element Type value in <emu-xref href="#table-49" id="_ref_667"><a href="#table-49">Table 59</a></emu-xref> for <var>arrayTypeName</var>.</li><li>Let <var>offset</var> be <var>typedArray</var>.[[ByteOffset]].</li><li>Let <var>indexedPosition</var> be (<var>i</var> × <var>elementSize</var>) + <var>offset</var>.</li><li>Return <emu-xref aoid="GetValueFromBuffer" id="_ref_7648"><a href="#sec-getvaluefrombuffer">GetValueFromBuffer</a></emu-xref>(<var>buffer</var>, <var>indexedPosition</var>, <var>elementType</var>, <emu-val>true</emu-val>, <code>"SeqCst"</code>).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-atomics.add">
<h1><span class="secnum">24.4.2</span>Atomics.add ( <var>typedArray</var>, <var>index</var>, <var>value</var> )</h1>
<p>Let <code>add</code> denote a semantic function of two <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7649"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of byte values arguments that applies the addition operation to the Number values corresponding to the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7650"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of byte values arguments and returns a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7651"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of byte values corresponding to the result of that operation.</p>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="AtomicReadModifyWrite" id="_ref_7652"><a href="#sec-atomicreadmodifywrite">AtomicReadModifyWrite</a></emu-xref>(<var>typedArray</var>, <var>index</var>, <var>value</var>, <code>add</code>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-atomics.and">
<h1><span class="secnum">24.4.3</span>Atomics.and ( <var>typedArray</var>, <var>index</var>, <var>value</var> )</h1>
<p>Let <code>and</code> denote a semantic function of two <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7653"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of byte values arguments that applies the bitwise-and operation element-wise to the two arguments and returns a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7654"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of byte values corresponding to the result of that operation.</p>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="AtomicReadModifyWrite" id="_ref_7655"><a href="#sec-atomicreadmodifywrite">AtomicReadModifyWrite</a></emu-xref>(<var>typedArray</var>, <var>index</var>, <var>value</var>, <code>and</code>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-atomics.compareexchange">
<h1><span class="secnum">24.4.4</span>Atomics.compareExchange ( <var>typedArray</var>, <var>index</var>, <var>expectedValue</var>, <var>replacementValue</var> )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>buffer</var> be ?&nbsp;<emu-xref aoid="ValidateSharedIntegerTypedArray" id="_ref_7656"><a href="#sec-validatesharedintegertypedarray">ValidateSharedIntegerTypedArray</a></emu-xref>(<var>typedArray</var>).</li><li>Let <var>i</var> be ?&nbsp;<emu-xref aoid="ValidateAtomicAccess" id="_ref_7657"><a href="#sec-validateatomicaccess">ValidateAtomicAccess</a></emu-xref>(<var>typedArray</var>, <var>index</var>).</li><li>Let <var>expected</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_7658"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>expectedValue</var>).</li><li>Let <var>replacement</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_7659"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>replacementValue</var>).</li><li>Let <var>arrayTypeName</var> be <var>typedArray</var>.[[TypedArrayName]].</li><li>Let <var>elementType</var> be the String value of the Element Type value in <emu-xref href="#table-49" id="_ref_668"><a href="#table-49">Table 59</a></emu-xref> for <var>arrayTypeName</var>.</li><li>Let <var>isLittleEndian</var> be the value of the [[LittleEndian]] field of the <emu-xref href="#surrounding-agent" id="_ref_7660"><a href="#surrounding-agent">surrounding agent</a></emu-xref>'s <emu-xref href="#agent-record" id="_ref_7661"><a href="#agent-record">Agent Record</a></emu-xref>.</li><li>Let <var>expectedBytes</var> be <emu-xref aoid="NumberToRawBytes" id="_ref_7662"><a href="#sec-numbertorawbytes">NumberToRawBytes</a></emu-xref>(<var>elementType</var>, <var>expected</var>, <var>isLittleEndian</var>).</li><li>Let <var>elementSize</var> be the Number value of the Element Size value specified in <emu-xref href="#table-49" id="_ref_669"><a href="#table-49">Table 59</a></emu-xref> for <var>arrayTypeName</var>.</li><li>Let <var>offset</var> be <var>typedArray</var>.[[ByteOffset]].</li><li>Let <var>indexedPosition</var> be (<var>i</var> × <var>elementSize</var>) + <var>offset</var>.</li><li>Let <code>compareExchange</code> denote a semantic function of two <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7663"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of byte values arguments that returns the second argument if the first argument is element-wise equal to <var>expectedBytes</var>.</li><li>Return <emu-xref aoid="GetModifySetValueInBuffer" id="_ref_7664"><a href="#sec-getmodifysetvalueinbuffer">GetModifySetValueInBuffer</a></emu-xref>(<var>buffer</var>, <var>indexedPosition</var>, <var>elementType</var>, <var>replacement</var>, <code>compareExchange</code>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-atomics.exchange">
<h1><span class="secnum">24.4.5</span>Atomics.exchange ( <var>typedArray</var>, <var>index</var>, <var>value</var> )</h1>
<p>Let <code>second</code> denote a semantic function of two <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7665"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of byte values arguments that returns its second argument.</p>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="AtomicReadModifyWrite" id="_ref_7666"><a href="#sec-atomicreadmodifywrite">AtomicReadModifyWrite</a></emu-xref>(<var>typedArray</var>, <var>index</var>, <var>value</var>, <code>second</code>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-atomics.islockfree">
<h1><span class="secnum">24.4.6</span>Atomics.isLockFree ( <var>size</var> )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>n</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_7667"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>size</var>).</li><li>Let <var>AR</var> be the <emu-xref href="#agent-record" id="_ref_7668"><a href="#agent-record">Agent Record</a></emu-xref> of the <emu-xref href="#surrounding-agent" id="_ref_7669"><a href="#surrounding-agent">surrounding agent</a></emu-xref>.</li><li>If <var>n</var> equals 1, return <var>AR</var>.[[IsLockFree1]].</li><li>If <var>n</var> equals 2, return <var>AR</var>.[[IsLockFree2]].</li><li>If <var>n</var> equals 4, return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p><code>Atomics.isLockFree</code>() is an optimization primitive. The intuition is that if the atomic step of an atomic primitive (<code>compareExchange</code>, <code>load</code>, <code>store</code>, <code>add</code>, <code>sub</code>, <code>and</code>, <code>or</code>, <code>xor</code>, or <code>exchange</code>) on a datum of size <var>n</var> bytes will be performed without the calling <emu-xref href="#agent" id="_ref_7670"><a href="#agent">agent</a></emu-xref> acquiring a lock outside the <var>n</var> bytes comprising the datum, then <code>Atomics.isLockFree</code>(<var>n</var>) will return <emu-val>true</emu-val>.
High-performance algorithms will use Atomics.isLockFree to determine
whether to use locks or atomic operations in critical sections. If an
atomic primitive is not lock-free then it is often more efficient for an
algorithm to provide its own locking.</p>
<p><code>Atomics.isLockFree</code>(4) always returns <emu-val>true</emu-val> as that can be supported on all known relevant hardware. Being able to assume this will generally simplify programs.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-atomics.load">
<h1><span class="secnum">24.4.7</span>Atomics.load ( <var>typedArray</var>, <var>index</var> )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="AtomicLoad" id="_ref_7671"><a href="#sec-atomicload">AtomicLoad</a></emu-xref>(<var>typedArray</var>, <var>index</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-atomics.or">
<h1><span class="secnum">24.4.8</span>Atomics.or ( <var>typedArray</var>, <var>index</var>, <var>value</var> )</h1>
<p>Let <code>or</code> denote a semantic function of two <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7672"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of byte values arguments that applies the bitwise-or operation element-wise to the two arguments and returns a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7673"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of byte values corresponding to the result of that operation.</p>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="AtomicReadModifyWrite" id="_ref_7674"><a href="#sec-atomicreadmodifywrite">AtomicReadModifyWrite</a></emu-xref>(<var>typedArray</var>, <var>index</var>, <var>value</var>, <code>or</code>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-atomics.store">
<h1><span class="secnum">24.4.9</span>Atomics.store ( <var>typedArray</var>, <var>index</var>, <var>value</var> )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Let <var>buffer</var> be ?&nbsp;<emu-xref aoid="ValidateSharedIntegerTypedArray" id="_ref_7675"><a href="#sec-validatesharedintegertypedarray">ValidateSharedIntegerTypedArray</a></emu-xref>(<var>typedArray</var>).</li><li>Let <var>i</var> be ?&nbsp;<emu-xref aoid="ValidateAtomicAccess" id="_ref_7676"><a href="#sec-validateatomicaccess">ValidateAtomicAccess</a></emu-xref>(<var>typedArray</var>, <var>index</var>).</li><li>Let <var>v</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_7677"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>value</var>).</li><li>Let <var>arrayTypeName</var> be <var>typedArray</var>.[[TypedArrayName]].</li><li>Let <var>elementSize</var> be the Number value of the Element Size value specified in <emu-xref href="#table-49" id="_ref_670"><a href="#table-49">Table 59</a></emu-xref> for <var>arrayTypeName</var>.</li><li>Let <var>elementType</var> be the String value of the Element Type value in <emu-xref href="#table-49" id="_ref_671"><a href="#table-49">Table 59</a></emu-xref> for <var>arrayTypeName</var>.</li><li>Let <var>offset</var> be <var>typedArray</var>.[[ByteOffset]].</li><li>Let <var>indexedPosition</var> be (<var>i</var> × <var>elementSize</var>) + <var>offset</var>.</li><li>Perform <emu-xref aoid="SetValueInBuffer" id="_ref_7678"><a href="#sec-setvalueinbuffer">SetValueInBuffer</a></emu-xref>(<var>buffer</var>, <var>indexedPosition</var>, <var>elementType</var>, <var>v</var>, <emu-val>true</emu-val>, <code>"SeqCst"</code>).</li><li>Return <var>v</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-atomics.sub">
<h1><span class="secnum">24.4.10</span>Atomics.sub ( <var>typedArray</var>, <var>index</var>, <var>value</var> )</h1>
<p>Let <code>subtract</code> denote a semantic function of two <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7679"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of byte values arguments that applies the subtraction operation to the Number values corresponding to the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7680"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of byte values arguments and returns a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7681"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of byte values corresponding to the result of that operation.</p>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="AtomicReadModifyWrite" id="_ref_7682"><a href="#sec-atomicreadmodifywrite">AtomicReadModifyWrite</a></emu-xref>(<var>typedArray</var>, <var>index</var>, <var>value</var>, <code>subtract</code>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-atomics.wait">
<h1><span class="secnum">24.4.11</span>Atomics.wait ( <var>typedArray</var>, <var>index</var>, <var>value</var>, <var>timeout</var> )</h1>
<p><code>Atomics.wait</code> puts the calling <emu-xref href="#agent" id="_ref_7683"><a href="#agent">agent</a></emu-xref> in a wait queue and puts it to sleep until it is notified or the sleep times out. The following steps are taken:</p>
<emu-alg><ol><li>Let <var>buffer</var> be ?&nbsp;<emu-xref aoid="ValidateSharedIntegerTypedArray" id="_ref_7684"><a href="#sec-validatesharedintegertypedarray">ValidateSharedIntegerTypedArray</a></emu-xref>(<var>typedArray</var>, <emu-val>true</emu-val>).</li><li>Let <var>i</var> be ?&nbsp;<emu-xref aoid="ValidateAtomicAccess" id="_ref_7685"><a href="#sec-validateatomicaccess">ValidateAtomicAccess</a></emu-xref>(<var>typedArray</var>, <var>index</var>).</li><li>Let <var>v</var> be ?&nbsp;<emu-xref aoid="ToInt32" id="_ref_7686"><a href="#sec-toint32">ToInt32</a></emu-xref>(<var>value</var>).</li><li>Let <var>q</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_7687"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>timeout</var>).</li><li>If <var>q</var> is <emu-val>NaN</emu-val>, let <var>t</var> be <emu-val>+∞</emu-val>, else let <var>t</var> be <emu-xref aoid="max" id="_ref_7688"><a href="#eqn-max">max</a></emu-xref>(<var>q</var>, 0).</li><li>Let <var>B</var> be <emu-xref aoid="AgentCanSuspend" id="_ref_7689"><a href="#sec-agentcansuspend">AgentCanSuspend</a></emu-xref>().</li><li>If <var>B</var> is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>block</var> be <var>buffer</var>.[[ArrayBufferData]].</li><li>Let <var>offset</var> be <var>typedArray</var>.[[ByteOffset]].</li><li>Let <var>indexedPosition</var> be (<var>i</var> × 4) + <var>offset</var>.</li><li>Let <var>WL</var> be <emu-xref aoid="GetWaiterList" id="_ref_7690"><a href="#sec-getwaiterlist">GetWaiterList</a></emu-xref>(<var>block</var>, <var>indexedPosition</var>).</li><li>Perform <emu-xref aoid="EnterCriticalSection" id="_ref_7691"><a href="#sec-entercriticalsection">EnterCriticalSection</a></emu-xref>(<var>WL</var>).</li><li>Let <var>w</var> be !&nbsp;<emu-xref aoid="AtomicLoad" id="_ref_7692"><a href="#sec-atomicload">AtomicLoad</a></emu-xref>(<var>typedArray</var>, <var>i</var>).</li><li>If <var>v</var> is not equal to <var>w</var>, then<ol><li>Perform <emu-xref aoid="LeaveCriticalSection" id="_ref_7693"><a href="#sec-leavecriticalsection">LeaveCriticalSection</a></emu-xref>(<var>WL</var>).</li><li>Return the String <code>"not-equal"</code>.</li></ol></li><li>Let <var>W</var> be <emu-xref aoid="AgentSignifier" id="_ref_7694"><a href="#sec-agentsignifier">AgentSignifier</a></emu-xref>().</li><li>Perform <emu-xref aoid="AddWaiter" id="_ref_7695"><a href="#sec-addwaiter">AddWaiter</a></emu-xref>(<var>WL</var>, <var>W</var>).</li><li>Let <var>notified</var> be <emu-xref aoid="Suspend" id="_ref_7696"><a href="#sec-suspend">Suspend</a></emu-xref>(<var>WL</var>, <var>W</var>, <var>t</var>).</li><li>If <var>notified</var> is <emu-val>true</emu-val>, then<ol><li><emu-xref href="#assert" id="_ref_7697"><a href="#assert">Assert</a></emu-xref>: <var>W</var> is not on the list of waiters in <var>WL</var>.</li></ol></li><li>Else,<ol><li>Perform <emu-xref aoid="RemoveWaiter" id="_ref_7698"><a href="#sec-removewaiter">RemoveWaiter</a></emu-xref>(<var>WL</var>, <var>W</var>).</li></ol></li><li>Perform <emu-xref aoid="LeaveCriticalSection" id="_ref_7699"><a href="#sec-leavecriticalsection">LeaveCriticalSection</a></emu-xref>(<var>WL</var>).</li><li>If <var>notified</var> is <emu-val>true</emu-val>, return the String <code>"ok"</code>.</li><li>Return the String <code>"timed-out"</code>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-atomics.notify">
<h1><span class="secnum">24.4.12</span>Atomics.notify ( <var>typedArray</var>, <var>index</var>, <var>count</var> )</h1>
<p><code>Atomics.notify</code> notifies some agents that are sleeping in the wait queue. The following steps are taken:</p>
<emu-alg><ol><li>Let <var>buffer</var> be ?&nbsp;<emu-xref aoid="ValidateSharedIntegerTypedArray" id="_ref_7700"><a href="#sec-validatesharedintegertypedarray">ValidateSharedIntegerTypedArray</a></emu-xref>(<var>typedArray</var>, <emu-val>true</emu-val>).</li><li>Let <var>i</var> be ?&nbsp;<emu-xref aoid="ValidateAtomicAccess" id="_ref_7701"><a href="#sec-validateatomicaccess">ValidateAtomicAccess</a></emu-xref>(<var>typedArray</var>, <var>index</var>).</li><li>If <var>count</var> is <emu-val>undefined</emu-val>, let <var>c</var> be <emu-val>+∞</emu-val>.</li><li>Else,<ol><li>Let <var>intCount</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_7702"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>count</var>).</li><li>Let <var>c</var> be <emu-xref aoid="max" id="_ref_7703"><a href="#eqn-max">max</a></emu-xref>(<var>intCount</var>, 0).</li></ol></li><li>Let <var>block</var> be <var>buffer</var>.[[ArrayBufferData]].</li><li>Let <var>offset</var> be <var>typedArray</var>.[[ByteOffset]].</li><li>Let <var>indexedPosition</var> be (<var>i</var> × 4) + <var>offset</var>.</li><li>Let <var>WL</var> be <emu-xref aoid="GetWaiterList" id="_ref_7704"><a href="#sec-getwaiterlist">GetWaiterList</a></emu-xref>(<var>block</var>, <var>indexedPosition</var>).</li><li>Let <var>n</var> be 0.</li><li>Perform <emu-xref aoid="EnterCriticalSection" id="_ref_7705"><a href="#sec-entercriticalsection">EnterCriticalSection</a></emu-xref>(<var>WL</var>).</li><li>Let <var>S</var> be <emu-xref aoid="RemoveWaiters" id="_ref_7706"><a href="#sec-removewaiters">RemoveWaiters</a></emu-xref>(<var>WL</var>, <var>c</var>).</li><li>Repeat, while <var>S</var> is not an empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7707"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>,<ol><li>Let <var>W</var> be the first <emu-xref href="#agent" id="_ref_7708"><a href="#agent">agent</a></emu-xref> in <var>S</var>.</li><li>Remove <var>W</var> from the front of <var>S</var>.</li><li>Perform <emu-xref aoid="NotifyWaiter" id="_ref_7709"><a href="#sec-notifywaiter">NotifyWaiter</a></emu-xref>(<var>WL</var>, <var>W</var>).</li><li>Add 1 to <var>n</var>.</li></ol></li><li>Perform <emu-xref aoid="LeaveCriticalSection" id="_ref_7710"><a href="#sec-leavecriticalsection">LeaveCriticalSection</a></emu-xref>(<var>WL</var>).</li><li>Return <var>n</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-atomics.xor">
<h1><span class="secnum">24.4.13</span>Atomics.xor ( <var>typedArray</var>, <var>index</var>, <var>value</var> )</h1>
<p>Let <code>xor</code> denote a semantic function of two <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7711"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of byte values arguments that applies the bitwise-xor operation element-wise to the two arguments and returns a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7712"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of byte values corresponding to the result of that operation.</p>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="AtomicReadModifyWrite" id="_ref_7713"><a href="#sec-atomicreadmodifywrite">AtomicReadModifyWrite</a></emu-xref>(<var>typedArray</var>, <var>index</var>, <var>value</var>, <code>xor</code>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-atomics-@@tostringtag">
<h1><span class="secnum">24.4.14</span>Atomics [ @@toStringTag ]</h1>
<p>The initial value of the @@toStringTag property is the String value <code>"Atomics"</code>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-json-object">
<h1><span class="secnum">24.5</span>The JSON Object</h1>
<p>The JSON object:</p>
<ul>
<li>is the intrinsic object <dfn>%JSON%</dfn>.</li>
<li>is the initial value of the <code>JSON</code> property of the <emu-xref href="#sec-global-object" id="_ref_7714"><a href="#sec-global-object">global object</a></emu-xref>.</li>
<li>is an ordinary object.</li>
<li>contains two functions, <code>parse</code> and <code>stringify</code>, that are used to parse and construct JSON texts.</li>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_7715"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>.</li>
<li>does not have a [[Construct]] internal method; it cannot be used as a <emu-xref href="#constructor" id="_ref_7716"><a href="#constructor">constructor</a></emu-xref> with the <code>new</code> operator.</li>
<li>does not have a [[Call]] internal method; it cannot be invoked as a function.</li>
</ul>
<p>The JSON Data Interchange Format is defined in ECMA-404. The JSON
interchange format used in this specification is exactly that described
by ECMA-404. Conforming implementations of <code>JSON.parse</code> and <code>JSON.stringify</code>
must support the exact interchange format described in the ECMA-404
specification without any deletions or extensions to the format.</p>
<emu-clause id="sec-json.parse">
<h1><span class="secnum">24.5.1</span>JSON.parse ( <var>text</var> [ , <var>reviver</var> ] )</h1>
<p>The <code>parse</code> function parses a JSON text (a
JSON-formatted String) and produces an ECMAScript value. The JSON format
represents literals, arrays, and objects with a syntax similar to the
syntax for ECMAScript literals, Array Initializers, and Object
Initializers. After parsing, JSON objects are realized as ECMAScript
objects. JSON arrays are realized as ECMAScript Array instances. JSON
strings, numbers, booleans, and null are realized as ECMAScript Strings,
Numbers, Booleans, and <emu-val>null</emu-val>.</p>
<p>The optional <var>reviver</var> parameter is a function that takes two parameters, <var>key</var> and <var>value</var>. It can filter and transform the results. It is called with each of the <var>key</var>/<var>value</var>
pairs produced by the parse, and its return value is used instead of
the original value. If it returns what it received, the structure is not
modified. If it returns <emu-val>undefined</emu-val> then the property is deleted from the result.</p>
<emu-alg><ol><li>Let <var>JText</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_7717"><a href="#sec-tostring">ToString</a></emu-xref>(<var>text</var>).</li><li>Parse <var>JText</var> interpreted as UTF-16 encoded Unicode points (<emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_672"><a href="#sec-ecmascript-language-types-string-type">6.1.4</a></emu-xref>) as a JSON text as specified in ECMA-404. Throw a <emu-val>SyntaxError</emu-val> exception if <var>JText</var> is not a valid JSON text as defined in that specification.</li><li>Let <var>scriptText</var> be the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_7718"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <code>"("</code>, <var>JText</var>, and <code>");"</code>.</li><li>Let <var>completion</var> be the result of parsing and evaluating <var>scriptText</var> as if it was the source text of an ECMAScript <emu-nt id="_ref_14802"><a href="#prod-Script">Script</a></emu-nt>. The extended PropertyDefinitionEvaluation semantics defined in <emu-xref href="#sec-__proto__-property-names-in-object-initializers" id="_ref_673"><a href="#sec-__proto__-property-names-in-object-initializers">B.3.1</a></emu-xref> must not be used during the evaluation.</li><li>Let <var>unfiltered</var> be <var>completion</var>.[[Value]].</li><li><emu-xref href="#assert" id="_ref_7719"><a href="#assert">Assert</a></emu-xref>: <var>unfiltered</var> is either a String, Number, Boolean, Null, or an Object that is defined by either an <emu-nt id="_ref_14803"><a href="#prod-ArrayLiteral">ArrayLiteral</a></emu-nt> or an <emu-nt id="_ref_14804"><a href="#prod-ObjectLiteral">ObjectLiteral</a></emu-nt>.</li><li>If <emu-xref aoid="IsCallable" id="_ref_7720"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>reviver</var>) is <emu-val>true</emu-val>, then<ol><li>Let <var>root</var> be <emu-xref aoid="ObjectCreate" id="_ref_7721"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_7722"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>).</li><li>Let <var>rootName</var> be the empty String.</li><li>Let <var>status</var> be <emu-xref aoid="CreateDataProperty" id="_ref_7723"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>root</var>, <var>rootName</var>, <var>unfiltered</var>).</li><li><emu-xref href="#assert" id="_ref_7724"><a href="#assert">Assert</a></emu-xref>: <var>status</var> is <emu-val>true</emu-val>.</li><li>Return ?&nbsp;<emu-xref aoid="InternalizeJSONProperty" id="_ref_7725"><a href="#sec-internalizejsonproperty">InternalizeJSONProperty</a></emu-xref>(<var>root</var>, <var>rootName</var>).</li></ol></li><li>Else,<ol><li>Return <var>unfiltered</var>.
</li></ol></li></ol></emu-alg>
<p>This function is the <dfn>%JSONParse%</dfn> intrinsic object.</p>
<p>The <code>"length"</code> property of the <code>parse</code> function is 2.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Valid JSON text is a subset of the ECMAScript <emu-nt id="_ref_14805"><a href="#prod-PrimaryExpression">PrimaryExpression</a></emu-nt> syntax as modified by Step 4 above. Step 2 verifies that <var>JText</var> conforms to that subset, and step 6 verifies that that parsing and evaluation returns a value of an appropriate type.</p>
</div></emu-note>
<emu-clause id="sec-internalizejsonproperty" aoid="InternalizeJSONProperty">
<h1><span class="secnum">24.5.1.1</span>Runtime Semantics: InternalizeJSONProperty ( <var>holder</var>, <var>name</var> )</h1>
<p>The abstract operation InternalizeJSONProperty is a recursive abstract operation that takes two parameters: a <var>holder</var> object and the String <var>name</var> of a property in that object. InternalizeJSONProperty uses the value of <var>reviver</var> that was originally passed to the above parse function.</p>
<emu-alg><ol><li>Let <var>val</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_7726"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>holder</var>, <var>name</var>).</li><li>If <emu-xref aoid="Type" id="_ref_7727"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>val</var>) is Object, then<ol><li>Let <var>isArray</var> be ?&nbsp;<emu-xref aoid="IsArray" id="_ref_7728"><a href="#sec-isarray">IsArray</a></emu-xref>(<var>val</var>).</li><li>If <var>isArray</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>I</var> be 0.</li><li>Let <var>len</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_7729"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_7730"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>val</var>, <code>"length"</code>)).</li><li>Repeat, while <var>I</var> &lt; <var>len</var>,<ol><li>Let <var>newElement</var> be ?&nbsp;<emu-xref aoid="InternalizeJSONProperty" id="_ref_7731"><a href="#sec-internalizejsonproperty">InternalizeJSONProperty</a></emu-xref>(<var>val</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_7732"><a href="#sec-tostring">ToString</a></emu-xref>(<var>I</var>)).</li><li>If <var>newElement</var> is <emu-val>undefined</emu-val>, then<ol><li>Perform ? <var>val</var>.[[Delete]](! <emu-xref aoid="ToString" id="_ref_7733"><a href="#sec-tostring">ToString</a></emu-xref>(<var>I</var>)).</li></ol></li><li>Else,<ol><li>Perform ?&nbsp;<emu-xref aoid="CreateDataProperty" id="_ref_7734"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>val</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_7735"><a href="#sec-tostring">ToString</a></emu-xref>(<var>I</var>), <var>newElement</var>).</li><li>NOTE: This algorithm intentionally does not throw an exception if <emu-xref aoid="CreateDataProperty" id="_ref_7736"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref> returns <emu-val>false</emu-val>.</li></ol></li><li>Add 1 to <var>I</var>.</li></ol></li></ol></li><li>Else,<ol><li>Let <var>keys</var> be ?&nbsp;<emu-xref aoid="EnumerableOwnPropertyNames" id="_ref_7737"><a href="#sec-enumerableownpropertynames">EnumerableOwnPropertyNames</a></emu-xref>(<var>val</var>, <emu-val>"key"</emu-val>).</li><li>For each String <var>P</var> in <var>keys</var>, do<ol><li>Let <var>newElement</var> be ?&nbsp;<emu-xref aoid="InternalizeJSONProperty" id="_ref_7738"><a href="#sec-internalizejsonproperty">InternalizeJSONProperty</a></emu-xref>(<var>val</var>, <var>P</var>).</li><li>If <var>newElement</var> is <emu-val>undefined</emu-val>, then<ol><li>Perform ? <var>val</var>.[[Delete]](<var>P</var>).</li></ol></li><li>Else,<ol><li>Perform ?&nbsp;<emu-xref aoid="CreateDataProperty" id="_ref_7739"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>val</var>, <var>P</var>, <var>newElement</var>).</li><li>NOTE: This algorithm intentionally does not throw an exception if <emu-xref aoid="CreateDataProperty" id="_ref_7740"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref> returns <emu-val>false</emu-val>.</li></ol></li></ol></li></ol></li></ol></li><li>Return ?&nbsp;<emu-xref aoid="Call" id="_ref_7741"><a href="#sec-call">Call</a></emu-xref>(<var>reviver</var>, <var>holder</var>, « <var>name</var>, <var>val</var> »).
</li></ol></emu-alg>
<p>It is not permitted for a conforming implementation of <code>JSON.parse</code>
to extend the JSON grammars. If an implementation wishes to support a
modified or extended JSON interchange format it must do so by defining a
different parse function.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>In the case where there are duplicate name Strings within
an object, lexically preceding values for the same key shall be
overwritten.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-json.stringify">
<h1><span class="secnum">24.5.2</span>JSON.stringify ( <var>value</var> [ , <var>replacer</var> [ , <var>space</var> ] ] )</h1>
<p>The <code>stringify</code> function returns a String in UTF-16 encoded JSON format representing an ECMAScript value, or <emu-val>undefined</emu-val>. It can take three parameters. The <var>value</var> parameter is an ECMAScript value, which is usually an object or array, although it can also be a String, Boolean, Number or <emu-val>null</emu-val>. The optional <var>replacer</var>
parameter is either a function that alters the way objects and arrays
are stringified, or an array of Strings and Numbers that acts as an
inclusion list for selecting the object properties that will be
stringified. The optional <var>space</var> parameter is a String or Number that allows the result to have white space injected into it to improve human readability.</p>
<p>These are the steps in stringifying an object:</p>
<emu-alg><ol><li>Let <var>stack</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7742"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>indent</var> be the empty String.</li><li>Let <var>PropertyList</var> and <var>ReplacerFunction</var> be <emu-val>undefined</emu-val>.</li><li>If <emu-xref aoid="Type" id="_ref_7743"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>replacer</var>) is Object, then<ol><li>If <emu-xref aoid="IsCallable" id="_ref_7744"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>replacer</var>) is <emu-val>true</emu-val>, then<ol><li>Set <var>ReplacerFunction</var> to <var>replacer</var>.</li></ol></li><li>Else,<ol><li>Let <var>isArray</var> be ?&nbsp;<emu-xref aoid="IsArray" id="_ref_7745"><a href="#sec-isarray">IsArray</a></emu-xref>(<var>replacer</var>).</li><li>If <var>isArray</var> is <emu-val>true</emu-val>, then<ol><li>Set <var>PropertyList</var> to a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7746"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>len</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_7747"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_7748"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>replacer</var>, <code>"length"</code>)).</li><li>Let <var>k</var> be 0.</li><li>Repeat, while <var>k</var> &lt; <var>len</var>,<ol><li>Let <var>v</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_7749"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>replacer</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_7750"><a href="#sec-tostring">ToString</a></emu-xref>(<var>k</var>)).</li><li>Let <var>item</var> be <emu-val>undefined</emu-val>.</li><li>If <emu-xref aoid="Type" id="_ref_7751"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>v</var>) is String, set <var>item</var> to <var>v</var>.</li><li>Else if <emu-xref aoid="Type" id="_ref_7752"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>v</var>) is Number, set <var>item</var> to !&nbsp;<emu-xref aoid="ToString" id="_ref_7753"><a href="#sec-tostring">ToString</a></emu-xref>(<var>v</var>).</li><li>Else if <emu-xref aoid="Type" id="_ref_7754"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>v</var>) is Object, then<ol><li>If <var>v</var> has a [[StringData]] or [[NumberData]] internal slot, set <var>item</var> to ?&nbsp;<emu-xref aoid="ToString" id="_ref_7755"><a href="#sec-tostring">ToString</a></emu-xref>(<var>v</var>).</li></ol></li><li>If <var>item</var> is not <emu-val>undefined</emu-val> and <var>item</var> is not currently an element of <var>PropertyList</var>, then<ol><li>Append <var>item</var> to the end of <var>PropertyList</var>.</li></ol></li><li>Increase <var>k</var> by 1.</li></ol></li></ol></li></ol></li></ol></li><li>If <emu-xref aoid="Type" id="_ref_7756"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>space</var>) is Object, then<ol><li>If <var>space</var> has a [[NumberData]] internal slot, then<ol><li>Set <var>space</var> to ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_7757"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>space</var>).</li></ol></li><li>Else if <var>space</var> has a [[StringData]] internal slot, then<ol><li>Set <var>space</var> to ?&nbsp;<emu-xref aoid="ToString" id="_ref_7758"><a href="#sec-tostring">ToString</a></emu-xref>(<var>space</var>).</li></ol></li></ol></li><li>If <emu-xref aoid="Type" id="_ref_7759"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>space</var>) is Number, then<ol><li>Set <var>space</var> to <emu-xref aoid="min" id="_ref_7760"><a href="#eqn-min">min</a></emu-xref>(10, !&nbsp;<emu-xref aoid="ToInteger" id="_ref_7761"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>space</var>)).</li><li>Let <var>gap</var> be the String value containing <var>space</var> occurrences of the code unit 0x0020 (SPACE). This will be the empty String if <var>space</var> is less than 1.</li></ol></li><li>Else if <emu-xref aoid="Type" id="_ref_7762"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>space</var>) is String, then<ol><li>If the length of <var>space</var> is 10 or less, let <var>gap</var> be <var>space</var>; otherwise let <var>gap</var> be the String value consisting of the first 10 code units of <var>space</var>.</li></ol></li><li>Else,<ol><li>Let <var>gap</var> be the empty String.</li></ol></li><li>Let <var>wrapper</var> be <emu-xref aoid="ObjectCreate" id="_ref_7763"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_7764"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>).</li><li>Let <var>status</var> be <emu-xref aoid="CreateDataProperty" id="_ref_7765"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>wrapper</var>, the empty String, <var>value</var>).</li><li><emu-xref href="#assert" id="_ref_7766"><a href="#assert">Assert</a></emu-xref>: <var>status</var> is <emu-val>true</emu-val>.</li><li>Return ?&nbsp;<emu-xref aoid="SerializeJSONProperty" id="_ref_7767"><a href="#sec-serializejsonproperty">SerializeJSONProperty</a></emu-xref>(the empty String, <var>wrapper</var>).
</li></ol></emu-alg>
<p>The <code>"length"</code> property of the <code>stringify</code> function is 3.</p>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>JSON structures are allowed to be nested to any depth, but they must be acyclic. If <var>value</var> is or contains a cyclic structure, then the stringify function must throw a <emu-val>TypeError</emu-val> exception. This is an example of a value that cannot be stringified:</p>
<pre><code class="javascript hljs">a = [];
a[<span class="hljs-number">0</span>] = a;
my_text = <span class="hljs-built_in">JSON</span>.stringify(a); <span class="hljs-comment">// This must throw a TypeError.</span></code></pre>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>Symbolic primitive values are rendered as follows:</p>
<ul>
<li>
The <emu-val>null</emu-val> value is rendered in JSON text as the String <code>null</code>.
</li>
<li>
The <emu-val>undefined</emu-val> value is not rendered.
</li>
<li>
The <emu-val>true</emu-val> value is rendered in JSON text as the String <code>true</code>.
</li>
<li>
The <emu-val>false</emu-val> value is rendered in JSON text as the String <code>false</code>.
</li>
</ul>
</div></emu-note>
<emu-note><span class="note">Note 3</span><div class="note-contents">
<p>String values are wrapped in QUOTATION MARK (<code>"</code>) code units. The code units <code>"</code> and <code>\</code> are escaped with <code>\</code> prefixes. Control characters code units are replaced with escape sequences <code>\u</code>HHHH, or with the shorter forms, <code>\b</code> (BACKSPACE), <code>\f</code> (FORM FEED), <code>\n</code> (LINE FEED), <code>\r</code> (CARRIAGE RETURN), <code>\t</code> (CHARACTER TABULATION).</p>
</div></emu-note>
<emu-note><span class="note">Note 4</span><div class="note-contents">
<p>Finite numbers are stringified as if by calling <emu-xref aoid="ToString" id="_ref_7768"><a href="#sec-tostring">ToString</a></emu-xref>(<var>number</var>). <emu-val>NaN</emu-val> and Infinity regardless of sign are represented as the String <code>null</code>.</p>
</div></emu-note>
<emu-note><span class="note">Note 5</span><div class="note-contents">
<p>Values that do not have a JSON representation (such as <emu-val>undefined</emu-val> and functions) do not produce a String. Instead they produce the <emu-val>undefined</emu-val> value. In arrays these values are represented as the String <code>null</code>. In objects an unrepresentable value causes the property to be excluded from stringification.</p>
</div></emu-note>
<emu-note><span class="note">Note 6</span><div class="note-contents">
<p>An object is rendered as U+007B (LEFT CURLY BRACKET) followed
by zero or more properties, separated with a U+002C (COMMA), closed
with a U+007D (RIGHT CURLY BRACKET). A property is a quoted String
representing the key or <emu-xref href="#property-name" id="_ref_7769"><a href="#property-name">property name</a></emu-xref>,
a U+003A (COLON), and then the stringified property value. An array is
rendered as an opening U+005B (LEFT SQUARE BRACKET followed by zero or
more values, separated with a U+002C (COMMA), closed with a U+005D
(RIGHT SQUARE BRACKET).</p>
</div></emu-note>
<emu-clause id="sec-serializejsonproperty" aoid="SerializeJSONProperty">
<h1><span class="secnum">24.5.2.1</span>Runtime Semantics: SerializeJSONProperty ( <var>key</var>, <var>holder</var> )</h1>
<p>The abstract operation SerializeJSONProperty with arguments <var>key</var>, and <var>holder</var> has access to <var>ReplacerFunction</var> from the invocation of the <code>stringify</code> method. Its algorithm is as follows:</p>
<emu-alg><ol><li>Let <var>value</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_7770"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>holder</var>, <var>key</var>).</li><li>If <emu-xref aoid="Type" id="_ref_7771"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>value</var>) is Object, then<ol><li>Let <var>toJSON</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_7772"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>value</var>, <code>"toJSON"</code>).</li><li>If <emu-xref aoid="IsCallable" id="_ref_7773"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>toJSON</var>) is <emu-val>true</emu-val>, then<ol><li>Set <var>value</var> to ?&nbsp;<emu-xref aoid="Call" id="_ref_7774"><a href="#sec-call">Call</a></emu-xref>(<var>toJSON</var>, <var>value</var>, « <var>key</var> »).</li></ol></li></ol></li><li>If <var>ReplacerFunction</var> is not <emu-val>undefined</emu-val>, then<ol><li>Set <var>value</var> to ?&nbsp;<emu-xref aoid="Call" id="_ref_7775"><a href="#sec-call">Call</a></emu-xref>(<var>ReplacerFunction</var>, <var>holder</var>, « <var>key</var>, <var>value</var> »).</li></ol></li><li>If <emu-xref aoid="Type" id="_ref_7776"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>value</var>) is Object, then<ol><li>If <var>value</var> has a [[NumberData]] internal slot, then<ol><li>Set <var>value</var> to ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_7777"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>value</var>).</li></ol></li><li>Else if <var>value</var> has a [[StringData]] internal slot, then<ol><li>Set <var>value</var> to ?&nbsp;<emu-xref aoid="ToString" id="_ref_7778"><a href="#sec-tostring">ToString</a></emu-xref>(<var>value</var>).</li></ol></li><li>Else if <var>value</var> has a [[BooleanData]] internal slot, then<ol><li>Set <var>value</var> to <var>value</var>.[[BooleanData]].</li></ol></li></ol></li><li>If <var>value</var> is <emu-val>null</emu-val>, return <code>"null"</code>.</li><li>If <var>value</var> is <emu-val>true</emu-val>, return <code>"true"</code>.</li><li>If <var>value</var> is <emu-val>false</emu-val>, return <code>"false"</code>.</li><li>If <emu-xref aoid="Type" id="_ref_7779"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>value</var>) is String, return <emu-xref aoid="QuoteJSONString" id="_ref_7780"><a href="#sec-quotejsonstring">QuoteJSONString</a></emu-xref>(<var>value</var>).</li><li>If <emu-xref aoid="Type" id="_ref_7781"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>value</var>) is Number, then<ol><li>If <var>value</var> is finite, return !&nbsp;<emu-xref aoid="ToString" id="_ref_7782"><a href="#sec-tostring">ToString</a></emu-xref>(<var>value</var>).</li><li>Return <code>"null"</code>.</li></ol></li><li>If <emu-xref aoid="Type" id="_ref_7783"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>value</var>) is Object and <emu-xref aoid="IsCallable" id="_ref_7784"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>value</var>) is <emu-val>false</emu-val>, then<ol><li>Let <var>isArray</var> be ?&nbsp;<emu-xref aoid="IsArray" id="_ref_7785"><a href="#sec-isarray">IsArray</a></emu-xref>(<var>value</var>).</li><li>If <var>isArray</var> is <emu-val>true</emu-val>, return ?&nbsp;<emu-xref aoid="SerializeJSONArray" id="_ref_7786"><a href="#sec-serializejsonarray">SerializeJSONArray</a></emu-xref>(<var>value</var>).</li><li>Return ?&nbsp;<emu-xref aoid="SerializeJSONObject" id="_ref_7787"><a href="#sec-serializejsonobject">SerializeJSONObject</a></emu-xref>(<var>value</var>).</li></ol></li><li>Return <emu-val>undefined</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-quotejsonstring" aoid="QuoteJSONString">
<h1><span class="secnum">24.5.2.2</span>Runtime Semantics: QuoteJSONString ( <var>value</var> )</h1>
<p>The abstract operation QuoteJSONString with argument <var>value</var> wraps a String value in QUOTATION MARK code units and escapes certain other code units within it.</p>
<p>This operation interprets a String value as a sequence of UTF-16 encoded code points, as described in <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_674"><a href="#sec-ecmascript-language-types-string-type">6.1.4</a></emu-xref>.</p>
<emu-alg><ol><li>Let <var>product</var> be the String value consisting solely of the code unit 0x0022 (QUOTATION MARK).</li><li>Let <var>cpList</var> be a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7788"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing in order the code points of <var>value</var> when interpreted as a sequence of UTF-16 encoded code points as described in <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_675"><a href="#sec-ecmascript-language-types-string-type">6.1.4</a></emu-xref>.</li><li>For each code point <var>C</var> in <var>cpList</var>, do<ol><li>If <var>C</var> is listed in the Code Point column of <emu-xref href="#table-json-single-character-escapes" id="_ref_676"><a href="#table-json-single-character-escapes">Table 62</a></emu-xref>, then<ol><li>Set <var>product</var> to the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_7789"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>product</var> and the Escape Sequence for <var>C</var> as specified in <emu-xref href="#table-json-single-character-escapes" id="_ref_677"><a href="#table-json-single-character-escapes">Table 62</a></emu-xref>.</li></ol></li><li>Else if <var>C</var> has a numeric value less than 0x0020 (SPACE), or if <var>C</var> has the same numeric value as a <emu-xref href="#leading-surrogate" id="_ref_678"><a href="#leading-surrogate">leading surrogate</a></emu-xref> or <emu-xref href="#trailing-surrogate" id="_ref_679"><a href="#trailing-surrogate">trailing surrogate</a></emu-xref>, then<ol><li>Let <var>unit</var> be the code unit whose numeric value is that of <var>C</var>.</li><li>Set <var>product</var> to the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_7790"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>product</var> and <emu-xref aoid="UnicodeEscape" id="_ref_7791"><a href="#sec-unicodeescape">UnicodeEscape</a></emu-xref>(<var>unit</var>).</li></ol></li><li>Else,<ol><li>Set <var>product</var> to the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_7792"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>product</var> and the <emu-xref aoid="UTF16Encoding" id="_ref_7793"><a href="#sec-utf16encoding">UTF16Encoding</a></emu-xref> of <var>C</var>.</li></ol></li></ol></li><li>Set <var>product</var> to the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_7794"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>product</var> and the code unit 0x0022 (QUOTATION MARK).</li><li>Return <var>product</var>.
</li></ol></emu-alg>
<emu-table id="table-json-single-character-escapes" caption="JSON Single Character Escape Sequences"><figure><figcaption>Table 62: JSON Single Character Escape Sequences</figcaption>
<table>
<tbody>
<tr>
<th>
Code Point
</th>
<th>
Unicode Character Name
</th>
<th>
Escape Sequence
</th>
</tr>
<tr>
<td>
U+0008
</td>
<td>
BACKSPACE
</td>
<td>
<code>\b</code>
</td>
</tr>
<tr>
<td>
U+0009
</td>
<td>
CHARACTER TABULATION
</td>
<td>
<code>\t</code>
</td>
</tr>
<tr>
<td>
U+000A
</td>
<td>
LINE FEED (LF)
</td>
<td>
<code>\n</code>
</td>
</tr>
<tr>
<td>
U+000C
</td>
<td>
FORM FEED (FF)
</td>
<td>
<code>\f</code>
</td>
</tr>
<tr>
<td>
U+000D
</td>
<td>
CARRIAGE RETURN (CR)
</td>
<td>
<code>\r</code>
</td>
</tr>
<tr>
<td>
U+0022
</td>
<td>
QUOTATION MARK
</td>
<td>
<code>\"</code>
</td>
</tr>
<tr>
<td>
U+005C
</td>
<td>
REVERSE SOLIDUS
</td>
<td>
<code>\\</code>
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
</emu-clause>
<emu-clause id="sec-unicodeescape" aoid="UnicodeEscape">
<h1><span class="secnum">24.5.2.3</span>Runtime Semantics: UnicodeEscape ( <var>C</var> )</h1>
<p>The abstract operation UnicodeEscape takes a code unit argument <var>C</var> and represents it as a Unicode escape sequence.</p>
<emu-alg><ol><li>Let <var>n</var> be the numeric value of <var>C</var>.</li><li><emu-xref href="#assert" id="_ref_7795"><a href="#assert">Assert</a></emu-xref>: <var>n</var> ≤ 0xFFFF.</li><li>Return the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_7796"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of:<ul><li>the code unit 0x005C (REVERSE SOLIDUS)</li><li><code>"u"</code></li><li>the String representation of <var>n</var>, formatted as a four-digit lowercase hexadecimal number, padded to the left with zeroes if necessary
</li></ul></li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-serializejsonobject" aoid="SerializeJSONObject">
<h1><span class="secnum">24.5.2.4</span>Runtime Semantics: SerializeJSONObject ( <var>value</var> )</h1>
<p>The abstract operation SerializeJSONObject with argument <var>value</var> serializes an object. It has access to the <var>stack</var>, <var>indent</var>, <var>gap</var>, and <var>PropertyList</var> values of the current invocation of the <code>stringify</code> method.</p>
<emu-alg><ol><li>If <var>stack</var> contains <var>value</var>, throw a <emu-val>TypeError</emu-val> exception because the structure is cyclical.</li><li>Append <var>value</var> to <var>stack</var>.</li><li>Let <var>stepback</var> be <var>indent</var>.</li><li>Set <var>indent</var> to the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_7797"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>indent</var> and <var>gap</var>.</li><li>If <var>PropertyList</var> is not <emu-val>undefined</emu-val>, then<ol><li>Let <var>K</var> be <var>PropertyList</var>.</li></ol></li><li>Else,<ol><li>Let <var>K</var> be ?&nbsp;<emu-xref aoid="EnumerableOwnPropertyNames" id="_ref_7798"><a href="#sec-enumerableownpropertynames">EnumerableOwnPropertyNames</a></emu-xref>(<var>value</var>, <emu-val>"key"</emu-val>).</li></ol></li><li>Let <var>partial</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7799"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>For each element <var>P</var> of <var>K</var>, do<ol><li>Let <var>strP</var> be ?&nbsp;<emu-xref aoid="SerializeJSONProperty" id="_ref_7800"><a href="#sec-serializejsonproperty">SerializeJSONProperty</a></emu-xref>(<var>P</var>, <var>value</var>).</li><li>If <var>strP</var> is not <emu-val>undefined</emu-val>, then<ol><li>Let <var>member</var> be <emu-xref aoid="QuoteJSONString" id="_ref_7801"><a href="#sec-quotejsonstring">QuoteJSONString</a></emu-xref>(<var>P</var>).</li><li>Set <var>member</var> to the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_7802"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>member</var> and <code>":"</code>.</li><li>If <var>gap</var> is not the empty String, then<ol><li>Set <var>member</var> to the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_7803"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>member</var> and the code unit 0x0020 (SPACE).</li></ol></li><li>Set <var>member</var> to the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_7804"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>member</var> and <var>strP</var>.</li><li>Append <var>member</var> to <var>partial</var>.</li></ol></li></ol></li><li>If <var>partial</var> is empty, then<ol><li>Let <var>final</var> be <code>"{}"</code>.</li></ol></li><li>Else,<ol><li>If <var>gap</var> is the empty String, then<ol><li>Let <var>properties</var> be the String value formed by concatenating all the element Strings of <var>partial</var>
with each adjacent pair of Strings separated with the code unit 0x002C
(COMMA). A comma is not inserted either before the first String or after
the last String.</li><li>Let <var>final</var> be the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_7805"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <code>"{"</code>, <var>properties</var>, and <code>"}"</code>.</li></ol></li><li>Else <var>gap</var> is not the empty String,<ol><li>Let <var>separator</var> be the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_7806"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of the code unit 0x002C (COMMA), the code unit 0x000A (LINE FEED), and <var>indent</var>.</li><li>Let <var>properties</var> be the String value formed by concatenating all the element Strings of <var>partial</var> with each adjacent pair of Strings separated with <var>separator</var>. The <var>separator</var> String is not inserted either before the first String or after the last String.</li><li>Let <var>final</var> be the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_7807"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <code>"{"</code>, the code unit 0x000A (LINE FEED), <var>indent</var>, <var>properties</var>, the code unit 0x000A (LINE FEED), <var>stepback</var>, and <code>"}"</code>.</li></ol></li></ol></li><li>Remove the last element of <var>stack</var>.</li><li>Set <var>indent</var> to <var>stepback</var>.</li><li>Return <var>final</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-serializejsonarray" aoid="SerializeJSONArray">
<h1><span class="secnum">24.5.2.5</span>Runtime Semantics: SerializeJSONArray ( <var>value</var> )</h1>
<p>The abstract operation SerializeJSONArray with argument <var>value</var> serializes an array. It has access to the <var>stack</var>, <var>indent</var>, and <var>gap</var> values of the current invocation of the <code>stringify</code> method.</p>
<emu-alg><ol><li>If <var>stack</var> contains <var>value</var>, throw a <emu-val>TypeError</emu-val> exception because the structure is cyclical.</li><li>Append <var>value</var> to <var>stack</var>.</li><li>Let <var>stepback</var> be <var>indent</var>.</li><li>Set <var>indent</var> to the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_7808"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>indent</var> and <var>gap</var>.</li><li>Let <var>partial</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7809"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>len</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_7810"><a href="#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_7811"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>value</var>, <code>"length"</code>)).</li><li>Let <var>index</var> be 0.</li><li>Repeat, while <var>index</var> &lt; <var>len</var><ol><li>Let <var>strP</var> be ?&nbsp;<emu-xref aoid="SerializeJSONProperty" id="_ref_7812"><a href="#sec-serializejsonproperty">SerializeJSONProperty</a></emu-xref>(! <emu-xref aoid="ToString" id="_ref_7813"><a href="#sec-tostring">ToString</a></emu-xref>(<var>index</var>), <var>value</var>).</li><li>If <var>strP</var> is <emu-val>undefined</emu-val>, then<ol><li>Append <code>"null"</code> to <var>partial</var>.</li></ol></li><li>Else,<ol><li>Append <var>strP</var> to <var>partial</var>.</li></ol></li><li>Increment <var>index</var> by 1.</li></ol></li><li>If <var>partial</var> is empty, then<ol><li>Let <var>final</var> be <code>"[]"</code>.</li></ol></li><li>Else,<ol><li>If <var>gap</var> is the empty String, then<ol><li>Let <var>properties</var> be the String value formed by concatenating all the element Strings of <var>partial</var>
with each adjacent pair of Strings separated with the code unit 0x002C
(COMMA). A comma is not inserted either before the first String or after
the last String.</li><li>Let <var>final</var> be the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_7814"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <code>"["</code>, <var>properties</var>, and <code>"]"</code>.</li></ol></li><li>Else,<ol><li>Let <var>separator</var> be the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_7815"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of the code unit 0x002C (COMMA), the code unit 0x000A (LINE FEED), and <var>indent</var>.</li><li>Let <var>properties</var> be the String value formed by concatenating all the element Strings of <var>partial</var> with each adjacent pair of Strings separated with <var>separator</var>. The <var>separator</var> String is not inserted either before the first String or after the last String.</li><li>Let <var>final</var> be the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_7816"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <code>"["</code>, the code unit 0x000A (LINE FEED), <var>indent</var>, <var>properties</var>, the code unit 0x000A (LINE FEED), <var>stepback</var>, and <code>"]"</code>.</li></ol></li></ol></li><li>Remove the last element of <var>stack</var>.</li><li>Set <var>indent</var> to <var>stepback</var>.</li><li>Return <var>final</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The representation of arrays includes only the elements between zero and <emu-eqn class="inline"><code>array.length</code> - 1</emu-eqn> inclusive. Properties whose keys are not <emu-xref href="#array-index" id="_ref_680"><a href="#array-index">array indexes</a></emu-xref>
are excluded from the stringification. An array is stringified as an
opening LEFT SQUARE BRACKET, elements separated by COMMA, and a closing
RIGHT SQUARE BRACKET.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-json-@@tostringtag">
<h1><span class="secnum">24.5.3</span>JSON [ @@toStringTag ]</h1>
<p>The initial value of the @@toStringTag property is the String value <code>"JSON"</code>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-control-abstraction-objects">
<h1><span class="secnum">25</span>Control Abstraction Objects</h1>
<emu-clause id="sec-iteration">
<h1><span class="secnum">25.1</span>Iteration</h1>
<emu-clause id="sec-common-iteration-interfaces">
<h1><span class="secnum">25.1.1</span>Common Iteration Interfaces</h1>
<p>An interface is a set of property keys whose associated values
match a specific specification. Any object that provides all the
properties as described by an interface's specification <em>conforms</em>
to that interface. An interface is not represented by a distinct
object. There may be many separately implemented objects that conform to
any interface. An individual object may conform to multiple interfaces.</p>
<emu-clause id="sec-iterable-interface">
<h1><span class="secnum">25.1.1.1</span>The <i>Iterable</i> Interface</h1>
<p>The <i>Iterable</i> interface includes the property described in <emu-xref href="#table-52" id="_ref_681"><a href="#table-52">Table 63</a></emu-xref>:</p>
<emu-table id="table-52" caption="&lt;i&gt;Iterable&lt;/i&gt; Interface Required Properties"><figure><figcaption>Table 63: <i>Iterable</i> Interface Required Properties</figcaption>
<table>
<tbody>
<tr>
<th>
Property
</th>
<th>
Value
</th>
<th>
Requirements
</th>
</tr>
<tr>
<td>
<code>@@iterator</code>
</td>
<td>
A function that returns an <i>Iterator</i> object.
</td>
<td>
The returned object must conform to the <i>Iterator</i> interface.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
</emu-clause>
<emu-clause id="sec-iterator-interface">
<h1><span class="secnum">25.1.1.2</span>The <i>Iterator</i> Interface</h1>
<p>An object that implements the <i>Iterator</i> interface must include the property in <emu-xref href="#table-53" id="_ref_682"><a href="#table-53">Table 64</a></emu-xref>. Such objects may also implement the properties in <emu-xref href="#table-54" id="_ref_683"><a href="#table-54">Table 65</a></emu-xref>.</p>
<emu-table id="table-53" caption="&lt;i&gt;Iterator&lt;/i&gt; Interface Required Properties"><figure><figcaption>Table 64: <i>Iterator</i> Interface Required Properties</figcaption>
<table>
<tbody>
<tr>
<th>
Property
</th>
<th>
Value
</th>
<th>
Requirements
</th>
</tr>
<tr>
<td>
<code>next</code>
</td>
<td>
A function that returns an <i>IteratorResult</i> object.
</td>
<td>
The returned object must conform to the <i>IteratorResult</i> interface. If a previous call to the <code>next</code> method of an <i>Iterator</i> has returned an <i>IteratorResult</i> object whose <code>done</code> property is <emu-val>true</emu-val>, then all subsequent calls to the <code>next</code> method of that object should also return an <i>IteratorResult</i> object whose <code>done</code> property is <emu-val>true</emu-val>. However, this requirement is not enforced.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>Arguments may be passed to the next function but their interpretation and validity is dependent upon the target <i>Iterator</i>. The for-of statement and other common users of <em>Iterators</em> do not pass any arguments, so <i>Iterator</i> objects that expect to be used in such a manner must be prepared to deal with being called with no arguments.</p>
</div></emu-note>
<emu-table id="table-54" caption="&lt;i&gt;Iterator&lt;/i&gt; Interface Optional Properties"><figure><figcaption>Table 65: <i>Iterator</i> Interface Optional Properties</figcaption>
<table>
<tbody>
<tr>
<th>
Property
</th>
<th>
Value
</th>
<th>
Requirements
</th>
</tr>
<tr>
<td>
<code>return</code>
</td>
<td>
A function that returns an <i>IteratorResult</i> object.
</td>
<td>
The returned object must conform to the <i>IteratorResult</i> interface. Invoking this method notifies the <i>Iterator</i> object that the caller does not intend to make any more <code>next</code> method calls to the <i>Iterator</i>. The returned <i>IteratorResult</i> object will typically have a <code>done</code> property whose value is <emu-val>true</emu-val>, and a <code>value</code> property with the value passed as the argument of the <code>return</code> method. However, this requirement is not enforced.
</td>
</tr>
<tr>
<td>
<code>throw</code>
</td>
<td>
A function that returns an <i>IteratorResult</i> object.
</td>
<td>
The returned object must conform to the <i>IteratorResult</i> interface. Invoking this method notifies the <i>Iterator</i>
object that the caller has detected an error condition. The argument
may be used to identify the error condition and typically will be an
exception object. A typical response is to <code>throw</code> the value passed as the argument. If the method does not <code>throw</code>, the returned <i>IteratorResult</i> object will typically have a <code>done</code> property whose value is <emu-val>true</emu-val>.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>Typically callers of these methods should check for their
existence before invoking them. Certain ECMAScript language features
including <code>for</code>-<code>of</code>, <code>yield*</code>, and
array destructuring call these methods after performing an existence
check. Most ECMAScript library functions that accept <i>Iterable</i> objects as arguments also conditionally call them.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-asynciterable-interface">
<h1><span class="secnum">25.1.1.3</span>The <i>AsyncIterable</i> Interface</h1>
<p>The <i>AsyncIterable</i> interface includes the properties described in <emu-xref href="#table-async-iterable" id="_ref_684"><a href="#table-async-iterable">Table 66</a></emu-xref>:</p>
<emu-table id="table-async-iterable" caption="&lt;i&gt;AsyncIterable&lt;/i&gt; Interface Required Properties"><figure><figcaption>Table 66: <i>AsyncIterable</i> Interface Required Properties</figcaption>
<table>
<tbody>
<tr>
<th>Property</th>
<th>Value</th>
<th>Requirements</th>
</tr>
<tr>
<td><code>@@asyncIterator</code></td>
<td>A function that returns an <i>AsyncIterator</i> object.</td>
<td>The returned object must conform to the <i>AsyncIterator</i> interface.</td>
</tr>
</tbody>
</table>
</figure></emu-table>
</emu-clause>
<emu-clause id="sec-asynciterator-interface">
<h1><span class="secnum">25.1.1.4</span>The <i>AsyncIterator</i> Interface</h1>
<p>An object that implements the <i>AsyncIterator</i> interface must include the properties in <emu-xref href="#table-async-iterator-required" id="_ref_685"><a href="#table-async-iterator-required">Table 67</a></emu-xref>. Such objects may also implement the properties in <emu-xref href="#table-async-iterator-optional" id="_ref_686"><a href="#table-async-iterator-optional">Table 68</a></emu-xref>.</p>
<emu-table id="table-async-iterator-required" caption="&lt;i&gt;AsyncIterator&lt;/i&gt; Interface Required Properties"><figure><figcaption>Table 67: <i>AsyncIterator</i> Interface Required Properties</figcaption>
<table>
<tbody>
<tr>
<th>Property</th>
<th>Value</th>
<th>Requirements</th>
</tr>
<tr>
<td><code>next</code></td>
<td>A function that returns a promise for an <i>IteratorResult</i> object.</td>
<td>
<p>The returned promise, when fulfilled, must fulfill with an object which conforms to the <i>IteratorResult</i> interface. If a previous call to the <code>next</code> method of an <i>AsyncIterator</i> has returned a promise for an <i>IteratorResult</i> object whose <code>done</code> property is <emu-val>true</emu-val>, then all subsequent calls to the <code>next</code> method of that object should also return a promise for an <i>IteratorResult</i> object whose <code>done</code> property is <emu-val>true</emu-val>. However, this requirement is not enforced.</p>
<p>Additionally, the <i>IteratorResult</i> object that serves as a fulfillment value should have a <code>value</code> property whose value is not a promise (or "thenable"). However, this requirement is also not enforced.</p>
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>Arguments may be passed to the next function but their interpretation and validity is dependent upon the target <i>AsyncIterator</i>. The <code>for</code>-<code>await</code>-<code>of</code> statement and other common users of <em>AsyncIterators</em> do not pass any arguments, so <i>AsyncIterator</i> objects that expect to be used in such a manner must be prepared to deal with being called with no arguments.</p>
</div></emu-note>
<emu-table id="table-async-iterator-optional" caption="&lt;i&gt;AsyncIterator&lt;/i&gt; Interface Optional Properties"><figure><figcaption>Table 68: <i>AsyncIterator</i> Interface Optional Properties</figcaption>
<table>
<tbody>
<tr>
<th>Property</th>
<th>Value</th>
<th>Requirements</th>
</tr>
<tr>
<td><code>return</code></td>
<td>A function that returns a promise for an <i>IteratorResult</i> object.</td>
<td>
<p>The returned promise, when fulfilled, must fulfill with an object which conforms to the <i>IteratorResult</i> interface. Invoking this method notifies the <i>AsyncIterator</i> object that the caller does not intend to make any more <code>next</code> method calls to the <i>AsyncIterator</i>. The returned promise will fulfill with an <i>IteratorResult</i> object which will typically have a <code>done</code> property whose value is <emu-val>true</emu-val>, and a <code>value</code> property with the value passed as the argument of the <code>return</code> method. However, this requirement is not enforced.</p>
<p>Additionally, the <i>IteratorResult</i> object that serves as a fulfillment value should have a <code>value</code>
property whose value is not a promise (or "thenable"). If the argument
value is used in the typical manner, then if it is a rejected promise, a
promise rejected with the same reason should be returned; if it is a
fulfilled promise, then its fulfillment value should be used as the <code>value</code> property of the returned promise's <i>IteratorResult</i> object fulfillment value. However, these requirements are also not enforced.</p>
</td>
</tr>
<tr>
<td><code>throw</code></td>
<td>A function that returns a promise for an <i>IteratorResult</i> object.</td>
<td>
<p>The returned promise, when fulfilled, must fulfill with an object which conforms to the <i>IteratorResult</i> interface. Invoking this method notifies the <i>AsyncIterator</i>
object that the caller has detected an error condition. The argument
may be used to identify the error condition and typically will be an
exception object. A typical response is to return a rejected promise
which rejects with the value passed as the argument.</p>
<p>If the returned promise is fulfilled, the <i>IteratorResult</i> fulfillment value will typically have a <code>done</code> property whose value is <emu-val>true</emu-val>. Additionally, it should have a <code>value</code> property whose value is not a promise (or "thenable"), but this requirement is not enforced.</p>
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>Typically callers of these methods should check for their
existence before invoking them. Certain ECMAScript language features
including <code>for</code>-<code>await</code>-<code>of</code> and <code>yield*</code> call these methods after performing an existence check.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-iteratorresult-interface">
<h1><span class="secnum">25.1.1.5</span>The IteratorResult Interface</h1>
<p>The <i>IteratorResult</i> interface includes the properties listed in <emu-xref href="#table-55" id="_ref_687"><a href="#table-55">Table 69</a></emu-xref>:</p>
<emu-table id="table-55" caption="&lt;i&gt;IteratorResult&lt;/i&gt; Interface Properties"><figure><figcaption>Table 69: <i>IteratorResult</i> Interface Properties</figcaption>
<table>
<tbody>
<tr>
<th>
Property
</th>
<th>
Value
</th>
<th>
Requirements
</th>
</tr>
<tr>
<td>
<code>done</code>
</td>
<td>
Either <emu-val>true</emu-val> or <emu-val>false</emu-val>.
</td>
<td>
This is the result status of an <em>iterator</em> <code>next</code> method call. If the end of the iterator was reached <code>done</code> is <emu-val>true</emu-val>. If the end was not reached <code>done</code> is <emu-val>false</emu-val> and a value is available. If a <code>done</code> property (either own or inherited) does not exist, it is consider to have the value <emu-val>false</emu-val>.
</td>
</tr>
<tr>
<td>
<code>value</code>
</td>
<td>
Any <emu-xref href="#sec-ecmascript-language-types" id="_ref_7817"><a href="#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref>.
</td>
<td>
If done is <emu-val>false</emu-val>, this is the current iteration element value. If done is <emu-val>true</emu-val>, this is the return value of the iterator, if it supplied one. If the iterator does not have a return value, <code>value</code> is <emu-val>undefined</emu-val>. In that case, the <code>value</code> property may be absent from the conforming object if it does not inherit an explicit <code>value</code> property.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
</emu-clause>
</emu-clause>
<emu-clause id="sec-%iteratorprototype%-object">
<h1><span class="secnum">25.1.2</span>The %IteratorPrototype% Object</h1>
<p>The <dfn>%IteratorPrototype%</dfn> object:</p>
<ul>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_7818"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>.</li>
<li>is an ordinary object.</li>
</ul>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>All objects defined in this specification that implement the
Iterator interface also inherit from %IteratorPrototype%. ECMAScript
code may also define objects that inherit from %IteratorPrototype%.The
%IteratorPrototype% object provides a place where additional methods
that are applicable to all iterator objects may be added.</p>
<p>The following expression is one way that ECMAScript code can access the %IteratorPrototype% object:</p>
<pre><code class="javascript hljs"><span class="hljs-built_in">Object</span>.getPrototypeOf(<span class="hljs-built_in">Object</span>.getPrototypeOf([][<span class="hljs-built_in">Symbol</span>.iterator]()))</code></pre>
</div></emu-note>
<emu-clause id="sec-%iteratorprototype%-@@iterator">
<h1><span class="secnum">25.1.2.1</span>%IteratorPrototype% [ @@iterator ] ( )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Return the <emu-val>this</emu-val> value.
</li></ol></emu-alg>
<p>The value of the <code>name</code> property of this function is <code>"[Symbol.iterator]"</code>.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-asynciteratorprototype">
<h1><span class="secnum">25.1.3</span>The %AsyncIteratorPrototype% Object</h1>
<p>The <dfn>%AsyncIteratorPrototype%</dfn> object:</p>
<ul>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_7819"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>.</li>
<li>is an ordinary object.</li>
</ul>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>All objects defined in this specification that implement the
AsyncIterator interface also inherit from %AsyncIteratorPrototype%.
ECMAScript code may also define objects that inherit from
%AsyncIteratorPrototype%.The %AsyncIteratorPrototype% object provides a
place where additional methods that are applicable to all async iterator
objects may be added.</p>
</div></emu-note>
<emu-clause id="sec-asynciteratorprototype-asynciterator">
<h1><span class="secnum">25.1.3.1</span>%AsyncIteratorPrototype% [ @@asyncIterator ] ( )</h1>
<p>The following steps are taken:</p>
<emu-alg><ol><li>Return the <emu-val>this</emu-val> value.
</li></ol></emu-alg>
<p>The value of the <code>name</code> property of this function is <code>"[Symbol.asyncIterator]"</code>.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-async-from-sync-iterator-objects">
<h1><span class="secnum">25.1.4</span>Async-from-Sync Iterator Objects</h1>
<p>An Async-from-Sync Iterator object is an async iterator that adapts a specific synchronous iterator. There is not a named <emu-xref href="#constructor" id="_ref_7820"><a href="#constructor">constructor</a></emu-xref> for Async-from-Sync Iterator objects. Instead, Async-from-Sync iterator objects are created by the <emu-xref aoid="CreateAsyncFromSyncIterator" id="_ref_7821"><a href="#sec-createasyncfromsynciterator">CreateAsyncFromSyncIterator</a></emu-xref> abstract operation as needed.</p>
<emu-clause id="sec-createasyncfromsynciterator" aoid="CreateAsyncFromSyncIterator">
<h1><span class="secnum">25.1.4.1</span>CreateAsyncFromSyncIterator ( <var>syncIteratorRecord</var> )</h1>
<p>The abstract operation CreateAsyncFromSyncIterator is used to create an async iterator <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7822"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> from a synchronous iterator <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7823"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref>. It performs the following steps:</p>
<emu-alg><ol><li>Let <var>asyncIterator</var> be !&nbsp;<emu-xref aoid="ObjectCreate" id="_ref_7824"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-%asyncfromsynciteratorprototype%-object" id="_ref_7825"><a href="#sec-%asyncfromsynciteratorprototype%-object">%AsyncFromSyncIteratorPrototype%</a></emu-xref>, « [[SyncIteratorRecord]] »).</li><li>Set <var>asyncIterator</var>.[[SyncIteratorRecord]] to <var>syncIteratorRecord</var>.</li><li>Return ?&nbsp;<emu-xref aoid="GetIterator" id="_ref_7826"><a href="#sec-getiterator">GetIterator</a></emu-xref>(<var>asyncIterator</var>, <emu-const>async</emu-const>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-%asyncfromsynciteratorprototype%-object">
<h1><span class="secnum">25.1.4.2</span>The %AsyncFromSyncIteratorPrototype% Object</h1>
<p>The <dfn>%AsyncFromSyncIteratorPrototype%</dfn> object:</p>
<ul>
<li>has properties that are inherited by all Async-from-Sync Iterator Objects.</li>
<li>is an ordinary object.</li>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-asynciteratorprototype" id="_ref_7827"><a href="#sec-asynciteratorprototype">%AsyncIteratorPrototype%</a></emu-xref>.</li>
<li>has the following properties:</li>
</ul>
<emu-clause id="sec-%asyncfromsynciteratorprototype%.next">
<h1><span class="secnum">25.1.4.2.1</span>%AsyncFromSyncIteratorPrototype%.next ( <var>value</var> )</h1>
<emu-alg><ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li>Let <var>promiseCapability</var> be !&nbsp;<emu-xref aoid="NewPromiseCapability" id="_ref_7828"><a href="#sec-newpromisecapability">NewPromiseCapability</a></emu-xref>(<emu-xref href="#sec-promise-constructor" id="_ref_7829"><a href="#sec-promise-constructor">%Promise%</a></emu-xref>).</li><li>If <emu-xref aoid="Type" id="_ref_7830"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, or if <var>O</var> does not have a [[SyncIteratorRecord]] internal slot, then<ol><li>Let <var>invalidIteratorError</var> be a newly created <emu-val>TypeError</emu-val> object.</li><li>Perform !&nbsp;<emu-xref aoid="Call" id="_ref_7831"><a href="#sec-call">Call</a></emu-xref>(<var>promiseCapability</var>.[[Reject]], <emu-val>undefined</emu-val>, « <var>invalidIteratorError</var> »).</li><li>Return <var>promiseCapability</var>.[[Promise]].</li></ol></li><li>Let <var>syncIteratorRecord</var> be <var>O</var>.[[SyncIteratorRecord]].</li><li>Let <var>result</var> be <emu-xref aoid="IteratorNext" id="_ref_7832"><a href="#sec-iteratornext">IteratorNext</a></emu-xref>(<var>syncIteratorRecord</var>, <var>value</var>).</li><li><emu-xref aoid="IfAbruptRejectPromise" id="_ref_7833"><a href="#sec-ifabruptrejectpromise">IfAbruptRejectPromise</a></emu-xref>(<var>result</var>, <var>promiseCapability</var>).</li><li>Return !&nbsp;<emu-xref aoid="AsyncFromSyncIteratorContinuation" id="_ref_7834"><a href="#sec-asyncfromsynciteratorcontinuation">AsyncFromSyncIteratorContinuation</a></emu-xref>(<var>result</var>, <var>promiseCapability</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-%asyncfromsynciteratorprototype%.return">
<h1><span class="secnum">25.1.4.2.2</span>%AsyncFromSyncIteratorPrototype%.return ( <var>value</var> )</h1>
<emu-alg><ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li>Let <var>promiseCapability</var> be !&nbsp;<emu-xref aoid="NewPromiseCapability" id="_ref_7835"><a href="#sec-newpromisecapability">NewPromiseCapability</a></emu-xref>(<emu-xref href="#sec-promise-constructor" id="_ref_7836"><a href="#sec-promise-constructor">%Promise%</a></emu-xref>).</li><li>If <emu-xref aoid="Type" id="_ref_7837"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, or if <var>O</var> does not have a [[SyncIteratorRecord]] internal slot, then<ol><li>Let <var>invalidIteratorError</var> be a newly created <emu-val>TypeError</emu-val> object.</li><li>Perform !&nbsp;<emu-xref aoid="Call" id="_ref_7838"><a href="#sec-call">Call</a></emu-xref>(<var>promiseCapability</var>.[[Reject]], <emu-val>undefined</emu-val>, « <var>invalidIteratorError</var> »).</li><li>Return <var>promiseCapability</var>.[[Promise]].</li></ol></li><li>Let <var>syncIterator</var> be <var>O</var>.[[SyncIteratorRecord]].[[Iterator]].</li><li>Let <var>return</var> be <emu-xref aoid="GetMethod" id="_ref_7839"><a href="#sec-getmethod">GetMethod</a></emu-xref>(<var>syncIterator</var>, <code>"return"</code>).</li><li><emu-xref aoid="IfAbruptRejectPromise" id="_ref_7840"><a href="#sec-ifabruptrejectpromise">IfAbruptRejectPromise</a></emu-xref>(<var>return</var>, <var>promiseCapability</var>).</li><li>If <var>return</var> is <emu-val>undefined</emu-val>, then<ol><li>Let <var>iterResult</var> be !&nbsp;<emu-xref aoid="CreateIterResultObject" id="_ref_7841"><a href="#sec-createiterresultobject">CreateIterResultObject</a></emu-xref>(<var>value</var>, <emu-val>true</emu-val>).</li><li>Perform !&nbsp;<emu-xref aoid="Call" id="_ref_7842"><a href="#sec-call">Call</a></emu-xref>(<var>promiseCapability</var>.[[Resolve]], <emu-val>undefined</emu-val>, « <var>iterResult</var> »).</li><li>Return <var>promiseCapability</var>.[[Promise]].</li></ol></li><li>Let <var>result</var> be <emu-xref aoid="Call" id="_ref_7843"><a href="#sec-call">Call</a></emu-xref>(<var>return</var>, <var>syncIterator</var>, « <var>value</var> »).</li><li><emu-xref aoid="IfAbruptRejectPromise" id="_ref_7844"><a href="#sec-ifabruptrejectpromise">IfAbruptRejectPromise</a></emu-xref>(<var>result</var>, <var>promiseCapability</var>).</li><li>If <emu-xref aoid="Type" id="_ref_7845"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>result</var>) is not Object, then<ol><li>Perform !&nbsp;<emu-xref aoid="Call" id="_ref_7846"><a href="#sec-call">Call</a></emu-xref>(<var>promiseCapability</var>.[[Reject]], <emu-val>undefined</emu-val>, « a newly created <emu-val>TypeError</emu-val> object »).</li><li>Return <var>promiseCapability</var>.[[Promise]].</li></ol></li><li>Return !&nbsp;<emu-xref aoid="AsyncFromSyncIteratorContinuation" id="_ref_7847"><a href="#sec-asyncfromsynciteratorcontinuation">AsyncFromSyncIteratorContinuation</a></emu-xref>(<var>result</var>, <var>promiseCapability</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-%asyncfromsynciteratorprototype%.throw">
<h1><span class="secnum">25.1.4.2.3</span>%AsyncFromSyncIteratorPrototype%.throw ( <var>value</var> )</h1>
<emu-alg><ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li>Let <var>promiseCapability</var> be !&nbsp;<emu-xref aoid="NewPromiseCapability" id="_ref_7848"><a href="#sec-newpromisecapability">NewPromiseCapability</a></emu-xref>(<emu-xref href="#sec-promise-constructor" id="_ref_7849"><a href="#sec-promise-constructor">%Promise%</a></emu-xref>).</li><li>If <emu-xref aoid="Type" id="_ref_7850"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, or if <var>O</var> does not have a [[SyncIteratorRecord]] internal slot, then<ol><li>Let <var>invalidIteratorError</var> be a newly created <emu-val>TypeError</emu-val> object.</li><li>Perform !&nbsp;<emu-xref aoid="Call" id="_ref_7851"><a href="#sec-call">Call</a></emu-xref>(<var>promiseCapability</var>.[[Reject]], <emu-val>undefined</emu-val>, « <var>invalidIteratorError</var> »).</li><li>Return <var>promiseCapability</var>.[[Promise]].</li></ol></li><li>Let <var>syncIterator</var> be <var>O</var>.[[SyncIteratorRecord]].[[Iterator]].</li><li>Let <var>throw</var> be <emu-xref aoid="GetMethod" id="_ref_7852"><a href="#sec-getmethod">GetMethod</a></emu-xref>(<var>syncIterator</var>, <code>"throw"</code>).</li><li><emu-xref aoid="IfAbruptRejectPromise" id="_ref_7853"><a href="#sec-ifabruptrejectpromise">IfAbruptRejectPromise</a></emu-xref>(<var>throw</var>, <var>promiseCapability</var>).</li><li>If <var>throw</var> is <emu-val>undefined</emu-val>, then<ol><li>Perform !&nbsp;<emu-xref aoid="Call" id="_ref_7854"><a href="#sec-call">Call</a></emu-xref>(<var>promiseCapability</var>.[[Reject]], <emu-val>undefined</emu-val>, « <var>value</var> »).</li><li>Return <var>promiseCapability</var>.[[Promise]].</li></ol></li><li>Let <var>result</var> be <emu-xref aoid="Call" id="_ref_7855"><a href="#sec-call">Call</a></emu-xref>(<var>throw</var>, <var>syncIterator</var>, « <var>value</var> »).</li><li><emu-xref aoid="IfAbruptRejectPromise" id="_ref_7856"><a href="#sec-ifabruptrejectpromise">IfAbruptRejectPromise</a></emu-xref>(<var>result</var>, <var>promiseCapability</var>).</li><li>If <emu-xref aoid="Type" id="_ref_7857"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>result</var>) is not Object, then<ol><li>Perform !&nbsp;<emu-xref aoid="Call" id="_ref_7858"><a href="#sec-call">Call</a></emu-xref>(<var>promiseCapability</var>.[[Reject]], <emu-val>undefined</emu-val>, « a newly created <emu-val>TypeError</emu-val> object »).</li><li>Return <var>promiseCapability</var>.[[Promise]].</li></ol></li><li>Return !&nbsp;<emu-xref aoid="AsyncFromSyncIteratorContinuation" id="_ref_7859"><a href="#sec-asyncfromsynciteratorcontinuation">AsyncFromSyncIteratorContinuation</a></emu-xref>(<var>result</var>, <var>promiseCapability</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-%asyncfromsynciteratorprototype%-@@tostringtag">
<h1><span class="secnum">25.1.4.2.4</span>%AsyncFromSyncIteratorPrototype% [ @@toStringTag ]</h1>
<p>The initial value of the @@toStringTag property is the String value <code>"Async-from-Sync Iterator"</code>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-async-from-sync-iterator-value-unwrap-functions">
<h1><span class="secnum">25.1.4.2.5</span>Async-from-Sync Iterator Value Unwrap Functions</h1>
<p>An async-from-sync iterator value unwrap function is an anonymous built-in function that is used by methods of <emu-xref href="#sec-%asyncfromsynciteratorprototype%-object" id="_ref_7860"><a href="#sec-%asyncfromsynciteratorprototype%-object">%AsyncFromSyncIteratorPrototype%</a></emu-xref> when processing the <code>value</code> field of an <i>IteratorResult</i> object, in order to wait for its value if it is a promise and re-package the result in a new "unwrapped" <i>IteratorResult</i> object. Each async iterator value unwrap function has a [[Done]] internal slot.</p>
<p>When an async-from-sync iterator value unwrap function is called with argument <var>value</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>F</var> be the <emu-xref href="#active-function-object" id="_ref_7861"><a href="#active-function-object">active function object</a></emu-xref>.</li><li>Return !&nbsp;<emu-xref aoid="CreateIterResultObject" id="_ref_7862"><a href="#sec-createiterresultobject">CreateIterResultObject</a></emu-xref>(<var>value</var>, <var>F</var>.[[Done]]).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-async-from-sync-iterator-instances">
<h1><span class="secnum">25.1.4.3</span>Properties of Async-from-Sync Iterator Instances</h1>
<p>Async-from-Sync Iterator instances are ordinary objects that inherit properties from the <emu-xref href="#sec-%asyncfromsynciteratorprototype%-object" id="_ref_7863"><a href="#sec-%asyncfromsynciteratorprototype%-object">%AsyncFromSyncIteratorPrototype%</a></emu-xref> intrinsic object. Async-from-Sync Iterator instances are initially created with the internal slots listed in <emu-xref href="#table-async-from-sync-iterator-internal-slots" id="_ref_688"><a href="#table-async-from-sync-iterator-internal-slots">Table 70</a></emu-xref>.</p>
<emu-table id="table-async-from-sync-iterator-internal-slots" caption="Internal Slots of Async-from-Sync Iterator Instances"><figure><figcaption>Table 70: Internal Slots of Async-from-Sync Iterator Instances</figcaption>
<table>
<thead>
<tr>
<th>
Internal Slot
</th>
<th>
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
[[SyncIteratorRecord]]
</td>
<td>
A <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7864"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref>, of the type returned by <emu-xref aoid="GetIterator" id="_ref_7865"><a href="#sec-getiterator">GetIterator</a></emu-xref>, representing the original synchronous iterator which is being adapted.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
</emu-clause>
<emu-clause id="sec-asyncfromsynciteratorcontinuation" aoid="AsyncFromSyncIteratorContinuation">
<h1><span class="secnum">25.1.4.4</span>AsyncFromSyncIteratorContinuation ( <var>result</var>, <var>promiseCapability</var> )</h1>
<emu-alg><ol><li>Let <var>done</var> be <emu-xref aoid="IteratorComplete" id="_ref_7866"><a href="#sec-iteratorcomplete">IteratorComplete</a></emu-xref>(<var>result</var>).</li><li><emu-xref aoid="IfAbruptRejectPromise" id="_ref_7867"><a href="#sec-ifabruptrejectpromise">IfAbruptRejectPromise</a></emu-xref>(<var>done</var>, <var>promiseCapability</var>).</li><li>Let <var>value</var> be <emu-xref aoid="IteratorValue" id="_ref_7868"><a href="#sec-iteratorvalue">IteratorValue</a></emu-xref>(<var>result</var>).</li><li><emu-xref aoid="IfAbruptRejectPromise" id="_ref_7869"><a href="#sec-ifabruptrejectpromise">IfAbruptRejectPromise</a></emu-xref>(<var>value</var>, <var>promiseCapability</var>).</li><li>Let <var>valueWrapper</var> be ?&nbsp;<emu-xref aoid="PromiseResolve" id="_ref_7870"><a href="#sec-promise-resolve">PromiseResolve</a></emu-xref>(<emu-xref href="#sec-promise-constructor" id="_ref_7871"><a href="#sec-promise-constructor">%Promise%</a></emu-xref>, « <var>value</var> »).</li><li>Let <var>steps</var> be the algorithm steps defined in <emu-xref href="#sec-async-from-sync-iterator-value-unwrap-functions" title="" id="_ref_689"><a href="#sec-async-from-sync-iterator-value-unwrap-functions">Async-from-Sync Iterator Value Unwrap Functions</a></emu-xref>.</li><li>Let <var>onFulfilled</var> be <emu-xref aoid="CreateBuiltinFunction" id="_ref_7872"><a href="#sec-createbuiltinfunction">CreateBuiltinFunction</a></emu-xref>(<var>steps</var>, « [[Done]] »).</li><li>Set <var>onFulfilled</var>.[[Done]] to <var>done</var>.</li><li>Perform !&nbsp;<emu-xref aoid="PerformPromiseThen" id="_ref_7873"><a href="#sec-performpromisethen">PerformPromiseThen</a></emu-xref>(<var>valueWrapper</var>, <var>onFulfilled</var>, <emu-val>undefined</emu-val>, <var>promiseCapability</var>).</li><li>Return <var>promiseCapability</var>.[[Promise]].
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-generatorfunction-objects">
<h1><span class="secnum">25.2</span>GeneratorFunction Objects</h1>
<p>GeneratorFunction objects are functions that are usually created by evaluating <emu-nt id="_ref_14806"><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a></emu-nt>s, <emu-nt id="_ref_14807"><a href="#prod-GeneratorExpression">GeneratorExpression</a></emu-nt>s, and <emu-nt id="_ref_14808"><a href="#prod-GeneratorMethod">GeneratorMethod</a></emu-nt>s. They may also be created by calling the <emu-xref href="#sec-generatorfunction-constructor" id="_ref_7874"><a href="#sec-generatorfunction-constructor">%GeneratorFunction%</a></emu-xref> intrinsic.</p>
<emu-figure id="figure-2" caption="Generator Objects Relationships" informative=""><figure><figcaption>Figure 5 (Informative): Generator Objects Relationships</figcaption>
<img alt="A staggering variety of boxes and arrows." src="ECMAScript%C2%AE%202019%20Language%C2%A0Specification_files/figure-2.png">
</figure></emu-figure>
<emu-clause id="sec-generatorfunction-constructor">
<h1><span class="secnum">25.2.1</span>The GeneratorFunction Constructor</h1>
<p>The GeneratorFunction <emu-xref href="#constructor" id="_ref_7875"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>is the intrinsic object <dfn>%GeneratorFunction%</dfn>.</li>
<li>creates and initializes a new GeneratorFunction object when called as a function rather than as a <emu-xref href="#constructor" id="_ref_7876"><a href="#constructor">constructor</a></emu-xref>. Thus the function call <code>GeneratorFunction (…)</code> is equivalent to the object creation expression <code>new GeneratorFunction (…)</code> with the same arguments.</li>
<li>is designed to be subclassable. It may be used as the value of an <code>extends</code> clause of a class definition. Subclass constructors that intend to inherit the specified <code>GeneratorFunction</code> behaviour must include a <code>super</code> call to the <code>GeneratorFunction</code> <emu-xref href="#constructor" id="_ref_7877"><a href="#constructor">constructor</a></emu-xref>
to create and initialize subclass instances with the internal slots
necessary for built-in GeneratorFunction behaviour. All ECMAScript
syntactic forms for defining generator function objects create direct
instances of <code>GeneratorFunction</code>. There is no syntactic means to create instances of <code>GeneratorFunction</code> subclasses.</li>
</ul>
<emu-clause id="sec-generatorfunction">
<h1><span class="secnum">25.2.1.1</span>GeneratorFunction ( <var>p1</var>, <var>p2</var>, … , <var>pn</var>, <var>body</var> )</h1>
<p>The last argument specifies the body (executable code) of a
generator function; any preceding arguments specify formal parameters.</p>
<p>When the <code>GeneratorFunction</code> function is called with some arguments <var>p1</var>, <var>p2</var>, … , <var>pn</var>, <var>body</var> (where <var>n</var> might be 0, that is, there are no “<var>p</var>” arguments, and where <var>body</var> might also not be provided), the following steps are taken:</p>
<emu-alg><ol><li>Let <var>C</var> be the <emu-xref href="#active-function-object" id="_ref_7878"><a href="#active-function-object">active function object</a></emu-xref>.</li><li>Let <var>args</var> be the <var>argumentsList</var> that was passed to this function by [[Call]] or [[Construct]].</li><li>Return ?&nbsp;<emu-xref aoid="CreateDynamicFunction" id="_ref_7879"><a href="#sec-createdynamicfunction">CreateDynamicFunction</a></emu-xref>(<var>C</var>, NewTarget, <code>"generator"</code>, <var>args</var>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>See NOTE for <emu-xref href="#sec-function-p1-p2-pn-body" id="_ref_690"><a href="#sec-function-p1-p2-pn-body">19.2.1.1</a></emu-xref>.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-generatorfunction-constructor">
<h1><span class="secnum">25.2.2</span>Properties of the GeneratorFunction Constructor</h1>
<p>The GeneratorFunction <emu-xref href="#constructor" id="_ref_7880"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>is a standard built-in <emu-xref href="#function-object" id="_ref_7881"><a href="#function-object">function object</a></emu-xref> that inherits from the <code>Function</code> <emu-xref href="#constructor" id="_ref_7882"><a href="#constructor">constructor</a></emu-xref>.</li>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-function-constructor" id="_ref_7883"><a href="#sec-function-constructor">%Function%</a></emu-xref>.</li>
<li>has a <code>name</code> property whose value is <code>"GeneratorFunction"</code>.</li>
<li>has the following properties:</li>
</ul>
<emu-clause id="sec-generatorfunction.length">
<h1><span class="secnum">25.2.2.1</span>GeneratorFunction.length</h1>
<p>This is a <emu-xref href="#sec-object-type" id="_ref_7884"><a href="#sec-object-type">data property</a></emu-xref> with a value of 1. This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-generatorfunction.prototype">
<h1><span class="secnum">25.2.2.2</span>GeneratorFunction.prototype</h1>
<p>The initial value of <code>GeneratorFunction.prototype</code> is the intrinsic object <emu-xref href="#sec-properties-of-the-generatorfunction-prototype-object" id="_ref_7885"><a href="#sec-properties-of-the-generatorfunction-prototype-object">%Generator%</a></emu-xref>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-generatorfunction-prototype-object">
<h1><span class="secnum">25.2.3</span>Properties of the GeneratorFunction Prototype Object</h1>
<p>The GeneratorFunction prototype object:</p>
<ul>
<li>is an ordinary object.</li>
<li>is not a <emu-xref href="#function-object" id="_ref_7886"><a href="#function-object">function object</a></emu-xref> and does not have an [[ECMAScriptCode]] internal slot or any other of the internal slots listed in <emu-xref href="#table-27" id="_ref_691"><a href="#table-27">Table 27</a></emu-xref> or <emu-xref href="#table-56" id="_ref_692"><a href="#table-56">Table 71</a></emu-xref>.</li>
<li>is the value of the <code>prototype</code> property of the intrinsic object <emu-xref href="#sec-generatorfunction-constructor" id="_ref_7887"><a href="#sec-generatorfunction-constructor">%GeneratorFunction%</a></emu-xref>.</li>
<li>is the intrinsic object <dfn>%Generator%</dfn> (see Figure 2).</li>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_7888"><a href="#sec-properties-of-the-function-prototype-object">%FunctionPrototype%</a></emu-xref>.</li>
</ul>
<emu-clause id="sec-generatorfunction.prototype.constructor">
<h1><span class="secnum">25.2.3.1</span>GeneratorFunction.prototype.constructor</h1>
<p>The initial value of <code>GeneratorFunction.prototype.constructor</code> is the intrinsic object <emu-xref href="#sec-generatorfunction-constructor" id="_ref_7889"><a href="#sec-generatorfunction-constructor">%GeneratorFunction%</a></emu-xref>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-generatorfunction.prototype.prototype">
<h1><span class="secnum">25.2.3.2</span>GeneratorFunction.prototype.prototype</h1>
<p>The value of <code>GeneratorFunction.prototype.prototype</code> is the <emu-xref href="#sec-properties-of-generator-prototype" id="_ref_7890"><a href="#sec-properties-of-generator-prototype">%GeneratorPrototype%</a></emu-xref> intrinsic object.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-generatorfunction.prototype-@@tostringtag">
<h1><span class="secnum">25.2.3.3</span>GeneratorFunction.prototype [ @@toStringTag ]</h1>
<p>The initial value of the @@toStringTag property is the String value <code>"GeneratorFunction"</code>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-generatorfunction-instances">
<h1><span class="secnum">25.2.4</span>GeneratorFunction Instances</h1>
<p>Every GeneratorFunction instance is an ECMAScript <emu-xref href="#function-object" id="_ref_7891"><a href="#function-object">function object</a></emu-xref> and has the internal slots listed in <emu-xref href="#table-27" id="_ref_693"><a href="#table-27">Table 27</a></emu-xref>. The value of the [[FunctionKind]] internal slot for all such instances is <code>"generator"</code>.</p>
<p>Each GeneratorFunction instance has the following own properties:</p>
<emu-clause id="sec-generatorfunction-instances-length">
<h1><span class="secnum">25.2.4.1</span>length</h1>
<p>The specification for the <code>"length"</code> property of Function instances given in <emu-xref href="#sec-function-instances-length" id="_ref_694"><a href="#sec-function-instances-length">19.2.4.1</a></emu-xref> also applies to GeneratorFunction instances.</p>
</emu-clause>
<emu-clause id="sec-generatorfunction-instances-name">
<h1><span class="secnum">25.2.4.2</span>name</h1>
<p>The specification for the <code>name</code> property of Function instances given in <emu-xref href="#sec-function-instances-name" id="_ref_695"><a href="#sec-function-instances-name">19.2.4.2</a></emu-xref> also applies to GeneratorFunction instances.</p>
</emu-clause>
<emu-clause id="sec-generatorfunction-instances-prototype">
<h1><span class="secnum">25.2.4.3</span>prototype</h1>
<p>Whenever a GeneratorFunction instance is created another
ordinary object is also created and is the initial value of the
generator function's <code>prototype</code> property. The value of the
prototype property is used to initialize the [[Prototype]] internal slot
of a newly created Generator object when the generator <emu-xref href="#function-object" id="_ref_7892"><a href="#function-object">function object</a></emu-xref> is invoked using [[Call]].</p>
<p>This property has the attributes { [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Unlike Function instances, the object that is the value of the a GeneratorFunction's <code>prototype</code> property does not have a <code>constructor</code> property whose value is the GeneratorFunction instance.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-asyncgeneratorfunction-objects">
<h1><span class="secnum">25.3</span>AsyncGeneratorFunction Objects</h1>
<p>AsyncGeneratorFunction objects are functions that are usually created by evaluating <emu-nt id="_ref_14809"><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a></emu-nt>, <emu-nt id="_ref_14810"><a href="#prod-AsyncGeneratorExpression">AsyncGeneratorExpression</a></emu-nt>, and <emu-nt id="_ref_14811"><a href="#prod-AsyncGeneratorMethod">AsyncGeneratorMethod</a></emu-nt> syntactic productions. They may also be created by calling the <emu-xref href="#sec-asyncgeneratorfunction-constructor" id="_ref_7893"><a href="#sec-asyncgeneratorfunction-constructor">%AsyncGeneratorFunction%</a></emu-xref> intrinsic.</p>
<emu-clause id="sec-asyncgeneratorfunction-constructor">
<h1><span class="secnum">25.3.1</span>The AsyncGeneratorFunction Constructor</h1>
<p>The AsyncGeneratorFunction <emu-xref href="#constructor" id="_ref_7894"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>is the intrinsic object <dfn>%AsyncGeneratorFunction%</dfn>.</li>
<li>creates and initializes a new AsyncGeneratorFunction object when called as a function rather than as a <emu-xref href="#constructor" id="_ref_7895"><a href="#constructor">constructor</a></emu-xref>. Thus the function call <code>AsyncGeneratorFunction (...)</code> is equivalent to the object creation expression <code>new AsyncGeneratorFunction (...)</code> with the same arguments.</li>
<li>is designed to be subclassable. It may be used as the value of an <code>extends</code> clause of a class definition. Subclass constructors that intend to inherit the specified <code>AsyncGeneratorFunction</code> behaviour must include a <code>super</code> call to the <code>AsyncGeneratorFunction</code> <emu-xref href="#constructor" id="_ref_7896"><a href="#constructor">constructor</a></emu-xref>
to create and initialize subclass instances with the internal slots
necessary for built-in AsyncGeneratorFunction behaviour. All ECMAScript
syntactic forms for defining async generator function objects create
direct instances of <code>AsyncGeneratorFunction</code>. There is no syntactic means to create instances of <code>AsyncGeneratorFunction</code> subclasses.</li>
</ul>
<emu-clause id="sec-asyncgeneratorfunction">
<h1><span class="secnum">25.3.1.1</span>AsyncGeneratorFunction ( <var>p1</var>, <var>p2</var>, ..., <var>pn</var>, <var>body</var> )</h1>
<p>The last argument specifies the body (executable code) of an
async generator function; any preceding arguments specify formal
parameters.</p>
<p>When the <code>AsyncGeneratorFunction</code> function is called with some arguments <var>p1</var>, <var>p2</var>, … , <var>pn</var>, <var>body</var> (where <var>n</var> might be 0, that is, there are no "<var>p</var>" arguments, and where <var>body</var> might also not be provided), the following steps are taken:</p>
<emu-alg><ol><li>Let <var>C</var> be the <emu-xref href="#active-function-object" id="_ref_7897"><a href="#active-function-object">active function object</a></emu-xref>.</li><li>Let <var>args</var> be the <var>argumentsList</var> that was passed to this function by [[Call]] or [[Construct]].</li><li>Return ?&nbsp;<emu-xref aoid="CreateDynamicFunction" id="_ref_7898"><a href="#sec-createdynamicfunction">CreateDynamicFunction</a></emu-xref>(<var>C</var>, NewTarget, <code>"async generator"</code>, <var>args</var>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>See NOTE for <emu-xref href="#sec-function-p1-p2-pn-body" id="_ref_696"><a href="#sec-function-p1-p2-pn-body">19.2.1.1</a></emu-xref>.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-asyncgeneratorfunction">
<h1><span class="secnum">25.3.2</span>Properties of the AsyncGeneratorFunction Constructor</h1>
<p>The AsyncGeneratorFunction <emu-xref href="#constructor" id="_ref_7899"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>is a standard built-in <emu-xref href="#function-object" id="_ref_7900"><a href="#function-object">function object</a></emu-xref> that inherits from the <code>Function</code> <emu-xref href="#constructor" id="_ref_7901"><a href="#constructor">constructor</a></emu-xref>.</li>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-function-constructor" id="_ref_7902"><a href="#sec-function-constructor">%Function%</a></emu-xref>.</li>
<li>has a <code>name</code> property whose value is <code>"AsyncGeneratorFunction"</code>.</li>
<li>has the following properties:</li>
</ul>
<emu-clause id="sec-asyncgeneratorfunction-length">
<h1><span class="secnum">25.3.2.1</span>AsyncGeneratorFunction.length</h1>
<p>This is a <emu-xref href="#sec-object-type" id="_ref_7903"><a href="#sec-object-type">data property</a></emu-xref> with a value of 1. This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-asyncgeneratorfunction-prototype">
<h1><span class="secnum">25.3.2.2</span>AsyncGeneratorFunction.prototype</h1>
<p>The initial value of <code>AsyncGeneratorFunction.prototype</code> is the intrinsic object <dfn>%AsyncGenerator%</dfn>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-asyncgeneratorfunction-prototype">
<h1><span class="secnum">25.3.3</span>Properties of the AsyncGeneratorFunction Prototype Object</h1>
<p>The AsyncGeneratorFunction prototype object:</p>
<ul>
<li>is an ordinary object.</li>
<li>is not a <emu-xref href="#function-object" id="_ref_7904"><a href="#function-object">function object</a></emu-xref> and does not have an [[ECMAScriptCode]] internal slot or any other of the internal slots listed in <emu-xref href="#table-27" id="_ref_697"><a href="#table-27">Table 27</a></emu-xref> or <emu-xref href="#table-internal-slots-of-asyncgenerator-instances" id="_ref_698"><a href="#table-internal-slots-of-asyncgenerator-instances">Table 72</a></emu-xref>.</li>
<li>is the value of the <code>prototype</code> property of the intrinsic object <emu-xref href="#sec-asyncgeneratorfunction-constructor" id="_ref_7905"><a href="#sec-asyncgeneratorfunction-constructor">%AsyncGeneratorFunction%</a></emu-xref>.</li>
<li>is the intrinsic object <emu-xref href="#sec-asyncgeneratorfunction-prototype" id="_ref_7906"><a href="#sec-asyncgeneratorfunction-prototype">%AsyncGenerator%</a></emu-xref>.</li>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_7907"><a href="#sec-properties-of-the-function-prototype-object">%FunctionPrototype%</a></emu-xref>.</li>
</ul>
<emu-clause id="sec-asyncgeneratorfunction-prototype-constructor">
<h1><span class="secnum">25.3.3.1</span>AsyncGeneratorFunction.prototype.constructor</h1>
<p>The initial value of <code>AsyncGeneratorFunction.prototype.constructor</code> is the intrinsic object <emu-xref href="#sec-asyncgeneratorfunction-constructor" id="_ref_7908"><a href="#sec-asyncgeneratorfunction-constructor">%AsyncGeneratorFunction%</a></emu-xref>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-asyncgeneratorfunction-prototype-prototype">
<h1><span class="secnum">25.3.3.2</span>AsyncGeneratorFunction.prototype.prototype</h1>
<p>The value of <code>AsyncGeneratorFunction.prototype.prototype</code> is the <emu-xref href="#sec-properties-of-asyncgenerator-prototype" id="_ref_7909"><a href="#sec-properties-of-asyncgenerator-prototype">%AsyncGeneratorPrototype%</a></emu-xref> intrinsic object.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-asyncgeneratorfunction-prototype-tostringtag">
<h1><span class="secnum">25.3.3.3</span>AsyncGeneratorFunction.prototype [ @@toStringTag ]</h1>
<p>The initial value of the @@toStringTag property is the String value <code>"AsyncGeneratorFunction"</code>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-asyncgeneratorfunction-instances">
<h1><span class="secnum">25.3.4</span>AsyncGeneratorFunction Instances</h1>
<p>Every AsyncGeneratorFunction instance is an ECMAScript <emu-xref href="#function-object" id="_ref_7910"><a href="#function-object">function object</a></emu-xref> and has the internal slots listed in <emu-xref href="#table-27" id="_ref_699"><a href="#table-27">Table 27</a></emu-xref>. The value of the [[FunctionKind]] internal slot for all such instances is <code>"generator"</code>.</p>
<p>Each AsyncGeneratorFunction instance has the following own properties:</p>
<emu-clause id="sec-asyncgeneratorfunction-instance-length">
<h1><span class="secnum">25.3.4.1</span>length</h1>
<p>The value of the <code>"length"</code> property is an integer
that indicates the typical number of arguments expected by the
AsyncGeneratorFunction. However, the language permits the function to be
invoked with some other number of arguments. The behaviour of an
AsyncGeneratorFunction when invoked on a number of arguments other than
the number specified by its <code>"length"</code> property depends on the function.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-asyncgeneratorfunction-instance-name">
<h1><span class="secnum">25.3.4.2</span>name</h1>
<p>The specification for the <code>name</code> property of Function instances given in <emu-xref href="#sec-function-instances-name" id="_ref_700"><a href="#sec-function-instances-name">19.2.4.2</a></emu-xref> also applies to AsyncGeneratorFunction instances.</p>
</emu-clause>
<emu-clause id="sec-asyncgeneratorfunction-instance-prototype">
<h1><span class="secnum">25.3.4.3</span>prototype</h1>
<p>Whenever an AsyncGeneratorFunction instance is created
another ordinary object is also created and is the initial value of the
async generator function's <code>prototype</code> property. The value of
the prototype property is used to initialize the [[Prototype]] internal
slot of a newly created AsyncGenerator object when the generator <emu-xref href="#function-object" id="_ref_7911"><a href="#function-object">function object</a></emu-xref> is invoked using [[Call]].</p>
<p>This property has the attributes { [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Unlike function instances, the object that is the value of the an AsyncGeneratorFunction's <code>prototype</code> property does not have a <code>constructor</code> property whose value is the AsyncGeneratorFunction instance.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-generator-objects">
<h1><span class="secnum">25.4</span>Generator Objects</h1>
<p>A Generator object is an instance of a generator function and conforms to both the <i>Iterator</i> and <i>Iterable</i> interfaces.</p>
<p>Generator instances directly inherit properties from the object that is the value of the <code>prototype</code>
property of the Generator function that created the instance. Generator
instances indirectly inherit properties from the Generator Prototype
intrinsic, <emu-xref href="#sec-properties-of-generator-prototype" id="_ref_7912"><a href="#sec-properties-of-generator-prototype">%GeneratorPrototype%</a></emu-xref>.</p>
<emu-clause id="sec-properties-of-generator-prototype">
<h1><span class="secnum">25.4.1</span>Properties of the Generator Prototype Object</h1>
<p>The Generator prototype object:</p>
<ul>
<li>is the intrinsic object <dfn>%GeneratorPrototype%</dfn>.</li>
<li>is the initial value of the <code>prototype</code> property of the intrinsic object <emu-xref href="#sec-properties-of-the-generatorfunction-prototype-object" id="_ref_7913"><a href="#sec-properties-of-the-generatorfunction-prototype-object">%Generator%</a></emu-xref> (the GeneratorFunction.prototype).</li>
<li>is an ordinary object.</li>
<li>is not a Generator instance and does not have a [[GeneratorState]] internal slot.</li>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-%iteratorprototype%-object" id="_ref_7914"><a href="#sec-%iteratorprototype%-object">%IteratorPrototype%</a></emu-xref>.</li>
<li>has properties that are indirectly inherited by all Generator instances.</li>
</ul>
<emu-clause id="sec-generator.prototype.constructor">
<h1><span class="secnum">25.4.1.1</span>Generator.prototype.constructor</h1>
<p>The initial value of <code>Generator.prototype.constructor</code> is the intrinsic object <emu-xref href="#sec-properties-of-the-generatorfunction-prototype-object" id="_ref_7915"><a href="#sec-properties-of-the-generatorfunction-prototype-object">%Generator%</a></emu-xref>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-generator.prototype.next">
<h1><span class="secnum">25.4.1.2</span>Generator.prototype.next ( <var>value</var> )</h1>
<p>The <code>next</code> method performs the following steps:</p>
<emu-alg><ol><li>Let <var>g</var> be the <emu-val>this</emu-val> value.</li><li>Return ?&nbsp;<emu-xref aoid="GeneratorResume" id="_ref_7916"><a href="#sec-generatorresume">GeneratorResume</a></emu-xref>(<var>g</var>, <var>value</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-generator.prototype.return">
<h1><span class="secnum">25.4.1.3</span>Generator.prototype.return ( <var>value</var> )</h1>
<p>The <code>return</code> method performs the following steps:</p>
<emu-alg><ol><li>Let <var>g</var> be the <emu-val>this</emu-val> value.</li><li>Let <var>C</var> be <emu-xref aoid="Completion" id="_ref_7917"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref> { [[Type]]: <emu-const>return</emu-const>, [[Value]]: <var>value</var>, [[Target]]: <emu-const>empty</emu-const> }.</li><li>Return ?&nbsp;<emu-xref aoid="GeneratorResumeAbrupt" id="_ref_7918"><a href="#sec-generatorresumeabrupt">GeneratorResumeAbrupt</a></emu-xref>(<var>g</var>, <var>C</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-generator.prototype.throw">
<h1><span class="secnum">25.4.1.4</span>Generator.prototype.throw ( <var>exception</var> )</h1>
<p>The <code>throw</code> method performs the following steps:</p>
<emu-alg><ol><li>Let <var>g</var> be the <emu-val>this</emu-val> value.</li><li>Let <var>C</var> be <emu-xref aoid="ThrowCompletion" id="_ref_7919"><a href="#sec-throwcompletion">ThrowCompletion</a></emu-xref>(<var>exception</var>).</li><li>Return ?&nbsp;<emu-xref aoid="GeneratorResumeAbrupt" id="_ref_7920"><a href="#sec-generatorresumeabrupt">GeneratorResumeAbrupt</a></emu-xref>(<var>g</var>, <var>C</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-generator.prototype-@@tostringtag">
<h1><span class="secnum">25.4.1.5</span>Generator.prototype [ @@toStringTag ]</h1>
<p>The initial value of the @@toStringTag property is the String value <code>"Generator"</code>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-generator-instances">
<h1><span class="secnum">25.4.2</span>Properties of Generator Instances</h1>
<p>Generator instances are initially created with the internal slots described in <emu-xref href="#table-56" id="_ref_701"><a href="#table-56">Table 71</a></emu-xref>.</p>
<emu-table id="table-56" caption="Internal Slots of Generator Instances"><figure><figcaption>Table 71: Internal Slots of Generator Instances</figcaption>
<table>
<tbody>
<tr>
<th>
Internal Slot
</th>
<th>
Description
</th>
</tr>
<tr>
<td>
[[GeneratorState]]
</td>
<td>
The current execution state of the generator. The possible values are: <emu-val>undefined</emu-val>, <code>"suspendedStart"</code>, <code>"suspendedYield"</code>, <code>"executing"</code>, and <code>"completed"</code>.
</td>
</tr>
<tr>
<td>
[[GeneratorContext]]
</td>
<td>
The <emu-xref href="#sec-execution-contexts" id="_ref_7921"><a href="#sec-execution-contexts">execution context</a></emu-xref> that is used when executing the code of this generator.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
</emu-clause>
<emu-clause id="sec-generator-abstract-operations">
<h1><span class="secnum">25.4.3</span>Generator Abstract Operations</h1>
<emu-clause id="sec-generatorstart" aoid="GeneratorStart">
<h1><span class="secnum">25.4.3.1</span>GeneratorStart ( <var>generator</var>, <var>generatorBody</var> )</h1>
<p>The abstract operation GeneratorStart with arguments <var>generator</var> and <var>generatorBody</var> performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_7922"><a href="#assert">Assert</a></emu-xref>: The value of <var>generator</var>.[[GeneratorState]] is <emu-val>undefined</emu-val>.</li><li>Let <var>genContext</var> be the <emu-xref href="#running-execution-context" id="_ref_7923"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Set the Generator component of <var>genContext</var> to <var>generator</var>.</li><li>Set the code evaluation state of <var>genContext</var> such that when evaluation is resumed for that <emu-xref href="#sec-execution-contexts" id="_ref_7924"><a href="#sec-execution-contexts">execution context</a></emu-xref> the following steps will be performed:<ol><li>Let <var>result</var> be the result of evaluating <var>generatorBody</var>.</li><li><emu-xref href="#assert" id="_ref_7925"><a href="#assert">Assert</a></emu-xref>: If we return here, the generator either threw an exception or performed either an implicit or explicit return.</li><li>Remove <var>genContext</var> from the <emu-xref href="#execution-context-stack" id="_ref_7926"><a href="#execution-context-stack">execution context stack</a></emu-xref> and restore the <emu-xref href="#sec-execution-contexts" id="_ref_7927"><a href="#sec-execution-contexts">execution context</a></emu-xref> that is at the top of the <emu-xref href="#execution-context-stack" id="_ref_7928"><a href="#execution-context-stack">execution context stack</a></emu-xref> as the <emu-xref href="#running-execution-context" id="_ref_7929"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Set <var>generator</var>.[[GeneratorState]] to <code>"completed"</code>.</li><li>Once a generator enters the <code>"completed"</code> state it never leaves it and its associated <emu-xref href="#sec-execution-contexts" id="_ref_7930"><a href="#sec-execution-contexts">execution context</a></emu-xref> is never resumed. Any execution state associated with <var>generator</var> can be discarded at this point.</li><li>If <var>result</var>.[[Type]] is <emu-const>normal</emu-const>, let <var>resultValue</var> be <emu-val>undefined</emu-val>.</li><li>Else if <var>result</var>.[[Type]] is <emu-const>return</emu-const>, let <var>resultValue</var> be <var>result</var>.[[Value]].</li><li>Else,<ol><li><emu-xref href="#assert" id="_ref_7931"><a href="#assert">Assert</a></emu-xref>: <var>result</var>.[[Type]] is <emu-const>throw</emu-const>.</li><li>Return <emu-xref aoid="Completion" id="_ref_7932"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>result</var>).</li></ol></li><li>Return <emu-xref aoid="CreateIterResultObject" id="_ref_7933"><a href="#sec-createiterresultobject">CreateIterResultObject</a></emu-xref>(<var>resultValue</var>, <emu-val>true</emu-val>).</li></ol></li><li>Set <var>generator</var>.[[GeneratorContext]] to <var>genContext</var>.</li><li>Set <var>generator</var>.[[GeneratorState]] to <code>"suspendedStart"</code>.</li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_7934"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-val>undefined</emu-val>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-generatorvalidate" aoid="GeneratorValidate">
<h1><span class="secnum">25.4.3.2</span>GeneratorValidate ( <var>generator</var> )</h1>
<p>The abstract operation GeneratorValidate with argument <var>generator</var> performs the following steps:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_7935"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>generator</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>generator</var> does not have a [[GeneratorState]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li><emu-xref href="#assert" id="_ref_7936"><a href="#assert">Assert</a></emu-xref>: <var>generator</var> also has a [[GeneratorContext]] internal slot.</li><li>Let <var>state</var> be <var>generator</var>.[[GeneratorState]].</li><li>If <var>state</var> is <code>"executing"</code>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return <var>state</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-generatorresume" aoid="GeneratorResume">
<h1><span class="secnum">25.4.3.3</span>GeneratorResume ( <var>generator</var>, <var>value</var> )</h1>
<p>The abstract operation GeneratorResume with arguments <var>generator</var> and <var>value</var> performs the following steps:</p>
<emu-alg><ol><li>Let <var>state</var> be ?&nbsp;<emu-xref aoid="GeneratorValidate" id="_ref_7937"><a href="#sec-generatorvalidate">GeneratorValidate</a></emu-xref>(<var>generator</var>).</li><li>If <var>state</var> is <code>"completed"</code>, return <emu-xref aoid="CreateIterResultObject" id="_ref_7938"><a href="#sec-createiterresultobject">CreateIterResultObject</a></emu-xref>(<emu-val>undefined</emu-val>, <emu-val>true</emu-val>).</li><li><emu-xref href="#assert" id="_ref_7939"><a href="#assert">Assert</a></emu-xref>: <var>state</var> is either <code>"suspendedStart"</code> or <code>"suspendedYield"</code>.</li><li>Let <var>genContext</var> be <var>generator</var>.[[GeneratorContext]].</li><li>Let <var>methodContext</var> be the <emu-xref href="#running-execution-context" id="_ref_7940"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li><emu-xref aoid="Suspend" id="_ref_7941"><a href="#sec-suspend">Suspend</a></emu-xref> <var>methodContext</var>.</li><li>Set <var>generator</var>.[[GeneratorState]] to <code>"executing"</code>.</li><li>Push <var>genContext</var> onto the <emu-xref href="#execution-context-stack" id="_ref_7942"><a href="#execution-context-stack">execution context stack</a></emu-xref>; <var>genContext</var> is now the <emu-xref href="#running-execution-context" id="_ref_7943"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Resume the suspended evaluation of <var>genContext</var> using <emu-xref aoid="NormalCompletion" id="_ref_7944"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<var>value</var>) as the result of the operation that suspended it. Let <var>result</var> be the value returned by the resumed computation.</li><li><emu-xref href="#assert" id="_ref_7945"><a href="#assert">Assert</a></emu-xref>: When we return here, <var>genContext</var> has already been removed from the <emu-xref href="#execution-context-stack" id="_ref_7946"><a href="#execution-context-stack">execution context stack</a></emu-xref> and <var>methodContext</var> is the currently <emu-xref href="#running-execution-context" id="_ref_7947"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Return <emu-xref aoid="Completion" id="_ref_7948"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>result</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-generatorresumeabrupt" aoid="GeneratorResumeAbrupt">
<h1><span class="secnum">25.4.3.4</span>GeneratorResumeAbrupt ( <var>generator</var>, <var>abruptCompletion</var> )</h1>
<p>The abstract operation GeneratorResumeAbrupt with arguments <var>generator</var> and <var>abruptCompletion</var> performs the following steps:</p>
<emu-alg><ol><li>Let <var>state</var> be ?&nbsp;<emu-xref aoid="GeneratorValidate" id="_ref_7949"><a href="#sec-generatorvalidate">GeneratorValidate</a></emu-xref>(<var>generator</var>).</li><li>If <var>state</var> is <code>"suspendedStart"</code>, then<ol><li>Set <var>generator</var>.[[GeneratorState]] to <code>"completed"</code>.</li><li>Once a generator enters the <code>"completed"</code> state it never leaves it and its associated <emu-xref href="#sec-execution-contexts" id="_ref_7950"><a href="#sec-execution-contexts">execution context</a></emu-xref> is never resumed. Any execution state associated with <var>generator</var> can be discarded at this point.</li><li>Set <var>state</var> to <code>"completed"</code>.</li></ol></li><li>If <var>state</var> is <code>"completed"</code>, then<ol><li>If <var>abruptCompletion</var>.[[Type]] is <emu-const>return</emu-const>, then<ol><li>Return <emu-xref aoid="CreateIterResultObject" id="_ref_7951"><a href="#sec-createiterresultobject">CreateIterResultObject</a></emu-xref>(<var>abruptCompletion</var>.[[Value]], <emu-val>true</emu-val>).</li></ol></li><li>Return <emu-xref aoid="Completion" id="_ref_7952"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>abruptCompletion</var>).</li></ol></li><li><emu-xref href="#assert" id="_ref_7953"><a href="#assert">Assert</a></emu-xref>: <var>state</var> is <code>"suspendedYield"</code>.</li><li>Let <var>genContext</var> be <var>generator</var>.[[GeneratorContext]].</li><li>Let <var>methodContext</var> be the <emu-xref href="#running-execution-context" id="_ref_7954"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li><emu-xref aoid="Suspend" id="_ref_7955"><a href="#sec-suspend">Suspend</a></emu-xref> <var>methodContext</var>.</li><li>Set <var>generator</var>.[[GeneratorState]] to <code>"executing"</code>.</li><li>Push <var>genContext</var> onto the <emu-xref href="#execution-context-stack" id="_ref_7956"><a href="#execution-context-stack">execution context stack</a></emu-xref>; <var>genContext</var> is now the <emu-xref href="#running-execution-context" id="_ref_7957"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Resume the suspended evaluation of <var>genContext</var> using <var>abruptCompletion</var> as the result of the operation that suspended it. Let <var>result</var> be the completion record returned by the resumed computation.</li><li><emu-xref href="#assert" id="_ref_7958"><a href="#assert">Assert</a></emu-xref>: When we return here, <var>genContext</var> has already been removed from the <emu-xref href="#execution-context-stack" id="_ref_7959"><a href="#execution-context-stack">execution context stack</a></emu-xref> and <var>methodContext</var> is the currently <emu-xref href="#running-execution-context" id="_ref_7960"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Return <emu-xref aoid="Completion" id="_ref_7961"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>result</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-getgeneratorkind" aoid="GetGeneratorKind">
<h1><span class="secnum">25.4.3.5</span>GetGeneratorKind ( )</h1>
<emu-alg><ol><li>Let <var>genContext</var> be the <emu-xref href="#running-execution-context" id="_ref_7962"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>If <var>genContext</var> does not have a Generator component, return <emu-const>non-generator</emu-const>.</li><li>Let <var>generator</var> be the Generator component of <var>genContext</var>.</li><li>If <var>generator</var> has an [[AsyncGeneratorState]] internal slot, return <emu-const>async</emu-const>.</li><li>Else, return <emu-const>sync</emu-const>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-generatoryield" aoid="GeneratorYield">
<h1><span class="secnum">25.4.3.6</span>GeneratorYield ( <var>iterNextObj</var> )</h1>
<p>The abstract operation GeneratorYield with argument <var>iterNextObj</var> performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_7963"><a href="#assert">Assert</a></emu-xref>: <var>iterNextObj</var> is an Object that implements the <i>IteratorResult</i> interface.</li><li>Let <var>genContext</var> be the <emu-xref href="#running-execution-context" id="_ref_7964"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li><emu-xref href="#assert" id="_ref_7965"><a href="#assert">Assert</a></emu-xref>: <var>genContext</var> is the <emu-xref href="#sec-execution-contexts" id="_ref_7966"><a href="#sec-execution-contexts">execution context</a></emu-xref> of a generator.</li><li>Let <var>generator</var> be the value of the Generator component of <var>genContext</var>.</li><li><emu-xref href="#assert" id="_ref_7967"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="GetGeneratorKind" id="_ref_7968"><a href="#sec-getgeneratorkind">GetGeneratorKind</a></emu-xref>() is <emu-const>sync</emu-const>.</li><li>Set <var>generator</var>.[[GeneratorState]] to <code>"suspendedYield"</code>.</li><li>Remove <var>genContext</var> from the <emu-xref href="#execution-context-stack" id="_ref_7969"><a href="#execution-context-stack">execution context stack</a></emu-xref> and restore the <emu-xref href="#sec-execution-contexts" id="_ref_7970"><a href="#sec-execution-contexts">execution context</a></emu-xref> that is at the top of the <emu-xref href="#execution-context-stack" id="_ref_7971"><a href="#execution-context-stack">execution context stack</a></emu-xref> as the <emu-xref href="#running-execution-context" id="_ref_7972"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Set the code evaluation state of <var>genContext</var> such that when evaluation is resumed with a <emu-xref aoid="Completion" id="_ref_7973"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref> <var>resumptionValue</var> the following steps will be performed:<ol><li>Return <var>resumptionValue</var>.</li><li>NOTE: This returns to the evaluation of the <emu-nt id="_ref_14812"><a href="#prod-YieldExpression">YieldExpression</a></emu-nt> that originally called this abstract operation.</li></ol></li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_7974"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<var>iterNextObj</var>).</li><li>NOTE: This returns to the evaluation of the operation that had most previously resumed evaluation of <var>genContext</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-asyncgenerator-objects">
<h1><span class="secnum">25.5</span>AsyncGenerator Objects</h1>
<p>An AsyncGenerator object is an instance of an async generator
function and conforms to both the AsyncIterator and AsyncIterable
interfaces.</p>
<p>AsyncGenerator instances directly inherit properties from the object that is the value of the <code>prototype</code>
property of the AsyncGenerator function that created the instance.
AsyncGenerator instances indirectly inherit properties from the
AsyncGenerator Prototype intrinsic, <emu-xref href="#sec-properties-of-asyncgenerator-prototype" id="_ref_7975"><a href="#sec-properties-of-asyncgenerator-prototype">%AsyncGeneratorPrototype%</a></emu-xref>.</p>
<emu-clause id="sec-properties-of-asyncgenerator-prototype">
<h1><span class="secnum">25.5.1</span>Properties of the AsyncGenerator Prototype Object</h1>
<p>The AsyncGenerator prototype object:</p>
<ul>
<li>is the intrinsic object <dfn>%AsyncGeneratorPrototype%</dfn>.</li>
<li>is the initial value of the <code>prototype</code> property of the intrinsic object <emu-xref href="#sec-asyncgeneratorfunction-prototype" id="_ref_7976"><a href="#sec-asyncgeneratorfunction-prototype">%AsyncGenerator%</a></emu-xref> (the AsyncGeneratorFunction.prototype).</li>
<li>is an ordinary object.</li>
<li>is not an AsyncGenerator instance and does not have an [[AsyncGeneratorState]] internal slot.</li>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-asynciteratorprototype" id="_ref_7977"><a href="#sec-asynciteratorprototype">%AsyncIteratorPrototype%</a></emu-xref>.</li>
<li>has properties that are indirectly inherited by all AsyncGenerator instances.</li>
</ul>
<emu-clause id="sec-asyncgenerator-prototype-constructor">
<h1><span class="secnum">25.5.1.1</span>AsyncGenerator.prototype.constructor</h1>
<p>The initial value of <code>AsyncGenerator.prototype.constructor</code> is the intrinsic object <emu-xref href="#sec-asyncgeneratorfunction-prototype" id="_ref_7978"><a href="#sec-asyncgeneratorfunction-prototype">%AsyncGenerator%</a></emu-xref>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-asyncgenerator-prototype-next">
<h1><span class="secnum">25.5.1.2</span>AsyncGenerator.prototype.next ( <var>value</var> )</h1>
<emu-alg><ol><li>Let <var>generator</var> be the <emu-val>this</emu-val> value.</li><li>Let <var>completion</var> be <emu-xref aoid="NormalCompletion" id="_ref_7979"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<var>value</var>).</li><li>Return !&nbsp;<emu-xref aoid="AsyncGeneratorEnqueue" id="_ref_7980"><a href="#sec-asyncgeneratorenqueue">AsyncGeneratorEnqueue</a></emu-xref>(<var>generator</var>, <var>completion</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-asyncgenerator-prototype-return">
<h1><span class="secnum">25.5.1.3</span>AsyncGenerator.prototype.return ( <var>value</var> )</h1>
<emu-alg><ol><li>Let <var>generator</var> be the <emu-val>this</emu-val> value.</li><li>Let <var>completion</var> be <emu-xref aoid="Completion" id="_ref_7981"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref> { [[Type]]: <emu-const>return</emu-const>, [[Value]]: <var>value</var>, [[Target]]: <emu-const>empty</emu-const> }.</li><li>Return !&nbsp;<emu-xref aoid="AsyncGeneratorEnqueue" id="_ref_7982"><a href="#sec-asyncgeneratorenqueue">AsyncGeneratorEnqueue</a></emu-xref>(<var>generator</var>, <var>completion</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-asyncgenerator-prototype-throw">
<h1><span class="secnum">25.5.1.4</span>AsyncGenerator.prototype.throw ( <var>exception</var> )</h1>
<emu-alg><ol><li>Let <var>generator</var> be the <emu-val>this</emu-val> value.</li><li>Let <var>completion</var> be <emu-xref aoid="ThrowCompletion" id="_ref_7983"><a href="#sec-throwcompletion">ThrowCompletion</a></emu-xref>(<var>exception</var>).</li><li>Return !&nbsp;<emu-xref aoid="AsyncGeneratorEnqueue" id="_ref_7984"><a href="#sec-asyncgeneratorenqueue">AsyncGeneratorEnqueue</a></emu-xref>(<var>generator</var>, <var>completion</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-asyncgenerator-prototype-tostringtag">
<h1><span class="secnum">25.5.1.5</span>AsyncGenerator.prototype [ @@toStringTag ]</h1>
<p>The initial value of the @@toStringTag property is the String value <code>"AsyncGenerator"</code>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-asyncgenerator-intances">
<h1><span class="secnum">25.5.2</span>Properties of AsyncGenerator Instances</h1>
<p>AsyncGenerator instances are initially created with the internal slots described below:</p>
<emu-table id="table-internal-slots-of-asyncgenerator-instances" caption="Internal Slots of AsyncGenerator Instances"><figure><figcaption>Table 72: Internal Slots of AsyncGenerator Instances</figcaption>
<table>
<tbody>
<tr>
<th>Internal Slot</th>
<th>Description</th>
</tr>
<tr>
<td>[[AsyncGeneratorState]]</td>
<td>The current execution state of the async generator. The possible values are: <emu-val>undefined</emu-val>, <code>"suspendedStart"</code>, <code>"suspendedYield"</code>, <code>"executing"</code>, <code>"awaiting-return"</code>, and <code>"completed"</code>.</td>
</tr>
<tr>
<td>[[AsyncGeneratorContext]]</td>
<td>The <emu-xref href="#sec-execution-contexts" id="_ref_7985"><a href="#sec-execution-contexts">execution context</a></emu-xref> that is used when executing the code of this async generator.</td>
</tr>
<tr>
<td>[[AsyncGeneratorQueue]]</td>
<td>A <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7986"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of AsyncGeneratorRequest records which represent requests to resume the async generator.</td>
</tr>
</tbody>
</table>
</figure></emu-table>
</emu-clause>
<emu-clause id="sec-asyncgenerator-abstract-operations">
<h1><span class="secnum">25.5.3</span>AsyncGenerator Abstract Operations</h1>
<emu-clause id="sec-asyncgeneratorrequest-records">
<h1><span class="secnum">25.5.3.1</span>AsyncGeneratorRequest Records</h1>
<p>The AsyncGeneratorRequest is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7987"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref>
value used to store information about how an async generator should be
resumed and contains capabilities for fulfilling or rejecting the
corresponding promise.</p>
<p>They have the following fields:</p>
<emu-table caption="AsyncGeneratorRequest Record Fields"><figure><figcaption>Table 73: AsyncGeneratorRequest <emu-xref href="#sec-list-and-record-specification-type" id="_ref_7988"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> Fields</figcaption>
<table>
<tbody>
<tr>
<th>Field Name</th>
<th>Value</th>
<th>Meaning</th>
</tr>
<tr>
<td>[[Completion]]</td>
<td>A <emu-xref aoid="Completion" id="_ref_7989"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref> record</td>
<td>The completion which should be used to resume the async generator.</td>
</tr>
<tr>
<td>[[Capability]]</td>
<td>A PromiseCapability record</td>
<td>The promise capabilities associated with this request.</td>
</tr>
</tbody>
</table>
</figure></emu-table>
</emu-clause>
<emu-clause id="sec-asyncgeneratorstart" aoid="AsyncGeneratorStart">
<h1><span class="secnum">25.5.3.2</span>AsyncGeneratorStart ( <var>generator</var>, <var>generatorBody</var> )</h1>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_7990"><a href="#assert">Assert</a></emu-xref>: <var>generator</var> is an AsyncGenerator instance.</li><li><emu-xref href="#assert" id="_ref_7991"><a href="#assert">Assert</a></emu-xref>: <var>generator</var>.[[AsyncGeneratorState]] is <emu-val>undefined</emu-val>.</li><li>Let <var>genContext</var> be the <emu-xref href="#running-execution-context" id="_ref_7992"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Set the Generator component of <var>genContext</var> to <var>generator</var>.</li><li>Set the code evaluation state of <var>genContext</var> such that when evaluation is resumed for that <emu-xref href="#sec-execution-contexts" id="_ref_7993"><a href="#sec-execution-contexts">execution context</a></emu-xref> the following steps will be performed:<ol><li>Let <var>result</var> be the result of evaluating <var>generatorBody</var>.</li><li><emu-xref href="#assert" id="_ref_7994"><a href="#assert">Assert</a></emu-xref>: If we return here, the async generator either threw an exception or performed either an implicit or explicit return.</li><li>Remove <var>genContext</var> from the <emu-xref href="#execution-context-stack" id="_ref_7995"><a href="#execution-context-stack">execution context stack</a></emu-xref> and restore the <emu-xref href="#sec-execution-contexts" id="_ref_7996"><a href="#sec-execution-contexts">execution context</a></emu-xref> that is at the top of the <emu-xref href="#execution-context-stack" id="_ref_7997"><a href="#execution-context-stack">execution context stack</a></emu-xref> as the <emu-xref href="#running-execution-context" id="_ref_7998"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Set <var>generator</var>.[[AsyncGeneratorState]] to <code>"completed"</code>.</li><li>If <var>result</var> is a normal completion, let <var>resultValue</var> be <emu-val>undefined</emu-val>.</li><li>Else,<ol><li>Let <var>resultValue</var> be <var>result</var>.[[Value]].</li><li>If <var>result</var>.[[Type]] is not <emu-const>return</emu-const>, then<ol><li>Return !&nbsp;<emu-xref aoid="AsyncGeneratorReject" id="_ref_7999"><a href="#sec-asyncgeneratorreject">AsyncGeneratorReject</a></emu-xref>(<var>generator</var>, <var>resultValue</var>).</li></ol></li></ol></li><li>Return !&nbsp;<emu-xref aoid="AsyncGeneratorResolve" id="_ref_8000"><a href="#sec-asyncgeneratorresolve">AsyncGeneratorResolve</a></emu-xref>(<var>generator</var>, <var>resultValue</var>, <emu-val>true</emu-val>).</li></ol></li><li>Set <var>generator</var>.[[AsyncGeneratorContext]] to <var>genContext</var>.</li><li>Set <var>generator</var>.[[AsyncGeneratorState]] to <code>"suspendedStart"</code>.</li><li>Set <var>generator</var>.[[AsyncGeneratorQueue]] to a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8001"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Return <emu-val>undefined</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-asyncgeneratorresolve" aoid="AsyncGeneratorResolve">
<h1><span class="secnum">25.5.3.3</span>AsyncGeneratorResolve ( <var>generator</var>, <var>value</var>, <var>done</var> )</h1>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_8002"><a href="#assert">Assert</a></emu-xref>: <var>generator</var> is an AsyncGenerator instance.</li><li>Let <var>queue</var> be <var>generator</var>.[[AsyncGeneratorQueue]].</li><li><emu-xref href="#assert" id="_ref_8003"><a href="#assert">Assert</a></emu-xref>: <var>queue</var> is not an empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8004"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Remove the first element from <var>queue</var> and let <var>next</var> be the value of that element.</li><li>Let <var>promiseCapability</var> be <var>next</var>.[[Capability]].</li><li>Let <var>iteratorResult</var> be !&nbsp;<emu-xref aoid="CreateIterResultObject" id="_ref_8005"><a href="#sec-createiterresultobject">CreateIterResultObject</a></emu-xref>(<var>value</var>, <var>done</var>).</li><li>Perform !&nbsp;<emu-xref aoid="Call" id="_ref_8006"><a href="#sec-call">Call</a></emu-xref>(<var>promiseCapability</var>.[[Resolve]], <emu-val>undefined</emu-val>, « <var>iteratorResult</var> »).</li><li>Perform !&nbsp;<emu-xref aoid="AsyncGeneratorResumeNext" id="_ref_8007"><a href="#sec-asyncgeneratorresumenext">AsyncGeneratorResumeNext</a></emu-xref>(<var>generator</var>).</li><li>Return <emu-val>undefined</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-asyncgeneratorreject" aoid="AsyncGeneratorReject">
<h1><span class="secnum">25.5.3.4</span>AsyncGeneratorReject ( <var>generator</var>, <var>exception</var> )</h1>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_8008"><a href="#assert">Assert</a></emu-xref>: <var>generator</var> is an AsyncGenerator instance.</li><li>Let <var>queue</var> be <var>generator</var>.[[AsyncGeneratorQueue]].</li><li><emu-xref href="#assert" id="_ref_8009"><a href="#assert">Assert</a></emu-xref>: <var>queue</var> is not an empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8010"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Remove the first element from <var>queue</var> and let <var>next</var> be the value of that element.</li><li>Let <var>promiseCapability</var> be <var>next</var>.[[Capability]].</li><li>Perform !&nbsp;<emu-xref aoid="Call" id="_ref_8011"><a href="#sec-call">Call</a></emu-xref>(<var>promiseCapability</var>.[[Reject]], <emu-val>undefined</emu-val>, « <var>exception</var> »).</li><li>Perform !&nbsp;<emu-xref aoid="AsyncGeneratorResumeNext" id="_ref_8012"><a href="#sec-asyncgeneratorresumenext">AsyncGeneratorResumeNext</a></emu-xref>(<var>generator</var>).</li><li>Return <emu-val>undefined</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-asyncgeneratorresumenext" aoid="AsyncGeneratorResumeNext">
<h1><span class="secnum">25.5.3.5</span>AsyncGeneratorResumeNext ( <var>generator</var> )</h1>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_8013"><a href="#assert">Assert</a></emu-xref>: <var>generator</var> is an AsyncGenerator instance.</li><li>Let <var>state</var> be <var>generator</var>.[[AsyncGeneratorState]].</li><li><emu-xref href="#assert" id="_ref_8014"><a href="#assert">Assert</a></emu-xref>: <var>state</var> is not <code>"executing"</code>.</li><li>If <var>state</var> is <code>"awaiting-return"</code>, return <emu-val>undefined</emu-val>.</li><li>Let <var>queue</var> be <var>generator</var>.[[AsyncGeneratorQueue]].</li><li>If <var>queue</var> is an empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8015"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>, return <emu-val>undefined</emu-val>.</li><li>Let <var>next</var> be the value of the first element of <var>queue</var>.</li><li><emu-xref href="#assert" id="_ref_8016"><a href="#assert">Assert</a></emu-xref>: <var>next</var> is an AsyncGeneratorRequest record.</li><li>Let <var>completion</var> be <var>next</var>.[[Completion]].</li><li>If <var>completion</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_8017"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, then<ol><li>If <var>state</var> is <code>"suspendedStart"</code>, then<ol><li>Set <var>generator</var>.[[AsyncGeneratorState]] to <code>"completed"</code>.</li><li>Set <var>state</var> to <code>"completed"</code>.</li></ol></li><li>If <var>state</var> is <code>"completed"</code>, then<ol><li>If <var>completion</var>.[[Type]] is <emu-const>return</emu-const>, then<ol><li>Set <var>generator</var>.[[AsyncGeneratorState]] to <code>"awaiting-return"</code>.</li><li>Let <var>promise</var> be ?&nbsp;<emu-xref aoid="PromiseResolve" id="_ref_8018"><a href="#sec-promise-resolve">PromiseResolve</a></emu-xref>(<emu-xref href="#sec-promise-constructor" id="_ref_8019"><a href="#sec-promise-constructor">%Promise%</a></emu-xref>, « <var>completion</var>.[[Value]] »).</li><li>Let <var>stepsFulfilled</var> be the algorithm steps defined in <emu-xref href="#async-generator-resume-next-return-processor-fulfilled" title="" id="_ref_702"><a href="#async-generator-resume-next-return-processor-fulfilled">AsyncGeneratorResumeNext Return Processor Fulfilled Functions</a></emu-xref>.</li><li>Let <var>onFulfilled</var> be <emu-xref aoid="CreateBuiltinFunction" id="_ref_8020"><a href="#sec-createbuiltinfunction">CreateBuiltinFunction</a></emu-xref>(<var>stepsFulfilled</var>, « [[Generator]] »).</li><li>Set <var>onFulfilled</var>.[[Generator]] to <var>generator</var>.</li><li>Let <var>stepsRejected</var> be the algorithm steps defined in <emu-xref href="#async-generator-resume-next-return-processor-rejected" title="" id="_ref_703"><a href="#async-generator-resume-next-return-processor-rejected">AsyncGeneratorResumeNext Return Processor Rejected Functions</a></emu-xref>.</li><li>Let <var>onRejected</var> be <emu-xref aoid="CreateBuiltinFunction" id="_ref_8021"><a href="#sec-createbuiltinfunction">CreateBuiltinFunction</a></emu-xref>(<var>stepsRejected</var>, « [[Generator]] »).</li><li>Set <var>onRejected</var>.[[Generator]] to <var>generator</var>.</li><li>Perform !&nbsp;<emu-xref aoid="PerformPromiseThen" id="_ref_8022"><a href="#sec-performpromisethen">PerformPromiseThen</a></emu-xref>(<var>promise</var>, <var>onFulfilled</var>, <var>onRejected</var>).</li><li>Return <emu-val>undefined</emu-val>.</li></ol></li><li>Else,<ol><li><emu-xref href="#assert" id="_ref_8023"><a href="#assert">Assert</a></emu-xref>: <var>completion</var>.[[Type]] is <emu-const>throw</emu-const>.</li><li>Perform !&nbsp;<emu-xref aoid="AsyncGeneratorReject" id="_ref_8024"><a href="#sec-asyncgeneratorreject">AsyncGeneratorReject</a></emu-xref>(<var>generator</var>, <var>completion</var>.[[Value]]).</li><li>Return <emu-val>undefined</emu-val>.</li></ol></li></ol></li></ol></li><li>Else if <var>state</var> is <code>"completed"</code>, return !&nbsp;<emu-xref aoid="AsyncGeneratorResolve" id="_ref_8025"><a href="#sec-asyncgeneratorresolve">AsyncGeneratorResolve</a></emu-xref>(<var>generator</var>, <emu-val>undefined</emu-val>, <emu-val>true</emu-val>).</li><li><emu-xref href="#assert" id="_ref_8026"><a href="#assert">Assert</a></emu-xref>: <var>state</var> is either <code>"suspendedStart"</code> or <code>"suspendedYield"</code>.</li><li>Let <var>genContext</var> be <var>generator</var>.[[AsyncGeneratorContext]].</li><li>Let <var>callerContext</var> be the <emu-xref href="#running-execution-context" id="_ref_8027"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li><emu-xref aoid="Suspend" id="_ref_8028"><a href="#sec-suspend">Suspend</a></emu-xref> <var>callerContext</var>.</li><li>Set <var>generator</var>.[[AsyncGeneratorState]] to <code>"executing"</code>.</li><li>Push <var>genContext</var> onto the <emu-xref href="#execution-context-stack" id="_ref_8029"><a href="#execution-context-stack">execution context stack</a></emu-xref>; <var>genContext</var> is now the <emu-xref href="#running-execution-context" id="_ref_8030"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Resume the suspended evaluation of <var>genContext</var> using <var>completion</var> as the result of the operation that suspended it. Let <var>result</var> be the completion record returned by the resumed computation.</li><li><emu-xref href="#assert" id="_ref_8031"><a href="#assert">Assert</a></emu-xref>: <var>result</var> is never an <emu-xref href="#sec-completion-record-specification-type" id="_ref_8032"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>.</li><li><emu-xref href="#assert" id="_ref_8033"><a href="#assert">Assert</a></emu-xref>: When we return here, <var>genContext</var> has already been removed from the <emu-xref href="#execution-context-stack" id="_ref_8034"><a href="#execution-context-stack">execution context stack</a></emu-xref> and <var>callerContext</var> is the currently <emu-xref href="#running-execution-context" id="_ref_8035"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Return <emu-val>undefined</emu-val>.
</li></ol></emu-alg>
<emu-clause id="async-generator-resume-next-return-processor-fulfilled">
<h1><span class="secnum">25.5.3.5.1</span>AsyncGeneratorResumeNext Return Processor Fulfilled Functions</h1>
<p>An <emu-xref aoid="AsyncGeneratorResumeNext" id="_ref_8036"><a href="#sec-asyncgeneratorresumenext">AsyncGeneratorResumeNext</a></emu-xref> return processor fulfilled function is an anonymous built-in function that is used as part of the <emu-xref aoid="AsyncGeneratorResumeNext" id="_ref_8037"><a href="#sec-asyncgeneratorresumenext">AsyncGeneratorResumeNext</a></emu-xref> specification device to unwrap promises passed in to the <emu-xref href="#sec-asyncgenerator-prototype-return" title="" id="_ref_704"><a href="#sec-asyncgenerator-prototype-return">AsyncGenerator.prototype.return ( <var>value</var> )</a></emu-xref> method. Each <emu-xref aoid="AsyncGeneratorResumeNext" id="_ref_8038"><a href="#sec-asyncgeneratorresumenext">AsyncGeneratorResumeNext</a></emu-xref> return processor fulfilled function has a [[Generator]] internal slot.</p>
<p>When an <emu-xref aoid="AsyncGeneratorResumeNext" id="_ref_8039"><a href="#sec-asyncgeneratorresumenext">AsyncGeneratorResumeNext</a></emu-xref> return processor fulfilled function is called with argument <var>value</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>F</var> be the <emu-xref href="#active-function-object" id="_ref_8040"><a href="#active-function-object">active function object</a></emu-xref>.</li><li>Set <var>F</var>.[[Generator]].[[AsyncGeneratorState]] to <code>"completed"</code>.</li><li>Return !&nbsp;<emu-xref aoid="AsyncGeneratorResolve" id="_ref_8041"><a href="#sec-asyncgeneratorresolve">AsyncGeneratorResolve</a></emu-xref>(<var>F</var>.[[Generator]], <var>value</var>, <emu-val>true</emu-val>).
</li></ol></emu-alg>
<p>The <code>"length"</code> property of an <emu-xref aoid="AsyncGeneratorResumeNext" id="_ref_8042"><a href="#sec-asyncgeneratorresumenext">AsyncGeneratorResumeNext</a></emu-xref> return processor fulfilled function is 1.</p>
</emu-clause>
<emu-clause id="async-generator-resume-next-return-processor-rejected">
<h1><span class="secnum">25.5.3.5.2</span>AsyncGeneratorResumeNext Return Processor Rejected Functions</h1>
<p>An <emu-xref aoid="AsyncGeneratorResumeNext" id="_ref_8043"><a href="#sec-asyncgeneratorresumenext">AsyncGeneratorResumeNext</a></emu-xref> return processor rejected function is an anonymous built-in function that is used as part of the <emu-xref aoid="AsyncGeneratorResumeNext" id="_ref_8044"><a href="#sec-asyncgeneratorresumenext">AsyncGeneratorResumeNext</a></emu-xref> specification device to unwrap promises passed in to the <emu-xref href="#sec-asyncgenerator-prototype-return" title="" id="_ref_705"><a href="#sec-asyncgenerator-prototype-return">AsyncGenerator.prototype.return ( <var>value</var> )</a></emu-xref> method. Each <emu-xref aoid="AsyncGeneratorResumeNext" id="_ref_8045"><a href="#sec-asyncgeneratorresumenext">AsyncGeneratorResumeNext</a></emu-xref> return processor rejected function has a [[Generator]] internal slot.</p>
<p>When an <emu-xref aoid="AsyncGeneratorResumeNext" id="_ref_8046"><a href="#sec-asyncgeneratorresumenext">AsyncGeneratorResumeNext</a></emu-xref> return processor rejected function is called with argument <var>reason</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>F</var> be the <emu-xref href="#active-function-object" id="_ref_8047"><a href="#active-function-object">active function object</a></emu-xref>.</li><li>Set <var>F</var>.[[Generator]].[[AsyncGeneratorState]] to <code>"completed"</code>.</li><li>Return !&nbsp;<emu-xref aoid="AsyncGeneratorReject" id="_ref_8048"><a href="#sec-asyncgeneratorreject">AsyncGeneratorReject</a></emu-xref>(<var>F</var>.[[Generator]], <var>reason</var>).
</li></ol></emu-alg>
<p>The <code>"length"</code> property of an <emu-xref aoid="AsyncGeneratorResumeNext" id="_ref_8049"><a href="#sec-asyncgeneratorresumenext">AsyncGeneratorResumeNext</a></emu-xref> return processor rejected function is 1.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-asyncgeneratorenqueue" aoid="AsyncGeneratorEnqueue">
<h1><span class="secnum">25.5.3.6</span>AsyncGeneratorEnqueue ( <var>generator</var>, <var>completion</var> )</h1>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_8050"><a href="#assert">Assert</a></emu-xref>: <var>completion</var> is a <emu-xref href="#sec-completion-record-specification-type" id="_ref_8051"><a href="#sec-completion-record-specification-type">Completion Record</a></emu-xref>.</li><li>Let <var>promiseCapability</var> be !&nbsp;<emu-xref aoid="NewPromiseCapability" id="_ref_8052"><a href="#sec-newpromisecapability">NewPromiseCapability</a></emu-xref>(<emu-xref href="#sec-promise-constructor" id="_ref_8053"><a href="#sec-promise-constructor">%Promise%</a></emu-xref>).</li><li>If <emu-xref aoid="Type" id="_ref_8054"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>generator</var>) is not Object, or if <var>generator</var> does not have an [[AsyncGeneratorState]] internal slot, then<ol><li>Let <var>badGeneratorError</var> be a newly created <emu-val>TypeError</emu-val> object.</li><li>Perform !&nbsp;<emu-xref aoid="Call" id="_ref_8055"><a href="#sec-call">Call</a></emu-xref>(<var>promiseCapability</var>.[[Reject]], <emu-val>undefined</emu-val>, « <var>badGeneratorError</var> »).</li><li>Return <var>promiseCapability</var>.[[Promise]].</li></ol></li><li>Let <var>queue</var> be <var>generator</var>.[[AsyncGeneratorQueue]].</li><li>Let <var>request</var> be AsyncGeneratorRequest { [[Completion]]: <var>completion</var>, [[Capability]]: <var>promiseCapability</var> }.</li><li>Append <var>request</var> to the end of <var>queue</var>.</li><li>Let <var>state</var> be <var>generator</var>.[[AsyncGeneratorState]].</li><li>If <var>state</var> is not <code>"executing"</code>, then<ol><li>Perform !&nbsp;<emu-xref aoid="AsyncGeneratorResumeNext" id="_ref_8056"><a href="#sec-asyncgeneratorresumenext">AsyncGeneratorResumeNext</a></emu-xref>(<var>generator</var>).</li></ol></li><li>Return <var>promiseCapability</var>.[[Promise]].
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-asyncgeneratoryield" aoid="AsyncGeneratorYield">
<h1><span class="secnum">25.5.3.7</span>AsyncGeneratorYield ( <var>value</var> )</h1>
<p>The abstract operation AsyncGeneratorYield with argument <var>value</var> performs the following steps:</p>
<emu-alg><ol><li>Let <var>genContext</var> be the <emu-xref href="#running-execution-context" id="_ref_8057"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li><emu-xref href="#assert" id="_ref_8058"><a href="#assert">Assert</a></emu-xref>: <var>genContext</var> is the <emu-xref href="#sec-execution-contexts" id="_ref_8059"><a href="#sec-execution-contexts">execution context</a></emu-xref> of a generator.</li><li>Let <var>generator</var> be the value of the Generator component of <var>genContext</var>.</li><li><emu-xref href="#assert" id="_ref_8060"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="GetGeneratorKind" id="_ref_8061"><a href="#sec-getgeneratorkind">GetGeneratorKind</a></emu-xref>() is <emu-const>async</emu-const>.</li><li>Set <var>value</var> to ?&nbsp;<emu-xref aoid="Await" id="_ref_8062"><a href="#await">Await</a></emu-xref>(<var>value</var>).</li><li>Set <var>generator</var>.[[AsyncGeneratorState]] to <code>"suspendedYield"</code>.</li><li>Remove <var>genContext</var> from the <emu-xref href="#execution-context-stack" id="_ref_8063"><a href="#execution-context-stack">execution context stack</a></emu-xref> and restore the <emu-xref href="#sec-execution-contexts" id="_ref_8064"><a href="#sec-execution-contexts">execution context</a></emu-xref> that is at the top of the <emu-xref href="#execution-context-stack" id="_ref_8065"><a href="#execution-context-stack">execution context stack</a></emu-xref> as the <emu-xref href="#running-execution-context" id="_ref_8066"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Set the code evaluation state of <var>genContext</var> such that when evaluation is resumed with a <emu-xref aoid="Completion" id="_ref_8067"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref> <var>resumptionValue</var> the following steps will be performed:<ol><li>If <var>resumptionValue</var>.[[Type]] is not <emu-const>return</emu-const>, return <emu-xref aoid="Completion" id="_ref_8068"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>resumptionValue</var>).</li><li>Let <var>awaited</var> be <emu-xref aoid="Await" id="_ref_8069"><a href="#await">Await</a></emu-xref>(<var>resumptionValue</var>.[[Value]]).</li><li>If <var>awaited</var>.[[Type]] is <emu-const>throw</emu-const>, return <emu-xref aoid="Completion" id="_ref_8070"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>awaited</var>).</li><li><emu-xref href="#assert" id="_ref_8071"><a href="#assert">Assert</a></emu-xref>: <var>awaited</var>.[[Type]] is <emu-const>normal</emu-const>.</li><li>Return <emu-xref aoid="Completion" id="_ref_8072"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref> { [[Type]]: <emu-const>return</emu-const>, [[Value]]: <var>awaited</var>.[[Value]], [[Target]]: <emu-const>empty</emu-const> }.</li><li>NOTE: When one of the above steps returns, it returns to the evaluation of the <emu-nt id="_ref_14813"><a href="#prod-YieldExpression">YieldExpression</a></emu-nt> production that originally called this abstract operation.</li></ol></li><li>Return !&nbsp;<emu-xref aoid="AsyncGeneratorResolve" id="_ref_8073"><a href="#sec-asyncgeneratorresolve">AsyncGeneratorResolve</a></emu-xref>(<var>generator</var>, <var>value</var>, <emu-val>false</emu-val>).</li><li>NOTE: This returns to the evaluation of the operation that had most previously resumed evaluation of <var>genContext</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-promise-objects">
<h1><span class="secnum">25.6</span>Promise Objects</h1>
<p>A Promise is an object that is used as a placeholder for the
eventual results of a deferred (and possibly asynchronous) computation.</p>
<p>Any Promise object is in one of three mutually exclusive states: <em>fulfilled</em>, <em>rejected</em>, and <em>pending</em>:</p>
<ul>
<li>
A promise <code>p</code> is fulfilled if <code>p.then(f, r)</code> will immediately enqueue a Job to call the function <code>f</code>.
</li>
<li>
A promise <code>p</code> is rejected if <code>p.then(f, r)</code> will immediately enqueue a Job to call the function <code>r</code>.
</li>
<li>
A promise is pending if it is neither fulfilled nor rejected.
</li>
</ul>
<p>A promise is said to be <em>settled</em> if it is not pending, i.e. if it is either fulfilled or rejected.</p>
<p>A promise is <em>resolved</em> if it is settled or if it has
been “locked in” to match the state of another promise. Attempting to
resolve or reject a resolved promise has no effect. A promise is <em>unresolved</em>
if it is not resolved. An unresolved promise is always in the pending
state. A resolved promise may be pending, fulfilled or rejected.</p>
<emu-clause id="sec-promise-abstract-operations">
<h1><span class="secnum">25.6.1</span>Promise Abstract Operations</h1>
<emu-clause id="sec-promisecapability-records">
<h1><span class="secnum">25.6.1.1</span>PromiseCapability Records</h1>
<p>A PromiseCapability is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8074"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref>
value used to encapsulate a promise object along with the functions
that are capable of resolving or rejecting that promise object.
PromiseCapability Records are produced by the <emu-xref aoid="NewPromiseCapability" id="_ref_8075"><a href="#sec-newpromisecapability">NewPromiseCapability</a></emu-xref> abstract operation.</p>
<p>PromiseCapability Records have the fields listed in <emu-xref href="#table-57" id="_ref_706"><a href="#table-57">Table 74</a></emu-xref>.</p>
<emu-table id="table-57" caption="PromiseCapability Record Fields"><figure><figcaption>Table 74: PromiseCapability <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8076"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> Fields</figcaption>
<table>
<tbody>
<tr>
<th>
Field Name
</th>
<th>
Value
</th>
<th>
Meaning
</th>
</tr>
<tr>
<td>
[[Promise]]
</td>
<td>
An object
</td>
<td>
An object that is usable as a promise.
</td>
</tr>
<tr>
<td>
[[Resolve]]
</td>
<td>
A <emu-xref href="#function-object" id="_ref_8077"><a href="#function-object">function object</a></emu-xref>
</td>
<td>
The function that is used to resolve the given promise object.
</td>
</tr>
<tr>
<td>
[[Reject]]
</td>
<td>
A <emu-xref href="#function-object" id="_ref_8078"><a href="#function-object">function object</a></emu-xref>
</td>
<td>
The function that is used to reject the given promise object.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<emu-clause id="sec-ifabruptrejectpromise" aoid="IfAbruptRejectPromise">
<h1><span class="secnum">25.6.1.1.1</span>IfAbruptRejectPromise ( <var>value</var>, <var>capability</var> )</h1>
<p>IfAbruptRejectPromise is a shorthand for a sequence of algorithm steps that use a PromiseCapability <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8079"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref>. An algorithm step of the form:</p>
<emu-alg><ol><li><emu-xref aoid="IfAbruptRejectPromise" id="_ref_8080"><a href="#sec-ifabruptrejectpromise">IfAbruptRejectPromise</a></emu-xref>(<var>value</var>, <var>capability</var>).
</li></ol></emu-alg>
<p>means the same thing as:</p>
<emu-alg><ol><li>If <var>value</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_8081"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, then<ol><li>Perform ?&nbsp;<emu-xref aoid="Call" id="_ref_8082"><a href="#sec-call">Call</a></emu-xref>(<var>capability</var>.[[Reject]], <emu-val>undefined</emu-val>, « <var>value</var>.[[Value]] »).</li><li>Return <var>capability</var>.[[Promise]].</li></ol></li><li>Else if <var>value</var> is a <emu-xref href="#sec-completion-record-specification-type" id="_ref_8083"><a href="#sec-completion-record-specification-type">Completion Record</a></emu-xref>, set <var>value</var> to <var>value</var>.[[Value]].
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-promisereaction-records">
<h1><span class="secnum">25.6.1.2</span>PromiseReaction Records</h1>
<p>The PromiseReaction is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8084"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref>
value used to store information about how a promise should react when
it becomes resolved or rejected with a given value. PromiseReaction
records are created by the <emu-xref aoid="PerformPromiseThen" id="_ref_8085"><a href="#sec-performpromisethen">PerformPromiseThen</a></emu-xref> abstract operation, and are used by a <emu-xref aoid="PromiseReactionJob" id="_ref_8086"><a href="#sec-promisereactionjob">PromiseReactionJob</a></emu-xref>.</p>
<p>PromiseReaction records have the fields listed in <emu-xref href="#table-58" id="_ref_707"><a href="#table-58">Table 75</a></emu-xref>.</p>
<emu-table id="table-58" caption="PromiseReaction Record Fields"><figure><figcaption>Table 75: PromiseReaction <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8087"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> Fields</figcaption>
<table>
<tbody>
<tr>
<th>
Field Name
</th>
<th>
Value
</th>
<th>
Meaning
</th>
</tr>
<tr>
<td>
[[Capability]]
</td>
<td>
A PromiseCapability <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8088"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref>, or <emu-val>undefined</emu-val>
</td>
<td>
The capabilities of the promise for which this record provides a reaction handler.
</td>
</tr>
<tr>
<td>
[[Type]]
</td>
<td>
Either <code>"Fulfill"</code> or <code>"Reject"</code>.
</td>
<td>
The [[Type]] is used when [[Handler]] is <emu-val>undefined</emu-val> to allow for behaviour specific to the settlement type.
</td>
</tr>
<tr>
<td>
[[Handler]]
</td>
<td>
A <emu-xref href="#function-object" id="_ref_8089"><a href="#function-object">function object</a></emu-xref> or <emu-val>undefined</emu-val>.
</td>
<td>
The function that should be applied to the incoming
value, and whose return value will govern what happens to the derived
promise. If [[Handler]] is <emu-val>undefined</emu-val>, a function that depends on the value of [[Type]] will be used instead.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
</emu-clause>
<emu-clause id="sec-createresolvingfunctions" aoid="CreateResolvingFunctions">
<h1><span class="secnum">25.6.1.3</span>CreateResolvingFunctions ( <var>promise</var> )</h1>
<p>When CreateResolvingFunctions is performed with argument <var>promise</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>alreadyResolved</var> be a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8090"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Value]]: <emu-val>false</emu-val> }.</li><li>Let <var>stepsResolve</var> be the algorithm steps defined in Promise Resolve Functions (<emu-xref href="#sec-promise-resolve-functions" id="_ref_708"><a href="#sec-promise-resolve-functions">25.6.1.3.2</a></emu-xref>).</li><li>Let <var>resolve</var> be <emu-xref aoid="CreateBuiltinFunction" id="_ref_8091"><a href="#sec-createbuiltinfunction">CreateBuiltinFunction</a></emu-xref>(<var>stepsResolve</var>, « [[Promise]], [[AlreadyResolved]] »).</li><li>Set <var>resolve</var>.[[Promise]] to <var>promise</var>.</li><li>Set <var>resolve</var>.[[AlreadyResolved]] to <var>alreadyResolved</var>.</li><li>Let <var>stepsReject</var> be the algorithm steps defined in Promise Reject Functions (<emu-xref href="#sec-promise-reject-functions" id="_ref_709"><a href="#sec-promise-reject-functions">25.6.1.3.1</a></emu-xref>).</li><li>Let <var>reject</var> be <emu-xref aoid="CreateBuiltinFunction" id="_ref_8092"><a href="#sec-createbuiltinfunction">CreateBuiltinFunction</a></emu-xref>(<var>stepsReject</var>, « [[Promise]], [[AlreadyResolved]] »).</li><li>Set <var>reject</var>.[[Promise]] to <var>promise</var>.</li><li>Set <var>reject</var>.[[AlreadyResolved]] to <var>alreadyResolved</var>.</li><li>Return a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8093"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Resolve]]: <var>resolve</var>, [[Reject]]: <var>reject</var> }.
</li></ol></emu-alg>
<emu-clause id="sec-promise-reject-functions">
<h1><span class="secnum">25.6.1.3.1</span>Promise Reject Functions</h1>
<p>A promise reject function is an anonymous built-in function that has [[Promise]] and [[AlreadyResolved]] internal slots.</p>
<p>When a promise reject function is called with argument <var>reason</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>F</var> be the <emu-xref href="#active-function-object" id="_ref_8094"><a href="#active-function-object">active function object</a></emu-xref>.</li><li><emu-xref href="#assert" id="_ref_8095"><a href="#assert">Assert</a></emu-xref>: <var>F</var> has a [[Promise]] internal slot whose value is an Object.</li><li>Let <var>promise</var> be <var>F</var>.[[Promise]].</li><li>Let <var>alreadyResolved</var> be <var>F</var>.[[AlreadyResolved]].</li><li>If <var>alreadyResolved</var>.[[Value]] is <emu-val>true</emu-val>, return <emu-val>undefined</emu-val>.</li><li>Set <var>alreadyResolved</var>.[[Value]] to <emu-val>true</emu-val>.</li><li>Return <emu-xref aoid="RejectPromise" id="_ref_8096"><a href="#sec-rejectpromise">RejectPromise</a></emu-xref>(<var>promise</var>, <var>reason</var>).
</li></ol></emu-alg>
<p>The <code>"length"</code> property of a promise reject function is 1.</p>
</emu-clause>
<emu-clause id="sec-promise-resolve-functions">
<h1><span class="secnum">25.6.1.3.2</span>Promise Resolve Functions</h1>
<p>A promise resolve function is an anonymous built-in function that has [[Promise]] and [[AlreadyResolved]] internal slots.</p>
<p>When a promise resolve function is called with argument <var>resolution</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>F</var> be the <emu-xref href="#active-function-object" id="_ref_8097"><a href="#active-function-object">active function object</a></emu-xref>.</li><li><emu-xref href="#assert" id="_ref_8098"><a href="#assert">Assert</a></emu-xref>: <var>F</var> has a [[Promise]] internal slot whose value is an Object.</li><li>Let <var>promise</var> be <var>F</var>.[[Promise]].</li><li>Let <var>alreadyResolved</var> be <var>F</var>.[[AlreadyResolved]].</li><li>If <var>alreadyResolved</var>.[[Value]] is <emu-val>true</emu-val>, return <emu-val>undefined</emu-val>.</li><li>Set <var>alreadyResolved</var>.[[Value]] to <emu-val>true</emu-val>.</li><li>If <emu-xref aoid="SameValue" id="_ref_8099"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>resolution</var>, <var>promise</var>) is <emu-val>true</emu-val>, then<ol><li>Let <var>selfResolutionError</var> be a newly created <emu-val>TypeError</emu-val> object.</li><li>Return <emu-xref aoid="RejectPromise" id="_ref_8100"><a href="#sec-rejectpromise">RejectPromise</a></emu-xref>(<var>promise</var>, <var>selfResolutionError</var>).</li></ol></li><li>If <emu-xref aoid="Type" id="_ref_8101"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>resolution</var>) is not Object, then<ol><li>Return <emu-xref aoid="FulfillPromise" id="_ref_8102"><a href="#sec-fulfillpromise">FulfillPromise</a></emu-xref>(<var>promise</var>, <var>resolution</var>).</li></ol></li><li>Let <var>then</var> be <emu-xref aoid="Get" id="_ref_8103"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>resolution</var>, <code>"then"</code>).</li><li>If <var>then</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_8104"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, then<ol><li>Return <emu-xref aoid="RejectPromise" id="_ref_8105"><a href="#sec-rejectpromise">RejectPromise</a></emu-xref>(<var>promise</var>, <var>then</var>.[[Value]]).</li></ol></li><li>Let <var>thenAction</var> be <var>then</var>.[[Value]].</li><li>If <emu-xref aoid="IsCallable" id="_ref_8106"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>thenAction</var>) is <emu-val>false</emu-val>, then<ol><li>Return <emu-xref aoid="FulfillPromise" id="_ref_8107"><a href="#sec-fulfillpromise">FulfillPromise</a></emu-xref>(<var>promise</var>, <var>resolution</var>).</li></ol></li><li>Perform <emu-xref aoid="EnqueueJob" id="_ref_8108"><a href="#sec-enqueuejob">EnqueueJob</a></emu-xref>(<code>"PromiseJobs"</code>, <emu-xref aoid="PromiseResolveThenableJob" id="_ref_8109"><a href="#sec-promiseresolvethenablejob">PromiseResolveThenableJob</a></emu-xref>, « <var>promise</var>, <var>resolution</var>, <var>thenAction</var> »).</li><li>Return <emu-val>undefined</emu-val>.
</li></ol></emu-alg>
<p>The <code>"length"</code> property of a promise resolve function is 1.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-fulfillpromise" aoid="FulfillPromise">
<h1><span class="secnum">25.6.1.4</span>FulfillPromise ( <var>promise</var>, <var>value</var> )</h1>
<p>When the FulfillPromise abstract operation is called with arguments <var>promise</var> and <var>value</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_8110"><a href="#assert">Assert</a></emu-xref>: The value of <var>promise</var>.[[PromiseState]] is <code>"pending"</code>.</li><li>Let <var>reactions</var> be <var>promise</var>.[[PromiseFulfillReactions]].</li><li>Set <var>promise</var>.[[PromiseResult]] to <var>value</var>.</li><li>Set <var>promise</var>.[[PromiseFulfillReactions]] to <emu-val>undefined</emu-val>.</li><li>Set <var>promise</var>.[[PromiseRejectReactions]] to <emu-val>undefined</emu-val>.</li><li>Set <var>promise</var>.[[PromiseState]] to <code>"fulfilled"</code>.</li><li>Return <emu-xref aoid="TriggerPromiseReactions" id="_ref_8111"><a href="#sec-triggerpromisereactions">TriggerPromiseReactions</a></emu-xref>(<var>reactions</var>, <var>value</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-newpromisecapability" aoid="NewPromiseCapability">
<h1><span class="secnum">25.6.1.5</span>NewPromiseCapability ( <var>C</var> )</h1>
<p>The abstract operation NewPromiseCapability takes a <emu-xref href="#constructor" id="_ref_8112"><a href="#constructor">constructor</a></emu-xref> function, and attempts to use that <emu-xref href="#constructor" id="_ref_8113"><a href="#constructor">constructor</a></emu-xref> function in the fashion of the built-in <code>Promise</code> <emu-xref href="#constructor" id="_ref_8114"><a href="#constructor">constructor</a></emu-xref>
to create a Promise object and extract its resolve and reject
functions. The promise plus the resolve and reject functions are used to
initialize a new PromiseCapability <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8115"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> which is returned as the value of this abstract operation.</p>
<emu-alg><ol><li>If <emu-xref aoid="IsConstructor" id="_ref_8116"><a href="#sec-isconstructor">IsConstructor</a></emu-xref>(<var>C</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>NOTE: <var>C</var> is assumed to be a <emu-xref href="#constructor" id="_ref_8117"><a href="#constructor">constructor</a></emu-xref> function that supports the parameter conventions of the <code>Promise</code> <emu-xref href="#constructor" id="_ref_8118"><a href="#constructor">constructor</a></emu-xref> (see <emu-xref href="#sec-promise-executor" id="_ref_710"><a href="#sec-promise-executor">25.6.3.1</a></emu-xref>).</li><li>Let <var>promiseCapability</var> be a new PromiseCapability { [[Promise]]: <emu-val>undefined</emu-val>, [[Resolve]]: <emu-val>undefined</emu-val>, [[Reject]]: <emu-val>undefined</emu-val> }.</li><li>Let <var>steps</var> be the algorithm steps defined in <emu-xref href="#sec-getcapabilitiesexecutor-functions" title="" id="_ref_711"><a href="#sec-getcapabilitiesexecutor-functions">GetCapabilitiesExecutor Functions</a></emu-xref>.</li><li>Let <var>executor</var> be <emu-xref aoid="CreateBuiltinFunction" id="_ref_8119"><a href="#sec-createbuiltinfunction">CreateBuiltinFunction</a></emu-xref>(<var>steps</var>, « [[Capability]] »).</li><li>Set <var>executor</var>.[[Capability]] to <var>promiseCapability</var>.</li><li>Let <var>promise</var> be ?&nbsp;<emu-xref aoid="Construct" id="_ref_8120"><a href="#sec-construct">Construct</a></emu-xref>(<var>C</var>, « <var>executor</var> »).</li><li>If <emu-xref aoid="IsCallable" id="_ref_8121"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>promiseCapability</var>.[[Resolve]]) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <emu-xref aoid="IsCallable" id="_ref_8122"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>promiseCapability</var>.[[Reject]]) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Set <var>promiseCapability</var>.[[Promise]] to <var>promise</var>.</li><li>Return <var>promiseCapability</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>This abstract operation supports Promise subclassing, as it is generic on any <emu-xref href="#constructor" id="_ref_8123"><a href="#constructor">constructor</a></emu-xref> that calls a passed executor function argument in the same way as the Promise <emu-xref href="#constructor" id="_ref_8124"><a href="#constructor">constructor</a></emu-xref>. It is used to generalize static methods of the Promise <emu-xref href="#constructor" id="_ref_8125"><a href="#constructor">constructor</a></emu-xref> to any subclass.</p>
</div></emu-note>
<emu-clause id="sec-getcapabilitiesexecutor-functions">
<h1><span class="secnum">25.6.1.5.1</span>GetCapabilitiesExecutor Functions</h1>
<p>A GetCapabilitiesExecutor function is an anonymous built-in function that has a [[Capability]] internal slot.</p>
<p>When a GetCapabilitiesExecutor function is called with arguments <var>resolve</var> and <var>reject</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>F</var> be the <emu-xref href="#active-function-object" id="_ref_8126"><a href="#active-function-object">active function object</a></emu-xref>.</li><li><emu-xref href="#assert" id="_ref_8127"><a href="#assert">Assert</a></emu-xref>: <var>F</var> has a [[Capability]] internal slot whose value is a PromiseCapability <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8128"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref>.</li><li>Let <var>promiseCapability</var> be <var>F</var>.[[Capability]].</li><li>If <var>promiseCapability</var>.[[Resolve]] is not <emu-val>undefined</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>promiseCapability</var>.[[Reject]] is not <emu-val>undefined</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Set <var>promiseCapability</var>.[[Resolve]] to <var>resolve</var>.</li><li>Set <var>promiseCapability</var>.[[Reject]] to <var>reject</var>.</li><li>Return <emu-val>undefined</emu-val>.
</li></ol></emu-alg>
<p>The <code>"length"</code> property of a GetCapabilitiesExecutor function is 2.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-ispromise" aoid="IsPromise">
<h1><span class="secnum">25.6.1.6</span>IsPromise ( <var>x</var> )</h1>
<p>The abstract operation IsPromise checks for the promise brand on an object.</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_8129"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>x</var>) is not Object, return <emu-val>false</emu-val>.</li><li>If <var>x</var> does not have a [[PromiseState]] internal slot, return <emu-val>false</emu-val>.</li><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-rejectpromise" aoid="RejectPromise">
<h1><span class="secnum">25.6.1.7</span>RejectPromise ( <var>promise</var>, <var>reason</var> )</h1>
<p>When the RejectPromise abstract operation is called with arguments <var>promise</var> and <var>reason</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_8130"><a href="#assert">Assert</a></emu-xref>: The value of <var>promise</var>.[[PromiseState]] is <code>"pending"</code>.</li><li>Let <var>reactions</var> be <var>promise</var>.[[PromiseRejectReactions]].</li><li>Set <var>promise</var>.[[PromiseResult]] to <var>reason</var>.</li><li>Set <var>promise</var>.[[PromiseFulfillReactions]] to <emu-val>undefined</emu-val>.</li><li>Set <var>promise</var>.[[PromiseRejectReactions]] to <emu-val>undefined</emu-val>.</li><li>Set <var>promise</var>.[[PromiseState]] to <code>"rejected"</code>.</li><li>If <var>promise</var>.[[PromiseIsHandled]] is <emu-val>false</emu-val>, perform <emu-xref aoid="HostPromiseRejectionTracker" id="_ref_8131"><a href="#sec-host-promise-rejection-tracker">HostPromiseRejectionTracker</a></emu-xref>(<var>promise</var>, <code>"reject"</code>).</li><li>Return <emu-xref aoid="TriggerPromiseReactions" id="_ref_8132"><a href="#sec-triggerpromisereactions">TriggerPromiseReactions</a></emu-xref>(<var>reactions</var>, <var>reason</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-triggerpromisereactions" aoid="TriggerPromiseReactions">
<h1><span class="secnum">25.6.1.8</span>TriggerPromiseReactions ( <var>reactions</var>, <var>argument</var> )</h1>
<p>The abstract operation TriggerPromiseReactions takes a
collection of PromiseReactionRecords and enqueues a new Job for each
record. Each such Job processes the [[Type]] and [[Handler]] of the
PromiseReactionRecord, and if the [[Handler]] is a function, calls it
passing the given argument. If the [[Handler]] is <emu-val>undefined</emu-val>, the behaviour is determined by the [[Type]].</p>
<emu-alg><ol><li>For each <var>reaction</var> in <var>reactions</var>, in original insertion order, do<ol><li>Perform <emu-xref aoid="EnqueueJob" id="_ref_8133"><a href="#sec-enqueuejob">EnqueueJob</a></emu-xref>(<code>"PromiseJobs"</code>, <emu-xref aoid="PromiseReactionJob" id="_ref_8134"><a href="#sec-promisereactionjob">PromiseReactionJob</a></emu-xref>, « <var>reaction</var>, <var>argument</var> »).</li></ol></li><li>Return <emu-val>undefined</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-host-promise-rejection-tracker" aoid="HostPromiseRejectionTracker">
<h1><span class="secnum">25.6.1.9</span>HostPromiseRejectionTracker ( <var>promise</var>, <var>operation</var> )</h1>
<p>HostPromiseRejectionTracker is an implementation-defined
abstract operation that allows host environments to track promise
rejections.</p>
<p>An implementation of HostPromiseRejectionTracker must
complete normally in all cases. The default implementation of
HostPromiseRejectionTracker is to unconditionally return an empty normal
completion.</p>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>HostPromiseRejectionTracker is called in two scenarios:</p>
<ul>
<li>When a promise is rejected without any handlers, it is called with its <var>operation</var> argument set to <code>"reject"</code>.</li>
<li>When a handler is added to a rejected promise for the first time, it is called with its <var>operation</var> argument set to <code>"handle"</code>.</li>
</ul>
<p>A typical implementation of HostPromiseRejectionTracker
might try to notify developers of unhandled rejections, while also being
careful to notify them if such previous notifications are later
invalidated by new handlers being attached.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>If <var>operation</var> is <code>"handle"</code>, an implementation should not hold a reference to <var>promise</var> in a way that would interfere with garbage collection. An implementation may hold a reference to <var>promise</var> if <var>operation</var> is <code>"reject"</code>, since it is expected that rejections will be rare and not on hot code paths.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-promise-jobs">
<h1><span class="secnum">25.6.2</span>Promise Jobs</h1>
<emu-clause id="sec-promisereactionjob" aoid="PromiseReactionJob">
<h1><span class="secnum">25.6.2.1</span>PromiseReactionJob ( <var>reaction</var>, <var>argument</var> )</h1>
<p>The job PromiseReactionJob with parameters <var>reaction</var> and <var>argument</var>
applies the appropriate handler to the incoming value, and uses the
handler's return value to resolve or reject the derived promise
associated with that handler.</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_8135"><a href="#assert">Assert</a></emu-xref>: <var>reaction</var> is a PromiseReaction <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8136"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref>.</li><li>Let <var>promiseCapability</var> be <var>reaction</var>.[[Capability]].</li><li>Let <var>type</var> be <var>reaction</var>.[[Type]].</li><li>Let <var>handler</var> be <var>reaction</var>.[[Handler]].</li><li>If <var>handler</var> is <emu-val>undefined</emu-val>, then<ol><li>If <var>type</var> is <code>"Fulfill"</code>, let <var>handlerResult</var> be <emu-xref aoid="NormalCompletion" id="_ref_8137"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<var>argument</var>).</li><li>Else,<ol><li><emu-xref href="#assert" id="_ref_8138"><a href="#assert">Assert</a></emu-xref>: <var>type</var> is <code>"Reject"</code>.</li><li>Let <var>handlerResult</var> be <emu-xref aoid="ThrowCompletion" id="_ref_8139"><a href="#sec-throwcompletion">ThrowCompletion</a></emu-xref>(<var>argument</var>).</li></ol></li></ol></li><li>Else, let <var>handlerResult</var> be <emu-xref aoid="Call" id="_ref_8140"><a href="#sec-call">Call</a></emu-xref>(<var>handler</var>, <emu-val>undefined</emu-val>, « <var>argument</var> »).</li><li>If <var>promiseCapability</var> is <emu-val>undefined</emu-val>, then<ol><li><emu-xref href="#assert" id="_ref_8141"><a href="#assert">Assert</a></emu-xref>: <var>handlerResult</var> is not an <emu-xref href="#sec-completion-record-specification-type" id="_ref_8142"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>.</li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_8143"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).</li></ol></li><li>If <var>handlerResult</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_8144"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, then<ol><li>Let <var>status</var> be <emu-xref aoid="Call" id="_ref_8145"><a href="#sec-call">Call</a></emu-xref>(<var>promiseCapability</var>.[[Reject]], <emu-val>undefined</emu-val>, « <var>handlerResult</var>.[[Value]] »).</li></ol></li><li>Else,<ol><li>Let <var>status</var> be <emu-xref aoid="Call" id="_ref_8146"><a href="#sec-call">Call</a></emu-xref>(<var>promiseCapability</var>.[[Resolve]], <emu-val>undefined</emu-val>, « <var>handlerResult</var>.[[Value]] »).</li></ol></li><li>Return <emu-xref aoid="Completion" id="_ref_8147"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>status</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-promiseresolvethenablejob" aoid="PromiseResolveThenableJob">
<h1><span class="secnum">25.6.2.2</span>PromiseResolveThenableJob ( <var>promiseToResolve</var>, <var>thenable</var>, <var>then</var> )</h1>
<p>The job PromiseResolveThenableJob with parameters <var>promiseToResolve</var>, <var>thenable</var>, and <var>then</var> performs the following steps:</p>
<emu-alg><ol><li>Let <var>resolvingFunctions</var> be <emu-xref aoid="CreateResolvingFunctions" id="_ref_8148"><a href="#sec-createresolvingfunctions">CreateResolvingFunctions</a></emu-xref>(<var>promiseToResolve</var>).</li><li>Let <var>thenCallResult</var> be <emu-xref aoid="Call" id="_ref_8149"><a href="#sec-call">Call</a></emu-xref>(<var>then</var>, <var>thenable</var>, « <var>resolvingFunctions</var>.[[Resolve]], <var>resolvingFunctions</var>.[[Reject]] »).</li><li>If <var>thenCallResult</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_8150"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, then<ol><li>Let <var>status</var> be <emu-xref aoid="Call" id="_ref_8151"><a href="#sec-call">Call</a></emu-xref>(<var>resolvingFunctions</var>.[[Reject]], <emu-val>undefined</emu-val>, « <var>thenCallResult</var>.[[Value]] »).</li><li>Return <emu-xref aoid="Completion" id="_ref_8152"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>status</var>).</li></ol></li><li>Return <emu-xref aoid="Completion" id="_ref_8153"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>thenCallResult</var>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>This Job uses the supplied thenable and its <code>then</code> method to resolve the given promise. This process must take place as a Job to ensure that the evaluation of the <code>then</code> method occurs after evaluation of any surrounding code has completed.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-promise-constructor">
<h1><span class="secnum">25.6.3</span>The Promise Constructor</h1>
<p>The Promise <emu-xref href="#constructor" id="_ref_8154"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>is the intrinsic object <dfn>%Promise%</dfn>.</li>
<li>is the initial value of the <code>Promise</code> property of the <emu-xref href="#sec-global-object" id="_ref_8155"><a href="#sec-global-object">global object</a></emu-xref>.</li>
<li>creates and initializes a new Promise object when called as a <emu-xref href="#constructor" id="_ref_8156"><a href="#constructor">constructor</a></emu-xref>.</li>
<li>is not intended to be called as a function and will throw an exception when called in that manner.</li>
<li>is designed to be subclassable. It may be used as the value in an <code>extends</code> clause of a class definition. Subclass constructors that intend to inherit the specified <code>Promise</code> behaviour must include a <code>super</code> call to the <code>Promise</code> <emu-xref href="#constructor" id="_ref_8157"><a href="#constructor">constructor</a></emu-xref> to create and initialize the subclass instance with the internal state necessary to support the <code>Promise</code> and <code>Promise.prototype</code> built-in methods.</li>
</ul>
<emu-clause id="sec-promise-executor">
<h1><span class="secnum">25.6.3.1</span>Promise ( <var>executor</var> )</h1>
<p>When the <code>Promise</code> function is called with argument <var>executor</var>, the following steps are taken:</p>
<emu-alg><ol><li>If NewTarget is <emu-val>undefined</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <emu-xref aoid="IsCallable" id="_ref_8158"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>executor</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>promise</var> be ?&nbsp;<emu-xref aoid="OrdinaryCreateFromConstructor" id="_ref_8159"><a href="#sec-ordinarycreatefromconstructor">OrdinaryCreateFromConstructor</a></emu-xref>(NewTarget, <code>"%PromisePrototype%"</code>, « [[PromiseState]], [[PromiseResult]], [[PromiseFulfillReactions]], [[PromiseRejectReactions]], [[PromiseIsHandled]] »).</li><li>Set <var>promise</var>.[[PromiseState]] to <code>"pending"</code>.</li><li>Set <var>promise</var>.[[PromiseFulfillReactions]] to a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8160"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Set <var>promise</var>.[[PromiseRejectReactions]] to a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8161"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Set <var>promise</var>.[[PromiseIsHandled]] to <emu-val>false</emu-val>.</li><li>Let <var>resolvingFunctions</var> be <emu-xref aoid="CreateResolvingFunctions" id="_ref_8162"><a href="#sec-createresolvingfunctions">CreateResolvingFunctions</a></emu-xref>(<var>promise</var>).</li><li>Let <var>completion</var> be <emu-xref aoid="Call" id="_ref_8163"><a href="#sec-call">Call</a></emu-xref>(<var>executor</var>, <emu-val>undefined</emu-val>, « <var>resolvingFunctions</var>.[[Resolve]], <var>resolvingFunctions</var>.[[Reject]] »).</li><li>If <var>completion</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_8164"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, then<ol><li>Perform ?&nbsp;<emu-xref aoid="Call" id="_ref_8165"><a href="#sec-call">Call</a></emu-xref>(<var>resolvingFunctions</var>.[[Reject]], <emu-val>undefined</emu-val>, « <var>completion</var>.[[Value]] »).</li></ol></li><li>Return <var>promise</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <var>executor</var> argument must be a <emu-xref href="#function-object" id="_ref_8166"><a href="#function-object">function object</a></emu-xref>.
It is called for initiating and reporting completion of the possibly
deferred action represented by this Promise object. The executor is
called with two arguments: <var>resolve</var> and <var>reject</var>. These are functions that may be used by the <var>executor</var>
function to report eventual completion or failure of the deferred
computation. Returning from the executor function does not mean that the
deferred action has been completed but only that the request to
eventually perform the deferred action has been accepted.</p>
<p>The <var>resolve</var> function that is passed to an <var>executor</var> function accepts a single argument. The <var>executor</var> code may eventually call the <var>resolve</var> function to indicate that it wishes to resolve the associated Promise object. The argument passed to the <var>resolve</var>
function represents the eventual value of the deferred action and can
be either the actual fulfillment value or another Promise object which
will provide the value if it is fulfilled.</p>
<p>The <var>reject</var> function that is passed to an <var>executor</var> function accepts a single argument. The <var>executor</var> code may eventually call the <var>reject</var> function to indicate that the associated Promise is rejected and will never be fulfilled. The argument passed to the <var>reject</var> function is used as the rejection value of the promise. Typically it will be an <code>Error</code> object.</p>
<p>The resolve and reject functions passed to an <var>executor</var> function by the Promise <emu-xref href="#constructor" id="_ref_8167"><a href="#constructor">constructor</a></emu-xref> have the capability to actually resolve and reject the associated promise. Subclasses may have different <emu-xref href="#constructor" id="_ref_8168"><a href="#constructor">constructor</a></emu-xref> behaviour that passes in customized values for resolve and reject.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-promise-constructor">
<h1><span class="secnum">25.6.4</span>Properties of the Promise Constructor</h1>
<p>The Promise <emu-xref href="#constructor" id="_ref_8169"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_8170"><a href="#sec-properties-of-the-function-prototype-object">%FunctionPrototype%</a></emu-xref>.</li>
<li>has the following properties:</li>
</ul>
<emu-clause id="sec-promise.all">
<h1><span class="secnum">25.6.4.1</span>Promise.all ( <var>iterable</var> )</h1>
<p>The <code>all</code> function returns a new promise which is
fulfilled with an array of fulfillment values for the passed promises,
or rejects with the reason of the first passed promise that rejects. It
resolves all elements of the passed iterable to promises as it runs this
algorithm.</p>
<emu-alg><ol><li>Let <var>C</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_8171"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>C</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>promiseCapability</var> be ?&nbsp;<emu-xref aoid="NewPromiseCapability" id="_ref_8172"><a href="#sec-newpromisecapability">NewPromiseCapability</a></emu-xref>(<var>C</var>).</li><li>Let <var>iteratorRecord</var> be <emu-xref aoid="GetIterator" id="_ref_8173"><a href="#sec-getiterator">GetIterator</a></emu-xref>(<var>iterable</var>).</li><li><emu-xref aoid="IfAbruptRejectPromise" id="_ref_8174"><a href="#sec-ifabruptrejectpromise">IfAbruptRejectPromise</a></emu-xref>(<var>iteratorRecord</var>, <var>promiseCapability</var>).</li><li>Let <var>result</var> be <emu-xref aoid="PerformPromiseAll" id="_ref_8175"><a href="#sec-performpromiseall">PerformPromiseAll</a></emu-xref>(<var>iteratorRecord</var>, <var>C</var>, <var>promiseCapability</var>).</li><li>If <var>result</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_8176"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, then<ol><li>If <var>iteratorRecord</var>.[[Done]] is <emu-val>false</emu-val>, set <var>result</var> to <emu-xref aoid="IteratorClose" id="_ref_8177"><a href="#sec-iteratorclose">IteratorClose</a></emu-xref>(<var>iteratorRecord</var>, <var>result</var>).</li><li><emu-xref aoid="IfAbruptRejectPromise" id="_ref_8178"><a href="#sec-ifabruptrejectpromise">IfAbruptRejectPromise</a></emu-xref>(<var>result</var>, <var>promiseCapability</var>).</li></ol></li><li>Return <emu-xref aoid="Completion" id="_ref_8179"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>result</var>).
</li></ol></emu-alg>
<p>This function is the <dfn>%Promise_all%</dfn> intrinsic object.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <code>all</code> function requires its <emu-val>this</emu-val> value to be a <emu-xref href="#constructor" id="_ref_8180"><a href="#constructor">constructor</a></emu-xref> function that supports the parameter conventions of the <code>Promise</code> <emu-xref href="#constructor" id="_ref_8181"><a href="#constructor">constructor</a></emu-xref>.</p>
</div></emu-note>
<emu-clause id="sec-performpromiseall" aoid="PerformPromiseAll">
<h1><span class="secnum">25.6.4.1.1</span>Runtime Semantics: PerformPromiseAll ( <var>iteratorRecord</var>, <var>constructor</var>, <var>resultCapability</var> )</h1>
<p>When the PerformPromiseAll abstract operation is called with arguments <var>iteratorRecord</var>, <var>constructor</var>, and <var>resultCapability</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_8182"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsConstructor" id="_ref_8183"><a href="#sec-isconstructor">IsConstructor</a></emu-xref>(<var>constructor</var>) is <emu-val>true</emu-val>.</li><li><emu-xref href="#assert" id="_ref_8184"><a href="#assert">Assert</a></emu-xref>: <var>resultCapability</var> is a PromiseCapability <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8185"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref>.</li><li>Let <var>values</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8186"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>remainingElementsCount</var> be a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8187"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Value]]: 1 }.</li><li>Let <var>index</var> be 0.</li><li>Repeat,<ol><li>Let <var>next</var> be <emu-xref aoid="IteratorStep" id="_ref_8188"><a href="#sec-iteratorstep">IteratorStep</a></emu-xref>(<var>iteratorRecord</var>).</li><li>If <var>next</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_8189"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, set <var>iteratorRecord</var>.[[Done]] to <emu-val>true</emu-val>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_8190"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>next</var>).</li><li>If <var>next</var> is <emu-val>false</emu-val>, then<ol><li>Set <var>iteratorRecord</var>.[[Done]] to <emu-val>true</emu-val>.</li><li>Set <var>remainingElementsCount</var>.[[Value]] to <var>remainingElementsCount</var>.[[Value]] - 1.</li><li>If <var>remainingElementsCount</var>.[[Value]] is 0, then<ol><li>Let <var>valuesArray</var> be <emu-xref aoid="CreateArrayFromList" id="_ref_8191"><a href="#sec-createarrayfromlist">CreateArrayFromList</a></emu-xref>(<var>values</var>).</li><li>Perform ?&nbsp;<emu-xref aoid="Call" id="_ref_8192"><a href="#sec-call">Call</a></emu-xref>(<var>resultCapability</var>.[[Resolve]], <emu-val>undefined</emu-val>, « <var>valuesArray</var> »).</li></ol></li><li>Return <var>resultCapability</var>.[[Promise]].</li></ol></li><li>Let <var>nextValue</var> be <emu-xref aoid="IteratorValue" id="_ref_8193"><a href="#sec-iteratorvalue">IteratorValue</a></emu-xref>(<var>next</var>).</li><li>If <var>nextValue</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_8194"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, set <var>iteratorRecord</var>.[[Done]] to <emu-val>true</emu-val>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_8195"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>nextValue</var>).</li><li>Append <emu-val>undefined</emu-val> to <var>values</var>.</li><li>Let <var>nextPromise</var> be ?&nbsp;<emu-xref aoid="Invoke" id="_ref_8196"><a href="#sec-invoke">Invoke</a></emu-xref>(<var>constructor</var>, <code>"resolve"</code>, « <var>nextValue</var> »).</li><li>Let <var>steps</var> be the algorithm steps defined in <emu-xref href="#sec-promise.all-resolve-element-functions" title="" id="_ref_712"><a href="#sec-promise.all-resolve-element-functions"><code>Promise.all</code> Resolve Element Functions</a></emu-xref>.</li><li>Let <var>resolveElement</var> be <emu-xref aoid="CreateBuiltinFunction" id="_ref_8197"><a href="#sec-createbuiltinfunction">CreateBuiltinFunction</a></emu-xref>(<var>steps</var>, « [[AlreadyCalled]], [[Index]], [[Values]], [[Capability]], [[RemainingElements]] »).</li><li>Set <var>resolveElement</var>.[[AlreadyCalled]] to a new <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8198"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Value]]: <emu-val>false</emu-val> }.</li><li>Set <var>resolveElement</var>.[[Index]] to <var>index</var>.</li><li>Set <var>resolveElement</var>.[[Values]] to <var>values</var>.</li><li>Set <var>resolveElement</var>.[[Capability]] to <var>resultCapability</var>.</li><li>Set <var>resolveElement</var>.[[RemainingElements]] to <var>remainingElementsCount</var>.</li><li>Set <var>remainingElementsCount</var>.[[Value]] to <var>remainingElementsCount</var>.[[Value]] + 1.</li><li>Perform ?&nbsp;<emu-xref aoid="Invoke" id="_ref_8199"><a href="#sec-invoke">Invoke</a></emu-xref>(<var>nextPromise</var>, <code>"then"</code>, « <var>resolveElement</var>, <var>resultCapability</var>.[[Reject]] »).</li><li>Increase <var>index</var> by 1.
</li></ol></li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-promise.all-resolve-element-functions">
<h1><span class="secnum">25.6.4.1.2</span><code>Promise.all</code> Resolve Element Functions</h1>
<p>A <code>Promise.all</code> resolve element function is an anonymous built-in function that is used to resolve a specific <code>Promise.all</code> element. Each <code>Promise.all</code>
resolve element function has [[Index]], [[Values]], [[Capability]],
[[RemainingElements]], and [[AlreadyCalled]] internal slots.</p>
<p>When a <code>Promise.all</code> resolve element function is called with argument <var>x</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>F</var> be the <emu-xref href="#active-function-object" id="_ref_8200"><a href="#active-function-object">active function object</a></emu-xref>.</li><li>Let <var>alreadyCalled</var> be <var>F</var>.[[AlreadyCalled]].</li><li>If <var>alreadyCalled</var>.[[Value]] is <emu-val>true</emu-val>, return <emu-val>undefined</emu-val>.</li><li>Set <var>alreadyCalled</var>.[[Value]] to <emu-val>true</emu-val>.</li><li>Let <var>index</var> be <var>F</var>.[[Index]].</li><li>Let <var>values</var> be <var>F</var>.[[Values]].</li><li>Let <var>promiseCapability</var> be <var>F</var>.[[Capability]].</li><li>Let <var>remainingElementsCount</var> be <var>F</var>.[[RemainingElements]].</li><li>Set <var>values</var>[<var>index</var>] to <var>x</var>.</li><li>Set <var>remainingElementsCount</var>.[[Value]] to <var>remainingElementsCount</var>.[[Value]] - 1.</li><li>If <var>remainingElementsCount</var>.[[Value]] is 0, then<ol><li>Let <var>valuesArray</var> be <emu-xref aoid="CreateArrayFromList" id="_ref_8201"><a href="#sec-createarrayfromlist">CreateArrayFromList</a></emu-xref>(<var>values</var>).</li><li>Return ?&nbsp;<emu-xref aoid="Call" id="_ref_8202"><a href="#sec-call">Call</a></emu-xref>(<var>promiseCapability</var>.[[Resolve]], <emu-val>undefined</emu-val>, « <var>valuesArray</var> »).</li></ol></li><li>Return <emu-val>undefined</emu-val>.
</li></ol></emu-alg>
<p>The <code>"length"</code> property of a <code>Promise.all</code> resolve element function is 1.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-promise.prototype">
<h1><span class="secnum">25.6.4.2</span>Promise.prototype</h1>
<p>The initial value of <code>Promise.prototype</code> is the intrinsic object <emu-xref href="#sec-properties-of-the-promise-prototype-object" id="_ref_8203"><a href="#sec-properties-of-the-promise-prototype-object">%PromisePrototype%</a></emu-xref>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-promise.race">
<h1><span class="secnum">25.6.4.3</span>Promise.race ( <var>iterable</var> )</h1>
<p>The <code>race</code> function returns a new promise which is
settled in the same way as the first passed promise to settle. It
resolves all elements of the passed <var>iterable</var> to promises as it runs this algorithm.</p>
<emu-alg><ol><li>Let <var>C</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_8204"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>C</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>promiseCapability</var> be ?&nbsp;<emu-xref aoid="NewPromiseCapability" id="_ref_8205"><a href="#sec-newpromisecapability">NewPromiseCapability</a></emu-xref>(<var>C</var>).</li><li>Let <var>iteratorRecord</var> be <emu-xref aoid="GetIterator" id="_ref_8206"><a href="#sec-getiterator">GetIterator</a></emu-xref>(<var>iterable</var>).</li><li><emu-xref aoid="IfAbruptRejectPromise" id="_ref_8207"><a href="#sec-ifabruptrejectpromise">IfAbruptRejectPromise</a></emu-xref>(<var>iteratorRecord</var>, <var>promiseCapability</var>).</li><li>Let <var>result</var> be <emu-xref aoid="PerformPromiseRace" id="_ref_8208"><a href="#sec-performpromiserace">PerformPromiseRace</a></emu-xref>(<var>iteratorRecord</var>, <var>C</var>, <var>promiseCapability</var>).</li><li>If <var>result</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_8209"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, then<ol><li>If <var>iteratorRecord</var>.[[Done]] is <emu-val>false</emu-val>, set <var>result</var> to <emu-xref aoid="IteratorClose" id="_ref_8210"><a href="#sec-iteratorclose">IteratorClose</a></emu-xref>(<var>iteratorRecord</var>, <var>result</var>).</li><li><emu-xref aoid="IfAbruptRejectPromise" id="_ref_8211"><a href="#sec-ifabruptrejectpromise">IfAbruptRejectPromise</a></emu-xref>(<var>result</var>, <var>promiseCapability</var>).</li></ol></li><li>Return <emu-xref aoid="Completion" id="_ref_8212"><a href="#sec-completion-record-specification-type">Completion</a></emu-xref>(<var>result</var>).
</li></ol></emu-alg>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>If the <var>iterable</var> argument is empty or if none of the promises in <var>iterable</var> ever settle then the pending promise returned by this method will never be settled.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <code>race</code> function expects its <emu-val>this</emu-val> value to be a <emu-xref href="#constructor" id="_ref_8213"><a href="#constructor">constructor</a></emu-xref> function that supports the parameter conventions of the <code>Promise</code> <emu-xref href="#constructor" id="_ref_8214"><a href="#constructor">constructor</a></emu-xref>. It also expects that its <emu-val>this</emu-val> value provides a <code>resolve</code> method.</p>
</div></emu-note>
<emu-clause id="sec-performpromiserace" aoid="PerformPromiseRace">
<h1><span class="secnum">25.6.4.3.1</span>Runtime Semantics: PerformPromiseRace ( <var>iteratorRecord</var>, <var>constructor</var>, <var>resultCapability</var> )</h1>
<p>When the PerformPromiseRace abstract operation is called with arguments <var>iteratorRecord</var>, <var>constructor</var>, and <var>resultCapability</var>, the following steps are taken:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_8215"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsConstructor" id="_ref_8216"><a href="#sec-isconstructor">IsConstructor</a></emu-xref>(<var>constructor</var>) is <emu-val>true</emu-val>.</li><li><emu-xref href="#assert" id="_ref_8217"><a href="#assert">Assert</a></emu-xref>: <var>resultCapability</var> is a PromiseCapability <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8218"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref>.</li><li>Repeat,<ol><li>Let <var>next</var> be <emu-xref aoid="IteratorStep" id="_ref_8219"><a href="#sec-iteratorstep">IteratorStep</a></emu-xref>(<var>iteratorRecord</var>).</li><li>If <var>next</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_8220"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, set <var>iteratorRecord</var>.[[Done]] to <emu-val>true</emu-val>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_8221"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>next</var>).</li><li>If <var>next</var> is <emu-val>false</emu-val>, then<ol><li>Set <var>iteratorRecord</var>.[[Done]] to <emu-val>true</emu-val>.</li><li>Return <var>resultCapability</var>.[[Promise]].</li></ol></li><li>Let <var>nextValue</var> be <emu-xref aoid="IteratorValue" id="_ref_8222"><a href="#sec-iteratorvalue">IteratorValue</a></emu-xref>(<var>next</var>).</li><li>If <var>nextValue</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_8223"><a href="#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, set <var>iteratorRecord</var>.[[Done]] to <emu-val>true</emu-val>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_8224"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>nextValue</var>).</li><li>Let <var>nextPromise</var> be ?&nbsp;<emu-xref aoid="Invoke" id="_ref_8225"><a href="#sec-invoke">Invoke</a></emu-xref>(<var>constructor</var>, <code>"resolve"</code>, « <var>nextValue</var> »).</li><li>Perform ?&nbsp;<emu-xref aoid="Invoke" id="_ref_8226"><a href="#sec-invoke">Invoke</a></emu-xref>(<var>nextPromise</var>, <code>"then"</code>, « <var>resultCapability</var>.[[Resolve]], <var>resultCapability</var>.[[Reject]] »).
</li></ol></li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-promise.reject">
<h1><span class="secnum">25.6.4.4</span>Promise.reject ( <var>r</var> )</h1>
<p>The <code>reject</code> function returns a new promise rejected with the passed argument.</p>
<emu-alg><ol><li>Let <var>C</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_8227"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>C</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>promiseCapability</var> be ?&nbsp;<emu-xref aoid="NewPromiseCapability" id="_ref_8228"><a href="#sec-newpromisecapability">NewPromiseCapability</a></emu-xref>(<var>C</var>).</li><li>Perform ?&nbsp;<emu-xref aoid="Call" id="_ref_8229"><a href="#sec-call">Call</a></emu-xref>(<var>promiseCapability</var>.[[Reject]], <emu-val>undefined</emu-val>, « <var>r</var> »).</li><li>Return <var>promiseCapability</var>.[[Promise]].
</li></ol></emu-alg>
<p>This function is the <dfn>%Promise_reject%</dfn> intrinsic object.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <code>reject</code> function expects its <emu-val>this</emu-val> value to be a <emu-xref href="#constructor" id="_ref_8230"><a href="#constructor">constructor</a></emu-xref> function that supports the parameter conventions of the <code>Promise</code> <emu-xref href="#constructor" id="_ref_8231"><a href="#constructor">constructor</a></emu-xref>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-promise.resolve">
<h1><span class="secnum">25.6.4.5</span>Promise.resolve ( <var>x</var> )</h1>
<p>The <code>resolve</code> function returns either a new
promise resolved with the passed argument, or the argument itself if the
argument is a promise produced by this <emu-xref href="#constructor" id="_ref_8232"><a href="#constructor">constructor</a></emu-xref>.</p>
<emu-alg><ol><li>Let <var>C</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_8233"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>C</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return ?&nbsp;<emu-xref aoid="PromiseResolve" id="_ref_8234"><a href="#sec-promise-resolve">PromiseResolve</a></emu-xref>(<var>C</var>, <var>x</var>).
</li></ol></emu-alg>
<p>This function is the <dfn>%Promise_resolve%</dfn> intrinsic object.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <code>resolve</code> function expects its <emu-val>this</emu-val> value to be a <emu-xref href="#constructor" id="_ref_8235"><a href="#constructor">constructor</a></emu-xref> function that supports the parameter conventions of the <code>Promise</code> <emu-xref href="#constructor" id="_ref_8236"><a href="#constructor">constructor</a></emu-xref>.</p>
</div></emu-note>
<emu-clause id="sec-promise-resolve" aoid="PromiseResolve">
<h1><span class="secnum">25.6.4.5.1</span>PromiseResolve ( <var>C</var>, <var>x</var> )</h1>
<p>The abstract operation PromiseResolve, given a <emu-xref href="#constructor" id="_ref_8237"><a href="#constructor">constructor</a></emu-xref> and a value, returns a new promise resolved with that value.</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_8238"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="Type" id="_ref_8239"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>C</var>) is Object.</li><li>If <emu-xref aoid="IsPromise" id="_ref_8240"><a href="#sec-ispromise">IsPromise</a></emu-xref>(<var>x</var>) is <emu-val>true</emu-val>, then<ol><li>Let <var>xConstructor</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_8241"><a href="#sec-get-o-p">Get</a></emu-xref>(<var>x</var>, <code>"constructor"</code>).</li><li>If <emu-xref aoid="SameValue" id="_ref_8242"><a href="#sec-samevalue">SameValue</a></emu-xref>(<var>xConstructor</var>, <var>C</var>) is <emu-val>true</emu-val>, return <var>x</var>.</li></ol></li><li>Let <var>promiseCapability</var> be ?&nbsp;<emu-xref aoid="NewPromiseCapability" id="_ref_8243"><a href="#sec-newpromisecapability">NewPromiseCapability</a></emu-xref>(<var>C</var>).</li><li>Perform ?&nbsp;<emu-xref aoid="Call" id="_ref_8244"><a href="#sec-call">Call</a></emu-xref>(<var>promiseCapability</var>.[[Resolve]], <emu-val>undefined</emu-val>, « <var>x</var> »).</li><li>Return <var>promiseCapability</var>.[[Promise]].
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-get-promise-@@species">
<h1><span class="secnum">25.6.4.6</span>get Promise [ @@species ]</h1>
<p><code>Promise[@@species]</code> is an <emu-xref href="#sec-object-type" id="_ref_8245"><a href="#sec-object-type">accessor property</a></emu-xref> whose set accessor function is <emu-val>undefined</emu-val>. Its get accessor function performs the following steps:</p>
<emu-alg><ol><li>Return the <emu-val>this</emu-val> value.
</li></ol></emu-alg>
<p>The value of the <code>name</code> property of this function is <code>"get [Symbol.species]"</code>.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Promise prototype methods normally use their <code>this</code> object's <emu-xref href="#constructor" id="_ref_8246"><a href="#constructor">constructor</a></emu-xref> to create a derived object. However, a subclass <emu-xref href="#constructor" id="_ref_8247"><a href="#constructor">constructor</a></emu-xref> may over-ride that default behaviour by redefining its @@species property.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-promise-prototype-object">
<h1><span class="secnum">25.6.5</span>Properties of the Promise Prototype Object</h1>
<p>The Promise prototype object:</p>
<ul>
<li>is the intrinsic object <dfn>%PromisePrototype%</dfn>.</li>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_8248"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>.</li>
<li>is an ordinary object.</li>
<li>does not have a [[PromiseState]] internal slot or any of the other internal slots of Promise instances.</li>
</ul>
<emu-clause id="sec-promise.prototype.catch">
<h1><span class="secnum">25.6.5.1</span>Promise.prototype.catch ( <var>onRejected</var> )</h1>
<p>When the <code>catch</code> method is called with argument <var>onRejected</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>promise</var> be the <emu-val>this</emu-val> value.</li><li>Return ?&nbsp;<emu-xref aoid="Invoke" id="_ref_8249"><a href="#sec-invoke">Invoke</a></emu-xref>(<var>promise</var>, <code>"then"</code>, « <emu-val>undefined</emu-val>, <var>onRejected</var> »).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-promise.prototype.constructor">
<h1><span class="secnum">25.6.5.2</span>Promise.prototype.constructor</h1>
<p>The initial value of <code>Promise.prototype.constructor</code> is the intrinsic object <emu-xref href="#sec-promise-constructor" id="_ref_8250"><a href="#sec-promise-constructor">%Promise%</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-promise.prototype.finally">
<h1><span class="secnum">25.6.5.3</span>Promise.prototype.finally ( <var>onFinally</var> )</h1>
<p>When the <code>finally</code> method is called with argument <var>onFinally</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>promise</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_8251"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>promise</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>C</var> be ?&nbsp;<emu-xref aoid="SpeciesConstructor" id="_ref_8252"><a href="#sec-speciesconstructor">SpeciesConstructor</a></emu-xref>(<var>promise</var>, <emu-xref href="#sec-promise-constructor" id="_ref_8253"><a href="#sec-promise-constructor">%Promise%</a></emu-xref>).</li><li><emu-xref href="#assert" id="_ref_8254"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsConstructor" id="_ref_8255"><a href="#sec-isconstructor">IsConstructor</a></emu-xref>(<var>C</var>) is <emu-val>true</emu-val>.</li><li>If <emu-xref aoid="IsCallable" id="_ref_8256"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>onFinally</var>) is <emu-val>false</emu-val>, then<ol><li>Let <var>thenFinally</var> be <var>onFinally</var>.</li><li>Let <var>catchFinally</var> be <var>onFinally</var>.</li></ol></li><li>Else,<ol><li>Let <var>stepsThenFinally</var> be the algorithm steps defined in <emu-xref href="#sec-thenfinallyfunctions" title="" id="_ref_713"><a href="#sec-thenfinallyfunctions">Then Finally Functions</a></emu-xref>.</li><li>Let <var>thenFinally</var> be <emu-xref aoid="CreateBuiltinFunction" id="_ref_8257"><a href="#sec-createbuiltinfunction">CreateBuiltinFunction</a></emu-xref>(<var>stepsThenFinally</var>, « [[Constructor]], [[OnFinally]] »).</li><li>Set <var>thenFinally</var>.[[Constructor]] to <var>C</var>.</li><li>Set <var>thenFinally</var>.[[OnFinally]] to <var>onFinally</var>.</li><li>Let <var>stepsCatchFinally</var> be the algorithm steps defined in <emu-xref href="#sec-catchfinallyfunctions" title="" id="_ref_714"><a href="#sec-catchfinallyfunctions">Catch Finally Functions</a></emu-xref>.</li><li>Let <var>catchFinally</var> be <emu-xref aoid="CreateBuiltinFunction" id="_ref_8258"><a href="#sec-createbuiltinfunction">CreateBuiltinFunction</a></emu-xref>(<var>stepsCatchFinally</var>, « [[Constructor]], [[OnFinally]] »).</li><li>Set <var>catchFinally</var>.[[Constructor]] to <var>C</var>.</li><li>Set <var>catchFinally</var>.[[OnFinally]] to <var>onFinally</var>.</li></ol></li><li>Return ?&nbsp;<emu-xref aoid="Invoke" id="_ref_8259"><a href="#sec-invoke">Invoke</a></emu-xref>(<var>promise</var>, <code>"then"</code>, « <var>thenFinally</var>, <var>catchFinally</var> »).
</li></ol></emu-alg>
<emu-clause id="sec-thenfinallyfunctions">
<h1><span class="secnum">25.6.5.3.1</span>Then Finally Functions</h1>
<p>A Then Finally function is an anonymous built-in function
that has a [[Constructor]] and an [[OnFinally]] internal slot. The value
of the [[Constructor]] internal slot is a <code>Promise</code>-like <emu-xref href="#constructor" id="_ref_8260"><a href="#constructor">constructor</a></emu-xref> <emu-xref href="#function-object" id="_ref_8261"><a href="#function-object">function object</a></emu-xref>, and the value of the [[OnFinally]] internal slot is a <emu-xref href="#function-object" id="_ref_8262"><a href="#function-object">function object</a></emu-xref>.</p>
<p>When a Then Finally function is called with argument <var>value</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>F</var> be the <emu-xref href="#active-function-object" id="_ref_8263"><a href="#active-function-object">active function object</a></emu-xref>.</li><li>Let <var>onFinally</var> be <var>F</var>.[[OnFinally]].</li><li><emu-xref href="#assert" id="_ref_8264"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsCallable" id="_ref_8265"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>onFinally</var>) is <emu-val>true</emu-val>.</li><li>Let <var>result</var> be ?&nbsp;<emu-xref aoid="Call" id="_ref_8266"><a href="#sec-call">Call</a></emu-xref>(<var>onFinally</var>, <emu-val>undefined</emu-val>).</li><li>Let <var>C</var> be <var>F</var>.[[Constructor]].</li><li><emu-xref href="#assert" id="_ref_8267"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsConstructor" id="_ref_8268"><a href="#sec-isconstructor">IsConstructor</a></emu-xref>(<var>C</var>) is <emu-val>true</emu-val>.</li><li>Let <var>promise</var> be ?&nbsp;<emu-xref aoid="PromiseResolve" id="_ref_8269"><a href="#sec-promise-resolve">PromiseResolve</a></emu-xref>(<var>C</var>, <var>result</var>).</li><li>Let <var>valueThunk</var> be equivalent to a function that returns <var>value</var>.</li><li>Return ?&nbsp;<emu-xref aoid="Invoke" id="_ref_8270"><a href="#sec-invoke">Invoke</a></emu-xref>(<var>promise</var>, <code>"then"</code>, « <var>valueThunk</var> »).
</li></ol></emu-alg>
<p>The <code>"length"</code> property of a Then Finally function is <emu-val>1</emu-val>.</p>
</emu-clause>
<emu-clause id="sec-catchfinallyfunctions">
<h1><span class="secnum">25.6.5.3.2</span>Catch Finally Functions</h1>
<p>A Catch Finally function is an anonymous built-in function
that has a [[Constructor]] and an [[OnFinally]] internal slot. The value
of the [[Constructor]] internal slot is a <code>Promise</code>-like <emu-xref href="#constructor" id="_ref_8271"><a href="#constructor">constructor</a></emu-xref> <emu-xref href="#function-object" id="_ref_8272"><a href="#function-object">function object</a></emu-xref>, and the value of the [[OnFinally]] internal slot is a <emu-xref href="#function-object" id="_ref_8273"><a href="#function-object">function object</a></emu-xref>.</p>
<p>When a Catch Finally function is called with argument <var>reason</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>F</var> be the <emu-xref href="#active-function-object" id="_ref_8274"><a href="#active-function-object">active function object</a></emu-xref>.</li><li>Let <var>onFinally</var> be <var>F</var>.[[OnFinally]].</li><li><emu-xref href="#assert" id="_ref_8275"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsCallable" id="_ref_8276"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>onFinally</var>) is <emu-val>true</emu-val>.</li><li>Let <var>result</var> be ?&nbsp;<emu-xref aoid="Call" id="_ref_8277"><a href="#sec-call">Call</a></emu-xref>(<var>onFinally</var>, <emu-val>undefined</emu-val>).</li><li>Let <var>C</var> be <var>F</var>.[[Constructor]].</li><li><emu-xref href="#assert" id="_ref_8278"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsConstructor" id="_ref_8279"><a href="#sec-isconstructor">IsConstructor</a></emu-xref>(<var>C</var>) is <emu-val>true</emu-val>.</li><li>Let <var>promise</var> be ?&nbsp;<emu-xref aoid="PromiseResolve" id="_ref_8280"><a href="#sec-promise-resolve">PromiseResolve</a></emu-xref>(<var>C</var>, <var>result</var>).</li><li>Let <var>thrower</var> be equivalent to a function that throws <var>reason</var>.</li><li>Return ?&nbsp;<emu-xref aoid="Invoke" id="_ref_8281"><a href="#sec-invoke">Invoke</a></emu-xref>(<var>promise</var>, <code>"then"</code>, « <var>thrower</var> »).
</li></ol></emu-alg>
<p>The <code>"length"</code> property of a Catch Finally function is <emu-val>1</emu-val>.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-promise.prototype.then">
<h1><span class="secnum">25.6.5.4</span>Promise.prototype.then ( <var>onFulfilled</var>, <var>onRejected</var> )</h1>
<p>When the <code>then</code> method is called with arguments <var>onFulfilled</var> and <var>onRejected</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>promise</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="IsPromise" id="_ref_8282"><a href="#sec-ispromise">IsPromise</a></emu-xref>(<var>promise</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>C</var> be ?&nbsp;<emu-xref aoid="SpeciesConstructor" id="_ref_8283"><a href="#sec-speciesconstructor">SpeciesConstructor</a></emu-xref>(<var>promise</var>, <emu-xref href="#sec-promise-constructor" id="_ref_8284"><a href="#sec-promise-constructor">%Promise%</a></emu-xref>).</li><li>Let <var>resultCapability</var> be ?&nbsp;<emu-xref aoid="NewPromiseCapability" id="_ref_8285"><a href="#sec-newpromisecapability">NewPromiseCapability</a></emu-xref>(<var>C</var>).</li><li>Return <emu-xref aoid="PerformPromiseThen" id="_ref_8286"><a href="#sec-performpromisethen">PerformPromiseThen</a></emu-xref>(<var>promise</var>, <var>onFulfilled</var>, <var>onRejected</var>, <var>resultCapability</var>).
</li></ol></emu-alg>
<p>This function is the <dfn>%PromiseProto_then%</dfn> intrinsic object.</p>
<emu-clause id="sec-performpromisethen" aoid="PerformPromiseThen">
<h1><span class="secnum">25.6.5.4.1</span>PerformPromiseThen ( <var>promise</var>, <var>onFulfilled</var>, <var>onRejected</var> [ , <var>resultCapability</var> ] )</h1>
<p>The abstract operation PerformPromiseThen performs the “then” operation on <var>promise</var> using <var>onFulfilled</var> and <var>onRejected</var> as its settlement actions. If <var>resultCapability</var> is passed, the result is stored by updating <var>resultCapability</var>'s
promise. (If it is not passed, then PerformPromiseThen is being called
by a specification-internal operation where the result does not matter.)</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_8287"><a href="#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPromise" id="_ref_8288"><a href="#sec-ispromise">IsPromise</a></emu-xref>(<var>promise</var>) is <emu-val>true</emu-val>.</li><li>If <var>resultCapability</var> is present, then<ol><li><emu-xref href="#assert" id="_ref_8289"><a href="#assert">Assert</a></emu-xref>: <var>resultCapability</var> is a PromiseCapability <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8290"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref>.</li></ol></li><li>Else,<ol><li>Set <var>resultCapability</var> to <emu-val>undefined</emu-val>.</li></ol></li><li>If <emu-xref aoid="IsCallable" id="_ref_8291"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>onFulfilled</var>) is <emu-val>false</emu-val>, then<ol><li>Set <var>onFulfilled</var> to <emu-val>undefined</emu-val>.</li></ol></li><li>If <emu-xref aoid="IsCallable" id="_ref_8292"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>onRejected</var>) is <emu-val>false</emu-val>, then<ol><li>Set <var>onRejected</var> to <emu-val>undefined</emu-val>.</li></ol></li><li>Let <var>fulfillReaction</var> be the PromiseReaction { [[Capability]]: <var>resultCapability</var>, [[Type]]: <code>"Fulfill"</code>, [[Handler]]: <var>onFulfilled</var> }.</li><li>Let <var>rejectReaction</var> be the PromiseReaction { [[Capability]]: <var>resultCapability</var>, [[Type]]: <code>"Reject"</code>, [[Handler]]: <var>onRejected</var> }.</li><li>If <var>promise</var>.[[PromiseState]] is <code>"pending"</code>, then<ol><li>Append <var>fulfillReaction</var> as the last element of the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8293"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> that is <var>promise</var>.[[PromiseFulfillReactions]].</li><li>Append <var>rejectReaction</var> as the last element of the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8294"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> that is <var>promise</var>.[[PromiseRejectReactions]].</li></ol></li><li>Else if <var>promise</var>.[[PromiseState]] is <code>"fulfilled"</code>, then<ol><li>Let <var>value</var> be <var>promise</var>.[[PromiseResult]].</li><li>Perform <emu-xref aoid="EnqueueJob" id="_ref_8295"><a href="#sec-enqueuejob">EnqueueJob</a></emu-xref>(<code>"PromiseJobs"</code>, <emu-xref aoid="PromiseReactionJob" id="_ref_8296"><a href="#sec-promisereactionjob">PromiseReactionJob</a></emu-xref>, « <var>fulfillReaction</var>, <var>value</var> »).</li></ol></li><li>Else,<ol><li><emu-xref href="#assert" id="_ref_8297"><a href="#assert">Assert</a></emu-xref>: The value of <var>promise</var>.[[PromiseState]] is <code>"rejected"</code>.</li><li>Let <var>reason</var> be <var>promise</var>.[[PromiseResult]].</li><li>If <var>promise</var>.[[PromiseIsHandled]] is <emu-val>false</emu-val>, perform <emu-xref aoid="HostPromiseRejectionTracker" id="_ref_8298"><a href="#sec-host-promise-rejection-tracker">HostPromiseRejectionTracker</a></emu-xref>(<var>promise</var>, <code>"handle"</code>).</li><li>Perform <emu-xref aoid="EnqueueJob" id="_ref_8299"><a href="#sec-enqueuejob">EnqueueJob</a></emu-xref>(<code>"PromiseJobs"</code>, <emu-xref aoid="PromiseReactionJob" id="_ref_8300"><a href="#sec-promisereactionjob">PromiseReactionJob</a></emu-xref>, « <var>rejectReaction</var>, <var>reason</var> »).</li></ol></li><li>Set <var>promise</var>.[[PromiseIsHandled]] to <emu-val>true</emu-val>.</li><li>If <var>resultCapability</var> is <emu-val>undefined</emu-val>, then<ol><li>Return <emu-val>undefined</emu-val>.</li></ol></li><li>Else,<ol><li>Return <var>resultCapability</var>.[[Promise]].
</li></ol></li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-promise.prototype-@@tostringtag">
<h1><span class="secnum">25.6.5.5</span>Promise.prototype [ @@toStringTag ]</h1>
<p>The initial value of the @@toStringTag property is the String value <code>"Promise"</code>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-promise-instances">
<h1><span class="secnum">25.6.6</span>Properties of Promise Instances</h1>
<p>Promise instances are ordinary objects that inherit properties from the Promise prototype object (the intrinsic, <emu-xref href="#sec-properties-of-the-promise-prototype-object" id="_ref_8301"><a href="#sec-properties-of-the-promise-prototype-object">%PromisePrototype%</a></emu-xref>). Promise instances are initially created with the internal slots described in <emu-xref href="#table-59" id="_ref_715"><a href="#table-59">Table 76</a></emu-xref>.</p>
<emu-table id="table-59" caption="Internal Slots of Promise Instances"><figure><figcaption>Table 76: Internal Slots of Promise Instances</figcaption>
<table>
<tbody>
<tr>
<th>
Internal Slot
</th>
<th>
Description
</th>
</tr>
<tr>
<td>
[[PromiseState]]
</td>
<td>
A String value that governs how a promise will react to incoming calls to its <code>then</code> method. The possible values are: <code>"pending"</code>, <code>"fulfilled"</code>, and <code>"rejected"</code>.
</td>
</tr>
<tr>
<td>
[[PromiseResult]]
</td>
<td>
The value with which the promise has been fulfilled or
rejected, if any. Only meaningful if [[PromiseState]] is not <code>"pending"</code>.
</td>
</tr>
<tr>
<td>
[[PromiseFulfillReactions]]
</td>
<td>
A <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8302"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of PromiseReaction records to be processed when/if the promise transitions from the <code>"pending"</code> state to the <code>"fulfilled"</code> state.
</td>
</tr>
<tr>
<td>
[[PromiseRejectReactions]]
</td>
<td>
A <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8303"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of PromiseReaction records to be processed when/if the promise transitions from the <code>"pending"</code> state to the <code>"rejected"</code> state.
</td>
</tr>
<tr>
<td>
[[PromiseIsHandled]]
</td>
<td>
A boolean indicating whether the promise has ever had a
fulfillment or rejection handler; used in unhandled rejection tracking.
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
</emu-clause>
</emu-clause>
<emu-clause id="sec-async-function-objects">
<h1><span class="secnum">25.7</span>AsyncFunction Objects</h1>
<p>AsyncFunction objects are functions that are usually created by evaluating <emu-nt id="_ref_14814"><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a></emu-nt>s, <emu-nt id="_ref_14815"><a href="#prod-AsyncFunctionExpression">AsyncFunctionExpression</a></emu-nt>s, <emu-nt id="_ref_14816"><a href="#prod-AsyncMethod">AsyncMethod</a></emu-nt>s, and <emu-nt id="_ref_14817"><a href="#prod-AsyncArrowFunction">AsyncArrowFunction</a></emu-nt>s. They may also be created by calling the <emu-xref href="#sec-async-function-constructor" id="_ref_8304"><a href="#sec-async-function-constructor">%AsyncFunction%</a></emu-xref> intrinsic.</p>
<emu-clause id="sec-async-function-constructor">
<h1><span class="secnum">25.7.1</span>The AsyncFunction Constructor</h1>
<p>The AsyncFunction <emu-xref href="#constructor" id="_ref_8305"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>is the intrinsic object <dfn>%AsyncFunction%</dfn>.</li>
<li>is a subclass of <code>Function</code>.</li>
<li>creates and initializes a new AsyncFunction object when called as a function rather than as a <emu-xref href="#constructor" id="_ref_8306"><a href="#constructor">constructor</a></emu-xref>. Thus the function call <code>AsyncFunction(…)</code> is equivalent to the object creation expression <code>new AsyncFunction(…)</code> with the same arguments.</li>
<li>is designed to be subclassable. It may be used as the value of an <code>extends</code>
clause of a class definition. Subclass constructors that intend to
inherit the specified AsyncFunction behaviour must include a <code>super</code> call to the <code>AsyncFunction</code> <emu-xref href="#constructor" id="_ref_8307"><a href="#constructor">constructor</a></emu-xref> to create and initialize a subclass instance with the internal slots necessary for built-in async function behaviour.</li>
</ul>
<emu-clause id="sec-async-function-constructor-arguments">
<h1><span class="secnum">25.7.1.1</span>AsyncFunction ( <var>p1</var>, <var>p2</var>, … , <var>pn</var>, <var>body</var> )</h1>
<p>The last argument specifies the body (executable code) of an async function. Any preceding arguments specify formal parameters.</p>
<p>When the <code>AsyncFunction</code> function is called with some arguments <var>p1</var>, <var>p2</var>, …, <var>pn</var>, <var>body</var> (where <var>n</var> might be 0, that is, there are no <var>p</var> arguments, and where <var>body</var> might also not be provided), the following steps are taken:</p>
<emu-alg><ol><li>Let <var>C</var> be the <emu-xref href="#active-function-object" id="_ref_8308"><a href="#active-function-object">active function object</a></emu-xref>.</li><li>Let <var>args</var> be the <var>argumentsList</var> that was passed to this function by [[Call]] or [[Construct]].</li><li>Return <emu-xref aoid="CreateDynamicFunction" id="_ref_8309"><a href="#sec-createdynamicfunction">CreateDynamicFunction</a></emu-xref>(<var>C</var>, NewTarget, <code>"async"</code>, <var>args</var>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">See NOTE for <emu-xref href="#sec-function-p1-p2-pn-body" id="_ref_716"><a href="#sec-function-p1-p2-pn-body">19.2.1.1</a></emu-xref>.</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-async-function-constructor-properties">
<h1><span class="secnum">25.7.2</span>Properties of the AsyncFunction Constructor</h1>
<p>The AsyncFunction <emu-xref href="#constructor" id="_ref_8310"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>is a standard built-in <emu-xref href="#function-object" id="_ref_8311"><a href="#function-object">function object</a></emu-xref> that inherits from the <code>Function</code> <emu-xref href="#constructor" id="_ref_8312"><a href="#constructor">constructor</a></emu-xref>.</li>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-function-constructor" id="_ref_8313"><a href="#sec-function-constructor">%Function%</a></emu-xref>.</li>
<li>has a <code>name</code> property whose value is <code>"AsyncFunction"</code>.</li>
<li>has the following properties:</li>
</ul>
<emu-clause id="sec-async-function-constructor-length">
<h1><span class="secnum">25.7.2.1</span>AsyncFunction.length</h1>
<p>This is a <emu-xref href="#sec-object-type" id="_ref_8314"><a href="#sec-object-type">data property</a></emu-xref> with a value of 1. This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-async-function-constructor-prototype">
<h1><span class="secnum">25.7.2.2</span>AsyncFunction.prototype</h1>
<p>The initial value of <code>AsyncFunction.prototype</code> is the intrinsic object <emu-xref href="#sec-async-function-prototype-properties" id="_ref_8315"><a href="#sec-async-function-prototype-properties">%AsyncFunctionPrototype%</a></emu-xref>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-async-function-prototype-properties">
<h1><span class="secnum">25.7.3</span>Properties of the AsyncFunction Prototype Object</h1>
<p>The AsyncFunction prototype object:</p>
<ul>
<li>is an ordinary object.</li>
<li>is not a <emu-xref href="#function-object" id="_ref_8316"><a href="#function-object">function object</a></emu-xref> and does not have an [[ECMAScriptCode]] internal slot or any other of the internal slots listed in <emu-xref href="#table-27" id="_ref_717"><a href="#table-27">Table 27</a></emu-xref>.</li>
<li>is the value of the <code>prototype</code> property of the intrinsic object <emu-xref href="#sec-async-function-constructor" id="_ref_8317"><a href="#sec-async-function-constructor">%AsyncFunction%</a></emu-xref>.</li>
<li>is the intrinsic object <dfn>%AsyncFunctionPrototype%</dfn>.</li>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_8318"><a href="#sec-properties-of-the-function-prototype-object">%FunctionPrototype%</a></emu-xref>.</li>
</ul>
<emu-clause id="sec-async-function-prototype-properties-constructor">
<h1><span class="secnum">25.7.3.1</span>AsyncFunction.prototype.constructor</h1>
<p>The initial value of <code>AsyncFunction.prototype.constructor</code> is the intrinsic object <emu-xref href="#sec-async-function-constructor" id="_ref_8319"><a href="#sec-async-function-constructor">%AsyncFunction%</a></emu-xref></p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
<emu-clause id="sec-async-function-prototype-properties-toStringTag">
<h1><span class="secnum">25.7.3.2</span>AsyncFunction.prototype [ @@toStringTag ]</h1>
<p>The initial value of the @@toStringTag property is the string value <code>"AsyncFunction"</code>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-async-function-instances">
<h1><span class="secnum">25.7.4</span>AsyncFunction Instances</h1>
<p>Every AsyncFunction instance is an ECMAScript <emu-xref href="#function-object" id="_ref_8320"><a href="#function-object">function object</a></emu-xref> and has the internal slots listed in <emu-xref href="#table-27" id="_ref_718"><a href="#table-27">Table 27</a></emu-xref>. The value of the [[FunctionKind]] internal slot for all such instances is <code>"async"</code>.
AsyncFunction instances are not constructors and do not have a
[[Construct]] internal method. AsyncFunction instances do not have a
prototype property as they are not constructable.</p>
<p>Each AsyncFunction instance has the following own properties:</p>
<emu-clause id="sec-async-function-instances-length">
<h1><span class="secnum">25.7.4.1</span>length</h1>
<p>The specification for the <code>"length"</code> property of Function instances given in <emu-xref href="#sec-function-instances-length" id="_ref_719"><a href="#sec-function-instances-length">19.2.4.1</a></emu-xref> also applies to AsyncFunction instances.</p>
</emu-clause>
<emu-clause id="sec-async-function-instances-name">
<h1><span class="secnum">25.7.4.2</span>name</h1>
<p>The specification for the <code>name</code> property of Function instances given in <emu-xref href="#sec-function-instances-name" id="_ref_720"><a href="#sec-function-instances-name">19.2.4.2</a></emu-xref> also applies to AsyncFunction instances.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-async-functions-abstract-operations">
<h1><span class="secnum">25.7.5</span>Async Functions Abstract Operations</h1>
<emu-clause id="sec-async-functions-abstract-operations-async-function-start" aoid="AsyncFunctionStart">
<h1><span class="secnum">25.7.5.1</span>AsyncFunctionStart ( <var>promiseCapability</var>, <var>asyncFunctionBody</var> )</h1>
<emu-alg><ol><li>Let <var>runningContext</var> be the <emu-xref href="#running-execution-context" id="_ref_8321"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Let <var>asyncContext</var> be a copy of <var>runningContext</var>.</li><li>Set the code evaluation state of <var>asyncContext</var> such that when evaluation is resumed for that <emu-xref href="#sec-execution-contexts" id="_ref_8322"><a href="#sec-execution-contexts">execution context</a></emu-xref> the following steps will be performed:<ol><li>Let <var>result</var> be the result of evaluating <var>asyncFunctionBody</var>.</li><li><emu-xref href="#assert" id="_ref_8323"><a href="#assert">Assert</a></emu-xref>:
If we return here, the async function either threw an exception or
performed an implicit or explicit return; all awaiting is done.</li><li>Remove <var>asyncContext</var> from the <emu-xref href="#execution-context-stack" id="_ref_8324"><a href="#execution-context-stack">execution context stack</a></emu-xref> and restore the <emu-xref href="#sec-execution-contexts" id="_ref_8325"><a href="#sec-execution-contexts">execution context</a></emu-xref> that is at the top of the <emu-xref href="#execution-context-stack" id="_ref_8326"><a href="#execution-context-stack">execution context stack</a></emu-xref> as the <emu-xref href="#running-execution-context" id="_ref_8327"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>If <var>result</var>.[[Type]] is <emu-const>normal</emu-const>, then<ol><li>Perform !&nbsp;<emu-xref aoid="Call" id="_ref_8328"><a href="#sec-call">Call</a></emu-xref>(<var>promiseCapability</var>.[[Resolve]], <emu-val>undefined</emu-val>, « <emu-val>undefined</emu-val> »).</li></ol></li><li>Else if <var>result</var>.[[Type]] is <emu-const>return</emu-const>, then<ol><li>Perform !&nbsp;<emu-xref aoid="Call" id="_ref_8329"><a href="#sec-call">Call</a></emu-xref>(<var>promiseCapability</var>.[[Resolve]], <emu-val>undefined</emu-val>, « <var>result</var>.[[Value]] »).</li></ol></li><li>Else,<ol><li><emu-xref href="#assert" id="_ref_8330"><a href="#assert">Assert</a></emu-xref>: <var>result</var>.[[Type]] is <emu-const>throw</emu-const>.</li><li>Perform !&nbsp;<emu-xref aoid="Call" id="_ref_8331"><a href="#sec-call">Call</a></emu-xref>(<var>promiseCapability</var>.[[Reject]], <emu-val>undefined</emu-val>, « <var>result</var>.[[Value]] »).</li></ol></li><li>Return.</li></ol></li><li>Push <var>asyncContext</var> onto the <emu-xref href="#execution-context-stack" id="_ref_8332"><a href="#execution-context-stack">execution context stack</a></emu-xref>; <var>asyncContext</var> is now the <emu-xref href="#running-execution-context" id="_ref_8333"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li>Resume the suspended evaluation of <var>asyncContext</var>. Let <var>result</var> be the value returned by the resumed computation.</li><li><emu-xref href="#assert" id="_ref_8334"><a href="#assert">Assert</a></emu-xref>: When we return here, <var>asyncContext</var> has already been removed from the <emu-xref href="#execution-context-stack" id="_ref_8335"><a href="#execution-context-stack">execution context stack</a></emu-xref> and <var>runningContext</var> is the currently <emu-xref href="#running-execution-context" id="_ref_8336"><a href="#running-execution-context">running execution context</a></emu-xref>.</li><li><emu-xref href="#assert" id="_ref_8337"><a href="#assert">Assert</a></emu-xref>: <var>result</var> is a normal completion with a value of <emu-val>undefined</emu-val>. The possible sources of completion values are <emu-xref aoid="Await" id="_ref_8338"><a href="#await">Await</a></emu-xref> or, if the async function doesn't await anything, the step 3.g above.</li><li>Return.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-reflection">
<h1><span class="secnum">26</span>Reflection</h1>
<emu-clause id="sec-reflect-object">
<h1><span class="secnum">26.1</span>The Reflect Object</h1>
<p>The Reflect object:</p>
<ul>
<li>is the intrinsic object <dfn>%Reflect%</dfn>.</li>
<li>is the initial value of the <code>Reflect</code> property of the <emu-xref href="#sec-global-object" id="_ref_8339"><a href="#sec-global-object">global object</a></emu-xref>.</li>
<li>is an ordinary object.</li>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_8340"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>.</li>
<li>is not a <emu-xref href="#function-object" id="_ref_8341"><a href="#function-object">function object</a></emu-xref>.</li>
<li>does not have a [[Construct]] internal method; it cannot be used as a <emu-xref href="#constructor" id="_ref_8342"><a href="#constructor">constructor</a></emu-xref> with the <code>new</code> operator.</li>
<li>does not have a [[Call]] internal method; it cannot be invoked as a function.</li>
</ul>
<emu-clause id="sec-reflect.apply">
<h1><span class="secnum">26.1.1</span>Reflect.apply ( <var>target</var>, <var>thisArgument</var>, <var>argumentsList</var> )</h1>
<p>When the <code>apply</code> function is called with arguments <var>target</var>, <var>thisArgument</var>, and <var>argumentsList</var>, the following steps are taken:</p>
<emu-alg><ol><li>If <emu-xref aoid="IsCallable" id="_ref_8343"><a href="#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>Let <var>args</var> be ?&nbsp;<emu-xref aoid="CreateListFromArrayLike" id="_ref_8344"><a href="#sec-createlistfromarraylike">CreateListFromArrayLike</a></emu-xref>(<var>argumentsList</var>).</li><li>Perform <emu-xref aoid="PrepareForTailCall" id="_ref_8345"><a href="#sec-preparefortailcall">PrepareForTailCall</a></emu-xref>().</li><li>Return ?&nbsp;<emu-xref aoid="Call" id="_ref_8346"><a href="#sec-call">Call</a></emu-xref>(<var>target</var>, <var>thisArgument</var>, <var>args</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-reflect.construct">
<h1><span class="secnum">26.1.2</span>Reflect.construct ( <var>target</var>, <var>argumentsList</var> [ , <var>newTarget</var> ] )</h1>
<p>When the <code>construct</code> function is called with arguments <var>target</var>, <var>argumentsList</var>, and <var>newTarget</var>, the following steps are taken:</p>
<emu-alg><ol><li>If <emu-xref aoid="IsConstructor" id="_ref_8347"><a href="#sec-isconstructor">IsConstructor</a></emu-xref>(<var>target</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>newTarget</var> is not present, set <var>newTarget</var> to <var>target</var>.</li><li>Else if <emu-xref aoid="IsConstructor" id="_ref_8348"><a href="#sec-isconstructor">IsConstructor</a></emu-xref>(<var>newTarget</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>args</var> be ?&nbsp;<emu-xref aoid="CreateListFromArrayLike" id="_ref_8349"><a href="#sec-createlistfromarraylike">CreateListFromArrayLike</a></emu-xref>(<var>argumentsList</var>).</li><li>Return ?&nbsp;<emu-xref aoid="Construct" id="_ref_8350"><a href="#sec-construct">Construct</a></emu-xref>(<var>target</var>, <var>args</var>, <var>newTarget</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-reflect.defineproperty">
<h1><span class="secnum">26.1.3</span>Reflect.defineProperty ( <var>target</var>, <var>propertyKey</var>, <var>attributes</var> )</h1>
<p>When the <code>defineProperty</code> function is called with arguments <var>target</var>, <var>propertyKey</var>, and <var>attributes</var>, the following steps are taken:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_8351"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>target</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>key</var> be ?&nbsp;<emu-xref aoid="ToPropertyKey" id="_ref_8352"><a href="#sec-topropertykey">ToPropertyKey</a></emu-xref>(<var>propertyKey</var>).</li><li>Let <var>desc</var> be ?&nbsp;<emu-xref aoid="ToPropertyDescriptor" id="_ref_8353"><a href="#sec-topropertydescriptor">ToPropertyDescriptor</a></emu-xref>(<var>attributes</var>).</li><li>Return ? <var>target</var>.[[DefineOwnProperty]](<var>key</var>, <var>desc</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-reflect.deleteproperty">
<h1><span class="secnum">26.1.4</span>Reflect.deleteProperty ( <var>target</var>, <var>propertyKey</var> )</h1>
<p>When the <code>deleteProperty</code> function is called with arguments <var>target</var> and <var>propertyKey</var>, the following steps are taken:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_8354"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>target</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>key</var> be ?&nbsp;<emu-xref aoid="ToPropertyKey" id="_ref_8355"><a href="#sec-topropertykey">ToPropertyKey</a></emu-xref>(<var>propertyKey</var>).</li><li>Return ? <var>target</var>.[[Delete]](<var>key</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-reflect.get">
<h1><span class="secnum">26.1.5</span>Reflect.get ( <var>target</var>, <var>propertyKey</var> [ , <var>receiver</var> ] )</h1>
<p>When the <code>get</code> function is called with arguments <var>target</var>, <var>propertyKey</var>, and <var>receiver</var>, the following steps are taken:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_8356"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>target</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>key</var> be ?&nbsp;<emu-xref aoid="ToPropertyKey" id="_ref_8357"><a href="#sec-topropertykey">ToPropertyKey</a></emu-xref>(<var>propertyKey</var>).</li><li>If <var>receiver</var> is not present, then<ol><li>Set <var>receiver</var> to <var>target</var>.</li></ol></li><li>Return ? <var>target</var>.[[Get]](<var>key</var>, <var>receiver</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-reflect.getownpropertydescriptor">
<h1><span class="secnum">26.1.6</span>Reflect.getOwnPropertyDescriptor ( <var>target</var>, <var>propertyKey</var> )</h1>
<p>When the <code>getOwnPropertyDescriptor</code> function is called with arguments <var>target</var> and <var>propertyKey</var>, the following steps are taken:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_8358"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>target</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>key</var> be ?&nbsp;<emu-xref aoid="ToPropertyKey" id="_ref_8359"><a href="#sec-topropertykey">ToPropertyKey</a></emu-xref>(<var>propertyKey</var>).</li><li>Let <var>desc</var> be ? <var>target</var>.[[GetOwnProperty]](<var>key</var>).</li><li>Return <emu-xref aoid="FromPropertyDescriptor" id="_ref_8360"><a href="#sec-frompropertydescriptor">FromPropertyDescriptor</a></emu-xref>(<var>desc</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-reflect.getprototypeof">
<h1><span class="secnum">26.1.7</span>Reflect.getPrototypeOf ( <var>target</var> )</h1>
<p>When the <code>getPrototypeOf</code> function is called with argument <var>target</var>, the following steps are taken:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_8361"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>target</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return ? <var>target</var>.[[GetPrototypeOf]]().
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-reflect.has">
<h1><span class="secnum">26.1.8</span>Reflect.has ( <var>target</var>, <var>propertyKey</var> )</h1>
<p>When the <code>has</code> function is called with arguments <var>target</var> and <var>propertyKey</var>, the following steps are taken:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_8362"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>target</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>key</var> be ?&nbsp;<emu-xref aoid="ToPropertyKey" id="_ref_8363"><a href="#sec-topropertykey">ToPropertyKey</a></emu-xref>(<var>propertyKey</var>).</li><li>Return ? <var>target</var>.[[HasProperty]](<var>key</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-reflect.isextensible">
<h1><span class="secnum">26.1.9</span>Reflect.isExtensible ( <var>target</var> )</h1>
<p>When the <code>isExtensible</code> function is called with argument <var>target</var>, the following steps are taken:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_8364"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>target</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return ? <var>target</var>.[[IsExtensible]]().
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-reflect.ownkeys">
<h1><span class="secnum">26.1.10</span>Reflect.ownKeys ( <var>target</var> )</h1>
<p>When the <code>ownKeys</code> function is called with argument <var>target</var>, the following steps are taken:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_8365"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>target</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>keys</var> be ? <var>target</var>.[[OwnPropertyKeys]]().</li><li>Return <emu-xref aoid="CreateArrayFromList" id="_ref_8366"><a href="#sec-createarrayfromlist">CreateArrayFromList</a></emu-xref>(<var>keys</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-reflect.preventextensions">
<h1><span class="secnum">26.1.11</span>Reflect.preventExtensions ( <var>target</var> )</h1>
<p>When the <code>preventExtensions</code> function is called with argument <var>target</var>, the following steps are taken:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_8367"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>target</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return ? <var>target</var>.[[PreventExtensions]]().
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-reflect.set">
<h1><span class="secnum">26.1.12</span>Reflect.set ( <var>target</var>, <var>propertyKey</var>, <var>V</var> [ , <var>receiver</var> ] )</h1>
<p>When the <code>set</code> function is called with arguments <var>target</var>, <var>V</var>, <var>propertyKey</var>, and <var>receiver</var>, the following steps are taken:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_8368"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>target</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>key</var> be ?&nbsp;<emu-xref aoid="ToPropertyKey" id="_ref_8369"><a href="#sec-topropertykey">ToPropertyKey</a></emu-xref>(<var>propertyKey</var>).</li><li>If <var>receiver</var> is not present, then<ol><li>Set <var>receiver</var> to <var>target</var>.</li></ol></li><li>Return ? <var>target</var>.[[Set]](<var>key</var>, <var>V</var>, <var>receiver</var>).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-reflect.setprototypeof">
<h1><span class="secnum">26.1.13</span>Reflect.setPrototypeOf ( <var>target</var>, <var>proto</var> )</h1>
<p>When the <code>setPrototypeOf</code> function is called with arguments <var>target</var> and <var>proto</var>, the following steps are taken:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_8370"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>target</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <emu-xref aoid="Type" id="_ref_8371"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>proto</var>) is not Object and <var>proto</var> is not <emu-val>null</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return ? <var>target</var>.[[SetPrototypeOf]](<var>proto</var>).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-proxy-objects">
<h1><span class="secnum">26.2</span>Proxy Objects</h1>
<emu-clause id="sec-proxy-constructor">
<h1><span class="secnum">26.2.1</span>The Proxy Constructor</h1>
<p>The Proxy <emu-xref href="#constructor" id="_ref_8372"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>is the intrinsic object <dfn>%Proxy%</dfn>.</li>
<li>is the initial value of the <code>Proxy</code> property of the <emu-xref href="#sec-global-object" id="_ref_8373"><a href="#sec-global-object">global object</a></emu-xref>.</li>
<li>creates and initializes a new proxy <emu-xref href="#exotic-object" id="_ref_8374"><a href="#exotic-object">exotic object</a></emu-xref> when called as a <emu-xref href="#constructor" id="_ref_8375"><a href="#constructor">constructor</a></emu-xref>.</li>
<li>is not intended to be called as a function and will throw an exception when called in that manner.</li>
</ul>
<emu-clause id="sec-proxy-target-handler">
<h1><span class="secnum">26.2.1.1</span>Proxy ( <var>target</var>, <var>handler</var> )</h1>
<p>When <code>Proxy</code> is called with arguments <var>target</var> and <var>handler</var>, it performs the following steps:</p>
<emu-alg><ol><li>If NewTarget is <emu-val>undefined</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return ?&nbsp;<emu-xref aoid="ProxyCreate" id="_ref_8376"><a href="#sec-proxycreate">ProxyCreate</a></emu-xref>(<var>target</var>, <var>handler</var>).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-proxy-constructor">
<h1><span class="secnum">26.2.2</span>Properties of the Proxy Constructor</h1>
<p>The Proxy <emu-xref href="#constructor" id="_ref_8377"><a href="#constructor">constructor</a></emu-xref>:</p>
<ul>
<li>has a [[Prototype]] internal slot whose value is the intrinsic object <emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_8378"><a href="#sec-properties-of-the-function-prototype-object">%FunctionPrototype%</a></emu-xref>.</li>
<li>does not have a <code>prototype</code> property because proxy exotic objects do not have a [[Prototype]] internal slot that requires initialization.</li>
<li>has the following properties:</li>
</ul>
<emu-clause id="sec-proxy.revocable">
<h1><span class="secnum">26.2.2.1</span>Proxy.revocable ( <var>target</var>, <var>handler</var> )</h1>
<p>The <code>Proxy.revocable</code> function is used to create a revocable Proxy object. When <code>Proxy.revocable</code> is called with arguments <var>target</var> and <var>handler</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>p</var> be ?&nbsp;<emu-xref aoid="ProxyCreate" id="_ref_8379"><a href="#sec-proxycreate">ProxyCreate</a></emu-xref>(<var>target</var>, <var>handler</var>).</li><li>Let <var>steps</var> be the algorithm steps defined in <emu-xref href="#sec-proxy-revocation-functions" title="" id="_ref_721"><a href="#sec-proxy-revocation-functions">Proxy Revocation Functions</a></emu-xref>.</li><li>Let <var>revoker</var> be <emu-xref aoid="CreateBuiltinFunction" id="_ref_8380"><a href="#sec-createbuiltinfunction">CreateBuiltinFunction</a></emu-xref>(<var>steps</var>, « [[RevocableProxy]] »).</li><li>Set <var>revoker</var>.[[RevocableProxy]] to <var>p</var>.</li><li>Let <var>result</var> be <emu-xref aoid="ObjectCreate" id="_ref_8381"><a href="#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_8382"><a href="#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>).</li><li>Perform <emu-xref aoid="CreateDataProperty" id="_ref_8383"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>result</var>, <code>"proxy"</code>, <var>p</var>).</li><li>Perform <emu-xref aoid="CreateDataProperty" id="_ref_8384"><a href="#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>result</var>, <code>"revoke"</code>, <var>revoker</var>).</li><li>Return <var>result</var>.
</li></ol></emu-alg>
<emu-clause id="sec-proxy-revocation-functions">
<h1><span class="secnum">26.2.2.1.1</span>Proxy Revocation Functions</h1>
<p>A Proxy revocation function is an anonymous function that has the ability to invalidate a specific Proxy object.</p>
<p>Each Proxy revocation function has a [[RevocableProxy]] internal slot.</p>
<p>When a Proxy revocation function is called, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>F</var> be the <emu-xref href="#active-function-object" id="_ref_8385"><a href="#active-function-object">active function object</a></emu-xref>.</li><li>Let <var>p</var> be <var>F</var>.[[RevocableProxy]].</li><li>If <var>p</var> is <emu-val>null</emu-val>, return <emu-val>undefined</emu-val>.</li><li>Set <var>F</var>.[[RevocableProxy]] to <emu-val>null</emu-val>.</li><li><emu-xref href="#assert" id="_ref_8386"><a href="#assert">Assert</a></emu-xref>: <var>p</var> is a Proxy object.</li><li>Set <var>p</var>.[[ProxyTarget]] to <emu-val>null</emu-val>.</li><li>Set <var>p</var>.[[ProxyHandler]] to <emu-val>null</emu-val>.</li><li>Return <emu-val>undefined</emu-val>.
</li></ol></emu-alg>
<p>The <code>"length"</code> property of a Proxy revocation function is 0.</p>
</emu-clause>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-module-namespace-objects">
<h1><span class="secnum">26.3</span>Module Namespace Objects</h1>
<p>A Module Namespace Object is a module namespace <emu-xref href="#exotic-object" id="_ref_8387"><a href="#exotic-object">exotic object</a></emu-xref> that provides runtime property-based access to a module's exported bindings. There is no <emu-xref href="#constructor" id="_ref_8388"><a href="#constructor">constructor</a></emu-xref> function for Module Namespace Objects. Instead, such an object is created for each module that is imported by an <emu-nt id="_ref_14818"><a href="#prod-ImportDeclaration">ImportDeclaration</a></emu-nt> that includes a <emu-nt id="_ref_14819"><a href="#prod-NameSpaceImport">NameSpaceImport</a></emu-nt>.</p>
<p>In addition to the properties specified in <emu-xref href="#sec-module-namespace-exotic-objects" id="_ref_722"><a href="#sec-module-namespace-exotic-objects">9.4.6</a></emu-xref> each Module Namespace Object has the following own property:</p>
<emu-clause id="sec-@@tostringtag">
<h1><span class="secnum">26.3.1</span>@@toStringTag</h1>
<p>The initial value of the @@toStringTag property is the String value <code>"Module"</code>.</p>
<p>This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.</p>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-memory-model">
<h1><span class="secnum">27</span>Memory Model</h1>
<p>The memory consistency model, or <dfn>memory model</dfn>, specifies the possible orderings of <emu-xref href="#sec-data-blocks" id="_ref_8389"><a href="#sec-data-blocks">Shared Data Block</a></emu-xref>
events, arising via accessing TypedArray instances backed by a
SharedArrayBuffer and via methods on the Atomics object. When the
program has no data races (defined below), the ordering of events
appears as sequentially consistent, i.e., as an interleaving of actions
from each <emu-xref href="#agent" id="_ref_8390"><a href="#agent">agent</a></emu-xref>.
When the program has data races, shared memory operations may appear
sequentially inconsistent. For example, programs may exhibit
causality-violating behaviour and other astonishments. These
astonishments arise from compiler transforms and the design of CPUs
(e.g., out-of-order execution and speculation). The memory model defines
both the precise conditions under which a program exhibits sequentially
consistent behaviour as well as the possible values read from data
races. To wit, there is no undefined behaviour.</p>
<p>The memory model is defined as relational constraints on events introduced by <emu-xref href="#sec-algorithm-conventions-abstract-operations" id="_ref_8391"><a href="#sec-algorithm-conventions-abstract-operations">abstract operations</a></emu-xref> on SharedArrayBuffer or by methods on the Atomics object during an evaluation.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>This section provides an axiomatic model on events introduced by the <emu-xref href="#sec-algorithm-conventions-abstract-operations" id="_ref_8392"><a href="#sec-algorithm-conventions-abstract-operations">abstract operations</a></emu-xref>
on SharedArrayBuffers. It bears stressing that the model is not
expressible algorithmically, unlike the rest of this specification. The
nondeterministic introduction of events by <emu-xref href="#sec-algorithm-conventions-abstract-operations" id="_ref_8393"><a href="#sec-algorithm-conventions-abstract-operations">abstract operations</a></emu-xref>
is the interface between the operational semantics of ECMAScript
evaluation and the axiomatic semantics of the memory model. The
semantics of these events is defined by considering graphs of all events
in an evaluation. These are neither Static Semantics nor Runtime
Semantics. There is no demonstrated algorithmic implementation, but
instead a set of constraints that determine if a particular event graph
is allowed or disallowed.</p>
</div></emu-note>
<emu-clause id="sec-memory-model-fundamentals">
<h1><span class="secnum">27.1</span>Memory Model Fundamentals</h1>
<p>Shared memory accesses (reads and writes) are divided into two
groups, atomic accesses and data accesses, defined below. Atomic
accesses are sequentially consistent, i.e., there is a strict total
ordering of events agreed upon by all agents in an <emu-xref href="#sec-agent-clusters" id="_ref_8394"><a href="#sec-agent-clusters">agent cluster</a></emu-xref>. Non-atomic accesses do not have a strict total ordering agreed upon by all agents, i.e., unordered.</p>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>No orderings weaker than sequentially consistent and stronger than unordered, such as release-acquire, are supported.</p>
</div></emu-note>
<p>A <dfn>Shared Data Block event</dfn> is either a <dfn>ReadSharedMemory</dfn>, <dfn>WriteSharedMemory</dfn>, or <dfn>ReadModifyWriteSharedMemory</dfn> <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8395"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref>.</p>
<emu-table id="table-readsharedmemory-fields" caption="ReadSharedMemory Event Fields"><figure><figcaption>Table 77: <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8396"><a href="#sec-memory-model-fundamentals">ReadSharedMemory</a></emu-xref> Event Fields</figcaption>
<table>
<tbody>
<tr>
<th>Field Name</th>
<th>Value</th>
<th>Meaning</th>
</tr>
<tr>
<td>[[Order]]</td>
<td><code>"SeqCst"</code> or <code>"Unordered"</code></td>
<td>The weakest ordering guaranteed by the <emu-xref href="#sec-memory-model" id="_ref_8397"><a href="#sec-memory-model">memory model</a></emu-xref> for the event.</td>
</tr>
<tr>
<td>[[NoTear]]</td>
<td>A Boolean</td>
<td>Whether this event is allowed to read from multiple write events on equal range as this event.</td>
</tr>
<tr>
<td>[[Block]]</td>
<td>A <emu-xref href="#sec-data-blocks" id="_ref_8398"><a href="#sec-data-blocks">Shared Data Block</a></emu-xref></td>
<td>The block the event operates on.</td>
</tr>
<tr>
<td>[[ByteIndex]]</td>
<td>A nonnegative integer</td>
<td>The byte address of the read in [[Block]].</td>
</tr>
<tr>
<td>[[ElementSize]]</td>
<td>A nonnegative integer</td>
<td>The size of the read.</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<emu-table id="table-writesharedmemory-fields" caption="WriteSharedMemory Event Fields"><figure><figcaption>Table 78: <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8399"><a href="#sec-memory-model-fundamentals">WriteSharedMemory</a></emu-xref> Event Fields</figcaption>
<table>
<tbody>
<tr>
<th>Field Name</th>
<th>Value</th>
<th>Meaning</th>
</tr>
<tr>
<td>[[Order]]</td>
<td><code>"SeqCst"</code>, <code>"Unordered"</code>, or <code>"Init"</code></td>
<td>The weakest ordering guaranteed by the <emu-xref href="#sec-memory-model" id="_ref_8400"><a href="#sec-memory-model">memory model</a></emu-xref> for the event.</td>
</tr>
<tr>
<td>[[NoTear]]</td>
<td>A Boolean</td>
<td>Whether this event is allowed to be read from multiple read events with equal range as this event.</td>
</tr>
<tr>
<td>[[Block]]</td>
<td>A <emu-xref href="#sec-data-blocks" id="_ref_8401"><a href="#sec-data-blocks">Shared Data Block</a></emu-xref></td>
<td>The block the event operates on.</td>
</tr>
<tr>
<td>[[ByteIndex]]</td>
<td>A nonnegative integer</td>
<td>The byte address of the write in [[Block]].</td>
</tr>
<tr>
<td>[[ElementSize]]</td>
<td>A nonnegative integer</td>
<td>The size of the write.</td>
</tr>
<tr>
<td>[[Payload]]</td>
<td>A <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8402"><a href="#sec-list-and-record-specification-type">List</a></emu-xref></td>
<td>The <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8403"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of byte values to be read by other events.</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<emu-table id="table-rmwsharedmemory-fields" caption="ReadModifyWriteSharedMemory Event Fields"><figure><figcaption>Table 79: <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8404"><a href="#sec-memory-model-fundamentals">ReadModifyWriteSharedMemory</a></emu-xref> Event Fields</figcaption>
<table>
<tbody>
<tr>
<th>Field Name</th>
<th>Value</th>
<th>Meaning</th>
</tr>
<tr>
<td>[[Order]]</td>
<td><code>"SeqCst"</code></td>
<td>Read-modify-write events are always sequentially consistent.</td>
</tr>
<tr>
<td>[[NoTear]]</td>
<td><emu-val>true</emu-val></td>
<td>Read-modify-write events cannot tear.</td>
</tr>
<tr>
<td>[[Block]]</td>
<td>A <emu-xref href="#sec-data-blocks" id="_ref_8405"><a href="#sec-data-blocks">Shared Data Block</a></emu-xref></td>
<td>The block the event operates on.</td>
</tr>
<tr>
<td>[[ByteIndex]]</td>
<td>A nonnegative integer</td>
<td>The byte address of the read-modify-write in [[Block]].</td>
</tr>
<tr>
<td>[[ElementSize]]</td>
<td>A nonnegative integer</td>
<td>The size of the read-modify-write.</td>
</tr>
<tr>
<td>[[Payload]]</td>
<td>A <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8406"><a href="#sec-list-and-record-specification-type">List</a></emu-xref></td>
<td>The <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8407"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of byte values to be passed to [[ModifyOp]].</td>
</tr>
<tr>
<td>[[ModifyOp]]</td>
<td>A semantic function</td>
<td>A pure semantic function that returns a modified <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8408"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of byte values from a read <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8409"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of byte values and [[Payload]].</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<p>These events are introduced by <emu-xref href="#sec-algorithm-conventions-abstract-operations" id="_ref_8410"><a href="#sec-algorithm-conventions-abstract-operations">abstract operations</a></emu-xref> or by methods on the Atomics object.</p>
<p>Some operations may also introduce <dfn>Synchronize</dfn> events. A <dfn>Synchronize event</dfn> has no fields, and exists purely to directly constrain the permitted orderings of other events.</p>
<p>In addition to <emu-xref href="#sec-data-blocks" id="_ref_8411"><a href="#sec-data-blocks">Shared Data Block</a></emu-xref> and Synchronize events, there are host-specific events.</p>
<p>Let the range of a ReadSharedMemory, WriteSharedMemory, or
ReadModifyWriteSharedMemory event be the Set of contiguous integers from
its [[ByteIndex]] to [[ByteIndex]] + [[ElementSize]] - 1. Two events'
ranges are equal when the events have the same [[Block]], and the ranges
are element-wise equal. Two events' ranges are overlapping when the
events have the same [[Block]], the ranges are not equal and their
intersection is non-empty. Two events' ranges are disjoint when the
events do not have the same [[Block]] or their ranges are neither equal
nor overlapping.</p>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>Examples of host-specific synchronizing events that should be accounted for are: sending a SharedArrayBuffer from one <emu-xref href="#agent" id="_ref_8412"><a href="#agent">agent</a></emu-xref> to another (e.g., by <code>postMessage</code> in a browser), starting and stopping agents, and communicating within the <emu-xref href="#sec-agent-clusters" id="_ref_8413"><a href="#sec-agent-clusters">agent cluster</a></emu-xref> via channels other than shared memory. It is assumed those events are appended to <emu-xref aoid="agent-order" id="_ref_8414"><a href="#sec-agent-order">agent-order</a></emu-xref> during evaluation like the other SharedArrayBuffer events.</p>
</div></emu-note>
<p>Events are ordered within candidate executions by the relations defined below.</p>
</emu-clause>
<emu-clause id="sec-agent-event-records">
<h1><span class="secnum">27.2</span>Agent Events Records</h1>
<p>An <dfn>Agent Events Record</dfn> is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8415"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> with the following fields.</p>
<emu-table id="table-agent-events-records" caption="Agent Events Record Fields"><figure><figcaption>Table 80: <emu-xref href="#sec-agent-event-records" id="_ref_8416"><a href="#sec-agent-event-records">Agent Events Record</a></emu-xref> Fields</figcaption>
<table>
<tbody>
<tr>
<th>Field Name</th>
<th>Value</th>
<th>Meaning</th>
</tr>
<tr>
<td>[[AgentSignifier]]</td>
<td>A value that admits equality testing</td>
<td>The <emu-xref href="#agent" id="_ref_8417"><a href="#agent">agent</a></emu-xref> whose evaluation resulted in this ordering.</td>
</tr>
<tr>
<td>[[EventList]]</td>
<td>A <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8418"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of events</td>
<td>Events are appended to the list during evaluation.</td>
</tr>
<tr>
<td>[[AgentSynchronizesWith]]</td>
<td>A <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8419"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of pairs of <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8420"><a href="#sec-memory-model-fundamentals">Synchronize</a></emu-xref> events</td>
<td><emu-xref href="#sec-memory-model-fundamentals" id="_ref_8421"><a href="#sec-memory-model-fundamentals">Synchronize</a></emu-xref> relationships introduced by the operational semantics.</td>
</tr>
</tbody>
</table>
</figure></emu-table>
</emu-clause>
<emu-clause id="sec-chosen-value-records">
<h1><span class="secnum">27.3</span>Chosen Value Records</h1>
<p>A <dfn>Chosen Value Record</dfn> is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8422"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> with the following fields.</p>
<emu-table id="table-chosen-value-records" caption="Chosen Value Record Fields"><figure><figcaption>Table 81: <emu-xref href="#sec-chosen-value-records" id="_ref_8423"><a href="#sec-chosen-value-records">Chosen Value Record</a></emu-xref> Fields</figcaption>
<table>
<tbody>
<tr>
<th>Field Name</th>
<th>Value</th>
<th>Meaning</th>
</tr>
<tr>
<td>[[Event]]</td>
<td>A <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8424"><a href="#sec-memory-model-fundamentals">Shared Data Block event</a></emu-xref></td>
<td>The <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8425"><a href="#sec-memory-model-fundamentals">ReadSharedMemory</a></emu-xref> or <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8426"><a href="#sec-memory-model-fundamentals">ReadModifyWriteSharedMemory</a></emu-xref> event that was introduced for this chosen value.</td>
</tr>
<tr>
<td>[[ChosenValue]]</td>
<td>A <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8427"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of byte values</td>
<td>The bytes that were nondeterministically chosen during evaluation.</td>
</tr>
</tbody>
</table>
</figure></emu-table>
</emu-clause>
<emu-clause id="sec-candidate-executions">
<h1><span class="secnum">27.4</span>Candidate Executions</h1>
<p>A <dfn>candidate execution</dfn> of the evaluation of an <emu-xref href="#sec-agent-clusters" id="_ref_8428"><a href="#sec-agent-clusters">agent cluster</a></emu-xref> is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8429"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> with the following fields.</p>
<emu-table id="table-candidate-execution-records" caption="Candidate Execution Record Fields"><figure><figcaption>Table 82: Candidate Execution <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8430"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> Fields</figcaption>
<table>
<tbody>
<tr>
<th>Field Name</th>
<th>Value</th>
<th>Meaning</th>
</tr>
<tr>
<td>[[EventsRecords]]</td>
<td>A <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8431"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of <emu-xref href="#agent" id="_ref_8432"><a href="#agent">Agent</a></emu-xref> Events Records.</td>
<td>Maps an <emu-xref href="#agent" id="_ref_8433"><a href="#agent">agent</a></emu-xref> to Lists of events appended during the evaluation.</td>
</tr>
<tr>
<td>[[ChosenValues]]</td>
<td>A <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8434"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of Chosen Value Records.</td>
<td>Maps <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8435"><a href="#sec-memory-model-fundamentals">ReadSharedMemory</a></emu-xref> or <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8436"><a href="#sec-memory-model-fundamentals">ReadModifyWriteSharedMemory</a></emu-xref> events to the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8437"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of byte values chosen during the evaluation.</td>
</tr>
<tr>
<td>[[AgentOrder]]</td>
<td>An <emu-xref aoid="agent-order" id="_ref_8438"><a href="#sec-agent-order">agent-order</a></emu-xref> <emu-xref href="#sec-set-and-relation-specification-type" id="_ref_8439"><a href="#sec-set-and-relation-specification-type">Relation</a></emu-xref>.</td>
<td>Defined below.</td>
</tr>
<tr>
<td>[[ReadsBytesFrom]]</td>
<td>A <emu-xref aoid="reads-bytes-from" id="_ref_8440"><a href="#sec-reads-bytes-from">reads-bytes-from</a></emu-xref> semantic function.</td>
<td>Defined below.</td>
</tr>
<tr>
<td>[[ReadsFrom]]</td>
<td>A <emu-xref aoid="reads-from" id="_ref_8441"><a href="#sec-reads-from">reads-from</a></emu-xref> <emu-xref href="#sec-set-and-relation-specification-type" id="_ref_8442"><a href="#sec-set-and-relation-specification-type">Relation</a></emu-xref>.</td>
<td>Defined below.</td>
</tr>
<tr>
<td>[[HostSynchronizesWith]]</td>
<td>A <emu-xref aoid="host-synchronizes-with" id="_ref_8443"><a href="#sec-host-synchronizes-with">host-synchronizes-with</a></emu-xref> <emu-xref href="#sec-set-and-relation-specification-type" id="_ref_8444"><a href="#sec-set-and-relation-specification-type">Relation</a></emu-xref>.</td>
<td>Defined below.</td>
</tr>
<tr>
<td>[[SynchronizesWith]]</td>
<td>A <emu-xref aoid="synchronizes-with" id="_ref_8445"><a href="#sec-synchronizes-with">synchronizes-with</a></emu-xref> <emu-xref href="#sec-set-and-relation-specification-type" id="_ref_8446"><a href="#sec-set-and-relation-specification-type">Relation</a></emu-xref>.</td>
<td>Defined below.</td>
</tr>
<tr>
<td>[[HappensBefore]]</td>
<td>A <emu-xref aoid="happens-before" id="_ref_8447"><a href="#sec-happens-before">happens-before</a></emu-xref> <emu-xref href="#sec-set-and-relation-specification-type" id="_ref_8448"><a href="#sec-set-and-relation-specification-type">Relation</a></emu-xref>.</td>
<td>Defined below.</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<p>An <dfn>empty candidate execution</dfn> is a candidate execution <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8449"><a href="#sec-list-and-record-specification-type">Record</a></emu-xref> whose fields are empty Lists and Relations.</p>
</emu-clause>
<emu-clause id="sec-abstract-operations-for-the-memory-model">
<h1><span class="secnum">27.5</span>Abstract Operations for the Memory Model</h1>
<emu-clause id="sec-event-set" aoid="EventSet">
<h1><span class="secnum">27.5.1</span>EventSet ( <var>execution</var> )</h1>
<p>The abstract operation EventSet takes one argument, a <emu-xref href="#sec-candidate-executions" id="_ref_8450"><a href="#sec-candidate-executions">candidate execution</a></emu-xref> <var>execution</var>. It performs the following steps:</p>
<emu-alg><ol><li>Let <var>events</var> be an empty Set.</li><li>For each <emu-xref href="#sec-agent-event-records" id="_ref_8451"><a href="#sec-agent-event-records">Agent Events Record</a></emu-xref> <var>aer</var> in <var>execution</var>.[[EventsRecords]], do<ol><li>For each event <var>E</var> in <var>aer</var>.[[EventList]], do<ol><li>Add <var>E</var> to <var>events</var>.</li></ol></li></ol></li><li>Return <var>events</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-sharedatablockeventset" aoid="SharedDataBlockEventSet">
<h1><span class="secnum">27.5.2</span>SharedDataBlockEventSet ( <var>execution</var> )</h1>
<p>The abstract operation SharedDataBlockEventSet takes one argument, a <emu-xref href="#sec-candidate-executions" id="_ref_8452"><a href="#sec-candidate-executions">candidate execution</a></emu-xref> <var>execution</var>. It performs the following steps:</p>
<emu-alg><ol><li>Let <var>events</var> be an empty Set.</li><li>For each event <var>E</var> in <emu-xref aoid="EventSet" id="_ref_8453"><a href="#sec-event-set">EventSet</a></emu-xref>(<var>execution</var>), do<ol><li>If <var>E</var> is a <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8454"><a href="#sec-memory-model-fundamentals">ReadSharedMemory</a></emu-xref>, <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8455"><a href="#sec-memory-model-fundamentals">WriteSharedMemory</a></emu-xref>, or <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8456"><a href="#sec-memory-model-fundamentals">ReadModifyWriteSharedMemory</a></emu-xref> event, add <var>E</var> to <var>events</var>.</li></ol></li><li>Return <var>events</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-synchronizeeventset" aoid="SynchronizeEventSet">
<h1><span class="secnum">27.5.3</span>SynchronizeEventSet ( <var>execution</var> )</h1>
<p>The abstract operation SynchronizeEventSet takes one argument, a <emu-xref href="#sec-candidate-executions" id="_ref_8457"><a href="#sec-candidate-executions">candidate execution</a></emu-xref> <var>execution</var>. It performs the following steps:</p>
<emu-alg><ol><li>Let <var>events</var> be an empty Set.</li><li>For each event <var>E</var> in <emu-xref aoid="EventSet" id="_ref_8458"><a href="#sec-event-set">EventSet</a></emu-xref>(<var>execution</var>), do<ol><li>If <var>E</var> is a <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8459"><a href="#sec-memory-model-fundamentals">Synchronize event</a></emu-xref>, add <var>E</var> to <var>events</var>.</li></ol></li><li>Return <var>events</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-hosteventset" aoid="HostEventSet">
<h1><span class="secnum">27.5.4</span>HostEventSet ( <var>execution</var> )</h1>
<p>The abstract operation HostEventSet takes one argument, a <emu-xref href="#sec-candidate-executions" id="_ref_8460"><a href="#sec-candidate-executions">candidate execution</a></emu-xref> <var>execution</var>. It performs the following steps:</p>
<emu-alg><ol><li>Let <var>events</var> be an empty Set.</li><li>For each event <var>E</var> in <emu-xref aoid="EventSet" id="_ref_8461"><a href="#sec-event-set">EventSet</a></emu-xref>(<var>execution</var>), do<ol><li>If <var>E</var> is not in <emu-xref aoid="SharedDataBlockEventSet" id="_ref_8462"><a href="#sec-sharedatablockeventset">SharedDataBlockEventSet</a></emu-xref>(<var>execution</var>), add <var>E</var> to <var>events</var>.</li></ol></li><li>Return <var>events</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-composewriteeventbytes" aoid="ComposeWriteEventBytes">
<h1><span class="secnum">27.5.5</span>ComposeWriteEventBytes ( <var>execution</var>, <var>byteIndex</var>, <var>Ws</var> )</h1>
<p>The abstract operation ComposeWriteEventBytes takes four arguments, a <emu-xref href="#sec-candidate-executions" id="_ref_8463"><a href="#sec-candidate-executions">candidate execution</a></emu-xref> <var>execution</var>, a nonnegative integer <var>byteIndex</var>, and a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8464"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> <var>Ws</var> of <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8465"><a href="#sec-memory-model-fundamentals">WriteSharedMemory</a></emu-xref> or <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8466"><a href="#sec-memory-model-fundamentals">ReadModifyWriteSharedMemory</a></emu-xref> events. It performs the following steps:</p>
<emu-alg><ol><li>Let <var>byteLocation</var> be <var>byteIndex</var>.</li><li>Let <var>bytesRead</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8467"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>For each element <var>W</var> of <var>Ws</var> in <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8468"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> order, do<ol><li><emu-xref href="#assert" id="_ref_8469"><a href="#assert">Assert</a></emu-xref>: <var>W</var> has <var>byteLocation</var> in its range.</li><li>Let <var>payloadIndex</var> be <var>byteLocation</var> - <var>W</var>.[[ByteIndex]].</li><li>If <var>W</var> is a <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8470"><a href="#sec-memory-model-fundamentals">WriteSharedMemory</a></emu-xref> event, then<ol><li>Let <var>byte</var> be <var>W</var>.[[Payload]][<var>payloadIndex</var>].</li></ol></li><li>Else,<ol><li><emu-xref href="#assert" id="_ref_8471"><a href="#assert">Assert</a></emu-xref>: <var>W</var> is a <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8472"><a href="#sec-memory-model-fundamentals">ReadModifyWriteSharedMemory</a></emu-xref> event.</li><li>Let <var>bytes</var> be <emu-xref aoid="ValueOfReadEvent" id="_ref_8473"><a href="#sec-valueofreadevent">ValueOfReadEvent</a></emu-xref>(<var>execution</var>, <var>W</var>).</li><li>Let <var>bytesModified</var> be <var>W</var>.[[ModifyOp]](<var>bytes</var>, <var>W</var>.[[Payload]]).</li><li>Let <var>byte</var> be <var>bytesModified</var>[<var>payloadIndex</var>].</li></ol></li><li>Append <var>byte</var> to <var>bytesRead</var>.</li><li>Increment <var>byteLocation</var> by 1.</li></ol></li><li>Return <var>bytesRead</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>The semantic function [[ModifyOp]] is given by the function properties on the Atomics object that introduce <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8474"><a href="#sec-memory-model-fundamentals">ReadModifyWriteSharedMemory</a></emu-xref> events.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>This abstract operation composes a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8475"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of write events into a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8476"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of byte values. It is used in the event semantics of <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8477"><a href="#sec-memory-model-fundamentals">ReadSharedMemory</a></emu-xref> and <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8478"><a href="#sec-memory-model-fundamentals">ReadModifyWriteSharedMemory</a></emu-xref> events.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-valueofreadevent" aoid="ValueOfReadEvent">
<h1><span class="secnum">27.5.6</span>ValueOfReadEvent ( <var>execution</var>, <var>R</var> )</h1>
<p>The abstract operation ValueOfReadEvent takes two arguments, a <emu-xref href="#sec-candidate-executions" id="_ref_8479"><a href="#sec-candidate-executions">candidate execution</a></emu-xref> <var>execution</var> and a <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8480"><a href="#sec-memory-model-fundamentals">ReadSharedMemory</a></emu-xref> or <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8481"><a href="#sec-memory-model-fundamentals">ReadModifyWriteSharedMemory</a></emu-xref> event <var>R</var>. It performs the following steps:</p>
<emu-alg><ol><li><emu-xref href="#assert" id="_ref_8482"><a href="#assert">Assert</a></emu-xref>: <var>R</var> is a <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8483"><a href="#sec-memory-model-fundamentals">ReadSharedMemory</a></emu-xref> or <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8484"><a href="#sec-memory-model-fundamentals">ReadModifyWriteSharedMemory</a></emu-xref> event.</li><li>Let <var>Ws</var> be <var>execution</var>.[[ReadsBytesFrom]](<var>R</var>).</li><li><emu-xref href="#assert" id="_ref_8485"><a href="#assert">Assert</a></emu-xref>: <var>Ws</var> is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8486"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8487"><a href="#sec-memory-model-fundamentals">WriteSharedMemory</a></emu-xref> or <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8488"><a href="#sec-memory-model-fundamentals">ReadModifyWriteSharedMemory</a></emu-xref> events with length equal to <var>R</var>.[[ElementSize]].</li><li>Return <emu-xref aoid="ComposeWriteEventBytes" id="_ref_8489"><a href="#sec-composewriteeventbytes">ComposeWriteEventBytes</a></emu-xref>(<var>execution</var>, <var>R</var>.[[ByteIndex]], <var>Ws</var>).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-relations-of-candidate-executions">
<h1><span class="secnum">27.6</span>Relations of Candidate Executions</h1>
<emu-clause id="sec-agent-order" aoid="agent-order">
<h1><span class="secnum">27.6.1</span>agent-order</h1>
<p>For a <emu-xref href="#sec-candidate-executions" id="_ref_8490"><a href="#sec-candidate-executions">candidate execution</a></emu-xref> <var>execution</var>, <var>execution</var>.[[AgentOrder]] is a <emu-xref href="#sec-set-and-relation-specification-type" id="_ref_8491"><a href="#sec-set-and-relation-specification-type">Relation</a></emu-xref> on events that satisfies the following.</p>
<ul>
<li>For each pair (<var>E</var>, <var>D</var>) in <emu-xref aoid="EventSet" id="_ref_8492"><a href="#sec-event-set">EventSet</a></emu-xref>(<var>execution</var>), (<var>E</var>, <var>D</var>) is in <var>execution</var>.[[AgentOrder]] if there is some <emu-xref href="#sec-agent-event-records" id="_ref_8493"><a href="#sec-agent-event-records">Agent Events Record</a></emu-xref> <var>aer</var> in <var>execution</var>.[[EventsRecords]] such that <var>E</var> and <var>D</var> are in <var>aer</var>.[[EventList]] and <var>E</var> is before <var>D</var> in <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8494"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> order of <var>aer</var>.[[EventList]].</li>
</ul>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Each <emu-xref href="#agent" id="_ref_8495"><a href="#agent">agent</a></emu-xref> introduces events in a per-<emu-xref href="#agent" id="_ref_8496"><a href="#agent">agent</a></emu-xref> <emu-xref href="#sec-set-and-relation-specification-type" id="_ref_8497"><a href="#sec-set-and-relation-specification-type">strict total order</a></emu-xref> during the evaluation. This is the union of those strict total orders.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-reads-bytes-from" aoid="reads-bytes-from">
<h1><span class="secnum">27.6.2</span>reads-bytes-from</h1>
<p>For a <emu-xref href="#sec-candidate-executions" id="_ref_8498"><a href="#sec-candidate-executions">candidate execution</a></emu-xref> <var>execution</var>, <var>execution</var>.[[ReadsBytesFrom]] is a semantic function from events in <emu-xref aoid="SharedDataBlockEventSet" id="_ref_8499"><a href="#sec-sharedatablockeventset">SharedDataBlockEventSet</a></emu-xref>(<var>execution</var>) to Lists of events in <emu-xref aoid="SharedDataBlockEventSet" id="_ref_8500"><a href="#sec-sharedatablockeventset">SharedDataBlockEventSet</a></emu-xref>(<var>execution</var>) that satisfies the following conditions.</p>
<ul>
<li>
<p>For each <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8501"><a href="#sec-memory-model-fundamentals">ReadSharedMemory</a></emu-xref> or <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8502"><a href="#sec-memory-model-fundamentals">ReadModifyWriteSharedMemory</a></emu-xref> event <var>R</var> in <emu-xref aoid="SharedDataBlockEventSet" id="_ref_8503"><a href="#sec-sharedatablockeventset">SharedDataBlockEventSet</a></emu-xref>(<var>execution</var>), <var>execution</var>.[[ReadsBytesFrom]](<var>R</var>) is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8504"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> of length equal to <var>R</var>.[[ElementSize]] of <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8505"><a href="#sec-memory-model-fundamentals">WriteSharedMemory</a></emu-xref> or <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8506"><a href="#sec-memory-model-fundamentals">ReadModifyWriteSharedMemory</a></emu-xref> events <var>Ws</var> such that all of the following are true.</p>
<ul>
<li>Each event <var>W</var> with index <var>i</var> in <var>Ws</var> has <var>R</var>.[[ByteIndex]] + <var>i</var> in its range.</li>
<li><var>R</var> is not in <var>Ws</var>.</li>
</ul>
</li>
</ul>
</emu-clause>
<emu-clause id="sec-reads-from" aoid="reads-from">
<h1><span class="secnum">27.6.3</span>reads-from</h1>
<p>For a <emu-xref href="#sec-candidate-executions" id="_ref_8507"><a href="#sec-candidate-executions">candidate execution</a></emu-xref> <var>execution</var>, <var>execution</var>.[[ReadsFrom]] is the least <emu-xref href="#sec-set-and-relation-specification-type" id="_ref_8508"><a href="#sec-set-and-relation-specification-type">Relation</a></emu-xref> on events that satisfies the following.</p>
<ul>
<li>For each pair (<var>R</var>, <var>W</var>) in <emu-xref aoid="SharedDataBlockEventSet" id="_ref_8509"><a href="#sec-sharedatablockeventset">SharedDataBlockEventSet</a></emu-xref>(<var>execution</var>), (<var>R</var>, <var>W</var>) is in <var>execution</var>.[[ReadsFrom]] if <var>W</var> is in <var>execution</var>.[[ReadsBytesFrom]](<var>R</var>).</li>
</ul>
</emu-clause>
<emu-clause id="sec-host-synchronizes-with" aoid="host-synchronizes-with">
<h1><span class="secnum">27.6.4</span>host-synchronizes-with</h1>
<p>For a <emu-xref href="#sec-candidate-executions" id="_ref_8510"><a href="#sec-candidate-executions">candidate execution</a></emu-xref> <var>execution</var>, <var>execution</var>.[[HostSynchronizesWith]] is a host-provided <emu-xref href="#sec-set-and-relation-specification-type" id="_ref_8511"><a href="#sec-set-and-relation-specification-type">strict partial order</a></emu-xref> on host-specific events that satisfies at least the following.</p>
<ul>
<li>If (<var>E</var>, <var>D</var>) is in <var>execution</var>.[[HostSynchronizesWith]], <var>E</var> and <var>D</var> are in <emu-xref aoid="HostEventSet" id="_ref_8512"><a href="#sec-hosteventset">HostEventSet</a></emu-xref>(<var>execution</var>).</li>
<li>There is no cycle in the union of <var>execution</var>.[[HostSynchronizesWith]] and <var>execution</var>.[[AgentOrder]].</li>
</ul>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>For two host-specific events <var>E</var> and <var>D</var>, <var>E</var> host-synchronizes-with <var>D</var> implies <var>E</var> <emu-xref aoid="happens-before" id="_ref_8513"><a href="#sec-happens-before">happens-before</a></emu-xref> <var>D</var>.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The host-synchronizes-with relation allows the host to provide additional synchronization mechanisms, such as <code>postMessage</code> between HTML workers.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-synchronizes-with" aoid="synchronizes-with">
<h1><span class="secnum">27.6.5</span>synchronizes-with</h1>
<p>For a <emu-xref href="#sec-candidate-executions" id="_ref_8514"><a href="#sec-candidate-executions">candidate execution</a></emu-xref> <var>execution</var>, <var>execution</var>.[[SynchronizesWith]] is the least <emu-xref href="#sec-set-and-relation-specification-type" id="_ref_8515"><a href="#sec-set-and-relation-specification-type">Relation</a></emu-xref> on events that satisfies the following.</p>
<ul>
<li>
For each pair (<var>R</var>, <var>W</var>) in <var>execution</var>.[[ReadsFrom]], (<var>W</var>, <var>R</var>) is in <var>execution</var>.[[SynchronizesWith]] if all the following are true.
<ul>
<li><var>R</var>.[[Order]] is <code>"SeqCst"</code>.</li>
<li><var>W</var>.[[Order]] is <code>"SeqCst"</code> or <code>"Init"</code>.</li>
<li>If <var>W</var>.[[Order]] is <code>"SeqCst"</code>, then <var>R</var> and <var>W</var> have equal ranges.</li>
<li>If <var>W</var>.[[Order]] is <code>"Init"</code>, then for each event <var>V</var> such that (<var>R</var>, <var>V</var>) is in <var>execution</var>.[[ReadsFrom]], <var>V</var>.[[Order]] is <code>"Init"</code>.</li>
</ul>
</li>
<li>
For each element <var>eventsRecord</var> of <var>execution</var>.[[EventsRecords]], the following is true.
<ul>
<li>For each pair (<var>S</var>, <var>Sw</var>) in <var>eventsRecord</var>.[[AgentSynchronizesWith]], (<var>S</var>, <var>Sw</var>) is in <var>execution</var>.[[SynchronizesWith]].</li>
</ul>
</li>
<li>For each pair (<var>E</var>, <var>D</var>) in <var>execution</var>.[[HostSynchronizesWith]], (<var>E</var>, <var>D</var>) is in <var>execution</var>.[[SynchronizesWith]].</li>
</ul>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>Owing to convention, write events synchronizes-with read events, instead of read events synchronizes-with write events.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>Not all <code>"SeqCst"</code> events related by <emu-xref aoid="reads-from" id="_ref_8516"><a href="#sec-reads-from">reads-from</a></emu-xref> are related by synchronizes-with. Only events that also have equal ranges are related by synchronizes-with.</p>
</div></emu-note>
<emu-note><span class="note">Note 3</span><div class="note-contents">
<p>For <emu-xref href="#sec-data-blocks" id="_ref_8517"><a href="#sec-data-blocks">Shared Data Block</a></emu-xref> events <var>R</var> and <var>W</var> such that <var>W</var> synchronizes-with <var>R</var>, <var>R</var> may <emu-xref aoid="reads-from" id="_ref_8518"><a href="#sec-reads-from">reads-from</a></emu-xref> other writes than <var>W</var>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-happens-before" aoid="happens-before">
<h1><span class="secnum">27.6.6</span>happens-before</h1>
<p>For a <emu-xref href="#sec-candidate-executions" id="_ref_8519"><a href="#sec-candidate-executions">candidate execution</a></emu-xref> <var>execution</var>, <var>execution</var>.[[HappensBefore]] is the least <emu-xref href="#sec-set-and-relation-specification-type" id="_ref_8520"><a href="#sec-set-and-relation-specification-type">Relation</a></emu-xref> on events that satisfies the following.</p>
<ul>
<li>For each pair (<var>E</var>, <var>D</var>) in <var>execution</var>.[[AgentOrder]], (<var>E</var>, <var>D</var>) is in <var>execution</var>.[[HappensBefore]].</li>
<li>For each pair (<var>E</var>, <var>D</var>) in <var>execution</var>.[[SynchronizesWith]], (<var>E</var>, <var>D</var>) is in <var>execution</var>.[[HappensBefore]].</li>
<li>For each pair (<var>E</var>, <var>D</var>) in <emu-xref aoid="SharedDataBlockEventSet" id="_ref_8521"><a href="#sec-sharedatablockeventset">SharedDataBlockEventSet</a></emu-xref>(<var>execution</var>), (<var>E</var>, <var>D</var>) is in <var>execution</var>.[[HappensBefore]] if <var>E</var>.[[Order]] is <code>"Init"</code> and <var>E</var> and <var>D</var> have overlapping ranges.</li>
<li>For each pair (<var>E</var>, <var>D</var>) in <emu-xref aoid="EventSet" id="_ref_8522"><a href="#sec-event-set">EventSet</a></emu-xref>(<var>execution</var>), (<var>E</var>, <var>D</var>) is in <var>execution</var>.[[HappensBefore]] if there is an event <var>F</var> such that the pairs (<var>E</var>, <var>F</var>) and (<var>F</var>, <var>D</var>) are in <var>execution</var>.[[HappensBefore]].</li>
</ul>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Because happens-before is a superset of <emu-xref aoid="agent-order" id="_ref_8523"><a href="#sec-agent-order">agent-order</a></emu-xref>, candidate executions are consistent with the single-thread evaluation semantics of ECMAScript.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-valid-executions">
<h1><span class="secnum">27.7</span>Properties of Valid Executions</h1>
<emu-clause id="sec-valid-chosen-reads">
<h1><span class="secnum">27.7.1</span>Valid Chosen Reads</h1>
<p>A <emu-xref href="#sec-candidate-executions" id="_ref_8524"><a href="#sec-candidate-executions">candidate execution</a></emu-xref> <var>execution</var> has valid chosen reads if the following abstract operation returns <emu-val>true</emu-val>.</p>
<emu-alg><ol><li>For each <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8525"><a href="#sec-memory-model-fundamentals">ReadSharedMemory</a></emu-xref> or <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8526"><a href="#sec-memory-model-fundamentals">ReadModifyWriteSharedMemory</a></emu-xref> event <var>R</var> in <emu-xref aoid="SharedDataBlockEventSet" id="_ref_8527"><a href="#sec-sharedatablockeventset">SharedDataBlockEventSet</a></emu-xref>(<var>execution</var>), do<ol><li>Let <var>chosenValueRecord</var> be the element of <var>execution</var>.[[ChosenValues]] whose [[Event]] field is <var>R</var>.</li><li>Let <var>chosenValue</var> be <var>chosenValueRecord</var>.[[ChosenValue]].</li><li>Let <var>readValue</var> be <emu-xref aoid="ValueOfReadEvent" id="_ref_8528"><a href="#sec-valueofreadevent">ValueOfReadEvent</a></emu-xref>(<var>execution</var>, <var>R</var>).</li><li>Let <var>chosenLen</var> be the number of elements of <var>chosenValue</var>.</li><li>Let <var>readLen</var> be the number of elements of <var>readValue</var>.</li><li>If <var>chosenLen</var> is not equal to <var>readLen</var>, then<ol><li>Return <emu-val>false</emu-val>.</li></ol></li><li>If <var>chosenValue</var>[<var>i</var>] is not equal to <var>readValue</var>[<var>i</var>] for any integer value <var>i</var> in the range 0 through <var>chosenLen</var>, exclusive, then<ol><li>Return <emu-val>false</emu-val>.</li></ol></li></ol></li><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-coherent-reads">
<h1><span class="secnum">27.7.2</span>Coherent Reads</h1>
<p>A <emu-xref href="#sec-candidate-executions" id="_ref_8529"><a href="#sec-candidate-executions">candidate execution</a></emu-xref> <var>execution</var> has coherent reads if the following abstract operation returns <emu-val>true</emu-val>.</p>
<emu-alg><ol><li>For each <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8530"><a href="#sec-memory-model-fundamentals">ReadSharedMemory</a></emu-xref> or <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8531"><a href="#sec-memory-model-fundamentals">ReadModifyWriteSharedMemory</a></emu-xref> event <var>R</var> in <emu-xref aoid="SharedDataBlockEventSet" id="_ref_8532"><a href="#sec-sharedatablockeventset">SharedDataBlockEventSet</a></emu-xref>(<var>execution</var>), do<ol><li>Let <var>Ws</var> be <var>execution</var>.[[ReadsBytesFrom]](<var>R</var>).</li><li>Let <var>byteLocation</var> be <var>R</var>.[[ByteIndex]].</li><li>For each element <var>W</var> of <var>Ws</var> in <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8533"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> order, do<ol><li>If (<var>R</var>, <var>W</var>) is in <var>execution</var>.[[HappensBefore]], then<ol><li>Return <emu-val>false</emu-val>.</li></ol></li><li>If there is a <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8534"><a href="#sec-memory-model-fundamentals">WriteSharedMemory</a></emu-xref> or <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8535"><a href="#sec-memory-model-fundamentals">ReadModifyWriteSharedMemory</a></emu-xref> event <var>V</var> that has <var>byteLocation</var> in its range such that the pairs (<var>W</var>, <var>V</var>) and (<var>V</var>, <var>R</var>) are in <var>execution</var>.[[HappensBefore]], then<ol><li>Return <emu-val>false</emu-val>.</li></ol></li><li>Increment <var>byteLocation</var> by 1.</li></ol></li></ol></li><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-tear-free-aligned-reads">
<h1><span class="secnum">27.7.3</span>Tear Free Reads</h1>
<p>A <emu-xref href="#sec-candidate-executions" id="_ref_8536"><a href="#sec-candidate-executions">candidate execution</a></emu-xref> <var>execution</var> has tear free reads if the following abstract operation returns <emu-val>true</emu-val>.</p>
<emu-alg><ol><li>For each <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8537"><a href="#sec-memory-model-fundamentals">ReadSharedMemory</a></emu-xref> or <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8538"><a href="#sec-memory-model-fundamentals">ReadModifyWriteSharedMemory</a></emu-xref> event <var>R</var> in <emu-xref aoid="SharedDataBlockEventSet" id="_ref_8539"><a href="#sec-sharedatablockeventset">SharedDataBlockEventSet</a></emu-xref>(<var>execution</var>), do<ol><li>If <var>R</var>.[[NoTear]] is <emu-val>true</emu-val>, then<ol><li><emu-xref href="#assert" id="_ref_8540"><a href="#assert">Assert</a></emu-xref>: The remainder of dividing <var>R</var>.[[ByteIndex]] by <var>R</var>.[[ElementSize]] is 0.</li><li>For each event <var>W</var> such that (<var>R</var>, <var>W</var>) is in <var>execution</var>.[[ReadsFrom]] and <var>W</var>.[[NoTear]] is <emu-val>true</emu-val>, do<ol><li>If <var>R</var> and <var>W</var> have equal ranges, and there is an event <var>V</var> such that <var>V</var> and <var>W</var> have equal ranges, <var>V</var>.[[NoTear]] is <emu-val>true</emu-val>, <var>W</var> is not <var>V</var>, and (<var>R</var>, <var>V</var>) is in <var>execution</var>.[[ReadsFrom]], then<ol><li>Return <emu-val>false</emu-val>.</li></ol></li></ol></li></ol></li></ol></li><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>An event's [[NoTear]] field is <emu-val>true</emu-val> when that event was introduced via accessing an integer TypedArray, and <emu-val>false</emu-val> when introduced via accessing a floating point TypedArray or DataView.</p>
<p>Intuitively, this requirement says when a memory range is
accessed in an aligned fashion via an integer TypedArray, a single write
event on that range must "win" when in a data race with other write
events with equal ranges. More precisely, this requirement says an
aligned read event cannot read a value composed of bytes from multiple,
different write events all with equal ranges. It is possible, however,
for an aligned read event to read from multiple write events with
overlapping ranges.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-memory-order" aoid="memory-order">
<h1><span class="secnum">27.7.4</span>Sequentially Consistent Atomics</h1>
<p>For a <emu-xref href="#sec-candidate-executions" id="_ref_8541"><a href="#sec-candidate-executions">candidate execution</a></emu-xref> <var>execution</var>, memory-order is a <emu-xref href="#sec-set-and-relation-specification-type" id="_ref_8542"><a href="#sec-set-and-relation-specification-type">strict total order</a></emu-xref> of all events in <emu-xref aoid="EventSet" id="_ref_8543"><a href="#sec-event-set">EventSet</a></emu-xref>(<var>execution</var>) that satisfies the following.</p>
<ul>
<li>For each pair (<var>E</var>, <var>D</var>) in <var>execution</var>.[[HappensBefore]], (<var>E</var>, <var>D</var>) is in memory-order.</li>
<li>
<p>For each pair (<var>E</var>, <var>D</var>) in <var>execution</var>.[[SynchronizesWith]], (<var>E</var>, <var>D</var>) is in memory-order if there is no <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8544"><a href="#sec-memory-model-fundamentals">WriteSharedMemory</a></emu-xref> or <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8545"><a href="#sec-memory-model-fundamentals">ReadModifyWriteSharedMemory</a></emu-xref> event <var>W</var> in <emu-xref aoid="SharedDataBlockEventSet" id="_ref_8546"><a href="#sec-sharedatablockeventset">SharedDataBlockEventSet</a></emu-xref>(<var>execution</var>) with equal range as <var>D</var> such that <var>W</var> is not <var>E</var>, and the pairs (<var>E</var>, <var>W</var>) and (<var>W</var>, <var>D</var>) are in memory-order.</p>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>This clause additionally constrains <code>"SeqCst"</code> events on equal ranges.</p>
</div></emu-note>
</li>
<li>
<p>For each <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8547"><a href="#sec-memory-model-fundamentals">WriteSharedMemory</a></emu-xref> or <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8548"><a href="#sec-memory-model-fundamentals">ReadModifyWriteSharedMemory</a></emu-xref> event <var>W</var> in <emu-xref aoid="SharedDataBlockEventSet" id="_ref_8549"><a href="#sec-sharedatablockeventset">SharedDataBlockEventSet</a></emu-xref>(<var>execution</var>), if <var>W</var>.[[Order]] is <code>"SeqCst"</code>, then it is not the case that there is an infinite number of <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8550"><a href="#sec-memory-model-fundamentals">ReadSharedMemory</a></emu-xref> or <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8551"><a href="#sec-memory-model-fundamentals">ReadModifyWriteSharedMemory</a></emu-xref> events in <emu-xref aoid="SharedDataBlockEventSet" id="_ref_8552"><a href="#sec-sharedatablockeventset">SharedDataBlockEventSet</a></emu-xref>(<var>execution</var>) with equal range that is memory-order before <var>W</var>.</p>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>This clause together with the forward progress guarantee on agents ensure the liveness condition that <code>"SeqCst"</code> writes become visible to <code>"SeqCst"</code> reads with equal range in finite time.</p>
</div></emu-note>
</li>
</ul>
<p>A <emu-xref href="#sec-candidate-executions" id="_ref_8553"><a href="#sec-candidate-executions">candidate execution</a></emu-xref> has sequentially consistent atomics if a memory-order exists.</p>
<emu-note><span class="note">Note 3</span><div class="note-contents">
<p>While memory-order includes all events in <emu-xref aoid="EventSet" id="_ref_8554"><a href="#sec-event-set">EventSet</a></emu-xref>(<var>execution</var>), those that are not constrained by <emu-xref aoid="happens-before" id="_ref_8555"><a href="#sec-happens-before">happens-before</a></emu-xref> or <emu-xref aoid="synchronizes-with" id="_ref_8556"><a href="#sec-synchronizes-with">synchronizes-with</a></emu-xref> are allowed to occur anywhere in the order.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-valid-executions">
<h1><span class="secnum">27.7.5</span>Valid Executions</h1>
<p>A <emu-xref href="#sec-candidate-executions" id="_ref_8557"><a href="#sec-candidate-executions">candidate execution</a></emu-xref> <var>execution</var> is a valid execution (or simply an execution) if all of the following are true.</p>
<ul>
<li>The host provides a <emu-xref aoid="host-synchronizes-with" id="_ref_8558"><a href="#sec-host-synchronizes-with">host-synchronizes-with</a></emu-xref> <emu-xref href="#sec-set-and-relation-specification-type" id="_ref_8559"><a href="#sec-set-and-relation-specification-type">Relation</a></emu-xref> for <var>execution</var>.[[HostSynchronizesWith]].</li>
<li><var>execution</var>.[[HappensBefore]] is a <emu-xref href="#sec-set-and-relation-specification-type" id="_ref_8560"><a href="#sec-set-and-relation-specification-type">strict partial order</a></emu-xref>.</li>
<li><var>execution</var> has valid chosen reads.</li>
<li><var>execution</var> has coherent reads.</li>
<li><var>execution</var> has tear free reads.</li>
<li><var>execution</var> has sequentially consistent atomics.</li>
</ul>
<p>All programs have at least one valid execution.</p>
</emu-clause>
</emu-clause>
<emu-clause id="sec-races">
<h1><span class="secnum">27.8</span>Races</h1>
<p>For an execution <var>execution</var>, two events <var>E</var> and <var>D</var> in <emu-xref aoid="SharedDataBlockEventSet" id="_ref_8561"><a href="#sec-sharedatablockeventset">SharedDataBlockEventSet</a></emu-xref>(<var>execution</var>) are in a race if the following abstract operation returns <emu-val>true</emu-val>.</p>
<emu-alg><ol><li>If <var>E</var> is not <var>D</var>, then<ol><li>If the pairs (<var>E</var>, <var>D</var>) and (<var>D</var>, <var>E</var>) are not in <var>execution</var>.[[HappensBefore]], then<ol><li>If <var>E</var> and <var>D</var> are both <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8562"><a href="#sec-memory-model-fundamentals">WriteSharedMemory</a></emu-xref> or <emu-xref href="#sec-memory-model-fundamentals" id="_ref_8563"><a href="#sec-memory-model-fundamentals">ReadModifyWriteSharedMemory</a></emu-xref> events and <var>E</var> and <var>D</var> do not have disjoint ranges, then<ol><li>Return <emu-val>true</emu-val>.</li></ol></li><li>If either (<var>E</var>, <var>D</var>) or (<var>D</var>, <var>E</var>) is in <var>execution</var>.[[ReadsFrom]], then<ol><li>Return <emu-val>true</emu-val>.</li></ol></li></ol></li></ol></li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-data-races">
<h1><span class="secnum">27.9</span>Data Races</h1>
<p>For an execution <var>execution</var>, two events <var>E</var> and <var>D</var> in <emu-xref aoid="SharedDataBlockEventSet" id="_ref_8564"><a href="#sec-sharedatablockeventset">SharedDataBlockEventSet</a></emu-xref>(<var>execution</var>) are in a data race if the following abstract operation returns <emu-val>true</emu-val>.</p>
<emu-alg><ol><li>If <var>E</var> and <var>D</var> are in a race in <var>execution</var>, then<ol><li>If <var>E</var>.[[Order]] is not <code>"SeqCst"</code> or <var>D</var>.[[Order]] is not <code>"SeqCst"</code>, then<ol><li>Return <emu-val>true</emu-val>.</li></ol></li><li>If <var>E</var> and <var>D</var> have overlapping ranges, then<ol><li>Return <emu-val>true</emu-val>.</li></ol></li></ol></li><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-data-race-freedom">
<h1><span class="secnum">27.10</span>Data Race Freedom</h1>
<p>An execution <var>execution</var> is data race free if there are no two events in <emu-xref aoid="SharedDataBlockEventSet" id="_ref_8565"><a href="#sec-sharedatablockeventset">SharedDataBlockEventSet</a></emu-xref>(<var>execution</var>) that are in a data race.</p>
<p>A program is data race free if all its executions are data race free.</p>
<p>The <emu-xref href="#sec-memory-model" id="_ref_8566"><a href="#sec-memory-model">memory model</a></emu-xref> guarantees sequential consistency of all events for data race free programs.</p>
</emu-clause>
<emu-clause id="sec-shared-memory-guidelines">
<h1><span class="secnum">27.11</span>Shared Memory Guidelines</h1>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>The following are guidelines for ECMAScript programmers working with shared memory.</p>
<p>We recommend programs be kept data race free, i.e., make it so
that it is impossible for there to be concurrent non-atomic operations
on the same memory location. Data race free programs have interleaving
semantics where each step in the evaluation semantics of each <emu-xref href="#agent" id="_ref_8567"><a href="#agent">agent</a></emu-xref> are interleaved with each other. For data race free programs, it is not necessary to understand the details of the <emu-xref href="#sec-memory-model" id="_ref_8568"><a href="#sec-memory-model">memory model</a></emu-xref>. The details are unlikely to build intuition that will help one to better write ECMAScript.</p>
<p>More generally, even if a program is not data race free it may
have predictable behaviour, so long as atomic operations are not
involved in any data races and the operations that race all have the
same access size. The simplest way to arrange for atomics not to be
involved in races is to ensure that different memory cells are used by
atomic and non-atomic operations and that atomic accesses of different
sizes are not used to access the same cells at the same time.
Effectively, the program should treat shared memory as strongly typed as
much as possible. One still cannot depend on the ordering and timing of
non-atomic accesses that race, but if memory is treated as strongly
typed the racing accesses will not "tear" (bits of their values will not
be mixed).</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The following are guidelines for ECMAScript implementers writing compiler transformations for programs using shared memory.</p>
<p>It is desirable to allow most program transformations that are valid in a single-<emu-xref href="#agent" id="_ref_8569"><a href="#agent">agent</a></emu-xref> setting in a multi-<emu-xref href="#agent" id="_ref_8570"><a href="#agent">agent</a></emu-xref> setting, to ensure that the performance of each <emu-xref href="#agent" id="_ref_8571"><a href="#agent">agent</a></emu-xref> in a multi-<emu-xref href="#agent" id="_ref_8572"><a href="#agent">agent</a></emu-xref> program is as good as it would be in a single-<emu-xref href="#agent" id="_ref_8573"><a href="#agent">agent</a></emu-xref>
setting. Frequently these transformations are hard to judge. We outline
some rules about program transformations that are intended to be taken
as normative (in that they are implied by the <emu-xref href="#sec-memory-model" id="_ref_8574"><a href="#sec-memory-model">memory model</a></emu-xref> or stronger than what the <emu-xref href="#sec-memory-model" id="_ref_8575"><a href="#sec-memory-model">memory model</a></emu-xref>
implies) but which are likely not exhaustive. These rules are intended
to apply to program transformations that precede the introductions of
the events that make up the <emu-xref aoid="agent-order" id="_ref_8576"><a href="#sec-agent-order">agent-order</a></emu-xref>.</p>
<p>Let an <dfn>agent-order slice</dfn> be the subset of the <emu-xref aoid="agent-order" id="_ref_8577"><a href="#sec-agent-order">agent-order</a></emu-xref> pertaining to a single <emu-xref href="#agent" id="_ref_8578"><a href="#agent">agent</a></emu-xref>.</p>
<p>Let <dfn>possible read values</dfn> of a read event be the set of all values of <emu-xref aoid="ValueOfReadEvent" id="_ref_8579"><a href="#sec-valueofreadevent">ValueOfReadEvent</a></emu-xref> for that event across all valid executions.</p>
<p>Any transformation of an agent-order slice that is valid in the
absence of shared memory is valid in the presence of shared memory,
with the following exceptions.</p>
<ul>
<li>
<p><em>Atomics are carved in stone</em>: Program transformations must not cause the <code>"SeqCst"</code> events in an agent-order slice to be reordered with its <code>"Unordered"</code> operations, nor its <code>"SeqCst"</code> operations to be reordered with each other, nor may a program transformation remove a <code>"SeqCst"</code> operation from the <emu-xref aoid="agent-order" id="_ref_8580"><a href="#sec-agent-order">agent-order</a></emu-xref>.</p>
<p>(In practice, the prohibition on reorderings forces a compiler to assume that every <code>"SeqCst"</code> operation is a synchronization and included in the final <emu-xref aoid="memory-order" id="_ref_8581"><a href="#sec-memory-order">memory-order</a></emu-xref>, which it would usually have to assume anyway in the absence of inter-<emu-xref href="#agent" id="_ref_8582"><a href="#agent">agent</a></emu-xref> program analysis. It also forces the compiler to assume that every call where the callee's effects on the <emu-xref aoid="memory-order" id="_ref_8583"><a href="#sec-memory-order">memory-order</a></emu-xref> are unknown may contain <code>"SeqCst"</code> operations.)</p>
</li>
<li>
<p><em>Reads must be stable</em>: Any given shared memory read must only observe a single value in an execution.</p>
<p>(For example, if what is semantically a single read in the
program is executed multiple times then the program is subsequently
allowed to observe only one of the values read. A transformation known
as rematerialization can violate this rule.)</p>
</li>
<li>
<p><em>Writes must be stable</em>: All observable writes to shared memory must follow from program semantics in an execution.</p>
<p>(For example, a transformation may not introduce certain
observable writes, such as by using read-modify-write operations on a
larger location to write a smaller datum, writing a value to memory that
the program could not have written, or writing a just-read value back
to the location it was read from, if that location could have been
overwritten by another <emu-xref href="#agent" id="_ref_8584"><a href="#agent">agent</a></emu-xref> after the read.)</p>
</li>
<li>
<p><em>Possible read values must be nonempty</em>: Program transformations cannot cause the possible read values of a shared memory read to become empty.</p>
<p>(Counterintuitively, this rule in effect restricts transformations on writes, because writes have force in <emu-xref href="#sec-memory-model" id="_ref_8585"><a href="#sec-memory-model">memory model</a></emu-xref> insofar as to be read by read events. For example, writes may be moved and coalesced and sometimes reordered between two <code>"SeqCst"</code> operations, but the transformation may not remove every write that updates a location; some write must be preserved.)</p>
</li>
</ul>
<p>Examples of transformations that remain valid are: merging
multiple non-atomic reads from the same location, reordering non-atomic
reads, introducing speculative non-atomic reads, merging multiple
non-atomic writes to the same location, reordering non-atomic writes to
different locations, and hoisting non-atomic reads out of loops even if
that affects termination. Note in general that aliased TypedArrays make
it hard to prove that locations are different.</p>
</div></emu-note>
<emu-note><span class="note">Note 3</span><div class="note-contents">
<p>The following are guidelines for ECMAScript implementers generating machine code for shared memory accesses.</p>
<p>For architectures with memory models no weaker than those of
ARM or Power, non-atomic stores and loads may be compiled to bare stores
and loads on the target architecture. Atomic stores and loads may be
compiled down to instructions that guarantee sequential consistency. If
no such instructions exist, memory barriers are to be employed, such as
placing barriers on both sides of a bare store or load.
Read-modify-write operations may be compiled to read-modify-write
instructions on the target architectrue, such as <code>LOCK</code>-prefixed
instructions on x86, load-exclusive/store-exclusive instructions on
ARM, and load-link/store-conditional instructions on Power.</p>
<p>Specifically, the <emu-xref href="#sec-memory-model" id="_ref_8586"><a href="#sec-memory-model">memory model</a></emu-xref> is intended to allow code generation as follows.</p>
<ul>
<li>Every atomic operation in the program is assumed to be necessary.</li>
<li>Atomic operations are never rearranged with each other or with non-atomic operations.</li>
<li>Functions are always assumed to perform atomic operations.</li>
<li>Atomic operations are never implemented as read-modify-write
operations on larger data, but as non-lock-free atomics if the platform
does not have atomic operations of the appropriate size. (We already
assume that every platform has normal memory access operations of every
interesting size.)</li>
</ul>
<p>Naive code generation uses these patterns:</p>
<ul>
<li>Regular loads and stores compile to single load and store instructions.</li>
<li>Lock-free atomic loads and stores compile to a full (sequentially consistent) fence, a regular load or store, and a full fence.</li>
<li>Lock-free atomic read-modify-write accesses compile to a
full fence, an atomic read-modify-write instruction sequence, and a full
fence.</li>
<li>Non-lock-free atomics compile to a spinlock acquire, a full
fence, a series of non-atomic load and store instructions, a full fence,
and a spinlock release.</li>
</ul>
<p>That mapping is correct so long as an atomic operation on an
address range does not race with a non-atomic write or with an atomic
operation of different size. However, that is all we need: the <emu-xref href="#sec-memory-model" id="_ref_8587"><a href="#sec-memory-model">memory model</a></emu-xref>
effectively demotes the atomic operations involved in a race to
non-atomic status. On the other hand, the naive mapping is quite strong:
it allows atomic operations to be used as sequentially consistent
fences, which the <emu-xref href="#sec-memory-model" id="_ref_8588"><a href="#sec-memory-model">memory model</a></emu-xref> does not actually guarantee.</p>
<p>A number of local improvements to those basic patterns are also intended to be legal:</p>
<ul>
<li>There are obvious platform-dependent improvements that
remove redundant fences. For example, on x86 the fences around
lock-free atomic loads and stores can always be omitted except for the
fence following a store, and no fence is needed for lock-free
read-modify-write instructions, as these all use LOCK-prefixed
instructions. On many platforms there are fences of several strengths,
and weaker fences can be used in certain contexts without destroying
sequential consistency.</li>
<li>Most modern platforms support lock-free atomics for all the
data sizes required by ECMAScript atomics. Should non-lock-free atomics
be needed, the fences surrounding the body of the atomic operation can
usually be folded into the lock and unlock steps. The simplest solution
for non-lock-free atomics is to have a single lock word per
SharedArrayBuffer.</li>
<li>There are also more complicated platform-dependent local
improvements, requiring some code analysis. For example, two
back-to-back fences often have the same effect as a single fence, so if
code is generated for two atomic operations in sequence, only a single
fence need separate them. On x86, even a single fence separating atomic
stores can be omitted, as the fence following a store is only needed to
separate the store from a subsequent load.</li>
</ul>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-annex id="sec-grammar-summary">
<h1><span class="secnum">A</span>Grammar Summary</h1>
<emu-annex id="sec-lexical-grammar">
<h1><span class="secnum">A.1</span>Lexical Grammar</h1>
<emu-production name="SourceCharacter" type="lexical">
<emu-nt><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="c64b38bd"><emu-gprose>any Unicode code point</emu-gprose></emu-rhs>
</emu-production>
<emu-production name="InputElementDiv" type="lexical">
<emu-nt><a href="#prod-InputElementDiv">InputElementDiv</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="1424dc49"><emu-nt><a href="#prod-WhiteSpace">WhiteSpace</a></emu-nt></emu-rhs>
<emu-rhs a="3b331ccd"><emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt></emu-rhs>
<emu-rhs a="153d7a58"><emu-nt><a href="#prod-Comment">Comment</a></emu-nt></emu-rhs>
<emu-rhs a="83158895"><emu-nt><a href="#prod-CommonToken">CommonToken</a></emu-nt></emu-rhs>
<emu-rhs a="28035084"><emu-nt><a href="#prod-DivPunctuator">DivPunctuator</a></emu-nt></emu-rhs>
<emu-rhs a="121314a7"><emu-nt><a href="#prod-RightBracePunctuator">RightBracePunctuator</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="InputElementRegExp" type="lexical">
<emu-nt><a href="#prod-InputElementRegExp">InputElementRegExp</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="1424dc49"><emu-nt><a href="#prod-WhiteSpace">WhiteSpace</a></emu-nt></emu-rhs>
<emu-rhs a="3b331ccd"><emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt></emu-rhs>
<emu-rhs a="153d7a58"><emu-nt><a href="#prod-Comment">Comment</a></emu-nt></emu-rhs>
<emu-rhs a="83158895"><emu-nt><a href="#prod-CommonToken">CommonToken</a></emu-nt></emu-rhs>
<emu-rhs a="121314a7"><emu-nt><a href="#prod-RightBracePunctuator">RightBracePunctuator</a></emu-nt></emu-rhs>
<emu-rhs a="31b672e8"><emu-nt><a href="#prod-RegularExpressionLiteral">RegularExpressionLiteral</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="InputElementRegExpOrTemplateTail" type="lexical">
<emu-nt><a href="#prod-InputElementRegExpOrTemplateTail">InputElementRegExpOrTemplateTail</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="1424dc49"><emu-nt><a href="#prod-WhiteSpace">WhiteSpace</a></emu-nt></emu-rhs>
<emu-rhs a="3b331ccd"><emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt></emu-rhs>
<emu-rhs a="153d7a58"><emu-nt><a href="#prod-Comment">Comment</a></emu-nt></emu-rhs>
<emu-rhs a="83158895"><emu-nt><a href="#prod-CommonToken">CommonToken</a></emu-nt></emu-rhs>
<emu-rhs a="31b672e8"><emu-nt><a href="#prod-RegularExpressionLiteral">RegularExpressionLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="62ae6eb9"><emu-nt><a href="#prod-TemplateSubstitutionTail">TemplateSubstitutionTail</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="InputElementTemplateTail" type="lexical">
<emu-nt><a href="#prod-InputElementTemplateTail">InputElementTemplateTail</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="1424dc49"><emu-nt><a href="#prod-WhiteSpace">WhiteSpace</a></emu-nt></emu-rhs>
<emu-rhs a="3b331ccd"><emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt></emu-rhs>
<emu-rhs a="153d7a58"><emu-nt><a href="#prod-Comment">Comment</a></emu-nt></emu-rhs>
<emu-rhs a="83158895"><emu-nt><a href="#prod-CommonToken">CommonToken</a></emu-nt></emu-rhs>
<emu-rhs a="28035084"><emu-nt><a href="#prod-DivPunctuator">DivPunctuator</a></emu-nt></emu-rhs>
<emu-rhs a="62ae6eb9"><emu-nt><a href="#prod-TemplateSubstitutionTail">TemplateSubstitutionTail</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="WhiteSpace" type="lexical">
<emu-nt><a href="#prod-WhiteSpace">WhiteSpace</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="819ea3fd"><emu-gprose>&lt;TAB&gt;</emu-gprose></emu-rhs>
<emu-rhs a="156dc7da"><emu-gprose>&lt;VT&gt;</emu-gprose></emu-rhs>
<emu-rhs a="77b516c0"><emu-gprose>&lt;FF&gt;</emu-gprose></emu-rhs>
<emu-rhs a="6a85afed"><emu-gprose>&lt;SP&gt;</emu-gprose></emu-rhs>
<emu-rhs a="63dd44af"><emu-gprose>&lt;NBSP&gt;</emu-gprose></emu-rhs>
<emu-rhs a="b09e901a"><emu-gprose>&lt;ZWNBSP&gt;</emu-gprose></emu-rhs>
<emu-rhs a="e7de22a4"><emu-gprose>&lt;USP&gt;</emu-gprose></emu-rhs>
</emu-production>
<emu-production name="LineTerminator" type="lexical">
<emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="df188a5e"><emu-gprose>&lt;LF&gt;</emu-gprose></emu-rhs>
<emu-rhs a="6bb44f60"><emu-gprose>&lt;CR&gt;</emu-gprose></emu-rhs>
<emu-rhs a="85df8467"><emu-gprose>&lt;LS&gt;</emu-gprose></emu-rhs>
<emu-rhs a="be2ab9fa"><emu-gprose>&lt;PS&gt;</emu-gprose></emu-rhs>
</emu-production>
<emu-production name="LineTerminatorSequence" type="lexical">
<emu-nt><a href="#prod-LineTerminatorSequence">LineTerminatorSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="df188a5e"><emu-gprose>&lt;LF&gt;</emu-gprose></emu-rhs>
<emu-rhs a="64077750"><emu-gprose>&lt;CR&gt;</emu-gprose><emu-gann>[lookahead ≠ <emu-gprose>&lt;LF&gt;</emu-gprose>]</emu-gann></emu-rhs>
<emu-rhs a="85df8467"><emu-gprose>&lt;LS&gt;</emu-gprose></emu-rhs>
<emu-rhs a="be2ab9fa"><emu-gprose>&lt;PS&gt;</emu-gprose></emu-rhs>
<emu-rhs a="253de229"><emu-gprose>&lt;CR&gt;</emu-gprose><emu-gprose>&lt;LF&gt;</emu-gprose></emu-rhs>
</emu-production>
<emu-production name="Comment" type="lexical">
<emu-nt><a href="#prod-Comment">Comment</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="b221187a"><emu-nt><a href="#prod-MultiLineComment">MultiLineComment</a></emu-nt></emu-rhs>
<emu-rhs a="49272b29"><emu-nt><a href="#prod-SingleLineComment">SingleLineComment</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="MultiLineComment" type="lexical">
<emu-nt><a href="#prod-MultiLineComment">MultiLineComment</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="1e164ceb"><emu-t>/*</emu-t><emu-nt optional=""><a href="#prod-MultiLineCommentChars">MultiLineCommentChars</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>*/</emu-t></emu-rhs>
</emu-production>
<emu-production name="MultiLineCommentChars" type="lexical">
<emu-nt><a href="#prod-MultiLineCommentChars">MultiLineCommentChars</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="24a6effb"><emu-nt><a href="#prod-MultiLineNotAsteriskChar">MultiLineNotAsteriskChar</a></emu-nt><emu-nt optional=""><a href="#prod-MultiLineCommentChars">MultiLineCommentChars</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="6fcb6b58"><emu-t>*</emu-t><emu-nt optional=""><a href="#prod-PostAsteriskCommentChars">PostAsteriskCommentChars</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="PostAsteriskCommentChars" type="lexical">
<emu-nt><a href="#prod-PostAsteriskCommentChars">PostAsteriskCommentChars</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="25615007"><emu-nt><a href="#prod-MultiLineNotForwardSlashOrAsteriskChar">MultiLineNotForwardSlashOrAsteriskChar</a></emu-nt><emu-nt optional=""><a href="#prod-MultiLineCommentChars">MultiLineCommentChars</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="6fcb6b58"><emu-t>*</emu-t><emu-nt optional=""><a href="#prod-PostAsteriskCommentChars">PostAsteriskCommentChars</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="MultiLineNotAsteriskChar" type="lexical">
<emu-nt><a href="#prod-MultiLineNotAsteriskChar">MultiLineNotAsteriskChar</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="9452de17"><emu-nt><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-gmod>but not <emu-t>*</emu-t></emu-gmod></emu-rhs>
</emu-production>
<emu-production name="MultiLineNotForwardSlashOrAsteriskChar" type="lexical">
<emu-nt><a href="#prod-MultiLineNotForwardSlashOrAsteriskChar">MultiLineNotForwardSlashOrAsteriskChar</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="1dd7e7ae"><emu-nt><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-gmod>but not one of <emu-t>/</emu-t> or <emu-t>*</emu-t></emu-gmod></emu-rhs>
</emu-production>
<emu-production name="SingleLineComment" type="lexical">
<emu-nt><a href="#prod-SingleLineComment">SingleLineComment</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="53edd61c"><emu-t>//</emu-t><emu-nt optional=""><a href="#prod-SingleLineCommentChars">SingleLineCommentChars</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="SingleLineCommentChars" type="lexical">
<emu-nt><a href="#prod-SingleLineCommentChars">SingleLineCommentChars</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="4521d447"><emu-nt><a href="#prod-SingleLineCommentChar">SingleLineCommentChar</a></emu-nt><emu-nt optional=""><a href="#prod-SingleLineCommentChars">SingleLineCommentChars</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="SingleLineCommentChar" type="lexical">
<emu-nt><a href="#prod-SingleLineCommentChar">SingleLineCommentChar</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="2d5bdfa7"><emu-nt><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-gmod>but not <emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt></emu-gmod></emu-rhs>
</emu-production>
<emu-production name="CommonToken" type="lexical">
<emu-nt><a href="#prod-CommonToken">CommonToken</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="0ebb31e2"><emu-nt><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
<emu-rhs a="ee18f3d6"><emu-nt><a href="#prod-Punctuator">Punctuator</a></emu-nt></emu-rhs>
<emu-rhs a="a548b407"><emu-nt><a href="#prod-NumericLiteral">NumericLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="5c74e54d"><emu-nt><a href="#prod-StringLiteral">StringLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="3ec1ae06"><emu-nt><a href="#prod-Template">Template</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="IdentifierName" type="lexical">
<emu-nt><a href="#prod-IdentifierName">IdentifierName</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="434685ab"><emu-nt><a href="#prod-IdentifierStart">IdentifierStart</a></emu-nt></emu-rhs>
<emu-rhs a="700c1cee"><emu-nt><a href="#prod-IdentifierName">IdentifierName</a></emu-nt><emu-nt><a href="#prod-IdentifierPart">IdentifierPart</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="IdentifierStart" type="lexical">
<emu-nt><a href="#prod-IdentifierStart">IdentifierStart</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="0862e30c"><emu-nt><a href="#prod-UnicodeIDStart">UnicodeIDStart</a></emu-nt></emu-rhs>
<emu-rhs a="1262cc92"><emu-t>$</emu-t></emu-rhs>
<emu-rhs a="07564b94"><emu-t>_</emu-t></emu-rhs>
<emu-rhs a="6fbc8b19"><emu-t>\</emu-t><emu-nt><a href="#prod-UnicodeEscapeSequence">UnicodeEscapeSequence</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="IdentifierPart" type="lexical">
<emu-nt><a href="#prod-IdentifierPart">IdentifierPart</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="364ac675"><emu-nt><a href="#prod-UnicodeIDContinue">UnicodeIDContinue</a></emu-nt></emu-rhs>
<emu-rhs a="1262cc92"><emu-t>$</emu-t></emu-rhs>
<emu-rhs a="6fbc8b19"><emu-t>\</emu-t><emu-nt><a href="#prod-UnicodeEscapeSequence">UnicodeEscapeSequence</a></emu-nt></emu-rhs>
<emu-rhs a="a321d28b"><emu-gprose>&lt;ZWNJ&gt;</emu-gprose></emu-rhs>
<emu-rhs a="9543f0aa"><emu-gprose>&lt;ZWJ&gt;</emu-gprose></emu-rhs>
</emu-production>
<emu-production name="UnicodeIDStart" type="lexical">
<emu-nt><a href="#prod-UnicodeIDStart">UnicodeIDStart</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="e41f30c8"><emu-gprose>any Unicode code point with the Unicode property “ID_Start”</emu-gprose></emu-rhs>
</emu-production>
<emu-production name="UnicodeIDContinue" type="lexical">
<emu-nt><a href="#prod-UnicodeIDContinue">UnicodeIDContinue</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="db14546f"><emu-gprose>any Unicode code point with the Unicode property “ID_Continue”</emu-gprose></emu-rhs>
</emu-production>
<emu-production name="ReservedWord" type="lexical">
<emu-nt><a href="#prod-ReservedWord">ReservedWord</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="a3926e03"><emu-nt><a href="#prod-Keyword">Keyword</a></emu-nt></emu-rhs>
<emu-rhs a="9d71bdc1"><emu-nt><a href="#prod-FutureReservedWord">FutureReservedWord</a></emu-nt></emu-rhs>
<emu-rhs a="54f84188"><emu-nt><a href="#prod-NullLiteral">NullLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="3508e1fd"><emu-nt><a href="#prod-BooleanLiteral">BooleanLiteral</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="Keyword" type="lexical" oneof="">
<emu-nt><a href="#prod-Keyword">Keyword</a></emu-nt><emu-geq>::</emu-geq><emu-oneof>one of</emu-oneof><emu-rhs><emu-t>await</emu-t><emu-t>break</emu-t><emu-t>case</emu-t><emu-t>catch</emu-t><emu-t>class</emu-t><emu-t>const</emu-t><emu-t>continue</emu-t><emu-t>debugger</emu-t><emu-t>default</emu-t><emu-t>delete</emu-t><emu-t>do</emu-t><emu-t>else</emu-t><emu-t>export</emu-t><emu-t>extends</emu-t><emu-t>finally</emu-t><emu-t>for</emu-t><emu-t>function</emu-t><emu-t>if</emu-t><emu-t>import</emu-t><emu-t>in</emu-t><emu-t>instanceof</emu-t><emu-t>new</emu-t><emu-t>return</emu-t><emu-t>super</emu-t><emu-t>switch</emu-t><emu-t>this</emu-t><emu-t>throw</emu-t><emu-t>try</emu-t><emu-t>typeof</emu-t><emu-t>var</emu-t><emu-t>void</emu-t><emu-t>while</emu-t><emu-t>with</emu-t><emu-t>yield</emu-t></emu-rhs>
</emu-production>
<emu-production name="FutureReservedWord" type="lexical">
<emu-nt><a href="#prod-FutureReservedWord">FutureReservedWord</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="4fb2fe95"><emu-t>enum</emu-t></emu-rhs>
</emu-production>
<p>The following tokens are also considered to be <emu-nt id="_ref_14820"><a href="#prod-FutureReservedWord">FutureReservedWord</a></emu-nt>s when parsing <emu-xref href="#sec-strict-mode-code" id="_ref_8589"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>:</p>
<p><emu-t>implements</emu-t> &nbsp;<emu-t>package</emu-t> &nbsp;<emu-t>protected</emu-t><br>
<emu-t>interface</emu-t> &nbsp;<emu-t>private</emu-t> &nbsp;<emu-t>public</emu-t>
</p>
<p>&nbsp;</p>
<emu-production name="Punctuator" type="lexical" oneof="">
<emu-nt><a href="#prod-Punctuator">Punctuator</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>.</emu-t><emu-t>...</emu-t><emu-t>;</emu-t><emu-t>,</emu-t><emu-t>&lt;</emu-t><emu-t>&gt;</emu-t><emu-t>&lt;=</emu-t><emu-t>&gt;=</emu-t><emu-t>==</emu-t><emu-t>!=</emu-t><emu-t>===</emu-t><emu-t>!==</emu-t><emu-t>+</emu-t><emu-t>-</emu-t><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-t>~</emu-t><emu-t>&amp;&amp;</emu-t><emu-t>||</emu-t><emu-t>?</emu-t><emu-t>:</emu-t><emu-t>=</emu-t><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>=&gt;</emu-t></emu-rhs>
</emu-production>
<emu-production name="DivPunctuator" type="lexical">
<emu-nt><a href="#prod-DivPunctuator">DivPunctuator</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="d3fd5f53"><emu-t>/</emu-t></emu-rhs>
<emu-rhs a="2e077fe3"><emu-t>/=</emu-t></emu-rhs>
</emu-production>
<emu-production name="RightBracePunctuator" type="lexical">
<emu-nt><a href="#prod-RightBracePunctuator">RightBracePunctuator</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="255cb7fd"><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="NullLiteral" type="lexical">
<emu-nt><a href="#prod-NullLiteral">NullLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="77b50868"><emu-t>null</emu-t></emu-rhs>
</emu-production>
<emu-production name="BooleanLiteral" type="lexical">
<emu-nt><a href="#prod-BooleanLiteral">BooleanLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="fa30b8c6"><emu-t>true</emu-t></emu-rhs>
<emu-rhs a="23d2c69d"><emu-t>false</emu-t></emu-rhs>
</emu-production>
<emu-production name="NumericLiteral" type="lexical">
<emu-nt><a href="#prod-NumericLiteral">NumericLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="18c0356f"><emu-nt><a href="#prod-DecimalLiteral">DecimalLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="d3d71ddd"><emu-nt><a href="#prod-BinaryIntegerLiteral">BinaryIntegerLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="832f57ee"><emu-nt><a href="#prod-OctalIntegerLiteral">OctalIntegerLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="1d0c4a66"><emu-nt><a href="#prod-HexIntegerLiteral">HexIntegerLiteral</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="DecimalLiteral" type="lexical">
<emu-nt><a href="#prod-DecimalLiteral">DecimalLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="fb5198a6"><emu-nt><a href="#prod-DecimalIntegerLiteral">DecimalIntegerLiteral</a></emu-nt><emu-t>.</emu-t><emu-nt optional=""><a href="#prod-DecimalDigits">DecimalDigits</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt optional=""><a href="#prod-ExponentPart">ExponentPart</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="5cf3aa35"><emu-t>.</emu-t><emu-nt><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-nt optional=""><a href="#prod-ExponentPart">ExponentPart</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="13dbaf21"><emu-nt><a href="#prod-DecimalIntegerLiteral">DecimalIntegerLiteral</a></emu-nt><emu-nt optional=""><a href="#prod-ExponentPart">ExponentPart</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="DecimalIntegerLiteral" type="lexical">
<emu-nt><a href="#prod-DecimalIntegerLiteral">DecimalIntegerLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5259a431"><emu-t>0</emu-t></emu-rhs>
<emu-rhs a="2353f0a3"><emu-nt><a href="#prod-NonZeroDigit">NonZeroDigit</a></emu-nt><emu-nt optional=""><a href="#prod-DecimalDigits">DecimalDigits</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="DecimalDigits" type="lexical">
<emu-nt><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="b3831ee0"><emu-nt><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt></emu-rhs>
<emu-rhs a="9f250657"><emu-nt><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-nt><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="DecimalDigit" type="lexical" oneof="">
<emu-nt><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt><emu-geq>::</emu-geq><emu-oneof>one of</emu-oneof><emu-rhs><emu-t>0</emu-t><emu-t>1</emu-t><emu-t>2</emu-t><emu-t>3</emu-t><emu-t>4</emu-t><emu-t>5</emu-t><emu-t>6</emu-t><emu-t>7</emu-t><emu-t>8</emu-t><emu-t>9</emu-t></emu-rhs>
</emu-production>
<emu-production name="NonZeroDigit" type="lexical" oneof="">
<emu-nt><a href="#prod-NonZeroDigit">NonZeroDigit</a></emu-nt><emu-geq>::</emu-geq><emu-oneof>one of</emu-oneof><emu-rhs><emu-t>1</emu-t><emu-t>2</emu-t><emu-t>3</emu-t><emu-t>4</emu-t><emu-t>5</emu-t><emu-t>6</emu-t><emu-t>7</emu-t><emu-t>8</emu-t><emu-t>9</emu-t></emu-rhs>
</emu-production>
<emu-production name="ExponentPart" type="lexical">
<emu-nt><a href="#prod-ExponentPart">ExponentPart</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="7f837518"><emu-nt><a href="#prod-ExponentIndicator">ExponentIndicator</a></emu-nt><emu-nt><a href="#prod-SignedInteger">SignedInteger</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ExponentIndicator" type="lexical" oneof="">
<emu-nt><a href="#prod-ExponentIndicator">ExponentIndicator</a></emu-nt><emu-geq>::</emu-geq><emu-oneof>one of</emu-oneof><emu-rhs><emu-t>e</emu-t><emu-t>E</emu-t></emu-rhs>
</emu-production>
<emu-production name="SignedInteger" type="lexical">
<emu-nt><a href="#prod-SignedInteger">SignedInteger</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="6d7b4e5f"><emu-nt><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt></emu-rhs>
<emu-rhs a="3bd7fe57"><emu-t>+</emu-t><emu-nt><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt></emu-rhs>
<emu-rhs a="58000348"><emu-t>-</emu-t><emu-nt><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="BinaryIntegerLiteral" type="lexical">
<emu-nt><a href="#prod-BinaryIntegerLiteral">BinaryIntegerLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="600d7817"><emu-t>0b</emu-t><emu-nt><a href="#prod-BinaryDigits">BinaryDigits</a></emu-nt></emu-rhs>
<emu-rhs a="7c1f17d9"><emu-t>0B</emu-t><emu-nt><a href="#prod-BinaryDigits">BinaryDigits</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="BinaryDigits" type="lexical">
<emu-nt><a href="#prod-BinaryDigits">BinaryDigits</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="e5f1ee23"><emu-nt><a href="#prod-BinaryDigit">BinaryDigit</a></emu-nt></emu-rhs>
<emu-rhs a="82aa7443"><emu-nt><a href="#prod-BinaryDigits">BinaryDigits</a></emu-nt><emu-nt><a href="#prod-BinaryDigit">BinaryDigit</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="BinaryDigit" type="lexical" oneof="">
<emu-nt><a href="#prod-BinaryDigit">BinaryDigit</a></emu-nt><emu-geq>::</emu-geq><emu-oneof>one of</emu-oneof><emu-rhs><emu-t>0</emu-t><emu-t>1</emu-t></emu-rhs>
</emu-production>
<emu-production name="OctalIntegerLiteral" type="lexical">
<emu-nt><a href="#prod-OctalIntegerLiteral">OctalIntegerLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="a8056cb0"><emu-t>0o</emu-t><emu-nt><a href="#prod-OctalDigits">OctalDigits</a></emu-nt></emu-rhs>
<emu-rhs a="3a3652fa"><emu-t>0O</emu-t><emu-nt><a href="#prod-OctalDigits">OctalDigits</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="OctalDigits" type="lexical">
<emu-nt><a href="#prod-OctalDigits">OctalDigits</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="99bc1d53"><emu-nt><a href="#prod-OctalDigit">OctalDigit</a></emu-nt></emu-rhs>
<emu-rhs a="37a295fe"><emu-nt><a href="#prod-OctalDigits">OctalDigits</a></emu-nt><emu-nt><a href="#prod-OctalDigit">OctalDigit</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="OctalDigit" type="lexical" oneof="">
<emu-nt><a href="#prod-OctalDigit">OctalDigit</a></emu-nt><emu-geq>::</emu-geq><emu-oneof>one of</emu-oneof><emu-rhs><emu-t>0</emu-t><emu-t>1</emu-t><emu-t>2</emu-t><emu-t>3</emu-t><emu-t>4</emu-t><emu-t>5</emu-t><emu-t>6</emu-t><emu-t>7</emu-t></emu-rhs>
</emu-production>
<emu-production name="HexIntegerLiteral" type="lexical">
<emu-nt><a href="#prod-HexIntegerLiteral">HexIntegerLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="cf154180"><emu-t>0x</emu-t><emu-nt><a href="#prod-HexDigits">HexDigits</a></emu-nt></emu-rhs>
<emu-rhs a="9ef756f3"><emu-t>0X</emu-t><emu-nt><a href="#prod-HexDigits">HexDigits</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="HexDigits" type="lexical">
<emu-nt><a href="#prod-HexDigits">HexDigits</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="a0c48a71"><emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt></emu-rhs>
<emu-rhs a="c8221899"><emu-nt><a href="#prod-HexDigits">HexDigits</a></emu-nt><emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="HexDigit" type="lexical" oneof="">
<emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-geq>::</emu-geq><emu-oneof>one of</emu-oneof><emu-rhs><emu-t>0</emu-t><emu-t>1</emu-t><emu-t>2</emu-t><emu-t>3</emu-t><emu-t>4</emu-t><emu-t>5</emu-t><emu-t>6</emu-t><emu-t>7</emu-t><emu-t>8</emu-t><emu-t>9</emu-t><emu-t>a</emu-t><emu-t>b</emu-t><emu-t>c</emu-t><emu-t>d</emu-t><emu-t>e</emu-t><emu-t>f</emu-t><emu-t>A</emu-t><emu-t>B</emu-t><emu-t>C</emu-t><emu-t>D</emu-t><emu-t>E</emu-t><emu-t>F</emu-t></emu-rhs>
</emu-production>
<emu-production name="StringLiteral" type="lexical">
<emu-nt><a href="#prod-StringLiteral">StringLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="15d8b1f1"><emu-t>"</emu-t><emu-nt optional=""><a href="#prod-DoubleStringCharacters">DoubleStringCharacters</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>"</emu-t></emu-rhs>
<emu-rhs a="82ecb3d9"><emu-t>'</emu-t><emu-nt optional=""><a href="#prod-SingleStringCharacters">SingleStringCharacters</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>'</emu-t></emu-rhs>
</emu-production>
<emu-production name="DoubleStringCharacters" type="lexical">
<emu-nt><a href="#prod-DoubleStringCharacters">DoubleStringCharacters</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="8bdabc77"><emu-nt><a href="#prod-DoubleStringCharacter">DoubleStringCharacter</a></emu-nt><emu-nt optional=""><a href="#prod-DoubleStringCharacters">DoubleStringCharacters</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="SingleStringCharacters" type="lexical">
<emu-nt><a href="#prod-SingleStringCharacters">SingleStringCharacters</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="17d28457"><emu-nt><a href="#prod-SingleStringCharacter">SingleStringCharacter</a></emu-nt><emu-nt optional=""><a href="#prod-SingleStringCharacters">SingleStringCharacters</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="DoubleStringCharacter" type="lexical">
<emu-nt><a href="#prod-DoubleStringCharacter">DoubleStringCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="a87f95ed"><emu-nt><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-gmod>but not one of <emu-t>"</emu-t> or <emu-t>\</emu-t> or <emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt></emu-gmod></emu-rhs>
<emu-rhs a="85df8467"><emu-gprose>&lt;LS&gt;</emu-gprose></emu-rhs>
<emu-rhs a="be2ab9fa"><emu-gprose>&lt;PS&gt;</emu-gprose></emu-rhs>
<emu-rhs a="ea7d8d26"><emu-t>\</emu-t><emu-nt><a href="#prod-EscapeSequence">EscapeSequence</a></emu-nt></emu-rhs>
<emu-rhs a="00992933"><emu-nt><a href="#prod-LineContinuation">LineContinuation</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="SingleStringCharacter" type="lexical">
<emu-nt><a href="#prod-SingleStringCharacter">SingleStringCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5ea9e1d2"><emu-nt><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-gmod>but not one of <emu-t>'</emu-t> or <emu-t>\</emu-t> or <emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt></emu-gmod></emu-rhs>
<emu-rhs a="85df8467"><emu-gprose>&lt;LS&gt;</emu-gprose></emu-rhs>
<emu-rhs a="be2ab9fa"><emu-gprose>&lt;PS&gt;</emu-gprose></emu-rhs>
<emu-rhs a="ea7d8d26"><emu-t>\</emu-t><emu-nt><a href="#prod-EscapeSequence">EscapeSequence</a></emu-nt></emu-rhs>
<emu-rhs a="00992933"><emu-nt><a href="#prod-LineContinuation">LineContinuation</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="LineContinuation" type="lexical">
<emu-nt><a href="#prod-LineContinuation">LineContinuation</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="c4893d63"><emu-t>\</emu-t><emu-nt><a href="#prod-LineTerminatorSequence">LineTerminatorSequence</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="EscapeSequence" type="lexical">
<emu-nt><a href="#prod-EscapeSequence">EscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="e9e86f07"><emu-nt><a href="#prod-CharacterEscapeSequence">CharacterEscapeSequence</a></emu-nt></emu-rhs>
<emu-rhs a="6964a19d"><emu-t>0</emu-t><emu-gann>[lookahead ∉ <emu-nt><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt>]</emu-gann></emu-rhs>
<emu-rhs a="a8071b85"><emu-nt><a href="#prod-HexEscapeSequence">HexEscapeSequence</a></emu-nt></emu-rhs>
<emu-rhs a="44bd6f55"><emu-nt><a href="#prod-UnicodeEscapeSequence">UnicodeEscapeSequence</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="CharacterEscapeSequence" type="lexical">
<emu-nt><a href="#prod-CharacterEscapeSequence">CharacterEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="7444838f"><emu-nt><a href="#prod-SingleEscapeCharacter">SingleEscapeCharacter</a></emu-nt></emu-rhs>
<emu-rhs a="b7980a98"><emu-nt><a href="#prod-NonEscapeCharacter">NonEscapeCharacter</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="SingleEscapeCharacter" type="lexical" oneof="">
<emu-nt><a href="#prod-SingleEscapeCharacter">SingleEscapeCharacter</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>b</emu-t><emu-t>f</emu-t><emu-t>n</emu-t><emu-t>r</emu-t><emu-t>t</emu-t><emu-t>v</emu-t></emu-rhs>
</emu-production>
<emu-production name="NonEscapeCharacter" type="lexical">
<emu-nt><a href="#prod-NonEscapeCharacter">NonEscapeCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="1bac6127"><emu-nt><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-gmod>but not one of <emu-nt><a href="#prod-EscapeCharacter">EscapeCharacter</a></emu-nt> or <emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt></emu-gmod></emu-rhs>
</emu-production>
<emu-production name="EscapeCharacter" type="lexical">
<emu-nt><a href="#prod-EscapeCharacter">EscapeCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="7444838f"><emu-nt><a href="#prod-SingleEscapeCharacter">SingleEscapeCharacter</a></emu-nt></emu-rhs>
<emu-rhs a="b3831ee0"><emu-nt><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt></emu-rhs>
<emu-rhs a="150383a9"><emu-t>x</emu-t></emu-rhs>
<emu-rhs a="8c2e6655"><emu-t>u</emu-t></emu-rhs>
</emu-production>
<emu-production name="HexEscapeSequence" type="lexical">
<emu-nt><a href="#prod-HexEscapeSequence">HexEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="d8ef973c"><emu-t>x</emu-t><emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="UnicodeEscapeSequence" type="lexical">
<emu-nt><a href="#prod-UnicodeEscapeSequence">UnicodeEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="8072ad8d"><emu-t>u</emu-t><emu-nt><a href="#prod-Hex4Digits">Hex4Digits</a></emu-nt></emu-rhs>
<emu-rhs a="b98063ef"><emu-t>u{</emu-t><emu-nt><a href="#prod-CodePoint">CodePoint</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="Hex4Digits" type="lexical">
<emu-nt><a href="#prod-Hex4Digits">Hex4Digits</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="0ba8de61"><emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="RegularExpressionLiteral" type="lexical">
<emu-nt><a href="#prod-RegularExpressionLiteral">RegularExpressionLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5778053b"><emu-t>/</emu-t><emu-nt><a href="#prod-RegularExpressionBody">RegularExpressionBody</a></emu-nt><emu-t>/</emu-t><emu-nt><a href="#prod-RegularExpressionFlags">RegularExpressionFlags</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="RegularExpressionBody" type="lexical">
<emu-nt><a href="#prod-RegularExpressionBody">RegularExpressionBody</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="bba7969e"><emu-nt><a href="#prod-RegularExpressionFirstChar">RegularExpressionFirstChar</a></emu-nt><emu-nt><a href="#prod-RegularExpressionChars">RegularExpressionChars</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="RegularExpressionChars" type="lexical">
<emu-nt><a href="#prod-RegularExpressionChars">RegularExpressionChars</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></emu-rhs>
<emu-rhs a="a9881cec"><emu-nt><a href="#prod-RegularExpressionChars">RegularExpressionChars</a></emu-nt><emu-nt><a href="#prod-RegularExpressionChar">RegularExpressionChar</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="RegularExpressionFirstChar" type="lexical">
<emu-nt><a href="#prod-RegularExpressionFirstChar">RegularExpressionFirstChar</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="da1b0c0a"><emu-nt><a href="#prod-RegularExpressionNonTerminator">RegularExpressionNonTerminator</a></emu-nt><emu-gmod>but not one of <emu-t>*</emu-t> or <emu-t>\</emu-t> or <emu-t>/</emu-t> or <emu-t>[</emu-t></emu-gmod></emu-rhs>
<emu-rhs a="9c9579a7"><emu-nt><a href="#prod-RegularExpressionBackslashSequence">RegularExpressionBackslashSequence</a></emu-nt></emu-rhs>
<emu-rhs a="5cc6858e"><emu-nt><a href="#prod-RegularExpressionClass">RegularExpressionClass</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="RegularExpressionChar" type="lexical">
<emu-nt><a href="#prod-RegularExpressionChar">RegularExpressionChar</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="f0c3ff14"><emu-nt><a href="#prod-RegularExpressionNonTerminator">RegularExpressionNonTerminator</a></emu-nt><emu-gmod>but not one of <emu-t>\</emu-t> or <emu-t>/</emu-t> or <emu-t>[</emu-t></emu-gmod></emu-rhs>
<emu-rhs a="9c9579a7"><emu-nt><a href="#prod-RegularExpressionBackslashSequence">RegularExpressionBackslashSequence</a></emu-nt></emu-rhs>
<emu-rhs a="5cc6858e"><emu-nt><a href="#prod-RegularExpressionClass">RegularExpressionClass</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="RegularExpressionBackslashSequence" type="lexical">
<emu-nt><a href="#prod-RegularExpressionBackslashSequence">RegularExpressionBackslashSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="d7656bad"><emu-t>\</emu-t><emu-nt><a href="#prod-RegularExpressionNonTerminator">RegularExpressionNonTerminator</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="RegularExpressionNonTerminator" type="lexical">
<emu-nt><a href="#prod-RegularExpressionNonTerminator">RegularExpressionNonTerminator</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="2d5bdfa7"><emu-nt><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-gmod>but not <emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt></emu-gmod></emu-rhs>
</emu-production>
<emu-production name="RegularExpressionClass" type="lexical">
<emu-nt><a href="#prod-RegularExpressionClass">RegularExpressionClass</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="4c1bc40a"><emu-t>[</emu-t><emu-nt><a href="#prod-RegularExpressionClassChars">RegularExpressionClassChars</a></emu-nt><emu-t>]</emu-t></emu-rhs>
</emu-production>
<emu-production name="RegularExpressionClassChars" type="lexical">
<emu-nt><a href="#prod-RegularExpressionClassChars">RegularExpressionClassChars</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></emu-rhs>
<emu-rhs a="76bdcb05"><emu-nt><a href="#prod-RegularExpressionClassChars">RegularExpressionClassChars</a></emu-nt><emu-nt><a href="#prod-RegularExpressionClassChar">RegularExpressionClassChar</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="RegularExpressionClassChar" type="lexical">
<emu-nt><a href="#prod-RegularExpressionClassChar">RegularExpressionClassChar</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="7fd10851"><emu-nt><a href="#prod-RegularExpressionNonTerminator">RegularExpressionNonTerminator</a></emu-nt><emu-gmod>but not one of <emu-t>]</emu-t> or <emu-t>\</emu-t></emu-gmod></emu-rhs>
<emu-rhs a="9c9579a7"><emu-nt><a href="#prod-RegularExpressionBackslashSequence">RegularExpressionBackslashSequence</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="RegularExpressionFlags" type="lexical">
<emu-nt><a href="#prod-RegularExpressionFlags">RegularExpressionFlags</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></emu-rhs>
<emu-rhs a="fceefdcd"><emu-nt><a href="#prod-RegularExpressionFlags">RegularExpressionFlags</a></emu-nt><emu-nt><a href="#prod-IdentifierPart">IdentifierPart</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="Template" type="lexical">
<emu-nt><a href="#prod-Template">Template</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="7bf3ad2b"><emu-nt><a href="#prod-NoSubstitutionTemplate">NoSubstitutionTemplate</a></emu-nt></emu-rhs>
<emu-rhs a="ab9a4b96"><emu-nt><a href="#prod-TemplateHead">TemplateHead</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="NoSubstitutionTemplate" type="lexical">
<emu-nt><a href="#prod-NoSubstitutionTemplate">NoSubstitutionTemplate</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="056f5c6b"><emu-t>`</emu-t><emu-nt optional=""><a href="#prod-TemplateCharacters">TemplateCharacters</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>`</emu-t></emu-rhs>
</emu-production>
<emu-production name="TemplateHead" type="lexical">
<emu-nt><a href="#prod-TemplateHead">TemplateHead</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="bfb172fc"><emu-t>`</emu-t><emu-nt optional=""><a href="#prod-TemplateCharacters">TemplateCharacters</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>${</emu-t></emu-rhs>
</emu-production>
<emu-production name="TemplateSubstitutionTail" type="lexical">
<emu-nt><a href="#prod-TemplateSubstitutionTail">TemplateSubstitutionTail</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="ccbc035d"><emu-nt><a href="#prod-TemplateMiddle">TemplateMiddle</a></emu-nt></emu-rhs>
<emu-rhs a="57fe6188"><emu-nt><a href="#prod-TemplateTail">TemplateTail</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="TemplateMiddle" type="lexical">
<emu-nt><a href="#prod-TemplateMiddle">TemplateMiddle</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="37635b4e"><emu-t>}</emu-t><emu-nt optional=""><a href="#prod-TemplateCharacters">TemplateCharacters</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>${</emu-t></emu-rhs>
</emu-production>
<emu-production name="TemplateTail" type="lexical">
<emu-nt><a href="#prod-TemplateTail">TemplateTail</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="fcef5bc0"><emu-t>}</emu-t><emu-nt optional=""><a href="#prod-TemplateCharacters">TemplateCharacters</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>`</emu-t></emu-rhs>
</emu-production>
<emu-production name="TemplateCharacters" type="lexical">
<emu-nt><a href="#prod-TemplateCharacters">TemplateCharacters</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="f8c26ac5"><emu-nt><a href="#prod-TemplateCharacter">TemplateCharacter</a></emu-nt><emu-nt optional=""><a href="#prod-TemplateCharacters">TemplateCharacters</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="TemplateCharacter" type="lexical">
<emu-nt><a href="#prod-TemplateCharacter">TemplateCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="03c3b542"><emu-t>$</emu-t><emu-gann>[lookahead ≠ <emu-t>{</emu-t>]</emu-gann></emu-rhs>
<emu-rhs a="ea7d8d26"><emu-t>\</emu-t><emu-nt><a href="#prod-EscapeSequence">EscapeSequence</a></emu-nt></emu-rhs>
<emu-rhs a="68cad9cc"><emu-t>\</emu-t><emu-nt><a href="#prod-NotEscapeSequence">NotEscapeSequence</a></emu-nt></emu-rhs>
<emu-rhs a="00992933"><emu-nt><a href="#prod-LineContinuation">LineContinuation</a></emu-nt></emu-rhs>
<emu-rhs a="544825da"><emu-nt><a href="#prod-LineTerminatorSequence">LineTerminatorSequence</a></emu-nt></emu-rhs>
<emu-rhs a="4c80ea41"><emu-nt><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-gmod>but not one of <emu-t>`</emu-t> or <emu-t>\</emu-t> or <emu-t>$</emu-t> or <emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt></emu-gmod></emu-rhs>
</emu-production>
<emu-production name="NotEscapeSequence" type="lexical">
<emu-nt><a href="#prod-NotEscapeSequence">NotEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="c247e196"><emu-t>0</emu-t><emu-nt><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt></emu-rhs>
<emu-rhs a="372f5e0d"><emu-nt><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt><emu-gmod>but not <emu-t>0</emu-t></emu-gmod></emu-rhs>
<emu-rhs a="e6c4f6ee"><emu-t>x</emu-t><emu-gann>[lookahead ∉ <emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt>]</emu-gann></emu-rhs>
<emu-rhs a="92cdf202"><emu-t>x</emu-t><emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-gann>[lookahead ∉ <emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt>]</emu-gann></emu-rhs>
<emu-rhs a="a16001b3"><emu-t>u</emu-t><emu-gann>[lookahead ∉ <emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt>]</emu-gann><emu-gann>[lookahead ≠ <emu-t>{</emu-t>]</emu-gann></emu-rhs>
<emu-rhs a="f7d3e8d4"><emu-t>u</emu-t><emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-gann>[lookahead ∉ <emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt>]</emu-gann></emu-rhs>
<emu-rhs a="4ea47d3d"><emu-t>u</emu-t><emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-gann>[lookahead ∉ <emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt>]</emu-gann></emu-rhs>
<emu-rhs a="45170c27"><emu-t>u</emu-t><emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-gann>[lookahead ∉ <emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt>]</emu-gann></emu-rhs>
<emu-rhs a="5427e268"><emu-t>u</emu-t><emu-t>{</emu-t><emu-gann>[lookahead ∉ <emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt>]</emu-gann></emu-rhs>
<emu-rhs a="0c957f40"><emu-t>u</emu-t><emu-t>{</emu-t><emu-nt><a href="#prod-NotCodePoint">NotCodePoint</a></emu-nt><emu-gann>[lookahead ∉ <emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt>]</emu-gann></emu-rhs>
<emu-rhs a="ab5a798c"><emu-t>u</emu-t><emu-t>{</emu-t><emu-nt><a href="#prod-CodePoint">CodePoint</a></emu-nt><emu-gann>[lookahead ∉ <emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt>]</emu-gann><emu-gann>[lookahead ≠ <emu-t>}</emu-t>]</emu-gann></emu-rhs>
</emu-production>
<emu-production name="NotCodePoint" type="lexical">
<emu-nt><a href="#prod-NotCodePoint">NotCodePoint</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5aeddbfc"><emu-nt><a href="#prod-HexDigits">HexDigits</a></emu-nt><emu-gmod>but only if MV of <emu-nt><a href="#prod-HexDigits">HexDigits</a></emu-nt> &gt; 0x10FFFF </emu-gmod></emu-rhs>
</emu-production>
<emu-production name="CodePoint" type="lexical">
<emu-nt><a href="#prod-CodePoint">CodePoint</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="deeeb60d"><emu-nt><a href="#prod-HexDigits">HexDigits</a></emu-nt><emu-gmod>but only if MV of <emu-nt><a href="#prod-HexDigits">HexDigits</a></emu-nt> ≤ 0x10FFFF </emu-gmod></emu-rhs>
</emu-production>
</emu-annex>
<emu-annex id="sec-expressions">
<h1><span class="secnum">A.2</span>Expressions</h1>
<emu-production name="IdentifierReference" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-IdentifierReference">IdentifierReference</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="06b6ace8"><emu-nt><a href="#prod-Identifier">Identifier</a></emu-nt></emu-rhs>
<emu-rhs a="cce6c4d9" constraints="~Yield"><emu-constraints>[~Yield]</emu-constraints><emu-t>yield</emu-t></emu-rhs>
<emu-rhs a="7723c826" constraints="~Await"><emu-constraints>[~Await]</emu-constraints><emu-t>await</emu-t></emu-rhs>
</emu-production>
<emu-production name="BindingIdentifier" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="06b6ace8"><emu-nt><a href="#prod-Identifier">Identifier</a></emu-nt></emu-rhs>
<emu-rhs a="d1df3360"><emu-t>yield</emu-t></emu-rhs>
<emu-rhs a="857d4354"><emu-t>await</emu-t></emu-rhs>
</emu-production>
<emu-production name="Identifier">
<emu-nt><a href="#prod-Identifier">Identifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="bfa5c374"><emu-nt><a href="#prod-IdentifierName">IdentifierName</a></emu-nt><emu-gmod>but not <emu-nt><a href="#prod-ReservedWord">ReservedWord</a></emu-nt></emu-gmod></emu-rhs>
</emu-production>
<emu-production name="AsyncArrowBindingIdentifier" params="Yield">
<emu-nt params="Yield"><a href="#prod-AsyncArrowBindingIdentifier">AsyncArrowBindingIdentifier</a><emu-mods><emu-params>[Yield]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="614a19b0"><emu-nt params="?Yield, +Await"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[?Yield, +Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="LabelIdentifier" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-LabelIdentifier">LabelIdentifier</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="06b6ace8"><emu-nt><a href="#prod-Identifier">Identifier</a></emu-nt></emu-rhs>
<emu-rhs a="cce6c4d9" constraints="~Yield"><emu-constraints>[~Yield]</emu-constraints><emu-t>yield</emu-t></emu-rhs>
<emu-rhs a="7723c826" constraints="~Await"><emu-constraints>[~Await]</emu-constraints><emu-t>await</emu-t></emu-rhs>
</emu-production>
<emu-production name="PrimaryExpression" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-PrimaryExpression">PrimaryExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8cee0c59"><emu-t>this</emu-t></emu-rhs>
<emu-rhs a="0e54a070"><emu-nt params="?Yield, ?Await"><a href="#prod-IdentifierReference">IdentifierReference</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="92e97e03"><emu-nt><a href="#prod-Literal">Literal</a></emu-nt></emu-rhs>
<emu-rhs a="2fcfe2d0"><emu-nt params="?Yield, ?Await"><a href="#prod-ArrayLiteral">ArrayLiteral</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="ecf2121c"><emu-nt params="?Yield, ?Await"><a href="#prod-ObjectLiteral">ObjectLiteral</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="242eeccd"><emu-nt><a href="#prod-FunctionExpression">FunctionExpression</a></emu-nt></emu-rhs>
<emu-rhs a="2508abde"><emu-nt params="?Yield, ?Await"><a href="#prod-ClassExpression">ClassExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="abb7f7f4"><emu-nt><a href="#prod-GeneratorExpression">GeneratorExpression</a></emu-nt></emu-rhs>
<emu-rhs a="ad589bb4"><emu-nt><a href="#prod-AsyncFunctionExpression">AsyncFunctionExpression</a></emu-nt></emu-rhs>
<emu-rhs a="3403ed46"><emu-nt><a href="#prod-AsyncGeneratorExpression">AsyncGeneratorExpression</a></emu-nt></emu-rhs>
<emu-rhs a="31b672e8"><emu-nt><a href="#prod-RegularExpressionLiteral">RegularExpressionLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="493a5b25"><emu-nt params="?Yield, ?Await, ~Tagged"><a href="#prod-TemplateLiteral">TemplateLiteral</a><emu-mods><emu-params>[?Yield, ?Await, ~Tagged]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="parencover"><emu-nt params="?Yield, ?Await"><a href="#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">
<emu-nt params="Yield, Await"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="103ea770"><emu-t>(</emu-t><emu-nt params="+In, ?Yield, ?Await"><a href="#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="95866f7d"><emu-t>(</emu-t><emu-nt params="+In, ?Yield, ?Await"><a href="#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="78e44c33"><emu-t>(</emu-t><emu-t>)</emu-t></emu-rhs>
<emu-rhs a="a62ae549"><emu-t>(</emu-t><emu-t>...</emu-t><emu-nt params="?Yield, ?Await"><a href="#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="496a4160"><emu-t>(</emu-t><emu-t>...</emu-t><emu-nt params="?Yield, ?Await"><a href="#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="db5a5b9b"><emu-t>(</emu-t><emu-nt params="+In, ?Yield, ?Await"><a href="#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"><a href="#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="a8ec9f3e"><emu-t>(</emu-t><emu-nt params="+In, ?Yield, ?Await"><a href="#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"><a href="#prod-BindingPattern">BindingPattern</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t></emu-rhs>
</emu-production>
<p>When processing an instance of the production <emu-production name="PrimaryExpression" params="Yield, Await" a="parencover" class=" inline" collapsed="">
<emu-nt params="Yield, Await"><a href="#prod-PrimaryExpression">PrimaryExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="parencover"><emu-nt params="?Yield, ?Await"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs></emu-production> the interpretation of <emu-nt id="_ref_14821"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt> is refined using the following grammar:</p>
<emu-production name="ParenthesizedExpression" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-ParenthesizedExpression">ParenthesizedExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="103ea770"><emu-t>(</emu-t><emu-nt params="+In, ?Yield, ?Await"><a href="#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>
<p>&nbsp;</p>
<emu-production name="Literal">
<emu-nt><a href="#prod-Literal">Literal</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="54f84188"><emu-nt><a href="#prod-NullLiteral">NullLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="3508e1fd"><emu-nt><a href="#prod-BooleanLiteral">BooleanLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="a548b407"><emu-nt><a href="#prod-NumericLiteral">NumericLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="5c74e54d"><emu-nt><a href="#prod-StringLiteral">StringLiteral</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ArrayLiteral" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-ArrayLiteral">ArrayLiteral</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="906e476b"><emu-t>[</emu-t><emu-nt optional=""><a href="#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>]</emu-t></emu-rhs>
<emu-rhs a="5d65623a"><emu-t>[</emu-t><emu-nt params="?Yield, ?Await"><a href="#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="14bb78d1"><emu-t>[</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-ElementList">ElementList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>,</emu-t><emu-nt optional=""><a href="#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">
<emu-nt params="Yield, Await"><a href="#prod-ElementList">ElementList</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="306f3a14"><emu-nt optional=""><a href="#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt params="+In, ?Yield, ?Await"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="05939ab1"><emu-nt optional=""><a href="#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt params="?Yield, ?Await"><a href="#prod-SpreadElement">SpreadElement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="e9492888"><emu-nt params="?Yield, ?Await"><a href="#prod-ElementList">ElementList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>,</emu-t><emu-nt optional=""><a href="#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt params="+In, ?Yield, ?Await"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="9cd00eda"><emu-nt params="?Yield, ?Await"><a href="#prod-ElementList">ElementList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>,</emu-t><emu-nt optional=""><a href="#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt params="?Yield, ?Await"><a href="#prod-SpreadElement">SpreadElement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="Elision">
<emu-nt><a href="#prod-Elision">Elision</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="9471f753"><emu-t>,</emu-t></emu-rhs>
<emu-rhs a="806d0124"><emu-nt><a href="#prod-Elision">Elision</a></emu-nt><emu-t>,</emu-t></emu-rhs>
</emu-production>
<emu-production name="SpreadElement" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-SpreadElement">SpreadElement</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b623b4c8"><emu-t>...</emu-t><emu-nt params="+In, ?Yield, ?Await"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ObjectLiteral" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-ObjectLiteral">ObjectLiteral</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><emu-t>{</emu-t><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="4200417f"><emu-t>{</emu-t><emu-nt params="?Yield, ?Await"><a href="#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="0731c59c"><emu-t>{</emu-t><emu-nt params="?Yield, ?Await"><a href="#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">
<emu-nt params="Yield, Await"><a href="#prod-PropertyDefinitionList">PropertyDefinitionList</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="9b4b46b6"><emu-nt params="?Yield, ?Await"><a href="#prod-PropertyDefinition">PropertyDefinition</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="afd4e913"><emu-nt params="?Yield, ?Await"><a href="#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"><a href="#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">
<emu-nt params="Yield, Await"><a href="#prod-PropertyDefinition">PropertyDefinition</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0e54a070"><emu-nt params="?Yield, ?Await"><a href="#prod-IdentifierReference">IdentifierReference</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="68f5ac08"><emu-nt params="?Yield, ?Await"><a href="#prod-CoverInitializedName">CoverInitializedName</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="e73ae371"><emu-nt params="?Yield, ?Await"><a href="#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"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="91edbff4"><emu-nt params="?Yield, ?Await"><a href="#prod-MethodDefinition">MethodDefinition</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="b623b4c8"><emu-t>...</emu-t><emu-nt params="+In, ?Yield, ?Await"><a href="#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">
<emu-nt params="Yield, Await"><a href="#prod-PropertyName">PropertyName</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e71e2304"><emu-nt><a href="#prod-LiteralPropertyName">LiteralPropertyName</a></emu-nt></emu-rhs>
<emu-rhs a="5f44b65f"><emu-nt params="?Yield, ?Await"><a href="#prod-ComputedPropertyName">ComputedPropertyName</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="LiteralPropertyName">
<emu-nt><a href="#prod-LiteralPropertyName">LiteralPropertyName</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0ebb31e2"><emu-nt><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
<emu-rhs a="5c74e54d"><emu-nt><a href="#prod-StringLiteral">StringLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="a548b407"><emu-nt><a href="#prod-NumericLiteral">NumericLiteral</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ComputedPropertyName" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-ComputedPropertyName">ComputedPropertyName</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e3cff7e5"><emu-t>[</emu-t><emu-nt params="+In, ?Yield, ?Await"><a href="#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">
<emu-nt params="Yield, Await"><a href="#prod-CoverInitializedName">CoverInitializedName</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="85c0d9fd"><emu-nt params="?Yield, ?Await"><a href="#prod-IdentifierReference">IdentifierReference</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt params="+In, ?Yield, ?Await"><a href="#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">
<emu-nt params="In, Yield, Await"><a href="#prod-Initializer">Initializer</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="dc616ce5"><emu-t>=</emu-t><emu-nt params="?In, ?Yield, ?Await"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="TemplateLiteral" params="Yield, Await, Tagged">
<emu-nt params="Yield, Await, Tagged"><a href="#prod-TemplateLiteral">TemplateLiteral</a><emu-mods><emu-params>[Yield, Await, Tagged]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="7bf3ad2b"><emu-nt><a href="#prod-NoSubstitutionTemplate">NoSubstitutionTemplate</a></emu-nt></emu-rhs>
<emu-rhs a="f1a0e47a"><emu-nt params="?Yield, ?Await, ?Tagged"><a href="#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">
<emu-nt params="Yield, Await, Tagged"><a href="#prod-SubstitutionTemplate">SubstitutionTemplate</a><emu-mods><emu-params>[Yield, Await, Tagged]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="069aff93"><emu-nt><a href="#prod-TemplateHead">TemplateHead</a></emu-nt><emu-nt params="+In, ?Yield, ?Await"><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt params="?Yield, ?Await, ?Tagged"><a href="#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">
<emu-nt params="Yield, Await, Tagged"><a href="#prod-TemplateSpans">TemplateSpans</a><emu-mods><emu-params>[Yield, Await, Tagged]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="57fe6188"><emu-nt><a href="#prod-TemplateTail">TemplateTail</a></emu-nt></emu-rhs>
<emu-rhs a="de941338"><emu-nt params="?Yield, ?Await, ?Tagged"><a href="#prod-TemplateMiddleList">TemplateMiddleList</a><emu-mods><emu-params>[?Yield, ?Await, ?Tagged]</emu-params></emu-mods></emu-nt><emu-nt><a href="#prod-TemplateTail">TemplateTail</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="TemplateMiddleList" params="Yield, Await, Tagged">
<emu-nt params="Yield, Await, Tagged"><a href="#prod-TemplateMiddleList">TemplateMiddleList</a><emu-mods><emu-params>[Yield, Await, Tagged]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="db7fc148"><emu-nt><a href="#prod-TemplateMiddle">TemplateMiddle</a></emu-nt><emu-nt params="+In, ?Yield, ?Await"><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="6dd46bd2"><emu-nt params="?Yield, ?Await, ?Tagged"><a href="#prod-TemplateMiddleList">TemplateMiddleList</a><emu-mods><emu-params>[?Yield, ?Await, ?Tagged]</emu-params></emu-mods></emu-nt><emu-nt><a href="#prod-TemplateMiddle">TemplateMiddle</a></emu-nt><emu-nt params="+In, ?Yield, ?Await"><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="MemberExpression" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-MemberExpression">MemberExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="669d9e8f"><emu-nt params="?Yield, ?Await"><a href="#prod-PrimaryExpression">PrimaryExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="46700b57"><emu-nt params="?Yield, ?Await"><a href="#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"><a href="#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="fea749a8"><emu-nt params="?Yield, ?Await"><a href="#prod-MemberExpression">MemberExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>.</emu-t><emu-nt><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
<emu-rhs a="e3a714cc"><emu-nt params="?Yield, ?Await"><a href="#prod-MemberExpression">MemberExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt params="?Yield, ?Await, +Tagged"><a href="#prod-TemplateLiteral">TemplateLiteral</a><emu-mods><emu-params>[?Yield, ?Await, +Tagged]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="83d44750"><emu-nt params="?Yield, ?Await"><a href="#prod-SuperProperty">SuperProperty</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="c81ee20f"><emu-nt><a href="#prod-MetaProperty">MetaProperty</a></emu-nt></emu-rhs>
<emu-rhs a="b8554289"><emu-t>new</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-MemberExpression">MemberExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt params="?Yield, ?Await"><a href="#prod-Arguments">Arguments</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="SuperProperty" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-SuperProperty">SuperProperty</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="7f66819f"><emu-t>super</emu-t><emu-t>[</emu-t><emu-nt params="+In, ?Yield, ?Await"><a href="#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="f690ec4a"><emu-t>super</emu-t><emu-t>.</emu-t><emu-nt><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="MetaProperty">
<emu-nt><a href="#prod-MetaProperty">MetaProperty</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="733bdb20"><emu-nt><a href="#prod-NewTarget">NewTarget</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="NewTarget">
<emu-nt><a href="#prod-NewTarget">NewTarget</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d2de213d"><emu-t>new</emu-t><emu-t>.</emu-t><emu-t>target</emu-t></emu-rhs>
</emu-production>
<emu-production name="NewExpression" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-NewExpression">NewExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="55b72ef4"><emu-nt params="?Yield, ?Await"><a href="#prod-MemberExpression">MemberExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="8b27ffb1"><emu-t>new</emu-t><emu-nt params="?Yield, ?Await"><a href="#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">
<emu-nt params="Yield, Await"><a href="#prod-CallExpression">CallExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="callcover"><emu-nt params="?Yield, ?Await"><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="e5c60d05"><emu-nt params="?Yield, ?Await"><a href="#prod-SuperCall">SuperCall</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="cd0d9a85"><emu-nt params="?Yield, ?Await"><a href="#prod-CallExpression">CallExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt params="?Yield, ?Await"><a href="#prod-Arguments">Arguments</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="24037841"><emu-nt params="?Yield, ?Await"><a href="#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"><a href="#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="f1fcc490"><emu-nt params="?Yield, ?Await"><a href="#prod-CallExpression">CallExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>.</emu-t><emu-nt><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
<emu-rhs a="5c4dd808"><emu-nt params="?Yield, ?Await"><a href="#prod-CallExpression">CallExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt params="?Yield, ?Await, +Tagged"><a href="#prod-TemplateLiteral">TemplateLiteral</a><emu-mods><emu-params>[?Yield, ?Await, +Tagged]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="CoverCallExpressionAndAsyncArrowHead" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f747be5d"><emu-nt params="?Yield, ?Await"><a href="#prod-MemberExpression">MemberExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt params="?Yield, ?Await"><a href="#prod-Arguments">Arguments</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<p>When processing an instance of the production <emu-production name="CallExpression" params="Yield, Await" a="callcover" class=" inline" collapsed="">
<emu-nt params="Yield, Await"><a href="#prod-CallExpression">CallExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="callcover"><emu-nt params="?Yield, ?Await"><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs></emu-production> the interpretation of <emu-nt id="_ref_14822"><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt> is refined using the following grammar:</p>
<emu-production name="CallMemberExpression" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-CallMemberExpression">CallMemberExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f747be5d"><emu-nt params="?Yield, ?Await"><a href="#prod-MemberExpression">MemberExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt params="?Yield, ?Await"><a href="#prod-Arguments">Arguments</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<p>&nbsp;</p>
<emu-production name="SuperCall" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-SuperCall">SuperCall</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6b5bb3dd"><emu-t>super</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-Arguments">Arguments</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="Arguments" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-Arguments">Arguments</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="78e44c33"><emu-t>(</emu-t><emu-t>)</emu-t></emu-rhs>
<emu-rhs a="668c9409"><emu-t>(</emu-t><emu-nt params="?Yield, ?Await"><a href="#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="c520166a"><emu-t>(</emu-t><emu-nt params="?Yield, ?Await"><a href="#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">
<emu-nt params="Yield, Await"><a href="#prod-ArgumentList">ArgumentList</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8f532861"><emu-nt params="+In, ?Yield, ?Await"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="b623b4c8"><emu-t>...</emu-t><emu-nt params="+In, ?Yield, ?Await"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="2ab72a4a"><emu-nt params="?Yield, ?Await"><a href="#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"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="d6f13c65"><emu-nt params="?Yield, ?Await"><a href="#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"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="LeftHandSideExpression" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a89347cc"><emu-nt params="?Yield, ?Await"><a href="#prod-NewExpression">NewExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="8699f68d"><emu-nt params="?Yield, ?Await"><a href="#prod-CallExpression">CallExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="UpdateExpression" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-UpdateExpression">UpdateExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b7b08c84"><emu-nt params="?Yield, ?Await"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="1063e6f2"><emu-nt params="?Yield, ?Await"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-gann>[no <emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-t>++</emu-t></emu-rhs>
<emu-rhs a="c40a0c36"><emu-nt params="?Yield, ?Await"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-gann>[no <emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-t>--</emu-t></emu-rhs>
<emu-rhs a="e14f8c68"><emu-t>++</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-UnaryExpression">UnaryExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="994b46fb"><emu-t>--</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-UnaryExpression">UnaryExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="UnaryExpression" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-UnaryExpression">UnaryExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="9511ff89"><emu-nt params="?Yield, ?Await"><a href="#prod-UpdateExpression">UpdateExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="a87e936a"><emu-t>delete</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-UnaryExpression">UnaryExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="7774f70f"><emu-t>void</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-UnaryExpression">UnaryExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="693155d5"><emu-t>typeof</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-UnaryExpression">UnaryExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="d735fe16"><emu-t>+</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-UnaryExpression">UnaryExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="2de86f5f"><emu-t>-</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-UnaryExpression">UnaryExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="995c05b5"><emu-t>~</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-UnaryExpression">UnaryExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="0a6edf36"><emu-t>!</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-UnaryExpression">UnaryExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="0c541d06" constraints="+Await"><emu-constraints>[+Await]</emu-constraints><emu-nt params="?Yield"><a href="#prod-AwaitExpression">AwaitExpression</a><emu-mods><emu-params>[?Yield]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ExponentiationExpression" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-ExponentiationExpression">ExponentiationExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f16b387c"><emu-nt params="?Yield, ?Await"><a href="#prod-UnaryExpression">UnaryExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="48e152b6"><emu-nt params="?Yield, ?Await"><a href="#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"><a href="#prod-ExponentiationExpression">ExponentiationExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="MultiplicativeExpression" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-MultiplicativeExpression">MultiplicativeExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="677909b0"><emu-nt params="?Yield, ?Await"><a href="#prod-ExponentiationExpression">ExponentiationExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="c0a3a33f"><emu-nt params="?Yield, ?Await"><a href="#prod-MultiplicativeExpression">MultiplicativeExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt><a href="#prod-MultiplicativeOperator">MultiplicativeOperator</a></emu-nt><emu-nt params="?Yield, ?Await"><a href="#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="">
<emu-nt><a href="#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-production name="AdditiveExpression" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-AdditiveExpression">AdditiveExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f6af3d13"><emu-nt params="?Yield, ?Await"><a href="#prod-MultiplicativeExpression">MultiplicativeExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="79f3759c"><emu-nt params="?Yield, ?Await"><a href="#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"><a href="#prod-MultiplicativeExpression">MultiplicativeExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="e309a7b9"><emu-nt params="?Yield, ?Await"><a href="#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"><a href="#prod-MultiplicativeExpression">MultiplicativeExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ShiftExpression" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-ShiftExpression">ShiftExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e6661e6a"><emu-nt params="?Yield, ?Await"><a href="#prod-AdditiveExpression">AdditiveExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="211de3c8"><emu-nt params="?Yield, ?Await"><a href="#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"><a href="#prod-AdditiveExpression">AdditiveExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="0c11aafb"><emu-nt params="?Yield, ?Await"><a href="#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"><a href="#prod-AdditiveExpression">AdditiveExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="cb144d91"><emu-nt params="?Yield, ?Await"><a href="#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"><a href="#prod-AdditiveExpression">AdditiveExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="RelationalExpression" params="In, Yield, Await">
<emu-nt params="In, Yield, Await"><a href="#prod-RelationalExpression">RelationalExpression</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="12fcef98"><emu-nt params="?Yield, ?Await"><a href="#prod-ShiftExpression">ShiftExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="4699dc26"><emu-nt params="?In, ?Yield, ?Await"><a href="#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"><a href="#prod-ShiftExpression">ShiftExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="e2226dd2"><emu-nt params="?In, ?Yield, ?Await"><a href="#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"><a href="#prod-ShiftExpression">ShiftExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="45a2035d"><emu-nt params="?In, ?Yield, ?Await"><a href="#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"><a href="#prod-ShiftExpression">ShiftExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="b8dbaec1"><emu-nt params="?In, ?Yield, ?Await"><a href="#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"><a href="#prod-ShiftExpression">ShiftExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="8a60d81a"><emu-nt params="?In, ?Yield, ?Await"><a href="#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"><a href="#prod-ShiftExpression">ShiftExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="b629d07c" constraints="+In"><emu-constraints>[+In]</emu-constraints><emu-nt params="+In, ?Yield, ?Await"><a href="#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"><a href="#prod-ShiftExpression">ShiftExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="EqualityExpression" params="In, Yield, Await">
<emu-nt params="In, Yield, Await"><a href="#prod-EqualityExpression">EqualityExpression</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="9280448d"><emu-nt params="?In, ?Yield, ?Await"><a href="#prod-RelationalExpression">RelationalExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="8d7a6c47"><emu-nt params="?In, ?Yield, ?Await"><a href="#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"><a href="#prod-RelationalExpression">RelationalExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="20f203e6"><emu-nt params="?In, ?Yield, ?Await"><a href="#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"><a href="#prod-RelationalExpression">RelationalExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="17b08b45"><emu-nt params="?In, ?Yield, ?Await"><a href="#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"><a href="#prod-RelationalExpression">RelationalExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="9f9056ff"><emu-nt params="?In, ?Yield, ?Await"><a href="#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"><a href="#prod-RelationalExpression">RelationalExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="BitwiseANDExpression" params="In, Yield, Await">
<emu-nt params="In, Yield, Await"><a href="#prod-BitwiseANDExpression">BitwiseANDExpression</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5c5abb87"><emu-nt params="?In, ?Yield, ?Await"><a href="#prod-EqualityExpression">EqualityExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="969f6da7"><emu-nt params="?In, ?Yield, ?Await"><a href="#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"><a href="#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">
<emu-nt params="In, Yield, Await"><a href="#prod-BitwiseXORExpression">BitwiseXORExpression</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a8caf125"><emu-nt params="?In, ?Yield, ?Await"><a href="#prod-BitwiseANDExpression">BitwiseANDExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="d7124a93"><emu-nt params="?In, ?Yield, ?Await"><a href="#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"><a href="#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">
<emu-nt params="In, Yield, Await"><a href="#prod-BitwiseORExpression">BitwiseORExpression</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="24ec6c16"><emu-nt params="?In, ?Yield, ?Await"><a href="#prod-BitwiseXORExpression">BitwiseXORExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="ad046143"><emu-nt params="?In, ?Yield, ?Await"><a href="#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"><a href="#prod-BitwiseXORExpression">BitwiseXORExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="LogicalANDExpression" params="In, Yield, Await">
<emu-nt params="In, Yield, Await"><a href="#prod-LogicalANDExpression">LogicalANDExpression</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0bfde639"><emu-nt params="?In, ?Yield, ?Await"><a href="#prod-BitwiseORExpression">BitwiseORExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="1a88a9db"><emu-nt params="?In, ?Yield, ?Await"><a href="#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"><a href="#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">
<emu-nt params="In, Yield, Await"><a href="#prod-LogicalORExpression">LogicalORExpression</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b886f268"><emu-nt params="?In, ?Yield, ?Await"><a href="#prod-LogicalANDExpression">LogicalANDExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="276ba099"><emu-nt params="?In, ?Yield, ?Await"><a href="#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"><a href="#prod-LogicalANDExpression">LogicalANDExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ConditionalExpression" params="In, Yield, Await">
<emu-nt params="In, Yield, Await"><a href="#prod-ConditionalExpression">ConditionalExpression</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="71405bab"><emu-nt params="?In, ?Yield, ?Await"><a href="#prod-LogicalORExpression">LogicalORExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="aa7f1805"><emu-nt params="?In, ?Yield, ?Await"><a href="#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"><a href="#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"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="AssignmentExpression" params="In, Yield, Await">
<emu-nt params="In, Yield, Await"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="82aa12dc"><emu-nt params="?In, ?Yield, ?Await"><a href="#prod-ConditionalExpression">ConditionalExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="5d4d9305" constraints="+Yield"><emu-constraints>[+Yield]</emu-constraints><emu-nt params="?In, ?Await"><a href="#prod-YieldExpression">YieldExpression</a><emu-mods><emu-params>[?In, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="336dea1a"><emu-nt params="?In, ?Yield, ?Await"><a href="#prod-ArrowFunction">ArrowFunction</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="de1f51e8"><emu-nt params="?In, ?Yield, ?Await"><a href="#prod-AsyncArrowFunction">AsyncArrowFunction</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="assignment"><emu-nt params="?Yield, ?Await"><a href="#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"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="dc2bc97e"><emu-nt params="?Yield, ?Await"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt><a href="#prod-AssignmentOperator">AssignmentOperator</a></emu-nt><emu-nt params="?In, ?Yield, ?Await"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<p>In certain circumstances when processing an instance of the production <emu-production name="AssignmentExpression" params="In, Yield, Await" a="assignment" class=" inline" collapsed="">
<emu-nt params="In, Yield, Await"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="assignment"><emu-nt params="?Yield, ?Await"><a href="#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"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs></emu-production> the following grammar is used to refine the interpretation of <emu-nt id="_ref_14823"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>:</p>
<emu-production name="AssignmentPattern" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-AssignmentPattern">AssignmentPattern</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ed6d3857"><emu-nt params="?Yield, ?Await"><a href="#prod-ObjectAssignmentPattern">ObjectAssignmentPattern</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="4b6571dd"><emu-nt params="?Yield, ?Await"><a href="#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">
<emu-nt params="Yield, Await"><a href="#prod-ObjectAssignmentPattern">ObjectAssignmentPattern</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><emu-t>{</emu-t><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="6cdfdd77"><emu-t>{</emu-t><emu-nt params="?Yield, ?Await"><a href="#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="a1f0237d"><emu-t>{</emu-t><emu-nt params="?Yield, ?Await"><a href="#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="740e1b2f"><emu-t>{</emu-t><emu-nt params="?Yield, ?Await"><a href="#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=""><a href="#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">
<emu-nt params="Yield, Await"><a href="#prod-ArrayAssignmentPattern">ArrayAssignmentPattern</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4b8cdf0a"><emu-t>[</emu-t><emu-nt optional=""><a href="#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt params="?Yield, ?Await" optional=""><a href="#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="9852bd8c"><emu-t>[</emu-t><emu-nt params="?Yield, ?Await"><a href="#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="01eac6e6"><emu-t>[</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-AssignmentElementList">AssignmentElementList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>,</emu-t><emu-nt optional=""><a href="#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt params="?Yield, ?Await" optional=""><a href="#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">
<emu-nt params="Yield, Await"><a href="#prod-AssignmentRestProperty">AssignmentRestProperty</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="9e521814"><emu-t>...</emu-t><emu-nt params="?Yield, ?Await"><a href="#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">
<emu-nt params="Yield, Await"><a href="#prod-AssignmentPropertyList">AssignmentPropertyList</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0fb6d7ae"><emu-nt params="?Yield, ?Await"><a href="#prod-AssignmentProperty">AssignmentProperty</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="37340e0a"><emu-nt params="?Yield, ?Await"><a href="#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"><a href="#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">
<emu-nt params="Yield, Await"><a href="#prod-AssignmentElementList">AssignmentElementList</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e75e8ef0"><emu-nt params="?Yield, ?Await"><a href="#prod-AssignmentElisionElement">AssignmentElisionElement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="6d59619d"><emu-nt params="?Yield, ?Await"><a href="#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"><a href="#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">
<emu-nt params="Yield, Await"><a href="#prod-AssignmentElisionElement">AssignmentElisionElement</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="72fd00bc"><emu-nt optional=""><a href="#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt params="?Yield, ?Await"><a href="#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">
<emu-nt params="Yield, Await"><a href="#prod-AssignmentProperty">AssignmentProperty</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c02b6a90"><emu-nt params="?Yield, ?Await"><a href="#prod-IdentifierReference">IdentifierReference</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt params="+In, ?Yield, ?Await" optional=""><a href="#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="37ae7a6f"><emu-nt params="?Yield, ?Await"><a href="#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"><a href="#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">
<emu-nt params="Yield, Await"><a href="#prod-AssignmentElement">AssignmentElement</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8c5631c8"><emu-nt params="?Yield, ?Await"><a href="#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt params="+In, ?Yield, ?Await" optional=""><a href="#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">
<emu-nt params="Yield, Await"><a href="#prod-AssignmentRestElement">AssignmentRestElement</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="9e521814"><emu-t>...</emu-t><emu-nt params="?Yield, ?Await"><a href="#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">
<emu-nt params="Yield, Await"><a href="#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b7b08c84"><emu-nt params="?Yield, ?Await"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<p>&nbsp;</p>
<emu-production name="AssignmentOperator" oneof="">
<emu-nt><a href="#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-production name="Expression" params="In, Yield, Await">
<emu-nt params="In, Yield, Await"><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0d38e21c"><emu-nt params="?In, ?Yield, ?Await"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="a2892296"><emu-nt params="?In, ?Yield, ?Await"><a href="#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"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
</emu-annex>
<emu-annex id="sec-statements">
<h1><span class="secnum">A.3</span>Statements</h1>
<emu-production name="Statement" params="Yield, Await, Return">
<emu-nt params="Yield, Await, Return"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="2adcd2a4"><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-BlockStatement">BlockStatement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="5ee32ad5"><emu-nt params="?Yield, ?Await"><a href="#prod-VariableStatement">VariableStatement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="7338aabb"><emu-nt><a href="#prod-EmptyStatement">EmptyStatement</a></emu-nt></emu-rhs>
<emu-rhs a="bede12e3"><emu-nt params="?Yield, ?Await"><a href="#prod-ExpressionStatement">ExpressionStatement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="54fbebf5"><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-IfStatement">IfStatement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="de4c2686"><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-BreakableStatement">BreakableStatement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="9255e61d"><emu-nt params="?Yield, ?Await"><a href="#prod-ContinueStatement">ContinueStatement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="bd34fe33"><emu-nt params="?Yield, ?Await"><a href="#prod-BreakStatement">BreakStatement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="d52ac8c3" constraints="+Return"><emu-constraints>[+Return]</emu-constraints><emu-nt params="?Yield, ?Await"><a href="#prod-ReturnStatement">ReturnStatement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="fc61098c"><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-WithStatement">WithStatement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="f74fe0ab"><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-LabelledStatement">LabelledStatement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="ba418235"><emu-nt params="?Yield, ?Await"><a href="#prod-ThrowStatement">ThrowStatement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="67b4bc29"><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-TryStatement">TryStatement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="21212edb"><emu-nt><a href="#prod-DebuggerStatement">DebuggerStatement</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="Declaration" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-Declaration">Declaration</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8ba1ebe9"><emu-nt params="?Yield, ?Await, ~Default"><a href="#prod-HoistableDeclaration">HoistableDeclaration</a><emu-mods><emu-params>[?Yield, ?Await, ~Default]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="245487bb"><emu-nt params="?Yield, ?Await, ~Default"><a href="#prod-ClassDeclaration">ClassDeclaration</a><emu-mods><emu-params>[?Yield, ?Await, ~Default]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="0e5e6549"><emu-nt params="+In, ?Yield, ?Await"><a href="#prod-LexicalDeclaration">LexicalDeclaration</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="HoistableDeclaration" params="Yield, Await, Default">
<emu-nt params="Yield, Await, Default"><a href="#prod-HoistableDeclaration">HoistableDeclaration</a><emu-mods><emu-params>[Yield, Await, Default]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="3e6d6242"><emu-nt params="?Yield, ?Await, ?Default"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a><emu-mods><emu-params>[?Yield, ?Await, ?Default]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="ac7a805c"><emu-nt params="?Yield, ?Await, ?Default"><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a><emu-mods><emu-params>[?Yield, ?Await, ?Default]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="dcd16328"><emu-nt params="?Yield, ?Await, ?Default"><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a><emu-mods><emu-params>[?Yield, ?Await, ?Default]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="13efd0a7"><emu-nt params="?Yield, ?Await, ?Default"><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a><emu-mods><emu-params>[?Yield, ?Await, ?Default]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="BreakableStatement" params="Yield, Await, Return">
<emu-nt params="Yield, Await, Return"><a href="#prod-BreakableStatement">BreakableStatement</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a0b98263"><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-IterationStatement">IterationStatement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="b998d9bf"><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-SwitchStatement">SwitchStatement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="BlockStatement" params="Yield, Await, Return">
<emu-nt params="Yield, Await, Return"><a href="#prod-BlockStatement">BlockStatement</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cf0a5fc2"><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-Block">Block</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="Block" params="Yield, Await, Return">
<emu-nt params="Yield, Await, Return"><a href="#prod-Block">Block</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5228fd45"><emu-t>{</emu-t><emu-nt params="?Yield, ?Await, ?Return" optional=""><a href="#prod-StatementList">StatementList</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="StatementList" params="Yield, Await, Return">
<emu-nt params="Yield, Await, Return"><a href="#prod-StatementList">StatementList</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="39651bc0"><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-StatementListItem">StatementListItem</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="db572542"><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-StatementList">StatementList</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-StatementListItem">StatementListItem</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="StatementListItem" params="Yield, Await, Return">
<emu-nt params="Yield, Await, Return"><a href="#prod-StatementListItem">StatementListItem</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4843d33f"><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="31391311"><emu-nt params="?Yield, ?Await"><a href="#prod-Declaration">Declaration</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="LexicalDeclaration" params="In, Yield, Await">
<emu-nt params="In, Yield, Await"><a href="#prod-LexicalDeclaration">LexicalDeclaration</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8d299b81"><emu-nt><a href="#prod-LetOrConst">LetOrConst</a></emu-nt><emu-nt params="?In, ?Yield, ?Await"><a href="#prod-BindingList">BindingList</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="LetOrConst">
<emu-nt><a href="#prod-LetOrConst">LetOrConst</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="940c6b54"><emu-t>let</emu-t></emu-rhs>
<emu-rhs a="36233f0f"><emu-t>const</emu-t></emu-rhs>
</emu-production>
<emu-production name="BindingList" params="In, Yield, Await">
<emu-nt params="In, Yield, Await"><a href="#prod-BindingList">BindingList</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="35e0fa1e"><emu-nt params="?In, ?Yield, ?Await"><a href="#prod-LexicalBinding">LexicalBinding</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="1435fb35"><emu-nt params="?In, ?Yield, ?Await"><a href="#prod-BindingList">BindingList</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>,</emu-t><emu-nt params="?In, ?Yield, ?Await"><a href="#prod-LexicalBinding">LexicalBinding</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="LexicalBinding" params="In, Yield, Await">
<emu-nt params="In, Yield, Await"><a href="#prod-LexicalBinding">LexicalBinding</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8eeb7c11"><emu-nt params="?Yield, ?Await"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt params="?In, ?Yield, ?Await" optional=""><a href="#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="49d70a55"><emu-nt params="?Yield, ?Await"><a href="#prod-BindingPattern">BindingPattern</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt params="?In, ?Yield, ?Await"><a href="#prod-Initializer">Initializer</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="VariableStatement" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-VariableStatement">VariableStatement</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b41c0900"><emu-t>var</emu-t><emu-nt params="+In, ?Yield, ?Await"><a href="#prod-VariableDeclarationList">VariableDeclarationList</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="VariableDeclarationList" params="In, Yield, Await">
<emu-nt params="In, Yield, Await"><a href="#prod-VariableDeclarationList">VariableDeclarationList</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="3ece12c3"><emu-nt params="?In, ?Yield, ?Await"><a href="#prod-VariableDeclaration">VariableDeclaration</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="c6c87748"><emu-nt params="?In, ?Yield, ?Await"><a href="#prod-VariableDeclarationList">VariableDeclarationList</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>,</emu-t><emu-nt params="?In, ?Yield, ?Await"><a href="#prod-VariableDeclaration">VariableDeclaration</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="VariableDeclaration" params="In, Yield, Await">
<emu-nt params="In, Yield, Await"><a href="#prod-VariableDeclaration">VariableDeclaration</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8eeb7c11"><emu-nt params="?Yield, ?Await"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt params="?In, ?Yield, ?Await" optional=""><a href="#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="49d70a55"><emu-nt params="?Yield, ?Await"><a href="#prod-BindingPattern">BindingPattern</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt params="?In, ?Yield, ?Await"><a href="#prod-Initializer">Initializer</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="BindingPattern" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-BindingPattern">BindingPattern</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="7d60f68c"><emu-nt params="?Yield, ?Await"><a href="#prod-ObjectBindingPattern">ObjectBindingPattern</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="869ca7d6"><emu-nt params="?Yield, ?Await"><a href="#prod-ArrayBindingPattern">ArrayBindingPattern</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ObjectBindingPattern" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-ObjectBindingPattern">ObjectBindingPattern</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><emu-t>{</emu-t><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="539d4408"><emu-t>{</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-BindingRestProperty">BindingRestProperty</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="b1dfec5e"><emu-t>{</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-BindingPropertyList">BindingPropertyList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="f7cb1385"><emu-t>{</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-BindingPropertyList">BindingPropertyList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>,</emu-t><emu-nt params="?Yield, ?Await" optional=""><a href="#prod-BindingRestProperty">BindingRestProperty</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="ArrayBindingPattern" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-ArrayBindingPattern">ArrayBindingPattern</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f36c8065"><emu-t>[</emu-t><emu-nt optional=""><a href="#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt params="?Yield, ?Await" optional=""><a href="#prod-BindingRestElement">BindingRestElement</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="4f3da32d"><emu-t>[</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-BindingElementList">BindingElementList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>]</emu-t></emu-rhs>
<emu-rhs a="799161ee"><emu-t>[</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-BindingElementList">BindingElementList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>,</emu-t><emu-nt optional=""><a href="#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt params="?Yield, ?Await" optional=""><a href="#prod-BindingRestElement">BindingRestElement</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="BindingRestProperty" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-BindingRestProperty">BindingRestProperty</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="34b0d77b"><emu-t>...</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="BindingPropertyList" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-BindingPropertyList">BindingPropertyList</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f1b6880e"><emu-nt params="?Yield, ?Await"><a href="#prod-BindingProperty">BindingProperty</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="79695f7a"><emu-nt params="?Yield, ?Await"><a href="#prod-BindingPropertyList">BindingPropertyList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>,</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-BindingProperty">BindingProperty</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="BindingElementList" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-BindingElementList">BindingElementList</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="2e96b0e0"><emu-nt params="?Yield, ?Await"><a href="#prod-BindingElisionElement">BindingElisionElement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="e73f33c3"><emu-nt params="?Yield, ?Await"><a href="#prod-BindingElementList">BindingElementList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>,</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-BindingElisionElement">BindingElisionElement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="BindingElisionElement" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-BindingElisionElement">BindingElisionElement</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e636dca9"><emu-nt optional=""><a href="#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt params="?Yield, ?Await"><a href="#prod-BindingElement">BindingElement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="BindingProperty" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-BindingProperty">BindingProperty</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d3526702"><emu-nt params="?Yield, ?Await"><a href="#prod-SingleNameBinding">SingleNameBinding</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="5c291273"><emu-nt params="?Yield, ?Await"><a href="#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"><a href="#prod-BindingElement">BindingElement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="BindingElement" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-BindingElement">BindingElement</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d3526702"><emu-nt params="?Yield, ?Await"><a href="#prod-SingleNameBinding">SingleNameBinding</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="132bf94f"><emu-nt params="?Yield, ?Await"><a href="#prod-BindingPattern">BindingPattern</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt params="+In, ?Yield, ?Await" optional=""><a href="#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="SingleNameBinding" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-SingleNameBinding">SingleNameBinding</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="306ee631"><emu-nt params="?Yield, ?Await"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt params="+In, ?Yield, ?Await" optional=""><a href="#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="BindingRestElement" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-BindingRestElement">BindingRestElement</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="34b0d77b"><emu-t>...</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="2dbec6ac"><emu-t>...</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-BindingPattern">BindingPattern</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="EmptyStatement">
<emu-nt><a href="#prod-EmptyStatement">EmptyStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4a0dac03"><emu-t>;</emu-t></emu-rhs>
</emu-production>
<emu-production name="ExpressionStatement" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-ExpressionStatement">ExpressionStatement</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c38255ff"><emu-gann>[lookahead ∉ { <emu-t>{</emu-t>, <emu-t>function</emu-t>, <emu-t>async</emu-t>
<emu-gann>[no <emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann>
<emu-t>function</emu-t>, <emu-t>class</emu-t>, <emu-t>let</emu-t>
<emu-t>[</emu-t> }]</emu-gann><emu-nt params="+In, ?Yield, ?Await"><a href="#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-production name="IfStatement" params="Yield, Await, Return">
<emu-nt params="Yield, Await, Return"><a href="#prod-IfStatement">IfStatement</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="19528ab2"><emu-t>if</emu-t><emu-t>(</emu-t><emu-nt params="+In, ?Yield, ?Await"><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt><emu-t>else</emu-t><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="80677404"><emu-t>if</emu-t><emu-t>(</emu-t><emu-nt params="+In, ?Yield, ?Await"><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="IterationStatement" params="Yield, Await, Return">
<emu-nt params="Yield, Await, Return"><a href="#prod-IterationStatement">IterationStatement</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1222a724"><emu-t>do</emu-t><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt><emu-t>while</emu-t><emu-t>(</emu-t><emu-nt params="+In, ?Yield, ?Await"><a href="#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="016716d1"><emu-t>while</emu-t><emu-t>(</emu-t><emu-nt params="+In, ?Yield, ?Await"><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="ea6bc481"><emu-t>for</emu-t><emu-t>(</emu-t><emu-gann>[lookahead ∉ { <emu-t>let</emu-t>
<emu-t>[</emu-t> }]</emu-gann><emu-nt params="~In, ?Yield, ?Await" optional=""><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[~In, ?Yield, ?Await]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt params="+In, ?Yield, ?Await" optional=""><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt params="+In, ?Yield, ?Await" optional=""><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="16b1d90d"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt params="~In, ?Yield, ?Await"><a href="#prod-VariableDeclarationList">VariableDeclarationList</a><emu-mods><emu-params>[~In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt params="+In, ?Yield, ?Await" optional=""><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt params="+In, ?Yield, ?Await" optional=""><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="21b13ea3"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt params="~In, ?Yield, ?Await"><a href="#prod-LexicalDeclaration">LexicalDeclaration</a><emu-mods><emu-params>[~In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt params="+In, ?Yield, ?Await" optional=""><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>;</emu-t><emu-nt params="+In, ?Yield, ?Await" optional=""><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="27f872b5"><emu-t>for</emu-t><emu-t>(</emu-t><emu-gann>[lookahead ∉ { <emu-t>let</emu-t>
<emu-t>[</emu-t> }]</emu-gann><emu-nt params="?Yield, ?Await"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>in</emu-t><emu-nt params="+In, ?Yield, ?Await"><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="ecc974b5"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-ForBinding">ForBinding</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>in</emu-t><emu-nt params="+In, ?Yield, ?Await"><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="cdc1d34b"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-ForDeclaration">ForDeclaration</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>in</emu-t><emu-nt params="+In, ?Yield, ?Await"><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="52724ca6"><emu-t>for</emu-t><emu-t>(</emu-t><emu-gann>[lookahead ≠ <emu-t>let</emu-t>]</emu-gann><emu-nt params="?Yield, ?Await"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>of</emu-t><emu-nt params="+In, ?Yield, ?Await"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="e7c9ffda"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-ForBinding">ForBinding</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>of</emu-t><emu-nt params="+In, ?Yield, ?Await"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="3df54906"><emu-t>for</emu-t><emu-t>(</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-ForDeclaration">ForDeclaration</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>of</emu-t><emu-nt params="+In, ?Yield, ?Await"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="38f44e29" constraints="+Await"><emu-constraints>[+Await]</emu-constraints><emu-t>for</emu-t><emu-t>await</emu-t><emu-t>(</emu-t><emu-gann>[lookahead ≠ <emu-t>let</emu-t>]</emu-gann><emu-nt params="?Yield, ?Await"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>of</emu-t><emu-nt params="+In, ?Yield, ?Await"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="f414a6ad" constraints="+Await"><emu-constraints>[+Await]</emu-constraints><emu-t>for</emu-t><emu-t>await</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-ForBinding">ForBinding</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>of</emu-t><emu-nt params="+In, ?Yield, ?Await"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="7f1080d7" constraints="+Await"><emu-constraints>[+Await]</emu-constraints><emu-t>for</emu-t><emu-t>await</emu-t><emu-t>(</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-ForDeclaration">ForDeclaration</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>of</emu-t><emu-nt params="+In, ?Yield, ?Await"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ForDeclaration" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-ForDeclaration">ForDeclaration</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="93a8bcaa"><emu-nt><a href="#prod-LetOrConst">LetOrConst</a></emu-nt><emu-nt params="?Yield, ?Await"><a href="#prod-ForBinding">ForBinding</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ForBinding" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-ForBinding">ForBinding</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="22bf917e"><emu-nt params="?Yield, ?Await"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="9eb89dc1"><emu-nt params="?Yield, ?Await"><a href="#prod-BindingPattern">BindingPattern</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ContinueStatement" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-ContinueStatement">ContinueStatement</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e903cf81"><emu-t>continue</emu-t><emu-t>;</emu-t></emu-rhs>
<emu-rhs a="14858b1f"><emu-t>continue</emu-t><emu-gann>[no <emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-nt params="?Yield, ?Await"><a href="#prod-LabelIdentifier">LabelIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production>
<emu-production name="BreakStatement" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-BreakStatement">BreakStatement</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b65229e7"><emu-t>break</emu-t><emu-t>;</emu-t></emu-rhs>
<emu-rhs a="9c83b42f"><emu-t>break</emu-t><emu-gann>[no <emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-nt params="?Yield, ?Await"><a href="#prod-LabelIdentifier">LabelIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production>
<emu-production name="ReturnStatement" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-ReturnStatement">ReturnStatement</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0b293381"><emu-t>return</emu-t><emu-t>;</emu-t></emu-rhs>
<emu-rhs a="b7205f0d"><emu-t>return</emu-t><emu-gann>[no <emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-nt params="+In, ?Yield, ?Await"><a href="#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-production name="WithStatement" params="Yield, Await, Return">
<emu-nt params="Yield, Await, Return"><a href="#prod-WithStatement">WithStatement</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="2ceedb70"><emu-t>with</emu-t><emu-t>(</emu-t><emu-nt params="+In, ?Yield, ?Await"><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="SwitchStatement" params="Yield, Await, Return">
<emu-nt params="Yield, Await, Return"><a href="#prod-SwitchStatement">SwitchStatement</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="751972c0"><emu-t>switch</emu-t><emu-t>(</emu-t><emu-nt params="+In, ?Yield, ?Await"><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-CaseBlock">CaseBlock</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="CaseBlock" params="Yield, Await, Return">
<emu-nt params="Yield, Await, Return"><a href="#prod-CaseBlock">CaseBlock</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="57e1f602"><emu-t>{</emu-t><emu-nt params="?Yield, ?Await, ?Return" optional=""><a href="#prod-CaseClauses">CaseClauses</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="d34b22b4"><emu-t>{</emu-t><emu-nt params="?Yield, ?Await, ?Return" optional=""><a href="#prod-CaseClauses">CaseClauses</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-DefaultClause">DefaultClause</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt><emu-nt params="?Yield, ?Await, ?Return" optional=""><a href="#prod-CaseClauses">CaseClauses</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="CaseClauses" params="Yield, Await, Return">
<emu-nt params="Yield, Await, Return"><a href="#prod-CaseClauses">CaseClauses</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5cf2554e"><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-CaseClause">CaseClause</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="f11e9d08"><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-CaseClauses">CaseClauses</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-CaseClause">CaseClause</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="CaseClause" params="Yield, Await, Return">
<emu-nt params="Yield, Await, Return"><a href="#prod-CaseClause">CaseClause</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ccfab6dd"><emu-t>case</emu-t><emu-nt params="+In, ?Yield, ?Await"><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>:</emu-t><emu-nt params="?Yield, ?Await, ?Return" optional=""><a href="#prod-StatementList">StatementList</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="DefaultClause" params="Yield, Await, Return">
<emu-nt params="Yield, Await, Return"><a href="#prod-DefaultClause">DefaultClause</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="74934b03"><emu-t>default</emu-t><emu-t>:</emu-t><emu-nt params="?Yield, ?Await, ?Return" optional=""><a href="#prod-StatementList">StatementList</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="LabelledStatement" params="Yield, Await, Return">
<emu-nt params="Yield, Await, Return"><a href="#prod-LabelledStatement">LabelledStatement</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="be1c4a00"><emu-nt params="?Yield, ?Await"><a href="#prod-LabelIdentifier">LabelIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>:</emu-t><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-LabelledItem">LabelledItem</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="LabelledItem" params="Yield, Await, Return">
<emu-nt params="Yield, Await, Return"><a href="#prod-LabelledItem">LabelledItem</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4843d33f"><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="7743708d"><emu-nt params="?Yield, ?Await, ~Default"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a><emu-mods><emu-params>[?Yield, ?Await, ~Default]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ThrowStatement" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-ThrowStatement">ThrowStatement</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="abf0986c"><emu-t>throw</emu-t><emu-gann>[no <emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-nt params="+In, ?Yield, ?Await"><a href="#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-production name="TryStatement" params="Yield, Await, Return">
<emu-nt params="Yield, Await, Return"><a href="#prod-TryStatement">TryStatement</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1105fb1b"><emu-t>try</emu-t><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-Block">Block</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-Catch">Catch</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="032228f5"><emu-t>try</emu-t><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-Block">Block</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-Finally">Finally</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="c9f66613"><emu-t>try</emu-t><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-Block">Block</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-Catch">Catch</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-Finally">Finally</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="Catch" params="Yield, Await, Return">
<emu-nt params="Yield, Await, Return"><a href="#prod-Catch">Catch</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="824e8c92"><emu-t>catch</emu-t><emu-t>(</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-CatchParameter">CatchParameter</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-Block">Block</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="548fd244"><emu-t>catch</emu-t><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-Block">Block</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="Finally" params="Yield, Await, Return">
<emu-nt params="Yield, Await, Return"><a href="#prod-Finally">Finally</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="7bd00a40"><emu-t>finally</emu-t><emu-nt params="?Yield, ?Await, ?Return"><a href="#prod-Block">Block</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="CatchParameter" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-CatchParameter">CatchParameter</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="22bf917e"><emu-nt params="?Yield, ?Await"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="9eb89dc1"><emu-nt params="?Yield, ?Await"><a href="#prod-BindingPattern">BindingPattern</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="DebuggerStatement">
<emu-nt><a href="#prod-DebuggerStatement">DebuggerStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="352e6172"><emu-t>debugger</emu-t><emu-t>;</emu-t></emu-rhs>
</emu-production>
</emu-annex>
<emu-annex id="sec-functions-and-classes">
<h1><span class="secnum">A.4</span>Functions and Classes</h1>
<emu-production name="FunctionDeclaration" params="Yield, Await, Default">
<emu-nt params="Yield, Await, Default"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a><emu-mods><emu-params>[Yield, Await, Default]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="7c02f6b3"><emu-t>function</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>(</emu-t><emu-nt params="~Yield, ~Await"><a href="#prod-FormalParameters">FormalParameters</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt params="~Yield, ~Await"><a href="#prod-FunctionBody">FunctionBody</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params></emu-mods></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="ff05b860" constraints="+Default"><emu-constraints>[+Default]</emu-constraints><emu-t>function</emu-t><emu-t>(</emu-t><emu-nt params="~Yield, ~Await"><a href="#prod-FormalParameters">FormalParameters</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt params="~Yield, ~Await"><a href="#prod-FunctionBody">FunctionBody</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params></emu-mods></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="FunctionExpression">
<emu-nt><a href="#prod-FunctionExpression">FunctionExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1faafdcc"><emu-t>function</emu-t><emu-nt params="~Yield, ~Await" optional=""><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>(</emu-t><emu-nt params="~Yield, ~Await"><a href="#prod-FormalParameters">FormalParameters</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt params="~Yield, ~Await"><a href="#prod-FunctionBody">FunctionBody</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params></emu-mods></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="UniqueFormalParameters" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="900b794a"><emu-nt params="?Yield, ?Await"><a href="#prod-FormalParameters">FormalParameters</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="FormalParameters" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-FormalParameters">FormalParameters</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></emu-rhs>
<emu-rhs a="c52f7805"><emu-nt params="?Yield, ?Await"><a href="#prod-FunctionRestParameter">FunctionRestParameter</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="e5fdd15f"><emu-nt params="?Yield, ?Await"><a href="#prod-FormalParameterList">FormalParameterList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="58349494"><emu-nt params="?Yield, ?Await"><a href="#prod-FormalParameterList">FormalParameterList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>,</emu-t></emu-rhs>
<emu-rhs a="607f4086"><emu-nt params="?Yield, ?Await"><a href="#prod-FormalParameterList">FormalParameterList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>,</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-FunctionRestParameter">FunctionRestParameter</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="FormalParameterList" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-FormalParameterList">FormalParameterList</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="dd0854fb"><emu-nt params="?Yield, ?Await"><a href="#prod-FormalParameter">FormalParameter</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="30b35c7e"><emu-nt params="?Yield, ?Await"><a href="#prod-FormalParameterList">FormalParameterList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>,</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-FormalParameter">FormalParameter</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="FunctionRestParameter" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-FunctionRestParameter">FunctionRestParameter</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="216da14c"><emu-nt params="?Yield, ?Await"><a href="#prod-BindingRestElement">BindingRestElement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="FormalParameter" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-FormalParameter">FormalParameter</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c6930e11"><emu-nt params="?Yield, ?Await"><a href="#prod-BindingElement">BindingElement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="FunctionBody" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-FunctionBody">FunctionBody</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="82527203"><emu-nt params="?Yield, ?Await"><a href="#prod-FunctionStatementList">FunctionStatementList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="FunctionStatementList" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-FunctionStatementList">FunctionStatementList</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="2267baf8"><emu-nt params="?Yield, ?Await, +Return" optional=""><a href="#prod-StatementList">StatementList</a><emu-mods><emu-params>[?Yield, ?Await, +Return]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ArrowFunction" params="In, Yield, Await">
<emu-nt params="In, Yield, Await"><a href="#prod-ArrowFunction">ArrowFunction</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="bdca54b2"><emu-nt params="?Yield, ?Await"><a href="#prod-ArrowParameters">ArrowParameters</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-gann>[no <emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-t>=&gt;</emu-t><emu-nt params="?In"><a href="#prod-ConciseBody">ConciseBody</a><emu-mods><emu-params>[?In]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ArrowParameters" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-ArrowParameters">ArrowParameters</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="22bf917e"><emu-nt params="?Yield, ?Await"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="parencover"><emu-nt params="?Yield, ?Await"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ConciseBody" params="In">
<emu-nt params="In"><a href="#prod-ConciseBody">ConciseBody</a><emu-mods><emu-params>[In]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="67ce9873"><emu-gann>[lookahead ≠ <emu-t>{</emu-t>]</emu-gann><emu-nt params="?In, ~Yield, ~Await"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[?In, ~Yield, ~Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="6f7b95b3"><emu-t>{</emu-t><emu-nt params="~Yield, ~Await"><a href="#prod-FunctionBody">FunctionBody</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params></emu-mods></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<p>When the production <emu-production name="ArrowParameters" params="Yield, Await" a="parencover" class=" inline" collapsed="">
<emu-nt params="Yield, Await"><a href="#prod-ArrowParameters">ArrowParameters</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="parencover"><emu-nt params="?Yield, ?Await"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs></emu-production> is recognized the following grammar is used to refine the interpretation of <emu-nt id="_ref_14824"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt>:</p>
<emu-production name="ArrowFormalParameters" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-ArrowFormalParameters">ArrowFormalParameters</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b7561ab3"><emu-t>(</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t></emu-rhs>
</emu-production>
<p>&nbsp;</p>
<emu-production name="AsyncArrowFunction" params="In, Yield, Await">
<emu-nt params="In, Yield, Await"><a href="#prod-AsyncArrowFunction">AsyncArrowFunction</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="bb50dce4"><emu-t>async</emu-t><emu-gann>[no <emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-nt params="?Yield"><a href="#prod-AsyncArrowBindingIdentifier">AsyncArrowBindingIdentifier</a><emu-mods><emu-params>[?Yield]</emu-params></emu-mods></emu-nt><emu-gann>[no <emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-t>=&gt;</emu-t><emu-nt params="?In"><a href="#prod-AsyncConciseBody">AsyncConciseBody</a><emu-mods><emu-params>[?In]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="callcover"><emu-nt params="?Yield, ?Await"><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-gann>[no <emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-t>=&gt;</emu-t><emu-nt params="?In"><a href="#prod-AsyncConciseBody">AsyncConciseBody</a><emu-mods><emu-params>[?In]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="AsyncConciseBody" params="In">
<emu-nt params="In"><a href="#prod-AsyncConciseBody">AsyncConciseBody</a><emu-mods><emu-params>[In]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="4fc9a6b0"><emu-gann>[lookahead ≠ <emu-t>{</emu-t>]</emu-gann><emu-nt params="?In, ~Yield, +Await"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[?In, ~Yield, +Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="6ccf9be6"><emu-t>{</emu-t><emu-nt><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<p>When the production <emu-production name="AsyncArrowFunction" params="In, Yield, Await" a="callcover" class=" inline" collapsed="">
<emu-nt params="In, Yield, Await"><a href="#prod-AsyncArrowFunction">AsyncArrowFunction</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="callcover"><emu-nt params="?Yield, ?Await"><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-gann>[no <emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-t>=&gt;</emu-t><emu-nt params="?In"><a href="#prod-AsyncConciseBody">AsyncConciseBody</a><emu-mods><emu-params>[?In]</emu-params></emu-mods></emu-nt></emu-rhs></emu-production> is recognized the following grammar is used to refine the interpretation of <emu-nt id="_ref_14825"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt>:</p>
<emu-production name="AsyncArrowHead">
<emu-nt><a href="#prod-AsyncArrowHead">AsyncArrowHead</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c9d14bfe"><emu-t>async</emu-t><emu-gann>[no <emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-nt params="~Yield, +Await"><a href="#prod-ArrowFormalParameters">ArrowFormalParameters</a><emu-mods><emu-params>[~Yield, +Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<p>&nbsp;</p>
<emu-production name="MethodDefinition" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-MethodDefinition">MethodDefinition</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="19d49312"><emu-nt params="?Yield, ?Await"><a href="#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"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt params="~Yield, ~Await"><a href="#prod-FunctionBody">FunctionBody</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params></emu-mods></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="b8854ce2"><emu-nt params="?Yield, ?Await"><a href="#prod-GeneratorMethod">GeneratorMethod</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="978adba9"><emu-nt params="?Yield, ?Await"><a href="#prod-AsyncMethod">AsyncMethod</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="d8d5f4bb"><emu-nt params="?Yield, ?Await"><a href="#prod-AsyncGeneratorMethod">AsyncGeneratorMethod</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="044ecd0b"><emu-t>get</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-PropertyName">PropertyName</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>(</emu-t><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt params="~Yield, ~Await"><a href="#prod-FunctionBody">FunctionBody</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params></emu-mods></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="55774850"><emu-t>set</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-PropertyName">PropertyName</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>(</emu-t><emu-nt><a href="#prod-PropertySetParameterList">PropertySetParameterList</a></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt params="~Yield, ~Await"><a href="#prod-FunctionBody">FunctionBody</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params></emu-mods></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="PropertySetParameterList">
<emu-nt><a href="#prod-PropertySetParameterList">PropertySetParameterList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="3f4952d7"><emu-nt params="~Yield, ~Await"><a href="#prod-FormalParameter">FormalParameter</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="GeneratorMethod" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-GeneratorMethod">GeneratorMethod</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="54505152"><emu-t>*</emu-t><emu-nt params="?Yield, ?Await"><a href="#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"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a><emu-mods><emu-params>[+Yield, ~Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="GeneratorDeclaration" params="Yield, Await, Default">
<emu-nt params="Yield, Await, Default"><a href="#prod-GeneratorDeclaration">GeneratorDeclaration</a><emu-mods><emu-params>[Yield, Await, Default]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e7a001a0"><emu-t>function</emu-t><emu-t>*</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>(</emu-t><emu-nt params="+Yield, ~Await"><a href="#prod-FormalParameters">FormalParameters</a><emu-mods><emu-params>[+Yield, ~Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="19cc4b38" constraints="+Default"><emu-constraints>[+Default]</emu-constraints><emu-t>function</emu-t><emu-t>*</emu-t><emu-t>(</emu-t><emu-nt params="+Yield, ~Await"><a href="#prod-FormalParameters">FormalParameters</a><emu-mods><emu-params>[+Yield, ~Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="GeneratorExpression">
<emu-nt><a href="#prod-GeneratorExpression">GeneratorExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="65253812"><emu-t>function</emu-t><emu-t>*</emu-t><emu-nt params="+Yield, ~Await" optional=""><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[+Yield, ~Await]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>(</emu-t><emu-nt params="+Yield, ~Await"><a href="#prod-FormalParameters">FormalParameters</a><emu-mods><emu-params>[+Yield, ~Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="GeneratorBody">
<emu-nt><a href="#prod-GeneratorBody">GeneratorBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="42e56a37"><emu-nt params="+Yield, ~Await"><a href="#prod-FunctionBody">FunctionBody</a><emu-mods><emu-params>[+Yield, ~Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="YieldExpression" params="In, Await">
<emu-nt params="In, Await"><a href="#prod-YieldExpression">YieldExpression</a><emu-mods><emu-params>[In, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d1df3360"><emu-t>yield</emu-t></emu-rhs>
<emu-rhs a="68b64d66"><emu-t>yield</emu-t><emu-gann>[no <emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-nt params="?In, +Yield, ?Await"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[?In, +Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="9ab6e2ea"><emu-t>yield</emu-t><emu-gann>[no <emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-t>*</emu-t><emu-nt params="?In, +Yield, ?Await"><a href="#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[?In, +Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="AsyncGeneratorMethod" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-AsyncGeneratorMethod">AsyncGeneratorMethod</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a713bc4f"><emu-t>async</emu-t><emu-gann>[no <emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-t>*</emu-t><emu-nt params="?Yield, ?Await"><a href="#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"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a><emu-mods><emu-params>[+Yield, +Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="AsyncGeneratorDeclaration" params="Yield, Await, Default">
<emu-nt params="Yield, Await, Default"><a href="#prod-AsyncGeneratorDeclaration">AsyncGeneratorDeclaration</a><emu-mods><emu-params>[Yield, Await, Default]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="bf1795ae"><emu-t>async</emu-t><emu-gann>[no <emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-t>function</emu-t><emu-t>*</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>(</emu-t><emu-nt params="+Yield, +Await"><a href="#prod-FormalParameters">FormalParameters</a><emu-mods><emu-params>[+Yield, +Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="cdd34229" constraints="+Default"><emu-constraints>[+Default]</emu-constraints><emu-t>async</emu-t><emu-gann>[no <emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-t>function</emu-t><emu-t>*</emu-t><emu-t>(</emu-t><emu-nt params="+Yield, +Await"><a href="#prod-FormalParameters">FormalParameters</a><emu-mods><emu-params>[+Yield, +Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="AsyncGeneratorExpression">
<emu-nt><a href="#prod-AsyncGeneratorExpression">AsyncGeneratorExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ca1d1606"><emu-t>async</emu-t><emu-gann>[no <emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-t>function</emu-t><emu-t>*</emu-t><emu-nt params="+Yield, +Await" optional=""><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[+Yield, +Await]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>(</emu-t><emu-nt params="+Yield, +Await"><a href="#prod-FormalParameters">FormalParameters</a><emu-mods><emu-params>[+Yield, +Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="AsyncGeneratorBody">
<emu-nt><a href="#prod-AsyncGeneratorBody">AsyncGeneratorBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="cd09a4ad"><emu-nt params="+Yield, +Await"><a href="#prod-FunctionBody">FunctionBody</a><emu-mods><emu-params>[+Yield, +Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="AsyncMethod" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-AsyncMethod">AsyncMethod</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a922691e"><emu-t>async</emu-t><emu-gann>[no <emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-nt params="?Yield, ?Await"><a href="#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"><a href="#prod-UniqueFormalParameters">UniqueFormalParameters</a><emu-mods><emu-params>[~Yield, +Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="AsyncFunctionDeclaration" params="Yield, Await, Default">
<emu-nt params="Yield, Await, Default"><a href="#prod-AsyncFunctionDeclaration">AsyncFunctionDeclaration</a><emu-mods><emu-params>[Yield, Await, Default]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f512250e"><emu-t>async</emu-t><emu-gann>[no <emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-t>function</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>(</emu-t><emu-nt params="~Yield, +Await"><a href="#prod-FormalParameters">FormalParameters</a><emu-mods><emu-params>[~Yield, +Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="fef042b8" constraints="+Default"><emu-constraints>[+Default]</emu-constraints><emu-t>async</emu-t><emu-gann>[no <emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-t>function</emu-t><emu-t>(</emu-t><emu-nt params="~Yield, +Await"><a href="#prod-FormalParameters">FormalParameters</a><emu-mods><emu-params>[~Yield, +Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="AsyncFunctionExpression">
<emu-nt><a href="#prod-AsyncFunctionExpression">AsyncFunctionExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c25b1d19"><emu-t>async</emu-t><emu-gann>[no <emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-t>function</emu-t><emu-t>(</emu-t><emu-nt params="~Yield, +Await"><a href="#prod-FormalParameters">FormalParameters</a><emu-mods><emu-params>[~Yield, +Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="be6457e0"><emu-t>async</emu-t><emu-gann>[no <emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann><emu-t>function</emu-t><emu-nt params="~Yield, +Await"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[~Yield, +Await]</emu-params></emu-mods></emu-nt><emu-t>(</emu-t><emu-nt params="~Yield, +Await"><a href="#prod-FormalParameters">FormalParameters</a><emu-mods><emu-params>[~Yield, +Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-t>{</emu-t><emu-nt><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="AsyncFunctionBody">
<emu-nt><a href="#prod-AsyncFunctionBody">AsyncFunctionBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8ff4dc7c"><emu-nt params="~Yield, +Await"><a href="#prod-FunctionBody">FunctionBody</a><emu-mods><emu-params>[~Yield, +Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="AwaitExpression" params="Yield">
<emu-nt params="Yield"><a href="#prod-AwaitExpression">AwaitExpression</a><emu-mods><emu-params>[Yield]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="c19c56e7"><emu-t>await</emu-t><emu-nt params="?Yield, +Await"><a href="#prod-UnaryExpression">UnaryExpression</a><emu-mods><emu-params>[?Yield, +Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ClassDeclaration" params="Yield, Await, Default">
<emu-nt params="Yield, Await, Default"><a href="#prod-ClassDeclaration">ClassDeclaration</a><emu-mods><emu-params>[Yield, Await, Default]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="afef225f"><emu-t>class</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt params="?Yield, ?Await"><a href="#prod-ClassTail">ClassTail</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="788487dc" constraints="+Default"><emu-constraints>[+Default]</emu-constraints><emu-t>class</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-ClassTail">ClassTail</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ClassExpression" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-ClassExpression">ClassExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="dd578cac"><emu-t>class</emu-t><emu-nt params="?Yield, ?Await" optional=""><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt params="?Yield, ?Await"><a href="#prod-ClassTail">ClassTail</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ClassTail" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-ClassTail">ClassTail</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="d2d0a98e"><emu-nt params="?Yield, ?Await" optional=""><a href="#prod-ClassHeritage">ClassHeritage</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>{</emu-t><emu-nt params="?Yield, ?Await" optional=""><a href="#prod-ClassBody">ClassBody</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="ClassHeritage" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-ClassHeritage">ClassHeritage</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="7989e09f"><emu-t>extends</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ClassBody" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-ClassBody">ClassBody</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1c8eab17"><emu-nt params="?Yield, ?Await"><a href="#prod-ClassElementList">ClassElementList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ClassElementList" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-ClassElementList">ClassElementList</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="2fb64cb4"><emu-nt params="?Yield, ?Await"><a href="#prod-ClassElement">ClassElement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="180d43b5"><emu-nt params="?Yield, ?Await"><a href="#prod-ClassElementList">ClassElementList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt params="?Yield, ?Await"><a href="#prod-ClassElement">ClassElement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ClassElement" params="Yield, Await">
<emu-nt params="Yield, Await"><a href="#prod-ClassElement">ClassElement</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="91edbff4"><emu-nt params="?Yield, ?Await"><a href="#prod-MethodDefinition">MethodDefinition</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="6b4234e8"><emu-t>static</emu-t><emu-nt params="?Yield, ?Await"><a href="#prod-MethodDefinition">MethodDefinition</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="4a0dac03"><emu-t>;</emu-t></emu-rhs>
</emu-production>
</emu-annex>
<emu-annex id="sec-scripts-and-modules">
<h1><span class="secnum">A.5</span>Scripts and Modules</h1>
<emu-production name="Script">
<emu-nt><a href="#prod-Script">Script</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="08c8df8e"><emu-nt optional=""><a href="#prod-ScriptBody">ScriptBody</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ScriptBody">
<emu-nt><a href="#prod-ScriptBody">ScriptBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="98de0f78"><emu-nt params="~Yield, ~Await, ~Return"><a href="#prod-StatementList">StatementList</a><emu-mods><emu-params>[~Yield, ~Await, ~Return]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="Module">
<emu-nt><a href="#prod-Module">Module</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="52f49b96"><emu-nt optional=""><a href="#prod-ModuleBody">ModuleBody</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ModuleBody">
<emu-nt><a href="#prod-ModuleBody">ModuleBody</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="89010d7d"><emu-nt><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ModuleItemList">
<emu-nt><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="029ec31e"><emu-nt><a href="#prod-ModuleItem">ModuleItem</a></emu-nt></emu-rhs>
<emu-rhs a="75ddb725"><emu-nt><a href="#prod-ModuleItemList">ModuleItemList</a></emu-nt><emu-nt><a href="#prod-ModuleItem">ModuleItem</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ModuleItem">
<emu-nt><a href="#prod-ModuleItem">ModuleItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="e0559377"><emu-nt><a href="#prod-ImportDeclaration">ImportDeclaration</a></emu-nt></emu-rhs>
<emu-rhs a="298e81b0"><emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt></emu-rhs>
<emu-rhs a="b8d22333"><emu-nt params="~Yield, ~Await, ~Return"><a href="#prod-StatementListItem">StatementListItem</a><emu-mods><emu-params>[~Yield, ~Await, ~Return]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ImportDeclaration">
<emu-nt><a href="#prod-ImportDeclaration">ImportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1a51d4c5"><emu-t>import</emu-t><emu-nt><a href="#prod-ImportClause">ImportClause</a></emu-nt><emu-nt><a href="#prod-FromClause">FromClause</a></emu-nt><emu-t>;</emu-t></emu-rhs>
<emu-rhs a="a1d094cc"><emu-t>import</emu-t><emu-nt><a href="#prod-ModuleSpecifier">ModuleSpecifier</a></emu-nt><emu-t>;</emu-t></emu-rhs>
</emu-production>
<emu-production name="ImportClause">
<emu-nt><a href="#prod-ImportClause">ImportClause</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="3a2f22cc"><emu-nt><a href="#prod-ImportedDefaultBinding">ImportedDefaultBinding</a></emu-nt></emu-rhs>
<emu-rhs a="f35b66f8"><emu-nt><a href="#prod-NameSpaceImport">NameSpaceImport</a></emu-nt></emu-rhs>
<emu-rhs a="cdf0063c"><emu-nt><a href="#prod-NamedImports">NamedImports</a></emu-nt></emu-rhs>
<emu-rhs a="cbd47597"><emu-nt><a href="#prod-ImportedDefaultBinding">ImportedDefaultBinding</a></emu-nt><emu-t>,</emu-t><emu-nt><a href="#prod-NameSpaceImport">NameSpaceImport</a></emu-nt></emu-rhs>
<emu-rhs a="8a1f1182"><emu-nt><a href="#prod-ImportedDefaultBinding">ImportedDefaultBinding</a></emu-nt><emu-t>,</emu-t><emu-nt><a href="#prod-NamedImports">NamedImports</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ImportedDefaultBinding">
<emu-nt><a href="#prod-ImportedDefaultBinding">ImportedDefaultBinding</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="bedec05a"><emu-nt><a href="#prod-ImportedBinding">ImportedBinding</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="NameSpaceImport">
<emu-nt><a href="#prod-NameSpaceImport">NameSpaceImport</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b7641ff3"><emu-t>*</emu-t><emu-t>as</emu-t><emu-nt><a href="#prod-ImportedBinding">ImportedBinding</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="NamedImports">
<emu-nt><a href="#prod-NamedImports">NamedImports</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><emu-t>{</emu-t><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="835252f8"><emu-t>{</emu-t><emu-nt><a href="#prod-ImportsList">ImportsList</a></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="6f18d3a2"><emu-t>{</emu-t><emu-nt><a href="#prod-ImportsList">ImportsList</a></emu-nt><emu-t>,</emu-t><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="FromClause">
<emu-nt><a href="#prod-FromClause">FromClause</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ac457a7a"><emu-t>from</emu-t><emu-nt><a href="#prod-ModuleSpecifier">ModuleSpecifier</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ImportsList">
<emu-nt><a href="#prod-ImportsList">ImportsList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5292cb55"><emu-nt><a href="#prod-ImportSpecifier">ImportSpecifier</a></emu-nt></emu-rhs>
<emu-rhs a="82009fbc"><emu-nt><a href="#prod-ImportsList">ImportsList</a></emu-nt><emu-t>,</emu-t><emu-nt><a href="#prod-ImportSpecifier">ImportSpecifier</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ImportSpecifier">
<emu-nt><a href="#prod-ImportSpecifier">ImportSpecifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="bedec05a"><emu-nt><a href="#prod-ImportedBinding">ImportedBinding</a></emu-nt></emu-rhs>
<emu-rhs a="38da6908"><emu-nt><a href="#prod-IdentifierName">IdentifierName</a></emu-nt><emu-t>as</emu-t><emu-nt><a href="#prod-ImportedBinding">ImportedBinding</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ModuleSpecifier">
<emu-nt><a href="#prod-ModuleSpecifier">ModuleSpecifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5c74e54d"><emu-nt><a href="#prod-StringLiteral">StringLiteral</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ImportedBinding">
<emu-nt><a href="#prod-ImportedBinding">ImportedBinding</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="06cca55e"><emu-nt params="~Yield, ~Await"><a href="#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ExportDeclaration">
<emu-nt><a href="#prod-ExportDeclaration">ExportDeclaration</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="56ae069c"><emu-t>export</emu-t><emu-t>*</emu-t><emu-nt><a href="#prod-FromClause">FromClause</a></emu-nt><emu-t>;</emu-t></emu-rhs>
<emu-rhs a="54a8804a"><emu-t>export</emu-t><emu-nt><a href="#prod-ExportClause">ExportClause</a></emu-nt><emu-nt><a href="#prod-FromClause">FromClause</a></emu-nt><emu-t>;</emu-t></emu-rhs>
<emu-rhs a="b6878be3"><emu-t>export</emu-t><emu-nt><a href="#prod-ExportClause">ExportClause</a></emu-nt><emu-t>;</emu-t></emu-rhs>
<emu-rhs a="696b8d6e"><emu-t>export</emu-t><emu-nt params="~Yield, ~Await"><a href="#prod-VariableStatement">VariableStatement</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="6bc99b97"><emu-t>export</emu-t><emu-nt params="~Yield, ~Await"><a href="#prod-Declaration">Declaration</a><emu-mods><emu-params>[~Yield, ~Await]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="d298e1ba"><emu-t>export</emu-t><emu-t>default</emu-t><emu-nt params="~Yield, ~Await, +Default"><a href="#prod-HoistableDeclaration">HoistableDeclaration</a><emu-mods><emu-params>[~Yield, ~Await, +Default]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="ae276654"><emu-t>export</emu-t><emu-t>default</emu-t><emu-nt params="~Yield, ~Await, +Default"><a href="#prod-ClassDeclaration">ClassDeclaration</a><emu-mods><emu-params>[~Yield, ~Await, +Default]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="e2a585b6"><emu-t>export</emu-t><emu-t>default</emu-t><emu-gann>[lookahead ∉ { <emu-t>function</emu-t>, <emu-t>async</emu-t>
<emu-gann>[no <emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann>
<emu-t>function</emu-t>, <emu-t>class</emu-t> }]</emu-gann><emu-nt params="+In, ~Yield, ~Await"><a href="#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="ExportClause">
<emu-nt><a href="#prod-ExportClause">ExportClause</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="81ba5a4a"><emu-t>{</emu-t><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="29b1414e"><emu-t>{</emu-t><emu-nt><a href="#prod-ExportsList">ExportsList</a></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="c16c88fe"><emu-t>{</emu-t><emu-nt><a href="#prod-ExportsList">ExportsList</a></emu-nt><emu-t>,</emu-t><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="ExportsList">
<emu-nt><a href="#prod-ExportsList">ExportsList</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="5b554fef"><emu-nt><a href="#prod-ExportSpecifier">ExportSpecifier</a></emu-nt></emu-rhs>
<emu-rhs a="1907cd0c"><emu-nt><a href="#prod-ExportsList">ExportsList</a></emu-nt><emu-t>,</emu-t><emu-nt><a href="#prod-ExportSpecifier">ExportSpecifier</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ExportSpecifier">
<emu-nt><a href="#prod-ExportSpecifier">ExportSpecifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="0ebb31e2"><emu-nt><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
<emu-rhs a="a9552c46"><emu-nt><a href="#prod-IdentifierName">IdentifierName</a></emu-nt><emu-t>as</emu-t><emu-nt><a href="#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
</emu-production>
</emu-annex>
<emu-annex id="sec-number-conversions">
<h1><span class="secnum">A.6</span>Number Conversions</h1>
<emu-production name="StringNumericLiteral" type="regexp">
<emu-nt><a href="#prod-StringNumericLiteral">StringNumericLiteral</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="9a4be900"><emu-nt optional=""><a href="#prod-StrWhiteSpace">StrWhiteSpace</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="fe58c396"><emu-nt optional=""><a href="#prod-StrWhiteSpace">StrWhiteSpace</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt><a href="#prod-StrNumericLiteral">StrNumericLiteral</a></emu-nt><emu-nt optional=""><a href="#prod-StrWhiteSpace">StrWhiteSpace</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="StrWhiteSpace" type="regexp">
<emu-nt><a href="#prod-StrWhiteSpace">StrWhiteSpace</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="2b0ea266"><emu-nt><a href="#prod-StrWhiteSpaceChar">StrWhiteSpaceChar</a></emu-nt><emu-nt optional=""><a href="#prod-StrWhiteSpace">StrWhiteSpace</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="StrWhiteSpaceChar" type="regexp">
<emu-nt><a href="#prod-StrWhiteSpaceChar">StrWhiteSpaceChar</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="1424dc49"><emu-nt><a href="#prod-WhiteSpace">WhiteSpace</a></emu-nt></emu-rhs>
<emu-rhs a="3b331ccd"><emu-nt><a href="#prod-LineTerminator">LineTerminator</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="StrNumericLiteral" type="regexp">
<emu-nt><a href="#prod-StrNumericLiteral">StrNumericLiteral</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="db369ee0"><emu-nt><a href="#prod-StrDecimalLiteral">StrDecimalLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="d3d71ddd"><emu-nt><a href="#prod-BinaryIntegerLiteral">BinaryIntegerLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="832f57ee"><emu-nt><a href="#prod-OctalIntegerLiteral">OctalIntegerLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="1d0c4a66"><emu-nt><a href="#prod-HexIntegerLiteral">HexIntegerLiteral</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="StrDecimalLiteral" type="regexp">
<emu-nt><a href="#prod-StrDecimalLiteral">StrDecimalLiteral</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="477fcd23"><emu-nt><a href="#prod-StrUnsignedDecimalLiteral">StrUnsignedDecimalLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="a3f639a9"><emu-t>+</emu-t><emu-nt><a href="#prod-StrUnsignedDecimalLiteral">StrUnsignedDecimalLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="d60f01a5"><emu-t>-</emu-t><emu-nt><a href="#prod-StrUnsignedDecimalLiteral">StrUnsignedDecimalLiteral</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="StrUnsignedDecimalLiteral" type="regexp">
<emu-nt><a href="#prod-StrUnsignedDecimalLiteral">StrUnsignedDecimalLiteral</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="4afe8df8"><emu-t>Infinity</emu-t></emu-rhs>
<emu-rhs a="8a89062c"><emu-nt><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-t>.</emu-t><emu-nt optional=""><a href="#prod-DecimalDigits">DecimalDigits</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt optional=""><a href="#prod-ExponentPart">ExponentPart</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="5cf3aa35"><emu-t>.</emu-t><emu-nt><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-nt optional=""><a href="#prod-ExponentPart">ExponentPart</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="24e27af7"><emu-nt><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-nt optional=""><a href="#prod-ExponentPart">ExponentPart</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="DecimalDigits" type="lexical">
<emu-nt><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="b3831ee0"><emu-nt><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt></emu-rhs>
<emu-rhs a="9f250657"><emu-nt><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-nt><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="DecimalDigit" type="lexical" oneof="">
<emu-nt><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt><emu-geq>::</emu-geq><emu-oneof>one of</emu-oneof><emu-rhs><emu-t>0</emu-t><emu-t>1</emu-t><emu-t>2</emu-t><emu-t>3</emu-t><emu-t>4</emu-t><emu-t>5</emu-t><emu-t>6</emu-t><emu-t>7</emu-t><emu-t>8</emu-t><emu-t>9</emu-t></emu-rhs>
</emu-production>
<emu-production name="ExponentPart" type="lexical">
<emu-nt><a href="#prod-ExponentPart">ExponentPart</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="7f837518"><emu-nt><a href="#prod-ExponentIndicator">ExponentIndicator</a></emu-nt><emu-nt><a href="#prod-SignedInteger">SignedInteger</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ExponentIndicator" type="lexical" oneof="">
<emu-nt><a href="#prod-ExponentIndicator">ExponentIndicator</a></emu-nt><emu-geq>::</emu-geq><emu-oneof>one of</emu-oneof><emu-rhs><emu-t>e</emu-t><emu-t>E</emu-t></emu-rhs>
</emu-production>
<emu-production name="SignedInteger" type="lexical">
<emu-nt><a href="#prod-SignedInteger">SignedInteger</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="6d7b4e5f"><emu-nt><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt></emu-rhs>
<emu-rhs a="3bd7fe57"><emu-t>+</emu-t><emu-nt><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt></emu-rhs>
<emu-rhs a="58000348"><emu-t>-</emu-t><emu-nt><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="HexIntegerLiteral" type="lexical">
<emu-nt><a href="#prod-HexIntegerLiteral">HexIntegerLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="cf154180"><emu-t>0x</emu-t><emu-nt><a href="#prod-HexDigits">HexDigits</a></emu-nt></emu-rhs>
<emu-rhs a="9ef756f3"><emu-t>0X</emu-t><emu-nt><a href="#prod-HexDigits">HexDigits</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="HexDigit" type="lexical" oneof="">
<emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-geq>::</emu-geq><emu-oneof>one of</emu-oneof><emu-rhs><emu-t>0</emu-t><emu-t>1</emu-t><emu-t>2</emu-t><emu-t>3</emu-t><emu-t>4</emu-t><emu-t>5</emu-t><emu-t>6</emu-t><emu-t>7</emu-t><emu-t>8</emu-t><emu-t>9</emu-t><emu-t>a</emu-t><emu-t>b</emu-t><emu-t>c</emu-t><emu-t>d</emu-t><emu-t>e</emu-t><emu-t>f</emu-t><emu-t>A</emu-t><emu-t>B</emu-t><emu-t>C</emu-t><emu-t>D</emu-t><emu-t>E</emu-t><emu-t>F</emu-t></emu-rhs>
</emu-production>
<p>All grammar symbols not explicitly defined by the <emu-nt id="_ref_14826"><a href="#prod-StringNumericLiteral">StringNumericLiteral</a></emu-nt> grammar have the definitions used in the <emu-xref href="#sec-literals-numeric-literals" id="_ref_723"><a href="#sec-literals-numeric-literals">Lexical Grammar for numeric literals</a></emu-xref>.</p>
</emu-annex>
<emu-annex id="sec-universal-resource-identifier-character-classes">
<h1><span class="secnum">A.7</span>Universal Resource Identifier Character Classes</h1>
<emu-production name="uri" type="regexp">
<emu-nt><a href="#prod-uri">uri</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="0a700980"><emu-nt optional=""><a href="#prod-uriCharacters">uriCharacters</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="uriCharacters" type="regexp">
<emu-nt><a href="#prod-uriCharacters">uriCharacters</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="1440f450"><emu-nt><a href="#prod-uriCharacter">uriCharacter</a></emu-nt><emu-nt optional=""><a href="#prod-uriCharacters">uriCharacters</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="uriCharacter" type="regexp">
<emu-nt><a href="#prod-uriCharacter">uriCharacter</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="345fa263"><emu-nt><a href="#prod-uriReserved">uriReserved</a></emu-nt></emu-rhs>
<emu-rhs a="032a420c"><emu-nt><a href="#prod-uriUnescaped">uriUnescaped</a></emu-nt></emu-rhs>
<emu-rhs a="c9e0cc22"><emu-nt><a href="#prod-uriEscaped">uriEscaped</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="uriReserved" type="regexp" oneof="">
<emu-nt><a href="#prod-uriReserved">uriReserved</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>&amp;</emu-t><emu-t>=</emu-t><emu-t>+</emu-t><emu-t>$</emu-t><emu-t>,</emu-t></emu-rhs>
</emu-production>
<emu-production name="uriUnescaped" type="regexp">
<emu-nt><a href="#prod-uriUnescaped">uriUnescaped</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="a3a1eef4"><emu-nt><a href="#prod-uriAlpha">uriAlpha</a></emu-nt></emu-rhs>
<emu-rhs a="b3831ee0"><emu-nt><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt></emu-rhs>
<emu-rhs a="14f39e10"><emu-nt><a href="#prod-uriMark">uriMark</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="uriEscaped" type="regexp">
<emu-nt><a href="#prod-uriEscaped">uriEscaped</a></emu-nt><emu-geq>:::</emu-geq><emu-rhs a="43658761"><emu-t>%</emu-t><emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt><emu-nt><a href="#prod-HexDigit">HexDigit</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="uriAlpha" type="regexp" oneof="">
<emu-nt><a href="#prod-uriAlpha">uriAlpha</a></emu-nt><emu-geq>:::</emu-geq><emu-oneof>one of</emu-oneof><emu-rhs><emu-t>a</emu-t><emu-t>b</emu-t><emu-t>c</emu-t><emu-t>d</emu-t><emu-t>e</emu-t><emu-t>f</emu-t><emu-t>g</emu-t><emu-t>h</emu-t><emu-t>i</emu-t><emu-t>j</emu-t><emu-t>k</emu-t><emu-t>l</emu-t><emu-t>m</emu-t><emu-t>n</emu-t><emu-t>o</emu-t><emu-t>p</emu-t><emu-t>q</emu-t><emu-t>r</emu-t><emu-t>s</emu-t><emu-t>t</emu-t><emu-t>u</emu-t><emu-t>v</emu-t><emu-t>w</emu-t><emu-t>x</emu-t><emu-t>y</emu-t><emu-t>z</emu-t><emu-t>A</emu-t><emu-t>B</emu-t><emu-t>C</emu-t><emu-t>D</emu-t><emu-t>E</emu-t><emu-t>F</emu-t><emu-t>G</emu-t><emu-t>H</emu-t><emu-t>I</emu-t><emu-t>J</emu-t><emu-t>K</emu-t><emu-t>L</emu-t><emu-t>M</emu-t><emu-t>N</emu-t><emu-t>O</emu-t><emu-t>P</emu-t><emu-t>Q</emu-t><emu-t>R</emu-t><emu-t>S</emu-t><emu-t>T</emu-t><emu-t>U</emu-t><emu-t>V</emu-t><emu-t>W</emu-t><emu-t>X</emu-t><emu-t>Y</emu-t><emu-t>Z</emu-t></emu-rhs>
</emu-production>
<emu-production name="uriMark" type="regexp" oneof="">
<emu-nt><a href="#prod-uriMark">uriMark</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>*</emu-t><emu-t>'</emu-t><emu-t>(</emu-t><emu-t>)</emu-t></emu-rhs>
</emu-production>
</emu-annex>
<emu-annex id="sec-regular-expressions">
<h1><span class="secnum">A.8</span>Regular Expressions</h1>
<emu-production name="Pattern" params="U, N" type="lexical">
<emu-nt params="U, N"><a href="#prod-Pattern">Pattern</a><emu-mods><emu-params>[U, N]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="ea2e8548"><emu-nt params="?U, ?N"><a href="#prod-Disjunction">Disjunction</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="Disjunction" params="U, N" type="lexical">
<emu-nt params="U, N"><a href="#prod-Disjunction">Disjunction</a><emu-mods><emu-params>[U, N]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="be4e1703"><emu-nt params="?U, ?N"><a href="#prod-Alternative">Alternative</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="40349c54"><emu-nt params="?U, ?N"><a href="#prod-Alternative">Alternative</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt><emu-t>|</emu-t><emu-nt params="?U, ?N"><a href="#prod-Disjunction">Disjunction</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="Alternative" params="U, N" type="lexical">
<emu-nt params="U, N"><a href="#prod-Alternative">Alternative</a><emu-mods><emu-params>[U, N]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></emu-rhs>
<emu-rhs a="8e81495c"><emu-nt params="?U, ?N"><a href="#prod-Alternative">Alternative</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt><emu-nt params="?U, ?N"><a href="#prod-Term">Term</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="Term" params="U, N" type="lexical">
<emu-nt params="U, N"><a href="#prod-Term">Term</a><emu-mods><emu-params>[U, N]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="e8ded259"><emu-nt params="?U, ?N"><a href="#prod-Assertion">Assertion</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="2eb78702"><emu-nt params="?U, ?N"><a href="#prod-Atom">Atom</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="0870df0d"><emu-nt params="?U, ?N"><a href="#prod-Atom">Atom</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt><emu-nt><a href="#prod-Quantifier">Quantifier</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="Assertion" params="U, N" type="lexical">
<emu-nt params="U, N"><a href="#prod-Assertion">Assertion</a><emu-mods><emu-params>[U, N]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="e5878811"><emu-t>^</emu-t></emu-rhs>
<emu-rhs a="1262cc92"><emu-t>$</emu-t></emu-rhs>
<emu-rhs a="1e228da5"><emu-t>\</emu-t><emu-t>b</emu-t></emu-rhs>
<emu-rhs a="a5dc97fa"><emu-t>\</emu-t><emu-t>B</emu-t></emu-rhs>
<emu-rhs a="c54c9dce"><emu-t>(</emu-t><emu-t>?</emu-t><emu-t>=</emu-t><emu-nt params="?U, ?N"><a href="#prod-Disjunction">Disjunction</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t></emu-rhs>
<emu-rhs a="84eb51e5"><emu-t>(</emu-t><emu-t>?</emu-t><emu-t>!</emu-t><emu-nt params="?U, ?N"><a href="#prod-Disjunction">Disjunction</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t></emu-rhs>
<emu-rhs a="82aea0e5"><emu-t>(</emu-t><emu-t>?</emu-t><emu-t>&lt;=</emu-t><emu-nt params="?U, ?N"><a href="#prod-Disjunction">Disjunction</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t></emu-rhs>
<emu-rhs a="9799bbf1"><emu-t>(</emu-t><emu-t>?</emu-t><emu-t>&lt;!</emu-t><emu-nt params="?U, ?N"><a href="#prod-Disjunction">Disjunction</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t></emu-rhs>
</emu-production>
<emu-production name="Quantifier" type="lexical">
<emu-nt><a href="#prod-Quantifier">Quantifier</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="0e588d23"><emu-nt><a href="#prod-QuantifierPrefix">QuantifierPrefix</a></emu-nt></emu-rhs>
<emu-rhs a="0b0b5479"><emu-nt><a href="#prod-QuantifierPrefix">QuantifierPrefix</a></emu-nt><emu-t>?</emu-t></emu-rhs>
</emu-production>
<emu-production name="QuantifierPrefix" type="lexical">
<emu-nt><a href="#prod-QuantifierPrefix">QuantifierPrefix</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="b01e734d"><emu-t>*</emu-t></emu-rhs>
<emu-rhs a="e0370b05"><emu-t>+</emu-t></emu-rhs>
<emu-rhs a="232d7160"><emu-t>?</emu-t></emu-rhs>
<emu-rhs a="68a2b74e"><emu-t>{</emu-t><emu-nt><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="82e97391"><emu-t>{</emu-t><emu-nt><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-t>,</emu-t><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="f47829c0"><emu-t>{</emu-t><emu-nt><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-t>,</emu-t><emu-nt><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="Atom" params="U, N" type="lexical">
<emu-nt params="U, N"><a href="#prod-Atom">Atom</a><emu-mods><emu-params>[U, N]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="beff52c4"><emu-nt><a href="#prod-PatternCharacter">PatternCharacter</a></emu-nt></emu-rhs>
<emu-rhs a="9658e473"><emu-t>.</emu-t></emu-rhs>
<emu-rhs a="60fd7386"><emu-t>\</emu-t><emu-nt params="?U, ?N"><a href="#prod-AtomEscape">AtomEscape</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="72a5dc04"><emu-nt params="?U"><a href="#prod-CharacterClass">CharacterClass</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="9a015fb8"><emu-t>(</emu-t><emu-nt params="?U"><a href="#prod-GroupSpecifier">GroupSpecifier</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt><emu-nt params="?U, ?N"><a href="#prod-Disjunction">Disjunction</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t></emu-rhs>
<emu-rhs a="9d0775f7"><emu-t>(</emu-t><emu-t>?</emu-t><emu-t>:</emu-t><emu-nt params="?U, ?N"><a href="#prod-Disjunction">Disjunction</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t></emu-rhs>
</emu-production>
<emu-production name="SyntaxCharacter" type="lexical" oneof="">
<emu-nt><a href="#prod-SyntaxCharacter">SyntaxCharacter</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>+</emu-t><emu-t>?</emu-t><emu-t>(</emu-t><emu-t>)</emu-t><emu-t>[</emu-t><emu-t>]</emu-t><emu-t>{</emu-t><emu-t>}</emu-t><emu-t>|</emu-t></emu-rhs>
</emu-production>
<emu-production name="PatternCharacter" type="lexical">
<emu-nt><a href="#prod-PatternCharacter">PatternCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="b94d4da1"><emu-nt><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-gmod>but not <emu-nt><a href="#prod-SyntaxCharacter">SyntaxCharacter</a></emu-nt></emu-gmod></emu-rhs>
</emu-production>
<emu-production name="AtomEscape" params="U, N" type="lexical">
<emu-nt params="U, N"><a href="#prod-AtomEscape">AtomEscape</a><emu-mods><emu-params>[U, N]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="7ebff96c"><emu-nt><a href="#prod-DecimalEscape">DecimalEscape</a></emu-nt></emu-rhs>
<emu-rhs a="da3d719e"><emu-nt params="?U"><a href="#prod-CharacterClassEscape">CharacterClassEscape</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="4b80816a"><emu-nt params="?U"><a href="#prod-CharacterEscape">CharacterEscape</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="f3e6826b" constraints="+N"><emu-constraints>[+N]</emu-constraints><emu-t>k</emu-t><emu-nt params="?U"><a href="#prod-GroupName">GroupName</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="CharacterEscape" params="U" type="lexical">
<emu-nt params="U"><a href="#prod-CharacterEscape">CharacterEscape</a><emu-mods><emu-params>[U]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="f88e7170"><emu-nt><a href="#prod-ControlEscape">ControlEscape</a></emu-nt></emu-rhs>
<emu-rhs a="a14dae7e"><emu-t>c</emu-t><emu-nt><a href="#prod-ControlLetter">ControlLetter</a></emu-nt></emu-rhs>
<emu-rhs a="6964a19d"><emu-t>0</emu-t><emu-gann>[lookahead ∉ <emu-nt><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt>]</emu-gann></emu-rhs>
<emu-rhs a="a8071b85"><emu-nt><a href="#prod-HexEscapeSequence">HexEscapeSequence</a></emu-nt></emu-rhs>
<emu-rhs a="2649a73f"><emu-nt params="?U"><a href="#prod-RegExpUnicodeEscapeSequence">RegExpUnicodeEscapeSequence</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="2037e8bf"><emu-nt params="?U"><a href="#prod-IdentityEscape">IdentityEscape</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ControlEscape" type="lexical" oneof="">
<emu-nt><a href="#prod-ControlEscape">ControlEscape</a></emu-nt><emu-geq>::</emu-geq><emu-oneof>one of</emu-oneof><emu-rhs><emu-t>f</emu-t><emu-t>n</emu-t><emu-t>r</emu-t><emu-t>t</emu-t><emu-t>v</emu-t></emu-rhs>
</emu-production>
<emu-production name="ControlLetter" type="lexical" oneof="">
<emu-nt><a href="#prod-ControlLetter">ControlLetter</a></emu-nt><emu-geq>::</emu-geq><emu-oneof>one of</emu-oneof><emu-rhs><emu-t>a</emu-t><emu-t>b</emu-t><emu-t>c</emu-t><emu-t>d</emu-t><emu-t>e</emu-t><emu-t>f</emu-t><emu-t>g</emu-t><emu-t>h</emu-t><emu-t>i</emu-t><emu-t>j</emu-t><emu-t>k</emu-t><emu-t>l</emu-t><emu-t>m</emu-t><emu-t>n</emu-t><emu-t>o</emu-t><emu-t>p</emu-t><emu-t>q</emu-t><emu-t>r</emu-t><emu-t>s</emu-t><emu-t>t</emu-t><emu-t>u</emu-t><emu-t>v</emu-t><emu-t>w</emu-t><emu-t>x</emu-t><emu-t>y</emu-t><emu-t>z</emu-t><emu-t>A</emu-t><emu-t>B</emu-t><emu-t>C</emu-t><emu-t>D</emu-t><emu-t>E</emu-t><emu-t>F</emu-t><emu-t>G</emu-t><emu-t>H</emu-t><emu-t>I</emu-t><emu-t>J</emu-t><emu-t>K</emu-t><emu-t>L</emu-t><emu-t>M</emu-t><emu-t>N</emu-t><emu-t>O</emu-t><emu-t>P</emu-t><emu-t>Q</emu-t><emu-t>R</emu-t><emu-t>S</emu-t><emu-t>T</emu-t><emu-t>U</emu-t><emu-t>V</emu-t><emu-t>W</emu-t><emu-t>X</emu-t><emu-t>Y</emu-t><emu-t>Z</emu-t></emu-rhs>
</emu-production>
<emu-production name="GroupSpecifier" params="U" type="lexical">
<emu-nt params="U"><a href="#prod-GroupSpecifier">GroupSpecifier</a><emu-mods><emu-params>[U]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></emu-rhs>
<emu-rhs a="0a6c1542"><emu-t>?</emu-t><emu-nt params="?U"><a href="#prod-GroupName">GroupName</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="GroupName" params="U" type="lexical">
<emu-nt params="U"><a href="#prod-GroupName">GroupName</a><emu-mods><emu-params>[U]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="bca72b0c"><emu-t>&lt;</emu-t><emu-nt params="?U"><a href="#prod-RegExpIdentifierName">RegExpIdentifierName</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt><emu-t>&gt;</emu-t></emu-rhs>
</emu-production>
<emu-production name="RegExpIdentifierName" params="U" type="lexical">
<emu-nt params="U"><a href="#prod-RegExpIdentifierName">RegExpIdentifierName</a><emu-mods><emu-params>[U]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="4aeafadc"><emu-nt params="?U"><a href="#prod-RegExpIdentifierStart">RegExpIdentifierStart</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="d8644c18"><emu-nt params="?U"><a href="#prod-RegExpIdentifierName">RegExpIdentifierName</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt><emu-nt params="?U"><a href="#prod-RegExpIdentifierPart">RegExpIdentifierPart</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="RegExpIdentifierStart" params="U" type="lexical">
<emu-nt params="U"><a href="#prod-RegExpIdentifierStart">RegExpIdentifierStart</a><emu-mods><emu-params>[U]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="0862e30c"><emu-nt><a href="#prod-UnicodeIDStart">UnicodeIDStart</a></emu-nt></emu-rhs>
<emu-rhs a="1262cc92"><emu-t>$</emu-t></emu-rhs>
<emu-rhs a="07564b94"><emu-t>_</emu-t></emu-rhs>
<emu-rhs a="67e6af36"><emu-t>\</emu-t><emu-nt params="?U"><a href="#prod-RegExpUnicodeEscapeSequence">RegExpUnicodeEscapeSequence</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="RegExpIdentifierPart" params="U" type="lexical">
<emu-nt params="U"><a href="#prod-RegExpIdentifierPart">RegExpIdentifierPart</a><emu-mods><emu-params>[U]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="364ac675"><emu-nt><a href="#prod-UnicodeIDContinue">UnicodeIDContinue</a></emu-nt></emu-rhs>
<emu-rhs a="1262cc92"><emu-t>$</emu-t></emu-rhs>
<emu-rhs a="67e6af36"><emu-t>\</emu-t><emu-nt params="?U"><a href="#prod-RegExpUnicodeEscapeSequence">RegExpUnicodeEscapeSequence</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="a321d28b"><emu-gprose>&lt;ZWNJ&gt;</emu-gprose></emu-rhs>
<emu-rhs a="9543f0aa"><emu-gprose>&lt;ZWJ&gt;</emu-gprose></emu-rhs>
</emu-production>
<emu-production name="RegExpUnicodeEscapeSequence" params="U" type="lexical">
<emu-nt params="U"><a href="#prod-RegExpUnicodeEscapeSequence">RegExpUnicodeEscapeSequence</a><emu-mods><emu-params>[U]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="af8038f7" constraints="+U"><emu-constraints>[+U]</emu-constraints><emu-t>u</emu-t><emu-nt><a href="#prod-LeadSurrogate">LeadSurrogate</a></emu-nt><emu-t>\u</emu-t><emu-nt><a href="#prod-TrailSurrogate">TrailSurrogate</a></emu-nt></emu-rhs>
<emu-rhs a="67ed8617" constraints="+U"><emu-constraints>[+U]</emu-constraints><emu-t>u</emu-t><emu-nt><a href="#prod-LeadSurrogate">LeadSurrogate</a></emu-nt></emu-rhs>
<emu-rhs a="0c510966" constraints="+U"><emu-constraints>[+U]</emu-constraints><emu-t>u</emu-t><emu-nt><a href="#prod-TrailSurrogate">TrailSurrogate</a></emu-nt></emu-rhs>
<emu-rhs a="cea7c087" constraints="+U"><emu-constraints>[+U]</emu-constraints><emu-t>u</emu-t><emu-nt><a href="#prod-NonSurrogate">NonSurrogate</a></emu-nt></emu-rhs>
<emu-rhs a="8dee6a61" constraints="~U"><emu-constraints>[~U]</emu-constraints><emu-t>u</emu-t><emu-nt><a href="#prod-Hex4Digits">Hex4Digits</a></emu-nt></emu-rhs>
<emu-rhs a="7763ef41" constraints="+U"><emu-constraints>[+U]</emu-constraints><emu-t>u{</emu-t><emu-nt><a href="#prod-CodePoint">CodePoint</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<p>Each <code>\u</code> <emu-nt id="_ref_14827"><a href="#prod-TrailSurrogate">TrailSurrogate</a></emu-nt> for which the choice of associated <code>u</code> <emu-nt id="_ref_14828"><a href="#prod-LeadSurrogate">LeadSurrogate</a></emu-nt> is ambiguous shall be associated with the nearest possible <code>u</code> <emu-nt id="_ref_14829"><a href="#prod-LeadSurrogate">LeadSurrogate</a></emu-nt> that would otherwise have no corresponding <code>\u</code> <emu-nt id="_ref_14830"><a href="#prod-TrailSurrogate">TrailSurrogate</a></emu-nt>.</p>
<p>&nbsp;</p>
<emu-production name="LeadSurrogate" type="lexical">
<emu-nt><a href="#prod-LeadSurrogate">LeadSurrogate</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="b4266993"><emu-nt><a href="#prod-Hex4Digits">Hex4Digits</a></emu-nt><emu-gmod>but only if the SV of <emu-nt><a href="#prod-Hex4Digits">Hex4Digits</a></emu-nt> is in the inclusive range 0xD800 to 0xDBFF</emu-gmod></emu-rhs>
</emu-production>
<emu-production name="TrailSurrogate" type="lexical">
<emu-nt><a href="#prod-TrailSurrogate">TrailSurrogate</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="134361fc"><emu-nt><a href="#prod-Hex4Digits">Hex4Digits</a></emu-nt><emu-gmod>but only if the SV of <emu-nt><a href="#prod-Hex4Digits">Hex4Digits</a></emu-nt> is in the inclusive range 0xDC00 to 0xDFFF</emu-gmod></emu-rhs>
</emu-production>
<emu-production name="NonSurrogate" type="lexical">
<emu-nt><a href="#prod-NonSurrogate">NonSurrogate</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="de3cc0ae"><emu-nt><a href="#prod-Hex4Digits">Hex4Digits</a></emu-nt><emu-gmod>but only if the SV of <emu-nt><a href="#prod-Hex4Digits">Hex4Digits</a></emu-nt> is not in the inclusive range 0xD800 to 0xDFFF</emu-gmod></emu-rhs>
</emu-production>
<emu-production name="IdentityEscape" params="U" type="lexical">
<emu-nt params="U"><a href="#prod-IdentityEscape">IdentityEscape</a><emu-mods><emu-params>[U]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="59e8579a" constraints="+U"><emu-constraints>[+U]</emu-constraints><emu-nt><a href="#prod-SyntaxCharacter">SyntaxCharacter</a></emu-nt></emu-rhs>
<emu-rhs a="85b4a3dd" constraints="+U"><emu-constraints>[+U]</emu-constraints><emu-t>/</emu-t></emu-rhs>
<emu-rhs a="fbcd1409" constraints="~U"><emu-constraints>[~U]</emu-constraints><emu-nt><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-gmod>but not <emu-nt><a href="#prod-UnicodeIDContinue">UnicodeIDContinue</a></emu-nt></emu-gmod></emu-rhs>
</emu-production>
<emu-production name="DecimalEscape" type="lexical">
<emu-nt><a href="#prod-DecimalEscape">DecimalEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="627951dd"><emu-nt><a href="#prod-NonZeroDigit">NonZeroDigit</a></emu-nt><emu-nt optional=""><a href="#prod-DecimalDigits">DecimalDigits</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-gann>[lookahead ∉ <emu-nt><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt>]</emu-gann></emu-rhs>
</emu-production>
<emu-production name="CharacterClassEscape" params="U" type="lexical">
<emu-nt params="U"><a href="#prod-CharacterClassEscape">CharacterClassEscape</a><emu-mods><emu-params>[U]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="f0f32729"><emu-t>d</emu-t></emu-rhs>
<emu-rhs a="919b1483"><emu-t>D</emu-t></emu-rhs>
<emu-rhs a="5b9c6c6e"><emu-t>s</emu-t></emu-rhs>
<emu-rhs a="6952cf48"><emu-t>S</emu-t></emu-rhs>
<emu-rhs a="2d8b484a"><emu-t>w</emu-t></emu-rhs>
<emu-rhs a="ae15e851"><emu-t>W</emu-t></emu-rhs>
<emu-rhs a="6f034769" constraints="+U"><emu-constraints>[+U]</emu-constraints><emu-t>p{</emu-t><emu-nt><a href="#prod-UnicodePropertyValueExpression">UnicodePropertyValueExpression</a></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="9b2f96fc" constraints="+U"><emu-constraints>[+U]</emu-constraints><emu-t>P{</emu-t><emu-nt><a href="#prod-UnicodePropertyValueExpression">UnicodePropertyValueExpression</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="UnicodePropertyValueExpression" type="lexical">
<emu-nt><a href="#prod-UnicodePropertyValueExpression">UnicodePropertyValueExpression</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="b11de407"><emu-nt><a href="#prod-UnicodePropertyName">UnicodePropertyName</a></emu-nt><emu-t>=</emu-t><emu-nt><a href="#prod-UnicodePropertyValue">UnicodePropertyValue</a></emu-nt></emu-rhs>
<emu-rhs a="25d94190"><emu-nt><a href="#prod-LoneUnicodePropertyNameOrValue">LoneUnicodePropertyNameOrValue</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="UnicodePropertyName" type="lexical">
<emu-nt><a href="#prod-UnicodePropertyName">UnicodePropertyName</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="c0c2619f"><emu-nt><a href="#prod-UnicodePropertyNameCharacters">UnicodePropertyNameCharacters</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="UnicodePropertyNameCharacters" type="lexical">
<emu-nt><a href="#prod-UnicodePropertyNameCharacters">UnicodePropertyNameCharacters</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="c1247f44"><emu-nt><a href="#prod-UnicodePropertyNameCharacter">UnicodePropertyNameCharacter</a></emu-nt><emu-nt optional=""><a href="#prod-UnicodePropertyNameCharacters">UnicodePropertyNameCharacters</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="UnicodePropertyValue" type="lexical">
<emu-nt><a href="#prod-UnicodePropertyValue">UnicodePropertyValue</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="526a9170"><emu-nt><a href="#prod-UnicodePropertyValueCharacters">UnicodePropertyValueCharacters</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="LoneUnicodePropertyNameOrValue" type="lexical">
<emu-nt><a href="#prod-LoneUnicodePropertyNameOrValue">LoneUnicodePropertyNameOrValue</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="526a9170"><emu-nt><a href="#prod-UnicodePropertyValueCharacters">UnicodePropertyValueCharacters</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="UnicodePropertyValueCharacters" type="lexical">
<emu-nt><a href="#prod-UnicodePropertyValueCharacters">UnicodePropertyValueCharacters</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5a208aa0"><emu-nt><a href="#prod-UnicodePropertyValueCharacter">UnicodePropertyValueCharacter</a></emu-nt><emu-nt optional=""><a href="#prod-UnicodePropertyValueCharacters">UnicodePropertyValueCharacters</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="UnicodePropertyValueCharacter" type="lexical">
<emu-nt><a href="#prod-UnicodePropertyValueCharacter">UnicodePropertyValueCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="531254cc"><emu-nt><a href="#prod-UnicodePropertyNameCharacter">UnicodePropertyNameCharacter</a></emu-nt></emu-rhs>
<emu-rhs a="5259a431"><emu-t>0</emu-t></emu-rhs>
<emu-rhs a="292aa5dd"><emu-t>1</emu-t></emu-rhs>
<emu-rhs a="5ca73105"><emu-t>2</emu-t></emu-rhs>
<emu-rhs a="ec6bb6b2"><emu-t>3</emu-t></emu-rhs>
<emu-rhs a="58ec4a73"><emu-t>4</emu-t></emu-rhs>
<emu-rhs a="8fcdef77"><emu-t>5</emu-t></emu-rhs>
<emu-rhs a="0b64877d"><emu-t>6</emu-t></emu-rhs>
<emu-rhs a="ea5e07a4"><emu-t>7</emu-t></emu-rhs>
<emu-rhs a="7a5bd8c3"><emu-t>8</emu-t></emu-rhs>
<emu-rhs a="163f4308"><emu-t>9</emu-t></emu-rhs>
</emu-production>
<emu-production name="UnicodePropertyNameCharacter" type="lexical">
<emu-nt><a href="#prod-UnicodePropertyNameCharacter">UnicodePropertyNameCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="69611eb2"><emu-nt><a href="#prod-ControlLetter">ControlLetter</a></emu-nt></emu-rhs>
<emu-rhs a="07564b94"><emu-t>_</emu-t></emu-rhs>
</emu-production>
<emu-production name="CharacterClass" params="U" type="lexical">
<emu-nt params="U"><a href="#prod-CharacterClass">CharacterClass</a><emu-mods><emu-params>[U]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="4acdd45f"><emu-t>[</emu-t><emu-gann>[lookahead ∉ { <emu-t>^</emu-t> }]</emu-gann><emu-nt params="?U"><a href="#prod-ClassRanges">ClassRanges</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt><emu-t>]</emu-t></emu-rhs>
<emu-rhs a="93d354c0"><emu-t>[</emu-t><emu-t>^</emu-t><emu-nt params="?U"><a href="#prod-ClassRanges">ClassRanges</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt><emu-t>]</emu-t></emu-rhs>
</emu-production>
<emu-production name="ClassRanges" params="U" type="lexical">
<emu-nt params="U"><a href="#prod-ClassRanges">ClassRanges</a><emu-mods><emu-params>[U]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="37b9c04c"><emu-gann>[empty]</emu-gann></emu-rhs>
<emu-rhs a="43c27130"><emu-nt params="?U"><a href="#prod-NonemptyClassRanges">NonemptyClassRanges</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="NonemptyClassRanges" params="U" type="lexical">
<emu-nt params="U"><a href="#prod-NonemptyClassRanges">NonemptyClassRanges</a><emu-mods><emu-params>[U]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="cdf200f3"><emu-nt params="?U"><a href="#prod-ClassAtom">ClassAtom</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="4a76f2ec"><emu-nt params="?U"><a href="#prod-ClassAtom">ClassAtom</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt><emu-nt params="?U"><a href="#prod-NonemptyClassRangesNoDash">NonemptyClassRangesNoDash</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="63fd2e03"><emu-nt params="?U"><a href="#prod-ClassAtom">ClassAtom</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt><emu-t>-</emu-t><emu-nt params="?U"><a href="#prod-ClassAtom">ClassAtom</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt><emu-nt params="?U"><a href="#prod-ClassRanges">ClassRanges</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="NonemptyClassRangesNoDash" params="U" type="lexical">
<emu-nt params="U"><a href="#prod-NonemptyClassRangesNoDash">NonemptyClassRangesNoDash</a><emu-mods><emu-params>[U]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="cdf200f3"><emu-nt params="?U"><a href="#prod-ClassAtom">ClassAtom</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="2d1a8609"><emu-nt params="?U"><a href="#prod-ClassAtomNoDash">ClassAtomNoDash</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt><emu-nt params="?U"><a href="#prod-NonemptyClassRangesNoDash">NonemptyClassRangesNoDash</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="b61280d4"><emu-nt params="?U"><a href="#prod-ClassAtomNoDash">ClassAtomNoDash</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt><emu-t>-</emu-t><emu-nt params="?U"><a href="#prod-ClassAtom">ClassAtom</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt><emu-nt params="?U"><a href="#prod-ClassRanges">ClassRanges</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ClassAtom" params="U" type="lexical">
<emu-nt params="U"><a href="#prod-ClassAtom">ClassAtom</a><emu-mods><emu-params>[U]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="6f24a587"><emu-t>-</emu-t></emu-rhs>
<emu-rhs a="714140ac"><emu-nt params="?U"><a href="#prod-ClassAtomNoDash">ClassAtomNoDash</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ClassAtomNoDash" params="U" type="lexical">
<emu-nt params="U"><a href="#prod-ClassAtomNoDash">ClassAtomNoDash</a><emu-mods><emu-params>[U]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="ecde6e28"><emu-nt><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-gmod>but not one of <emu-t>\</emu-t> or <emu-t>]</emu-t> or <emu-t>-</emu-t></emu-gmod></emu-rhs>
<emu-rhs a="379e2483"><emu-t>\</emu-t><emu-nt params="?U"><a href="#prod-ClassEscape">ClassEscape</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ClassEscape" params="U" type="lexical">
<emu-nt params="U"><a href="#prod-ClassEscape">ClassEscape</a><emu-mods><emu-params>[U]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="0185ce89"><emu-t>b</emu-t></emu-rhs>
<emu-rhs a="ae60fdeb" constraints="+U"><emu-constraints>[+U]</emu-constraints><emu-t>-</emu-t></emu-rhs>
<emu-rhs a="da3d719e"><emu-nt params="?U"><a href="#prod-CharacterClassEscape">CharacterClassEscape</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="4b80816a"><emu-nt params="?U"><a href="#prod-CharacterEscape">CharacterEscape</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
</emu-annex>
</emu-annex>
<emu-annex id="sec-additional-ecmascript-features-for-web-browsers" namespace="annexB" normative="">
<h1><span class="secnum">B</span>Additional ECMAScript Features for Web Browsers</h1>
<p>The ECMAScript language syntax and semantics defined in this annex
are required when the ECMAScript host is a web browser. The content of
this annex is normative but optional if the ECMAScript host is not a web
browser.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>This annex describes various legacy features and other
characteristics of web browser based ECMAScript implementations. All of
the language features and behaviours specified in this annex have one or
more undesirable characteristics and in the absence of legacy usage
would be removed from this specification. However, the usage of these
features by large numbers of existing web pages means that web browsers
must continue to support them. The specifications in this annex define
the requirements for interoperable implementations of these legacy
features.</p>
<p>These features are not considered part of the core ECMAScript
language. Programmers should not use or assume the existence of these
features and behaviours when writing new ECMAScript code. ECMAScript
implementations are discouraged from implementing these features unless
the implementation is part of a web browser or is required to run the
same legacy ECMAScript code that web browsers encounter.</p>
</div></emu-note>
<emu-annex id="sec-additional-syntax">
<h1><span class="secnum">B.1</span>Additional Syntax</h1>
<emu-annex id="sec-additional-syntax-numeric-literals">
<h1><span class="secnum">B.1.1</span>Numeric Literals</h1>
<p>The syntax and semantics of <emu-xref href="#sec-literals-numeric-literals" id="_ref_724"><a href="#sec-literals-numeric-literals">11.8.3</a></emu-xref> is extended as follows except that this extension is not allowed for <emu-xref href="#sec-strict-mode-code" id="_ref_8634"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>:</p>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="NumericLiteral" type="lexical" id="prod-annexB-NumericLiteral">
<emu-nt><a href="#prod-annexB-NumericLiteral">NumericLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="18c0356f"><emu-nt id="_ref_14831"><a href="#prod-DecimalLiteral">DecimalLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="d3d71ddd"><emu-nt id="_ref_14832"><a href="#prod-BinaryIntegerLiteral">BinaryIntegerLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="832f57ee"><emu-nt id="_ref_14833"><a href="#prod-OctalIntegerLiteral">OctalIntegerLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="1d0c4a66"><emu-nt id="_ref_14834"><a href="#prod-HexIntegerLiteral">HexIntegerLiteral</a></emu-nt></emu-rhs>
<emu-rhs a="f0df7a1f"><emu-nt id="_ref_14835"><a href="#prod-annexB-LegacyOctalIntegerLiteral">LegacyOctalIntegerLiteral</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="LegacyOctalIntegerLiteral" type="lexical" id="prod-annexB-LegacyOctalIntegerLiteral">
<emu-nt><a href="#prod-annexB-LegacyOctalIntegerLiteral">LegacyOctalIntegerLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="46c53d12"><emu-t>0</emu-t><emu-nt id="_ref_14836"><a href="#prod-OctalDigit">OctalDigit</a></emu-nt></emu-rhs>
<emu-rhs a="b57dc7cf"><emu-nt id="_ref_14837"><a href="#prod-annexB-LegacyOctalIntegerLiteral">LegacyOctalIntegerLiteral</a></emu-nt><emu-nt id="_ref_14838"><a href="#prod-OctalDigit">OctalDigit</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="DecimalIntegerLiteral" type="lexical" id="prod-annexB-DecimalIntegerLiteral">
<emu-nt><a href="#prod-annexB-DecimalIntegerLiteral">DecimalIntegerLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5259a431"><emu-t>0</emu-t></emu-rhs>
<emu-rhs a="2353f0a3"><emu-nt id="_ref_14839"><a href="#prod-NonZeroDigit">NonZeroDigit</a></emu-nt><emu-nt optional="" id="_ref_14840"><a href="#prod-DecimalDigits">DecimalDigits</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="5d52a5ba"><emu-nt id="_ref_14841"><a href="#prod-annexB-NonOctalDecimalIntegerLiteral">NonOctalDecimalIntegerLiteral</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="NonOctalDecimalIntegerLiteral" type="lexical" id="prod-annexB-NonOctalDecimalIntegerLiteral">
<emu-nt><a href="#prod-annexB-NonOctalDecimalIntegerLiteral">NonOctalDecimalIntegerLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="46667561"><emu-t>0</emu-t><emu-nt id="_ref_14842"><a href="#prod-annexB-NonOctalDigit">NonOctalDigit</a></emu-nt></emu-rhs>
<emu-rhs a="c90efc20"><emu-nt id="_ref_14843"><a href="#prod-annexB-LegacyOctalLikeDecimalIntegerLiteral">LegacyOctalLikeDecimalIntegerLiteral</a></emu-nt><emu-nt id="_ref_14844"><a href="#prod-annexB-NonOctalDigit">NonOctalDigit</a></emu-nt></emu-rhs>
<emu-rhs a="a9778131"><emu-nt id="_ref_14845"><a href="#prod-annexB-NonOctalDecimalIntegerLiteral">NonOctalDecimalIntegerLiteral</a></emu-nt><emu-nt id="_ref_14846"><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="LegacyOctalLikeDecimalIntegerLiteral" type="lexical" id="prod-annexB-LegacyOctalLikeDecimalIntegerLiteral">
<emu-nt><a href="#prod-annexB-LegacyOctalLikeDecimalIntegerLiteral">LegacyOctalLikeDecimalIntegerLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="46c53d12"><emu-t>0</emu-t><emu-nt id="_ref_14847"><a href="#prod-OctalDigit">OctalDigit</a></emu-nt></emu-rhs>
<emu-rhs a="b24ee1d6"><emu-nt id="_ref_14848"><a href="#prod-annexB-LegacyOctalLikeDecimalIntegerLiteral">LegacyOctalLikeDecimalIntegerLiteral</a></emu-nt><emu-nt id="_ref_14849"><a href="#prod-OctalDigit">OctalDigit</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="NonOctalDigit" type="lexical" oneof="" id="prod-annexB-NonOctalDigit">
<emu-nt><a href="#prod-annexB-NonOctalDigit">NonOctalDigit</a></emu-nt><emu-geq>::</emu-geq><emu-oneof>one of</emu-oneof><emu-rhs><emu-t>8</emu-t><emu-t>9</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-annex id="sec-additional-syntax-numeric-literals-status-semantics">
<h1><span class="secnum">B.1.1.1</span>Static Semantics</h1>
<ul>
<li>
The MV of <emu-grammar><emu-production name="LegacyOctalIntegerLiteral" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-LegacyOctalIntegerLiteral">LegacyOctalIntegerLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="46c53d12"><emu-t>0</emu-t><emu-nt id="_ref_14850"><a href="#prod-OctalDigit">OctalDigit</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_14851"><a href="#prod-OctalDigit">OctalDigit</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="LegacyOctalIntegerLiteral" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-LegacyOctalIntegerLiteral">LegacyOctalIntegerLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="b57dc7cf"><emu-nt id="_ref_14852"><a href="#prod-annexB-LegacyOctalIntegerLiteral">LegacyOctalIntegerLiteral</a></emu-nt><emu-nt id="_ref_14853"><a href="#prod-OctalDigit">OctalDigit</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is (the MV of <emu-nt id="_ref_14854"><a href="#prod-annexB-LegacyOctalIntegerLiteral">LegacyOctalIntegerLiteral</a></emu-nt> times 8) plus the MV of <emu-nt id="_ref_14855"><a href="#prod-OctalDigit">OctalDigit</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="DecimalIntegerLiteral" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-DecimalIntegerLiteral">DecimalIntegerLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5d52a5ba"><emu-nt id="_ref_14856"><a href="#prod-annexB-NonOctalDecimalIntegerLiteral">NonOctalDecimalIntegerLiteral</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_14857"><a href="#prod-annexB-NonOctalDecimalIntegerLiteral">NonOctalDecimalIntegerLiteral</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="NonOctalDecimalIntegerLiteral" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-NonOctalDecimalIntegerLiteral">NonOctalDecimalIntegerLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="46667561"><emu-t>0</emu-t><emu-nt id="_ref_14858"><a href="#prod-annexB-NonOctalDigit">NonOctalDigit</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_14859"><a href="#prod-annexB-NonOctalDigit">NonOctalDigit</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="NonOctalDecimalIntegerLiteral" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-NonOctalDecimalIntegerLiteral">NonOctalDecimalIntegerLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="c90efc20"><emu-nt id="_ref_14860"><a href="#prod-annexB-LegacyOctalLikeDecimalIntegerLiteral">LegacyOctalLikeDecimalIntegerLiteral</a></emu-nt><emu-nt id="_ref_14861"><a href="#prod-annexB-NonOctalDigit">NonOctalDigit</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is (the MV of <emu-nt id="_ref_14862"><a href="#prod-annexB-LegacyOctalLikeDecimalIntegerLiteral">LegacyOctalLikeDecimalIntegerLiteral</a></emu-nt> times 10) plus the MV of <emu-nt id="_ref_14863"><a href="#prod-annexB-NonOctalDigit">NonOctalDigit</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="NonOctalDecimalIntegerLiteral" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-NonOctalDecimalIntegerLiteral">NonOctalDecimalIntegerLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="a9778131"><emu-nt id="_ref_14864"><a href="#prod-annexB-NonOctalDecimalIntegerLiteral">NonOctalDecimalIntegerLiteral</a></emu-nt><emu-nt id="_ref_14865"><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is (the MV of <emu-nt id="_ref_14866"><a href="#prod-annexB-NonOctalDecimalIntegerLiteral">NonOctalDecimalIntegerLiteral</a></emu-nt> times 10) plus the MV of <emu-nt id="_ref_14867"><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="LegacyOctalLikeDecimalIntegerLiteral" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-LegacyOctalLikeDecimalIntegerLiteral">LegacyOctalLikeDecimalIntegerLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="46c53d12"><emu-t>0</emu-t><emu-nt id="_ref_14868"><a href="#prod-OctalDigit">OctalDigit</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the MV of <emu-nt id="_ref_14869"><a href="#prod-OctalDigit">OctalDigit</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="LegacyOctalLikeDecimalIntegerLiteral" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-LegacyOctalLikeDecimalIntegerLiteral">LegacyOctalLikeDecimalIntegerLiteral</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="b24ee1d6"><emu-nt id="_ref_14870"><a href="#prod-annexB-LegacyOctalLikeDecimalIntegerLiteral">LegacyOctalLikeDecimalIntegerLiteral</a></emu-nt><emu-nt id="_ref_14871"><a href="#prod-OctalDigit">OctalDigit</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is (the MV of <emu-nt id="_ref_14872"><a href="#prod-annexB-LegacyOctalLikeDecimalIntegerLiteral">LegacyOctalLikeDecimalIntegerLiteral</a></emu-nt> times 10) plus the MV of <emu-nt id="_ref_14873"><a href="#prod-OctalDigit">OctalDigit</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="NonOctalDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-NonOctalDigit">NonOctalDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="7a5bd8c3"><emu-t>8</emu-t></emu-rhs>
</emu-production></emu-grammar> is 8.
</li>
<li>
The MV of <emu-grammar><emu-production name="NonOctalDigit" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-NonOctalDigit">NonOctalDigit</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="163f4308"><emu-t>9</emu-t></emu-rhs>
</emu-production></emu-grammar> is 9.
</li>
</ul>
</emu-annex>
</emu-annex>
<emu-annex id="sec-additional-syntax-string-literals">
<h1><span class="secnum">B.1.2</span>String Literals</h1>
<p>The syntax and semantics of <emu-xref href="#sec-literals-string-literals" id="_ref_725"><a href="#sec-literals-string-literals">11.8.4</a></emu-xref> is extended as follows except that this extension is not allowed for <emu-xref href="#sec-strict-mode-code" id="_ref_8635"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>:</p>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="EscapeSequence" type="lexical" id="prod-annexB-EscapeSequence">
<emu-nt><a href="#prod-annexB-EscapeSequence">EscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="e9e86f07"><emu-nt id="_ref_14874"><a href="#prod-CharacterEscapeSequence">CharacterEscapeSequence</a></emu-nt></emu-rhs>
<emu-rhs a="e8cc2b7c"><emu-nt id="_ref_14875"><a href="#prod-annexB-LegacyOctalEscapeSequence">LegacyOctalEscapeSequence</a></emu-nt></emu-rhs>
<emu-rhs a="a8071b85"><emu-nt id="_ref_14876"><a href="#prod-HexEscapeSequence">HexEscapeSequence</a></emu-nt></emu-rhs>
<emu-rhs a="44bd6f55"><emu-nt id="_ref_14877"><a href="#prod-UnicodeEscapeSequence">UnicodeEscapeSequence</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="LegacyOctalEscapeSequence" type="lexical" id="prod-annexB-LegacyOctalEscapeSequence">
<emu-nt><a href="#prod-annexB-LegacyOctalEscapeSequence">LegacyOctalEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="52181ae4"><emu-nt id="_ref_14878"><a href="#prod-OctalDigit">OctalDigit</a></emu-nt><emu-gann>[lookahead ∉ <emu-nt id="_ref_14879"><a href="#prod-OctalDigit">OctalDigit</a></emu-nt>]</emu-gann></emu-rhs>
<emu-rhs a="9165a3a7"><emu-nt id="_ref_14880"><a href="#prod-annexB-ZeroToThree">ZeroToThree</a></emu-nt><emu-nt id="_ref_14881"><a href="#prod-OctalDigit">OctalDigit</a></emu-nt><emu-gann>[lookahead ∉ <emu-nt id="_ref_14882"><a href="#prod-OctalDigit">OctalDigit</a></emu-nt>]</emu-gann></emu-rhs>
<emu-rhs a="088d7fcd"><emu-nt id="_ref_14883"><a href="#prod-annexB-FourToSeven">FourToSeven</a></emu-nt><emu-nt id="_ref_14884"><a href="#prod-OctalDigit">OctalDigit</a></emu-nt></emu-rhs>
<emu-rhs a="e2ee5d93"><emu-nt id="_ref_14885"><a href="#prod-annexB-ZeroToThree">ZeroToThree</a></emu-nt><emu-nt id="_ref_14886"><a href="#prod-OctalDigit">OctalDigit</a></emu-nt><emu-nt id="_ref_14887"><a href="#prod-OctalDigit">OctalDigit</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ZeroToThree" type="lexical" oneof="" id="prod-annexB-ZeroToThree">
<emu-nt><a href="#prod-annexB-ZeroToThree">ZeroToThree</a></emu-nt><emu-geq>::</emu-geq><emu-oneof>one of</emu-oneof><emu-rhs><emu-t>0</emu-t><emu-t>1</emu-t><emu-t>2</emu-t><emu-t>3</emu-t></emu-rhs>
</emu-production>
<emu-production name="FourToSeven" type="lexical" oneof="" id="prod-annexB-FourToSeven">
<emu-nt><a href="#prod-annexB-FourToSeven">FourToSeven</a></emu-nt><emu-geq>::</emu-geq><emu-oneof>one of</emu-oneof><emu-rhs><emu-t>4</emu-t><emu-t>5</emu-t><emu-t>6</emu-t><emu-t>7</emu-t></emu-rhs>
</emu-production></emu-grammar>
<p>This definition of <emu-nt id="_ref_14888"><a href="#prod-annexB-EscapeSequence">EscapeSequence</a></emu-nt> is not used in strict mode or when parsing <emu-nt id="_ref_14889"><a href="#prod-TemplateCharacter">TemplateCharacter</a></emu-nt>.</p>
<emu-annex id="sec-additional-syntax-string-literals-static-semantics">
<h1><span class="secnum">B.1.2.1</span>Static Semantics</h1>
<ul>
<li>
The SV of <emu-grammar><emu-production name="EscapeSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-EscapeSequence">EscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="e8cc2b7c"><emu-nt id="_ref_14890"><a href="#prod-annexB-LegacyOctalEscapeSequence">LegacyOctalEscapeSequence</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the SV of the <emu-nt id="_ref_14891"><a href="#prod-annexB-LegacyOctalEscapeSequence">LegacyOctalEscapeSequence</a></emu-nt>.
</li>
<li>
The SV of <emu-grammar><emu-production name="LegacyOctalEscapeSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-LegacyOctalEscapeSequence">LegacyOctalEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="99bc1d53"><emu-nt id="_ref_14892"><a href="#prod-OctalDigit">OctalDigit</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the code unit whose value is the MV of the <emu-nt id="_ref_14893"><a href="#prod-OctalDigit">OctalDigit</a></emu-nt>.
</li>
<li>
The SV of <emu-grammar><emu-production name="LegacyOctalEscapeSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-LegacyOctalEscapeSequence">LegacyOctalEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="79ba39b7"><emu-nt id="_ref_14894"><a href="#prod-annexB-ZeroToThree">ZeroToThree</a></emu-nt><emu-nt id="_ref_14895"><a href="#prod-OctalDigit">OctalDigit</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the code unit whose value is (8 times the MV of the <emu-nt id="_ref_14896"><a href="#prod-annexB-ZeroToThree">ZeroToThree</a></emu-nt>) plus the MV of the <emu-nt id="_ref_14897"><a href="#prod-OctalDigit">OctalDigit</a></emu-nt>.
</li>
<li>
The SV of <emu-grammar><emu-production name="LegacyOctalEscapeSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-LegacyOctalEscapeSequence">LegacyOctalEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="088d7fcd"><emu-nt id="_ref_14898"><a href="#prod-annexB-FourToSeven">FourToSeven</a></emu-nt><emu-nt id="_ref_14899"><a href="#prod-OctalDigit">OctalDigit</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the code unit whose value is (8 times the MV of the <emu-nt id="_ref_14900"><a href="#prod-annexB-FourToSeven">FourToSeven</a></emu-nt>) plus the MV of the <emu-nt id="_ref_14901"><a href="#prod-OctalDigit">OctalDigit</a></emu-nt>.
</li>
<li>
The SV of <emu-grammar><emu-production name="LegacyOctalEscapeSequence" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-LegacyOctalEscapeSequence">LegacyOctalEscapeSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="e2ee5d93"><emu-nt id="_ref_14902"><a href="#prod-annexB-ZeroToThree">ZeroToThree</a></emu-nt><emu-nt id="_ref_14903"><a href="#prod-OctalDigit">OctalDigit</a></emu-nt><emu-nt id="_ref_14904"><a href="#prod-OctalDigit">OctalDigit</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> is the code unit whose value is (64 (that is, 8<sup>2</sup>) times the MV of the <emu-nt id="_ref_14905"><a href="#prod-annexB-ZeroToThree">ZeroToThree</a></emu-nt>) plus (8 times the MV of the first <emu-nt id="_ref_14906"><a href="#prod-OctalDigit">OctalDigit</a></emu-nt>) plus the MV of the second <emu-nt id="_ref_14907"><a href="#prod-OctalDigit">OctalDigit</a></emu-nt>.
</li>
<li>
The MV of <emu-grammar><emu-production name="ZeroToThree" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-ZeroToThree">ZeroToThree</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5259a431"><emu-t>0</emu-t></emu-rhs>
</emu-production></emu-grammar> is 0.
</li>
<li>
The MV of <emu-grammar><emu-production name="ZeroToThree" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-ZeroToThree">ZeroToThree</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="292aa5dd"><emu-t>1</emu-t></emu-rhs>
</emu-production></emu-grammar> is 1.
</li>
<li>
The MV of <emu-grammar><emu-production name="ZeroToThree" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-ZeroToThree">ZeroToThree</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="5ca73105"><emu-t>2</emu-t></emu-rhs>
</emu-production></emu-grammar> is 2.
</li>
<li>
The MV of <emu-grammar><emu-production name="ZeroToThree" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-ZeroToThree">ZeroToThree</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="ec6bb6b2"><emu-t>3</emu-t></emu-rhs>
</emu-production></emu-grammar> is 3.
</li>
<li>
The MV of <emu-grammar><emu-production name="FourToSeven" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-FourToSeven">FourToSeven</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="58ec4a73"><emu-t>4</emu-t></emu-rhs>
</emu-production></emu-grammar> is 4.
</li>
<li>
The MV of <emu-grammar><emu-production name="FourToSeven" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-FourToSeven">FourToSeven</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="8fcdef77"><emu-t>5</emu-t></emu-rhs>
</emu-production></emu-grammar> is 5.
</li>
<li>
The MV of <emu-grammar><emu-production name="FourToSeven" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-FourToSeven">FourToSeven</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="0b64877d"><emu-t>6</emu-t></emu-rhs>
</emu-production></emu-grammar> is 6.
</li>
<li>
The MV of <emu-grammar><emu-production name="FourToSeven" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-FourToSeven">FourToSeven</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="ea5e07a4"><emu-t>7</emu-t></emu-rhs>
</emu-production></emu-grammar> is 7.
</li>
</ul>
</emu-annex>
</emu-annex>
<emu-annex id="sec-html-like-comments">
<h1><span class="secnum">B.1.3</span>HTML-like Comments</h1>
<p>The syntax and semantics of <emu-xref href="#sec-comments" id="_ref_726"><a href="#sec-comments">11.4</a></emu-xref> is extended as follows except that this extension is not allowed when parsing source code using the <emu-xref href="#sec-context-free-grammars" id="_ref_8636"><a href="#sec-context-free-grammars">goal symbol</a></emu-xref> <emu-nt id="_ref_14908"><a href="#prod-Module">Module</a></emu-nt>:</p>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="Comment" type="lexical" id="prod-annexB-Comment">
<emu-nt><a href="#prod-annexB-Comment">Comment</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="b221187a"><emu-nt id="_ref_14909"><a href="#prod-annexB-MultiLineComment">MultiLineComment</a></emu-nt></emu-rhs>
<emu-rhs a="49272b29"><emu-nt id="_ref_14910"><a href="#prod-SingleLineComment">SingleLineComment</a></emu-nt></emu-rhs>
<emu-rhs a="18f3a8b0"><emu-nt id="_ref_14911"><a href="#prod-annexB-SingleLineHTMLOpenComment">SingleLineHTMLOpenComment</a></emu-nt></emu-rhs>
<emu-rhs a="fbcf1c51"><emu-nt id="_ref_14912"><a href="#prod-annexB-SingleLineHTMLCloseComment">SingleLineHTMLCloseComment</a></emu-nt></emu-rhs>
<emu-rhs a="c76ce34a"><emu-nt id="_ref_14913"><a href="#prod-annexB-SingleLineDelimitedComment">SingleLineDelimitedComment</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="MultiLineComment" type="lexical" id="prod-annexB-MultiLineComment">
<emu-nt><a href="#prod-annexB-MultiLineComment">MultiLineComment</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="f7d6f14d"><emu-t>/*</emu-t><emu-nt optional="" id="_ref_14914"><a href="#prod-annexB-FirstCommentLine">FirstCommentLine</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt id="_ref_14915"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt><emu-nt optional="" id="_ref_14916"><a href="#prod-MultiLineCommentChars">MultiLineCommentChars</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>*/</emu-t><emu-nt optional="" id="_ref_14917"><a href="#prod-annexB-HTMLCloseComment">HTMLCloseComment</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="FirstCommentLine" type="lexical" id="prod-annexB-FirstCommentLine">
<emu-nt><a href="#prod-annexB-FirstCommentLine">FirstCommentLine</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="ad641000"><emu-nt id="_ref_14918"><a href="#prod-annexB-SingleLineDelimitedCommentChars">SingleLineDelimitedCommentChars</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="SingleLineHTMLOpenComment" type="lexical" id="prod-annexB-SingleLineHTMLOpenComment">
<emu-nt><a href="#prod-annexB-SingleLineHTMLOpenComment">SingleLineHTMLOpenComment</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="d84ea646"><emu-t>&lt;!--</emu-t><emu-nt optional="" id="_ref_14919"><a href="#prod-SingleLineCommentChars">SingleLineCommentChars</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="SingleLineHTMLCloseComment" type="lexical" id="prod-annexB-SingleLineHTMLCloseComment">
<emu-nt><a href="#prod-annexB-SingleLineHTMLCloseComment">SingleLineHTMLCloseComment</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="583bf75e"><emu-nt id="_ref_14920"><a href="#prod-LineTerminatorSequence">LineTerminatorSequence</a></emu-nt><emu-nt id="_ref_14921"><a href="#prod-annexB-HTMLCloseComment">HTMLCloseComment</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="SingleLineDelimitedComment" type="lexical" id="prod-annexB-SingleLineDelimitedComment">
<emu-nt><a href="#prod-annexB-SingleLineDelimitedComment">SingleLineDelimitedComment</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="f895de37"><emu-t>/*</emu-t><emu-nt optional="" id="_ref_14922"><a href="#prod-annexB-SingleLineDelimitedCommentChars">SingleLineDelimitedCommentChars</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>*/</emu-t></emu-rhs>
</emu-production>
<emu-production name="HTMLCloseComment" type="lexical" id="prod-annexB-HTMLCloseComment">
<emu-nt><a href="#prod-annexB-HTMLCloseComment">HTMLCloseComment</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="74e1f4c6"><emu-nt optional="" id="_ref_14923"><a href="#prod-annexB-WhiteSpaceSequence">WhiteSpaceSequence</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt optional="" id="_ref_14924"><a href="#prod-annexB-SingleLineDelimitedCommentSequence">SingleLineDelimitedCommentSequence</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-t>--&gt;</emu-t><emu-nt optional="" id="_ref_14925"><a href="#prod-SingleLineCommentChars">SingleLineCommentChars</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="SingleLineDelimitedCommentChars" type="lexical" id="prod-annexB-SingleLineDelimitedCommentChars">
<emu-nt><a href="#prod-annexB-SingleLineDelimitedCommentChars">SingleLineDelimitedCommentChars</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="b2bae48b"><emu-nt id="_ref_14926"><a href="#prod-annexB-SingleLineNotAsteriskChar">SingleLineNotAsteriskChar</a></emu-nt><emu-nt optional="" id="_ref_14927"><a href="#prod-annexB-SingleLineDelimitedCommentChars">SingleLineDelimitedCommentChars</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="454eb481"><emu-t>*</emu-t><emu-nt optional="" id="_ref_14928"><a href="#prod-annexB-SingleLinePostAsteriskCommentChars">SingleLinePostAsteriskCommentChars</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="SingleLineNotAsteriskChar" type="lexical" id="prod-annexB-SingleLineNotAsteriskChar">
<emu-nt><a href="#prod-annexB-SingleLineNotAsteriskChar">SingleLineNotAsteriskChar</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="c57d9a3c"><emu-nt id="_ref_14929"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-gmod>but not one of <emu-t>*</emu-t> or <emu-nt id="_ref_14930"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt></emu-gmod></emu-rhs>
</emu-production>
<emu-production name="SingleLinePostAsteriskCommentChars" type="lexical" id="prod-annexB-SingleLinePostAsteriskCommentChars">
<emu-nt><a href="#prod-annexB-SingleLinePostAsteriskCommentChars">SingleLinePostAsteriskCommentChars</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="3f804176"><emu-nt id="_ref_14931"><a href="#prod-annexB-SingleLineNotForwardSlashOrAsteriskChar">SingleLineNotForwardSlashOrAsteriskChar</a></emu-nt><emu-nt optional="" id="_ref_14932"><a href="#prod-annexB-SingleLineDelimitedCommentChars">SingleLineDelimitedCommentChars</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="454eb481"><emu-t>*</emu-t><emu-nt optional="" id="_ref_14933"><a href="#prod-annexB-SingleLinePostAsteriskCommentChars">SingleLinePostAsteriskCommentChars</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="SingleLineNotForwardSlashOrAsteriskChar" type="lexical" id="prod-annexB-SingleLineNotForwardSlashOrAsteriskChar">
<emu-nt><a href="#prod-annexB-SingleLineNotForwardSlashOrAsteriskChar">SingleLineNotForwardSlashOrAsteriskChar</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="f5ca5fb6"><emu-nt id="_ref_14934"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-gmod>but not one of <emu-t>/</emu-t> or <emu-t>*</emu-t> or <emu-nt id="_ref_14935"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt></emu-gmod></emu-rhs>
</emu-production>
<emu-production name="WhiteSpaceSequence" type="lexical" id="prod-annexB-WhiteSpaceSequence">
<emu-nt><a href="#prod-annexB-WhiteSpaceSequence">WhiteSpaceSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="477048f4"><emu-nt id="_ref_14936"><a href="#prod-WhiteSpace">WhiteSpace</a></emu-nt><emu-nt optional="" id="_ref_14937"><a href="#prod-annexB-WhiteSpaceSequence">WhiteSpaceSequence</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="SingleLineDelimitedCommentSequence" type="lexical" id="prod-annexB-SingleLineDelimitedCommentSequence">
<emu-nt><a href="#prod-annexB-SingleLineDelimitedCommentSequence">SingleLineDelimitedCommentSequence</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="f7b786ad"><emu-nt id="_ref_14938"><a href="#prod-annexB-SingleLineDelimitedComment">SingleLineDelimitedComment</a></emu-nt><emu-nt optional="" id="_ref_14939"><a href="#prod-annexB-WhiteSpaceSequence">WhiteSpaceSequence</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt><emu-nt optional="" id="_ref_14940"><a href="#prod-annexB-SingleLineDelimitedCommentSequence">SingleLineDelimitedCommentSequence</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<p>Similar to a <emu-nt id="_ref_14941"><a href="#prod-annexB-MultiLineComment">MultiLineComment</a></emu-nt> that contains a line terminator code point, a <emu-nt id="_ref_14942"><a href="#prod-annexB-SingleLineHTMLCloseComment">SingleLineHTMLCloseComment</a></emu-nt> is considered to be a <emu-nt id="_ref_14943"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> for purposes of parsing by the syntactic grammar.</p>
</emu-annex>
<emu-annex id="sec-regular-expressions-patterns">
<h1><span class="secnum">B.1.4</span>Regular Expressions Patterns</h1>
<p>The syntax of <emu-xref href="#sec-patterns" id="_ref_727"><a href="#sec-patterns">21.2.1</a></emu-xref>
is modified and extended as follows. These changes introduce
ambiguities that are broken by the ordering of grammar productions and
by contextual information. When parsing using the following grammar,
each alternative is considered only if previous production alternatives
do not match.</p>
<p>This alternative pattern grammar and semantics only changes the
syntax and semantics of BMP patterns. The following grammar extensions
include productions parameterized with the [U] parameter. However, none
of these extensions change the syntax of Unicode patterns recognized
when parsing with the [U] parameter present on the <emu-xref href="#sec-context-free-grammars" id="_ref_8637"><a href="#sec-context-free-grammars">goal symbol</a></emu-xref>.</p>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="Term" params="U, N" type="lexical" id="prod-annexB-Term">
<emu-nt params="U, N"><a href="#prod-annexB-Term">Term</a><emu-mods><emu-params>[U, N]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="42952b04" constraints="+U"><emu-constraints>[+U]</emu-constraints><emu-nt params="+U, ?N" id="_ref_14944"><a href="#prod-annexB-Assertion">Assertion</a><emu-mods><emu-params>[+U, ?N]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="ee1644f8" constraints="+U"><emu-constraints>[+U]</emu-constraints><emu-nt params="+U, ?N" id="_ref_14945"><a href="#prod-annexB-Atom">Atom</a><emu-mods><emu-params>[+U, ?N]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="cc69982c" constraints="+U"><emu-constraints>[+U]</emu-constraints><emu-nt params="+U, ?N" id="_ref_14946"><a href="#prod-annexB-Atom">Atom</a><emu-mods><emu-params>[+U, ?N]</emu-params></emu-mods></emu-nt><emu-nt id="_ref_14947"><a href="#prod-Quantifier">Quantifier</a></emu-nt></emu-rhs>
<emu-rhs a="9d6f1ab0" constraints="~U"><emu-constraints>[~U]</emu-constraints><emu-nt params="?N" id="_ref_14948"><a href="#prod-annexB-QuantifiableAssertion">QuantifiableAssertion</a><emu-mods><emu-params>[?N]</emu-params></emu-mods></emu-nt><emu-nt id="_ref_14949"><a href="#prod-Quantifier">Quantifier</a></emu-nt></emu-rhs>
<emu-rhs a="4b963ef7" constraints="~U"><emu-constraints>[~U]</emu-constraints><emu-nt params="~U, ?N" id="_ref_14950"><a href="#prod-annexB-Assertion">Assertion</a><emu-mods><emu-params>[~U, ?N]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="7c73eae0" constraints="~U"><emu-constraints>[~U]</emu-constraints><emu-nt params="?N" id="_ref_14951"><a href="#prod-annexB-ExtendedAtom">ExtendedAtom</a><emu-mods><emu-params>[?N]</emu-params></emu-mods></emu-nt><emu-nt id="_ref_14952"><a href="#prod-Quantifier">Quantifier</a></emu-nt></emu-rhs>
<emu-rhs a="17856299" constraints="~U"><emu-constraints>[~U]</emu-constraints><emu-nt params="?N" id="_ref_14953"><a href="#prod-annexB-ExtendedAtom">ExtendedAtom</a><emu-mods><emu-params>[?N]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="Assertion" params="U, N" type="lexical" id="prod-annexB-Assertion">
<emu-nt params="U, N"><a href="#prod-annexB-Assertion">Assertion</a><emu-mods><emu-params>[U, N]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="e5878811"><emu-t>^</emu-t></emu-rhs>
<emu-rhs a="1262cc92"><emu-t>$</emu-t></emu-rhs>
<emu-rhs a="1e228da5"><emu-t>\</emu-t><emu-t>b</emu-t></emu-rhs>
<emu-rhs a="a5dc97fa"><emu-t>\</emu-t><emu-t>B</emu-t></emu-rhs>
<emu-rhs a="a1cecfcb" constraints="+U"><emu-constraints>[+U]</emu-constraints><emu-t>(</emu-t><emu-t>?</emu-t><emu-t>=</emu-t><emu-nt params="+U, ?N" id="_ref_14954"><a href="#prod-Disjunction">Disjunction</a><emu-mods><emu-params>[+U, ?N]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t></emu-rhs>
<emu-rhs a="6ac30063" constraints="+U"><emu-constraints>[+U]</emu-constraints><emu-t>(</emu-t><emu-t>?</emu-t><emu-t>!</emu-t><emu-nt params="+U, ?N" id="_ref_14955"><a href="#prod-Disjunction">Disjunction</a><emu-mods><emu-params>[+U, ?N]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t></emu-rhs>
<emu-rhs a="c1fba5e6" constraints="~U"><emu-constraints>[~U]</emu-constraints><emu-nt params="?N" id="_ref_14956"><a href="#prod-annexB-QuantifiableAssertion">QuantifiableAssertion</a><emu-mods><emu-params>[?N]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="82aea0e5"><emu-t>(</emu-t><emu-t>?</emu-t><emu-t>&lt;=</emu-t><emu-nt params="?U, ?N" id="_ref_14957"><a href="#prod-Disjunction">Disjunction</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t></emu-rhs>
<emu-rhs a="9799bbf1"><emu-t>(</emu-t><emu-t>?</emu-t><emu-t>&lt;!</emu-t><emu-nt params="?U, ?N" id="_ref_14958"><a href="#prod-Disjunction">Disjunction</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t></emu-rhs>
</emu-production>
<emu-production name="QuantifiableAssertion" params="N" type="lexical" id="prod-annexB-QuantifiableAssertion">
<emu-nt params="N"><a href="#prod-annexB-QuantifiableAssertion">QuantifiableAssertion</a><emu-mods><emu-params>[N]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="e39cf05b"><emu-t>(</emu-t><emu-t>?</emu-t><emu-t>=</emu-t><emu-nt params="~U, ?N" id="_ref_14959"><a href="#prod-Disjunction">Disjunction</a><emu-mods><emu-params>[~U, ?N]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t></emu-rhs>
<emu-rhs a="7134df8b"><emu-t>(</emu-t><emu-t>?</emu-t><emu-t>!</emu-t><emu-nt params="~U, ?N" id="_ref_14960"><a href="#prod-Disjunction">Disjunction</a><emu-mods><emu-params>[~U, ?N]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t></emu-rhs>
</emu-production>
<emu-production name="ExtendedAtom" params="N" type="lexical" id="prod-annexB-ExtendedAtom">
<emu-nt params="N"><a href="#prod-annexB-ExtendedAtom">ExtendedAtom</a><emu-mods><emu-params>[N]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="9658e473"><emu-t>.</emu-t></emu-rhs>
<emu-rhs a="a0dbcf83"><emu-t>\</emu-t><emu-nt params="~U, ?N" id="_ref_14961"><a href="#prod-annexB-AtomEscape">AtomEscape</a><emu-mods><emu-params>[~U, ?N]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="dc7c5bc4"><emu-t>\</emu-t><emu-gann>[lookahead = <emu-t>c</emu-t>]</emu-gann></emu-rhs>
<emu-rhs a="099fefb0"><emu-nt params="~U" id="_ref_14962"><a href="#prod-CharacterClass">CharacterClass</a><emu-mods><emu-params>[~U]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="50da0889"><emu-t>(</emu-t><emu-nt params="~U, ?N" id="_ref_14963"><a href="#prod-Disjunction">Disjunction</a><emu-mods><emu-params>[~U, ?N]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t></emu-rhs>
<emu-rhs a="cad52e87"><emu-t>(</emu-t><emu-t>?</emu-t><emu-t>:</emu-t><emu-nt params="~U, ?N" id="_ref_14964"><a href="#prod-Disjunction">Disjunction</a><emu-mods><emu-params>[~U, ?N]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t></emu-rhs>
<emu-rhs a="bbd715bb"><emu-nt id="_ref_14965"><a href="#prod-annexB-InvalidBracedQuantifier">InvalidBracedQuantifier</a></emu-nt></emu-rhs>
<emu-rhs a="23a78a5b"><emu-nt id="_ref_14966"><a href="#prod-annexB-ExtendedPatternCharacter">ExtendedPatternCharacter</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="InvalidBracedQuantifier" type="lexical" id="prod-annexB-InvalidBracedQuantifier">
<emu-nt><a href="#prod-annexB-InvalidBracedQuantifier">InvalidBracedQuantifier</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="68a2b74e"><emu-t>{</emu-t><emu-nt id="_ref_14967"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="82e97391"><emu-t>{</emu-t><emu-nt id="_ref_14968"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-t>,</emu-t><emu-t>}</emu-t></emu-rhs>
<emu-rhs a="f47829c0"><emu-t>{</emu-t><emu-nt id="_ref_14969"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-t>,</emu-t><emu-nt id="_ref_14970"><a href="#prod-DecimalDigits">DecimalDigits</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="ExtendedPatternCharacter" type="lexical" id="prod-annexB-ExtendedPatternCharacter">
<emu-nt><a href="#prod-annexB-ExtendedPatternCharacter">ExtendedPatternCharacter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="a6a8bcc8"><emu-nt id="_ref_14971"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-gmod>but not one of <emu-t>^</emu-t></emu-gmod><emu-t>$</emu-t><emu-t>\</emu-t><emu-t>.</emu-t><emu-t>*</emu-t><emu-t>+</emu-t><emu-t>?</emu-t><emu-t>(</emu-t><emu-t>)</emu-t><emu-t>[</emu-t><emu-t>|</emu-t></emu-rhs>
</emu-production>
<emu-production name="AtomEscape" params="U, N" type="lexical" id="prod-annexB-AtomEscape">
<emu-nt params="U, N"><a href="#prod-annexB-AtomEscape">AtomEscape</a><emu-mods><emu-params>[U, N]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="c727c42b" constraints="+U"><emu-constraints>[+U]</emu-constraints><emu-nt id="_ref_14972"><a href="#prod-DecimalEscape">DecimalEscape</a></emu-nt></emu-rhs>
<emu-rhs a="f59e7f4b" constraints="~U"><emu-constraints>[~U]</emu-constraints><emu-nt id="_ref_14973"><a href="#prod-DecimalEscape">DecimalEscape</a></emu-nt><emu-gmod>but only if the CapturingGroupNumber of <emu-nt id="_ref_14974"><a href="#prod-DecimalEscape">DecimalEscape</a></emu-nt> is &lt;= _NcapturingParens_</emu-gmod></emu-rhs>
<emu-rhs a="da3d719e"><emu-nt params="?U" id="_ref_14975"><a href="#prod-CharacterClassEscape">CharacterClassEscape</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="131b7a46"><emu-nt params="~U, ?N" id="_ref_14976"><a href="#prod-annexB-CharacterEscape">CharacterEscape</a><emu-mods><emu-params>[~U, ?N]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="f3e6826b" constraints="+N"><emu-constraints>[+N]</emu-constraints><emu-t>k</emu-t><emu-nt params="?U" id="_ref_14977"><a href="#prod-GroupName">GroupName</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="CharacterEscape" params="U, N" type="lexical" id="prod-annexB-CharacterEscape">
<emu-nt params="U, N"><a href="#prod-annexB-CharacterEscape">CharacterEscape</a><emu-mods><emu-params>[U, N]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="f88e7170"><emu-nt id="_ref_14978"><a href="#prod-ControlEscape">ControlEscape</a></emu-nt></emu-rhs>
<emu-rhs a="a14dae7e"><emu-t>c</emu-t><emu-nt id="_ref_14979"><a href="#prod-ControlLetter">ControlLetter</a></emu-nt></emu-rhs>
<emu-rhs a="6964a19d"><emu-t>0</emu-t><emu-gann>[lookahead ∉ <emu-nt id="_ref_14980"><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt>]</emu-gann></emu-rhs>
<emu-rhs a="a8071b85"><emu-nt id="_ref_14981"><a href="#prod-HexEscapeSequence">HexEscapeSequence</a></emu-nt></emu-rhs>
<emu-rhs a="2649a73f"><emu-nt params="?U" id="_ref_14982"><a href="#prod-RegExpUnicodeEscapeSequence">RegExpUnicodeEscapeSequence</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="82381536" constraints="~U"><emu-constraints>[~U]</emu-constraints><emu-nt id="_ref_14983"><a href="#prod-annexB-LegacyOctalEscapeSequence">LegacyOctalEscapeSequence</a></emu-nt></emu-rhs>
<emu-rhs a="c3a030a6"><emu-nt params="?U, ?N" id="_ref_14984"><a href="#prod-annexB-IdentityEscape">IdentityEscape</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="IdentityEscape" params="U, N" type="lexical" id="prod-annexB-IdentityEscape">
<emu-nt params="U, N"><a href="#prod-annexB-IdentityEscape">IdentityEscape</a><emu-mods><emu-params>[U, N]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="59e8579a" constraints="+U"><emu-constraints>[+U]</emu-constraints><emu-nt id="_ref_14985"><a href="#prod-SyntaxCharacter">SyntaxCharacter</a></emu-nt></emu-rhs>
<emu-rhs a="85b4a3dd" constraints="+U"><emu-constraints>[+U]</emu-constraints><emu-t>/</emu-t></emu-rhs>
<emu-rhs a="525737ff" constraints="~U"><emu-constraints>[~U]</emu-constraints><emu-nt params="?N" id="_ref_14986"><a href="#prod-annexB-SourceCharacterIdentityEscape">SourceCharacterIdentityEscape</a><emu-mods><emu-params>[?N]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="SourceCharacterIdentityEscape" params="N" type="lexical" id="prod-annexB-SourceCharacterIdentityEscape">
<emu-nt params="N"><a href="#prod-annexB-SourceCharacterIdentityEscape">SourceCharacterIdentityEscape</a><emu-mods><emu-params>[N]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="32b1b462" constraints="~N"><emu-constraints>[~N]</emu-constraints><emu-nt id="_ref_14987"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-gmod>but not <emu-t>c</emu-t></emu-gmod></emu-rhs>
<emu-rhs a="5feea087" constraints="+N"><emu-constraints>[+N]</emu-constraints><emu-nt id="_ref_14988"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-gmod>but not one of <emu-t>c</emu-t> or <emu-t>k</emu-t></emu-gmod></emu-rhs>
</emu-production>
<emu-production name="ClassAtomNoDash" params="U, N" type="lexical" id="prod-annexB-ClassAtomNoDash">
<emu-nt params="U, N"><a href="#prod-annexB-ClassAtomNoDash">ClassAtomNoDash</a><emu-mods><emu-params>[U, N]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="ecde6e28"><emu-nt id="_ref_14989"><a href="#prod-SourceCharacter">SourceCharacter</a></emu-nt><emu-gmod>but not one of <emu-t>\</emu-t> or <emu-t>]</emu-t> or <emu-t>-</emu-t></emu-gmod></emu-rhs>
<emu-rhs a="922d511a"><emu-t>\</emu-t><emu-nt params="?U, ?N" id="_ref_14990"><a href="#prod-annexB-ClassEscape">ClassEscape</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="dc7c5bc4"><emu-t>\</emu-t><emu-gann>[lookahead = <emu-t>c</emu-t>]</emu-gann></emu-rhs>
</emu-production>
<emu-production name="ClassEscape" params="U, N" type="lexical" id="prod-annexB-ClassEscape">
<emu-nt params="U, N"><a href="#prod-annexB-ClassEscape">ClassEscape</a><emu-mods><emu-params>[U, N]</emu-params></emu-mods></emu-nt><emu-geq>::</emu-geq><emu-rhs a="0185ce89"><emu-t>b</emu-t></emu-rhs>
<emu-rhs a="ae60fdeb" constraints="+U"><emu-constraints>[+U]</emu-constraints><emu-t>-</emu-t></emu-rhs>
<emu-rhs a="078818d2" constraints="~U"><emu-constraints>[~U]</emu-constraints><emu-t>c</emu-t><emu-nt id="_ref_14991"><a href="#prod-annexB-ClassControlLetter">ClassControlLetter</a></emu-nt></emu-rhs>
<emu-rhs a="da3d719e"><emu-nt params="?U" id="_ref_14992"><a href="#prod-CharacterClassEscape">CharacterClassEscape</a><emu-mods><emu-params>[?U]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="33baba28"><emu-nt params="?U, ?N" id="_ref_14993"><a href="#prod-annexB-CharacterEscape">CharacterEscape</a><emu-mods><emu-params>[?U, ?N]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
<emu-production name="ClassControlLetter" type="lexical" id="prod-annexB-ClassControlLetter">
<emu-nt><a href="#prod-annexB-ClassControlLetter">ClassControlLetter</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="b3831ee0"><emu-nt id="_ref_14994"><a href="#prod-DecimalDigit">DecimalDigit</a></emu-nt></emu-rhs>
<emu-rhs a="07564b94"><emu-t>_</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>When the same left hand sides occurs with both [+U] and [~U] guards it is to control the disambiguation priority.</p>
</div></emu-note>
<emu-annex id="sec-patterns-static-semantics-early-errors-annexb">
<h1><span class="secnum">B.1.4.1</span>Static Semantics: Early Errors</h1>
<p>The semantics of <emu-xref href="#sec-patterns-static-semantics-early-errors" id="_ref_728"><a href="#sec-patterns-static-semantics-early-errors">21.2.1.1</a></emu-xref> is extended as follows:</p>
<emu-grammar><emu-production name="ExtendedAtom" type="lexical" collapsed="">
<emu-nt><a href="#prod-annexB-ExtendedAtom">ExtendedAtom</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="bbd715bb"><emu-nt id="_ref_14995"><a href="#prod-annexB-InvalidBracedQuantifier">InvalidBracedQuantifier</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if any source text matches this rule.
</li>
</ul>
<emu-grammar><emu-production name="NonemptyClassRanges" type="lexical" collapsed="" id="prod-annexB-NonemptyClassRanges">
<emu-nt><a href="#prod-annexB-NonemptyClassRanges">NonemptyClassRanges</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="a5b9453b"><emu-nt id="_ref_14996"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt><emu-t>-</emu-t><emu-nt id="_ref_14997"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt><emu-nt id="_ref_14998"><a href="#prod-ClassRanges">ClassRanges</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if IsCharacterClass of the first <emu-nt id="_ref_14999"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt> is <emu-val>true</emu-val> or IsCharacterClass of the second <emu-nt id="_ref_15000"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt> is <emu-val>true</emu-val> <ins>and this production has a <sub>[U]</sub> parameter</ins>.
</li>
</ul>
<emu-grammar><emu-production name="NonemptyClassRangesNoDash" type="lexical" collapsed="" id="prod-annexB-NonemptyClassRangesNoDash">
<emu-nt><a href="#prod-annexB-NonemptyClassRangesNoDash">NonemptyClassRangesNoDash</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="e9856041"><emu-nt id="_ref_15001"><a href="#prod-annexB-ClassAtomNoDash">ClassAtomNoDash</a></emu-nt><emu-t>-</emu-t><emu-nt id="_ref_15002"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt><emu-nt id="_ref_15003"><a href="#prod-ClassRanges">ClassRanges</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if IsCharacterClass of <emu-nt id="_ref_15004"><a href="#prod-annexB-ClassAtomNoDash">ClassAtomNoDash</a></emu-nt> is <emu-val>true</emu-val> or IsCharacterClass of <emu-nt id="_ref_15005"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt> is <emu-val>true</emu-val> <ins>and this production has a <sub>[U]</sub> parameter</ins>.
</li>
</ul>
</emu-annex>
<emu-annex id="sec-patterns-static-semantics-is-character-class-annexb">
<h1><span class="secnum">B.1.4.2</span>Static Semantics: IsCharacterClass</h1>
<p>The semantics of <emu-xref href="#sec-patterns-static-semantics-is-character-class" id="_ref_729"><a href="#sec-patterns-static-semantics-is-character-class">21.2.1.3</a></emu-xref> is extended as follows:</p>
<emu-grammar><emu-production name="ClassAtomNoDash" type="lexical" collapsed="">
<emu-nt><a href="#prod-annexB-ClassAtomNoDash">ClassAtomNoDash</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="dc7c5bc4"><emu-t>\</emu-t><emu-gann>[lookahead = <emu-t>c</emu-t>]</emu-gann></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
</emu-annex>
<emu-annex id="sec-patterns-static-semantics-character-value-annexb">
<h1><span class="secnum">B.1.4.3</span>Static Semantics: CharacterValue</h1>
<p>The semantics of <emu-xref href="#sec-patterns-static-semantics-character-value" id="_ref_730"><a href="#sec-patterns-static-semantics-character-value">21.2.1.4</a></emu-xref> is extended as follows:</p>
<emu-grammar><emu-production name="ClassAtomNoDash" type="lexical" collapsed="">
<emu-nt><a href="#prod-annexB-ClassAtomNoDash">ClassAtomNoDash</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="dc7c5bc4"><emu-t>\</emu-t><emu-gann>[lookahead = <emu-t>c</emu-t>]</emu-gann></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return the code point value of U+005C (REVERSE SOLIDUS).
</li></ol></emu-alg>
<emu-grammar><emu-production name="ClassEscape" type="lexical" collapsed="">
<emu-nt><a href="#prod-annexB-ClassEscape">ClassEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="361f85ec"><emu-t>c</emu-t><emu-nt id="_ref_15006"><a href="#prod-annexB-ClassControlLetter">ClassControlLetter</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>ch</var> be the code point matched by <emu-nt id="_ref_15007"><a href="#prod-annexB-ClassControlLetter">ClassControlLetter</a></emu-nt>.</li><li>Let <var>i</var> be <var>ch</var>'s code point value.</li><li>Return the remainder of dividing <var>i</var> by 32.
</li></ol></emu-alg>
<emu-grammar><emu-production name="CharacterEscape" type="lexical" collapsed="">
<emu-nt><a href="#prod-annexB-CharacterEscape">CharacterEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="e8cc2b7c"><emu-nt id="_ref_15008"><a href="#prod-annexB-LegacyOctalEscapeSequence">LegacyOctalEscapeSequence</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Evaluate the SV of the <emu-nt id="_ref_15009"><a href="#prod-annexB-LegacyOctalEscapeSequence">LegacyOctalEscapeSequence</a></emu-nt> (see <emu-xref href="#sec-additional-syntax-string-literals" id="_ref_731"><a href="#sec-additional-syntax-string-literals">B.1.2</a></emu-xref>) to obtain a code unit <var>cu</var>.</li><li>Return the numeric value of <var>cu</var>.
</li></ol></emu-alg>
</emu-annex>
<emu-annex id="sec-regular-expression-patterns-semantics">
<h1><span class="secnum">B.1.4.4</span>Pattern Semantics</h1>
<p>The semantics of <emu-xref href="#sec-pattern-semantics" id="_ref_732"><a href="#sec-pattern-semantics">21.2.2</a></emu-xref> is extended as follows:</p>
<p>Within <emu-xref href="#sec-term" id="_ref_733"><a href="#sec-term">21.2.2.5</a></emu-xref> reference to “<emu-grammar><emu-production name="Atom" type="lexical" collapsed="" id="prod-annexB-Atom" class=" inline">
<emu-nt><a href="#prod-annexB-Atom">Atom</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="59aa089b"><emu-t>(</emu-t><emu-nt id="_ref_15010"><a href="#prod-GroupSpecifier">GroupSpecifier</a></emu-nt><emu-nt id="_ref_15011"><a href="#prod-Disjunction">Disjunction</a></emu-nt><emu-t>)</emu-t></emu-rhs>
</emu-production></emu-grammar> ” are to be interpreted as meaning “<emu-grammar><emu-production name="Atom" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-Atom">Atom</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="59aa089b"><emu-t>(</emu-t><emu-nt id="_ref_15012"><a href="#prod-GroupSpecifier">GroupSpecifier</a></emu-nt><emu-nt id="_ref_15013"><a href="#prod-Disjunction">Disjunction</a></emu-nt><emu-t>)</emu-t></emu-rhs>
</emu-production></emu-grammar> ” or “<emu-grammar><emu-production name="ExtendedAtom" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-ExtendedAtom">ExtendedAtom</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="34eb148f"><emu-t>(</emu-t><emu-nt id="_ref_15014"><a href="#prod-Disjunction">Disjunction</a></emu-nt><emu-t>)</emu-t></emu-rhs>
</emu-production></emu-grammar> ”.</p>
<p>Term (<emu-xref href="#sec-term" id="_ref_734"><a href="#sec-term">21.2.2.5</a></emu-xref>) includes the following additional evaluation rules:</p>
<p>The production <emu-grammar><emu-production name="Term" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-Term">Term</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="fd5c877d"><emu-nt id="_ref_15015"><a href="#prod-annexB-QuantifiableAssertion">QuantifiableAssertion</a></emu-nt><emu-nt id="_ref_15016"><a href="#prod-Quantifier">Quantifier</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> evaluates the same as the production <emu-grammar><emu-production name="Term" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-Term">Term</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="44aed0a4"><emu-nt id="_ref_15017"><a href="#prod-annexB-Atom">Atom</a></emu-nt><emu-nt id="_ref_15018"><a href="#prod-Quantifier">Quantifier</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> but with <emu-nt id="_ref_15019"><a href="#prod-annexB-QuantifiableAssertion">QuantifiableAssertion</a></emu-nt> substituted for <emu-nt id="_ref_15020"><a href="#prod-annexB-Atom">Atom</a></emu-nt>.</p>
<p>The production <emu-grammar><emu-production name="Term" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-Term">Term</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="74fbcc1b"><emu-nt id="_ref_15021"><a href="#prod-annexB-ExtendedAtom">ExtendedAtom</a></emu-nt><emu-nt id="_ref_15022"><a href="#prod-Quantifier">Quantifier</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> evaluates the same as the production <emu-grammar><emu-production name="Term" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-Term">Term</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="44aed0a4"><emu-nt id="_ref_15023"><a href="#prod-annexB-Atom">Atom</a></emu-nt><emu-nt id="_ref_15024"><a href="#prod-Quantifier">Quantifier</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> but with <emu-nt id="_ref_15025"><a href="#prod-annexB-ExtendedAtom">ExtendedAtom</a></emu-nt> substituted for <emu-nt id="_ref_15026"><a href="#prod-annexB-Atom">Atom</a></emu-nt>.</p>
<p>The production <emu-grammar><emu-production name="Term" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-Term">Term</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="9700dc98"><emu-nt id="_ref_15027"><a href="#prod-annexB-ExtendedAtom">ExtendedAtom</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> evaluates the same as the production <emu-grammar><emu-production name="Term" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-Term">Term</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="41dded41"><emu-nt id="_ref_15028"><a href="#prod-annexB-Atom">Atom</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> but with <emu-nt id="_ref_15029"><a href="#prod-annexB-ExtendedAtom">ExtendedAtom</a></emu-nt> substituted for <emu-nt id="_ref_15030"><a href="#prod-annexB-Atom">Atom</a></emu-nt>.</p>
<p>Assertion (<emu-xref href="#sec-assertion" id="_ref_735"><a href="#sec-assertion">21.2.2.6</a></emu-xref>) includes the following additional evaluation rule:</p>
<p>The production <emu-grammar><emu-production name="Assertion" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-Assertion">Assertion</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="645fd5dc"><emu-nt id="_ref_15031"><a href="#prod-annexB-QuantifiableAssertion">QuantifiableAssertion</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Evaluate <emu-nt id="_ref_15032"><a href="#prod-annexB-QuantifiableAssertion">QuantifiableAssertion</a></emu-nt> to obtain a Matcher <var>m</var>.</li><li>Return <var>m</var>.
</li></ol></emu-alg>
<p>Assertion (<emu-xref href="#sec-assertion" id="_ref_736"><a href="#sec-assertion">21.2.2.6</a></emu-xref>) evaluation rules for the <emu-grammar><emu-production name="Assertion" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-Assertion">Assertion</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="cfb94f94"><emu-t>(</emu-t><emu-t>?</emu-t><emu-t>=</emu-t><emu-nt id="_ref_15033"><a href="#prod-Disjunction">Disjunction</a></emu-nt><emu-t>)</emu-t></emu-rhs>
</emu-production></emu-grammar> and <emu-grammar><emu-production name="Assertion" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-Assertion">Assertion</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="ba98f6e2"><emu-t>(</emu-t><emu-t>?</emu-t><emu-t>!</emu-t><emu-nt id="_ref_15034"><a href="#prod-Disjunction">Disjunction</a></emu-nt><emu-t>)</emu-t></emu-rhs>
</emu-production></emu-grammar> productions are also used for the <emu-nt id="_ref_15035"><a href="#prod-annexB-QuantifiableAssertion">QuantifiableAssertion</a></emu-nt> productions, but with <emu-nt id="_ref_15036"><a href="#prod-annexB-QuantifiableAssertion">QuantifiableAssertion</a></emu-nt> substituted for <emu-nt id="_ref_15037"><a href="#prod-annexB-Assertion">Assertion</a></emu-nt>.</p>
<p>Atom (<emu-xref href="#sec-atom" id="_ref_737"><a href="#sec-atom">21.2.2.8</a></emu-xref>) evaluation rules for the <emu-nt id="_ref_15038"><a href="#prod-annexB-Atom">Atom</a></emu-nt> productions except for <emu-grammar><emu-production name="Atom" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-Atom">Atom</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="beff52c4"><emu-nt id="_ref_15039"><a href="#prod-PatternCharacter">PatternCharacter</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> are also used for the <emu-nt id="_ref_15040"><a href="#prod-annexB-ExtendedAtom">ExtendedAtom</a></emu-nt> productions, but with <emu-nt id="_ref_15041"><a href="#prod-annexB-ExtendedAtom">ExtendedAtom</a></emu-nt> substituted for <emu-nt id="_ref_15042"><a href="#prod-annexB-Atom">Atom</a></emu-nt>. The following evaluation rules are also added:</p>
<p>The production <emu-grammar><emu-production name="ExtendedAtom" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-ExtendedAtom">ExtendedAtom</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="dc7c5bc4"><emu-t>\</emu-t><emu-gann>[lookahead = <emu-t>c</emu-t>]</emu-gann></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Let <var>A</var> be the CharSet containing the single character <code>\</code> U+005C (REVERSE SOLIDUS).</li><li>Call <emu-xref aoid="CharacterSetMatcher" id="_ref_8638"><a href="#sec-runtime-semantics-charactersetmatcher-abstract-operation">CharacterSetMatcher</a></emu-xref>(<var>A</var>, <emu-val>false</emu-val>) and return its Matcher result.
</li></ol></emu-alg>
<p>The production <emu-grammar><emu-production name="ExtendedAtom" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-ExtendedAtom">ExtendedAtom</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="23a78a5b"><emu-nt id="_ref_15043"><a href="#prod-annexB-ExtendedPatternCharacter">ExtendedPatternCharacter</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Let <var>ch</var> be the character represented by <emu-nt id="_ref_15044"><a href="#prod-annexB-ExtendedPatternCharacter">ExtendedPatternCharacter</a></emu-nt>.</li><li>Let <var>A</var> be a one-element CharSet containing the character <var>ch</var>.</li><li>Call <emu-xref aoid="CharacterSetMatcher" id="_ref_8639"><a href="#sec-runtime-semantics-charactersetmatcher-abstract-operation">CharacterSetMatcher</a></emu-xref>(<var>A</var>, <emu-val>false</emu-val>) and return its Matcher result.
</li></ol></emu-alg>
<p>CharacterEscape (<emu-xref href="#sec-characterescape" id="_ref_738"><a href="#sec-characterescape">21.2.2.10</a></emu-xref>) includes the following additional evaluation rule:</p>
<p>The production <emu-grammar><emu-production name="CharacterEscape" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-CharacterEscape">CharacterEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="e8cc2b7c"><emu-nt id="_ref_15045"><a href="#prod-annexB-LegacyOctalEscapeSequence">LegacyOctalEscapeSequence</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Let <var>cv</var> be the CharacterValue of this <emu-nt id="_ref_15046"><a href="#prod-annexB-CharacterEscape">CharacterEscape</a></emu-nt>.</li><li>Return the character whose character value is <var>cv</var>.
</li></ol></emu-alg>
<p>NonemptyClassRanges (<emu-xref href="#sec-nonemptyclassranges" id="_ref_739"><a href="#sec-nonemptyclassranges">21.2.2.15</a></emu-xref>) modifies the following evaluation rule:</p>
<p>The production <emu-grammar><emu-production name="NonemptyClassRanges" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-NonemptyClassRanges">NonemptyClassRanges</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="a5b9453b"><emu-nt id="_ref_15047"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt><emu-t>-</emu-t><emu-nt id="_ref_15048"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt><emu-nt id="_ref_15049"><a href="#prod-ClassRanges">ClassRanges</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Evaluate the first <emu-nt id="_ref_15050"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt> to obtain a CharSet <var>A</var>.</li><li>Evaluate the second <emu-nt id="_ref_15051"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt> to obtain a CharSet <var>B</var>.</li><li>Evaluate <emu-nt id="_ref_15052"><a href="#prod-ClassRanges">ClassRanges</a></emu-nt> to obtain a CharSet <var>C</var>.</li><li>Call <emu-xref aoid="CharacterRangeOrUnion" id="_ref_8640"><a href="#sec-runtime-semantics-characterrangeorunion-abstract-operation">CharacterRangeOrUnion</a></emu-xref>(<var>A</var>, <var>B</var>) and let <var>D</var> be the resulting CharSet.</li><li>Return the union of CharSets <var>D</var> and <var>C</var>.
</li></ol></emu-alg>
<p>NonemptyClassRangesNoDash (<emu-xref href="#sec-nonemptyclassrangesnodash" id="_ref_740"><a href="#sec-nonemptyclassrangesnodash">21.2.2.16</a></emu-xref>) modifies the following evaluation rule:</p>
<p>The production <emu-grammar><emu-production name="NonemptyClassRangesNoDash" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-NonemptyClassRangesNoDash">NonemptyClassRangesNoDash</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="e9856041"><emu-nt id="_ref_15053"><a href="#prod-annexB-ClassAtomNoDash">ClassAtomNoDash</a></emu-nt><emu-t>-</emu-t><emu-nt id="_ref_15054"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt><emu-nt id="_ref_15055"><a href="#prod-ClassRanges">ClassRanges</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Evaluate <emu-nt id="_ref_15056"><a href="#prod-annexB-ClassAtomNoDash">ClassAtomNoDash</a></emu-nt> to obtain a CharSet <var>A</var>.</li><li>Evaluate <emu-nt id="_ref_15057"><a href="#prod-ClassAtom">ClassAtom</a></emu-nt> to obtain a CharSet <var>B</var>.</li><li>Evaluate <emu-nt id="_ref_15058"><a href="#prod-ClassRanges">ClassRanges</a></emu-nt> to obtain a CharSet <var>C</var>.</li><li>Call <emu-xref aoid="CharacterRangeOrUnion" id="_ref_8641"><a href="#sec-runtime-semantics-characterrangeorunion-abstract-operation">CharacterRangeOrUnion</a></emu-xref>(<var>A</var>, <var>B</var>) and let <var>D</var> be the resulting CharSet.</li><li>Return the union of CharSets <var>D</var> and <var>C</var>.
</li></ol></emu-alg>
<p>ClassEscape (<emu-xref href="#sec-classescape" id="_ref_741"><a href="#sec-classescape">21.2.2.19</a></emu-xref>) includes the following additional evaluation rule:</p>
<p>The production <emu-grammar><emu-production name="ClassEscape" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-ClassEscape">ClassEscape</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="361f85ec"><emu-t>c</emu-t><emu-nt id="_ref_15059"><a href="#prod-annexB-ClassControlLetter">ClassControlLetter</a></emu-nt></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Let <var>cv</var> be the CharacterValue of this <emu-nt id="_ref_15060"><a href="#prod-annexB-ClassEscape">ClassEscape</a></emu-nt>.</li><li>Let <var>c</var> be the character whose character value is <var>cv</var>.</li><li>Return the CharSet containing the single character <var>c</var>.
</li></ol></emu-alg>
<p>ClassAtomNoDash (<emu-xref href="#sec-classatomnodash" id="_ref_742"><a href="#sec-classatomnodash">21.2.2.18</a></emu-xref>) includes the following additional evaluation rule:</p>
<p>The production <emu-grammar><emu-production name="ClassAtomNoDash" type="lexical" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-ClassAtomNoDash">ClassAtomNoDash</a></emu-nt><emu-geq>::</emu-geq><emu-rhs a="dc7c5bc4"><emu-t>\</emu-t><emu-gann>[lookahead = <emu-t>c</emu-t>]</emu-gann></emu-rhs>
</emu-production></emu-grammar> evaluates as follows:</p>
<emu-alg><ol><li>Return the CharSet containing the single character <code>\</code> U+005C (REVERSE SOLIDUS).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">This production can only be reached from the sequence <code>\c</code> within a character class where it is not followed by an acceptable control character.</div></emu-note>
<emu-annex id="sec-runtime-semantics-characterrangeorunion-abstract-operation" aoid="CharacterRangeOrUnion">
<h1><span class="secnum">B.1.4.4.1</span>Runtime Semantics: CharacterRangeOrUnion ( <var>A</var>, <var>B</var> )</h1>
<p>The abstract operation CharacterRangeOrUnion takes two CharSet parameters <var>A</var> and <var>B</var> and performs the following steps:</p>
<emu-alg><ol><li>If <var>Unicode</var> is <emu-val>false</emu-val>, then<ol><li>If <var>A</var> does not contain exactly one character or <var>B</var> does not contain exactly one character, then<ol><li>Let <var>C</var> be the CharSet containing the single character <code>-</code> U+002D (HYPHEN-MINUS).</li><li>Return the union of CharSets <var>A</var>, <var>B</var> and <var>C</var>.</li></ol></li></ol></li><li>Return <emu-xref aoid="CharacterRange" id="_ref_8642"><a href="#sec-runtime-semantics-characterrange-abstract-operation">CharacterRange</a></emu-xref>(<var>A</var>, <var>B</var>).
</li></ol></emu-alg>
</emu-annex>
</emu-annex>
</emu-annex>
</emu-annex>
<emu-annex id="sec-additional-built-in-properties">
<h1><span class="secnum">B.2</span>Additional Built-in Properties</h1>
<p>When the ECMAScript host is a web browser the following additional properties of the standard built-in objects are defined.</p>
<emu-annex id="sec-additional-properties-of-the-global-object">
<h1><span class="secnum">B.2.1</span>Additional Properties of the Global Object</h1>
<p>The entries in <emu-xref href="#table-60" id="_ref_743"><a href="#table-60">Table 83</a></emu-xref> are added to <emu-xref href="#table-7" id="_ref_744"><a href="#table-7">Table 7</a></emu-xref>.</p>
<emu-table id="table-60" caption="Additional Well-known Intrinsic Objects"><figure><figcaption>Table 83: Additional Well-known Intrinsic Objects</figcaption>
<table>
<tbody>
<tr>
<th>
Intrinsic Name
</th>
<th>
Global Name
</th>
<th>
ECMAScript Language Association
</th>
</tr>
<tr>
<td>
<emu-xref href="#sec-escape-string" id="_ref_8643"><a href="#sec-escape-string">%escape%</a></emu-xref>
</td>
<td>
<code>escape</code>
</td>
<td>
The <code>escape</code> function (<emu-xref href="#sec-escape-string" id="_ref_745"><a href="#sec-escape-string">B.2.1.1</a></emu-xref>)
</td>
</tr>
<tr>
<td>
<emu-xref href="#sec-unescape-string" id="_ref_8644"><a href="#sec-unescape-string">%unescape%</a></emu-xref>
</td>
<td>
<code>unescape</code>
</td>
<td>
The <code>unescape</code> function (<emu-xref href="#sec-unescape-string" id="_ref_746"><a href="#sec-unescape-string">B.2.1.2</a></emu-xref>)
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<emu-annex id="sec-escape-string">
<h1><span class="secnum">B.2.1.1</span>escape ( <var>string</var> )</h1>
<p>The <code>escape</code> function is a property of the <emu-xref href="#sec-global-object" id="_ref_8645"><a href="#sec-global-object">global object</a></emu-xref>. It computes a new version of a String value in which certain code units have been replaced by a hexadecimal escape sequence.</p>
<p>For those code units being replaced whose value is <code>0x00FF</code> or less, a two-digit escape sequence of the form <code>%<var>xx</var></code> is used. For those characters being replaced whose code unit value is greater than <code>0x00FF</code>, a four-digit escape sequence of the form <code>%u<var>xxxx</var></code> is used.</p>
<p>The <code>escape</code> function is the <dfn>%escape%</dfn> intrinsic object. When the <code>escape</code> function is called with one argument <var>string</var>, the following steps are taken:</p>
<emu-alg><ol><li>Set <var>string</var> to ?&nbsp;<emu-xref aoid="ToString" id="_ref_8646"><a href="#sec-tostring">ToString</a></emu-xref>(<var>string</var>).</li><li>Let <var>length</var> be the number of code units in <var>string</var>.</li><li>Let <var>R</var> be the empty string.</li><li>Let <var>k</var> be 0.</li><li>Repeat, while <var>k</var> &lt; <var>length</var>,<ol><li>Let <var>char</var> be the code unit (represented as a 16-bit unsigned integer) at index <var>k</var> within <var>string</var>.</li><li>If <var>char</var> is one of the code units in <code>"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@*_+-./"</code>, then<ol><li>Let <var>S</var> be the String value containing the single code unit <var>char</var>.</li></ol></li><li>Else if <var>char</var> ≥ 256, then<ol><li>Let <var>n</var> be the numeric value of <var>char</var>.</li><li>Let <var>S</var> be the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_8647"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of:<ul><li><code>"%u"</code></li><li>the String representation of <var>n</var>, formatted as a four-digit uppercase hexadecimal number, padded to the left with zeroes if necessary</li></ul></li></ol></li><li>Else <var>char</var> &lt; 256,<ol><li>Let <var>n</var> be the numeric value of <var>char</var>.</li><li>Let <var>S</var> be the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_8648"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of:<ul><li><code>"%"</code></li><li>the String representation of <var>n</var>, formatted as a two-digit uppercase hexadecimal number, padded to the left with a zero if necessary</li></ul></li></ol></li><li>Set <var>R</var> to the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_8649"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of the previous value of <var>R</var> and <var>S</var>.</li><li>Increase <var>k</var> by 1.</li></ol></li><li>Return <var>R</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The encoding is partly based on the encoding described in
RFC 1738, but the entire encoding specified in this standard is
described above without regard to the contents of RFC 1738. This
encoding does not reflect changes to RFC 1738 made by RFC 3986.</p>
</div></emu-note>
</emu-annex>
<emu-annex id="sec-unescape-string">
<h1><span class="secnum">B.2.1.2</span>unescape ( <var>string</var> )</h1>
<p>The <code>unescape</code> function is a property of the <emu-xref href="#sec-global-object" id="_ref_8650"><a href="#sec-global-object">global object</a></emu-xref>. It computes a new version of a String value in which each escape sequence of the sort that might be introduced by the <code>escape</code> function is replaced with the code unit that it represents.</p>
<p>The <code>unescape</code> function is the <dfn>%unescape%</dfn> intrinsic object. When the <code>unescape</code> function is called with one argument <var>string</var>, the following steps are taken:</p>
<emu-alg><ol><li>Set <var>string</var> to ?&nbsp;<emu-xref aoid="ToString" id="_ref_8651"><a href="#sec-tostring">ToString</a></emu-xref>(<var>string</var>).</li><li>Let <var>length</var> be the number of code units in <var>string</var>.</li><li>Let <var>R</var> be the empty String.</li><li>Let <var>k</var> be 0.</li><li>Repeat, while <var>k</var> ≠ <var>length</var><ol><li>Let <var>c</var> be the code unit at index <var>k</var> within <var>string</var>.</li><li>If <var>c</var> is the code unit 0x0025 (PERCENT SIGN), then<ol><li>If <var>k</var> ≤ <var>length</var> - 6 and the code unit at index <var>k</var> + 1 within <var>string</var> is the code unit 0x0075 (LATIN SMALL LETTER U) and the four code units at indices <var>k</var> + 2, <var>k</var> + 3, <var>k</var> + 4, and <var>k</var> + 5 within <var>string</var> are all hexadecimal digits, then<ol><li>Set <var>c</var> to the code unit whose value is the integer represented by the four hexadecimal digits at indices <var>k</var> + 2, <var>k</var> + 3, <var>k</var> + 4, and <var>k</var> + 5 within <var>string</var>.</li><li>Increase <var>k</var> by 5.</li></ol></li><li>Else if <var>k</var> ≤ <var>length</var> - 3 and the two code units at indices <var>k</var> + 1 and <var>k</var> + 2 within <var>string</var> are both hexadecimal digits, then<ol><li>Set <var>c</var> to the code unit whose value is the integer represented by two zeroes plus the two hexadecimal digits at indices <var>k</var> + 1 and <var>k</var> + 2 within <var>string</var>.</li><li>Increase <var>k</var> by 2.</li></ol></li></ol></li><li>Set <var>R</var> to the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_8652"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of the previous value of <var>R</var> and <var>c</var>.</li><li>Increase <var>k</var> by 1.</li></ol></li><li>Return <var>R</var>.
</li></ol></emu-alg>
</emu-annex>
</emu-annex>
<emu-annex id="sec-additional-properties-of-the-object.prototype-object">
<h1><span class="secnum">B.2.2</span>Additional Properties of the Object.prototype Object</h1>
<emu-annex id="sec-object.prototype.__proto__">
<h1><span class="secnum">B.2.2.1</span>Object.prototype.__proto__</h1>
<p>Object.prototype.__proto__ is an <emu-xref href="#sec-object-type" id="_ref_8653"><a href="#sec-object-type">accessor property</a></emu-xref> with attributes { [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }. The [[Get]] and [[Set]] attributes are defined as follows:</p>
<emu-annex id="sec-get-object.prototype.__proto__">
<h1><span class="secnum">B.2.2.1.1</span>get Object.prototype.__proto__</h1>
<p>The value of the [[Get]] attribute is a built-in function that requires no arguments. It performs the following steps:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_8654"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Return ? <var>O</var>.[[GetPrototypeOf]]().
</li></ol></emu-alg>
</emu-annex>
<emu-annex id="sec-set-object.prototype.__proto__">
<h1><span class="secnum">B.2.2.1.2</span>set Object.prototype.__proto__</h1>
<p>The value of the [[Set]] attribute is a built-in function that takes an argument <var>proto</var>. It performs the following steps:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="RequireObjectCoercible" id="_ref_8655"><a href="#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>If <emu-xref aoid="Type" id="_ref_8656"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>proto</var>) is neither Object nor Null, return <emu-val>undefined</emu-val>.</li><li>If <emu-xref aoid="Type" id="_ref_8657"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, return <emu-val>undefined</emu-val>.</li><li>Let <var>status</var> be ? <var>O</var>.[[SetPrototypeOf]](<var>proto</var>).</li><li>If <var>status</var> is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return <emu-val>undefined</emu-val>.
</li></ol></emu-alg>
</emu-annex>
</emu-annex>
<emu-annex id="sec-object.prototype.__defineGetter__">
<h1><span class="secnum">B.2.2.2</span>Object.prototype.__defineGetter__ ( <var>P</var>, <var>getter</var> )</h1>
<p>When the <code>__defineGetter__</code> method is called with arguments <var>P</var> and <var>getter</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_8658"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>If <emu-xref aoid="IsCallable" id="_ref_8659"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>getter</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>desc</var> be PropertyDescriptor { [[Get]]: <var>getter</var>, [[Enumerable]]: <emu-val>true</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</li><li>Let <var>key</var> be ?&nbsp;<emu-xref aoid="ToPropertyKey" id="_ref_8660"><a href="#sec-topropertykey">ToPropertyKey</a></emu-xref>(<var>P</var>).</li><li>Perform ?&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_8661"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>O</var>, <var>key</var>, <var>desc</var>).</li><li>Return <emu-val>undefined</emu-val>.
</li></ol></emu-alg>
</emu-annex>
<emu-annex id="sec-object.prototype.__defineSetter__">
<h1><span class="secnum">B.2.2.3</span>Object.prototype.__defineSetter__ ( <var>P</var>, <var>setter</var> )</h1>
<p>When the <code>__defineSetter__</code> method is called with arguments <var>P</var> and <var>setter</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_8662"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>If <emu-xref aoid="IsCallable" id="_ref_8663"><a href="#sec-iscallable">IsCallable</a></emu-xref>(<var>setter</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>desc</var> be PropertyDescriptor { [[Set]]: <var>setter</var>, [[Enumerable]]: <emu-val>true</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.</li><li>Let <var>key</var> be ?&nbsp;<emu-xref aoid="ToPropertyKey" id="_ref_8664"><a href="#sec-topropertykey">ToPropertyKey</a></emu-xref>(<var>P</var>).</li><li>Perform ?&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_8665"><a href="#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>O</var>, <var>key</var>, <var>desc</var>).</li><li>Return <emu-val>undefined</emu-val>.
</li></ol></emu-alg>
</emu-annex>
<emu-annex id="sec-object.prototype.__lookupGetter__">
<h1><span class="secnum">B.2.2.4</span>Object.prototype.__lookupGetter__ ( <var>P</var> )</h1>
<p>When the <code>__lookupGetter__</code> method is called with argument <var>P</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_8666"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>key</var> be ?&nbsp;<emu-xref aoid="ToPropertyKey" id="_ref_8667"><a href="#sec-topropertykey">ToPropertyKey</a></emu-xref>(<var>P</var>).</li><li>Repeat,<ol><li>Let <var>desc</var> be ? <var>O</var>.[[GetOwnProperty]](<var>key</var>).</li><li>If <var>desc</var> is not <emu-val>undefined</emu-val>, then<ol><li>If <emu-xref aoid="IsAccessorDescriptor" id="_ref_8668"><a href="#sec-isaccessordescriptor">IsAccessorDescriptor</a></emu-xref>(<var>desc</var>) is <emu-val>true</emu-val>, return <var>desc</var>.[[Get]].</li><li>Return <emu-val>undefined</emu-val>.</li></ol></li><li>Set <var>O</var> to ? <var>O</var>.[[GetPrototypeOf]]().</li><li>If <var>O</var> is <emu-val>null</emu-val>, return <emu-val>undefined</emu-val>.
</li></ol></li></ol></emu-alg>
</emu-annex>
<emu-annex id="sec-object.prototype.__lookupSetter__">
<h1><span class="secnum">B.2.2.5</span>Object.prototype.__lookupSetter__ ( <var>P</var> )</h1>
<p>When the <code>__lookupSetter__</code> method is called with argument <var>P</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_8669"><a href="#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>key</var> be ?&nbsp;<emu-xref aoid="ToPropertyKey" id="_ref_8670"><a href="#sec-topropertykey">ToPropertyKey</a></emu-xref>(<var>P</var>).</li><li>Repeat,<ol><li>Let <var>desc</var> be ? <var>O</var>.[[GetOwnProperty]](<var>key</var>).</li><li>If <var>desc</var> is not <emu-val>undefined</emu-val>, then<ol><li>If <emu-xref aoid="IsAccessorDescriptor" id="_ref_8671"><a href="#sec-isaccessordescriptor">IsAccessorDescriptor</a></emu-xref>(<var>desc</var>) is <emu-val>true</emu-val>, return <var>desc</var>.[[Set]].</li><li>Return <emu-val>undefined</emu-val>.</li></ol></li><li>Set <var>O</var> to ? <var>O</var>.[[GetPrototypeOf]]().</li><li>If <var>O</var> is <emu-val>null</emu-val>, return <emu-val>undefined</emu-val>.
</li></ol></li></ol></emu-alg>
</emu-annex>
</emu-annex>
<emu-annex id="sec-additional-properties-of-the-string.prototype-object">
<h1><span class="secnum">B.2.3</span>Additional Properties of the String.prototype Object</h1>
<emu-annex id="sec-string.prototype.substr">
<h1><span class="secnum">B.2.3.1</span>String.prototype.substr ( <var>start</var>, <var>length</var> )</h1>
<p>The <code>substr</code> method takes two arguments, <var>start</var> and <var>length</var>, and returns a substring of the result of converting the <emu-val>this</emu-val> object to a String, starting from index <var>start</var> and running for <var>length</var> code units (or through the end of the String if <var>length</var> is <emu-val>undefined</emu-val>). If <var>start</var> is negative, it is treated as <emu-eqn class="inline"><var>sourceLength</var> + <var>start</var></emu-eqn> where <var>sourceLength</var> is the length of the String. The result is a String value, not a String object. The following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="RequireObjectCoercible" id="_ref_8672"><a href="#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>S</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_8673"><a href="#sec-tostring">ToString</a></emu-xref>(<var>O</var>).</li><li>Let <var>intStart</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_8674"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>start</var>).</li><li>If <var>length</var> is <emu-val>undefined</emu-val>, let <var>end</var> be <emu-val>+∞</emu-val>; otherwise let <var>end</var> be ?&nbsp;<emu-xref aoid="ToInteger" id="_ref_8675"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>length</var>).</li><li>Let <var>size</var> be the number of code units in <var>S</var>.</li><li>If <var>intStart</var> &lt; 0, set <var>intStart</var> to <emu-xref aoid="max" id="_ref_8676"><a href="#eqn-max">max</a></emu-xref>(<var>size</var> + <var>intStart</var>, 0).</li><li>Let <var>resultLength</var> be <emu-xref aoid="min" id="_ref_8677"><a href="#eqn-min">min</a></emu-xref>(<emu-xref aoid="max" id="_ref_8678"><a href="#eqn-max">max</a></emu-xref>(<var>end</var>, 0), <var>size</var> - <var>intStart</var>).</li><li>If <var>resultLength</var> ≤ 0, return the empty String <code>""</code>.</li><li>Return the String value containing <var>resultLength</var> consecutive code units from <var>S</var> beginning with the code unit at index <var>intStart</var>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <code>substr</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be a String object. Therefore it can be transferred to other kinds of objects for use as a method.</p>
</div></emu-note>
</emu-annex>
<emu-annex id="sec-string.prototype.anchor">
<h1><span class="secnum">B.2.3.2</span>String.prototype.anchor ( <var>name</var> )</h1>
<p>When the <code>anchor</code> method is called with argument <var>name</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>S</var> be the <emu-val>this</emu-val> value.</li><li>Return ?&nbsp;<emu-xref aoid="CreateHTML" id="_ref_8679"><a href="#sec-createhtml">CreateHTML</a></emu-xref>(<var>S</var>, <code>"a"</code>, <code>"name"</code>, <var>name</var>).
</li></ol></emu-alg>
<emu-annex id="sec-createhtml" aoid="CreateHTML">
<h1><span class="secnum">B.2.3.2.1</span>Runtime Semantics: CreateHTML ( <var>string</var>, <var>tag</var>, <var>attribute</var>, <var>value</var> )</h1>
<p>The abstract operation CreateHTML is called with arguments <var>string</var>, <var>tag</var>, <var>attribute</var>, and <var>value</var>. The arguments <var>tag</var> and <var>attribute</var> must be String values. The following steps are taken:</p>
<emu-alg><ol><li>Let <var>str</var> be ?&nbsp;<emu-xref aoid="RequireObjectCoercible" id="_ref_8680"><a href="#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<var>string</var>).</li><li>Let <var>S</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_8681"><a href="#sec-tostring">ToString</a></emu-xref>(<var>str</var>).</li><li>Let <var>p1</var> be the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_8682"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <code>"&lt;"</code> and <var>tag</var>.</li><li>If <var>attribute</var> is not the empty String, then<ol><li>Let <var>V</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_8683"><a href="#sec-tostring">ToString</a></emu-xref>(<var>value</var>).</li><li>Let <var>escapedV</var> be the String value that is the same as <var>V</var> except that each occurrence of the code unit 0x0022 (QUOTATION MARK) in <var>V</var> has been replaced with the six code unit sequence <code>"&amp;quot;"</code>.</li><li>Set <var>p1</var> to the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_8684"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of:<ul><li><var>p1</var></li><li>the code unit 0x0020 (SPACE)</li><li><var>attribute</var></li><li>the code unit 0x003D (EQUALS SIGN)</li><li>the code unit 0x0022 (QUOTATION MARK)</li><li><var>escapedV</var></li><li>the code unit 0x0022 (QUOTATION MARK)</li></ul></li></ol></li><li>Let <var>p2</var> be the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_8685"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>p1</var> and <code>"&gt;"</code>.</li><li>Let <var>p3</var> be the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_8686"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>p2</var> and <var>S</var>.</li><li>Let <var>p4</var> be the <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_8687"><a href="#sec-ecmascript-language-types-string-type">string-concatenation</a></emu-xref> of <var>p3</var>, <code>"&lt;/"</code>, <var>tag</var>, and <code>"&gt;"</code>.</li><li>Return <var>p4</var>.
</li></ol></emu-alg>
</emu-annex>
</emu-annex>
<emu-annex id="sec-string.prototype.big">
<h1><span class="secnum">B.2.3.3</span>String.prototype.big ( )</h1>
<p>When the <code>big</code> method is called with no arguments, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>S</var> be the <emu-val>this</emu-val> value.</li><li>Return ?&nbsp;<emu-xref aoid="CreateHTML" id="_ref_8688"><a href="#sec-createhtml">CreateHTML</a></emu-xref>(<var>S</var>, <code>"big"</code>, <code>""</code>, <code>""</code>).
</li></ol></emu-alg>
</emu-annex>
<emu-annex id="sec-string.prototype.blink">
<h1><span class="secnum">B.2.3.4</span>String.prototype.blink ( )</h1>
<p>When the <code>blink</code> method is called with no arguments, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>S</var> be the <emu-val>this</emu-val> value.</li><li>Return ?&nbsp;<emu-xref aoid="CreateHTML" id="_ref_8689"><a href="#sec-createhtml">CreateHTML</a></emu-xref>(<var>S</var>, <code>"blink"</code>, <code>""</code>, <code>""</code>).
</li></ol></emu-alg>
</emu-annex>
<emu-annex id="sec-string.prototype.bold">
<h1><span class="secnum">B.2.3.5</span>String.prototype.bold ( )</h1>
<p>When the <code>bold</code> method is called with no arguments, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>S</var> be the <emu-val>this</emu-val> value.</li><li>Return ?&nbsp;<emu-xref aoid="CreateHTML" id="_ref_8690"><a href="#sec-createhtml">CreateHTML</a></emu-xref>(<var>S</var>, <code>"b"</code>, <code>""</code>, <code>""</code>).
</li></ol></emu-alg>
</emu-annex>
<emu-annex id="sec-string.prototype.fixed">
<h1><span class="secnum">B.2.3.6</span>String.prototype.fixed ( )</h1>
<p>When the <code>fixed</code> method is called with no arguments, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>S</var> be the <emu-val>this</emu-val> value.</li><li>Return ?&nbsp;<emu-xref aoid="CreateHTML" id="_ref_8691"><a href="#sec-createhtml">CreateHTML</a></emu-xref>(<var>S</var>, <code>"tt"</code>, <code>""</code>, <code>""</code>).
</li></ol></emu-alg>
</emu-annex>
<emu-annex id="sec-string.prototype.fontcolor">
<h1><span class="secnum">B.2.3.7</span>String.prototype.fontcolor ( <var>color</var> )</h1>
<p>When the <code>fontcolor</code> method is called with argument <var>color</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>S</var> be the <emu-val>this</emu-val> value.</li><li>Return ?&nbsp;<emu-xref aoid="CreateHTML" id="_ref_8692"><a href="#sec-createhtml">CreateHTML</a></emu-xref>(<var>S</var>, <code>"font"</code>, <code>"color"</code>, <var>color</var>).
</li></ol></emu-alg>
</emu-annex>
<emu-annex id="sec-string.prototype.fontsize">
<h1><span class="secnum">B.2.3.8</span>String.prototype.fontsize ( <var>size</var> )</h1>
<p>When the <code>fontsize</code> method is called with argument <var>size</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>S</var> be the <emu-val>this</emu-val> value.</li><li>Return ?&nbsp;<emu-xref aoid="CreateHTML" id="_ref_8693"><a href="#sec-createhtml">CreateHTML</a></emu-xref>(<var>S</var>, <code>"font"</code>, <code>"size"</code>, <var>size</var>).
</li></ol></emu-alg>
</emu-annex>
<emu-annex id="sec-string.prototype.italics">
<h1><span class="secnum">B.2.3.9</span>String.prototype.italics ( )</h1>
<p>When the <code>italics</code> method is called with no arguments, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>S</var> be the <emu-val>this</emu-val> value.</li><li>Return ?&nbsp;<emu-xref aoid="CreateHTML" id="_ref_8694"><a href="#sec-createhtml">CreateHTML</a></emu-xref>(<var>S</var>, <code>"i"</code>, <code>""</code>, <code>""</code>).
</li></ol></emu-alg>
</emu-annex>
<emu-annex id="sec-string.prototype.link">
<h1><span class="secnum">B.2.3.10</span>String.prototype.link ( <var>url</var> )</h1>
<p>When the <code>link</code> method is called with argument <var>url</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>S</var> be the <emu-val>this</emu-val> value.</li><li>Return ?&nbsp;<emu-xref aoid="CreateHTML" id="_ref_8695"><a href="#sec-createhtml">CreateHTML</a></emu-xref>(<var>S</var>, <code>"a"</code>, <code>"href"</code>, <var>url</var>).
</li></ol></emu-alg>
</emu-annex>
<emu-annex id="sec-string.prototype.small">
<h1><span class="secnum">B.2.3.11</span>String.prototype.small ( )</h1>
<p>When the <code>small</code> method is called with no arguments, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>S</var> be the <emu-val>this</emu-val> value.</li><li>Return ?&nbsp;<emu-xref aoid="CreateHTML" id="_ref_8696"><a href="#sec-createhtml">CreateHTML</a></emu-xref>(<var>S</var>, <code>"small"</code>, <code>""</code>, <code>""</code>).
</li></ol></emu-alg>
</emu-annex>
<emu-annex id="sec-string.prototype.strike">
<h1><span class="secnum">B.2.3.12</span>String.prototype.strike ( )</h1>
<p>When the <code>strike</code> method is called with no arguments, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>S</var> be the <emu-val>this</emu-val> value.</li><li>Return ?&nbsp;<emu-xref aoid="CreateHTML" id="_ref_8697"><a href="#sec-createhtml">CreateHTML</a></emu-xref>(<var>S</var>, <code>"strike"</code>, <code>""</code>, <code>""</code>).
</li></ol></emu-alg>
</emu-annex>
<emu-annex id="sec-string.prototype.sub">
<h1><span class="secnum">B.2.3.13</span>String.prototype.sub ( )</h1>
<p>When the <code>sub</code> method is called with no arguments, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>S</var> be the <emu-val>this</emu-val> value.</li><li>Return ?&nbsp;<emu-xref aoid="CreateHTML" id="_ref_8698"><a href="#sec-createhtml">CreateHTML</a></emu-xref>(<var>S</var>, <code>"sub"</code>, <code>""</code>, <code>""</code>).
</li></ol></emu-alg>
</emu-annex>
<emu-annex id="sec-string.prototype.sup">
<h1><span class="secnum">B.2.3.14</span>String.prototype.sup ( )</h1>
<p>When the <code>sup</code> method is called with no arguments, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>S</var> be the <emu-val>this</emu-val> value.</li><li>Return ?&nbsp;<emu-xref aoid="CreateHTML" id="_ref_8699"><a href="#sec-createhtml">CreateHTML</a></emu-xref>(<var>S</var>, <code>"sup"</code>, <code>""</code>, <code>""</code>).
</li></ol></emu-alg>
</emu-annex>
<emu-annex id="String.prototype.trimleft">
<h1><span class="secnum">B.2.3.15</span>String.prototype.trimLeft ( )</h1>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The property <code>trimStart</code> is preferred. The <code>trimLeft</code> property is provided principally for compatibility with old code. It is recommended that the <code>trimStart</code> property be used in new ECMAScript code.</p>
</div></emu-note>
<p>The initial value of the <code>trimLeft</code> property is the same <emu-xref href="#function-object" id="_ref_8700"><a href="#function-object">function object</a></emu-xref> as the initial value of the <code>String.prototype.trimStart</code> property.</p>
</emu-annex>
<emu-annex id="String.prototype.trimright">
<h1><span class="secnum">B.2.3.16</span>String.prototype.trimRight ( )</h1>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The property <code>trimEnd</code> is preferred. The <code>trimRight</code> property is provided principally for compatibility with old code. It is recommended that the <code>trimEnd</code> property be used in new ECMAScript code.</p>
</div></emu-note>
<p>The initial value of the <code>trimRight</code> property is the same <emu-xref href="#function-object" id="_ref_8701"><a href="#function-object">function object</a></emu-xref> as the initial value of the <code>String.prototype.trimEnd</code> property.</p>
</emu-annex>
</emu-annex>
<emu-annex id="sec-additional-properties-of-the-date.prototype-object">
<h1><span class="secnum">B.2.4</span>Additional Properties of the Date.prototype Object</h1>
<emu-annex id="sec-date.prototype.getyear">
<h1><span class="secnum">B.2.4.1</span>Date.prototype.getYear ( )</h1>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <code>getFullYear</code> method is preferred for nearly all purposes, because it avoids the “year 2000 problem.”</p>
</div></emu-note>
<p>When the <code>getYear</code> method is called with no arguments, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>t</var> be ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_8702"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>If <var>t</var> is <emu-val>NaN</emu-val>, return <emu-val>NaN</emu-val>.</li><li>Return <emu-xref aoid="YearFromTime" id="_ref_8703"><a href="#eqn-YearFromTime">YearFromTime</a></emu-xref>(<emu-xref aoid="LocalTime" id="_ref_8704"><a href="#sec-localtime">LocalTime</a></emu-xref>(<var>t</var>)) - 1900.
</li></ol></emu-alg>
</emu-annex>
<emu-annex id="sec-date.prototype.setyear">
<h1><span class="secnum">B.2.4.2</span>Date.prototype.setYear ( <var>year</var> )</h1>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <code>setFullYear</code> method is preferred for nearly all purposes, because it avoids the “year 2000 problem.”</p>
</div></emu-note>
<p>When the <code>setYear</code> method is called with one argument <var>year</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>t</var> be ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_8705"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>If <var>t</var> is <emu-val>NaN</emu-val>, set <var>t</var> to <emu-val>+0</emu-val>; otherwise, set <var>t</var> to <emu-xref aoid="LocalTime" id="_ref_8706"><a href="#sec-localtime">LocalTime</a></emu-xref>(<var>t</var>).</li><li>Let <var>y</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_8707"><a href="#sec-tonumber">ToNumber</a></emu-xref>(<var>year</var>).</li><li>If <var>y</var> is <emu-val>NaN</emu-val>, then<ol><li>Set the [[DateValue]] internal slot of <emu-xref href="#this-Date-object" id="_ref_8708"><a href="#this-Date-object">this Date object</a></emu-xref> to <emu-val>NaN</emu-val>.</li><li>Return <emu-val>NaN</emu-val>.</li></ol></li><li>Let <var>yi</var> be !&nbsp;<emu-xref aoid="ToInteger" id="_ref_8709"><a href="#sec-tointeger">ToInteger</a></emu-xref>(<var>y</var>).</li><li>If 0 ≤ <var>yi</var> ≤ 99, let <var>yyyy</var> be <var>yi</var> + 1900.</li><li>Else, let <var>yyyy</var> be <var>y</var>.</li><li>Let <var>d</var> be <emu-xref aoid="MakeDay" id="_ref_8710"><a href="#sec-makeday">MakeDay</a></emu-xref>(<var>yyyy</var>, <emu-xref aoid="MonthFromTime" id="_ref_8711"><a href="#eqn-MonthFromTime">MonthFromTime</a></emu-xref>(<var>t</var>), <emu-xref aoid="DateFromTime" id="_ref_8712"><a href="#sec-date-number">DateFromTime</a></emu-xref>(<var>t</var>)).</li><li>Let <var>date</var> be <emu-xref aoid="UTC" id="_ref_8713"><a href="#sec-utc-t">UTC</a></emu-xref>(<emu-xref aoid="MakeDate" id="_ref_8714"><a href="#sec-makedate">MakeDate</a></emu-xref>(<var>d</var>, <emu-xref aoid="TimeWithinDay" id="_ref_8715"><a href="#eqn-TimeWithinDay">TimeWithinDay</a></emu-xref>(<var>t</var>))).</li><li>Set the [[DateValue]] internal slot of <emu-xref href="#this-Date-object" id="_ref_8716"><a href="#this-Date-object">this Date object</a></emu-xref> to <emu-xref aoid="TimeClip" id="_ref_8717"><a href="#sec-timeclip">TimeClip</a></emu-xref>(<var>date</var>).</li><li>Return the value of the [[DateValue]] internal slot of <emu-xref href="#this-Date-object" id="_ref_8718"><a href="#this-Date-object">this Date object</a></emu-xref>.
</li></ol></emu-alg>
</emu-annex>
<emu-annex id="sec-date.prototype.togmtstring">
<h1><span class="secnum">B.2.4.3</span>Date.prototype.toGMTString ( )</h1>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The property <code>toUTCString</code> is preferred. The <code>toGMTString</code> property is provided principally for compatibility with old code. It is recommended that the <code>toUTCString</code> property be used in new ECMAScript code.</p>
</div></emu-note>
<p>The <emu-xref href="#function-object" id="_ref_8719"><a href="#function-object">function object</a></emu-xref> that is the initial value of <code>Date.prototype.toGMTString</code> is the same <emu-xref href="#function-object" id="_ref_8720"><a href="#function-object">function object</a></emu-xref> that is the initial value of <code>Date.prototype.toUTCString</code>.</p>
</emu-annex>
</emu-annex>
<emu-annex id="sec-additional-properties-of-the-regexp.prototype-object">
<h1><span class="secnum">B.2.5</span>Additional Properties of the RegExp.prototype Object</h1>
<emu-annex id="sec-regexp.prototype.compile">
<h1><span class="secnum">B.2.5.1</span>RegExp.prototype.compile ( <var>pattern</var>, <var>flags</var> )</h1>
<p>When the <code>compile</code> method is called with arguments <var>pattern</var> and <var>flags</var>, the following steps are taken:</p>
<emu-alg><ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_8721"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object or <emu-xref aoid="Type" id="_ref_8722"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is Object and <var>O</var> does not have a [[RegExpMatcher]] internal slot, then<ol><li>Throw a <emu-val>TypeError</emu-val> exception.</li></ol></li><li>If <emu-xref aoid="Type" id="_ref_8723"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>pattern</var>) is Object and <var>pattern</var> has a [[RegExpMatcher]] internal slot, then<ol><li>If <var>flags</var> is not <emu-val>undefined</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>P</var> be <var>pattern</var>.[[OriginalSource]].</li><li>Let <var>F</var> be <var>pattern</var>.[[OriginalFlags]].</li></ol></li><li>Else,<ol><li>Let <var>P</var> be <var>pattern</var>.</li><li>Let <var>F</var> be <var>flags</var>.</li></ol></li><li>Return ?&nbsp;<emu-xref aoid="RegExpInitialize" id="_ref_8724"><a href="#sec-regexpinitialize">RegExpInitialize</a></emu-xref>(<var>O</var>, <var>P</var>, <var>F</var>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <code>compile</code> method completely reinitializes the <emu-val>this</emu-val>
object RegExp with a new pattern and flags. An implementation may
interpret use of this method as an assertion that the resulting RegExp
object will be used multiple times and hence is a candidate for extra
optimization.</p>
</div></emu-note>
</emu-annex>
</emu-annex>
</emu-annex>
<emu-annex id="sec-other-additional-features">
<h1><span class="secnum">B.3</span>Other Additional Features</h1>
<emu-annex id="sec-__proto__-property-names-in-object-initializers">
<h1><span class="secnum">B.3.1</span>__proto__ Property Names in Object Initializers</h1>
<p>The following Early Error rule is added to those in <emu-xref href="#sec-object-initializer-static-semantics-early-errors" id="_ref_747"><a href="#sec-object-initializer-static-semantics-early-errors">12.2.6.1</a></emu-xref>. When <emu-nt id="_ref_15061"><a href="#prod-annexB-ObjectLiteral">ObjectLiteral</a></emu-nt> appears in a context where <emu-nt id="_ref_15062"><a href="#prod-ObjectAssignmentPattern">ObjectAssignmentPattern</a></emu-nt> is required the Early Error rule is <b>not</b> applied. In addition, it is not applied when initially parsing a <emu-nt id="_ref_15063"><a href="#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt> or a <emu-nt id="_ref_15064"><a href="#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt>.</p>
<emu-grammar><emu-production name="ObjectLiteral" collapsed="" id="prod-annexB-ObjectLiteral">
<emu-nt><a href="#prod-annexB-ObjectLiteral">ObjectLiteral</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="1bef8ed3"><emu-t>{</emu-t><emu-nt id="_ref_15065"><a href="#prod-PropertyDefinitionList">PropertyDefinitionList</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production>
<emu-production name="ObjectLiteral" collapsed="">
<emu-nt><a href="#prod-annexB-ObjectLiteral">ObjectLiteral</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="8703527f"><emu-t>{</emu-t><emu-nt id="_ref_15066"><a href="#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 PropertyNameList of <emu-nt id="_ref_15067"><a href="#prod-PropertyDefinitionList">PropertyDefinitionList</a></emu-nt> contains any duplicate entries for <code>"__proto__"</code> and at least two of those entries were obtained from productions of the form <emu-grammar><emu-production name="PropertyDefinition" collapsed="" id="prod-annexB-PropertyDefinition" class=" inline">
<emu-nt><a href="#prod-annexB-PropertyDefinition">PropertyDefinition</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f2d90b76"><emu-nt id="_ref_15068"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>:</emu-t><emu-nt id="_ref_15069"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>.
</li>
</ul>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8725"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> returned by PropertyNameList does not include string literal property names defined as using a <emu-nt id="_ref_15070"><a href="#prod-ComputedPropertyName">ComputedPropertyName</a></emu-nt>.</p>
</div></emu-note>
<p>In <emu-xref href="#sec-object-initializer-runtime-semantics-propertydefinitionevaluation" id="_ref_748"><a href="#sec-object-initializer-runtime-semantics-propertydefinitionevaluation">12.2.6.8</a></emu-xref> the PropertyDefinitionEvaluation algorithm for the production
<br>
<emu-grammar><emu-production name="PropertyDefinition" collapsed="" class=" inline">
<emu-nt><a href="#prod-annexB-PropertyDefinition">PropertyDefinition</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f2d90b76"><emu-nt id="_ref_15071"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>:</emu-t><emu-nt id="_ref_15072"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<br>
is replaced with the following definition:</p>
<emu-grammar><emu-production name="PropertyDefinition" collapsed="">
<emu-nt><a href="#prod-annexB-PropertyDefinition">PropertyDefinition</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="f2d90b76"><emu-nt id="_ref_15073"><a href="#prod-PropertyName">PropertyName</a></emu-nt><emu-t>:</emu-t><emu-nt id="_ref_15074"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>propKey</var> be the result of evaluating <emu-nt id="_ref_15075"><a href="#prod-PropertyName">PropertyName</a></emu-nt>.</li><li><emu-xref aoid="ReturnIfAbrupt" id="_ref_8726"><a href="#sec-returnifabrupt">ReturnIfAbrupt</a></emu-xref>(<var>propKey</var>).</li><li>If <var>propKey</var> is the String value <code>"__proto__"</code> and if IsComputedPropertyKey(<emu-nt id="_ref_15076"><a href="#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_8727"><a href="#sec-isanonymousfunctiondefinition">IsAnonymousFunctionDefinition</a></emu-xref>(<emu-nt id="_ref_15077"><a href="#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 the result of performing NamedEvaluation for <emu-nt id="_ref_15078"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt> with argument <var>propKey</var>.</li></ol></li><li>Else,<ol><li>Let <var>exprValueRef</var> be the result of evaluating <emu-nt id="_ref_15079"><a href="#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Let <var>propValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_8728"><a href="#sec-getvalue">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 <emu-xref aoid="Type" id="_ref_8729"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>propValue</var>) is either Object or Null, then<ol><li>Return <var>object</var>.[[SetPrototypeOf]](<var>propValue</var>).</li></ol></li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_8730"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).</li></ol></li><li><emu-xref href="#assert" id="_ref_8731"><a href="#assert">Assert</a></emu-xref>: <var>enumerable</var> is <emu-val>true</emu-val>.</li><li><emu-xref href="#assert" id="_ref_8732"><a href="#assert">Assert</a></emu-xref>: <var>object</var> is an ordinary, extensible object with no non-configurable properties.</li><li>Return !&nbsp;<emu-xref aoid="CreateDataPropertyOrThrow" id="_ref_8733"><a href="#sec-createdatapropertyorthrow">CreateDataPropertyOrThrow</a></emu-xref>(<var>object</var>, <var>propKey</var>, <var>propValue</var>).
</li></ol></emu-alg>
</emu-annex>
<emu-annex id="sec-labelled-function-declarations">
<h1><span class="secnum">B.3.2</span>Labelled Function Declarations</h1>
<p>Prior to ECMAScript 2015, the specification of <emu-nt id="_ref_15080"><a href="#prod-LabelledStatement">LabelledStatement</a></emu-nt> did not allow for the association of a statement label with a <emu-nt id="_ref_15081"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>. However, a labelled <emu-nt id="_ref_15082"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt> was an allowable extension for <emu-xref href="#non-strict-code" id="_ref_8734"><a href="#non-strict-code">non-strict code</a></emu-xref> and most browser-hosted ECMAScript implementations supported that extension. In ECMAScript 2015, the grammar productions for <emu-nt id="_ref_15083"><a href="#prod-LabelledStatement">LabelledStatement</a></emu-nt> permits use of <emu-nt id="_ref_15084"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt> as a <emu-nt id="_ref_15085"><a href="#prod-annexB-LabelledItem">LabelledItem</a></emu-nt> but <emu-xref href="#sec-labelled-statements-static-semantics-early-errors" id="_ref_749"><a href="#sec-labelled-statements-static-semantics-early-errors">13.13.1</a></emu-xref>
includes an Early Error rule that produces a Syntax Error if that
occurs. For web browser compatibility, that rule is modified with the
addition of the <ins>highlighted</ins> text:</p>
<emu-grammar><emu-production name="LabelledItem" collapsed="" id="prod-annexB-LabelledItem">
<emu-nt><a href="#prod-annexB-LabelledItem">LabelledItem</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="fa7a943c"><emu-nt id="_ref_15086"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if any <ins>strict mode</ins> source code matches this rule.
</li>
</ul>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <emu-xref href="#early-error" id="_ref_8735"><a href="#early-error">early error</a></emu-xref> rules for <emu-nt id="_ref_15087"><a href="#prod-WithStatement">WithStatement</a></emu-nt>, <emu-nt id="_ref_15088"><a href="#prod-annexB-IfStatement">IfStatement</a></emu-nt>, and <emu-nt id="_ref_15089"><a href="#prod-annexB-IterationStatement">IterationStatement</a></emu-nt> prevent these statements from containing a labelled <emu-nt id="_ref_15090"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt> in <emu-xref href="#non-strict-code" id="_ref_8736"><a href="#non-strict-code">non-strict code</a></emu-xref>.</p>
</div></emu-note>
</emu-annex>
<emu-annex id="sec-block-level-function-declarations-web-legacy-compatibility-semantics">
<h1><span class="secnum">B.3.3</span>Block-Level Function Declarations Web Legacy Compatibility Semantics</h1>
<p>Prior to ECMAScript 2015, the ECMAScript specification did not define the occurrence of a <emu-nt id="_ref_15091"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt> as an element of a <emu-nt id="_ref_15092"><a href="#prod-annexB-Block">Block</a></emu-nt> statement's <emu-nt id="_ref_15093"><a href="#prod-StatementList">StatementList</a></emu-nt>. However, support for that form of <emu-nt id="_ref_15094"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>
was an allowable extension and most browser-hosted ECMAScript
implementations permitted them. Unfortunately, the semantics of such
declarations differ among those implementations. Because of these
semantic differences, existing web ECMAScript code that uses <emu-nt id="_ref_15095"><a href="#prod-annexB-Block">Block</a></emu-nt>
level function declarations is only portable among browser
implementation if the usage only depends upon the semantic intersection
of all of the browser implementations for such declarations. The
following are the use cases that fall within that intersection
semantics:</p>
<ol>
<li>
<p>A function is declared and only referenced within a single block</p>
<ul>
<li>
One or more <emu-nt id="_ref_15096"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>s whose <emu-nt id="_ref_15097"><a href="#prod-annexB-BindingIdentifier">BindingIdentifier</a></emu-nt> is the name <var>f</var> occur within the function code of an enclosing function <var>g</var> and that declaration is nested within a <emu-nt id="_ref_15098"><a href="#prod-annexB-Block">Block</a></emu-nt>.
</li>
<li>
No other declaration of <var>f</var> that is not a <code>var</code> declaration occurs within the function code of <var>g</var>
</li>
<li>
All occurrences of <var>f</var> as an <emu-nt id="_ref_15099"><a href="#prod-IdentifierReference">IdentifierReference</a></emu-nt> are within the <emu-nt id="_ref_15100"><a href="#prod-StatementList">StatementList</a></emu-nt> of the <emu-nt id="_ref_15101"><a href="#prod-annexB-Block">Block</a></emu-nt> containing the declaration of <var>f</var>.
</li>
</ul>
</li>
<li>
<p>A function is declared and possibly used within a single <emu-nt id="_ref_15102"><a href="#prod-annexB-Block">Block</a></emu-nt> but also referenced by an inner function definition that is not contained within that same <emu-nt id="_ref_15103"><a href="#prod-annexB-Block">Block</a></emu-nt>.</p>
<ul>
<li>
One or more <emu-nt id="_ref_15104"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>s whose <emu-nt id="_ref_15105"><a href="#prod-annexB-BindingIdentifier">BindingIdentifier</a></emu-nt> is the name <var>f</var> occur within the function code of an enclosing function <var>g</var> and that declaration is nested within a <emu-nt id="_ref_15106"><a href="#prod-annexB-Block">Block</a></emu-nt>.
</li>
<li>
No other declaration of <var>f</var> that is not a <code>var</code> declaration occurs within the function code of <var>g</var>
</li>
<li>
There may be occurrences of <var>f</var> as an <emu-nt id="_ref_15107"><a href="#prod-IdentifierReference">IdentifierReference</a></emu-nt> within the <emu-nt id="_ref_15108"><a href="#prod-StatementList">StatementList</a></emu-nt> of the <emu-nt id="_ref_15109"><a href="#prod-annexB-Block">Block</a></emu-nt> containing the declaration of <var>f</var>.
</li>
<li>
There is at least one occurrence of <var>f</var> as an <emu-nt id="_ref_15110"><a href="#prod-IdentifierReference">IdentifierReference</a></emu-nt> within another function <var>h</var> that is nested within <var>g</var> and no other declaration of <var>f</var> shadows the references to <var>f</var> from within <var>h</var>.
</li>
<li>
All invocations of <var>h</var> occur after the declaration of <var>f</var> has been evaluated.
</li>
</ul>
</li>
<li>
<p>A function is declared and possibly used within a single block but also referenced within subsequent blocks.</p>
<ul>
<li>
One or more <emu-nt id="_ref_15111"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt> whose <emu-nt id="_ref_15112"><a href="#prod-annexB-BindingIdentifier">BindingIdentifier</a></emu-nt> is the name <var>f</var> occur within the function code of an enclosing function <var>g</var> and that declaration is nested within a <emu-nt id="_ref_15113"><a href="#prod-annexB-Block">Block</a></emu-nt>.
</li>
<li>
No other declaration of <var>f</var> that is not a <code>var</code> declaration occurs within the function code of <var>g</var>
</li>
<li>
There may be occurrences of <var>f</var> as an <emu-nt id="_ref_15114"><a href="#prod-IdentifierReference">IdentifierReference</a></emu-nt> within the <emu-nt id="_ref_15115"><a href="#prod-StatementList">StatementList</a></emu-nt> of the <emu-nt id="_ref_15116"><a href="#prod-annexB-Block">Block</a></emu-nt> containing the declaration of <var>f</var>.
</li>
<li>
There is at least one occurrence of <var>f</var> as an <emu-nt id="_ref_15117"><a href="#prod-IdentifierReference">IdentifierReference</a></emu-nt> within the function code of <var>g</var> that lexically follows the <emu-nt id="_ref_15118"><a href="#prod-annexB-Block">Block</a></emu-nt> containing the declaration of <var>f</var>.
</li>
</ul>
</li>
</ol>
<p>The first use case is interoperable with the semantics of <emu-nt id="_ref_15119"><a href="#prod-annexB-Block">Block</a></emu-nt>
level function declarations provided by ECMAScript 2015. Any
pre-existing ECMAScript code that employs that use case will operate
using the Block level function declarations semantics defined by clauses
9, 13, and 14 of this specification.</p>
<p>ECMAScript 2015 interoperability for the second and third use cases requires the following extensions to the clause <emu-xref href="#sec-ordinary-and-exotic-objects-behaviours" id="_ref_750"><a href="#sec-ordinary-and-exotic-objects-behaviours">9</a></emu-xref>, clause <emu-xref href="#sec-ecmascript-language-functions-and-classes" id="_ref_751"><a href="#sec-ecmascript-language-functions-and-classes">14</a></emu-xref>, clause <emu-xref href="#sec-eval-x" id="_ref_752"><a href="#sec-eval-x">18.2.1</a></emu-xref> and clause <emu-xref href="#sec-globaldeclarationinstantiation" id="_ref_753"><a href="#sec-globaldeclarationinstantiation">15.1.11</a></emu-xref> semantics.</p>
<p>If an ECMAScript implementation has a mechanism for reporting
diagnostic warning messages, a warning should be produced when code
contains a <emu-nt id="_ref_15120"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>
for which these compatibility semantics are applied and introduce
observable differences from non-compatibility semantics. For example, if
a var binding is not introduced because its introduction would create
an <emu-xref href="#early-error" id="_ref_8737"><a href="#early-error">early error</a></emu-xref>, a warning message should not be produced.</p>
<emu-annex id="sec-web-compat-functiondeclarationinstantiation">
<h1><span class="secnum">B.3.3.1</span>Changes to FunctionDeclarationInstantiation</h1>
<p>During <emu-xref aoid="FunctionDeclarationInstantiation" id="_ref_8738"><a href="#sec-functiondeclarationinstantiation">FunctionDeclarationInstantiation</a></emu-xref> the following steps are performed in place of step 28:</p>
<emu-alg><ol><li>If <var>strict</var> is <emu-val>false</emu-val>, then<ol><li>For each <emu-nt id="_ref_15121"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt> <var>f</var> that is directly contained in the <emu-nt id="_ref_15122"><a href="#prod-StatementList">StatementList</a></emu-nt> of a <emu-nt id="_ref_15123"><a href="#prod-annexB-Block">Block</a></emu-nt>, <emu-nt id="_ref_15124"><a href="#prod-CaseClause">CaseClause</a></emu-nt>, or <emu-nt id="_ref_15125"><a href="#prod-DefaultClause">DefaultClause</a></emu-nt>, do<ol><li>Let <var>F</var> be StringValue of the <emu-nt id="_ref_15126"><a href="#prod-annexB-BindingIdentifier">BindingIdentifier</a></emu-nt> of <emu-nt id="_ref_15127"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt> <var>f</var>.</li><li>If replacing the <emu-nt id="_ref_15128"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt> <var>f</var> with a <emu-nt id="_ref_15129"><a href="#prod-VariableStatement">VariableStatement</a></emu-nt> that has <var>F</var> as a <emu-nt id="_ref_15130"><a href="#prod-annexB-BindingIdentifier">BindingIdentifier</a></emu-nt> would not produce any Early Errors for <var>func</var> and <var>F</var> is not an element of <var>parameterNames</var>, then<ol><li>NOTE: A var binding for <var>F</var> is only instantiated here if it is neither a VarDeclaredName, the name of a formal parameter, or another <emu-nt id="_ref_15131"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>.</li><li>If <var>initializedBindings</var> does not contain <var>F</var> and <var>F</var> is not <code>"arguments"</code>, then<ol><li>Perform ! <var>varEnvRec</var>.CreateMutableBinding(<var>F</var>, <emu-val>false</emu-val>).</li><li>Perform <var>varEnvRec</var>.InitializeBinding(<var>F</var>, <emu-val>undefined</emu-val>).</li><li>Append <var>F</var> to <var>instantiatedVarNames</var>.</li></ol></li><li>When the <emu-nt id="_ref_15132"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt> <var>f</var> is evaluated, perform the following steps in place of the <emu-nt id="_ref_15133"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt> Evaluation algorithm provided in <emu-xref href="#sec-function-definitions-runtime-semantics-evaluation" id="_ref_754"><a href="#sec-function-definitions-runtime-semantics-evaluation">14.1.22</a></emu-xref>:<ol><li>Let <var>fenv</var> be the <emu-xref href="#running-execution-context" id="_ref_8739"><a href="#running-execution-context">running execution context</a></emu-xref>'s VariableEnvironment.</li><li>Let <var>fenvRec</var> be <var>fenv</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_8740"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref>.</li><li>Let <var>benv</var> be the <emu-xref href="#running-execution-context" id="_ref_8741"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment.</li><li>Let <var>benvRec</var> be <var>benv</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_8742"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref>.</li><li>Let <var>fobj</var> be ! <var>benvRec</var>.GetBindingValue(<var>F</var>, <emu-val>false</emu-val>).</li><li>Perform ! <var>fenvRec</var>.SetMutableBinding(<var>F</var>, <var>fobj</var>, <emu-val>false</emu-val>).</li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_8743"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></li></ol></li></ol></li></ol></li></ol></emu-alg>
</emu-annex>
<emu-annex id="sec-web-compat-globaldeclarationinstantiation">
<h1><span class="secnum">B.3.3.2</span>Changes to GlobalDeclarationInstantiation</h1>
<p>During <emu-xref aoid="GlobalDeclarationInstantiation" id="_ref_8744"><a href="#sec-globaldeclarationinstantiation">GlobalDeclarationInstantiation</a></emu-xref> the following steps are performed in place of step 14:</p>
<emu-alg><ol><li>Let <var>strict</var> be IsStrict of <var>script</var>.</li><li>If <var>strict</var> is <emu-val>false</emu-val>, then<ol><li>Let <var>declaredFunctionOrVarNames</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8745"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Append to <var>declaredFunctionOrVarNames</var> the elements of <var>declaredFunctionNames</var>.</li><li>Append to <var>declaredFunctionOrVarNames</var> the elements of <var>declaredVarNames</var>.</li><li>For each <emu-nt id="_ref_15134"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt> <var>f</var> that is directly contained in the <emu-nt id="_ref_15135"><a href="#prod-StatementList">StatementList</a></emu-nt> of a <emu-nt id="_ref_15136"><a href="#prod-annexB-Block">Block</a></emu-nt>, <emu-nt id="_ref_15137"><a href="#prod-CaseClause">CaseClause</a></emu-nt>, or <emu-nt id="_ref_15138"><a href="#prod-DefaultClause">DefaultClause</a></emu-nt> Contained within <var>script</var>, do<ol><li>Let <var>F</var> be StringValue of the <emu-nt id="_ref_15139"><a href="#prod-annexB-BindingIdentifier">BindingIdentifier</a></emu-nt> of <emu-nt id="_ref_15140"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt> <var>f</var>.</li><li>If replacing the <emu-nt id="_ref_15141"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt> <var>f</var> with a <emu-nt id="_ref_15142"><a href="#prod-VariableStatement">VariableStatement</a></emu-nt> that has <var>F</var> as a <emu-nt id="_ref_15143"><a href="#prod-annexB-BindingIdentifier">BindingIdentifier</a></emu-nt> would not produce any Early Errors for <var>script</var>, then<ol><li>If <var>envRec</var>.HasLexicalDeclaration(<var>F</var>) is <emu-val>false</emu-val>, then<ol><li>Let <var>fnDefinable</var> be ? <var>envRec</var>.CanDeclareGlobalVar(<var>F</var>).</li><li>If <var>fnDefinable</var> is <emu-val>true</emu-val>, then<ol><li>NOTE: A var binding for <var>F</var> is only instantiated here if it is neither a VarDeclaredName nor the name of another <emu-nt id="_ref_15144"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>.</li><li>If <var>declaredFunctionOrVarNames</var> does not contain <var>F</var>, then<ol><li>Perform ? <var>envRec</var>.CreateGlobalVarBinding(<var>F</var>, <emu-val>false</emu-val>).</li><li>Append <var>F</var> to <var>declaredFunctionOrVarNames</var>.</li></ol></li><li>When the <emu-nt id="_ref_15145"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt> <var>f</var> is evaluated, perform the following steps in place of the <emu-nt id="_ref_15146"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt> Evaluation algorithm provided in <emu-xref href="#sec-function-definitions-runtime-semantics-evaluation" id="_ref_755"><a href="#sec-function-definitions-runtime-semantics-evaluation">14.1.22</a></emu-xref>:<ol><li>Let <var>genv</var> be the <emu-xref href="#running-execution-context" id="_ref_8746"><a href="#running-execution-context">running execution context</a></emu-xref>'s VariableEnvironment.</li><li>Let <var>genvRec</var> be <var>genv</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_8747"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref>.</li><li>Let <var>benv</var> be the <emu-xref href="#running-execution-context" id="_ref_8748"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment.</li><li>Let <var>benvRec</var> be <var>benv</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_8749"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref>.</li><li>Let <var>fobj</var> be ! <var>benvRec</var>.GetBindingValue(<var>F</var>, <emu-val>false</emu-val>).</li><li>Perform ? <var>genvRec</var>.SetMutableBinding(<var>F</var>, <var>fobj</var>, <emu-val>false</emu-val>).</li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_8750"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></li></ol></li></ol></li></ol></li></ol></li></ol></li></ol></emu-alg>
</emu-annex>
<emu-annex id="sec-web-compat-evaldeclarationinstantiation">
<h1><span class="secnum">B.3.3.3</span>Changes to EvalDeclarationInstantiation</h1>
<p>During <emu-xref aoid="EvalDeclarationInstantiation" id="_ref_8751"><a href="#sec-evaldeclarationinstantiation">EvalDeclarationInstantiation</a></emu-xref> the following steps are performed in place of step 9:</p>
<emu-alg><ol><li>If <var>strict</var> is <emu-val>false</emu-val>, then<ol><li>Let <var>declaredFunctionOrVarNames</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8752"><a href="#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Append to <var>declaredFunctionOrVarNames</var> the elements of <var>declaredFunctionNames</var>.</li><li>Append to <var>declaredFunctionOrVarNames</var> the elements of <var>declaredVarNames</var>.</li><li>For each <emu-nt id="_ref_15147"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt> <var>f</var> that is directly contained in the <emu-nt id="_ref_15148"><a href="#prod-StatementList">StatementList</a></emu-nt> of a <emu-nt id="_ref_15149"><a href="#prod-annexB-Block">Block</a></emu-nt>, <emu-nt id="_ref_15150"><a href="#prod-CaseClause">CaseClause</a></emu-nt>, or <emu-nt id="_ref_15151"><a href="#prod-DefaultClause">DefaultClause</a></emu-nt> Contained within <var>body</var>, do<ol><li>Let <var>F</var> be StringValue of the <emu-nt id="_ref_15152"><a href="#prod-annexB-BindingIdentifier">BindingIdentifier</a></emu-nt> of <emu-nt id="_ref_15153"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt> <var>f</var>.</li><li>If replacing the <emu-nt id="_ref_15154"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt> <var>f</var> with a <emu-nt id="_ref_15155"><a href="#prod-VariableStatement">VariableStatement</a></emu-nt> that has <var>F</var> as a <emu-nt id="_ref_15156"><a href="#prod-annexB-BindingIdentifier">BindingIdentifier</a></emu-nt> would not produce any Early Errors for <var>body</var>, then<ol><li>Let <var>bindingExists</var> be <emu-val>false</emu-val>.</li><li>Let <var>thisLex</var> be <var>lexEnv</var>.</li><li><emu-xref href="#assert" id="_ref_8753"><a href="#assert">Assert</a></emu-xref>: The following loop will terminate.</li><li>Repeat, while <var>thisLex</var> is not the same as <var>varEnv</var>,<ol><li>Let <var>thisEnvRec</var> be <var>thisLex</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_8754"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref>.</li><li>If <var>thisEnvRec</var> is not an object <emu-xref href="#sec-environment-records" id="_ref_8755"><a href="#sec-environment-records">Environment Record</a></emu-xref>, then<ol><li>If <var>thisEnvRec</var>.HasBinding(<var>F</var>) is <emu-val>true</emu-val>, then<ol><li>Let <var>bindingExists</var> be <emu-val>true</emu-val>.</li></ol></li></ol></li><li>Set <var>thisLex</var> to <var>thisLex</var>'s outer environment reference.</li></ol></li><li>If <var>bindingExists</var> is <emu-val>false</emu-val> and <var>varEnvRec</var> is a global <emu-xref href="#sec-environment-records" id="_ref_8756"><a href="#sec-environment-records">Environment Record</a></emu-xref>, then<ol><li>If <var>varEnvRec</var>.HasLexicalDeclaration(<var>F</var>) is <emu-val>false</emu-val>, then<ol><li>Let <var>fnDefinable</var> be ? <var>varEnvRec</var>.CanDeclareGlobalVar(<var>F</var>).</li></ol></li><li>Else,<ol><li>Let <var>fnDefinable</var> be <emu-val>false</emu-val>.</li></ol></li></ol></li><li>Else,<ol><li>Let <var>fnDefinable</var> be <emu-val>true</emu-val>.</li></ol></li><li>If <var>bindingExists</var> is <emu-val>false</emu-val> and <var>fnDefinable</var> is <emu-val>true</emu-val>, then<ol><li>If <var>declaredFunctionOrVarNames</var> does not contain <var>F</var>, then<ol><li>If <var>varEnvRec</var> is a global <emu-xref href="#sec-environment-records" id="_ref_8757"><a href="#sec-environment-records">Environment Record</a></emu-xref>, then<ol><li>Perform ? <var>varEnvRec</var>.CreateGlobalVarBinding(<var>F</var>, <emu-val>true</emu-val>).</li></ol></li><li>Else,<ol><li>Let <var>bindingExists</var> be <var>varEnvRec</var>.HasBinding(<var>F</var>).</li><li>If <var>bindingExists</var> is <emu-val>false</emu-val>, then<ol><li>Perform ! <var>varEnvRec</var>.CreateMutableBinding(<var>F</var>, <emu-val>true</emu-val>).</li><li>Perform ! <var>varEnvRec</var>.InitializeBinding(<var>F</var>, <emu-val>undefined</emu-val>).</li></ol></li></ol></li><li>Append <var>F</var> to <var>declaredFunctionOrVarNames</var>.</li></ol></li><li>When the <emu-nt id="_ref_15157"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt> <var>f</var> is evaluated, perform the following steps in place of the <emu-nt id="_ref_15158"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt> Evaluation algorithm provided in <emu-xref href="#sec-function-definitions-runtime-semantics-evaluation" id="_ref_756"><a href="#sec-function-definitions-runtime-semantics-evaluation">14.1.22</a></emu-xref>:<ol><li>Let <var>genv</var> be the <emu-xref href="#running-execution-context" id="_ref_8758"><a href="#running-execution-context">running execution context</a></emu-xref>'s VariableEnvironment.</li><li>Let <var>genvRec</var> be <var>genv</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_8759"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref>.</li><li>Let <var>benv</var> be the <emu-xref href="#running-execution-context" id="_ref_8760"><a href="#running-execution-context">running execution context</a></emu-xref>'s LexicalEnvironment.</li><li>Let <var>benvRec</var> be <var>benv</var>'s <emu-xref href="#sec-lexical-environments" id="_ref_8761"><a href="#sec-lexical-environments">EnvironmentRecord</a></emu-xref>.</li><li>Let <var>fobj</var> be ! <var>benvRec</var>.GetBindingValue(<var>F</var>, <emu-val>false</emu-val>).</li><li>Perform ? <var>genvRec</var>.SetMutableBinding(<var>F</var>, <var>fobj</var>, <emu-val>false</emu-val>).</li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_8762"><a href="#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>empty</emu-const>).
</li></ol></li></ol></li></ol></li></ol></li></ol></li></ol></emu-alg>
</emu-annex>
<emu-annex id="sec-block-duplicates-allowed-static-semantics">
<h1><span class="secnum">B.3.3.4</span>Changes to Block Static Semantics: Early Errors</h1>
<p>For web browser compatibility, that rule is modified with the addition of the <ins>highlighted</ins> text:</p>
<emu-grammar><emu-production name="Block" collapsed="" id="prod-annexB-Block">
<emu-nt><a href="#prod-annexB-Block">Block</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="6782c9a7"><emu-t>{</emu-t><emu-nt id="_ref_15159"><a href="#prod-StatementList">StatementList</a></emu-nt><emu-t>}</emu-t></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if the LexicallyDeclaredNames of <emu-nt id="_ref_15160"><a href="#prod-StatementList">StatementList</a></emu-nt> contains any duplicate entries, <ins>unless the source code matching this production is not <emu-xref href="#sec-strict-mode-code" id="_ref_8763"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref> and the duplicate entries are only bound by FunctionDeclarations.</ins>
</li>
</ul>
</emu-annex>
<emu-annex id="sec-switch-duplicates-allowed-static-semantics">
<h1><span class="secnum">B.3.3.5</span>Changes to <code>switch</code> Statement Static Semantics: Early Errors</h1>
<p>For web browser compatibility, that rule is modified with the addition of the <ins>highlighted</ins> text:</p>
<emu-grammar><emu-production name="SwitchStatement" collapsed="" id="prod-annexB-SwitchStatement">
<emu-nt><a href="#prod-annexB-SwitchStatement">SwitchStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="515acffe"><emu-t>switch</emu-t><emu-t>(</emu-t><emu-nt id="_ref_15161"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_15162"><a href="#prod-CaseBlock">CaseBlock</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if the LexicallyDeclaredNames of <emu-nt id="_ref_15163"><a href="#prod-CaseBlock">CaseBlock</a></emu-nt> contains any duplicate entries, <ins>unless the source code matching this production is not <emu-xref href="#sec-strict-mode-code" id="_ref_8764"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref> and the duplicate entries are only bound by FunctionDeclarations.</ins>
</li>
</ul>
</emu-annex>
<emu-annex id="sec-web-compat-blockdeclarationinstantiation">
<h1><span class="secnum">B.3.3.6</span>Changes to BlockDeclarationInstantiation</h1>
<p>During <emu-xref aoid="BlockDeclarationInstantiation" id="_ref_8765"><a href="#sec-blockdeclarationinstantiation">BlockDeclarationInstantiation</a></emu-xref> the following steps are performed in place of step 4.a.ii.1:</p>
<emu-alg><ol><li>If <var>envRec</var>.HasBinding(<var>dn</var>) is <emu-val>false</emu-val>, then<ol><li>Perform ! <var>envRec</var>.CreateMutableBinding(<var>dn</var>, <emu-val>false</emu-val>).
</li></ol></li></ol></emu-alg>
<p>During <emu-xref aoid="BlockDeclarationInstantiation" id="_ref_8766"><a href="#sec-blockdeclarationinstantiation">BlockDeclarationInstantiation</a></emu-xref> the following steps are performed in place of step 4.b.iii:</p>
<emu-alg><ol><li>If <var>envRec</var>.HasBinding(<var>fn</var>) is <emu-val>false</emu-val>, then<ol><li>Perform <var>envRec</var>.InitializeBinding(<var>fn</var>, <var>fo</var>).</li></ol></li><li>Else,<ol><li><emu-xref href="#assert" id="_ref_8767"><a href="#assert">Assert</a></emu-xref>: <var>d</var> is a <emu-nt id="_ref_15164"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a></emu-nt>.</li><li>Perform <var>envRec</var>.SetMutableBinding(<var>fn</var>, <var>fo</var>, <emu-val>false</emu-val>).
</li></ol></li></ol></emu-alg>
</emu-annex>
</emu-annex>
<emu-annex id="sec-functiondeclarations-in-ifstatement-statement-clauses">
<h1><span class="secnum">B.3.4</span>FunctionDeclarations in IfStatement Statement Clauses</h1>
<p>The following augments the <emu-nt id="_ref_15165"><a href="#prod-annexB-IfStatement">IfStatement</a></emu-nt> production in <emu-xref href="#sec-if-statement" id="_ref_757"><a href="#sec-if-statement">13.6</a></emu-xref>:</p>
<emu-grammar type="definition"><emu-production name="IfStatement" params="Yield, Await, Return" id="prod-annexB-IfStatement">
<emu-nt params="Yield, Await, Return"><a href="#prod-annexB-IfStatement">IfStatement</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="de869ed4"><emu-t>if</emu-t><emu-t>(</emu-t><emu-nt params="+In, ?Yield, ?Await" id="_ref_15166"><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ~Default" id="_ref_15167"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a><emu-mods><emu-params>[?Yield, ?Await, ~Default]</emu-params></emu-mods></emu-nt><emu-t>else</emu-t><emu-nt params="?Yield, ?Await, ?Return" id="_ref_15168"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="fd1158c2"><emu-t>if</emu-t><emu-t>(</emu-t><emu-nt params="+In, ?Yield, ?Await" id="_ref_15169"><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return" id="_ref_15170"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt><emu-t>else</emu-t><emu-nt params="?Yield, ?Await, ~Default" id="_ref_15171"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a><emu-mods><emu-params>[?Yield, ?Await, ~Default]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="9c39ab47"><emu-t>if</emu-t><emu-t>(</emu-t><emu-nt params="+In, ?Yield, ?Await" id="_ref_15172"><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ~Default" id="_ref_15173"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a><emu-mods><emu-params>[?Yield, ?Await, ~Default]</emu-params></emu-mods></emu-nt><emu-t>else</emu-t><emu-nt params="?Yield, ?Await, ~Default" id="_ref_15174"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a><emu-mods><emu-params>[?Yield, ?Await, ~Default]</emu-params></emu-mods></emu-nt></emu-rhs>
<emu-rhs a="bb1979f8"><emu-t>if</emu-t><emu-t>(</emu-t><emu-nt params="+In, ?Yield, ?Await" id="_ref_15175"><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ~Default" id="_ref_15176"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a><emu-mods><emu-params>[?Yield, ?Await, ~Default]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<p>This production only applies when parsing <emu-xref href="#non-strict-code" id="_ref_8768"><a href="#non-strict-code">non-strict code</a></emu-xref>. Code matching this production is processed as if each matching occurrence of <emu-nt params="?Yield, ?Await, ~Default" id="_ref_15177"><a href="#prod-FunctionDeclaration">FunctionDeclaration</a><emu-mods><emu-params>[?Yield, ?Await, ~Default]</emu-params></emu-mods></emu-nt> was the sole <emu-nt id="_ref_15178"><a href="#prod-StatementListItem">StatementListItem</a></emu-nt> of a <emu-nt id="_ref_15179"><a href="#prod-BlockStatement">BlockStatement</a></emu-nt> occupying that position in the source code. The semantics of such a synthetic <emu-nt id="_ref_15180"><a href="#prod-BlockStatement">BlockStatement</a></emu-nt> includes the web legacy compatibility semantics specified in <emu-xref href="#sec-block-level-function-declarations-web-legacy-compatibility-semantics" id="_ref_758"><a href="#sec-block-level-function-declarations-web-legacy-compatibility-semantics">B.3.3</a></emu-xref>.</p>
</emu-annex>
<emu-annex id="sec-variablestatements-in-catch-blocks">
<h1><span class="secnum">B.3.5</span>VariableStatements in Catch Blocks</h1>
<p>The content of subclause <emu-xref href="#sec-try-statement-static-semantics-early-errors" id="_ref_759"><a href="#sec-try-statement-static-semantics-early-errors">13.15.1</a></emu-xref> is replaced with the following:</p>
<emu-grammar><emu-production name="Catch" collapsed="" id="prod-annexB-Catch">
<emu-nt><a href="#prod-annexB-Catch">Catch</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ddc13c36"><emu-t>catch</emu-t><emu-t>(</emu-t><emu-nt id="_ref_15181"><a href="#prod-annexB-CatchParameter">CatchParameter</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_15182"><a href="#prod-annexB-Block">Block</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<ul>
<li>
It is a Syntax Error if BoundNames of <emu-nt id="_ref_15183"><a href="#prod-annexB-CatchParameter">CatchParameter</a></emu-nt> contains any duplicate elements.
</li>
<li>
It is a Syntax Error if any element of the BoundNames of <emu-nt id="_ref_15184"><a href="#prod-annexB-CatchParameter">CatchParameter</a></emu-nt> also occurs in the LexicallyDeclaredNames of <emu-nt id="_ref_15185"><a href="#prod-annexB-Block">Block</a></emu-nt>.
</li>
<li>
It is a Syntax Error if any element of the BoundNames of <emu-nt id="_ref_15186"><a href="#prod-annexB-CatchParameter">CatchParameter</a></emu-nt> also occurs in the VarDeclaredNames of <emu-nt id="_ref_15187"><a href="#prod-annexB-Block">Block</a></emu-nt> unless <emu-nt id="_ref_15188"><a href="#prod-annexB-CatchParameter">CatchParameter</a></emu-nt> is <emu-grammar><emu-production name="CatchParameter" collapsed="" id="prod-annexB-CatchParameter" class=" inline">
<emu-nt><a href="#prod-annexB-CatchParameter">CatchParameter</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="50e97238"><emu-nt id="_ref_15189"><a href="#prod-annexB-BindingIdentifier">BindingIdentifier</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>.
</li>
</ul>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <emu-nt id="_ref_15190"><a href="#prod-annexB-Block">Block</a></emu-nt> of a <emu-nt id="_ref_15191"><a href="#prod-annexB-Catch">Catch</a></emu-nt> clause may contain <code>var</code> declarations that bind a name that is also bound by the <emu-nt id="_ref_15192"><a href="#prod-annexB-CatchParameter">CatchParameter</a></emu-nt>.
At runtime, such bindings are instantiated in the
VariableDeclarationEnvironment. They do not shadow the same-named
bindings introduced by the <emu-nt id="_ref_15193"><a href="#prod-annexB-CatchParameter">CatchParameter</a></emu-nt> and hence the <emu-nt id="_ref_15194"><a href="#prod-Initializer">Initializer</a></emu-nt> for such <code>var</code> declarations will assign to the corresponding catch parameter rather than the <code>var</code> binding.</p>
</div></emu-note>
<p>This modified behaviour also applies to <code>var</code> and <code>function</code> declarations introduced by <emu-xref href="#sec-function-calls-runtime-semantics-evaluation" id="_ref_8769"><a href="#sec-function-calls-runtime-semantics-evaluation">direct eval</a></emu-xref> calls contained within the <emu-nt id="_ref_15195"><a href="#prod-annexB-Block">Block</a></emu-nt> of a <emu-nt id="_ref_15196"><a href="#prod-annexB-Catch">Catch</a></emu-nt> clause. This change is accomplished by modifying the algorithm of <emu-xref href="#sec-evaldeclarationinstantiation" id="_ref_760"><a href="#sec-evaldeclarationinstantiation">18.2.1.3</a></emu-xref> as follows:</p>
<p>Step 5.d.ii.2.a.i is replaced by:</p>
<emu-alg type="i"><ol><li>If <var>thisEnvRec</var> is not the <emu-xref href="#sec-environment-records" id="_ref_8770"><a href="#sec-environment-records">Environment Record</a></emu-xref> for a <emu-nt id="_ref_15197"><a href="#prod-annexB-Catch">Catch</a></emu-nt> clause, throw a <emu-val>SyntaxError</emu-val> exception.
</li></ol></emu-alg>
<p>Step 9.d.ii.4.b.i.i is replaced by:</p>
<emu-alg type="i"><ol><li>If <var>thisEnvRec</var> is not the <emu-xref href="#sec-environment-records" id="_ref_8771"><a href="#sec-environment-records">Environment Record</a></emu-xref> for a <emu-nt id="_ref_15198"><a href="#prod-annexB-Catch">Catch</a></emu-nt> clause, let <var>bindingExists</var> be <emu-val>true</emu-val>.
</li></ol></emu-alg>
</emu-annex>
<emu-annex id="sec-initializers-in-forin-statement-heads">
<h1><span class="secnum">B.3.6</span>Initializers in ForIn Statement Heads</h1>
<p>The following augments the <emu-nt id="_ref_15199"><a href="#prod-annexB-IterationStatement">IterationStatement</a></emu-nt> production in <emu-xref href="#sec-iteration-statements" id="_ref_761"><a href="#sec-iteration-statements">13.7</a></emu-xref>:</p>
<emu-grammar type="definition"><emu-production name="IterationStatement" params="Yield, Await, Return" id="prod-annexB-IterationStatement">
<emu-nt params="Yield, Await, Return"><a href="#prod-annexB-IterationStatement">IterationStatement</a><emu-mods><emu-params>[Yield, Await, Return]</emu-params></emu-mods></emu-nt><emu-geq>:</emu-geq><emu-rhs a="a2e02ff2"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt params="?Yield, ?Await" id="_ref_15200"><a href="#prod-annexB-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-nt params="~In, ?Yield, ?Await" id="_ref_15201"><a href="#prod-Initializer">Initializer</a><emu-mods><emu-params>[~In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>in</emu-t><emu-nt params="+In, ?Yield, ?Await" id="_ref_15202"><a href="#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt><emu-t>)</emu-t><emu-nt params="?Yield, ?Await, ?Return" id="_ref_15203"><a href="#prod-Statement">Statement</a><emu-mods><emu-params>[?Yield, ?Await, ?Return]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<p>This production only applies when parsing <emu-xref href="#non-strict-code" id="_ref_8772"><a href="#non-strict-code">non-strict code</a></emu-xref>.</p>
<p>The <emu-xref href="#sec-static-semantic-rules" id="_ref_8773"><a href="#sec-static-semantic-rules">static semantics</a></emu-xref> of ContainsDuplicateLabels in <emu-xref href="#sec-for-in-and-for-of-statements-static-semantics-containsduplicatelabels" id="_ref_762"><a href="#sec-for-in-and-for-of-statements-static-semantics-containsduplicatelabels">13.7.5.3</a></emu-xref> are augmented with the following:</p>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-annexB-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b97d96ca"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_15204"><a href="#prod-annexB-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-nt id="_ref_15205"><a href="#prod-Initializer">Initializer</a></emu-nt><emu-t>in</emu-t><emu-nt id="_ref_15206"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_15207"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ContainsDuplicateLabels of <emu-nt id="_ref_15208"><a href="#prod-Statement">Statement</a></emu-nt> with argument <var>labelSet</var>.
</li></ol></emu-alg>
<p>The <emu-xref href="#sec-static-semantic-rules" id="_ref_8774"><a href="#sec-static-semantic-rules">static semantics</a></emu-xref> of ContainsUndefinedBreakTarget in <emu-xref href="#sec-for-in-and-for-of-statements-static-semantics-containsundefinedbreaktarget" id="_ref_763"><a href="#sec-for-in-and-for-of-statements-static-semantics-containsundefinedbreaktarget">13.7.5.4</a></emu-xref> are augmented with the following:</p>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-annexB-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b97d96ca"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_15209"><a href="#prod-annexB-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-nt id="_ref_15210"><a href="#prod-Initializer">Initializer</a></emu-nt><emu-t>in</emu-t><emu-nt id="_ref_15211"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_15212"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ContainsUndefinedBreakTarget of <emu-nt id="_ref_15213"><a href="#prod-Statement">Statement</a></emu-nt> with argument <var>labelSet</var>.
</li></ol></emu-alg>
<p>The <emu-xref href="#sec-static-semantic-rules" id="_ref_8775"><a href="#sec-static-semantic-rules">static semantics</a></emu-xref> of ContainsUndefinedContinueTarget in <emu-xref href="#sec-for-in-and-for-of-statements-static-semantics-containsundefinedcontinuetarget" id="_ref_764"><a href="#sec-for-in-and-for-of-statements-static-semantics-containsundefinedcontinuetarget">13.7.5.5</a></emu-xref> are augmented with the following:</p>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-annexB-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b97d96ca"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_15214"><a href="#prod-annexB-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-nt id="_ref_15215"><a href="#prod-Initializer">Initializer</a></emu-nt><emu-t>in</emu-t><emu-nt id="_ref_15216"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_15217"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return ContainsUndefinedContinueTarget of <emu-nt id="_ref_15218"><a href="#prod-Statement">Statement</a></emu-nt> with arguments <var>iterationSet</var> and « ».
</li></ol></emu-alg>
<p>The <emu-xref href="#sec-static-semantic-rules" id="_ref_8776"><a href="#sec-static-semantic-rules">static semantics</a></emu-xref> of IsDestructuring in <emu-xref href="#sec-for-in-and-for-of-statements-static-semantics-isdestructuring" id="_ref_765"><a href="#sec-for-in-and-for-of-statements-static-semantics-isdestructuring">13.7.5.6</a></emu-xref> are augmented with the following:</p>
<emu-grammar><emu-production name="BindingIdentifier" id="prod-annexB-BindingIdentifier">
<emu-nt><a href="#prod-annexB-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="06b6ace8"><emu-nt id="_ref_15219"><a href="#prod-Identifier">Identifier</a></emu-nt></emu-rhs>
<emu-rhs a="d1df3360"><emu-t>yield</emu-t></emu-rhs>
<emu-rhs a="857d4354"><emu-t>await</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.
</li></ol></emu-alg>
<p>The <emu-xref href="#sec-static-semantic-rules" id="_ref_8777"><a href="#sec-static-semantic-rules">static semantics</a></emu-xref> of VarDeclaredNames in <emu-xref href="#sec-for-in-and-for-of-statements-static-semantics-vardeclarednames" id="_ref_766"><a href="#sec-for-in-and-for-of-statements-static-semantics-vardeclarednames">13.7.5.7</a></emu-xref> are augmented with the following:</p>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-annexB-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b97d96ca"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_15220"><a href="#prod-annexB-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-nt id="_ref_15221"><a href="#prod-Initializer">Initializer</a></emu-nt><emu-t>in</emu-t><emu-nt id="_ref_15222"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_15223"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>names</var> be the BoundNames of <emu-nt id="_ref_15224"><a href="#prod-annexB-BindingIdentifier">BindingIdentifier</a></emu-nt>.</li><li>Append to <var>names</var> the elements of the VarDeclaredNames of <emu-nt id="_ref_15225"><a href="#prod-Statement">Statement</a></emu-nt>.</li><li>Return <var>names</var>.
</li></ol></emu-alg>
<p>The <emu-xref href="#sec-static-semantic-rules" id="_ref_8778"><a href="#sec-static-semantic-rules">static semantics</a></emu-xref> of VarScopedDeclarations in <emu-xref href="#sec-for-in-and-for-of-statements-static-semantics-varscopeddeclarations" id="_ref_767"><a href="#sec-for-in-and-for-of-statements-static-semantics-varscopeddeclarations">13.7.5.8</a></emu-xref> are augmented with the following:</p>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-annexB-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b97d96ca"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_15226"><a href="#prod-annexB-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-nt id="_ref_15227"><a href="#prod-Initializer">Initializer</a></emu-nt><emu-t>in</emu-t><emu-nt id="_ref_15228"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_15229"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>declarations</var> be a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_8779"><a href="#sec-list-and-record-specification-type">List</a></emu-xref> containing <emu-nt id="_ref_15230"><a href="#prod-annexB-BindingIdentifier">BindingIdentifier</a></emu-nt>.</li><li>Append to <var>declarations</var> the elements of the VarScopedDeclarations of <emu-nt id="_ref_15231"><a href="#prod-Statement">Statement</a></emu-nt>.</li><li>Return <var>declarations</var>.
</li></ol></emu-alg>
<p>The <emu-xref href="#sec-runtime-semantics" id="_ref_8780"><a href="#sec-runtime-semantics">runtime semantics</a></emu-xref> of LabelledEvaluation in <emu-xref href="#sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation" id="_ref_768"><a href="#sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation">13.7.5.11</a></emu-xref> are augmented with the following:</p>
<emu-grammar><emu-production name="IterationStatement" collapsed="">
<emu-nt><a href="#prod-annexB-IterationStatement">IterationStatement</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="b97d96ca"><emu-t>for</emu-t><emu-t>(</emu-t><emu-t>var</emu-t><emu-nt id="_ref_15232"><a href="#prod-annexB-BindingIdentifier">BindingIdentifier</a></emu-nt><emu-nt id="_ref_15233"><a href="#prod-Initializer">Initializer</a></emu-nt><emu-t>in</emu-t><emu-nt id="_ref_15234"><a href="#prod-Expression">Expression</a></emu-nt><emu-t>)</emu-t><emu-nt id="_ref_15235"><a href="#prod-Statement">Statement</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>bindingId</var> be StringValue of <emu-nt id="_ref_15236"><a href="#prod-annexB-BindingIdentifier">BindingIdentifier</a></emu-nt>.</li><li>Let <var>lhs</var> be ?&nbsp;<emu-xref aoid="ResolveBinding" id="_ref_8781"><a href="#sec-resolvebinding">ResolveBinding</a></emu-xref>(<var>bindingId</var>).</li><li>If <emu-xref aoid="IsAnonymousFunctionDefinition" id="_ref_8782"><a href="#sec-isanonymousfunctiondefinition">IsAnonymousFunctionDefinition</a></emu-xref>(<emu-nt id="_ref_15237"><a href="#prod-Initializer">Initializer</a></emu-nt>) is <emu-val>true</emu-val>, then<ol><li>Let <var>value</var> be the result of performing NamedEvaluation for <emu-nt id="_ref_15238"><a href="#prod-Initializer">Initializer</a></emu-nt> with argument <var>bindingId</var>.</li></ol></li><li>Else,<ol><li>Let <var>rhs</var> be the result of evaluating <emu-nt id="_ref_15239"><a href="#prod-Initializer">Initializer</a></emu-nt>.</li><li>Let <var>value</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_8783"><a href="#sec-getvalue">GetValue</a></emu-xref>(<var>rhs</var>).</li></ol></li><li>Perform ?&nbsp;<emu-xref aoid="PutValue" id="_ref_8784"><a href="#sec-putvalue">PutValue</a></emu-xref>(<var>lhs</var>, <var>value</var>).</li><li>Let <var>keyResult</var> be ? <emu-xref aoid="ForIn/OfHeadEvaluation" id="_ref_8785"><a href="#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind">ForIn/OfHeadEvaluation</a></emu-xref>(« », <emu-nt id="_ref_15240"><a href="#prod-Expression">Expression</a></emu-nt>, <emu-const>enumerate</emu-const>).</li><li>Return ? <emu-xref aoid="ForIn/OfBodyEvaluation" id="_ref_8786"><a href="#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset">ForIn/OfBodyEvaluation</a></emu-xref>(<emu-nt id="_ref_15241"><a href="#prod-annexB-BindingIdentifier">BindingIdentifier</a></emu-nt>, <emu-nt id="_ref_15242"><a href="#prod-Statement">Statement</a></emu-nt>, <var>keyResult</var>, <emu-const>enumerate</emu-const>, <emu-const>varBinding</emu-const>, <var>labelSet</var>).
</li></ol></emu-alg>
</emu-annex>
<emu-annex id="sec-IsHTMLDDA-internal-slot">
<h1><span class="secnum">B.3.7</span>The [[IsHTMLDDA]] Internal Slot</h1>
<p>An <dfn>[[IsHTMLDDA]] internal slot</dfn> may exist on implementation-defined objects. Objects with an [[IsHTMLDDA]] internal slot behave like <emu-val>undefined</emu-val> in the <emu-xref href="#sec-toboolean" id="_ref_769"><a href="#sec-toboolean">ToBoolean</a></emu-xref> and <emu-xref href="#sec-abstract-equality-comparison" id="_ref_770"><a href="#sec-abstract-equality-comparison">Abstract Equality Comparison</a></emu-xref> <emu-xref href="#sec-algorithm-conventions-abstract-operations" id="_ref_8787"><a href="#sec-algorithm-conventions-abstract-operations">abstract operations</a></emu-xref> and when used as an operand for the <emu-xref href="#sec-typeof-operator" id="_ref_771"><a href="#sec-typeof-operator"><code>typeof</code> operator</a></emu-xref>.</p>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Objects with an [[IsHTMLDDA]] internal slot are never created by this specification. However, the <a href="https://html.spec.whatwg.org/multipage/obsolete.html#dom-document-all"><code>document.all</code> object</a> in web browsers is a host-created <emu-xref href="#exotic-object" id="_ref_8788"><a href="#exotic-object">exotic object</a></emu-xref>
with this slot that exists for web compatibility purposes. There are no
other known examples of this type of object and implementations should
not create any with the exception of <code>document.all</code>.</p>
</div></emu-note>
<emu-annex id="sec-IsHTMLDDA-internal-slot-to-boolean">
<h1><span class="secnum">B.3.7.1</span>Changes to ToBoolean</h1>
<p>The result column in <emu-xref href="#table-10" id="_ref_772"><a href="#table-10">Table 9</a></emu-xref> for an argument type of Object is replaced with the following algorithm:</p>
<emu-alg><ol><li>If <var>argument</var> has an <emu-xref href="#sec-IsHTMLDDA-internal-slot" id="_ref_8789"><a href="#sec-IsHTMLDDA-internal-slot">[[IsHTMLDDA]] internal slot</a></emu-xref>, return <emu-val>false</emu-val>.</li><li>Return <emu-val>true</emu-val>.
</li></ol></emu-alg>
</emu-annex>
<emu-annex id="sec-IsHTMLDDA-internal-slot-aec">
<h1><span class="secnum">B.3.7.2</span>Changes to Abstract Equality Comparison</h1>
<p>The following steps are inserted after step 3 of the <emu-xref href="#sec-abstract-equality-comparison" id="_ref_773"><a href="#sec-abstract-equality-comparison">Abstract Equality Comparison</a></emu-xref> algorithm:</p>
<emu-alg><ol><li>If <emu-xref aoid="Type" id="_ref_8790"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>x</var>) is Object and <var>x</var> has an <emu-xref href="#sec-IsHTMLDDA-internal-slot" id="_ref_8791"><a href="#sec-IsHTMLDDA-internal-slot">[[IsHTMLDDA]] internal slot</a></emu-xref> and <var>y</var> is either <emu-val>null</emu-val> or <emu-val>undefined</emu-val>, return <emu-val>true</emu-val>.</li><li>If <var>x</var> is either <emu-val>null</emu-val> or <emu-val>undefined</emu-val> and <emu-xref aoid="Type" id="_ref_8792"><a href="#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>y</var>) is Object and <var>y</var> has an <emu-xref href="#sec-IsHTMLDDA-internal-slot" id="_ref_8793"><a href="#sec-IsHTMLDDA-internal-slot">[[IsHTMLDDA]] internal slot</a></emu-xref>, return <emu-val>true</emu-val>.
</li></ol></emu-alg>
</emu-annex>
<emu-annex id="sec-IsHTMLDDA-internal-slot-typeof">
<h1><span class="secnum">B.3.7.3</span>Changes to the <code>typeof</code> Operator</h1>
<p>The following table entry is inserted into <emu-xref href="#table-35" id="_ref_774"><a href="#table-35">Table 35</a></emu-xref> immediately preceeding the entry for "Object (implements [[Call]])":</p>
<emu-table><figure><figcaption>Table 84:
Additional <emu-xref href="#sec-typeof-operator" id="_ref_775"><a href="#sec-typeof-operator"><code>typeof</code></a></emu-xref> Operator Results
</figcaption>
<table>
<tbody>
<tr>
<th>
Type of <var>val</var>
</th>
<th>
Result
</th>
</tr>
<tr>
<td>
Object (has an <emu-xref href="#sec-IsHTMLDDA-internal-slot" id="_ref_8794"><a href="#sec-IsHTMLDDA-internal-slot">[[IsHTMLDDA]] internal slot</a></emu-xref>)
</td>
<td>
<code>"undefined"</code>
</td>
</tr>
</tbody>
</table>
</figure></emu-table>
</emu-annex>
</emu-annex>
</emu-annex>
</emu-annex>
<emu-annex id="sec-strict-mode-of-ecmascript">
<h1><span class="secnum">C</span>The Strict Mode of ECMAScript</h1>
<p><b>The strict mode restriction and exceptions</b></p>
<ul>
<li>
<code>implements</code>, <code>interface</code>, <code>let</code>, <code>package</code>, <code>private</code>, <code>protected</code>, <code>public</code>, <code>static</code>, and <code>yield</code> are reserved words within <emu-xref href="#sec-strict-mode-code" id="_ref_8590"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>. (<emu-xref href="#sec-reserved-words" id="_ref_776"><a href="#sec-reserved-words">11.6.2</a></emu-xref>).
</li>
<li>
A conforming implementation, when processing <emu-xref href="#sec-strict-mode-code" id="_ref_8591"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, must not extend, as described in <emu-xref href="#sec-additional-syntax-numeric-literals" id="_ref_777"><a href="#sec-additional-syntax-numeric-literals">B.1.1</a></emu-xref>, the syntax of <emu-nt id="_ref_15243"><a href="#prod-NumericLiteral">NumericLiteral</a></emu-nt> to include <emu-nt>LegacyOctalIntegerLiteral</emu-nt>, nor extend the syntax of <emu-nt id="_ref_15244"><a href="#prod-DecimalIntegerLiteral">DecimalIntegerLiteral</a></emu-nt> to include <emu-nt>NonOctalDecimalIntegerLiteral</emu-nt>.
</li>
<li>
A conforming implementation, when processing <emu-xref href="#sec-strict-mode-code" id="_ref_8592"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, may not extend the syntax of <emu-nt id="_ref_15245"><a href="#prod-EscapeSequence">EscapeSequence</a></emu-nt> to include <emu-nt>LegacyOctalEscapeSequence</emu-nt> as described in <emu-xref href="#sec-additional-syntax-string-literals" id="_ref_778"><a href="#sec-additional-syntax-string-literals">B.1.2</a></emu-xref>.
</li>
<li>
Assignment to an undeclared identifier or otherwise unresolvable reference does not create a property in the <emu-xref href="#sec-global-object" id="_ref_8593"><a href="#sec-global-object">global object</a></emu-xref>. When a simple assignment occurs within <emu-xref href="#sec-strict-mode-code" id="_ref_8594"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, its <emu-nt id="_ref_15246"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> must not evaluate to an unresolvable <emu-xref href="#sec-reference-specification-type" id="_ref_8595"><a href="#sec-reference-specification-type">Reference</a></emu-xref>. If it does a <emu-val>ReferenceError</emu-val> exception is thrown (<emu-xref href="#sec-putvalue" id="_ref_779"><a href="#sec-putvalue">6.2.4.9</a></emu-xref>). The <emu-nt id="_ref_15247"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> also may not be a reference to a <emu-xref href="#sec-object-type" id="_ref_8596"><a href="#sec-object-type">data property</a></emu-xref> with the attribute value { [[Writable]]: <emu-val>false</emu-val> }, to an <emu-xref href="#sec-object-type" id="_ref_8597"><a href="#sec-object-type">accessor property</a></emu-xref> with the attribute value { [[Set]]: <emu-val>undefined</emu-val> }, nor to a non-existent property of an object whose [[Extensible]] internal slot has the value <emu-val>false</emu-val>. In these cases a <code>TypeError</code> exception is thrown (<emu-xref href="#sec-assignment-operators" id="_ref_780"><a href="#sec-assignment-operators">12.15</a></emu-xref>).
</li>
<li>
An <emu-nt id="_ref_15248"><a href="#prod-IdentifierReference">IdentifierReference</a></emu-nt> with the StringValue <code>"eval"</code> or <code>"arguments"</code> may not appear as the <emu-nt id="_ref_15249"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> of an Assignment operator (<emu-xref href="#sec-assignment-operators" id="_ref_781"><a href="#sec-assignment-operators">12.15</a></emu-xref>) or of an <emu-nt id="_ref_15250"><a href="#prod-UpdateExpression">UpdateExpression</a></emu-nt> (<emu-xref href="#sec-update-expressions" id="_ref_782"><a href="#sec-update-expressions">12.4</a></emu-xref>) or as the <emu-nt id="_ref_15251"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt> operated upon by a Prefix Increment (<emu-xref href="#sec-prefix-increment-operator" id="_ref_783"><a href="#sec-prefix-increment-operator">12.4.6</a></emu-xref>) or a Prefix Decrement (<emu-xref href="#sec-prefix-decrement-operator" id="_ref_784"><a href="#sec-prefix-decrement-operator">12.4.7</a></emu-xref>) operator.
</li>
<li>
Arguments objects for strict functions define a non-configurable <emu-xref href="#sec-object-type" id="_ref_8598"><a href="#sec-object-type">accessor property</a></emu-xref> <code>"callee"</code> which throws a <emu-val>TypeError</emu-val> exception on access (<emu-xref href="#sec-createunmappedargumentsobject" id="_ref_785"><a href="#sec-createunmappedargumentsobject">9.4.4.6</a></emu-xref>).
</li>
<li>
Arguments objects for strict functions do not dynamically share their <emu-xref href="#array-index" id="_ref_786"><a href="#array-index">array-indexed</a></emu-xref> property values with the corresponding formal parameter bindings of their functions. (<emu-xref href="#sec-arguments-exotic-objects" id="_ref_787"><a href="#sec-arguments-exotic-objects">9.4.4</a></emu-xref>).
</li>
<li>
For strict functions, if an arguments object is created the binding of the local identifier <code>arguments</code> to the arguments object is immutable and hence may not be the target of an assignment expression. (<emu-xref href="#sec-functiondeclarationinstantiation" id="_ref_788"><a href="#sec-functiondeclarationinstantiation">9.2.15</a></emu-xref>).
</li>
<li>
It is a <emu-val>SyntaxError</emu-val> if the StringValue of a <emu-nt id="_ref_15252"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt> is <code>"eval"</code> or <code>"arguments"</code> within <emu-xref href="#sec-strict-mode-code" id="_ref_8599"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref> (<emu-xref href="#sec-identifiers-static-semantics-early-errors" id="_ref_789"><a href="#sec-identifiers-static-semantics-early-errors">12.1.1</a></emu-xref>).
</li>
<li>
Strict mode eval code cannot instantiate variables or functions in
the variable environment of the caller to eval. Instead, a new variable
environment is created and that environment is used for declaration
binding instantiation for the eval code (<emu-xref href="#sec-eval-x" id="_ref_790"><a href="#sec-eval-x">18.2.1</a></emu-xref>).
</li>
<li>
If <emu-val>this</emu-val> is evaluated within <emu-xref href="#sec-strict-mode-code" id="_ref_8600"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, then the <emu-val>this</emu-val> value is not coerced to an object. A <emu-val>this</emu-val> value of <emu-val>undefined</emu-val> or <emu-val>null</emu-val> is not converted to the <emu-xref href="#sec-global-object" id="_ref_8601"><a href="#sec-global-object">global object</a></emu-xref> and primitive values are not converted to wrapper objects. The <emu-val>this</emu-val> value passed via a function call (including calls made using <code>Function.prototype.apply</code> and <code>Function.prototype.call</code>) do not coerce the passed this value to an object (<emu-xref href="#sec-ordinarycallbindthis" id="_ref_791"><a href="#sec-ordinarycallbindthis">9.2.1.2</a></emu-xref>, <emu-xref href="#sec-function.prototype.apply" id="_ref_792"><a href="#sec-function.prototype.apply">19.2.3.1</a></emu-xref>, <emu-xref href="#sec-function.prototype.call" id="_ref_793"><a href="#sec-function.prototype.call">19.2.3.3</a></emu-xref>).
</li>
<li>
When a <code>delete</code> operator occurs within <emu-xref href="#sec-strict-mode-code" id="_ref_8602"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, a <emu-val>SyntaxError</emu-val> is thrown if its <emu-nt id="_ref_15253"><a href="#prod-UnaryExpression">UnaryExpression</a></emu-nt> is a direct reference to a variable, function argument, or function name (<emu-xref href="#sec-delete-operator-static-semantics-early-errors" id="_ref_794"><a href="#sec-delete-operator-static-semantics-early-errors">12.5.3.1</a></emu-xref>).
</li>
<li>
When a <code>delete</code> operator occurs within <emu-xref href="#sec-strict-mode-code" id="_ref_8603"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref>, a <emu-val>TypeError</emu-val> is thrown if the property to be deleted has the attribute { [[Configurable]]: <emu-val>false</emu-val> } (<emu-xref href="#sec-delete-operator-runtime-semantics-evaluation" id="_ref_795"><a href="#sec-delete-operator-runtime-semantics-evaluation">12.5.3.2</a></emu-xref>).
</li>
<li>
<emu-xref href="#sec-strict-mode-code" id="_ref_8604"><a href="#sec-strict-mode-code">Strict mode code</a></emu-xref> may not include a <emu-nt id="_ref_15254"><a href="#prod-WithStatement">WithStatement</a></emu-nt>. The occurrence of a <emu-nt id="_ref_15255"><a href="#prod-WithStatement">WithStatement</a></emu-nt> in such a context is a <emu-val>SyntaxError</emu-val> (<emu-xref href="#sec-with-statement-static-semantics-early-errors" id="_ref_796"><a href="#sec-with-statement-static-semantics-early-errors">13.11.1</a></emu-xref>).
</li>
<li>
It is a <emu-val>SyntaxError</emu-val> if a <emu-nt id="_ref_15256"><a href="#prod-CatchParameter">CatchParameter</a></emu-nt> occurs within <emu-xref href="#sec-strict-mode-code" id="_ref_8605"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref> and BoundNames of <emu-nt id="_ref_15257"><a href="#prod-CatchParameter">CatchParameter</a></emu-nt> contains either <code>eval</code> or <code>arguments</code> (<emu-xref href="#sec-try-statement-static-semantics-early-errors" id="_ref_797"><a href="#sec-try-statement-static-semantics-early-errors">13.15.1</a></emu-xref>).
</li>
<li>
It is a <emu-val>SyntaxError</emu-val> if the same <emu-nt id="_ref_15258"><a href="#prod-BindingIdentifier">BindingIdentifier</a></emu-nt> appears more than once in the <emu-nt id="_ref_15259"><a href="#prod-FormalParameters">FormalParameters</a></emu-nt> of a <emu-xref href="#strict-function" id="_ref_8606"><a href="#strict-function">strict function</a></emu-xref>. An attempt to create such a function using a <code>Function</code>, <code>Generator</code>, or <code>AsyncFunction</code> <emu-xref href="#constructor" id="_ref_8607"><a href="#constructor">constructor</a></emu-xref> is a <emu-val>SyntaxError</emu-val> (<emu-xref href="#sec-function-definitions-static-semantics-early-errors" id="_ref_798"><a href="#sec-function-definitions-static-semantics-early-errors">14.1.2</a></emu-xref>, <emu-xref href="#sec-createdynamicfunction" id="_ref_799"><a href="#sec-createdynamicfunction">19.2.1.1.1</a></emu-xref>).
</li>
<li>
An implementation may not extend, beyond that defined in this
specification, the meanings within strict functions of properties named <code>caller</code> or <code>arguments</code> of function instances.
</li>
</ul>
</emu-annex>
<emu-annex id="sec-corrections-and-clarifications-in-ecmascript-2015-with-possible-compatibility-impact">
<h1><span class="secnum">D</span>Corrections and Clarifications in ECMAScript 2015 with Possible Compatibility Impact</h1>
<p><emu-xref href="#sec-candeclareglobalvar" id="_ref_800"><a href="#sec-candeclareglobalvar">8.1.1.4.15</a></emu-xref>-<emu-xref href="#sec-createglobalfunctionbinding" id="_ref_801"><a href="#sec-createglobalfunctionbinding">8.1.1.4.18</a></emu-xref> Edition 5 and 5.1 used a property existence test to determine whether a <emu-xref href="#sec-global-object" id="_ref_8608"><a href="#sec-global-object">global object</a></emu-xref>
property corresponding to a new global declaration already existed.
ECMAScript 2015 uses an own property existence test. This corresponds to
what has been most commonly implemented by web browsers.</p>
<p><emu-xref href="#sec-array-exotic-objects-defineownproperty-p-desc" id="_ref_802"><a href="#sec-array-exotic-objects-defineownproperty-p-desc">9.4.2.1</a></emu-xref>: The 5<sup>th</sup> Edition moved the capture of the current array length prior to the integer conversion of the <emu-xref href="#array-index" id="_ref_8609"><a href="#array-index">array index</a></emu-xref>
or new length value. However, the captured length value could become
invalid if the conversion process has the side-effect of changing the
array length. ECMAScript 2015 specifies that the current array length
must be captured after the possible occurrence of such side-effects.</p>
<p><emu-xref href="#sec-timeclip" id="_ref_803"><a href="#sec-timeclip">20.3.1.14</a></emu-xref>: Previous editions permitted the <emu-xref aoid="TimeClip" id="_ref_8610"><a href="#sec-timeclip">TimeClip</a></emu-xref> abstract operation to return either <emu-val>+0</emu-val> or <emu-val>-0</emu-val> as the representation of a 0 <emu-xref href="#sec-time-values-and-time-range" id="_ref_8611"><a href="#sec-time-values-and-time-range">time value</a></emu-xref>. ECMAScript 2015 specifies that <emu-val>+0</emu-val> always returned. This means that for ECMAScript 2015 the <emu-xref href="#sec-time-values-and-time-range" id="_ref_8612"><a href="#sec-time-values-and-time-range">time value</a></emu-xref> of a Date object is never observably <emu-val>-0</emu-val> and methods that return time values never return <emu-val>-0</emu-val>.</p>
<p><emu-xref href="#sec-date-time-string-format" id="_ref_804"><a href="#sec-date-time-string-format">20.3.1.15</a></emu-xref>:
If a time zone offset is not present, the local time zone is used.
Edition 5.1 incorrectly stated that a missing time zone should be
interpreted as <code>"z"</code>.</p>
<p><emu-xref href="#sec-date.prototype.toisostring" id="_ref_805"><a href="#sec-date.prototype.toisostring">20.3.4.36</a></emu-xref>: If the year cannot be represented using the Date Time String Format specified in <emu-xref href="#sec-date-time-string-format" id="_ref_806"><a href="#sec-date-time-string-format">20.3.1.15</a></emu-xref> a RangeError exception is thrown. Previous editions did not specify the behaviour for that case.</p>
<p><emu-xref href="#sec-date.prototype.tostring" id="_ref_807"><a href="#sec-date.prototype.tostring">20.3.4.41</a></emu-xref>: Previous editions did not specify the value returned by Date.prototype.toString when <emu-xref href="#this-time-value" id="_ref_8613"><a href="#this-time-value">this time value</a></emu-xref> is <emu-val>NaN</emu-val>. ECMAScript 2015 specifies the result to be the String value is <code>"Invalid Date"</code>.</p>
<p><emu-xref href="#sec-regexp-pattern-flags" id="_ref_808"><a href="#sec-regexp-pattern-flags">21.2.3.1</a></emu-xref>, <emu-xref href="#sec-escaperegexppattern" id="_ref_809"><a href="#sec-escaperegexppattern">21.2.3.2.4</a></emu-xref>: Any LineTerminator code points in the value of the <code>source</code> property of a RegExp instance must be expressed using an escape sequence. Edition 5.1 only required the escaping of <code>"/"</code>.</p>
<p><emu-xref href="#sec-regexp.prototype-@@match" id="_ref_810"><a href="#sec-regexp.prototype-@@match">21.2.5.7</a></emu-xref>, <emu-xref href="#sec-regexp.prototype-@@replace" id="_ref_811"><a href="#sec-regexp.prototype-@@replace">21.2.5.9</a></emu-xref>: In previous editions, the specifications for <code>String.prototype.match</code> and <code>String.prototype.replace</code> was incorrect for cases where the pattern argument was a RegExp value whose <code>global</code> is flag set. The previous specifications stated that for each attempt to match the pattern, if <code>lastIndex</code> did not change it should be incremented by 1. The correct behaviour is that <code>lastIndex</code> should be incremented by one only if the pattern matched the empty string.</p>
<p><emu-xref href="#sec-array.prototype.sort" id="_ref_812"><a href="#sec-array.prototype.sort">22.1.3.27</a></emu-xref>, <emu-xref href="#sec-sortcompare" id="_ref_813"><a href="#sec-sortcompare">22.1.3.27.1</a></emu-xref>: Previous editions did not specify how a <emu-val>NaN</emu-val> value returned by a <var>comparefn</var> was interpreted by <code>Array.prototype.sort</code>. ECMAScript 2015 specifies that such as value is treated as if <emu-val>+0</emu-val> was returned from the <var>comparefn</var>. ECMAScript 2015 also specifies that <emu-xref aoid="ToNumber" id="_ref_8614"><a href="#sec-tonumber">ToNumber</a></emu-xref> is applied to the result returned by a <var>comparefn</var>. In previous editions, the effect of a <var>comparefn</var> result that is not a Number value was implementation-dependent. In practice, implementations call <emu-xref aoid="ToNumber" id="_ref_8615"><a href="#sec-tonumber">ToNumber</a></emu-xref>.</p>
</emu-annex>
<emu-annex id="sec-additions-and-changes-that-introduce-incompatibilities-with-prior-editions">
<h1><span class="secnum">E</span>Additions and Changes That Introduce Incompatibilities with Prior Editions</h1>
<p><emu-xref href="#sec-tonumber-applied-to-the-string-type" id="_ref_814"><a href="#sec-tonumber-applied-to-the-string-type">7.1.3.1</a></emu-xref>: In ECMAScript 2015, <emu-xref aoid="ToNumber" id="_ref_8616"><a href="#sec-tonumber">ToNumber</a></emu-xref> applied to a String value now recognizes and converts <emu-nt id="_ref_15260"><a href="#prod-BinaryIntegerLiteral">BinaryIntegerLiteral</a></emu-nt> and <emu-nt id="_ref_15261"><a href="#prod-OctalIntegerLiteral">OctalIntegerLiteral</a></emu-nt> numeric strings. In previous editions such strings were converted to <emu-val>NaN</emu-val>.</p>
<p><emu-xref href="#sec-reference-specification-type" id="_ref_815"><a href="#sec-reference-specification-type">6.2.4</a></emu-xref>: In ECMAScript 2015, Function calls are not allowed to return a <emu-xref href="#sec-reference-specification-type" id="_ref_8617"><a href="#sec-reference-specification-type">Reference</a></emu-xref> value.</p>
<p><emu-xref href="#sec-names-and-keywords" id="_ref_816"><a href="#sec-names-and-keywords">11.6</a></emu-xref>: In ECMAScript 2015, the valid code points for an <emu-nt id="_ref_15262"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt> are specified in terms of the Unicode properties “ID_Start” and “ID_Continue”. In previous editions, the valid <emu-nt id="_ref_15263"><a href="#prod-IdentifierName">IdentifierName</a></emu-nt> or <emu-nt id="_ref_15264"><a href="#prod-Identifier">Identifier</a></emu-nt> code points were specified by enumerating various Unicode code point categories.</p>
<p><emu-xref href="#sec-rules-of-automatic-semicolon-insertion" id="_ref_817"><a href="#sec-rules-of-automatic-semicolon-insertion">11.9.1</a></emu-xref>:
In ECMAScript 2015, Automatic Semicolon Insertion adds a semicolon at
the end of a do-while statement if the semicolon is missing. This change
aligns the specification with the actual behaviour of most existing
implementations.</p>
<p><emu-xref href="#sec-object-initializer-static-semantics-early-errors" id="_ref_818"><a href="#sec-object-initializer-static-semantics-early-errors">12.2.6.1</a></emu-xref>: In ECMAScript 2015, it is no longer an <emu-xref href="#early-error" id="_ref_8618"><a href="#early-error">early error</a></emu-xref> to have duplicate property names in Object Initializers.</p>
<p><emu-xref href="#sec-assignment-operators-static-semantics-early-errors" id="_ref_819"><a href="#sec-assignment-operators-static-semantics-early-errors">12.15.1</a></emu-xref>: In ECMAScript 2015, <emu-xref href="#sec-strict-mode-code" id="_ref_8619"><a href="#sec-strict-mode-code">strict mode code</a></emu-xref> containing an assignment to an immutable binding such as the function name of a <emu-nt id="_ref_15265"><a href="#prod-FunctionExpression">FunctionExpression</a></emu-nt> does not produce an <emu-xref href="#early-error" id="_ref_8620"><a href="#early-error">early error</a></emu-xref>. Instead it produces a runtime error.</p>
<p><emu-xref href="#sec-block" id="_ref_820"><a href="#sec-block">13.2</a></emu-xref>: In ECMAScript 2015, a <emu-nt id="_ref_15266"><a href="#prod-StatementList">StatementList</a></emu-nt> beginning with the token let followed by the input elements <emu-nt id="_ref_15267"><a href="#prod-LineTerminator">LineTerminator</a></emu-nt> then <emu-nt id="_ref_15268"><a href="#prod-Identifier">Identifier</a></emu-nt> is the start of a <emu-nt id="_ref_15269"><a href="#prod-LexicalDeclaration">LexicalDeclaration</a></emu-nt>. In previous editions, automatic semicolon insertion would always insert a semicolon before the <emu-nt id="_ref_15270"><a href="#prod-Identifier">Identifier</a></emu-nt> input element.</p>
<p><emu-xref href="#sec-expression-statement" id="_ref_821"><a href="#sec-expression-statement">13.5</a></emu-xref>: In ECMAScript 2015, a <emu-nt id="_ref_15271"><a href="#prod-StatementListItem">StatementListItem</a></emu-nt> beginning with the token <code>let</code> followed by the token <code>[</code> is the start of a <emu-nt id="_ref_15272"><a href="#prod-LexicalDeclaration">LexicalDeclaration</a></emu-nt>. In previous editions such a sequence would be the start of an <emu-nt id="_ref_15273"><a href="#prod-ExpressionStatement">ExpressionStatement</a></emu-nt>.</p>
<p><emu-xref href="#sec-if-statement-runtime-semantics-evaluation" id="_ref_822"><a href="#sec-if-statement-runtime-semantics-evaluation">13.6.7</a></emu-xref>: In ECMAScript 2015, the normal completion value of an <emu-nt id="_ref_15274"><a href="#prod-IfStatement">IfStatement</a></emu-nt> is never the value <emu-const>empty</emu-const>. If no <emu-nt id="_ref_15275"><a href="#prod-Statement">Statement</a></emu-nt> part is evaluated or if the evaluated <emu-nt id="_ref_15276"><a href="#prod-Statement">Statement</a></emu-nt> part produces a normal completion whose value is <emu-const>empty</emu-const>, the completion value of the <emu-nt id="_ref_15277"><a href="#prod-IfStatement">IfStatement</a></emu-nt> is <emu-val>undefined</emu-val>.</p>
<p><emu-xref href="#sec-iteration-statements" id="_ref_823"><a href="#sec-iteration-statements">13.7</a></emu-xref>: In ECMAScript 2015, if the <code>(</code> token of a for statement is immediately followed by the token sequence <code>let [</code> then the <code>let</code> is treated as the start of a <emu-nt id="_ref_15278"><a href="#prod-LexicalDeclaration">LexicalDeclaration</a></emu-nt>. In previous editions such a token sequence would be the start of an <emu-nt id="_ref_15279"><a href="#prod-Expression">Expression</a></emu-nt>.</p>
<p><emu-xref href="#sec-iteration-statements" id="_ref_824"><a href="#sec-iteration-statements">13.7</a></emu-xref>: In ECMAScript 2015, if the ( token of a for-in statement is immediately followed by the token sequence <code>let [</code> then the <code>let</code> is treated as the start of a <emu-nt id="_ref_15280"><a href="#prod-ForDeclaration">ForDeclaration</a></emu-nt>. In previous editions such a token sequence would be the start of an <emu-nt id="_ref_15281"><a href="#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>.</p>
<p><emu-xref href="#sec-iteration-statements" id="_ref_825"><a href="#sec-iteration-statements">13.7</a></emu-xref>: Prior to ECMAScript 2015, an initialization expression could appear as part of the <emu-nt id="_ref_15282"><a href="#prod-VariableDeclaration">VariableDeclaration</a></emu-nt> that precedes the <code>in</code> keyword. In ECMAScript 2015, the <emu-nt id="_ref_15283"><a href="#prod-ForBinding">ForBinding</a></emu-nt>
in that same position does not allow the occurrence of such an
initializer. In ECMAScript 2017, such an initializer is permitted only
in <emu-xref href="#non-strict-code" id="_ref_8621"><a href="#non-strict-code">non-strict code</a></emu-xref>.</p>
<p><emu-xref href="#sec-iteration-statements" id="_ref_826"><a href="#sec-iteration-statements">13.7</a></emu-xref>: In ECMAScript 2015, the completion value of an <emu-nt id="_ref_15284"><a href="#prod-IterationStatement">IterationStatement</a></emu-nt> is never the value <emu-const>empty</emu-const>. If the <emu-nt id="_ref_15285"><a href="#prod-Statement">Statement</a></emu-nt> part of an <emu-nt id="_ref_15286"><a href="#prod-IterationStatement">IterationStatement</a></emu-nt> is not evaluated or if the final evaluation of the <emu-nt id="_ref_15287"><a href="#prod-Statement">Statement</a></emu-nt> part produces a completion whose value is <emu-const>empty</emu-const>, the completion value of the <emu-nt id="_ref_15288"><a href="#prod-IterationStatement">IterationStatement</a></emu-nt> is <emu-val>undefined</emu-val>.</p>
<p><emu-xref href="#sec-with-statement-runtime-semantics-evaluation" id="_ref_827"><a href="#sec-with-statement-runtime-semantics-evaluation">13.11.7</a></emu-xref>: In ECMAScript 2015, the normal completion value of a <emu-nt id="_ref_15289"><a href="#prod-WithStatement">WithStatement</a></emu-nt> is never the value <emu-const>empty</emu-const>. If evaluation of the <emu-nt id="_ref_15290"><a href="#prod-Statement">Statement</a></emu-nt> part of a <emu-nt id="_ref_15291"><a href="#prod-WithStatement">WithStatement</a></emu-nt> produces a normal completion whose value is <emu-const>empty</emu-const>, the completion value of the <emu-nt id="_ref_15292"><a href="#prod-WithStatement">WithStatement</a></emu-nt> is <emu-val>undefined</emu-val>.</p>
<p><emu-xref href="#sec-switch-statement-runtime-semantics-evaluation" id="_ref_828"><a href="#sec-switch-statement-runtime-semantics-evaluation">13.12.11</a></emu-xref>: In ECMAScript 2015, the completion value of a <emu-nt id="_ref_15293"><a href="#prod-SwitchStatement">SwitchStatement</a></emu-nt> is never the value <emu-const>empty</emu-const>. If the <emu-nt id="_ref_15294"><a href="#prod-CaseBlock">CaseBlock</a></emu-nt> part of a <emu-nt id="_ref_15295"><a href="#prod-SwitchStatement">SwitchStatement</a></emu-nt> produces a completion whose value is <emu-const>empty</emu-const>, the completion value of the <emu-nt id="_ref_15296"><a href="#prod-SwitchStatement">SwitchStatement</a></emu-nt> is <emu-val>undefined</emu-val>.</p>
<p><emu-xref href="#sec-try-statement" id="_ref_829"><a href="#sec-try-statement">13.15</a></emu-xref>: In ECMAScript 2015, it is an <emu-xref href="#early-error" id="_ref_8622"><a href="#early-error">early error</a></emu-xref> for a <emu-nt id="_ref_15297"><a href="#prod-Catch">Catch</a></emu-nt> clause to contain a <code>var</code> declaration for the same <emu-nt id="_ref_15298"><a href="#prod-Identifier">Identifier</a></emu-nt> that appears as the <emu-nt id="_ref_15299"><a href="#prod-Catch">Catch</a></emu-nt>
clause parameter. In previous editions, such a variable declaration
would be instantiated in the enclosing variable environment but the
declaration's <emu-nt id="_ref_15300"><a href="#prod-Initializer">Initializer</a></emu-nt> value would be assigned to the <emu-nt id="_ref_15301"><a href="#prod-Catch">Catch</a></emu-nt> parameter.</p>
<p><emu-xref href="#sec-try-statement" id="_ref_830"><a href="#sec-try-statement">13.15</a></emu-xref>, <emu-xref href="#sec-evaldeclarationinstantiation" id="_ref_831"><a href="#sec-evaldeclarationinstantiation">18.2.1.3</a></emu-xref>: In ECMAScript 2015, a runtime <emu-val>SyntaxError</emu-val> is thrown if a <emu-nt id="_ref_15302"><a href="#prod-Catch">Catch</a></emu-nt> clause evaluates a non-strict direct <code>eval</code> whose eval code includes a <code>var</code> or <code>FunctionDeclaration</code> declaration that binds the same <emu-nt id="_ref_15303"><a href="#prod-Identifier">Identifier</a></emu-nt> that appears as the <emu-nt id="_ref_15304"><a href="#prod-Catch">Catch</a></emu-nt> clause parameter.</p>
<p><emu-xref href="#sec-try-statement-runtime-semantics-evaluation" id="_ref_832"><a href="#sec-try-statement-runtime-semantics-evaluation">13.15.8</a></emu-xref>: In ECMAScript 2015, the completion value of a <emu-nt id="_ref_15305"><a href="#prod-TryStatement">TryStatement</a></emu-nt> is never the value <emu-const>empty</emu-const>. If the <emu-nt id="_ref_15306"><a href="#prod-Block">Block</a></emu-nt> part of a <emu-nt id="_ref_15307"><a href="#prod-TryStatement">TryStatement</a></emu-nt> evaluates to a normal completion whose value is <emu-const>empty</emu-const>, the completion value of the <emu-nt id="_ref_15308"><a href="#prod-TryStatement">TryStatement</a></emu-nt> is <emu-val>undefined</emu-val>. If the <emu-nt id="_ref_15309"><a href="#prod-Block">Block</a></emu-nt> part of a <emu-nt id="_ref_15310"><a href="#prod-TryStatement">TryStatement</a></emu-nt> evaluates to a throw completion and it has a <emu-nt id="_ref_15311"><a href="#prod-Catch">Catch</a></emu-nt> part that evaluates to a normal completion whose value is <emu-const>empty</emu-const>, the completion value of the <emu-nt id="_ref_15312"><a href="#prod-TryStatement">TryStatement</a></emu-nt> is <emu-val>undefined</emu-val> if there is no <emu-nt id="_ref_15313"><a href="#prod-Finally">Finally</a></emu-nt> clause or if its <emu-nt id="_ref_15314"><a href="#prod-Finally">Finally</a></emu-nt> clause evalulates to an <emu-const>empty</emu-const> normal completion.</p>
<p><emu-xref href="#sec-method-definitions-runtime-semantics-propertydefinitionevaluation" id="_ref_833"><a href="#sec-method-definitions-runtime-semantics-propertydefinitionevaluation">14.3.8</a></emu-xref>
In ECMAScript 2015, the function objects that are created as the values
of the [[Get]] or [[Set]] attribute of accessor properties in an <emu-nt id="_ref_15315"><a href="#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> are not <emu-xref href="#constructor" id="_ref_8623"><a href="#constructor">constructor</a></emu-xref> functions and they do not have a <code>prototype</code> own property. In the previous edition, they were constructors and had a <code>prototype</code> property.</p>
<p><emu-xref href="#sec-object.freeze" id="_ref_834"><a href="#sec-object.freeze">19.1.2.6</a></emu-xref>: In ECMAScript 2015, if the argument to <code>Object.freeze</code>
is not an object it is treated as if it was a non-extensible ordinary
object with no own properties. In the previous edition, a non-object
argument always causes a <emu-val>TypeError</emu-val> to be thrown.</p>
<p><emu-xref href="#sec-object.getownpropertydescriptor" id="_ref_835"><a href="#sec-object.getownpropertydescriptor">19.1.2.8</a></emu-xref>: In ECMAScript 2015, if the argument to <code>Object.getOwnPropertyDescriptor</code> is not an object an attempt is made to coerce the argument using <emu-xref aoid="ToObject" id="_ref_8624"><a href="#sec-toobject">ToObject</a></emu-xref>.
If the coercion is successful the result is used in place of the
original argument value. In the previous edition, a non-object argument
always causes a <emu-val>TypeError</emu-val> to be thrown.</p>
<p><emu-xref href="#sec-object.getownpropertynames" id="_ref_836"><a href="#sec-object.getownpropertynames">19.1.2.10</a></emu-xref>: In ECMAScript 2015, if the argument to <code>Object.getOwnPropertyNames</code> is not an object an attempt is made to coerce the argument using <emu-xref aoid="ToObject" id="_ref_8625"><a href="#sec-toobject">ToObject</a></emu-xref>.
If the coercion is successful the result is used in place of the
original argument value. In the previous edition, a non-object argument
always causes a <emu-val>TypeError</emu-val> to be thrown.</p>
<p><emu-xref href="#sec-object.getprototypeof" id="_ref_837"><a href="#sec-object.getprototypeof">19.1.2.12</a></emu-xref>: In ECMAScript 2015, if the argument to <code>Object.getPrototypeOf</code> is not an object an attempt is made to coerce the argument using <emu-xref aoid="ToObject" id="_ref_8626"><a href="#sec-toobject">ToObject</a></emu-xref>.
If the coercion is successful the result is used in place of the
original argument value. In the previous edition, a non-object argument
always causes a <emu-val>TypeError</emu-val> to be thrown.</p>
<p><emu-xref href="#sec-object.isextensible" id="_ref_838"><a href="#sec-object.isextensible">19.1.2.14</a></emu-xref>: In ECMAScript 2015, if the argument to <code>Object.isExtensible</code>
is not an object it is treated as if it was a non-extensible ordinary
object with no own properties. In the previous edition, a non-object
argument always causes a <emu-val>TypeError</emu-val> to be thrown.</p>
<p><emu-xref href="#sec-object.isfrozen" id="_ref_839"><a href="#sec-object.isfrozen">19.1.2.15</a></emu-xref>: In ECMAScript 2015, if the argument to <code>Object.isFrozen</code>
is not an object it is treated as if it was a non-extensible ordinary
object with no own properties. In the previous edition, a non-object
argument always causes a <emu-val>TypeError</emu-val> to be thrown.</p>
<p><emu-xref href="#sec-object.issealed" id="_ref_840"><a href="#sec-object.issealed">19.1.2.16</a></emu-xref>: In ECMAScript 2015, if the argument to <code>Object.isSealed</code>
is not an object it is treated as if it was a non-extensible ordinary
object with no own properties. In the previous edition, a non-object
argument always causes a <emu-val>TypeError</emu-val> to be thrown.</p>
<p><emu-xref href="#sec-object.keys" id="_ref_841"><a href="#sec-object.keys">19.1.2.17</a></emu-xref>: In ECMAScript 2015, if the argument to <code>Object.keys</code> is not an object an attempt is made to coerce the argument using <emu-xref aoid="ToObject" id="_ref_8627"><a href="#sec-toobject">ToObject</a></emu-xref>.
If the coercion is successful the result is used in place of the
original argument value. In the previous edition, a non-object argument
always causes a <emu-val>TypeError</emu-val> to be thrown.</p>
<p><emu-xref href="#sec-object.preventextensions" id="_ref_842"><a href="#sec-object.preventextensions">19.1.2.18</a></emu-xref>: In ECMAScript 2015, if the argument to <code>Object.preventExtensions</code>
is not an object it is treated as if it was a non-extensible ordinary
object with no own properties. In the previous edition, a non-object
argument always causes a <emu-val>TypeError</emu-val> to be thrown.</p>
<p><emu-xref href="#sec-object.seal" id="_ref_843"><a href="#sec-object.seal">19.1.2.20</a></emu-xref>: In ECMAScript 2015, if the argument to <code>Object.seal</code>
is not an object it is treated as if it was a non-extensible ordinary
object with no own properties. In the previous edition, a non-object
argument always causes a <emu-val>TypeError</emu-val> to be thrown.</p>
<p><emu-xref href="#sec-function.prototype.bind" id="_ref_844"><a href="#sec-function.prototype.bind">19.2.3.2</a></emu-xref>: In ECMAScript 2015, the [[Prototype]] internal slot of a <emu-xref href="#sec-bound-function-exotic-objects" id="_ref_8628"><a href="#sec-bound-function-exotic-objects">bound function</a></emu-xref> is set to the [[GetPrototypeOf]] value of its target function. In the previous edition, [[Prototype]] was always set to <emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_8629"><a href="#sec-properties-of-the-function-prototype-object">%FunctionPrototype%</a></emu-xref>.</p>
<p><emu-xref href="#sec-function-instances-length" id="_ref_845"><a href="#sec-function-instances-length">19.2.4.1</a></emu-xref>: In ECMAScript 2015, the <code>"length"</code> property of function instances is configurable. In previous editions it was non-configurable.</p>
<p><emu-xref href="#sec-properties-of-the-nativeerror-constructors" id="_ref_846"><a href="#sec-properties-of-the-nativeerror-constructors">19.5.6.2</a></emu-xref>: In ECMAScript 2015, the [[Prototype]] internal slot of a <var>NativeError</var> <emu-xref href="#constructor" id="_ref_8630"><a href="#constructor">constructor</a></emu-xref> is the Error <emu-xref href="#constructor" id="_ref_8631"><a href="#constructor">constructor</a></emu-xref>. In previous editions it was the Function prototype object.</p>
<p><emu-xref href="#sec-properties-of-the-date-prototype-object" id="_ref_847"><a href="#sec-properties-of-the-date-prototype-object">20.3.4</a></emu-xref>
In ECMAScript 2015, the Date prototype object is not a Date instance.
In previous editions it was a Date instance whose TimeValue was <emu-val>NaN</emu-val>.</p>
<p><emu-xref href="#sec-string.prototype.localecompare" id="_ref_848"><a href="#sec-string.prototype.localecompare">21.1.3.10</a></emu-xref> In ECMAScript 2015, the <code>String.prototype.localeCompare</code>
function must treat Strings that are canonically equivalent according
to the Unicode standard as being identical. In previous editions
implementations were permitted to ignore canonical equivalence and could
instead use a bit-wise comparison.</p>
<p><emu-xref href="#sec-string.prototype.tolowercase" id="_ref_849"><a href="#sec-string.prototype.tolowercase">21.1.3.24</a></emu-xref> and <emu-xref href="#sec-string.prototype.touppercase" id="_ref_850"><a href="#sec-string.prototype.touppercase">21.1.3.26</a></emu-xref>
In ECMAScript 2015, lowercase/upper conversion processing operates on
code points. In previous editions such the conversion processing was
only applied to individual code units. The only affected code points are
those in the Deseret block of Unicode.</p>
<p><emu-xref href="#sec-string.prototype.trim" id="_ref_851"><a href="#sec-string.prototype.trim">21.1.3.27</a></emu-xref> In ECMAScript 2015, the <code>String.prototype.trim</code>
method is defined to recognize white space code points that may exists
outside of the Unicode BMP. However, as of Unicode 7 no such code points
are defined. In previous editions such code points would not have been
recognized as white space.</p>
<p><emu-xref href="#sec-regexp-pattern-flags" id="_ref_852"><a href="#sec-regexp-pattern-flags">21.2.3.1</a></emu-xref> In ECMAScript 2015, If the <var>pattern</var> argument is a RegExp instance and the <var>flags</var> argument is not <emu-val>undefined</emu-val>, a new RegExp instance is created just like <var>pattern</var> except that <var>pattern</var>'s flags are replaced by the argument <var>flags</var>. In previous editions a <emu-val>TypeError</emu-val> exception was thrown when <var>pattern</var> was a RegExp instance and <var>flags</var> was not <emu-val>undefined</emu-val>.</p>
<p><emu-xref href="#sec-properties-of-the-regexp-prototype-object" id="_ref_853"><a href="#sec-properties-of-the-regexp-prototype-object">21.2.5</a></emu-xref>
In ECMAScript 2015, the RegExp prototype object is not a RegExp
instance. In previous editions it was a RegExp instance whose pattern is
the empty string.</p>
<p><emu-xref href="#sec-properties-of-the-regexp-prototype-object" id="_ref_854"><a href="#sec-properties-of-the-regexp-prototype-object">21.2.5</a></emu-xref> In ECMAScript 2015, <code>source</code>, <code>global</code>, <code>ignoreCase</code>, and <code>multiline</code>
are accessor properties defined on the RegExp prototype object. In
previous editions they were data properties defined on RegExp instances.</p>
</emu-annex>
<emu-annex id="sec-colophon">
<h1><span class="secnum">F</span>Colophon</h1>
<p>This specification is authored on <a href="https://github.com/tc39/ecma262">GitHub</a> in a plaintext source format called <a href="https://github.com/bterlson/ecmarkup">Ecmarkup</a>.
Ecmarkup is an HTML and Markdown dialect that provides a framework and
toolset for authoring ECMAScript specifications in plaintext and
processing the specification into a full-featured HTML rendering that
follows the editorial conventions for this document. Ecmarkup builds on
and integrates a number of other formats and technologies including <a href="https://github.com/rbuckton/grammarkdown">Grammarkdown</a> for defining syntax and <a href="https://github.com/domenic/ecmarkdown">Ecmarkdown</a> for authoring algorithm steps. PDF renderings of this specification are produced by printing the HTML rendering to a PDF.</p>
<p>Prior editions of this specification were authored using Word—the
Ecmarkup source text that formed the basis of this edition was produced
by converting the ECMAScript 2015 Word document to Ecmarkup using an
automated conversion tool.</p>
</emu-annex>
<emu-annex id="sec-bibliography">
<h1><span class="secnum">G</span>Bibliography</h1>
<ol>
<li>
IEEE Std 754-2008: <i>IEEE Standard for Floating-Point Arithmetic</i>. Institute of Electrical and Electronic Engineers, New York (2008)
</li>
<li>
<i>The Unicode Standard</i>, available at &lt;<a href="https://unicode.org/versions/latest">https://unicode.org/versions/latest</a>&gt;
</li>
<li>
<i>Unicode Technical Note #5: Canonical Equivalence in Applications</i>, available at &lt;<a href="https://unicode.org/notes/tn5/">https://unicode.org/notes/tn5/</a>&gt;
</li>
<li>
<i>Unicode Technical Standard #10: Unicode Collation Algorithm</i>, available at &lt;<a href="https://unicode.org/reports/tr10/">https://unicode.org/reports/tr10/</a>&gt;
</li>
<li>
<i>Unicode Standard Annex #15, Unicode Normalization Forms</i>, available at &lt;<a href="https://unicode.org/reports/tr15/">https://unicode.org/reports/tr15/</a>&gt;
</li>
<li>
<i>Unicode Standard Annex #18: Unicode Regular Expressions</i>, available at &lt;<a href="https://unicode.org/reports/tr18/">https://unicode.org/reports/tr18/</a>&gt;
</li>
<li>
<i>Unicode Standard Annex #24: Unicode <code>Script</code> Property</i>, available at &lt;<a href="https://unicode.org/reports/tr24/">https://unicode.org/reports/tr24/</a>&gt;
</li>
<li>
<i>Unicode Standard Annex #31, Unicode Identifiers and Pattern Syntax</i>, available at &lt;<a href="https://unicode.org/reports/tr31/">https://unicode.org/reports/tr31/</a>&gt;
</li>
<li>
<i>Unicode Standard Annex #44: Unicode Character Database</i>, available at &lt;<a href="https://unicode.org/reports/tr44/">https://unicode.org/reports/tr44/</a>&gt;
</li>
<li>
<i>Unicode Technical Standard #51: Unicode Emoji</i>, available at &lt;<a href="https://unicode.org/reports/tr51/">https://unicode.org/reports/tr51/</a>&gt;
</li>
<li>
<i>IANA Time Zone Database</i>, available at &lt;<a href="https://www.iana.org/time-zones">https://www.iana.org/time-zones</a>&gt;
</li>
<li>
ISO 8601:2004(E) <i>Data elements and interchange formats Information interchange</i> — <i>Representation of dates and times</i>
</li>
<li>
<i>RFC 1738 “Uniform Resource Locators (URL)”</i>, available at &lt;<a href="https://tools.ietf.org/html/rfc1738">https://tools.ietf.org/html/rfc1738</a>&gt;
</li>
<li>
<i>RFC 2396 “Uniform Resource Identifiers (URI): Generic Syntax”</i>, available at &lt;<a href="https://tools.ietf.org/html/rfc2396">https://tools.ietf.org/html/rfc2396</a>&gt;
</li>
<li>
<i>RFC 3629 “UTF-8, a transformation format of ISO 10646”</i>, available at &lt;<a href="https://tools.ietf.org/html/rfc3629">https://tools.ietf.org/html/rfc3629</a>&gt;
</li>
</ol>
</emu-annex><emu-annex id="sec-copyright-and-software-license">
<h1><span class="secnum">H</span>Copyright &amp; Software License</h1>
<p class="ECMAaddress">Ecma International</p>
<p class="ECMAaddress">Rue du Rhone 114</p>
<p class="ECMAaddress">CH-1204 Geneva</p>
<p class="ECMAaddress">Tel: +41 22 849 6000</p>
<p class="ECMAaddress">Fax: +41 22 849 6001</p>
<p class="ECMAaddress">Web: <a href="https://ecma-international.org/">https://ecma-international.org/</a></p>
<h2>Copyright Notice</h2>
<p>© 2019 Ecma International</p>
<p>This document may be copied, published and distributed to others, and
certain derivative works of it may be prepared, copied, published, and
distributed, in whole or in part, provided that the above copyright
notice and this Copyright License and Disclaimer are included on all
such copies and derivative works. The only derivative works that are
permissible under this Copyright License and Disclaimer are:</p>
<p>(i) works which incorporate all or portion of this document for the
purpose of providing commentary or explanation (such as an annotated
version of the document),</p>
<p>(ii) works which incorporate all or portion of this document for the
purpose of incorporating features that provide accessibility,</p>
<p>(iii) translations of this document into languages other than English and into different formats and</p>
<p>(iv) works by making use of this specification in standard conformant
products by implementing (e.g. by copy and paste wholly or partly) the
functionality therein.</p>
<p>However, the content of this document itself may not be modified in
any way, including by removing the copyright notice or references to
Ecma International, except as required to translate it into languages
other than English or into a different format.</p>
<p>The official version of an Ecma International document is the English
language version on the Ecma International website. In the event of
discrepancies between a translated version and the official version, the
official version shall govern.</p>
<p>The limited permissions granted above are perpetual and will not be revoked by Ecma International or its successors or assigns.</p>
<p>This document and the information contained herein is provided on an
"AS IS" basis and ECMA INTERNATIONAL DISCLAIMS ALL WARRANTIES, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
THE INFORMATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP RIGHTS OR ANY
IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
PURPOSE.</p>
<h2>Software License</h2>
<p>All Software contained in this document ("Software") is
protected by copyright and is being made available under the "BSD
License", included below. This Software may be subject to third party
rights (rights from parties other than Ecma International), including
patent rights, and no licenses under such third party rights are granted
under this license even if the third party concerned is a member of
Ecma International. SEE THE ECMA CODE OF CONDUCT IN PATENT MATTERS
AVAILABLE AT https://ecma-international.org/memento/codeofconduct.htm
FOR INFORMATION REGARDING THE LICENSING OF PATENT CLAIMS THAT ARE
REQUIRED TO IMPLEMENT ECMA INTERNATIONAL STANDARDS.</p>
<p>Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:</p>
<ol>
<li>Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.</li>
<li>Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.</li>
<li>Neither the name of the authors nor Ecma International may be used
to endorse or promote products derived from this software without
specific prior written permission.</li>
</ol>
<p>THIS SOFTWARE IS PROVIDED BY THE ECMA INTERNATIONAL "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ECMA INTERNATIONAL BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.</p>
</emu-annex>
<div id="references-pane-container"><div id="references-pane-spacer"></div><div id="references-pane"><div class="menu-pane-header">References to <a></a><span id="references-pane-close"></span></div><div id="references-pane-table-container"><table id="references-pane-table"><tbody></tbody></table></div></div></div></div><div class="toolbox"><a>Permalink</a><a href="#">Pin</a><a href="#"></a></div></body></html>