JavaScript Inheritance with IIFE and prototype in ES5

I try demonstrate inheritance with immediately invokable function expression(IIFE) and prototype in the following code. This sample code is written in different concept like https://kenanhancer.com/2018/01/22/javascript-inheritance-with-function-declaration-and-prototype-in-es5/ and https://kenanhancer.com/2018/01/22/javascript-class-inheritance-override-in-es6/ .

Check those post as well so that you see differences. 🙂

JavaScript Class, Inheritance, Override in ES6

ES6, also known as ECMAScript2015, introduced classes. Notice that classes are used in order to use inheritance. This example is written with function declaration in https://kenanhancer.com/2018/01/22/javascript-inheritance-with-function-declaration-and-prototype-in-es5/

Presumably this demo looks more friendly to you 🙂 actually I think so. But don't forget that no magic here still, this code is also transpiled(or compiled) to ES5 for browser compatibility.