![]() |
VOOZH | about |
Lodash _.curry() method returns a curried version of the given function. it accepts an arity which is a number that shows it will keep accepting arguments until it has received this number of arguments or invocings.
_.curry(fun, [arity=fun.length])[arity=fun.length]: The arity of the functionExample 1: In this example, we are passing numbers to the gfgFunc which stores the result of the lodash _.curry method and prints the result in the console.
Output:
Addition is : 115
[Function: wrapper]
Example 2: In this example, we are passing numbers to the gfgFunc which stores the result of the lodash _.curry method and prints the result in the console.
Output:
Multiplication is : 12420
[Function: wrapper]