Tech Mahindra interview question

JavaScript advanced