Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 01bb684

Browse files
authored
Merge pull request #1471 from hrodward/patch-8
Update article.md
2 parents 9151079 + da8af69 commit 01bb684

File tree

1 file changed

+2
-2
lines changed
  • 1-js/06-advanced-functions/08-settimeout-setinterval

1 file changed

+2
-2
lines changed

‎1-js/06-advanced-functions/08-settimeout-setinterval/article.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ For server-side JavaScript, that limitation does not exist, and there exist othe
288288

289289
- Methods `setTimeout(func, delay, ...args)` and `setInterval(func, delay, ...args)` allow us to run the `func` once/regularly after `delay` milliseconds.
290290
- To cancel the execution, we should call `clearTimeout/clearInterval` with the value returned by `setTimeout/setInterval`.
291-
- Nested `setTimeout` calls is a more flexible alternative to `setInterval`, allowing us to set the time *between* executions more precisely.
291+
- Nested `setTimeout` calls are a more flexible alternative to `setInterval`, allowing us to set the time *between* executions more precisely.
292292
- Zero delay scheduling with `setTimeout(func, 0)` (the same as `setTimeout(func)`) is used to schedule the call "as soon as possible, but after the current script is complete".
293293
- The browser limits the minimal delay for five or more nested call of `setTimeout` or for `setInterval` (after 5th call) to 4ms. That's for historical reasons.
294294

@@ -299,4 +299,4 @@ For example, the in-browser timer may slow down for a lot of reasons:
299299
- The browser tab is in the background mode.
300300
- The laptop is on battery.
301301

302-
All that may increase the minimal timer resolution (the minimal delay) to 300ms or even 1000ms depending on the browser and OS-level performance settings.
302+
All that may increase the minimal timer resolution (the minimal delay) by 300ms or even 1000ms depending on the browser and OS-level performance settings.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /