“Super” and “Extends” In JavaScript ES6 - Understanding The Tough Parts

Photo by Clément H on Unsplash

super and extends In Action

ES6 Class and Subclass Syntax

Traditional JavaScript Classes

Object-Oriented JavaScript Before ES6

Comparison Between ES6 And Traditional JavaScript Code

Class Declaration

Class Declaration Comparison

Methods As Part Of The Class

Method Declaration Comparison

Mapping extends To Traditional JavaScript

Mapping extends keyword to traditional approach

Mapping super To Traditional JavaScript

Mapping super keyword to traditional approach

Conclusion

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store