JSFiddle - React, Tailwind, and code Playground
JavaScript 1.7
var obj = {
one: {
two: 2
},
three: {
four: 4
}
}
var newObj = {...obj};
newObj.one = "something";
// Check the original obj
console.log(obj.one);
var obj = {
one: {
two: 2
},
three: {
four: 4
}
}
var newObj = {...obj};
newObj.one = "something";
// Check the original obj
console.log(obj.one);