Closures:
=========
Document
=====================================================
Document
================================================
Document
=========================================================
Document
The Car Milage is =
The Car Milage after the updating is =
====================================================================
Inheritance:
============
Single Inheritance
==================
class Employee{
constructor(ename, eid, salary)
{
this.ename = ename;
this.eid = eid;
this.salary = salary;
}
display(){
console.log("Name = ",this.ename);
console.log("Id = ",this.eid);
console.log("Salary = ",this.salary);
}
}
class FullTimeEmployee extends Employee{
wish()
{
console.log("Welcome to Ashok IT.");
}
}
fte = new FullTimeEmployee("Kishore",1321,67000);
fte.wish()
fte.display();
Multi-level Inheritance
=======================
Syntax:
class Parent{
}
class Child extends Parent{
}
class Grandchild extends Child{
}
Multiple Inheritance
=====================
Hierarchy Inheritance
Hybrid Inheritance