transfer data from object variable javascript es6 code example
Example: javascript clone object
var x = {myProp: "value"};
var xClone = Object.assign({}, x);
//Obs: nested objects are still copied as reference.
var x = {myProp: "value"};
var xClone = Object.assign({}, x);
//Obs: nested objects are still copied as reference.