setInterval
Повторяет вызов функции с фиксированной задержкой между каждым вызовом.
// 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Параметры
cb: (...args: any[]) => voiddelay?: number optional...args: any[] optionalТип возвращаемого значения
number
© 2018–2022 the Deno authors
https://doc.deno.land/deno/stable/~/setInterval