bind
Creates a function that invokes fn with a given context, optionally prepending any additional supplied parameters to the arguments.
- Return a
functionthat usesFunction.prototype.apply()to apply the givencontexttofn. - Use the spread operator (
...) to prepend any additional supplied parameters to the arguments.