Wes June’s Dev NotesAboutAbout
GitHubGitHub (opens in a new tab) (opens in a new tab)
  • Introduction
    • Centering in CSS
    • Containing block
    • Controlling inheritance
    • CSS selectors
    • Formatting contexts
    • Media queries
    • min(), max(), and clamp()
    • Shorthand properties
    • Stacking contexts
    • inert
    • <input type="file">
    • Semantic HTML tags
    • Copying array methods and mutating array methods
    • Differences between var, let, and const
    • How to check if a variable is an array?
    • How to check if a variable is an object?
    • Differences between type aliases and interfaces
    • The maximum delay value for setTimeout
    • The maximum and minimum values for the CSS z-index property
  • Introduction
  • About
    • Centering in CSS
    • Containing block
    • Controlling inheritance
    • CSS selectors
    • Formatting contexts
    • Media queries
    • min(), max(), and clamp()
    • Shorthand properties
    • Stacking contexts
    • inert
    • <input type="file">
    • Semantic HTML tags
    • Copying array methods and mutating array methods
    • Differences between var, let, and const
    • How to check if a variable is an array?
    • How to check if a variable is an object?
    • Differences between type aliases and interfaces
    • The maximum delay value for setTimeout
      • Reference
    • The maximum and minimum values for the CSS z-index property

On This Page

  • Reference
Fun Facts
The maximum delay value for setTimeout

The maximum delay value for setTimeout

Browsers store the delay as a 32-bit signed integer internally. This causes an integer overflow when using delays larger than 2,147,483,647 ms (about 24.8 days), resulting in the timeout being executed immediately.

Reference

  • setTimeout() global function - Web APIs | MDN (opens in a new tab)
Differences between type aliases and interfacesThe maximum and minimum values for the CSS z-index property

© 2023 Wes June. Built with Nextra.