call vs apply vs bind vs arrow function - jellyfish-tom/TIL GitHub Wiki
1. call
The call() method calls a function with a given this value, and arguments provided individually - one by one, separated with coma.
Call calls the function it works with.
2. apply
The apply() method calls a function with a given this value, and arguments provided as an array.
Apply calls the function it works with.
3. bind
The bind() method creates a new function that, when called, has its this keyword set to the provided value, with a given sequence of arguments preceding any provided when the new function is called.
Bind does not call the function it works with.
4. Arrow function
An arrow function does not have its own this; the this value of the enclosing lexical context is used i.e. Arrow functions follow the normal variable lookup rules. So while searching for this which is not present in current scope they end up finding this from its enclosing scope