Noob seeks advide on some LED code

Hi everyone- I'm a new member and new to Arduino and was looking for some advice on a looping LED chaser that I am having some trouble implementing some additional code to and am looking for some guidance if possible. I have looked up some resources and done some trial and error but no luck.
Here is the general concept. I have a 10 LED chaser using the code below, which works okay and is set on a loop.

int LED1 = 2;
int LED2 = 3;
int LED3 = 4;
int LED4 = 5;
int LED5 = 6;
int LED6 = 7;
int LED7 = 8;
int LED8 = 9;
int LED9 = 10;
int LED10 = 11;
void setup()
{

pinMode(LED1, OUTPUT);
pinMode(LED2, OUTPUT);
pinMode(LED3, OUTPUT);
pinMode(LED4, OUTPUT);
pinMode(LED5, OUTPUT);
pinMode(LED6, OUTPUT);
pinMode(LED7, OUTPUT);
pinMode(LED8, OUTPUT);
pinMode(LED9, OUTPUT);
pinMode(LED10, OUTPUT);

}

void loop()
{
digitalWrite(LED1, HIGH); // turn on LED1
delay(125); // wait for 25ms
digitalWrite(LED2, HIGH); // turn on LED2
delay(7); // wait for 7ms
digitalWrite(LED1, LOW); //turn off LED1
delay(25); // wait for 25ms
digitalWrite(LED3, HIGH); //turn on LED3
delay(7); // wait for 7ms
digitalWrite(LED2, LOW); //turn off LED2
delay(25); // wait for 25ms
digitalWrite(LED4, HIGH); //turn on LED4
delay(7); // wait for 7ms
digitalWrite(LED3, LOW); //turn off LED3
delay(25); // wait for 25ms
digitalWrite(LED5, HIGH); //turn on LED5
delay(7); // wait for 7ms
digitalWrite(LED4, LOW); //turn off LED4
delay(25); // wait for 25ms
digitalWrite(LED6, HIGH); //turn on LED6
delay(7); // wait for 7ms
digitalWrite(LED5, LOW); //turn off LED5
delay(25); // wait for 25ms
digitalWrite(LED7, HIGH); //turn on LED7
delay(7); // wait for 7ms
digitalWrite(LED6, LOW); //turn off LED6
delay(25); // wait for 25ms
digitalWrite(LED8, HIGH); //turn on LED8
delay(7); // wait for 7ms
digitalWrite(LED7, LOW); //turn off LED7
delay(25); // wait for 25ms
digitalWrite(LED9, HIGH); //turn on LED9
delay(7); // wait for 7ms
digitalWrite(LED8, LOW); //turn off LED8
delay(25); // wait for 25ms
digitalWrite(LED10, HIGH); //turn on LED10
delay(7); // wait for 7ms
digitalWrite(LED9, LOW); //turn off LED9
delay(25); // wait for 25ms }
digitalWrite(LED10, HIGH); // turn on LED10
delay(7); // wait for 7ms }
digitalWrite(LED10, LOW); // turn off LED10
delay(500); // wait for 500ms }
}

After 10 iterations of the loop, I want all 10 LEDs to go solid for 2 seconds using the code below, then proceed to another 10 iterations of the loop, and to repeat this pattern.

digitalWrite(LED1, HIGH); // turn on LED1
digitalWrite(LED2, HIGH); // turn on LED2
digitalWrite(LED3, HIGH); //turn on LED3
digitalWrite(LED4, HIGH); //turn on LED4
digitalWrite(LED5, HIGH); //turn on LED5
digitalWrite(LED6, HIGH); //turn on LED6
digitalWrite(LED7, HIGH); //turn on LED7
digitalWrite(LED8, HIGH); //turn on LED8
digitalWrite(LED9, HIGH); //turn on LED9
digitalWrite(LED10, HIGH); //turn on LED10
delay(2000); // wait for 2000ms
digitalWrite(LED1, HIGH); // turn offLED1
digitalWrite(LED2, HIGH); // turn offLED2
digitalWrite(LED3, HIGH); //turn offLED3
digitalWrite(LED4, HIGH); //turn offLED4
digitalWrite(LED5, HIGH); //turn offLED5
digitalWrite(LED6, HIGH); //turn offLED6
digitalWrite(LED7, HIGH); //turn offLED7
digitalWrite(LED8, HIGH); //turn offLED8
digitalWrite(LED9, HIGH); //turn offLED9
digitalWrite(LED10, HIGH); //turn offLED10
}

Can you guys provide me with an explanation and/or resources I can look at?

Thanks in advance and glad to be here!

Use a for loop to get the 10 iterations of the first bit and then have the second bit.

Please read the forum instructions in the "How to use this forum - please read" post at the top of any of the boards. You'll find it is harder to get help here when you thumb your nose at the posting guidelines. Reading the instructions and documentation on things first is CRUCIAL to success in this hobby.

