spread operator - 4
JavaScript
const shallowCopyObject = obj => {
return {...obj}
}
// Expected usage:
const obj = { name: 'Andrew' }
const copy = shallowCopyObject(obj)
obj === copy // false
copy.name = 'Billy'
console.log(obj) // { name: 'Andrew' }
console.log(copy) // { name: 'Billy' }