bind 函数

108 阅读1分钟
function bind(context, fn, ...args0) {
  return (...args) => {
    return fn.apply(context, args0.concat(args));
  };
}