Write a constructor function called Rectangle
with arguments length
and width
, in that order, and methods setLength
, setWidth
, and getArea
. getArea
should return the current correct value for the rectangle's area. Define data properties and use a prototype object as appropriate.