The setInterval() method repeats or re-schedules the given function at every given time-interval. It is somewhat like window.setInterval() Method of JavaScript API, however, a string of code can’t be passed to get it executed.
Syntax:
setInterval(timerFunction, millisecondsTime);
Parameter: It accepts two parameters which are mentioned above and described below:
The setTimeout() method is used to schedule code execution after waiting for a specified number of milliseconds. It is somewhat like _window.setTimeout() _Method of JavaScript API, however a string of code can’t be passed to get it executed.
Syntax:
setTimeout(timerFunction, millisecondsTime);
Parameter: It accepts two parameters which are mentioned above and described below:
#javascript #node.js #web technologies #node.js-misc #programming