Seven Months into JavaScript: The Day Objects Finally Clicked

Spencer Abrahams
3 min read3 days ago

--

Because sometimes understanding comes from the strangest places — like trying to organize your coffee addiction into code.

Last week, I had a breakthrough with JavaScript objects while doing something completely mundane: tracking my coffee consumption. Not for a project. Not for a tutorial. Just me, trying to understand why I kept running out of coffee beans mid-week.

See, seven months into learning JavaScript, I was still treating objects like fancy arrays. I knew they stored key-value pairs. I could create them, access them, even loop through them. But I didn’t truly understand them until I tried to model my weekly coffee ritual in code.

It started with a simple object:

const coffee = {
beansInGrams: 1000,
cupsPerDay: 4,
gramsPerCup: 18
};

Basic stuff. But then I needed to track different brewing methods, because apparently, I’m the kind of person who needs both a French press and a pour-over setup. My object grew:

const coffeeSetup = {
inventory: {
beansInGrams: 1000,
filters: 30,
equipment: ['French Press', 'Pour Over', 'Scale']
},
methods: {
pourOver: {
gramsPerCup: 18,
brewTime: '3:30',
waterTemp: 94
},
frenchPress: {
gramsPerCup: 22,
brewTime: '4:00',
waterTemp: 92
}
},
calculateBeansNeeded: function(days, cupsPerDay, method) {
const gramsPerCup = this.methods[method].gramsPerCup;
return days * cupsPerDay * gramsPerCup;
}
};

That’s when it hit me. Objects aren’t just containers for data — they’re models of real-world concepts. Each nested object was a layer of abstraction, just like how my coffee setup has layers of organization: gear, methods, measurements.

The this keyword, which had been a constant source of confusion, suddenly made sense. When my calculateBeansNeeded method referenced this.methods, it was simply looking inside itself, like I look inside my coffee cabinet to check my brewing methods.

I started seeing objects everywhere. My bookshelf? An object with nested arrays of books, organized by genre. My writing process? An object with methods for drafting, editing, and publishing. My cat? An object with properties for mood and methods for demanding attention.

JavaScript stopped being a set of syntax rules and became a way of mapping reality into code.

This revelation changed how I approached learning. Instead of memorizing patterns, I started thinking about how to represent real things in code. My practice projects became more interesting because they were modeling actual concepts I understood, not just following tutorials.

The imposter syndrome hasn’t gone away entirely. I still Google basic syntax more often than I’d like to admit. But now when I get stuck, I step back and think: “How would I explain this in the real world?”

Seven months in, I’m not just writing code — I’m translating reality into JavaScript. Sometimes it works. Sometimes it breaks spectacularly. But at least now when something goes wrong, I can usually understand why.

And yes, thanks to my coffee tracking object, I now know exactly when to reorder beans.

// A little closure humor for my fellow learners
const blogPost = {
author: 'Spencer',
content: 'Seven Months into JavaScript',
supporters: new Set(),

clap: function(reader) {
this.supporters.add(reader);
console.log(`Thanks ${reader}! You're the ${this.supporters.size}th person to clap!`);
},

followMe: function(reader) {
return new Promise((resolve, reject) => {
try {
setTimeout(() => {
resolve(`Welcome to the journey, ${reader}!
Warning: May contain traces of semicolons.`);
}, 300);
} catch(e) {
reject('Error 418: I'm a teapot. Just kidding, that's HTTP.');
}
});
},
stayInTheLoop: function() {
while(true) {
console.log('Get it? Loop? I'll see myself out...');
break; // Because infinite loops are no laughing matter
}
}
};
// Feel free to try these in your console!
// blogPost.clap('YourName');
// blogPost.followMe('YourName').then(msg => console.log(msg));
// blogPost.stayInTheLoop();

Learning JavaScript or any other new skill? Follow me for more honest stories about the journey. And if this resonated with you, feel free to run those functions in your console — I promise they’re bug-free. Well, mostly. Probably. Maybe let’s call them “unexpected features” just to be safe.

--

--

Spencer Abrahams
Spencer Abrahams

Written by Spencer Abrahams

Digital storyteller helping writers turn words into income. Sharing insights on freelancing, Medium success, and side hustles with humor and heart.