Conclusion

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

In this lesson you learned about the following topics:

  • the range concept and its notation
  • the loops concept and the purpose of the loop
  • different kinds of loops: for, do-while, and while
  • how to control the flow of the loop using the break and continue statements

You use loops to repeat the same code for different data. If you want to iterate over a range or other defined series of elements, use the for loop. If you want to loop until a certain condition is met, use the while loop or do-while loop. When defining the range, remember to use the appropriate operator depending on direction. If you use consecutive, adjacent ranges, choose the open-ended variants.

I hope you enjoyed the lesson. In the next lesson, you will learn about the null values. See you soon!

See forum comments
Download course materials from Github
Previous: Demo Next: Quiz: Loop Code