Learning OOPs in Javascript

Hey everyone, Amey here! 👋
This week, I focused on learning Object-Oriented Programming (OOP) in JavaScript, and it’s been a great experience overall!
📘 Topics I Covered:
Prototype and prototypal chaining
Classes and objects
Encapsulation, abstraction, and inheritance
Functional constructors
Types of methods (static methods/variables, prototype methods, etc.)
Private data members
Getters and setters
⚔️ Challenges I Faced:
Since I’ve worked with OOP concepts in languages like Python and C++, many topics were familiar. However, prototype and prototypal chaining were new to me and a bit tricky at first. Even though the syntax is simple, understanding how it works under the hood took some effort.
Initially, I used the __proto__ method to create prototype chains. Later, I learned about the more modern Object.setPrototypeOf() and Object.getPrototypeOf() methods, which made the process much clearer and easier to manage.
The biggest challenge was understanding inheritance through prototypes, as it’s quite different from class-based inheritance in other languages.
On the other hand, functional constructors were relatively easy to grasp, mainly because they resemble how classes work in other programming languages.
🔧 How I Tackled These Challenges:
✅ I rewatched the lecture that covered the difficult parts. For me, rewatching always helps reinforce concepts I didn’t fully understand the first time.
✅ I immediately solved problems based on the topics I had just learned. This was like the cherry on top—it helped me not just understand the theory but actually master it. Initially, I needed tutorials, but gradually I started recognizing patterns and solving the problems on my own.
✅ These challenges were part of the Udemy course I’m currently following, which includes practical exercises that keep me engaged.
📚 Resources I Used:
ChatGPT for doubt-solving and deeper understanding of complex topics 🙌
That’s it for this week! I’m really enjoying this journey and excited to build projects where I can apply these concepts in a real-world setting.
Subscribe to my newsletter
Read articles from Amey Chougule directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
