HCLTech interview question

java Script