Category: ES5

Made by Marvin Drude

JavaScript Classes ES5 vs ES6

I just wanted to show the difference between classes in JavaScript ES5 and ES6. Let’s start with ES5 and the decleration of the class itself. As you can see, we declare a class and its constructor just like another function. Having done this we can continue with beginning to write methods of the class Animal. …