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 Feeling Loopy with Java!
You have completed Feeling Loopy with Java!
Preview
For loops, instantiate, check if they should terminate, and then run some code.
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
When you know how many times you want
to loop, this is a great example for
0:00
when you want to use fors.
0:01
They're often called the C style for loop.
0:03
And it looks like a whole bunch of code
jammed into a little statement and
0:05
it's a little overwhelming at first.
0:09
Most C like languages implement them,
so you'll see it in Java Script,
0:11
you'll see them all over the place.
0:14
And it is an old school way
of looping over an array,
0:16
which we'll talk about arrays here in a
little bit, if you haven't heard of them.
0:19
But it's sort of an old school and
it's a little bit frowned upon, so
0:22
let's just jump into it.
0:26
Let's do 99 bottles of,
you know the old song,
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