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
you can also use something like:
function O(x,y) { this.x=x; this.y=y; this.method=function() {...} return this; } var o=new O(0,0);