SOURCE

// 手写call
var obj = {
    name: '1827',
    myFun: function(fm, to) {
        console.log(`${this.name}年龄${this.age},来自${fm}去往${to}`);
    }
}

var db = {
    name: '1827m',
    age: 18,
}

obj.myFun.call(db, 'gz', 'sh');
obj.myFun.apply(db, ['gz', 'sh']);
obj.myFun.bind(db, 'gz', 'sh')();
console 命令行工具 X clear

                    
>
console