only copy certain values from object js code example Example: copy object javascript var x = {myProp: "value"}; var y = Object.assign({}, x);