<script>
function fn(a, b) {
console.log(this, a, b);
}
Function.prototype.myBind = function (context, ...args1) {
let self = this;
return function (...args2) {
let args = args1.concat(args2);
self.apply(context, args);
};
};
let newFn = fn.myBind({ x: 100 }, 10);
newFn(30);
</script>