HCLTech interview question

JavaScript Event handling