GitHub 6219★

Shallow copy an object

JavaScript version

const shallowCopy = obj => Object.assign({}, obj);

// or
const shallowCopy = obj => {...obj};
Follow me on and to get more useful contents.