Calling a function after time interval in javascript

If you wanted to do some stuff after time interval so here is the solution for you.

Here setInterval() method will call test() method after each 2 seconds.

Share This:

Leave a Reply

Your email address will not be published. Required fields are marked *