Lodash _.method() Method
The _.method() method creates a function that invokes the method at the path of a given object. Any additional arguments are provided to the invoked method.
Parameters: This method accepts two parameters as mentioned above and described below:
- path: This is the path to invoke.
- args: These are the arguments to invoke the method with.
Return Value: This method returns the new invoker function.
["geeks", "for", "geeks"]
[1, 5, 8]