-
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?
Squirrel guy needs to use different types of data. -
What variable type can be used in order to solve the problem of storing multiple values?
array -
What are properties in Javascript?
Characteristics of values -
Which values do not have properties?
Null and undefined -
How can we access properties in a value (two ways)?
With a dot (value.x) - with x being the literal name of the property, and with square brackets (value[x]) - with x being evaluated to get the property name. -
What are methods?
Properties of a value that contain functions. -
What are objects?
A type of value which is an arbitrary collection of properties -
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)?
Problems that require working with different datatypes. -
How do you define an object?
let object = {enter properties here} -
What can you say about the mutability of Javascript objects?
They are mutable. Their properties can be changed, allowing an object value to have different content at different times.
SECOND PART:
-
Why canât you add new properties to a string variable?
Strings are immutable, unlike objects. They will not store new properties. âChangesâ to a string will result in the creation of a new string. -
What are rest parameters?
A syntax which allows a function to accept an indefinite number of arguments as an array. Only the last parameter in a function definition can be the rest parameter. -
(Feel free to skip the sub-chapter of Math object and Destructing)
No -
What is serialisation and what is a use case of serialisation of data?
A method of converting data into a "flat description that can be stored or sent. -
What is JSON?
A format for serialization which is commonly used for data storage and communication on the web. -
What are the differences between JSON and the way programmers write objects in plain Javascript?
In JSON all property names must be surrounded by double quotes and only simple data expressions are allowed (no computation).