Call function with array of arguments Call function with array of arguments arrays arrays

Call function with array of arguments


Since the introduction of ES6, you can sue the spread syntax in the function call:

const args = [1,2,3];fn(...args);function fn() {  console.log(arguments);}