I was reading through some javascript code, and encountered a rather strange notation of a function declaration.
!function(t) {
... lots of code ...
}("undefined" == typeof exports ? d3.layout || (d3.layout = {}) : exports);
And it was never called anywhere in the code. However, the function is executing. I have tried evaluating !function(){return true;}, !function(){return false;}, and several other return values, however I have not been able to determine what it is actually doing. (The expression just evaluates to false).
What is the !function notation, and when/how should it be used?