Created
July 21, 2017 15:22
-
-
Save mtheoryx/26d6930e18eefe21a6a52599efd9d0e1 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
| const myArgs = { | |
| name: 'Billy', | |
| age: 26, | |
| enrolled: false | |
| }; | |
| const functionWithManyArgs = ({name, age, enrolled = true}) => { | |
| console.log('Name is: ', name); | |
| console.log('They are this old: ', age); | |
| console.log('Are they enrolled? ', enrolled); | |
| return true; | |
| }; | |
| functionWithManyArgs(myArgs); | |
| /* | |
| "Name is: " "Billy" | |
| "They are this old: " 26 | |
| "Are they enrolled? " false | |
| */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment