How to use the setTimeout and setInterval Methods in JavaScript
The setInterval method is used to schedule a function to be executed repeatedly after a period of time. The syntax for this method is this: const timerID = setInterval (function, delay, arg1, arg2, ...) In this case, the delay is the time in milliseconds that the timer should delay successive executions of the function.