Object Oriented Programming, Javascript style !!

Hello folks, let us start with object oriented programming in JS, object oriented programming is one of the traditional paradigm, which tells us that we should treat real world entities as object, extract all their important/unique attributes and build a blueprint which is called as class, additionally in classes we write functions which work on that data and give us required output. Any object oriented language supports below listed features

  1. Encapsulation :- as the name suggests, it is to squeeze in all the important details of any one entity at one place, this gives us the brief idea of how any object would look from Developer/engineer's POV. Classes in JS

  2. Inheritance :- this is about how to pass a properties of any Object down to another some other Object, so that a object can have its own properties as well as properties of the object which has passed down properties. Inhertiance in JS;

  3. Polymorphism :- The ability to call the same method on different objects and have each of them respond in their own way is called polymorphism.

PS.in the next part of this blog we'll be covering how to use classes (i.e make objects) and more about classes