问题
Look at the placement of the parenthesis, is that any different?
( func )( )
(function(){
})();
and ( func( ) )
(function(){
}());
回答1:
Technically the first defines an anonymous function, then calls it, the second defines an anonymous function which calls itself as it's defined. Realistically, they are identical.
来源:https://stackoverflow.com/questions/23625005/different-between-function-and-function-self-invoking-anonymou