reading-notes

Read 06 in 201


From the Duckett JS book

  1. Chapter 3: “Object Literals” (pp.100-105)
    • Objects group together a set of variables and functions to create a model of a something you would recognize from the real world. In an object, variables and functions take on new names.
    • IN AN OBJECT: VARIABLES BECOME KNOWN AS PROPERTIE
    • IN AN OBJECT: FUNCTIONS BECOME KNOWN AS METHODS
    • The value of a property can be a string, number, Boolean, array, or even another object. The value of a method is always a function.
    • acssesing object by dot notation.
      img



  1. Chapter 5: “Document Object Model” (pp.183-242)
    • The Document Object Model (DOM) specifies how browsers should create a model of an HTML page and how JavaScript can access and update the contents of a web page while it is in the browser window.
    • As a browser loads a web page, it creates a model of that page. The model is called a DOM tree, and it is stored in the browsers’ memory. It consists of four main types of nodes.
    • Each node is an object with methods and properties.
    • When a DOM method can return more than one element, it returns a Nodelist (even if it only finds one matching element).

      img