Created
October 22, 2019 05:12
-
-
Save MidasXIV/fc1cf34500d40fb4d11b76a732bec47b 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
(() => { | |
"use strict"; | |
let pokemonTypes = ['electric', 'flying', 'fire', 'grass']; | |
let pikachu, pidgey, charizard, venusaur; | |
// pikachu = pokemonTypes[0]; | |
// pidgey = pokemonTypes[1]; | |
// charizard = pokemonTypes[2]; | |
// Skipping Values and default values. | |
[pikachu, , charizard, venusaur = 'NONE'] = pokemonTypes; | |
console.log(`Pikachu - ${pikachu}`); // electric | |
console.log(`Pidgey - ${pidgey}`); // undefined | |
console.log(`Charizard - ${charizard}`); // fire | |
console.log(`Venusaur - ${venusaur}`); // grass | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment