NTT DATA interview question

Nothing related to AEM, just JavaScript handson machine coding