<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Abhijeet231</title>
    <description>The latest articles on DEV Community by Abhijeet231 (@abhijeet231).</description>
    <link>https://dev.to/abhijeet231</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3328435%2Fe77a84b7-95c4-452e-b89b-edc9e2a9970b.jpg</url>
      <title>DEV Community: Abhijeet231</title>
      <link>https://dev.to/abhijeet231</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/abhijeet231"/>
    <language>en</language>
    <item>
      <title>JavaScript OOP Explained Without Making Your Brain Hurt</title>
      <dc:creator>Abhijeet231</dc:creator>
      <pubDate>Tue, 10 Mar 2026 07:56:37 +0000</pubDate>
      <link>https://dev.to/abhijeet231/javascript-oop-explained-without-making-your-brain-hurt-31ff</link>
      <guid>https://dev.to/abhijeet231/javascript-oop-explained-without-making-your-brain-hurt-31ff</guid>
      <description>&lt;p&gt;If you are someone who has just started learning Object-Oriented Programming, or you are thinking about learning it, then this is the perfect place to get a basic understanding of OOP..&lt;/p&gt;

&lt;p&gt;So let me set the context first, I'm a JavaScript developer (MERN) and i have been using functional programming from past 5/6 months.&lt;/p&gt;

&lt;p&gt;Built some project around it. But recently I got some exposure to Object-Oriented Programming, and out of curiosity i learend about it, By the way, I'm still learning.&lt;/p&gt;

&lt;p&gt;But in todays articel , i'm going to share all my understanding till now and will try to convey it in a beginner friendly way. So let's get started….&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyhqnm86hyztji2qjhz0k.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyhqnm86hyztji2qjhz0k.jpg" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Object Oriented Programming
&lt;/h2&gt;

&lt;p&gt;So you must be thinking what does Object Oriented Programming even mean !!&lt;/p&gt;

&lt;p&gt;Let me tell you if you are someone like me , who has some prior experience with JavaScript and been buildign things around it and still don't know about Object Oriented Programming.&lt;/p&gt;

&lt;p&gt;Then it's 101% sure what you are using till now is known as functional Programming.&lt;/p&gt;

&lt;p&gt;So in functional Programming you basically use functions to write code, While writing controller logic, handling database connections, or building API routes, you are mostly using functions everywhere.&lt;/p&gt;

&lt;p&gt;And i'm preety sure, you mus have thought about it , if not then now you should connect the dots , you will notice that you have been using functions almost everywhere.. So that's what Functional Programming mean.&lt;/p&gt;

&lt;p&gt;But Object Oriented Programming is a way of writing code where we organise things as Objects. These objects contains :&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;              1.Properties
              2.Methods
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;car&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;barnd&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;honda&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;white&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;start&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Car started&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
 &lt;span class="p"&gt;}&lt;/span&gt;

 &lt;span class="nx"&gt;car&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;start&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Car Started&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, brand and color are properties, and start is a method.&lt;/p&gt;

&lt;p&gt;This syntax is called as - Object Literal.&lt;/p&gt;

&lt;p&gt;Using this syntax, you can access the object's properties and methods.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a Class in JavaScript
&lt;/h2&gt;

&lt;p&gt;Class in JavaScript is a blueprint for creating objects.&lt;/p&gt;

&lt;p&gt;When we need many Objects with similar dynamic properites (same key but different value for each object) we use class syntax.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Car&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  &lt;span class="nf"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;brand&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;color&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;brand&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;brand&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;color&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;color&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nf"&gt;start&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;brand&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; started&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;car1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Car&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Honda&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;White&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;car2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Car&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;BMW&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Black&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So now you can create as many objects you need , and they all have the same properties but differnet value, which you pass when creating the object.&lt;/p&gt;

&lt;p&gt;Now, if you're not just vibe coding, after seeing the above code you might be thinking:&lt;/p&gt;

&lt;p&gt;"Dude, what do constructor and the new keyword even mean?" why are we using these ?&lt;/p&gt;

&lt;p&gt;Don't worry you don't have to go to chatGpt and ask all this. Because i already did that for you. 😌&lt;/p&gt;

&lt;p&gt;But you can obviously go and argue with GPT , ask him questions to increase your understanding.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgbmxd6gosnvooomvoh4q.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgbmxd6gosnvooomvoh4q.jpg" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a Constructor &amp;amp; new keyword ??
&lt;/h2&gt;

&lt;p&gt;A constructor is a special method that runs automatically when an object is created.&lt;/p&gt;

