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.

—–

2 Responses to “setTimeout, objects, and anonymous functions”

  1. thanks best regards

    mirc
  2. thanks best regards

    mirc

Leave a Reply