javascript copy properties code example
Example: copy object javascript
// es6
const obj = {name: 'john', surname: 'smith'};
const objCopy = {...obj};
// es6
const obj = {name: 'john', surname: 'smith'};
const objCopy = {...obj};