1.
var func=function(a,b,c) { console.log ([a,b,c]); }; Func.apply (null, [I/n]); // [Func.call](null, N/a); // [Func.bind](null, N/a); // No output func.bind (null, N/a) (); // [Func.bind](null) (2,3,4) //[2,3,4]
Analytical:
When using apply or call, if we pass in the first argument to NULL, the this in the body of the function points to the default host object, which is window in the browser.
Apply and call are just the arguments passed in in the same form as the others. But bind is different: when call or apply is called before, the function runs directly, but Bind does not run, but instead returns a function of the binding context and this always points to the first argument in the bind parenthesis.
2.
Call, apply, and bind have 2 main functions:
① change the direction of this;
② ways to borrow other objects
*js Core: Call, apply, and bind