Skip to content

Instantly share code, notes, and snippets.

@mtheoryx
Created July 21, 2017 15:22
Show Gist options
  • Save mtheoryx/26d6930e18eefe21a6a52599efd9d0e1 to your computer and use it in GitHub Desktop.
Save mtheoryx/26d6930e18eefe21a6a52599efd9d0e1 to your computer and use it in GitHub Desktop.
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