function Point(x, y) { this.x = x; this.y = y; } var p = new Point(3, 4); p.x + p.y