javascript bind this to anonymous function code example
Example: javascript bind this to anonymous function
aFunctionWithCallback(this.id, function(data) {
console.log(this);
}.bind(this));
aFunctionWithCallback(this.id, function(data) {
console.log(this);
}.bind(this));