Skip to content

Latest commit

 

History

History

Section12-Object-Oriented-Programming-with-Javascript

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

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