var Point = function (x, y) { this.x = function () {return x;} this.y = function () {return y;} } p = Point(1,2); print("x is " + x); print("p.x() is: " + p.x());
Output