What is the purpose of the setInterval function in JavaScript?
setInterval
It schedules a function to be executed on the next event loop cycle.
It sets an interval for an asynchronous task to complete.
It executes a function repeatedly at specified intervals.
It delays the execution of a function by a specified number of milliseconds.