based on prototypes not a class-based. •There are no classes, but constructor functions and template objects to create new objects. •Everything is an object.
using the following methods: •Calling a constructor function by “new” keyword. •Preferably to be used with “prototypes”. •Inside the constructor “this” keyword will reference the newly created object.
created by constructors. •Prototypes is an easy way for inheritance between objects. •It comes with high performance benefits. •Prototypal Inheritance in ES5 can be done using
application architecture, integrating, communicating with each other keeping units of code clean and separated. •Modules in JS implemented by: The Module pattern Object literal notation AMD modules CommonJS modules ECMAScript Harmony modules
have a public/private methods and attributes encapsulated in a single object. •Encapsulation is made using closures. •Closures only returns public API to the global scope. •Export an object.
encapsulation. ◦ The ability to have private methods/attributes. •Disadvantages: ◦ Changing visibility can be expensive. ◦ After closure, if we added a new public method it won’t see private members.
◦ All functions and variables in the private scope of the closure, with naming convention. ◦ Only specific can be exported publicly using anonymous object. ◦ Example: src/moduleReveal.js