Skip to content Skip to sidebar Skip to footer
Showing posts with the label Prototype Programming

Javascript Inheritance: When Constructor Has Arguments

Using pure JavaScript to do inheritance, this is what I usually do: function A() {} A.prototype.run… Read more Javascript Inheritance: When Constructor Has Arguments

Correct Way To Inherit React Components

I understand that my question is a little bit biased, but I am very new in Javascript and prototype… Read more Correct Way To Inherit React Components

JavaScript: Modify Prototype Of An Object's Variable?

Here is an object: var obj = new function(){ this.prop = {}; } and I try to do something like:… Read more JavaScript: Modify Prototype Of An Object's Variable?

How To Create An Object With Private Members Using Object.create() Instead Of New

EDIT: I figured it out from Bergi's answer in the end. Thanks Bergi. pubPrivExample = (functio… Read more How To Create An Object With Private Members Using Object.create() Instead Of New