title: How does javascript logical assignment work?
body: <p>In javascript, if we have some code such as</p>
  
  <pre><code>var a = "one";
  var b = q || a;
  alert (b);
  </code></pre>
  
  <p>The logical OR operator will assign a's value to b, and the alert will be "one."</p>
  
  <p>Is this limited to assignments only or can we use it everywhere?</p>
  
  <p>It seems an empty string is treated the same as undefined. Is this right?</p>
  
  <p>How does this work with AND variables? What about combinations of them?</p>
  
  <p>What is a good example of when to use these idioms, or when not to?</p>