Java Reference
In-Depth Information
Summary
In this chapter we have learned the following:
• arrays are an ordered list of values
• multidimensional arrays contain arrays
• arrays have lots of methods that can be used to manipulate items in the array
• we can use an
if
and
else
statement to control the flow of code
• the
switch
statement can be used instead of multiple
if
and
else
statements
• a
while
loop and
do ... while
loop can be used to repeat a block of code
while a condition is still true
• a
for
loop works in a similar way to a
while
loop, but has a different syntax
• a
for
loop can be used to iterate over an array
In the next chapter we'll be learning all about functions, a fundamental part of the JavaScript
language.