LANGUAGE » JAVASCRIPT » BROWSER

Timers

Run once

js
let timeoutId = setTimeout(callback, timeInMs);
clearTimeout(timeoutId);

Run repeatedly

js
let intervalId = setInterval(callback, timeInMs);
clearInterval(intervalId);