Friday, May 29, 2020

Reduce this confusion

Experimented from: https://stackoverflow.com/questions/20279484/how-to-access-the-correct-this-inside-a-callback/20279485#20279485


When reusing an instance's method from another object (see great and anotherGreat below), access it directly from the name of the function that holds the prototype, e.g., Beatles

No comments:

Post a Comment