Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • is it just a standard javascript syntax to be able to wrap parenthesis in a function as well as invoke that function? I think the real question I am trying to ask is what the parenthesis is in javascript and what it can do Commented Aug 19, 2012 at 19:19
  • The first pair of parenthesis tell JavaScript to treat the function definition as an expression. The second pair tell it to invoke it. That second pair is no different than any other function invocation, like someFunction(); It only looks weird because the function itself is anonymous/isn't named. More info: 2007-2010.lovemikeg.com/2008/08/17/… Commented Aug 19, 2012 at 22:35