You have probably heard of the terms prototypical inheritance and classical inheritance a lot. But what do they actually mean?

Before digging into these inheritance definitions, you need to understand what are prototypes and classes are in javascript.

A Prototype is an object that contains a list of methods and fields that are accessible by default.

Let’s take indexOf method from string for example. We never defined it but yet anytime we want to access this method from any string, we can do it.

#javascript #prototype #es5 #es6 #class

Brief prototypical inheritance vs classical inheritance in Javascript
2.40 GEEK