Why does the following code not cause the led's to flash but rather stay on continuously 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);
  digitalWrite(thispin, LOW);


  for (int thispin = 7; thispin = 5; thispin--) 
    digitalWrite(thispin, HIGH);

  delay(timer);
  digitalWrite(thispin, LOW);
}

I have the above code. I thought that how it was written would cause the led's to flash but they all stay on continuously. Could anybody help to explain what it is i have done wrong?
I am very new to this and I'm just fiddling basically trying to learn.
Thank you!
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.