Question · JavaScript and TypeScript course · Module 5: Advanced JavaScript

Object.groupBy() in ES2024

What does the Object.groupBy() method introduced in ES2024 do?

Answer options

  • Groups array elements by a given function, returning an object with groups
  • Sorts the object by keys
  • Splits the object into smaller parts
  • Merges two objects into one

You can check the correct answer by solving this task in the CodeWorlds game.