javascript assign copy of object code example Example: copy object javascript var x = {myProp: "value"}; var y = Object.assign({}, x);