{
return function spreadFn(argsArr){
return fn(...argsArr)
}
}
bar(spreadArgumets((x, y) => console.log(x, y))) fn([2, 2]); => spreadArgumets(fn) fn == 2, 2 ??
Please format the code you posted, by wrapping it in triple backticks. -> `
Spread arguments is usually called apply
Обсуждают сегодня