In this article, we’ll discuss the object oriented aspects of JavaScript language. We can define or create a JavaScript object with an object literal by encapsulating all the methods and properties within the curly braces. In the previous section, we have created an object john which was a human. Now, what if we want to create 50 other humans with same properties and methods as john but with different names. To solve this problem, ECMAScript 2015, also known as ES6, introduced JavaScript Classes.
Table of contents
Object Literal1 Comment
Sort: