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?
This chapter introduces how Javascript can apply multiple data types that can not be solved by single data types such as strings and integers.
2. What variable type can be used in order to solve the problem of storing multiple values?
An array variable type, which is an ordered collection of data, can solve the problem.
3. What are properties in Javascript?
Properties are the values associated with an object.
4. Which values do not have properties?
Null and undefined values donât have properties.
5. How can we access properties in a value (two ways)?
You can access properties in a value with a dot (.) or square bracket ([]).
6. What are methods?
Methods are properties containing a function definition such as .toUpperCase
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 learned so far (such as integer, string, array, boolean etc)?
Objects can solve more complex data such as correlations of multiple variables.
9. How do you define an object?
An object can be defined using curly braces {}.
10. What can you say about the mutability of Javascript objects?
Mutability means that you can change the values. Only objects and arrays are mutable in Javascript. Numbers, strings, and boolean are immutable values.
SECOND PART
1. Why canât you add new properties to a string variable?
Because string is not an object which is a mutable variable. It is one of the primitive types which are immutable valuables.
2. What are rest parameters?
Rest parameters syntax allow us to represent an indefinite number of arguments as an array.
3. (Feel free to skip the sub-chapter of Math object and Destructing)
I read it but it was difficult to followâŚ
4. What is serialisation and what is a use case of serialisation of data?
Serialization is to convert data into a flat description. JSON is a use case of serialization of data that is used as data storage and commucation format on the Web.
5. What is JSON?
JSON (JavaScript Object Notation) is a popular serialization format. It is used as data format for data inter change 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 - no function calls, bindings, or anything that involves actual computation. Comments are also not allowed.