Pregunta de entrevista de CoachHub

How would you refactor this code to make it more readable and maintainable?