Summary
In this chapter, you looked at closed and half-open range operators, which allow you to specify a range of numbers rather than specifying every individual number discretely.
You also learned about the three different loop types, the for-in
loop, the while
loop, and the repeat-while
loop. The for-in
loop allows you to repeat a set of statements a fixed number of times, and the while
and repeat-while
loops allow you to repeat a set of statements if a condition is true. Great job!
In the next chapter, you will study collection types, which allow you to store a collection of data referenced by an index, a collection of key-value pairs, and an unstructured collection of data.