Publicis Sapient interview question

JavaScript and OOP Concept