Js; clock by window.setInterval

The following code displays the current time in a Text object.

In the startclock function, the call to the setInterval method causes the showtime function to be called every second to update the clock.

Notice that the startclock function and setInterval method are each called only one time.