I have an array of values:
['a', 'b', 'c', 'd']
window.myFunction('a', 'b', 'c', 'd');
.apply method of the Function object.
.apply method invokes the function you're calling, but lets you set the function's
this value (the first argument) and lets you set its arguments using an Array (the second argument).
So here we kept
window as the
this value, and we're passing the Array as the individual arguments. The Array members will be distributed as though they were passed as individual arguments, so it's as if you had done this: