Ben Aston
Ben Aston

Reputation: 55759

What has the [[Scope]] internal property been replaced with in ES6?

What has the [[Scope]] internal property been replaced with in ES6?

I can find it in ES5, but no mention of it in ES6.

Upvotes: 4

Views: 117

Answers (1)

Qantas 94 Heavy
Qantas 94 Heavy

Reputation: 16020

It appears that [[Scope]] has been replaced by [[Environment]] in ES2015. Section 9.2.4 (FunctionInitialize) states:

  1. Set the [[Environment]] internal slot of F to the value of Scope.

whereas ES5 says this in section 13.2 (Creating Function Objects):

  1. Set the [[Scope]] internal property of F to the value of Scope.

Upvotes: 5

Related Questions