So let's take a look at where “this” came from, why we have it, what sort of problems can come up, and how we can fix them.
In this segment, we're going to look at another demo of the problem we just saw, and explain the problem of "losing context," or "losing the [desired] 'this' value." We'll look at several common workarounds, discuss the pros and cons of each, before moving on to a better solution. We also touch on browser compatibility implications.
In this final section, we're going to look at an ECMAScript feature that makes it even easier to workaround the problem the way we were looking at it in the previous section. So, if we have to create a function inline, and preserve the value of "this," we can take an ECMAScript shortcut.
So, now we've looked at the definition of "this," how the browser decides what to bind "this" to, common problems that come up, workarounds, and the future of solving these problems.