PART ONE
1. Read the sub-chapter called The weresquirrel. What problems does this chapter introduce that cannot be solved with variable types such as strings or integers?
Variable types like strings and integers are only able to handle a single types of data. What Jacques needs is a data structure like an array to store multiple types of values and datatypes to keep track of all the information and keep it organized.
2. What variable type can be used in order to solve the problem of storing multiple values?
Arrays are a variable type that can store multiple types of values.
3. What are properties in Javascript?
Properties are ways to get types of meta-information from objects.
4. Which values do not have properties?
null and undefined.
5. How can we access properties in a value (two ways)?
You can use the . notation such as myString.length or square brackets myString[âlengthâ]
6. What are methods?
Methods are functions that belong to the object that allow us to do something to the data inside the object.
7. What are objects?
Objects are data structures that can contain an arbitrary collection of properties. These are created by using braces to contain a list of key values separated by commas.
8. What problem do objects solve that cannot be solved with other value types weâve learned so far (such as integer, string, array, boolean etc)?
Objects are great because they can hold anything including other arrays.
9. How do you define an object?
Objects are defined as any other variable, with the value being a list contained within braces.
10. What can you say about the mutability of Javascript objects?
Values in and object can be changed. Unlike other datatypes like strings can not be changed. It will always keep the same value that it was originally assigned