Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • Nice take, but is there any efficiency worries when converting an array to an object and back?
    – Dror Bar
    Commented Aug 3, 2020 at 13:25
  • The only question I had was if Object.values preserves the order of the array. After reading the docs, I am happy to report that it does!
    – smac89
    Commented Nov 23, 2021 at 21:36
  • However, across all major browsers, this method is the slowest, and I have a feeling it is because of that order preservation.
    – smac89
    Commented Nov 23, 2021 at 21:47