this in JavaScript
this in JavaScript: Methods and this, Losing this, and How Arrow Functions Help.
Updated
- Methods and this (Apprentice): A method is a function that belongs to an object, and inside it the word this means the object before the dot, so one method can work on whichever object calls it.
- Losing this, and How Arrow Functions Help (Journeyman): When you hand a method to other code as a callback, it loses the object before the dot and this goes missing, and an arrow function or bind gives it back.