Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct destructuring example #272

Merged
merged 1 commit into from
Dec 12, 2019
Merged

Correct destructuring example #272

merged 1 commit into from
Dec 12, 2019

Conversation

telegraham
Copy link
Contributor

{ api, whatever } from line 342 is not actually destructuring — though both were introduced in ES2015, the name for this syntax is "Shorthand property names":

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer#New_notations_in_ECMAScript_2015

I also added some example variables to make the code sample more accessible to beginners.

`{ api, whatever }` from line 342 is not actually destructuring — though both were introduced in ES2015, the name for this syntax is "Shorthand property names":

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer#New_notations_in_ECMAScript_2015
@timdorr
Copy link
Member

timdorr commented Dec 12, 2019

Yep, that was backwards. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants