Invygo Tech FZ interview question

Refactoring some code in a project