Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Callback Functions in JavaScript!
You have completed Callback Functions in JavaScript!
Preview
In this video, we'll explore using anonymous functions with `setInterval`.
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
And to think if it's possible to
use one with our clock application.
0:00
While it is possible to use an anonymous
function with the set interval function,
0:01
we shouldn't really use one in this
application, let me show you why.
0:06
Let me cut and paste tickClock into this
0:11
setInterval function,
and make it anonymous.
0:16
But what happens to the tickClock
invocation outside of the setInterval?
0:23
We don't have the function
to call anymore,
0:29
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up