Published in: JavaScript
I don’t know how or why this works.
Comments
Subscribe to comments
You need to login to post a comment.
samuelcotterall on 03/11/10
1 person has marked this snippet as a favorite
Published in: JavaScript
I don’t know how or why this works.
Subscribe to comments
You need to login to post a comment.
That's pretty.
Picture declaring your object with the "run" method before line 1.
var obj1 = { run: function() { foo(bar); } } setTimeout(obj1.run, 1000);
It's really no different. From the look of it, it appears the object is "anonymous," given your demonstration.