You can do it using the module pattern. Just like:
var foo = function() {
var that = {};
that.a = 7;
that.b = 6;
that.c = function() {
return that.a + that.b;
}
return that;
};
var fooObject = foo();
fooObject.c(); //13
With this pattern you can instantiate several foo objects according to your need.