Ok, so I'm using the following skeleton code to create a Javascript Library
var Device = (function(window, document, $) {
function func_1(){
return 1;
}
function func_2(){
return 2;
}
var internalDevice = {
func_1: func_1,
func_2: func_2
};
return internalDevice; // expose functionality to the rest of the code
})(window, document, jQuery);
Essentially, I would call my functions like so: Device.func_1();.
I'm looking to add a constructor that will initialize some private variables from the get-go i.e. as soon as the object is created, and without having to make any extra function call(s).
How do I do this?!
Thanks.