reading-notes

Class 6 Notes

How would you describe an object to a non-technical friend you grew up with?

Its basically a chunck of code that hold related information. It may hold your name your age and fun facts abut you but its not limited to your name. It could be holding info and sub groups of info about anything.

What are some advantages to creating object literals?

It makes it simpler to clarify what you are talking about and to call upon later if you need to.

How do objects differ from arrays?

An object is a bit easier to identify what each part of the array mean. So if it was people you can identify what age is last name and such where in an array its all just grouped together as data.

Give an example for when you would need to use bracket notation to access an object’s property instead of dot notation.

if an object property name is within a variable

Evaluate the code below. What does the term ‘this’ refer to and what is the advantage to using ‘this’?

Its refering to the current object within the code. Its useful if you are doing multiple object literals.

What is the DOM?

Document object model. Its a programming tool for web documents

Briefly describe the relationship between the DOM and JavaScript.

Javascript is aessential just a programming language but DOM just interpretyus how to use that language to display a web page. So you could use other programming languages like python and Dom could interpret that as well.