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.

Required fields*

8
  • 1
    It's an immediately/self-invoked function expression. Commented Jul 16, 2013 at 17:08
  • (function(){alert("anonymous function!!!")})() Commented Jul 16, 2013 at 17:09
  • developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/… Commented Jul 16, 2013 at 17:09
  • 1
    @TheNewIdiot, This has nothing to do with obfuscation. Commented Jul 16, 2013 at 17:09
  • 2
    You're asking what it is, then you say that you already know. What exactly is your question? Are you asking why people use it instead of a named function? You seem to have shifted gears in the middle of your post. Who said "it has to be that way"? It doesn't. If you want to name a function that you'll never use again, then do it. Commented Jul 16, 2013 at 17:13