Javascript Inheritance: Essentially, in javascript, it’s all about functions, and it can work as a class like so. (A very power concept, (I think, unique in js?), that a function is a class!!!) function Pet(name, parent) { this.name = name; this.parent = parent; } // the syntax is keyword (1)function…