![]() |
VOOZH | about |
Underscore.js_.debounce() Function in Underscore.js is used to create a debounced function that is used to delay the execution of the given function until after the given wait time in milliseconds has passed since the last time this function was called. The debounced function has a cancel method that can be used to cancel the function calls that are delayed and a flush method which is used to immediately call the delayed function.
_.debounce( function, wait, immediate );This method returns the new debounced function.
Example 1: The example illustrates the _.debounce() function is Underscore.js.
Output:
👁 ImageExample 2: The example illustrates the _.debounce() function is Underscore.js.