this, call, apply and bind
Determine `this` in any call and control it.
- JS.03.01The four rules of `this`CoreJunior10 min
- JS.03.02Arrow functions and lexical `this`CoreJunior9 min
- JS.03.03call, apply and bind in depthCoreMid-level10 min
Interview questions in this module
- How is
thisdetermined in JavaScript? List the rules in order of precedence. - What is the difference between
call,applyandbind? - Why does
const f = obj.method; f()losethis? - How do arrow functions handle
this? When should you not use an arrow function? - What does
thisrefer to inside an event listener? - Implement
Function.prototype.bind.