Skip to content

Instantly share code, notes, and snippets.

@rileyhilliard
Created April 7, 2019 23:31
Show Gist options
  • Select an option

  • Save rileyhilliard/35586e2f83020a28ed604ae3fba4162c to your computer and use it in GitHub Desktop.

Select an option

Save rileyhilliard/35586e2f83020a28ed604ae3fba4162c to your computer and use it in GitHub Desktop.
JS Functional Destructure
// 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