title: Key value assignment in the object passed as a parameter in a arrow function for map
body: <p>In the below code, I am passing an array of objects in the map function. The Value of <code>category</code> gets assigned to <code>categoryName</code> and is returned as <code>categoryName</code>. My problem is understanding the assignment operation. Doesn't the assignment to <strong>object properties</strong> happen this way <code>key:value</code> ? Instead, I see that the value of <code>category</code> is assigned to this new Variable in this fashion <code>value:key</code></p>
  
  <pre><code>const companies= [
    {name: "Company One", category: "Finance"},
    {name: "Company Two", category: "Retail"}
  ];
  const companyu = companies.map(
  ({ name, category: categoryName }) =&gt; ({ name, categoryName }))
  </code></pre>