And calls this function

Function internal attributes:

  [[call]]  [[caller]]

Original understand this:

1 function hell( thing ){
2   console.log( this + " say " + thing );  
3 }
4 
5 hello.call( "LiLei","hello" ); // LiLei say hello  (指向 LiLei)
6 hello( "hello" ); //say hello  (指向 window)
7 
8 es6 严格模式:
9     this undefined

 

Guess you like

Origin www.cnblogs.com/baota/p/12537559.html