Month: June 2021

Inheritance in JS

Inheritance is the property by which one class can get the property of another class. This feature is also known as re-usability. One class inherit the another class using keyword extends. Example 1 – using Function <script> class...
READ MORE   >>

Getter and Setter methods in JS

In JavaScript, getter methods are used to get the value of an object by using get keyword and setter methods are used to set the value of an object by using set keyword. <script> class Person {     constructor(name)...
READ MORE   >>

Examples of Class and Object

We normally don't use the keyword function while creating function in class but if want to use then ignore the class keyword use as such. Example 3 using constructor with argument <script> class...
READ MORE   >>

Class ,Object and Constructor in JS

A class can be defined by using a class keyword with any particular name. In JavaScript, the name of the class always starts with an uppercase letter and object is the instance of class through which we can access the member of...
READ MORE   >>

Recent Comments

    • Copyright © 2020 (Er. Shairy Kalra). All Rights Reserved