!function in javascript
JavaScript syntax 101. Here is a function declaration: function foo () {} Note that there's no semicolon: this is a function declaration; you need a separate invocation of foo() to actually run the function. On the other hand, !function foo() {} is an expression, but that still doesn't invoke the function, but we can now use !function foo() {}() to do that, as () has higher precedence than ! . Presumably the original example function doesn't need a self-reference so that the name then can be dropped. So what the author is doing is saving a byte per function expression; a more readable way of writing it would be this: ( function (){})();