0PricingLogin
Javascript for Kids · Lesson

Reading Properties

Get values from objects.

Peeking Inside the Chest 🔍

You built a treasure chest (object). Now let us peek inside and grab a treasure!

Getting a value out of an object is called reading a property. 🪙

The Magic Dot ✨

To grab a treasure, write the chest name, a dot ., then the key.

Like saying: dog DOT name, please! 🐶

let dog = { name: 'Rex', age: 4 }
console.log(dog.name)

All lessons in this course

  1. What Is an Object?
  2. Reading Properties
  3. Changing Properties
  4. A Pet Object
← Back to Javascript for Kids