I just went through the documentation of ECMAScript 2018 [https://www.ecma-international.org/ecma-262/9.0/index.html#sec-lexical-environments] and ECMAScript 2015 [http://www.ecma-international.org/ecma-262/6.0/#sec-lexical-environments] to understand the difference between the Lexical Environment and Environment Records. But now I'm bit confused about how the Lexical Environment and Environment Records and defined in these specifications. Each of these documents does not specifically state that where this bindings need to reside. Please tell me which definition is correct with respect to the ExecutionContexts, and does it has some changes when it comes to those two specifications?
ExecutionContext {
LexicalEnvironment : {
EnvironementReocrd : {
- type
- attributes,
- this binding // Binding to this
},
outter, // Reference to the outer Lexical Environment.
},
VariableEnvironment : {
.....
}
}
or this ??
ExecutionContext {
LexicalEnvironment: {
EnvironementReocrd : {
- type
- attributes,
},
outter, // Reference to the outer Lexical Environment.
- this binding // Binding to this
},
VariableEnvironment : {
.....
},
}