In this video you look at three contexts of "this", with methods, constructor functions, and regular functions. Learn a simple technique to keep it straight as you're fleshing out an application.
First, this is called at the time of invocation,…and the global this is undefined…when used in strict mode.…We'll see those in just a minute.…The one tip I have for you…is when in doubt console log it out.…It's the easiest way to figure out…what this means at the time.…So let's go ahead and take a look at some sample code.…Back over in our index.html…I'm going to go ahead and get rid of this console log,…and let's play around with those functions.…
- Working with prototype and dynamic elements
- Using bind, call, and apply
- Using the Fisher–Yates formula
- When to use e.preventDefault() and when to avoid it
- Drag-and-drop life cycle
- Using prototypical inheritance to optimize your code
Skill Level Intermediate
Q: This course was updated on 1/16/2019. What changed?
A: The following topics were updated: propagation and drag and drop.