sleep

Fuction of creates a delay or pause in the execution of code for a specified number of milliseconds by returning a promise that resolves after the given time

Example

Params
paramDescriptionTypeDefault
msThe number of milliseconds to pause the execution.number-
Return
returnDescriptionTypeDefault
resolveThe promise resolves after the delay, allowing the execution of the next operation.Promise-