Created
February 28, 2018 13:01
-
-
Save SaschaHeyer/3f12f70a1f82f04bc4e6fa6649aaf627 to your computer and use it in GitHub Desktop.
destructuring
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
| function writeBeer({ name, type }){ | |
| console.log(name) | |
| console.log(type) | |
| } | |
| let beer = { | |
| name: 'Bitburger', | |
| type: 'Pils' | |
| } | |
| writeBeer(beer); | |
| // output: Bitburger | |
| // output: Pils |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment