The value of this provided for the call to fun. Note that this may not be the actual value seen by the method: if the method is a function in non-strict mode code, null and undefined will be replaced with the global object and primitive values will be converted to objects.
不对,如果在浏览器是指向
window, Node中是global。注意:当第一个参数为
null或undefined时,将是JS执行环境的全局变量。浏览器中是window,其它环境(如node)则是global。摘自MDN,已经解释得很清楚了。和theWalker说的一致