Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #28999

Re: And Another function Question

From Joao Rodrigues <groups_jr-1@yahoo.com.br>
Newsgroups comp.lang.javascript
Subject Re: And Another function Question
Date 2015-12-09 18:50 -0200
Organization Aioe.org NNTP Server
Message-ID <n4a466$bvo$1@speranza.aioe.org> (permalink)
References <34ug6btki29u124smhr293cd4j8cu31de8@4ax.com>

Show all headers | View raw


Em 09/12/2015 16:55, Gene Wirchenko escreveu:
> Hello:
>
>       What does (contrived example follows)
>            (function(a,b,c){some_code})(1,2,3);
> mean?
>
>       Is this to define an unnamed function
                              ^^^^^^^^
I'd rather say an "anonymous" function.

> with code some_code and
> then immediately call it with the parms 1,2,3?

Exactly.

>
>       What is a good reference for this?  I am willing to put in study
> time, but I do not even know where to start.
>

Ben Alman has written a good article about IIFEs:
<http://benalman.com/news/2010/11/immediately-invoked-function-expression/>


-- 
Joao Rodrigues

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

And Another function Question Gene Wirchenko <genew@telus.net> - 2015-12-09 10:55 -0800
  Re: And Another function Question Luuk <luuk@invalid.lan> - 2015-12-09 21:13 +0100
    Re: And Another function Question RobG <rgqld@iinet.net.au> - 2015-12-09 19:23 -0800
      Re: And Another function Question Luuk <luuk@invalid.lan> - 2015-12-10 20:06 +0100
  Re: And Another function Question Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2015-12-09 18:50 -0200
  Re: And Another function Question Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-12-09 21:47 +0000
    Re: And Another function Question Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-12-10 01:10 +0000
  Re: And Another function Question Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-12-10 00:26 +0100

csiph-web