CHAPTER 14

image

Flow Control Statements

In this chapter we’ll see the flow control statements used in our programs to change the execution flow or to repeat sentences. We’ll see if-else and switch statements.

Later we’ll see the loops statements in Dart for loop and while loop that allow you to repeat blocks of code in your applications. We’ll also see for-in and forEach loops that work with collections.

As you know, a program is a sequence of statements executed sequentially. There are two types of statements:

  • Simple statements: run one after another
  • Control statements: allow you to change the flow of program execution by introducing cycles and conditions ...

Get Web Programming with Dart now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.