ECMASCRIPT is a method of (concept) using JavaScript as Object Oriented designing.  Knowing about this helps you to work on SharePoint Client Object Development, SharePoint Apps Development as well as any web development that involves JavaScript Objects.

There are a few concepts you need to know. Let's compare those using general OOP language (C#) and ECMASCRIPT (C# vs. JavaScript).

Creating a Class

image image

Creating an Object

image image

Public and Private Properties

image image

Method Definition (in best way)

 image image

Note: 

Prototype is something like a template. We are assigning the method save() to the template so it will not recreate everything in the browser memory every time we are creating an object. Assigning the method to the prototype is the best way to do it.)

Inheritance

image image