Message from JavaScript discussions

November 2018

— ^

— 

I guess you could say it behaves like a function that is bound to the parent this, but then you'd have to say that if statements are bound the same way

— And switch statements, and while loops

— And every other construct

— Binding to parent this is the same as not caring about context

— Like if statements do not

— And arrow functions do not

— And object literals

— Etc

— Aka normal scoping

— 

var test = function() {
this.a = function() {
return this;
};
this.b = (() => this);
};
var a = new test();
var b = a.b;

if (a.b() === b()) {
console.log('It is bound');
}

Message permanent page

— No...