var meals = {
breakfast: "oatmeal",
lunch: "turkey sandwich",
dinner: "steak and potatoes"
};
=> undefined
Object.assign({}, meals, {breakfast: ['oatmeal', 'banana']})
=> {breakfast: Array(2), lunch: "turkey sandwich", dinner: "steak and potatoes"}
Why is chrome console displaying Array(2)
instead of displaying the actual value of the array which is ['oatmeal', 'banana']
.