|
|
|
|
|
by akdubya
5421 days ago
|
|
The underscore.js source (http://documentcloud.github.com/underscore/) also serves as a great primer on the effective use of 'this'. My rule of thumb is to never rely on 'this' unless 1) the function is already bound to an object or 2) I have explicitly set the binding via bind, call or apply. When in doubt favor explicit argument passing. |
|