Reflect.apply
calls a target function
- it is a static method
the 1st parameter
- is a callable, e.g. a function
- passing it a non-callable throws a TypeError
the 2nd parameter
- is the scope (or the
this
)
the 3rd parameter
- must be an array (or array-like)
- is an array of parameters passed to the call
example usages
- simple function call
- call a function on an array
- pass in the
this
that the function to call needs
Links
How this function is specified.
How the 3rd parameter gets processed, as an `CreateListFromArrayLike`.
The MDN docs for this function.
Announcement of this kata on twitter.