Thanks for your quick response Delta-

I have been trying to figure out the For loop for a while today and this is the closest I have come:

The For Loop alternates between flashing and solid but only goes through 1 iteration of flashing. Not sure why it is not repeating. Here is my code:

int LED1 = 2; 
int LED2 = 3; 
int LED3 = 4; 
int LED4 = 5; 
int LED5 = 6; 
int LED6 = 7; 
int LED7 = 8; 
int LED8 = 9;
int LED9 = 10; 
int LED10 = 11; 


void setup() 
{ 
pinMode(LED1, OUTPUT); 
pinMode(LED2, OUTPUT); 
pinMode(LED3, OUTPUT); 
pinMode(LED4, OUTPUT); 
pinMode(LED5, OUTPUT); 
pinMode(LED6, OUTPUT); 
pinMode(LED7, OUTPUT); 
pinMode(LED8, OUTPUT); 
pinMode(LED9, OUTPUT); 
pinMode(LED10, OUTPUT);
} 

void loop() 
{ 
// For Loop:
for (int i =0; i < 10; i++){

//Turn pins on in sequence:
digitalWrite(LED1, HIGH); // turn on LED1 
delay(125); // wait for 25ms 
digitalWrite(LED2, HIGH); // turn on LED2 
delay(7); // wait for 7ms 
digitalWrite(LED1, LOW); //turn off LED1 
delay(25); // wait for 25ms 
digitalWrite(LED3, HIGH); //turn on LED3 
delay(7); // wait for 7ms 
digitalWrite(LED2, LOW); //turn off LED2 
delay(25); // wait for 25ms 
digitalWrite(LED4, HIGH); //turn on LED4 
delay(7); // wait for 7ms 
digitalWrite(LED3, LOW); //turn off LED3 
delay(25); // wait for 25ms 
digitalWrite(LED5, HIGH); //turn on LED5 
delay(7); // wait for 7ms 
digitalWrite(LED4, LOW); //turn off LED4 
delay(25); // wait for 25ms 
digitalWrite(LED6, HIGH); //turn on LED6 
delay(7); // wait for 7ms 
digitalWrite(LED5, LOW); //turn off LED5 
delay(25); // wait for 25ms 
digitalWrite(LED7, HIGH); //turn on LED7 
delay(7); // wait for 7ms 
digitalWrite(LED6, LOW); //turn off LED6 
delay(25); // wait for 25ms 
digitalWrite(LED8, HIGH); //turn on LED8 
delay(7); // wait for 7ms 
digitalWrite(LED7, LOW); //turn off LED7 
delay(25); // wait for 25ms 
digitalWrite(LED9, HIGH); //turn on LED9 
delay(7); // wait for 7ms 
digitalWrite(LED8, LOW); //turn off LED8 
delay(25); // wait for 25ms 
digitalWrite(LED10, HIGH); //turn on LED10 
delay(7); // wait for 7ms 
digitalWrite(LED9, LOW); //turn off LED9 
delay(25); // wait for 25ms }
digitalWrite(LED10, HIGH); // turn on LED10 
delay(7); // wait for 7ms }
digitalWrite(LED10, LOW); // turn off LED10 
delay(500); // wait for 500ms }

// Turn all LEDs on for 2 seconds:
digitalWrite(LED1, HIGH); // turn on LED1
digitalWrite(LED2, HIGH); // turn on LED2
digitalWrite(LED3, HIGH); //turn on LED3
digitalWrite(LED4, HIGH); //turn on LED4
digitalWrite(LED5, HIGH); //turn on LED5
digitalWrite(LED6, HIGH); //turn on LED6
digitalWrite(LED7, HIGH); //turn on LED7
digitalWrite(LED8, HIGH); //turn on LED8
digitalWrite(LED9, HIGH); //turn on LED9
digitalWrite(LED10, HIGH); //turn on LED10
delay(2000); // wait for 2000ms

// Turn all LEDs off:
digitalWrite(LED1, HIGH); // turn offLED1
digitalWrite(LED2, HIGH); // turn offLED2
digitalWrite(LED3, HIGH); //turn offLED3
digitalWrite(LED4, HIGH); //turn offLED4
digitalWrite(LED5, HIGH); //turn offLED5
digitalWrite(LED6, HIGH); //turn offLED6
digitalWrite(LED7, HIGH); //turn offLED7
digitalWrite(LED8, HIGH); //turn offLED8
digitalWrite(LED9, HIGH); //turn offLED9
digitalWrite(LED10, HIGH); //turn offLED10
}
}

Use Control-T in the IDE to format your code. Once the blocks line up you should be able to see it. You put the whole thing in the for loop, not just the part you want repeated 10 times. So it's repeating the whole shebang just like the loop function was doing.

Delta_G- I found it and the code works perfectly now! Thanks for your help!

I suggest you google “C++ array tutorial” for a bit of tutorial on how to use arrays in C++.