4,461
edits
Line 300: | Line 300: | ||
directions("Truckee", "Tahoe City", "Sunnyside", "Homewood", "Tahoma"); | directions("Truckee", "Tahoe City", "Sunnyside", "Homewood", "Tahoma"); | ||
</source> | |||
combining objects: | |||
<source lang="js"> | |||
const morning = { | |||
breakfast: "oatmeal", | |||
lunch: "peanut butter and jelly" | |||
}; | |||
const dinner = "mac and cheese"; | |||
const backpackingMeals = { | |||
...morning, | |||
dinner | |||
}; | |||
console.log(backpackingMeals); | |||
// { | |||
// breakfast: "oatmeal", | |||
// lunch: "peanut butter and jelly", | |||
// dinner: "mac and cheese" | |||
// } | |||
</source> | </source> |