Possible Duplicate:
How do I create an abstract base class in JavaScript?
Is it possible to use OOP practices in javascript and create classes and extend abstract classes?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes.
No, JavaScript doesn’t have classes. It is pretty easy to implement them, though, if your design needs them. However, in most cases, if you need classes in JavaScript, you’re probably doing something wrong and should rethink your design (or your choice of language, but that is part of the design).
Since there are no classes: no. But again, you can build them yourself, if you need them. And also again, if you find you need them, you are probably doing something wrong.
By the way: what do classes have to do with OOP practices? Hint: it’s OOP, not COP!