Created
August 6, 2020 09:07
-
-
Save alphaolomi/21dc35822fd0d43a3e9ab131e9f0f55a to your computer and use it in GitHub Desktop.
Spread Operator in JS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const morning = { | |
breakfast: "oatmeal", | |
lunch: "peanut butter and jelly" | |
} | |
const dinner = "mac and cheese" | |
const backpackingMeals = { | |
...morning, | |
dinner | |
} | |
console.log(backpackingMeals) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment