I have this simple function for an led chasing sequence. I want to simplify the code and condense it into less lines. Basically the same piece of code is being repeated 8 times, one time for each led. The only difference is the variable name for the led. I want to know if there is a way to make this into a for loop, and each time the loop runs, the number after (ledPin (), HIGH) can go up by one. Basically I want to add a number beside "ledPin" each time the loop runs. Any thoughts on how to do this? Is it even possible to add things to a variable when using it?
void LEDstartupsequences(){
digitalWrite(ledPin1, HIGH);
delay(100);
digitalWrite (ledPin1, LOW);
digitalWrite(ledPin2, HIGH);
delay(100);
digitalWrite (ledPin2, LOW);
digitalWrite(ledPin3, HIGH);
delay(100);
digitalWrite (ledPin3, LOW);
delay(10);
digitalWrite(ledPin4, HIGH);
delay(100);
digitalWrite (ledPin4, LOW);
digitalWrite(ledPin5, HIGH);
delay(100);
digitalWrite (ledPin5, LOW);
digitalWrite(ledPin6, HIGH);
delay(100);
digitalWrite (ledPin6, LOW);
digitalWrite(ledPin7, HIGH);
delay(100);
digitalWrite (ledPin7, LOW);
digitalWrite(ledPin8, HIGH);
delay(100);
digitalWrite (ledPin8, LOW);
}