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?
We need a variable type that can store muitiple values and make it easy to call them
2. What variable type can be used in order to solve the problem of storing multiple alues?
Array
3. What are properties in Javascript?
Property’s is a characteristic of an object often describing attributes associated with a data structure.
4. Which values do not have properties?
Null, undefined.
5. How can we access properties in a value (two ways)?
Dot plus name of property like this .name or [“name”].
6. What are methods?
Methods are actions that can be performed on objects
7. What are objects?
Objects are a collection of properties.
8. What problem do objects solve that cannot be solved with other value types we’ve earned so far (such as integer, string, array, boolean etc)?
Objects can hold different data types.
9. How do you define an object?
Its defined like any other variable and it’s value is stored in { }.
.10. What can you say about the mutability of Javascript objects?
Mutability means that the values in an object can be changed unlike others.
SECOND PART:
1. Why can’t you add new properties to a string variable?
Because it’s immutable.
2. What are rest parameters?
Rest parameters are used to add multiple arguments. To use rest parameters place 3 dots in front of a name of the parameter like …name.
3. (Feel free to skip the sub-chapter of Math object and Destructing)
4. What is serialisation and what is a use case of serialisation of data?
Serialisation is to convert data stored in memory into a flat description.
5. What is JSON?
JSON stands for java script object notation and is a serialisation format used as a data storage and communication format on the web.
6. What are the differences between JSON and the way programmers write objects in plain Javascript?
All property names have to be surrounded by double quotes and only simple data expressions are allowed.