Programming in Dart: Control Flow & Collections

May 3 2022 · Dart 2.15, DartPad, DartPad

Part 1: Control Flow

10. Conclusion

Episode complete

Play next episode

Next
About this episode
Leave a rating/review
See forum comments
Cinema mode Mark complete Download course materials
Previous episode: 09. Use a Switch Statement Next episode: 11. Introduction

Get immediate access to this and 4,000+ other videos and books.

Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and 4,000+ professional videos in a single subscription, it's simply the best investment you can make in your development career.

Learn more Already a subscriber? Sign in.

Transcript: 10. Conclusion

Nice work on completing the first part of this course. Between the loops and switch statement, we covered a lot of ground. Already your toolbox is expanding as you have the tools to perform repetitive tasks as well as another way to branch logic.

We started this part with an overview of the while and do while loop. Remember the big difference between a while loop and a do while loop is that the do-while loop will always run at least once whereas the while loop will check the expression first.

You then learned about the for loop. The for loop requires you to manage the lifetime of the loop which means, you may run into bugs like infinite loops but it does give you a lot of control and flexibility.

Afterwards, you learned of the for-in loop. This is loop is perfectly suited for looping over collections like the list. It takes care of all the work of managing the loop, but makes it easier accessing individual elements.

Once you learned all the loops, you learned about nested loops. You saw how you could exit loops using the break statement and how to skip an iteration of the loop using the continue statement. You even how to use labels to jump around in a loop.

Finally, we concluded this part with an exploration of the switch statement which is an alternative to the if statement.

Wow that was lot of concepts we covered, but we have more coming. In the next part, you will be learning a few more collection classes. These new collections will form the foundation of your programs so take a break and meet me in part two.