WEBVTT

1
00:00:00.000 --> 00:00:00.310
There is another function will repeatedly
call a call back after a delay

2
00:00:00.310 --> 00:00:01.490
continually.

3
00:00:01.490 --> 00:00:04.240
And that's the setInterval function.

4
00:00:04.240 --> 00:00:06.710
Now that we're used to a one off timer,

5
00:00:06.710 --> 00:00:11.420
we're going to use a repeat timer
to build a clock like this.

6
00:00:11.420 --> 00:00:14.410
Open the workspace
accompanying this video.

7
00:00:14.410 --> 00:00:18.400
In the clock.js file there's
some JavaScript code already.

8
00:00:18.400 --> 00:00:23.130
First, let's select in this section
element with the ID of clock on the page

9
00:00:23.130 --> 00:00:26.860
and assigning it to
the clockSection variable.

10
00:00:26.860 --> 00:00:30.000
Then we have a getTime function that
formats some time from today's date.
