explanation: In the BODY a new date is created and printed;
then a Clock object is created,
  thisClock = new Clock(timenow.getHours(),timenow.getMinutes(),timenow.getSeconds());
and DisplayClock(thisClock) is called;
 
    function Clock(hours, minutes, seconds)
    { this.hours = hours; this.minutes = minutes; this.seconds = seconds;
    }
    function DisplayClock(Clock)
    { var clockdisp=Clock.hours + ":" + Clock.minutes + ":" + Clock.seconds;
      document.write("<BR>The time is:" + clockdisp);
    }                    


Return to Main Page