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?
Finding relations between values.
2. What variable type can be used in order to solve the problem of storing multiple values?
Array
3. What are properties in Javascript?
properties of values, e.g. size or color of a jacket
4. Which values do not have properties?
null and undefined
5. How can we access properties in a value (two ways)?
value.x
value[x]
where x is the property of the value
6. What are methods?
properties that contain functions.
7. What are objects?
arbitrary collections of properties
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)?
to hold arbitrary collections of properties
9. How do you define an object?
var object = {
property1: value,
property2: value
};
10. What can you say about the mutability of Javascript objects?
contrary to strings, numbers and boolean values, object values CAN be changed and are therefore mutable.
SECOND PART:
1. Why canât you add new properties to a string variable?
string values are immutable
2. What are rest parameters?
parameters in an array that are passed individually into a function
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?
converting tangles of memory addressess into a flat description that cab saved and sent over the network.
5. What is JSON?
JavaScript Object Notation - a popular serialization format for data storage and communication on the Internet.
6. What are the differences between JSON and the way programmers write objects in plain Javascript?
âJSON looks similar to JavaScriptâs way of writing arrays and objects, with a few restrictions. All property names have to be surrounded by double quotes, and only simple data expressions are allowedâno function calls, bindings, or anything that involves actual computation. Comments are not allowed in JSON.â