Created
October 22, 2019 05:31
-
-
Save MidasXIV/2d212873c28bcd36300ae266b68c728a 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
let pokemons = [{ | |
"name": "Pikachu", | |
"id": 25, | |
"type": "electric", | |
"ability": { | |
"primary": "Static", | |
"hidden": "Lightning rod" | |
}, | |
"moves": ["Quick Attack", "Volt Tackle", "Iron Tail", "Thunderbolt"] | |
}, { | |
"name": "Charizard", | |
"id": 6, | |
"type": "fire", | |
"ability": { | |
"primary": "Blaze" | |
}, | |
"moves": ["flame thrower"] | |
}]; | |
for (let { name, type, moves, ability: { primary: primaryAbility } } of pokemons) { | |
console.log(`${name} is type ${type}`); | |
console.log(`has moves ${moves}`); | |
console.log(`Primary Ability is :: ${primaryAbility}`); | |
console.log(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment