deno / 1.23.2 / ~ / setinterval.html /

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

Parameters

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

Return Type

number

© 2018–2022 the Deno authors
https://doc.deno.land/deno/stable/~/setInterval