Easygenerator interview question

How to optimize frontend code? They asked in web security