reading-notes

Page 1: https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Basics

Page 2: https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/Introduction

Page 3: https://betterprogramming.pub/intermediate-javascript-whats-the-difference-between-primitive-values-and-object-references-e863d70677b

Q: How would you describe an object to a non-technical friend you grew up with? A: An object is a collection of related things with names.

Q: What are some advantages to creating object literals? A: Object literals are easy to create and group related information together.

Q: How do objects differ from arrays? A: Objects use named keys, while arrays use numbered indexes.

Q: Give an example for when you would need to use bracket notation to access an object’s property instead of dot notation. A: When the property name contains special characters or is stored in a variable.

Q: Evaluate the code below. What does the term this refer to and what is the advantage to using this? A: this refers to person, allowing the method to access and use its properties.

Q: What is the DOM? A: The DOM is a programming interface for web documents.

Q: Briefly describe the relationship between the DOM and JavaScript. A: JavaScript is used to manipulate the DOM for dynamic web pages.