← Back to Programming Fundamentals
12

Objects and Related Data: Describe One Entity with Several Properties

Learn when an object makes more sense than an array, how to create small object literals, and how to read properties by name so your data models feel clearer and closer to real situations.

📘 Theory

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.

Create a Small Object

At this level, the important part is not fancy syntax. It is learning to group related data on purpose.

1

This object describes one person. Each property has a job: `name` tells you who it is, `age` gives a numeric detail, and `verified` stores a yes-or-no state.

2

That makes the structure far easier to understand than a loose list such as `['Ana', 19, true]`.

Read Properties by Name

The biggest beginner advantage of objects is reading data through names instead of positions.

1

When you see `product.price`, you immediately know what the value means. That reduces guesswork and helps you reason about the program faster.

2

This may look simple now, but it becomes essential when your programs grow.

🧪 Learn by doing

Example Guided Example: A Simple User Card Group several different properties inside one meaningful structure.

🏁 Challenges

Challenge Challenge: Create a Movie Record Build an object with several properties and print at least two of them.

🧰 Resources

Test

Check your knowledge with a test about Programming Fundamentals.

Test for Programming Fundamentals

What is this?

I'm Cristian Eslava and I sometimes build websites so both you and I can learn and experiment. culTest

I made this in February 2026 to make learning easier for my students. The idea is to learn web development by practicing and to keep expanding the project with new topics, tests and challenges.

It draws inspiration from MDN, W3Schools, CodePen, Manz and many other web development references. I wanted to combine useful theory, runnable examples, challenges and the testing system I had already built for culTest. culTest

If you liked it, if you didn't, or if you want to get in touch, write to me at cristianeslava@gmail.com