Arrays and collections / Dictionaries

//using objects
let d1 = {1"one"2"two"};
let d2 = {3"three"};

let dAll = {...d1, ...d2};
//dAll is { '1': 'one', '2': 'two' }
console.log("dAll is", dAll);

//using maps (ES6 feature)
let m1 = new Map([
    [ 1"one" ],
    [ 2"two" ]])
let m2 = new Map([[3"three"]]);

let mAll = new Map(
    [...m1.entries(), ...m2.entries()]);
//mAll is { '1': 'one', '2': 'two', '3': 'three' }
console.log("mAll is", mAll);