JS Inheritance Simplified with ES6 classes
Lets create a class , Staff :
class Staff {
constructor(empName, empId, dept, doj) {
this.empName = empName;
this.empId = empId;
this.dept = dept;
this.doj = doj;
}
//methods are added to the prototype property of the class
em...
breakthecode.hashnode.dev2 min read