Level 1M6Lesson 6.9

beginner35 minby DevFox

Iterating over objects: Object.keys and Object.entries

Go through every property of an object without naming one: its names with Object.keys, its values with Object.values, and both with Object.entries, taken apart in a loop. See why TypeScript calls each name a string and each value any, and why a name from Object.keys cannot look a value up.

  • Fundamentals
  • TypeScript
Iterating over objects: `Object.keys` and `Object.entries`. Read this lesson at .