DEV Community


Discussion on: Destructuring arrays as objects

miketalbot profile image
Mike Talbot

To be fair you can do that last example as

 let [a,b] = list
 return a > b

Which is way shorter. It would make sense perhaps for getting items from the end of a list, but as you say not very legible.

jillejr profile image
Kalle Jillheden

Oh yea forgot about that trick! The most interesting thing about this technique is to find where to use it.

Forem Open with the Forem app