Arrow function blind this.
Arrow function blind this.
var Test= { foo:"test", func:function () { (() => { console.log(this.foo); // console.log(self.foo); })(); } } Test.func();//"test" var Test= { foo:"test", func:function () { (function(){ console.log(this.foo); // console.log(self.foo); })(); } } Test.func();//undefined