Defers invoking the func until the current call stack has cleared. Any additional arguments are provided to func when it's invoked.
func
The function to defer.
The arguments to invoke func with.
Returns the timer id.
5.7.0
defer(text => console.log(text), 'deferred')// => Logs 'deferred' after one millisecond. Copy
defer(text => console.log(text), 'deferred')// => Logs 'deferred' after one millisecond.
Defers invoking the
func
until the current call stack has cleared. Any additional arguments are provided tofunc
when it's invoked.