Use of setInterval method in Javascript
 Rahul Gupta

Rahul Gupta @therahul_gupta

About: I am Software Engineer

Joined:
Jun 5, 2022

Use of setInterval method in Javascript

Publish Date: Jun 13 '22
4 0

The setInterval() method is used to call a function or evaluate an expression at specified intervals (in milliseconds). For example, let’s log a message after 2 seconds using the setInterval method,

An example of code below will log a message after 2 seconds using the setTimeInterval method:

setInterval(function () {
console.log("The Coding dev");
}, 2000);

Comments 0 total

    Add comment