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 Practice JavaScript Loops!
You have completed Practice JavaScript Loops!
Preview
In this practice session, you'll use a loop to create a number guessing game.
Resources
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
Hi everyone, Guil here.
0:00
In this practice session you'll build
up your JavaScript skills by practicing
0:01
the basics of loops.
0:05
You've learned that loops
provide a quick and
0:06
easy way to repeat a block of
JavaScript code multiple times.
0:08
And JavaScript supplies several
statements for creating loops.
0:11
So far you've learned about statements
like while, do while, and for.
0:14
In this session, you're going to use
a loop to create a number guessing game
0:18
that matches a user against the computer.
0:22
When the page loads,
a prompt dialog box appears.
0:25
The user has to try to guess
the number between 1 and 10.
0:28
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