How does prototype delegation / inheritance work ?
Let us look at the following code snippet:
//constructor function
const Employee = function (empId, empName) {
//instance properties
this.empId = empId;
this.empName = empName;
};
This is a basic constructor , now what if I want to add a method ...
breakthecode.hashnode.dev2 min read