call a function for every ten seconds

 function myFunction() {

// Do something every ten seconds } const intervalId = setInterval(myFunction, 10000); // 10000 milliseconds = 10 seconds // To stop the timer, use clearInterval() clearInterval(intervalId);

No comments:

Post a Comment

Event listening in react

 How we can listen to som eevents some envents fire like click or automatically user enters into input button , that is event on word type i...