title: Javascript: Using constants name as a value in an Object
body: <p>Total noob here, so I might have googled with the wrong keywords. I am sorry if this has been answered a million times before.</p>
  <p>I have a constructor function:</p>
  <pre class="lang-js prettyprint-override"><code>function CreateTeam(teamId, name, matchesPlayed, won, drawn, ...)
  </code></pre>
  <p>Giving an object some keys like: <code>teamId</code>, <code>teamName</code>, <code>matchesPlayed</code>, <code>matchesWon</code> and so on.</p>
  <p>When calling the the constructor function I do it like this:</p>
  <pre class="lang-js prettyprint-override"><code>const argentina = new CreateTeam ('a1', 'Argentina', 0, 0, 0, ...)
  </code></pre>
  <p>I am wondering if it is possible to take the name of a constant and copy/paste it as a value of an object? In this case I would like to paste it as the second value (the value of <code>argentina.name</code>)</p>
  <p>If this is possible I would be able to avoid typing the team name for every time I call the <code>CreateTeam</code> constructor function.</p>
  <p>Any suggestions? Again, sorry if this has been answered before, and I just don't know the syntax well enough to search for it.</p>