_.delay

delay_.delay(function, wait, *arguments)
Much like setTimeout, invokes function after wait milliseconds. If you pass the optional arguments, they will be forwarded on to the function when it is invoked.

1
2
3
var log = _.bind(console.log, console);
_.delay(log, 1000, 'logged later');
=> 'logged later' // Appears after one second.
doc_Underscore
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.