ES6-25: Three methods pointed to by this inside the function

1: call() method

2: apply() method

  • The second parameter of the apply method is an array
  • Use apply to find the maximum and minimum

3: bind() method

  • bind does not call functions.
  • After calling the bind function, a new function is returned, and the this of this new function is specified by us.

Guess you like

Origin blog.csdn.net/sinat_41696687/article/details/113919393