Pregunta de entrevista de Atlassian

I was asked to refactor some code