led question

good day! may i ask what is the shortcut code say if i want to blink 10 led one after the other w/ delay of .1secs each, so i wont write them one by one like: digitalWrite(pin1,HIGH); delay(100): digitalWrite(pin,LOW); delay(100); digitalWrite(pin2,HIGH); delay(100); digitalWrite(pin2, LOW); delay(100);

...... and so on up to pin 10

tnx guys.

for (int i=1; i<11; i++) {
digitalWrite(i,HIGH);
if (i>1) { digitalWrite(i-1, LOW); };
delay(100);
};

should do it

for (int i=1; i<11; i++) {
digitalWrite(i,HIGH);
delay(100);
digitalWrite(i,LOW);
};

more clear and it turns the last one off at the end.

more usually the counting starts at 0 for good reasons not always immediately apparent.