Js apply call

console.log.apply(console, args);
Math.max.apply(Math,number);

in the study of apply call, why is the first parameter of apply bound to the object? That is, why one parameter of console.log.apply (console, args); is console,Math.max.apply (Math,number); the first parameter is Math?

 Array.prototype.slice.apply(arguments) 

and the arguments? of this apply case

Dec.24,2021

The
apply () method calls a function with a given th value, as well as parameters provided as an array (or similar array object).

clipboard.png


understand the first parameter of apply,call

Menu