3 ms·
Or pass in an object to the function that will be bound to this. $A(self.columns).each(function(item) { this.buildHeader(item); }, this); In gener
by richcollins 18y ago
Or pass in an object to the function that will be bound to this.
$A(self.columns).each(function(item) {
this.buildHeader(item);
}, this);
In general I prefer the technique you described as it is the most frequent use case and simplifies the implementation of the function that executes the callback.