Javascript Object, Prototype and Inheritance
Most of the things we create in javascript is an object including arrays, functions. Even the primitives(string, number, null, undefined, boolean) which exists have wrapper around them, thats the reason we can call functions on…