How to implement JS class and Inheritance

Daminda Dinesh Imaduwa Gamage
6 min readMay 13, 2022

What is a JavaScript Class?

A class is a template for creating objects in JavaScript. It has properties and methods. JavaScript offers two access levels to fields and methods: public and private. The private access level is a relatively recent addition, and some browsers may not yet have the support for it.

How to create a class

In convention, the first letter of a class name is a capital letter.

Class declaration

--

--