TLDR
Object.create and new operator are different methods used in Javascript. Object.prototype is created in an object and is assigned to its own property. Object.create creates an object having its own properties defined as a second property. New operator creates an empty object and runs Animal constructor in newly created object context. Animal.prototype.getName = function ( ) { this.name = null ; } Animal.prototype.prototype.getName;. Animal. constructor will run so whatever script is written in Animal constructor will. run. Object object is stored in Animal.call(obj)via the TL;DR App
no story
Written by vaibhavsilar | writing simple code is the most complex task