title: Javascript equivalent of Python's dict.setdefault?
body: <p>In Python, for a dictionary <code>d</code>,</p>
  
  <pre><code>d.setdefault('key', value)
  </code></pre>
  
  <p>sets <code>d['key'] = value</code> if <code>'key'</code> was not in <code>d</code>, and otherwise leaves it as it is.</p>
  
  <p>Is there a clean, idiomatic way to do this on a Javascript object, or does it require an <code>if</code> statement?</p>