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

Javascript Inheritance From Multiple Objects

I'm not very well aquainted with javascript inheritance, and I'm trying to make one object … Read more Javascript Inheritance From Multiple Objects

What Is The Reason Es6 Class Constructors Can't Be Called As Normal Functions?

ES6 class constructors can't be called as normal functions. According to ES6 a TypeError should… Read more What Is The Reason Es6 Class Constructors Can't Be Called As Normal Functions?

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

Will Javascript Ever Become A 'proper' Class Based Language?

I'm referring to MDN's article on JavaScript's 'future reserved words' (for use… Read more Will Javascript Ever Become A 'proper' Class Based Language?

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

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