Using params with setTimeOut


/ Published in: JavaScript
Save to your folder(s)

With setTimeOut a reference to a function object cannot provide parameters for the scheduled execution of that function.
We can instead use a closure to provide parameters for the execution of a function prior to the execution of that function.

URL: http://jibbering.com/faq/notes/closures/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.