setInterval

Repeatedly calls a function , with a fixed time delay between each call.

// Outputs 'hello' to the console every 500ms
setInterval(() => { console.log('hello'); }, 500);
function setInterval(
cb: (...args: any[]) => void,
delay?: number,
...args: any[],
): number;
§
setInterval(cb: (...args: any[]) => void, delay?: number, ...args: any[]): number
[src]

§Parameters

§
cb: (...args: any[]) => void
[src]
§
delay?: number optional
[src]
§
...args: any[] optional
[src]

§Return Type

§
number
[src]