reading-notes

My reading notes journal for Code Fellows

View the Project on GitHub

Read: 06 - Problem Domain, Objects, and the DOM

JavaScript Object Basics

How would you describe an object to a non-technical friend you grew up with? Object is a group of related data. Such as variables and functions. You put your variables and functions into the object. What are some advantages to creating object literals? Object literals is “literally” the contents within the object you’ve created. How do objects differ from arrays? Arrays differ from objects in the fact that you can have a variety of data types in an array. Give an example for when you would need to use bracket notation to access an object’s property instead of dot notation. You would use a bracket notation when you want to use the name connected to the value. Also brackets are easier to read over dot notations. Evaluate the code below. What does the term this refer to and what is the advantage to using this? this is referring to dog. We use this because it allows you to apply the same definition to all the objects created. If you have more than one object its easier to use this rather than writing out each definition individually.

Introduction To The DOM

What is the DOM? Dom is “Document Object Model”. It is an interface for programming web documents. It allows scripting languages such as javascript to manipulate a web page which is a web document. Briefly describe the relationship between the DOM and JavaScript. Javascript is powerless to a web page without DOM. That’s why we have DOM’s like node.js that allow us to run javascript on the web but the DOM is used through javascript.