Understand JavaScript's this Keyword in Depth
Course on egghead by Marius Schulz
- 18 min
- LengthVideo runtime
- Subscription
- Price modelegghead plan
- 8
- Lessons
- 4.7
- Rating out of 580 ratings on egghead
- Dec 2017
- Published5 Dec 2017
About this course
JavaScript’s this keyword is a source of confusion for new and experienced developers alike. It can be frustrating if, for some reason, this doesn’t point to the context that was intended. This course will help you understand JavaScript’s this mechanism in-depth. Marius will take us through all of the ways this will change its values, from why many libraries use "use strict" to how arrow functions take its outer execution context’s this . Over 8 lessons, you’ll learn: - how JavaScript implicitly sets the this context, and how we can set it ourselves - that the call-site of a function determines the this value of that function invocation - how to call a function with a specific this value - how to create functions that always remain tied to a specific this context - how this is treated within arrow functions and classes Following the course, this will feel less frustrating, more...
What it covers
- 1this in the Global Context
- 2this in Function Calls
- 3this in Constructor Calls
- 4this in Method Calls
- 5Specify this using .call() or .apply()
- 6Hard-Bind a Function's this Value with the .bind() Method
- 7Capture this with an Arrow Function
- 8this in Class Bodies
Similar JavaScript courses
Same topic, nearest in length, up to three from any one provider.
Data read from the egghead catalogue on 28 Nov 2026. How the data is collected.