title: JavaScript || or operator with an undefined variable
body: <p>I have been doing some reading lately one article I read was from Opera.</p>
  <p><a href="http://dev.opera.com/articles/view/javascript-best-practices/" rel="nofollow noreferrer">http://dev.opera.com/articles/view/javascript-best-practices/</a></p>
  <p>In that article they write this:</p>
  <blockquote>
  <p>Another common situation in JavaScript
  is providing a preset value for a
  variable if it is not defined, like
  so:</p>
  </blockquote>
  <pre><code>if(v){
    var x = v;
  } else {
    var x = 10;
  }
  </code></pre>
  <blockquote>
  <p>The shortcut notation for this is the
  double pipe character:</p>
  </blockquote>
  <pre><code>var x = v || 10;
  </code></pre>
  <p>For some reason, I can't get this to work for me. Is it really possible to check to see if <code>v</code> is defined, if not <code>x = 10</code>?</p>
  <p>--Thanks.
  Bryan</p>