Programming in Dart: Control Flow & Collections

May 3 2022 Dart 2.15, DartPad, DartPad

Part 1: Control Flow

5. Challenge: Play with For Loops

Episode complete

Play next episode

Save for later
About this episode
See forum comments
Cinema mode Mark complete Download course materials
Previous episode: 4. Learn For Loops Next episode: 6. Iterate Over Collections

This video Challenge: Play with For Loops was last updated on May 3 2022

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

You can unlock the rest of this video course, and our entire catalogue of books and videos, with a Professional subscription.

Now that you’ve seen for-loops in action, it’s time to put your new found knowledge to the test. And for this, I want you to create a variable to hold the sentence, ‘Dart is cool’. Well, you can pick any sentence you want. The text isn’t so much the point.

const sentence = 'dart is cool';
for(var i=0;)
for(var i=0;i <12)
for(var i=0;i < sentence.dart)
for(var i=0;i < sentence.length; i++)
for(var i=0;i < sentence.length; i++) {