Question d’entretien chez One Acre Fund

How would you optimize this code?