O'Reilly logo

Web Technology: Theory and Practice by M. Srinivasan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

4.13 THE CONCEPT OF CLASSES

JavaScript does not have a formal notation for Class. This makes it quite different from the other popular object-oriented languages like Java. However, realizing that JavaScript is a loosely typed language, this is hardly surprising! Notwithstanding this, it is still an object-oriented language. In languages like C++ or Java or C#, Classes are defined once and all objects are instantiations of the Class. In JavaScript, Classes can be simulated through the concept of objects and functions. An Object is a data structure that can (also) mimic a container containing attributes and methods. Methods can be implemented through functions. These properties can be dynamically added to the object at run time as well, which makes ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required