Firts You need build testing circuit, like I did. I didn't include resistors in this circuit, But on Thinkercad, more important for me is first build code witch will work for me. Later I will tweek less important stuff...
atachment nr 1.
Code I will begin at defining pins ass outputs atached to diodes.
I will use array because is faster way to work with and is much easier to work with multiple data / pins...
short how_many_leds = 9;
const short arrayLedsPin[9]={ 2, 3, 4, 5, 6, 7, 8, 9, 10 };
Ok. Now I have group of Pins. Now second importand thing is to define pins as OUTPUT.
void setup()
{
for ( short i = 0, i < how_many_leds, i++ ){
pinMode( arrayLedsPin[i], OUTPUT );
}
}
For loop it makes pin mode for me 9 times. Like You see, for loop is beatiful to use in code, its makes life so easy. Now arduino make hard work for You, and You need type only few comands to do 9 times this same thing.
Next thing is to begin with turning on leds. More new peoples in arduino comunity will do it all in loop() but
cleaner way is group all your mayor functions.
Lets sey .. turn on all leds on, 1 by 1 begins from 1 led.
For that is good to use function.
I chouse this one
void Leds_start(){
for (short i = 0, i < how_many_leds, i++){
digitalWrite(arrayLedsPin[i], HIGH);
delay(1000); // 1 second for each led
}
}
On thinkercad site You could check if Your code is working correctly, and If You didn't make any mistake. I did many times even now with more complicated codes.
*Login | Tinkercad
Awter checking code and tested, I foun few mistakes. Like in code
_
(short i = 0 -->, <-- i < how_many_leds --> , <-- i++)
it should be
(short i = 0 --> ; <-- i < how_many_leds --> ; <-- i++)
common mistakes even inter mediate peoples in code. 
Ok, now I will post full code to check how is working testing code.
Also I atached resistors to leds because thinkercad show me that there is to high volgage for leds. 
atachment nr 2.
short how_many_leds = 9;
const short arrayLedsPin[9]={2,3,4,5,6,7,8,9,10};
void Leds_start();
void setup()
{
for (short i = 0; i < how_many_leds; i++){
pinMode(arrayLedsPin[i], OUTPUT);
}
Leds_start(); // Your first function
}
void loop(){
}
//************************************************
void Leds_start(){
for (short i = 0; i < how_many_leds; i++){
digitalWrite(arrayLedsPin[i], HIGH);
delay(1000);
}
}