Update task.md
Minor grammar; removed unnecessary semicolon; added (best practices) semicolon
This commit is contained in:
parent
33e4cc258b
commit
a2b45a852f
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue