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?

Where The __proto__ Is Pointing When We Change The Prototype Of The Parent Object?

Normally when we create a new object using 'new' keyword, actually the __proto__ property o… Read more Where The __proto__ Is Pointing When We Change The Prototype Of The Parent Object?

Extending Native Elements In Javascript Via Prototype?

Would you consider extending the native elements via the prototype dangerous? I see some frameworks… Read more Extending Native Elements In Javascript Via Prototype?

When Can Javascript Start Calling Actionscript?

Question Is there a non-polling way for Javascript to command Flash right when its external interfa… Read more When Can Javascript Start Calling Actionscript?

"value Below Was Evaluated Just Now", What Does It Mean?

Folks! I am trying to list down what happens behind the scenes when new keyword is used to create a… Read more "value Below Was Evaluated Just Now", What Does It Mean?

Javascript: Object Or Object.prototype?

I just learned about prototype in Javascript (not the framework, the native feature). I perfectly g… Read more Javascript: Object Or Object.prototype?

Dataview And Prototypical Inheritance

From what I've gleamed online, one way to extend an object in JavaScript is by first cloning it… Read more Dataview And Prototypical Inheritance

Javascript Prototype Inheritance

This seems inconsistent, but probably is due to the fact that I'm new to javascript's proto… Read more Javascript Prototype Inheritance

Wrapping My Head Around Prototypes In Js

I've been trying to understand the concept of prototypes in JS, but for some reason I'm fin… Read more Wrapping My Head Around Prototypes In Js

Why Is `Object() === New Object()` Equal To `false`?

Why it returns false? let a = new Object() let b = Object() console.log(a) // {} console.log(b) // … Read more Why Is `Object() === New Object()` Equal To `false`?

Javascript Prototypical Inheritance Confused

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

Javascript Prototypical Inheritance Confused

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

Is There A Way To Add A Prototype To Variables (numbers), And The Prototype Can Change The Variable Itself?

I know its a bad idea to add prototypes to native javascript objects, but I'd like to add a pro… Read more Is There A Way To Add A Prototype To Variables (numbers), And The Prototype Can Change The Variable Itself?