Confusing Javascript class declaration
<p>I have some third-party Javascript that has statements like this:</p>

<pre><code>FOO = function() {
   ...functions() ... 
   return { hash }
}();
</code></pre>

<p>It is working as designed but I'm confused by it. Can anybody define what this structure is doing? Is it just a weird way to create a class?</p>
