title: modify a property of an object in the functional way
body: <p>In javascript programming in the functional way is a great benefit. I'm trying to modify a property of an object contained in an array of objects in the functional way that means that the item that is the object passed in the <code>map</code> function cannot be modified. If I do something like this:</p>
  
  <pre><code>const modObjects = objects.map((item) =&gt; {
  
     item.foo = "foo" + 3;
  
     return item;
  });
  </code></pre>
  
  <p>this is not functional because item is modified inside the function. do you know any other approach to this problem?</p>