Go Back   Rhinocerus > Newsgroup > Newsgroup comp.lang.java.* > Newsgroup comp.lang.javascript

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 07-02-2012, 11:00 PM
FAQ server
Guest
 
Posts: n/a
Default FAQ Topic - What is (function(){ /*...*/ })() ? (2012-07-03)

-----------------------------------------------------------------------
FAQ Topic - What is (function(){ /*...*/ })() ?
-----------------------------------------------------------------------

This is an anonymous FunctionExpression that is called
immediately after creation.

Variables declared inside a function are not accessible from
outside the function. This can be useful, for example, to hide
implementation details or to avoid polluting the global scope.

<URL: http://yura.thinkweb2.com/named-function-expressions/>
<URL: http://jibbering.com/faq/notes/closures/>
<URL: http://dmitrysoshnikov.com/ecmascript/chapter-5-functions/#question-about-surrounding-parentheses>


The complete comp.lang.javascript FAQ is at
http://jibbering.com/faq/

--

The sendings of these daily posts are proficiently hosted
by http://www.pair.com.

Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

  #2 (permalink)  
Old 07-03-2012, 03:58 AM
Spamless
Guest
 
Posts: n/a
Default Re: FAQ Topic - What is (function(){ /*...*/ })() ? (2012-07-03)

On 2012-07-02, FAQ server <javascript@dotinternet.be> wrote:
> -----------------------------------------------------------------------
> FAQ Topic - What is (function(){ /*...*/ })() ?
> -----------------------------------------------------------------------
>
> This is an anonymous FunctionExpression that is called
> immediately after creation.


I have seen that sort of thing on a spammer page or two.
/*...*/ is ... not a regular expression ... it is just ...
a comment.
Reply With Quote
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT. The time now is 06:51 AM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.