- 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?
- The ability to compile data of various types (used strings, new strings, boolean expressions) and analyze this data.
- What variable type can be used in order to solve the problem of storing multiple values?
- An array allows you to store a sequence of values.
- What are properties in Javascript?
- All JS values except below have properties. Properties describe some feature of the data value being examined, such as length etc.
- Which values do not have properties?
- Null and Undefined
- How can we access properties in a value (two ways)?
- value.x and value[x]
- What are methods?
- Methods are JS properties with built-in functions.
- What are objects?
- Objects are arbitrary collections 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)?
- An object can hold different types of data within itself.
- How do you define an object?
- One way:
let sampleObject = {
object1:false,
objectArray2:["word", "more text", "still more"]
};
- What can you say about the mutability of Javascript objects?
- You can change the properties of objects, giving an object value different content at different times.
SECOND PART:
- Why canât you add new properties to a string variable?
- Because itâs immutable.
- What are rest parameters?
- Itâs bound to an array containing all further arguments.
- (Feel free to skip the sub-chapter of Math object and Destructing)
- What is serialisation and what is a use case of serialisation of data?
- Converting data into a flat description, for instance when you need a list or database accessible to multiple programming languages.
- What is JSON?
- JavaScropt Object Notation is a serialization format.
- What are the differences between JSON and the way programmers write objects in plain Javascript?
- Some differences: All property names have to be surrounded by quotes, and comments are not allowed.