JavaScript

Explain bind, call, and apply

Medium
2
Added
Methods to explicitly set this context. call takes args individually, apply as array.

Solution Code

JavaScript
func.call(context, 1, 2);
func.apply(context, [1, 2]);
Explanation
bind creates new function with bound context, doesn't execute immediately.

Guided Hints

Create polyfill for bind
Arrow functions and this binding