Skip to content

Latest commit

 

History

History
28 lines (27 loc) · 1.6 KB

File metadata and controls

28 lines (27 loc) · 1.6 KB

Section 12- Object Oriented Programming with Javascript

Section slides

What is Object Oriented Programming?

  • a programming model based around the idea of objects and blueprint of objects

  • these objects are constructed from what are called "classes" which is like a blueprint. Objects created from classes are called 'instances' of those classes.

  • We strive to make our classes abstract and modular so we reuse classes easily and share them among parts of an application

  • Javascript does not have classes built in so we just mimic behavior of classes using functions and objects

new Keyword revisited

  • creates an empty object
  • sets this to be that empty object
  • adds the line return this to the end of the function which follows it
  • adds a __proto__ property to that empty object which links the prototype property of the constructor function to the empty object

Additional resources:

Definitive Guide to Object Oriented Javascript |Notes from this Video tutorial

Object Oriented Javascript