Objects in JavaScript

TömbmetódusokObjektummetódusok

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

Az anyagokat átnéztük és ellenőriztük, de hibák továbbra is előfordulhatnak. A tartalom kizárólag oktatási célt szolgál, ezért saját felelősségre használd, és szükség esetén ellenőrizd más forrásokkal is.

✨ Kérdezd Larát — a tanulási partnered

Fedezd fel a személyre szabott tanulási támogatást. Lara elmagyarázza az anyagot, összefoglalja a témákat és megválaszolja a kérdéseidet — az Go csomagtól elérhető.


Lara segít gyorsabban tanulni — kizárólag a ReadyTools Go, Plus és Max tagoknak.

Kövesd nyomon a fejlődésed 🚀

Tanulj egyszerűbben utad nyomonkövetésével teljesen ingyen.