#27Objects - The Must have
30min

Overview

Master the most important object utilities in JavaScript — from keys, values, and entries to property checks, merging, and the new Object.groupBy. These fundamentals will boost how you organize, transform, and query data structures in any real-world React project.

Requirements

  • Use only built-in JavaScript object methods (Object.keys, Object.values, Object.entries, etc.).
  • Understand the difference between reading object data and mutating it.
  • Implement the provided Object.groupBy polyfill if needed.
  • Ensure the merge operation (Object.assign) modifies the original object.

Notes

  • Some tests depend on the mutation performed in a previous step (for example, #7 relies on #5 modifying the original homer object).
  • Avoid creating new objects unless the challenge explicitly requires it.
  • Review the MDN documentation for each method to deepen your understanding.

Tests

  1. gets the keys of the object
  2. gets the values of the object
  3. checks if object has the property 'name'
  4. converts the object into an array of key-value pairs
  5. merges two objects (mutates the original)
  6. groups characters by status and shows only names
  7. checks if homer has occupation (depends on #5 mutation)