Object Oriented Programming Using JavaScript
Look Back To The History Late in 1990s , Brendan Eich a Netscape guy planned to put together a language that would work on browsers. LiveScript was designed as the part of this exercise. Unlike C++ and Java , this language was designed to support prototype based OOPs (The concept we are going to talk in a while). This language was to look like Java for some reasons and hence it was named as "JavaScript". Prototypal OOPs is conceptually different from the class based system. In OOPs we first create a class to serve as a "blue print" for the objects, then we create objects based on the blue print. This is further derived etc. Whereas the concept of Prototypal OOPs is different. We don't create class as such before hand. Let's take a real time example: if you were to build a chair, you would first create a blueprint on paper and then manufacture chairs based on this blueprint. The blueprint here is the class, and chairs are the objects. If you wanted to build...