SFOX interview question

How would you optimize this