It depends on where you write this. function(){}() by itself will generate a syntax error as it is evaluated as function declarationfunction declaration and those need names.
By using parenthesis or the not operator, you enforce it to be interpreted as function expressionsfunction expression, which don't need names.
In case where it would be treated as expression anyway, you can omit the parenthesis or the operator.