Understanding for loop with breaks

Understanding for loop with breaks#