| Defining Constructors | | This file shows how to set up a constructor "Rec".
The constructor typically has it is first letter in UPCASE.
An object is created by using the "new" constructor-name.
In the document.write there are calls to r.x, r.y and r.area
It should be noted that omitting the "()" returns the text string of the exact code for that routine - rather that the result of running that routine.
|