-
-
Save brunosabot/49aa78f8bc47f9fca3f568aa440b20ab to your computer and use it in GitHub Desktop.
This file contains 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 frenchFlagColors = { blue: "#00F", white: "#FFF", red: "#F00" }; | |
const belgianFlagColors = { black: "#000", yellow: "#FF0", red: "#F00" }; | |
const { blue, white, red: frenchRed } = frenchFlagColors; | |
const { black, yellow, red: belgianRed } = belgianFlagColors; | |
console.log(blue); // #00F | |
console.log(white); // #FFF | |
console.log(frenchRed); // #F00 | |
console.log(black); // #000 | |
console.log(yellow); // #FF0 | |
console.log(belgianRed); // #F00 | |
console.log(red); // undefined |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment