Title:
JavaScript Objects
Updated:
November 8, 2023
Task/Activity:
  1. Questions
  2. Coding Problems
A. Questions
  1. What makes up an object (what does an object consist of)?
Properties, Events, and Methods
  1. What are two different types of notations that you can use when working with the properites of objects? For example, there are two types of syntax that you could use if you wanted to update a property of an object.
You can use either dot or bracket notation: myObject.name = object1 or myObject['name'] = 'object1'.
  1. Why are objects an important data type in JavaScript?
Because you can use them to have multiple instances of similar code that can both interact with each other and contain their own variations of data.
  1. When creating an object, what character is used to separate property names from their values?
A colon character.
  1. When creating an object, what character is used to separate the property/value pairs in an object?
A comma.
  1. What operator is used to access a property of an object?
The period, i.e. dot notation.
B. Coding Problems
Coding Problems - See the 'script' tag below this section. You will have to write some JavaScript code in it.