title: JavaScript Variable fallback
body: <p>Please can someone explain to me what this line of code does:</p>
  
  <pre><code>var list  = calls[ev] || (calls[ev] = {});
  </code></pre>
  
  <p>My best guess:</p>
  
  <p>It's setting the variable "list" with the value of calls.xxx, where xxx is a variable, ev. If calls[ev] doesn't exist, then it's creating it as an empty object and assigning that empty object to "list". Is that right?</p>
  
  <p>Why are the parenthesis being used? Where can I find out more info on using || when setting variables, and the use of parenthesis in this context? Thanks!</p>