[thelist] passing variables through

Andrew Chadwick andrew.chadwick at prnewswire.co.uk
Fri Sep 14 08:26:46 CDT 2001


On Fri, Sep 14, 2001 at 02:54:54PM -0700, Richard Bennett wrote:
> setTimeout("function("+id+")","300)
                                ^
                                ^
Oops - you probably don't want that last quote:

When I was playing around with setTimeout() the other day, inspired by
an earlier message to thelist, I was a bit disappointed to find that
JS doesn't seem to treat inline "function () {...}" declarations as
closures, in the Scheme (or even Perl) sense.

I am but an egg with JS, so do any ECMAscript language lawyers out
there know if I'm misunderstanding?

-- 
Andrew Chadwick, UNIX/Internet Programmer, PR Newswire Europe, Oxford
--
The views or opinions above are solely mine and are not necessarily those
of PR Newswire Europe. The message may contain privileged or confidential
information; if you are not a named recipient, notify me, and do not copy,
use, or disclose this message. <andrew.chadwick at prnewswire.co.uk>.




More information about the thelist mailing list