Like this article? We recommend
Using setImmediate()
The setImmediate() function schedules a callback function to be executed immediately, so there is no delay parameter. The clearImmediate() method can be used to cancel the execution of the callback:
var immediate = setImmediate(function(str1, str2) { console.log(str1 + " " + str2); }, "Hello.", "How are you?"); clearImmediate(immediate);