Part 1
- The problem is how to store multiple bits of information which can be recalled or individually selected
- An array can be used to store many types of value
- A property is a characteristic of a value, for example length would be a property that returns a number indicating how long a value is.
- null and undefined are. 2 values that do not have any properties.
- Using dot notation or square brackets; i.e. value.x value[x]
- A method is an action that is particular to a value type, for example ‘push’ is a method that can be applied to an array to append an array value.
- Is it that an object is in simplest terms a group of things.
- An object is almost like a bunch of “and” conditions as things within the object all must be true else they would not be in the object. So they solve the need to write many and conditions.
- An object is a variable that is made up of group of things, which can if needed be individually altered - to change the objects group.
- JS objects appear to be highly mutable, you can change them as needed
Part 2
- String values are immutable hence new property request won’t work.
- Rest parameter, a different way of writing an array using the 3 dots. The benefit I can see of using it might be that you can combine two arrays to make 1, which can then be worked on. By 2 arrays I mean, some values can exist in the function pre the rest parameter, and the rest parameter values can be detailed when needed/called.
3.skipped sub-chapter - Serialization is a way of capturing values that were assigned to memory but now need to be transferred in some way
- JSON defines one format that is used to store serialises data and how to send it.
- With JSON you must use double quotes for property names, and 1 simple function can be used, and no comments.