Update snippet descriptions

This commit is contained in:
Isabelle Viktoria Maciohsek
2020-10-19 18:51:03 +03:00
parent f0fbe0c3e5
commit 5e8e6f51a3
36 changed files with 97 additions and 82 deletions

View File

@ -7,7 +7,7 @@ Creates a debounced function that delays invoking the provided function until at
- Each time the debounced function is invoked, clear the current pending timeout with `clearTimeout()` and use `setTimeout()` to create a new timeout that delays invoking the function until at least `ms` milliseconds has elapsed.
- Use `Function.prototype.apply()` to apply the `this` context to the function and provide the necessary arguments.
- Omit the second argument, `ms`, to set the timeout at a default of 0 ms.
- Omit the second argument, `ms`, to set the timeout at a default of `0` ms.
```js
const debounce = (fn, ms = 0) => {