WHAT’S IN THIS CHAPTER?
thiswill have within the function
applyto explicitly specify the value this will have within a function
bindto permanently set the value of this in a function, regardless of its call-site details
WROX.COM CODE DOWNLOADS FOR THIS CHAPTER
You can find the wrox.com code downloads for this chapter at
Unlike classical languages such as C# and Java in which
this always references the object that “contains” the function that’s executing, the value of
this should be bound to. We’ll review those rules in the next section to set the stage for the primary topic of this chapter:
Function.prototype, which allow programmers to explicitly control the value to which
this is bound.
In this section, we describe the four types of ...