Your first "for" loop Awesome! Now let's write our outer for loop. 3/7


Below your existing code, create a for loop that starts at 0, continues until it reaches the end of text, and** increments by 1** each time. (This means it will check each character in the string.) There's no need to write anything between the {}s of your loop just yet.

PS:I understand and know how to do the sections in bold,but i am confused on how finish the rest,can someone assist me in solving it?

for(var i = 0; i < condition;** i++**){
//Do something!


Hi there @phoenixndragonrfrens basically this is what you have to do -

for(i = 0; i < text.length; i++) {}

Basically text.length goes through the "i" numbered character in the text variable (At the start that is 0 ) and the i++ counts upward to the next character.


In this part of the lesson, your for loop is executing four steps on every repeat. The steps are executed in this order:

Step 1: var i = 0;
This is your starting point.

Step 2: i < text.length;
This condition must be true in order for the loop to continue. In the context of this lesson, text.length is used as the condition because we want the loop to stop when we reach a point in the text where the length of myName is no longer available.

Step 3: Because i < text.length; is true, this tells the loop to execute the //Do something! block of code.

Step 4: Only when //Do something! is completed does the loop execute the i++ part. i++ (short for i + 1) now updates the statement in Step 1 to i = 1. This proccess will continue with the i variable increasing in value until Step 2 is no longer true.

:grin: Hope this helps, keep at it!