Lodash _.after() Method
The Lodash _.after() method is opposite of Lodash _.before() method. This method is used to creates a function that invokes func once it’s called n or more times.
Parameters: This method accepts two parameters as mentioned above and described below:
- n: This parameter holds the number n that defines number of calls before func is invoked.
- func: This parameter holds the function which will invoked.
Return Value: This method returns the new restricted function.
Example 1: In this example we try to invoke the function 3 times but it will in invoke 3rd times only.
Example 2: In this example we try to invoke the function 2 times but it will in invoke 2nd times only.
My Personal Notes arrow_drop_up
Please Login to comment...