New to Arduino

PaulS:
This is what you want:

  for (int thisPin1 = 1;  thisPin1 < 13; thisPin1++) 

{
     pinMode(thisPin1, OUTPUT);
  }
  for (int thisPin2 = 13; thisPin2 < 25; thisPin2++) 
  {
     pinMode(thisPin2, OUTPUT);
  }
  for (int thisPin3 = 24; thisPin3 < 38; thisPin3++) 
  {
     pinMode(thisPin3, OUTPUT);
  }
  for (int thisPin4 = 37; thisPin4 < 43; thisPin4++) 
  {
     pinMode(thisPin4, OUTPUT);
  }




Now, what is the loop() function supposed to do? The nested loops there are probably wrong, too.

or even

  for (int thisPin = 1;  thisPin < 43; thisPin++)
  {
     pinMode(thisPin, OUTPUT);
  }

which also avoids the overlaps in the limits of the for loops.
What's the point of setting the mode of a pin twice ? 8)