title: Operating on undefined variable - null coalescing
body: <pre><code>function add(num) { 
    var sum;
    for (var i = 1; i &lt; num + 1; i++){
      sum = (sum || 0) + i;
    }; 
    return sum;     
  }
  add(9);
  </code></pre>
  
  <p>What is a keyword to describe the behavior for defining sum when it gets added to "i" in the for loop? Is this a ternary operation? Obviously the first time it loops through it is undefined, so javascript chooses 0. Why is that?</p>