Merge pull request #1479 from hrodward/patch-11

Update task.md
This commit is contained in:
Ilya Kantor 2019-10-19 20:23:55 +03:00 committed by GitHub
commit edfc79d4dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,7 +12,7 @@ Let's check the real-life application to better understand that requirement and
**For instance, we want to track mouse movements.** **For instance, we want to track mouse movements.**
In browser we can setup a function to run at every mouse movement and get the pointer location as it moves. During an active mouse usage, this function usually runs very frequently, can be something like 100 times per second (every 10 ms). In a browser we can setup a function to run at every mouse movement and get the pointer location as it moves. During an active mouse usage, this function usually runs very frequently, can be something like 100 times per second (every 10 ms).
**We'd like to update some information on the web-page when the pointer moves.** **We'd like to update some information on the web-page when the pointer moves.**
@ -31,8 +31,8 @@ A code example:
```js ```js
function f(a) { function f(a) {
console.log(a) console.log(a);
}; }
// f1000 passes calls to f at maximum once per 1000 ms // f1000 passes calls to f at maximum once per 1000 ms
let f1000 = throttle(f, 1000); let f1000 = throttle(f, 1000);