Difference Between setInterval and setTimeout in Javascript

Published: 24 July 2021
on channel: Knowledge Thrusters
856
12

In this video, you will be able to understand the difference between setInterval and setTimeout in JavaScript.

The setTimeout() function is used when you wish to run your JavaScript function after a specified number of milliseconds from when the setTimeout() method was called. This goes for one execution.

The setInterval() function, as the name suggests is commonly used to set a delay for functions that are executed repeatedly. This goes for unlimited times.

The difference between setTimeout() and setInterval() is that setTimeout() triggers the function call once. While, the setInterval() triggers the function repeatedly after the specified interval of time.


#javascript #knowledgethrusters


On this page of the site you can watch the video online Difference Between setInterval and setTimeout in Javascript with a duration of hours minute second in good quality, which was uploaded by the user Knowledge Thrusters 24 July 2021, share the link with friends and acquaintances, this video has already been watched 856 times on youtube and it was liked by 12 viewers. Enjoy your viewing!