Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. const myArgs = {
  2. name: 'Billy',
  3. age: 26,
  4. enrolled: false
  5. };
  6.  
  7. const functionWithManyArgs = ({name, age, enrolled = true}) => {
  8. console.log('Name is: ', name);
  9. console.log('They are this old: ', age);
  10. console.log('Are they enrolled? ', enrolled);
  11. return true;
  12. };
  13.  
  14. functionWithManyArgs(myArgs);
  15.  
  16. /*
  17. "Name is: " "Billy"
  18. "They are this old: " 26
  19. "Are they enrolled? " false
  20. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement