Array vs Object Choice
Question
Which data structure is best for storing a list of student names in order?
Hint
Think about whether the data is ordered or named.
Explanation
An array is the right choice for an ordered list of values accessed by position. Student names in a sequence (first, second, third...) naturally fit an array. Objects are for named properties (e.g., a single student with name, age, grade). Booleans and strings are single values, not collections.
Related Resources
Related Lessons
- Arrays
Learn how arrays store ordered lists of 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.