showing results for - "polyfill for apply"
Vanessa
31 Jan 2019
1Function.prototype.myCall = function (...args) {
2  let obj = args[0]
3  const params = args.slice(1)
4
5  obj = {
6    ...obj,
7    fn: this
8  }
9
10  return obj.fn(params)
11}