Infosys interview question

Oops concept Java script Programming concepts