JavaScript Objects Worksheet
Question 1
What makes up an object (what does an object consist of)?
In JavaScript, an object comprises of multiple properties which define it.
Question 2
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'll generally see dot notation, such as "x.y.z", however, you'll also see square bracket notation, like "x['y']['z']".
Question 3
Why are objects an important data type in JavaScript?
Objects can represent real-world things, both concrete and abstract. In any plausible situation where you need something in the script that features descriptors, you will
likely use an object.
Question 4
When creating an object, what character is used to separate property names from their values?
A colon (:) separates property names and values. Much like listing or describing something in literary English.
Question 5
When creating an object, what character is used to separate the property/value pairs in an object?
A comma (,) separates different properties. Just like in regular writing.
Question 6
What operator is used to access a property of an object?
The two notations mentioned in question 3 are the operators. Typically, the dot operator is used for this.