function Test(param1, param2, param3) {
this.param1 = param1
this.param2 = param2
this.param3 = param3 || 4
this.fn1 = function() {
console.log(this.param1 + this.param2 + this.param3);
}
this.fn2 = function() {
console.log(this.param1 * this.param2 * this.param3);
this.fn1();
}
}
var a = new Test(1, 2, 3);
a.fn2();