My Blog

My WordPress Blog

My Blog

My WordPress Blog

Inheritance

Inheritance in JavaScript The concept of inheritance in JavaScript allows the child class to inherit the properties and methods of the parent class. Inheritance is also a fundamental concept of object-oriented programming like encapsulation and polymorphism. Sometimes, you must add the properties and methods of the one class into another. For example, you have created a general class for the […]

Encapsulation

What is Encapsulation? Encapsulation in JavaScript is a way to keep the related properties and methods under a single namespace by bundling them. It can be a function, a class or an object. In JavaScript, the encapsulation can be implemented using closures, classes and getters and setters. Encapsulation is a fundamental concept in Object-oriented programming […]

Native Prototypes

Native Prototypes The native prototypes in JavaScript are property of Object.prototype object. The prototypes are the mechanism by which the objects inherit features from one another. In JavaScript, each object contains the prototype property. The prototype of each object contains the methods and properties related to the object. So, it is also called the native prototype. However, you can update or add new methods and properties […]

Static Methods

What are Static Methods? A static method in JavaScript is defined using the static keyword followed by the method name. You can execute the static method by taking the class name as a reference rather than an instance of the class. The main benefit of the static method is that it can be used to create a utility function that doesn’t require the […]

Classes

JavaScript Classes The JavaScript classes are a blueprint or template for object creation. They encapsulate the data and functions to manipulate that data. We can create the object using classes. Creating an object from a class is referred to as instantiating the class. In JavaScript, the classes are built on prototypes. The classes are introduced to JavaScript […]

Scroll to top