js in depth: arrow function & prototype & this & constructor https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions https://hacks.mozilla.org/2015/06/es6-in-depth-arrow-functions/ https://stackoverflow.com/…
一.前言 大家先预计一下以下四个函数调用的结果吧! var test = function(){ console.log('hello world') return 'fsjohnhuang' }test.call() // ① Function.prototype.call(test) // ② Function.prototype.call.call(test) // ③ Function.prototype.call.call(…
参考:http://stackoverflow.com/questions/650764/how-does-proto-differ-from-constructor-prototype http://blog.rainy.im/ __proto__ is the actual object that is used in the lookup chain to resolve methods, etc. prototype is the object that is used to build…