0Pricing
Javascript for Kids · Lesson

Reading Properties

Get values from objects.

Reading Properties is a free Javascript for Kids lesson on CoddyKit — lesson 2 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Javascript for Kids learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

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)

Grab a Number 🔢

The dot works for ALL treasures, not just words! Let us grab the dog's age.

Try it and see the number pop out!

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

Grab Two Treasures 🪙🪙

You can read as many treasures as you want! Just use the dot each time.

Here we read both the name AND the age.

let cat = { name: 'Mittens', age: 2 }
console.log(cat.name)
console.log(cat.age)

Put It in a Sentence 💬

We can mix treasures into a sentence using the + sign to join words!

Watch our robot 🤖 say hello with its own name.

let robot = { name: 'Beep' }
console.log('Hi, I am ' + robot.name)

Math With Treasures ➕

If a treasure is a number, you can do math with it!

Let us give the dog one more year. 🎂

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

Reading a Hero 🦸

Let us read from a superhero chest! Grab the name and the power.

let hero = {
  name: 'Captain Star',
  power: 'flying'
}
console.log(hero.name)
console.log(hero.power)

Spelling Matters! 🐝

The key must be spelled EXACTLY right. name is not the same as Name!

If you spell it wrong you get undefined (which means 'I cannot find that treasure'). 🤷

let dog = { name: 'Rex' }
console.log(dog.Name)

Combine and Show 🎁

Let us read a snack chest and build a fun message about it!

let snack = { name: 'Cookies', amount: 12 }
console.log('I have ' + snack.amount + ' ' + snack.name)

True or False Treasures 🚦

You can read true/false treasures too! Great for yes-or-no questions.

Is this robot friendly? Let us check!

let robot = { name: 'Beep', isFriendly: true }
console.log(robot.isFriendly)

Your Turn to Read 🌟

Here is a pet chest. Try reading the color treasure by yourself! Change the line and run it.

let pet = {
  name: 'Bubbles',
  color: 'orange'
}
console.log(pet.color)

Quick Check ✅

Brain power time! 🧠 Show what you know about reading treasures.

Reading Recap 🎉

Great job, treasure hunter! 🗺️ You learned to READ properties.

  • Use the dot: chest.key
  • Spell the key exactly right 🐝
  • Mix treasures into sentences with +

Next: how to CHANGE treasures inside the chest! 🔧

Frequently asked questions

Is the “Reading Properties” lesson free?

Yes — the full text of “Reading Properties” is free to read here on the web, and the Javascript for Kids course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Javascript for Kids course, upgrade to CoddyKit PRO.

What will I learn in “Reading Properties”?

Get values from objects. You practise Javascript for Kids with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Javascript for Kids?

No prior experience is required. Javascript for Kids on CoddyKit is structured for beginners through advanced learners; this is — lesson 2 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Reading Properties” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Javascript for Kids lesson?

Yes. Every Javascript for Kids lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

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