Flash lights code issue

Hi gays,

I wrote a simple code for flash lights ,
want to flash two lights respective and than flash together.
And you can see the code for detalis:

int led1 =12;
int led2 =13;
void setup() {
// put your setup code here, to run once:
for(int i=1;i<6;i++)
pinMode(led1,OUTPUT);
pinMode(led2,OUTPUT);
}

void loop() {
// put your main code here, to run repeatedly:
int delaytime =100;
for(int i=1;i<20;i++){
if(i<10){
digitalWrite(led1,HIGH);
delay(delaytime);
digitalWrite(led1,LOW);
delay(delaytime);
digitalWrite(led2,HIGH);
delay(delaytime);
digitalWrite(led2,LOW);
delay(delaytime);
}
else{
digitalWrite(led1,HIGH);
digitalWrite(led2,HIGH);
delay(50);
digitalWrite(led2,LOW);
digitalWrite(led2,LOW);
delay(50);

}
}
}

But the result is so strange.
One of the light is still turn on ,another is OK(flashing);the program running at the second part.
This the the vedio:https://youtu.be/POnn-lF5nZE

I dont know why and I can not explain it.
Doe anyone who know it?

I don't understand a couple of things. The video shows 4 LEDs, but the code only deals with 2. Why?

Another is this statement:

One of the light is still turn on ,another is OK(flashing);the program running at the second part.

In the else block, pay careful attention to pin numbers.

Sorry Gays, I resend the Vedio for my question, and you can see it more clearly.

This is the new vedio: https://youtu.be/_Wlr-_6e6SM

digitalWrite(led1,HIGH);
digitalWrite(led2,HIGH);
delay(50);
digitalWrite(led2,LOW);
digitalWrite(led2,LOW);
delay(50);

You turn two different pins on. You turn one pin off.

Thank you so much,PauIS I have just began to learn the Arduino , And have a lot things to learn. Hope you can help me .