Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript handle updation of copy object

const a = { x: 0, y: { z: 0 } };
const b = JSON.parse(JSON.stringify(a)); 

b.y.z = 1; // doesn't update a.y.z
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #handle #updation #copy #object
ADD COMMENT
Topic
Name
8+8 =