Top "Prototype-programming" questions

Prototype programming is a type of object-oriented programming that eschews the use of classes.

Better way to sum a property value in an array

I have something like this: $scope.traveler = [ { description: 'Senior', Amount: 50}, { description: 'Senior', Amount: 50}, { description: 'Adult', Amount: 75}, { description: 'Child', Amount: 35}, { description: …

javascript arrays prototype-programming
JavaScript: Class.method vs. Class.prototype.method

What is the difference between the following two declarations? Class.method = function () { /* code */ } Class.prototype.method = function () { /* code using this.…

javascript oop prototype-programming
how does Array.prototype.slice.call() work?

I know it is used to make arguments a real array, but I don't understand what happens when using Array.…

javascript prototype-programming
Javascript inheritance: call super-constructor or use prototype chain?

Quite recently I read about JavaScript call usage in MDC https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/…

javascript inheritance call chaining prototype-programming
Benefits of prototypal inheritance over classical?

So I finally stopped dragging my feet all these years and decided to learn JavaScript "properly". One of the most …

javascript oop inheritance language-design prototype-programming
prototype based vs. class based inheritance

In JavaScript, every object is at the same time an instance and a class. To do inheritance, you can use …

javascript oop inheritance prototype-programming
Preserving a reference to "this" in JavaScript prototype functions

I'm just getting into using prototypal JavaScript and I'm having trouble figuring out how to preserve a this reference to …

javascript oop scope this prototype-programming
What’s the purpose of prototype?

Possible Duplicate: Use of 'prototype' vs. 'this' in JavaScript? OK, So I am somewhat new to the idea of OOP …

javascript prototype-programming
What does it mean that Javascript is a prototype based language?

One of the major advantages with Javascript is said to be that it is a prototype based language. But what …

javascript oop inheritance prototype-programming
How does __proto__ differ from constructor.prototype?

function Gadget(name, color) { this.name = name; this.color = color; } Gadget.prototype.rating = 3 var newtoy = new Gadget("webcam", "black") newtoy.…

javascript inheritance prototype-programming