Invokes func after wait milliseconds. Any additional arguments are provided to func when it's invoked.
func
wait
The function to delay.
The number of milliseconds to delay invocation.
The arguments to invoke func with.
Returns the timer id.
5.7.0
delay(text => console.log(text), 1000, 'later')// => Logs 'later' after one second. Copy
delay(text => console.log(text), 1000, 'later')// => Logs 'later' after one second.
Invokes
func
afterwait
milliseconds. Any additional arguments are provided tofunc
when it's invoked.