How to copy object in JavaScript
1. Clone objects
When you try to use equal operator '=' to copy an object A to a variable B in JavaScript, actually you only got a reference of A to B, that means when any value changes on B will effect A, like:
const A = { 'name'