title: Best way to create or add number on object property
body: <p>When we have an object with a numeric property that works as an accumulation. What's the best way to deal the "accumulate/create" case in ES6 javascript? The simplest way would be:</p>
  
  <pre><code>if (obj.foo)) {
      obj.foo += value;
  }
  else {
      obj.foo = value;
  }
  </code></pre>
  
  <p>or</p>
  
  <pre><code>obj.foo = obj.foo ? obj.foo + value : value;
  </code></pre>
  
  <p>ideas to improve this? thanks!</p>