Let us make a form based clock that displays time in the 24 hour format. We use the Date() object to get the hours, minutes, seconds of the day. setTimeoiut() evaluates an expression or calls a function after a certain amount of time, specified in milliseconds. We use setTimeout() to call the update() function every one second. So the clock in the text element is updated every second.
|All times are GMT +5.5. The time now is 11:34.|