HN
Hacker News
Top
New
Best
Ask
Show
Jobs
Comment by sesutton | Hacker News Reader
Parent
Full thread
sesutton
·
You could just write:
let [tenth_item] = somearray.slice(9)
View on HN
bmn_
·
You're missing the point here. Slice works with only part of the compound about to be ripped apart. However, destructuring with commas is generic. Example that has no simple slice method call:
let [,second,,fourth,,sixth]
Reply on news.ycombinator.com