For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/api/lynx-api/global/clear-interval.md.
Lynx
  • English
  • clearInterval() global function

    Cancels the timer set by setInterval.

    Syntax

    clearInterval(timerId: number): void;

    Parameters

    timerId

    The timer ID returned by setInterval. ** Passing in an ID value other than the one returned by setInterval is undefined behavior and may cause problems. **

    Example

    Notices

    1. setTimeout() and setInterval() have a shared pool of ID numbers, so technically clearTimeout() and clearInterval() are interchangeable. However, for clarity, you should avoid doing so.

    Compatibility

    LCD tables only load in the browser

    Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.