apply
description
Returns the result of calling the provided function with its arguments, which are passed as an array. apply
works very similarly to Function.prototype.apply, with the notable difference that you can not provide a value for this
. apply(f, args)
is equivalent to f(...args)
, using ES6's spread operator.
example
Last updated