Loop variables declared outside of loop