Update article.md

"move the scheduling to the beginning" (2x)
This commit is contained in:
Peter Roche 2020-02-11 22:38:44 -07:00 committed by GitHub
parent 3b681c8ceb
commit ff82a9bc89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
} }