Objects in JavaScript

Array MethodsObject Methods

Objects are one of the most important things in JavaScript. Think of them like real-world objects: a phone has a color, brand, and size. In code, we can describe anything the same way!

An object is a collection of properties – each property has a name (key) and a value. Let’s learn step by step with simple examples you can try right now.

How to Create an Object

Use curly braces {} and write key-value pairs separated by commas. Keys are usually strings, values can be anything!

See how the console shows all the properties? Cool! 🎉

Getting Values from an Object

There are two ways: dot notation (.) or bracket notation []. Dot is easier when you know the key name.

Adding or Changing Properties

Objects are flexible – you can add new properties or change existing ones anytime!

Deleting Properties

Use the delete keyword to remove something.

Objects Inside Objects (Nested)

You can put objects inside other objects – great for more details!

Quick Fun Quiz

We have reviewed and checked the materials, but errors may still occur. The content is provided for educational purposes only, so use it at your own responsibility and verify with other sources if needed.

✨ Ask Lara — your AI study partner

Unlock personalized learning support. Lara can explain lessons, summarize topics, and answer your study questions — available from the Go plan and above.


Lara helps you learn faster — exclusive to ReadyTools Go, Plus, and Max members.

Track Your Progress 🚀

Learn more easily by tracking your progress completely for free.