Many many different ways for doing similar things. Let's see if I remember how ...
1) Create object with dynamically added members, and prototypal inheritance from that object:
- http://pastie.org/2661313
2) Create object with function constructor, and parasitic inheritance from that object:
- http://pastie.org/2661334
3) Create object with object literals, and prototypal inheritance from that object:
- http://pastie.org/2661348
4) Create object with prototype, and pseudoclassical inheritance from that object:
- http://pastie.org/2681962
5) Create object with Powerconstructor pattern (a.k.a. module pattern), and parasitic inheritance from that object:
- http://pastie.org/2661396
Personally I find the syntax of 1), 3) and 4) unnecessarily complicated and tricky.
I like the syntax of 2) and...