Day 26 of Learning MERN Stack

Published: (June 14, 2026 at 05:53 AM EDT)
1 min read
Source: Dev.to

Source: Dev.to

Hello Dev Community! ๐Ÿ‘‹ It is officially Day 26 of my journey to master the MERN stack! Today, I continued with Lecture 9 of Apna Collegeโ€™s JavaScript playlist with Shradha Didi, transitioning from raw prototype object manipulation into modern ES6 structural design: Classes and Inheritance. Yesterday we saw how single objects share methods; today I learned how to create scalable blueprints to manufacture objects efficiently. I explored the professional layout of Object-Oriented Programming (OOP) in modern JavaScript: A class is a standardized blueprint for creating objects. Inside every class, we can define a special method called a constructor(). The constructor triggers automatically the exact moment a new object is instantiated using the new keyword. It is the standard place to initialize instance properties dynamically.

javascript class Car { constructor(brand, hp) { this.brandName = brand; this.horsepower = hp; } } let myCar = new Car(โ€œToyotaโ€, 180); // Instantiates a fresh object instantly

0 views
Back to Blog

Related posts

Read more ยป