Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

copy all of object except one property javascript

let x = {a: 1, b: 2, c: 3, z:26};
let {b, ...y} = x;

// b = 2; y = {a: 1, c: 3, z:26}; x = {a: 1, b: 2, c: 3, z:26}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #copy #object #property #javascript
ADD COMMENT
Topic
Name
7+1 =