reading-notes

This Repo required for Asac labs class 2


Project maintained by ManarAbdelkarim Hosted on GitHub Pages — Theme by mattgraham

Problem Domain, Objects, and the DOM

Chapter 3: “Object Literals”

WHAT IS AN OBJECT?

object

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.

property:

properties;

usage of name/value pairs::

Programmers use a lot of name/value pairs:

Object Literal Notation:

output: 42

Accessing an object:

you can a proparity of an object using:

proparity and dot

Summary :

Chapter 5: “Document Object Model”

What is The Document Object Model ?

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.

what is dom tree?

The dom tree is a model of a web page as a browser 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 :

  1. the document node
  2. element node
  3. attribute nodes
  4. text nodes

DOM

You can get element from the the method by get element you can also loop over nodelist and apply the same statement to each .TRAVERSING THE DOM When you have an element node, you can select another element in relation to it using these five properties. This is known as traversing the DOM.

ATTRIBUTE NODES

The opening tags of HTML elements can carry attributes and these are represented by attribute nodes in the DOM tree.

TEXT NODES

Once you have accessed an element node, you can then reach the text within that element. This is stored in its own text node.

SUMMARY

DOCUMENT OBJECT MODEL