setInterval()
setInterval() is a JavaScript function in the Global category. Repeatedly executes a function with a fixed delay. The syntax is setInterval(callback, delay, ...args). A typical example: setInterval(() => console.log("Tick"), 1000). The TypeScript signature is (callback: (...args: any[]) => void, ms?: number, ...args: any[]): number. A close sibling is setTimeout(), which executes a function after a delay (ms). A close sibling is clearTimeout(), which cancels a timeout. A close sibling is clearInterval(), which cancels an interval. A close sibling is setImmediate(), which executes a function after the current event loop (Node.js). More about this category: Global functions — setTimeout, fetch, parseInt, and more. Related Global methods: setTimeout(), clearTimeout(), clearInterval(), setImmediate(), queueMicrotask(), fetch(), eval(), parseInt(). This page is part of the free JS Reference documentation covering 1027+ methods, each with syntax, parameters, return values, examples, and common pitfalls. You can try setInterval() immediately in the JavaScript playground, look up unfamiliar terms in the glossary, or return to the JS Reference homepage.