Praticing using "while loops"

Why didn't you set the other unused IO pins, D14 to D19, to High outputs as well?

void loop(){
  currentMillis = millis();
  while ( (currentMillis - nextMillis)>=1000){
    // the time test condition has passed
    nextMillis = nextMillis + 1000; //set up for the next one
    // increment & rollover the "digits"
    a=a+1;
    if (a==10){
      a=0;
      b=b+1;
      if (b==6){
        b=0;
        c=c+1;
        if (c==10){
          c=0;
          d=d+1;
          if (d==6){
            d==0;
          }
        }
      }
    }
    // write your outputs
    switch (a){
    case 0:
      // 1 bit
      digitalWrite(0, LOW);
      digitalWrite(1, HIGH);
      digitalWrite(2, HIGH);
      digitalWrite(3, HIGH);
      break;
    case 1:
      // etc.
    } // end A
    switch (b){
    case 0:
      // 1 bit
      digitalWrite(0, LOW);
      digitalWrite(1, HIGH);
      digitalWrite(2, HIGH);
      digitalWrite(3, HIGH);
      break;
    case 1:
      // etc.
    } // end B
    switch (c){
    case 0:
      // 1 bit
      digitalWrite(0, LOW);
      digitalWrite(1, HIGH);
      digitalWrite(2, HIGH);
      digitalWrite(3, HIGH);
      break;
    case 1:
      // etc.
    } // end C
    switch (d){
    case 0:
      // 1 bit
      digitalWrite(0, LOW);
      digitalWrite(1, HIGH);
      digitalWrite(2, HIGH);
      digitalWrite(3, HIGH);
      break;
    case 1:
      // etc.
    } // end D
  } // end while
  // do other stuff outside of the while
} // end loop