React: Difference between revisions

Jump to navigation Jump to search
357 bytes added ,  30 September 2019
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>

Navigation menu