This Lesson is for PRO Members.

Subscribe today and get access to all lessons! Plus direct HD download
for offline use, member comment forums, and iTunes "podcast" RSS feed.
Level up your skills now!

UNLOCK THIS LESSON

Already subscribed? Sign In

HIDE PLAYLIST

Specify this using .call() or .apply()


A function's this argument is usually set implicitly, depending on how the function is called. Ordinary function calls, method calls, and constructor calls all lead to a different this value.

We can also call a function with an explicit this argument using Function.prototype.call() or Function.prototype.apply(). Both methods accept a thisArg as their first parameter and a variable number of additional arguments.

This lesson shows how to use call() and apply() and explains how they differ.

Please take a moment to tell your friends:

You must be a PRO Member to view code