Too Long; Didn't Read
Classes were introduced as part of ECMAScript 6 standard back in 2015. They are just a "syntactical sugar over javascript's existing prototype-based inheritance" Classes are not natural to javascript, they are still a function. They feel like something natural, but how was it done in javascript before ES6? In this article, we examined how inheritance is done using ES6 standard and how it was done once upon a time in javascript. In fact, class is a function: a function serves as a constructor and returns an object.