Hacker News new | ask | show | jobs
by tylerhou 2925 days ago
Same exists in ES6:

    const first = { a: 1 };
    const second = { b: 2 };
    const merged = { ...first, ...second };
    console.log(merged) // { a: 1, b: 2 }
1 comments

Python had it first ;)