Apple Interview Question

Asked me to refactor code on the screen