Skip to content

Latest commit

 

History

History
14 lines (9 loc) · 1.22 KB

01readme.md

File metadata and controls

14 lines (9 loc) · 1.22 KB

#OOP with Prototypes

##Objectives

  • Identify the downsides of object literal notation.
  • Use constructor pattern to create multiple object instances.
  • Understand the basic premises behind object-oriented programming with prototypes in JavaScript.
  • Use constructors and prototypes to modularize code and keep code DRY.

##Object Oriented Programming

Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which are data structures that contain data, in the form of fields, often known as attributes; and code, in the form of procedures, often known as methods. A distinguishing feature of objects is that an object's procedures can access and often modify the data fields of the object with which they are associated (objects have a notion of "this"). In object-oriented programming, computer programs are designed by making them out of objects that interact with one another. - wiki

We've been encountering examples of object-oriented programming in JavaScript, but there's ways to make objects easier and more efficient to construct. Specifically, we'll be looking at constructors and prototypes in order to achieve these goals.