What is setInterval Function in Javascript ?

The setInterval() function executes a function after a specified time interval.

setInterval(expression, timeout);

Here, expression specifies function/code to be called after particular time interval and timeout specifies the time interval between function calls.

The clearInterval() function is used to cancel or deactivate the timer set by setInterval() function.



You May Interest

JavaScript How To Find The Average Of 10 Numbers Using A While Lo ...

What is Difference Between Javascript and ECMAScript ?

What is Code Smell in Javascript ?

What are Advantages of Using External Javascript ?

What is Console Object in Javascript ?