setTimeout, objects, and anonymous functions

In conversation with Dunstan last night, I was advised of the facility in JavaScript’s setTimeout to pass a function, rather than a string, and have that function executed after the timeout. Did everyone else already know about this? I’ve been fighting the “how do I get my object into a string? oh, I guess I’ll make it a damned global variable” thing for years! Why didn’t anyone tell me this? JavaScript FAQTS has more.

I'm currently available for hire, to help you plan, architect, and build new systems, and for technical writing and articles. You can take a look at some projects I've worked on and some of my writing. If you'd like to talk about your upcoming project, do get in touch.

More in the discussion (powered by webmentions)

  • (no mentions, yet.)