In function 'void loop()': pingPong was not declared in this scope

I am pretty sure that i copy the code right. But it keep give me this error message.
sketch_may24c.ino: In function ‘void loop()’:
sketch_may24c:12: error: ‘pingPong’ was not declared in this scope
sketch_may24c.ino: At global scope:
sketch_may24c:15: error: expected unqualified-id before ‘{’ token

int ledPins = {2,3,4,5,6,7,8,9};
void setup()
{
int index;
for(index = 0; index <=7; index++)
{
pinMode(ledPins[index],OUTPUT);
}
}
void loop()
{
pingPong();
}
void pingPong();
{
int index;
int delayTime = 100;
for(index = 0; index <=7; index++)
{
digitalWrite(ledPins[index],HIGH);
delay(delayTime);
digitalWrite(ledPins[index],LOW);
}
for(index = 7; index >= 0; index–)
{
digitalWrite(ledPins[index],HIGH);
delay(delayTime);
digitalWrite(ledPins[index],LOW);
}
}

this:

void pingPong();

should be this:

void pingPong()

it work :slight_smile: thank you!