Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

merge objects javascript

const a = { b: 1, c: 2 };
const d = { e: 1, f: 2 };

const ad = { ...a, ...d }; // { b: 1, c: 2, e: 1, f: 2 }
Source by flaviocopes.com #
 
PREVIOUS NEXT
Tagged: #merge #objects #javascript
ADD COMMENT
Topic
Name
8+7 =