FIRST PART
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?
Creating a set of data.
2. What variable type can be used in order to solve the problem of storing multiple values?
Arrays can be used to store multiple values.
3. What are properties in Javascript?
Properties can be seen as characteristics of certain values, such as .length.
4. Which values do not have properties?
null and undefined do not have properties
5. How can we access properties in a value (two ways)?
The main ways are with a dot and with square brackets. For example, theString.length, or theString[âlengthâ].
6. What are methods?
methods are properties that contain functions, such as .toUpperCase and .toLowerCase
7. What are objects?
objects are arbitrary collections of properties. They can be created by using braces as an expression. For example : let academy = {Ivan: true, Tech: true};
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 let us store values of many types. You could have booleans and arrays, for example, bound in the same object.
9. How do you define an object?
As you would define any variable, but the value is stored within braces.
10. What can you say about the mutability of Javascript objects?
As opposed to numbers, strings, and booleans, which are immutable, objectsâ properties can be modified.
SECOND PART
1. Why canât you add new properties to a string variable?
Their values are immutable, they are not objects.
2. What are rest parameters?
rest parameters are used to compute all the arguments in an array.
4. What is serialisation and what is a use case of serialisation of data?
Serialization means to take the data and convert it into a flat description. Serialization can be used for data storage or as a communication format on the web.
5. What is JSON?
JSON is a popular serialization format. JavaScript Object Notation.
6. What are the differences between JSON and the way programmers write objects in plain Javascript?
JSON has restrictions. Anything that involves computation, like function calls, is not allowed. The property names have to be surrounded by double quotes.