Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking for a comprehensive (or as close as possible) list of all the prototype-programming style javascript work done to date. Does anyone know of such a list somewhere, or have the knowledge to compile it somewhere and then reference it here?

share|improve this question

closed as too broad by gnat, Ixrec, Scant Roger Nov 29 '15 at 6:50

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

What do you need to know for? – Dean Harding Mar 30 '11 at 22:56
I'm curious - I'd like to geek out different styles/approaches, especially in Javascript, where I can get a rough comparison to functional and class based styles. – blueberryfields Mar 30 '11 at 23:07
Just wondering: AFAIK, all JS code is prototype-based. Are you using a function? You're using an object that uses the Function.prototype, which in turn inherits from the Object.prototype. Are you using arrays, Array.prototype inherits from Object.prototype, are you doing as simple as 'string constant'.charCodeAt(0), you're creating a temporary instance of String, which inherits from String.prototype, which in turn inherits from Object.prototype. Same goes for window and document... everything is an object, everything is prototype-based – Elias Van Ootegem Mar 10 '14 at 13:10
@Elias Javascript's "prototype" isn't "prototype-programming" - please read the linked wikipedia article for details ;) in retrospect, maybe i should have said "classless" or "instance-based", to avoid exactly this kind of error – blueberryfields Mar 10 '14 at 17:45
up vote 1 down vote accepted

The short answer is that a comprehensive list probably does not exist.

Here is a resource that compares class and prototyped based Javascript, which includes examples of the styles you asked for:

You might want to consider a broader question and the possibly flawed underpinnings of class-based design (particularly for JavaScript): Why make JavaScript class based?

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.