Created
April 25, 2019 19:43
-
-
Save zbarnes757/dea3f226a7b83670e662ff5900ad8023 to your computer and use it in GitHub Desktop.
default destructuring
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
function defaultName() { | |
return "name"; | |
} | |
function handle({ name = defaultName() } = {}) { | |
console.log(name); | |
} | |
handle(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment