Juan R Labrada

Functional programming examples

How to change an object key without modifying the object

const assoc = (key, value, object) => ({
  ...object, [key]: value
});
© 2023