Cognizant interview question

OOPs concepts in javascript