title: Square Brackets Javascript Object Key
body: <p>Can anyone explain how the why/how the below method of assigning keys in JavaScript works?</p>
  <pre><code>a = &quot;b&quot;
  c = {[a]: &quot;d&quot;}
  </code></pre>
  <p>return:</p>
  <pre><code>Object {b: &quot;d&quot;}
  </code></pre>