JavaScript is a dynamic multi-paradigm programming language that can be used with an imperative, object-oriented, or functional programming style. Imperative programming is a programming style found in languages that can be used for scripting, and we will explore this style in Chapter 5, Using Underscore.js in the Browser, on the Server, and with the Database.
Object-oriented programming is mainly characterized by the use of objects created using classes in class-based languages or cloned from other objects in prototype-based languages. Some of the object-oriented features are abstraction, inheritance, polymorphism, encapsulation, and information hiding, and these features favor a programming style where objects contain both data and behavior represented by methods.
Note
You can find more OOP principles and patterns described in the "Gang of four" design patterns at https://en.wikipedia.org/wiki/Software_design_pattern and the S.O.L.I.D. principles at...