applyintermediatefunction greet(hi) { return `${hi}, ${this.name}` }
greet.apply({ name: 'Ana' }, ['Hello']) // β 'Hello, Ana'apply() combines this binding and argument spreading in one call.
Functions using rest parameters gather all arguments. apply() lets you pass an array that becomes the rest parameter.
Challenge: Use sum.apply(null, [1, 2, 3]) and verify the result is 6.