I\'m trying to figure out how to construct my Javascript classes (or singleton objects) correctly.
var obj = new Object(); obj.foo = \'bar\'; obj.method = functi
If you're targeting a browser or environment that supports ES5, then you can do this:
var Person = { foo: ..., bar: ... }; var Mike = Object.create(Person, { baz: ... });