&lt;p&gt;It is usually used to initialize properties for the object.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;
&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Car&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  &lt;span class="nf"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;brand&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;color&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;brand&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;brand&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;color&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;color&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nf"&gt;start&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;brand&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; started&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;car1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Car&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Honda&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;White&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;car2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Car&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;BMW&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Black&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this code the constructor is takign 2 values - brand and color &amp;amp; assigning them to the object using this keyword. &lt;/p&gt;

&lt;p&gt;Now as you can see - while creating eveyr object - each time we are using new keyword, but why? &lt;br&gt;
So when we do -&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const car1 = new Car("Honda", "White");&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now JavaScript is doing several things behind the scenes.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;It creates a new empty object in memory&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It links that object to the Car class prototype.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It runs the constructor and passes the arguments ("Honda", "White").&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It returns the newly created object.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So after running this code, now the object looks something like this -&lt;br&gt;
&lt;code&gt;{&lt;br&gt;
  brand: "Honda",&lt;br&gt;
  color: "White"&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;And it also has the access to all methods declared inside the class.&lt;/p&gt;

&lt;p&gt;Every time we are doing - new Car() , we are creating new objects.&lt;/p&gt;

&lt;p&gt;This whole "class" thing in javascript allows us to create as many objects we want by using a single blueprint.&lt;/p&gt;

&lt;p&gt;But you must have been thinking, if we create many objects, will the methods be copied many times?&lt;/p&gt;

&lt;p&gt;The answer is no..&lt;br&gt;
So let's talk about memory management a little bit , so t hat you can have a better clarity.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fudydpxsl5984zjhi4qjm.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fudydpxsl5984zjhi4qjm.jpg" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  How memory optimization works
&lt;/h2&gt;

&lt;p&gt;All objects created from a class share the same methods through the prototype. This helps JavaScript avoid duplicating methods in memory.&lt;/p&gt;

&lt;p&gt;So when we write this code -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Car&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;brand&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;brand&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;brand&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nf"&gt;start&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Car started&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The start() method is not duplicated for every object. Instead, JavaScript stores it once in something called the prototype, and every object simply references it.&lt;/p&gt;

&lt;p&gt;So this means -&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Each object stores its own data.&lt;/li&gt;
&lt;li&gt;But all objects share the same method.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now we have one more important thing to cover, which is known as Encapsulation. So let's try to understand what does it even mean ? And how it works ?&lt;/p&gt;

&lt;h2&gt;
  
  
  Basic Idea of Encapsulation
&lt;/h2&gt;

&lt;p&gt;Encapsulation is one of the core ideas in Object-Oriented Programming.&lt;/p&gt;

&lt;p&gt;In simple terms, encapsulation means hiding the internal details of an object and allowing access only through controlled methods.&lt;br&gt;
Think abut it like using a keyboard.&lt;/p&gt;

&lt;p&gt;You press a specific key and the key types in you computer. But don't directly manipulate the keyboards internal circuits.&lt;/p&gt;

&lt;p&gt;The complex implemention is hidden from you.&lt;br&gt;
In Programming, encapsulation works the same way. We protect important data inside a class and allow interaction through specific methods.&lt;/p&gt;

&lt;p&gt;In JavaScript, encapsulation is mainly done using :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;private fields (#)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Getters&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Setters&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Closures&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And If you are using Typescript then you also have public &amp;amp; private keywords like Java or C++.&lt;/p&gt;

&lt;p&gt;For now, I'm just sharing the basic idea of encapsulation here, because I'm still learning it myself and don't fully understand it yet.&lt;/p&gt;

&lt;p&gt;Once I learn it properly and get a deeper understanding, I'll definitely write another article explaining it in detail.&lt;/p&gt;

&lt;p&gt;So stay tuned! And if this blog helped you in any way, feel free to follow me for more learning notes and articles.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;OOP organises code using objects&lt;br&gt;
Classes act as blueprint for objects&lt;br&gt;
The constructor initializes object data&lt;br&gt;
The new keyword creates a new object&lt;br&gt;
Methods are shared through prototypes for memory efficiency&lt;br&gt;
Encapsulation hides internal detials &amp;amp; protects data&lt;/p&gt;

&lt;p&gt;If you found this helpful, feel free to connect with me on my social handles. I regularly share about what I'm learning on my social handles.&lt;br&gt;
🔹&lt;a href="https://www.linkedin.com/in/abhijit-ghosh-63b624235/" rel="noopener noreferrer"&gt;LinkedIn 🌻&lt;/a&gt;&lt;br&gt;
🔹&lt;a href="https://x.com/Abhijit_091" rel="noopener noreferrer"&gt;X 🌻&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>oop</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
