DEV Community

[Comment from a deleted post]
Collapse
 
jwkicklighter profile image
Jordan Kicklighter • Edited

I'm not sure that's always the case (although like you said, it's just opinion). If the goal is to iterate over the values, then

Object.entries(arr).map(x => x)

feels more concise than

Object.keys(arr).map(x => arr[x])