arrow function syntax simplified
Brendan Eich
brendan at mozilla.com
Mon Apr 2 05:12:01 PDT 2012
Jorge wrote:
>
> No [[Scope]]? I must be missing something! Given this code:
>
> bound= (function a(i) { return function b () { return i }.bind(null) })(27);
>
> bound()
> --> 27
>
> How can bound() resolve `i` without a [[Scope]] ?
By delegating to bound()'s [[TargetFunction]], which does have a
[[Scope]] -- see ES5 15.3.4.5.1 and 15.3.4.5.2.
>> > 6. Arrow functions (AF). Features: captured `this', captured `this' even in case of `new'.
>>
>
> And [[Extensible]] === false... I wonder why, why non-extensible ?
No, arrows are extensible -- where did you see [[Extensible]] === false?
/be
More information about the es-discuss
mailing list