Get immediate access to this and over 1,500+ other videos and books.

Boost your skills with a Beginner subscription. With over 60+ video courses and our core foundational programming books bundled in one subscription, it’s simply the best investment you can make in your development career.

Challenge: Play with For Loops

This video was last updated on May 3 2022

Practice using for loops on your own, through a hands-on challenge.


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++) {