What does "var FOO = FOO || {}" mean in Javascript?
<p>Looking at an online source code I came across this at the top of several source files.</p>

<pre><code>var AEROTWIST = AEROTWIST || {};
AEROTWIST.WebGLEasing = new function() { 
    // bunch of code here
}
</code></pre>

<p>But I have no idea what <code>|| {}</code> does.</p>

<p>I know <code>{}</code> is equal to <code>new Object()</code> and I think the <code>||</code> is for something like "if it already exists use its value else use the new object.</p>

<p>Why would I see this at the top of a source file?</p>
