javascript variables are untyped classes: // Define function literals and assign them // to properties of the prototype object. Point.prototype.distanceTo = function(that) { var dx = this.x - that.x; var dy = this.y - that.y; return Math.sqrt(dx*dx + dy*dy); } Point.prototype.toString = function () { return '(' + this.x + ',' + this.y + ')'; } Point.ORIGIN = new Point(0,0); // Call constructor to create a new Point object var p = new Point(3,4); // Invoke a method of the object, using a static // property as the argument. var d = p.distanceTo(Point.ORIGIN); // Adding the object to a string implicitly // invokes toString(). var msg = "Distance to " + p + " is " + d; ............................. getTime( ) Returns the internal millisecond representation of the date; that is, returns the number of milliseconds between midnight (UTC) of January 1st, 1970 and the date and time represented by the Date object. Note that this value is independent of timezone. .............................