Created
April 28, 2020 19:24
-
-
Save sandrabosk/f84d97c3b5354ab12631cba9cc38835a to your computer and use it in GitHub Desktop.
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 data = { | |
| name: { | |
| firstName: 'ana', | |
| lastName: 'marino', | |
| }, | |
| isStudent: true, | |
| favoriteFootballTeam: 'fc barcelona', | |
| hometown: { | |
| city: 'buenos aires', | |
| country: 'argentina', | |
| }, | |
| }; | |
| const { name: {firstName, lastName}, favoriteFootballTeam, hometown: {city, country} } = data; | |
| console.log(`Student ${firstName} ${lastName}, from ${city} (${country}) loves ${favoriteFootballTeam}.`); | |
| // => Student ana marino, from buenos aires (argentina) loves fc barcelona. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment