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

Minor Drawback With Crockford Prototypical Inheritance

Just experimenting with different inheritance techniques in JS, and came across something mildly di… Read more Minor Drawback With Crockford Prototypical Inheritance

Javascript - How To Initialize Super Class If Super Class Constructor Takes Arguments

Consider the following Javascript snippet, var SuperClass = function(x){ this.x = x; this.a… Read more Javascript - How To Initialize Super Class If Super Class Constructor Takes Arguments

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

Why Defining Properties In The Prototype Is Considered An Antipattern

I often see this pattern to define javascript objects function Person(name) { this.name = name;… Read more Why Defining Properties In The Prototype Is Considered An Antipattern

What Is The Alternative Equivalent Of Javascript "prototype" In Typescript?

Typescript provides Object Oriented & Generic programming paradigms apart from Functional progr… Read more What Is The Alternative Equivalent Of Javascript "prototype" In Typescript?

The Constructor Of Object.prototype

In JavaScript, every object inherits its properties and methods from a specific prototype, where pr… Read more The Constructor Of Object.prototype