Skip to content Skip to sidebar Skip to footer
Showing posts with the label Prototypal Inheritance

Inherit Prototype Methods From Other Classes Without Overriding Own Prototype Methods

Is there a better way of having a class inherit prototype methods from another class and still be a… Read more Inherit Prototype Methods From Other Classes Without Overriding Own Prototype Methods

Add Formats To Native Date Parser

I was wondering if there was any way to add (and map) formats to the native Date parser in javascri… Read more Add Formats To Native Date Parser

In Javascript, The Difference Between 'object.create' And 'new'

I think the difference has clicked in my head, but I'd just like to be sure. On the Douglas Cro… Read more In Javascript, The Difference Between 'object.create' And 'new'

Resetting The Constructor Property Of Prototype Object

Consider the following snippet: function shape(){ this.name = '2d shape' } function tr… Read more Resetting The Constructor Property Of Prototype Object

How Could This Be True??? Obj2.__proto__.isprototypeof(obj2) //true

Consider this short code: let obj1 = { name: 'obj1', } const obj2 = Object.create(obj1);… Read more How Could This Be True??? Obj2.__proto__.isprototypeof(obj2) //true