Merge 2 objects in Javascript

We have two objects like this:

let a = {a : 100}
let b = {b : 200}

a = {...a, ...b}

console.log(a)

{a: 100, b: 200}

To merge them you just can write this code above.

Published by pythonprogramming

Started with basic on the spectrum, loved javascript in the 90ies and python in the 2000, now I am back with python, still making some javascript stuff when needed.