javascript: || (or) in variable define?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/2802055/what-does-this-construct-x-x-y-mean">What does this construct (x = x || y) mean?</a>  </p>
</blockquote>



<p>a lot of times i can see that variables set like that </p>

<pre><code>var d = d || {}
</code></pre>

<p>or</p>

<pre><code>var = var || []
</code></pre>

<p>a few question came up to mind</p>

<ol>
<li>what it's mainly purpose ?</li>
<li>how can it be to use OR in variable define?</li>
</ol>
