Constructor Pattern
function Class(param1, param2) { this.var1 = param1; this.var2 = param2; this.method = function() { alert(param1 + "/" + param2); }; }; var instance = new Class("value1", "value2");