Skip to content

Instantly share code, notes, and snippets.

@MidasXIV
Created October 22, 2019 05:31
Show Gist options
  • Save MidasXIV/2d212873c28bcd36300ae266b68c728a to your computer and use it in GitHub Desktop.
Save MidasXIV/2d212873c28bcd36300ae266b68c728a to your computer and use it in GitHub Desktop.
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