🧪 Concept:
An object is like a mini file folder. You can pack it with labelled facts about something — a person, a place, a donut 🍩
In JavaScript:
let person = {
name: "Riley",
age: 30,
loves: "hiking"
};Now you’ve created an object with properties — bits of information tied to keys like name, age, and loves.
Want to access one?
console.log(person.name); // Riley🧰 Why It Matters:
Objects let you group related info together. They’re super useful when you want to keep things organized and readable — especially when your code gets more complex.
🎉 Quick Challenge:
Make your own object about… you!
let me = {
name: "Jamie",
favoriteColor: "green",
isCool: true
};
console.log(me.favoriteColor);🧠 Fun Analogy:
Think of an object like a backpack with labelled pockets. One has your name, one has your age, one has a granola bar. Reach into the pocket to grab the info.
📚 Further Reading:
▪ MDN Docs – Loops and Iteration
▪ W3Schools – JavaScript Loops
Join us tomorrow for Day 5!
Subscribe to my feed to follow along. I’ll keep the lessons short and sweet.
Leave a Reply