var ball = new ball(a,b,c,d); function ball (A,B,C,D){ this.a = A; this.b = B; this.c = C; this.size = (A+B)*C*D; }