showing results for - "polyfill for call"
Samuel
10 Jan 2020
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}