View on GitHub

reading-notes

CodeFellows Class Reading Notes

Article “Understanding the problem domain is the hardest part of programming”

It is very difficult to learn more than one thing at a time

Both situations can be addressed in one of two ways:


JavaScript Ch. 3 - Object Literals

property: a variable that is part of an object

method: a function that is part of an object (ergo, the value of a method is always a function)

key: the unique name assigned to a value within an object. An object cannot have two keys with the same name

keyName: value,

The properties or methods of an object can be accessed using dot notation. Properties can also be accessed using square brackets


JavaScript Ch. 5 - 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.

DOM tree used to specify the way a browser should structure a model of a webpage (DOM)

Application Programming Interface (API) lets programs and scripts talk to each other

To access and update the DOM tree:

  1. Locate the node that represents the element you want to work with
  2. Use its text content, child elements, and attributes

nodeList is the collection of nodes that is returned when a method can return more than one node

-A static nodeList does not reflect changes made when a script updates the page

There are two possible ways to add and remove content from a DOM tree:

Cross-Site Scripting Attacks (XSS) are a risk when using innerHTML, as an attacker may be able to place malicious code into the website

There are several precautions that can be taken to protect against XSS:


Home