Update article.md
"move the scheduling to the beginning" (2x)
This commit is contained in:
parent
3b681c8ceb
commit
ff82a9bc89
1 changed files with 2 additions and 2 deletions
|
@ -119,7 +119,7 @@ The notable thing is that both variants -- with and without splitting the job by
|
||||||
|
|
||||||
To make them closer, let's make an improvement.
|
To make them closer, let's make an improvement.
|
||||||
|
|
||||||
We'll move the scheduling in the beginning of the `count()`:
|
We'll move the scheduling to the beginning of the `count()`:
|
||||||
|
|
||||||
```js run
|
```js run
|
||||||
let i = 0;
|
let i = 0;
|
||||||
|
@ -128,7 +128,7 @@ let start = Date.now();
|
||||||
|
|
||||||
function count() {
|
function count() {
|
||||||
|
|
||||||
// move the scheduling at the beginning
|
// move the scheduling to the beginning
|
||||||
if (i < 1e9 - 1e6) {
|
if (i < 1e9 - 1e6) {
|
||||||
setTimeout(count); // schedule the new call
|
setTimeout(count); // schedule the new call
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue