摘要:学习冴羽的博客模拟实现call、applay、bind 和 new
call
1  | Function.prototype._call = function (context) {  | 
使用 ES6 更方便实现,主要是处理不定数量的参数:
1  | Function.prototype._call = function (context) {  | 
apply
1  | Function.prototype._apply = function (context, arr) {  | 
bind
1  | Function.prototype._bind = function (context) {  | 
new
1  | function _new() {  |