reading-notes

View on GitHub

opjects

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 is a variable is part of an object

method is a function is part of an object

DOM

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.

THE DOM TREE IS A MODEL OF A WEB PAGE 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.

ADDING ELEMENTS USING DOM MANIPULATION DOM manipulation offers another technique to add new content to a page (rather than i nnerHTML). It involves three steps

REMOVING ELEMENTS VIA DOM MANIPULATION DOM manipulation can be used to remove elements from the DOM tree.