jsguide: Explain more - Object destructuring to array destructuring
Open
lang:js
- Dominant language
- HTML
- Stars
- 39.6k
- Forks
- 12.9k
- Avg merge
- 42m
- Merged PRs (30d)
- 15
Description
https://google.github.io/styleguide/jsguide.html#features-arrays-destructuring
Tip: For (un)packing multiple values into a function’s parameter or return, prefer object destructuring to array destructuring when possible, as it allows naming the individual elements and specifying a different type for each.
- Please explain this tip in detail with an example
- "Object destructuring to array destructuring"
Contributor guide
Assessment
This issue has not been assessed yet.