Created
February 12, 2020 15:19
-
-
Save mchelen/35d2c3b03cdc43c50b3c51e89679234c to your computer and use it in GitHub Desktop.
ES6 Destructured Object Parameters
This file contains 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
greet({ | |
greeting: 'Hello', | |
firstName: 'Jane', | |
lastName: 'Smith', | |
title: 'Dr.', | |
}); | |
function greet({ | |
greeting, | |
firstName, | |
lastName, | |
title, | |
}) { | |
console.log(`${greeting}, ${title} ${firstName} ${lastName}`); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment