Why does the LED turn on after the while loop becomes false?

why?

++ledMode (vs ledMode++) mean increment before the value is used