- Javascript is Classless, prototype-oriented language.
- More flexible language and supports Class-based programming.
- Class based programming always forces strong typing , encapsulation and coding convention.
- Class-based code is more likely to be predictable, extensible, and scalable over time.
It is important to be able to clearly distinguish between classes and instances. In simple terms, a class is the blueprint of a concept, while an instance is the actualization of the blueprint. Let’s look at some examples:
- “Building” is a class, while the Empire State Building is an instance of “Building”.
- “Dog” is a class, while Lassie is an instance of “Dog”.
- “Computer” is a class, while the computer you’re using is an instance of “Computer”.
No comments:
Post a Comment