Inheritance in Javascript (ES6)
INHERITANCE : The extends keyword is used in class declarations or class expressions to create a class which is a child of another class. class ChildClass extends ParentClass { ... } The extends keyword can be used to subclass custom classes as well as built-in objects. The .prototype of the extension must be an Object or null . Examples : - Using extends - Please click on this link https://googlechrome.github.io/samples/classes-es6/index.html for a better example. Using extends with built-in objects - class myDate extends Date { constructor ( ) { super ( ) ; } getFormattedDate ( ) { var months = [ 'Jan' , 'Feb' , 'Mar' , 'Apr' , 'May' , 'Jun' , 'Jul' , 'Aug' , 'Sep' , 'Oct' , 'Nov' , 'Dec' ] ; return this . getDate ( ) + '-' + months [ this . getMonth ( ) ] + '-' + th...