Tech Mahindra interview question

Angular and Javascript question