javascript programming idiom
- From: ctx2002 <ctx2002@xxxxxxxxx>
- Date: Thu, 29 May 2008 16:30:19 -0700 (PDT)
HI all:
I often see people write code like as below to invoke code block:
(
function() { do some thing here}
) ()
my question is why do like this, and what is benefit.
regards
.
- Follow-Ups:
- Re: javascript programming idiom
- From: Thomas 'PointedEars' Lahn
- Re: javascript programming idiom
- From: Stevo
- Re: javascript programming idiom
- Prev by Date: Re: Lots of noise about user agent strings
- Next by Date: Re: setTimeout and anonymous functions
- Previous by thread: FAQ Topic - Why is my AJAX page not updated properly when using an HTTP GET request in Internet Explorer? (2008-05-30)
- Next by thread: Re: javascript programming idiom
- Index(es):