Update task.md
This commit is contained in:
parent
6db57d9494
commit
15780b3a24
1 changed files with 2 additions and 2 deletions
|
@ -21,9 +21,9 @@ Here's the code for it (uses the debounce decorator from the [Lodash library](ht
|
||||||
```js
|
```js
|
||||||
let f = _.debounce(alert, 1000);
|
let f = _.debounce(alert, 1000);
|
||||||
|
|
||||||
f("a");
|
f("a");
|
||||||
setTimeout( () => f("b"), 200);
|
setTimeout( () => f("b"), 200);
|
||||||
setTimeout( () => f("c"), 500);
|
setTimeout( () => f("c"), 500);
|
||||||
// debounced function waits 1000ms after the last call and then runs: alert("c")
|
// debounced function waits 1000ms after the last call and then runs: alert("c")
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue