Programming in Dart: Control Flow & Collections

May 3 2022 · Dart 2.15, DartPad, DartPad

Part 1: Control Flow

02. Understand While Loops

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: 01. Introduction Next episode: 03. Challenge: Use While Loops

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.

Heads up... You've reached locked video content where the transcript will be shown as obfuscated text.

What if you had to write some Dart code to print out a string 100 times?

var counter = 1;
while (counter < 10)
while (counter < 10) {

}
while (counter < 10) {
    print(counter);
    counter += 1;
}
while (counter < 10) {
  print(counter);
  counter += 1;
}
print('Counting up again');
counter = 1;
do {

}
do {
  print(counter);
  counter += 1;
} 
do {
    print(counter);
    counter += 1;
} while (counter < 10);
var counter = 10;

counter = 10;