Created
April 7, 2019 23:31
-
-
Save rileyhilliard/35586e2f83020a28ed604ae3fba4162c to your computer and use it in GitHub Desktop.
JS Functional Destructure
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
| // JavaScript Functional Destructure | |
| const hello = ({ first, last }) => `Hello ${first} ${last}!`; | |
| const person = { first: 'John', last: 'Doe' }; | |
| // outputs "Hello John Doe!" | |
| hello(person); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment