HCLTech interview question

Basics of oops, react basics