How's it going so far?
Do you have your images, are they rotating every three seconds?
Are your dots clickable?
OK, quick trick question, because right now, as we've left the script off, we are only outputting
the index value of the image that we want to show.
So we need to take care of that and we need to update that code.
So going into where we've got our move slides function.
So it's the one right here at the bottom.
Right now, all we're doing is console logging out the number.
And this is going to be a very easy fix where we take their slight index and we call out to them because
remember, the slide index is a global variable.
We need to clear the time out counter.
So this is clearing the time out.
So the same timer that we set over here, all we need to do is clear that out so that that stops running
and then we need to play slides once again.
Let's try that.
And now whenever we click one of these, so we'll see that it's rotating every three seconds.
But wait, we want to go back to image number one.
So we click the first one and we end on image number one.
And now we want to see three.
Now we want to see two.
We'll see one again, three to one.
And we can manually override the automated movement of our slide.
And then as soon as we leave it, it picks up where it's left off.
So if we move it back to one, then it picks up again in slide number one, we see it for three seconds
and then moves to two, three and so on.
So all of the functionality is there.
Add this into your project and the next lesson, we'll do a quick code review just to make sure that
everything is working as intended.