Why an Object Is Not the Same as an Array
Arrays store a sequence. Objects describe one entity with named parts.
If you keep a list of student names, an array makes sense. If you need one student with a name, age and access status, a plain list becomes awkward very quickly.
Objects solve that by letting each value carry a label. Instead of remembering a position, you read data through a meaningful property name.
- Array: many items of the same kind in an ordered list.
- Object: different properties that belong to one thing.
- Named properties usually make code easier to read and explain.