4 ms·
Same exists in ES6: const first = { a: 1 }; const second = { b: 2 }; const merged = { ...first, ...second }; console.log(merged) // { a: 1, b:
by tylerhou 8y ago
Same exists in ES6:
const first = { a: 1 };
const second = { b: 2 };
const merged = { ...first, ...second };
console.log(merged) // { a: 1, b: 2 }
- Doxin 8y agoPython had it first ;)