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

Object.defineproperty Or .prototype?

I've seen two different techniques of implementing non-native features in javascript, First is:… Read more Object.defineproperty Or .prototype?

Oop Javascript - Is "get Property" Method Necessary?

Given a very simple js object constructor and its prototype... function MyTest(name) { … Read more Oop Javascript - Is "get Property" Method Necessary?

Why Is __proto__ Undefined?

While reading on Javascript's prototypes I encountered this behaviour I can't explain. I am… Read more Why Is __proto__ Undefined?

'this' Keyword Overriden In Javascript Class When Handling Jquery Events

I have defined a class in JavaScript with a single method: function MyClass(text) { this.text =… Read more 'this' Keyword Overriden In Javascript Class When Handling Jquery Events

Why Doesn't Any Object Prototype Work As A Foreach Callback?

Rather than a question, I just wanted it to be a challenge but couldn't find an answer yet. For… Read more Why Doesn't Any Object Prototype Work As A Foreach Callback?

Javascript Prototypical Inheritance Confused

given the standard way of achieving inheritance like this function BaseClass() { } function SubCl… Read more Javascript Prototypical Inheritance Confused

Object Has No Method Javascript

I don't know why I am getting this problem. I have used prototype before in javascript and it w… Read more Object Has No Method Javascript

Why Is Reassigning Object.prototype Not Working?

Why this is not working? // this one works as I expected, when objSayHello() Object.prototype.objSa… Read more Why Is Reassigning Object.prototype Not Working?