SpinTheMic
Pro

Interview practice question

Grouping array items by a property

Frontend Engineering · JavaScript Core · Intermediate

You need to group a list of orders by status. How would you do it in JavaScript?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Object.groupBy / Map.groupBy (modern).
  • reduce into object/Map.
  • Choose key type.
  • Immutable result.
  • Check browser support.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics