To sandbox the content of the function. In javascript the scope is defined by functions. So by doing that, if your code is well enough written (meaning no "var" forgotten), your code will be correctly sandboxed.
Naouak, Grade 2 de Kobal. Site web: http://www.naouak.net On Fri, Sep 28, 2012 at 2:20 PM, Sadjow Leão <[email protected]> wrote: > Why the use of (function(){ > > })(); > > in the files ? > > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
