title: Adding property using Object assign
body: <p>I have the following function:</p>
  
  <pre><code>addHrefs = (list) =&gt; {
      const listWithHrefs = list.map((item) =&gt; {
          item.href = customFunction(item.name);
          return item;
      });
      return listWithHrefs;
  }
  </code></pre>
  
  <p>The problem here is I am mutating the <code>list</code> object. I want to know how to add a particular <code>(key, value)</code> pair without mutating <code>list</code>. Is it possible with <code>Object.assign</code>? How can I do it?</p>