Underscore.js _.restArguments() Function
_.restArguments( function, startIndex )
Parameters: This method accepts two parameters as mentioned above and described below:
- function: It is the stated function.
- startIndex: It is the start position of the rest parameter. It is an optional parameter.
Return Value: This method returns a version of the function which is when invoked can receive all the arguments from and beyond the stated index.
Example 1: In this example, a user-defined function is used.
Example 2: In this example, a starting index is passed along with the user-defined function.
Nidhi1352, GeeksforGeeks!, 700 undefined
She called me, her, & you.