title: Set a variable if undefined in JavaScript
body: <p>I know that I can test for a JavaScript variable and then define it if it is <code>undefined</code>, but is there not some way of saying</p>
  <pre class="lang-js prettyprint-override"><code>var setVariable = localStorage.getItem('value') || 0;
  </code></pre>
  <p>seems like a much clearer way, and I'm pretty sure I've seen this in other languages.</p>