Loop Interview Question

How to deal with closing?