Object Keys Quiz
Question
In the object `{ name: 'Ada', age: 36 }`, what are `name` and `age`?
Hint
Keys are the names you use to look up values.
Explanation
In a key-value pair, the key (property name) is the identifier used to look up the value. name and age are keys; 'Ada' and 36 are their corresponding values. You use the key to access the value: obj.name gives 'Ada'. Keys are strings (or Symbols), not numeric indices like arrays.
Related Resources
Related Lessons
- Objects
Learn how objects group related data with keys and values.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.