Why does the following code not cause the led's to flash but rather stay on continuously
The objective of the code is not clear. It seems the idea is to repeatedly blink 3 LEDs, connected on pins 5,6 and 7. To do so, the code needs slight modification-
int timer = 1000;
int thispin = 5;

void setup() {
  
  for (int thispin = 5; thispin &lt; 8; thispin++) 
    pinMode(thispin, OUTPUT);
}

void loop() {
  
  for (int thispin = 5; thispin &lt; 8; thispin++) 
    digitalWrite(thispin, HIGH); 
 
    delay(timer); 

  
  for (int thispin = 5; thispin &lt; 8; thispin++) 
    digitalWrite(thispin, LOW);

    delay(timer); 

}

Also, since you wanted to know why the LEDs stay ON continuously with your code-
This is because there is no delay statement after any of the digitalWrite-LOW statements. If there's no delay, the LEDs may turn off for a fraction of a millisecond, which won't be noticeable.