Res.end() //Writing content to html using res.write and so on) įunctiondelayedFuntion(param1, param2. setTimeout with parameter setTimeout(delayedFuntion, delayTimeInMS, param1, param2. Second parameter: It is the minimum time of delay required and should always be defined in milliseconds.Ģ. ![]() Function on the fly or separately defined function both works fine here. First parameter: It should always be the function which needs delay in execution.setTimeout without parameter setTimeout(delayedFuntion, delayTimeInMS) ![]() setTimeout is mainly used when a particular block of code should be executed after a delay of few milliseconds also this time defined is the minimum time of wait before executing the callback function defined in setTimeout method. ![]() setTimeout is a built-in Node.js API function which executes a given method only after a desired time period which should be defined in milliseconds only and it returns a timeout object which can be used further in the process. The following article provides an outline for Node.js setTimeout.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |