Data Structures (Arrays and Objects) - Reading Assignment

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?
We need a variable type that can store muitiple values and make it easy to call them

2. What variable type can be used in order to solve the problem of storing multiple alues?
Array
3. What are properties in Javascript?
Property’s is a characteristic of an object often describing attributes associated with a data structure.
4. Which values do not have properties?
Null, undefined.
5. How can we access properties in a value (two ways)?
Dot plus name of property like this .name or [“name”].
6. What are methods?
Methods are actions that can be performed on objects
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 earned so far (such as integer, string, array, boolean etc)?
Objects can hold different data types.
9. How do you define an object?
Its defined like any other variable and it’s value is stored in { }.
.10. What can you say about the mutability of Javascript objects?
Mutability means that the values in an object can be changed unlike others.

SECOND PART:

1. Why can’t you add new properties to a string variable?
Because it’s immutable.
2. What are rest parameters?
Rest parameters are used to add multiple arguments. To use rest parameters place 3 dots in front of a name of the parameter like …name.
3. (Feel free to skip the sub-chapter of Math object and Destructing)

4. What is serialisation and what is a use case of serialisation of data?
Serialisation is to convert data stored in memory into a flat description.
5. What is JSON?
JSON stands for java script object notation and is a serialisation format used as a data storage and communication format 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.

1 Like
  1. A data structure for storing multiple type of data what can be easily found.

  2. Arrays

  3. Properties are characteristics of values.

  4. Null and undefined

  5. with a dot and with square brackets, value.x or value[x]

  6. Properties that contains functions.

  7. Arbitrary collections of properties.

  8. Storing different data types.

  9. One way to create an object is by using braces as an expression. Inside the braces, there is a list of
    properties separated by commas.

  10. Objects can be modified. We can change their properties, causing a single
    object value to have different content at different times.

  11. Values of type string, number, and Boolean are not objects, and though
    the language doesn’t complain if you try to set new properties on them, it
    doesn’t actually store those properties. As mentioned earlier, such values are
    immutable and cannot be changed.

  12. It can be useful for a function to accept any number of arguments. To write such a function, you put three dots before the function’s last parameter. When such a function is called, the rest parameter is bound to an array
    containing all further arguments. If there are other parameters before it, their
    values aren’t part of that array.

  13. Serialisation is the process of converting the data stored by the addresses of the computers memory into a flat description. This is useful to store or send that data over the network.

  14. A popular serialization format is called JSON, which stands for JavaScript Object Notation.

  15. 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 not allowed in
    JSON.

1 Like
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?

Jacques has to write down a lot of variables each day with different types of values. Additionally he has to group those variables by the date.

2. What variable type can be used in order to solve the problem of storing multiple values?

Arrays can be used in such case.

3. What are properties in Javascript?

Properties are a type of variables which are attached to the object/ characteristics of a value, object etc

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)?

either by string.length

or string[“length”]

6. What are methods?

functions that can be called on a propertie’s value.

for example if “name” is a property and its value is a string, name.toUppercase would be a function

let name = “John”;

console.log(name.toUpperCase());

7. What are objects?

Objects are arbitrary collections of properties. Each property has it’s own value.

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 have multiple properties, each of which can have their own value of any type.

9. How do you define an object?

You must declare an object by using {} braces. Inside the braces we have the properties followed by a colon and their value.

For example:

const object1 = {

name: “John”,

age: 17,

sex: “male”,

knowsJavascript: true};

10. What can you say about the mutability of Javascript objects?

Javascript objects are mutable. Their properties can be changed as opposed to primitive types. By copying objects by using the spread operator (shallow copy), all the property values inside the copied object are linked to original object’s properties. While objects that are copied by using the Object.assign() function (deep copy) will not change their property values even if the original object’s property values are changed. The object can’t be changed if it is declared using “const”, you can only change it’s content

1. Why can’t you add new properties to a string variable?

Primitive types such as strings are immutable and can’t be changed. Although strings do have built in properties you can’t add new properties to a string and expect them to be stored in the memory.

2. What are rest parameters?

Rest parameter allows functions to have any number of arguments. You can call it by using three dots before naming the the parameter in the function brackets as usual. When calling the function which has the rest parameter, you can pass as many arguments into it as you want.

3. What is serialisation and what is a use case of serialisation of data?

Serialisation is converting data into a specific format which allows to send and save it more efficiently.

4. What is JSON?

Json is the most popular and used format of serialisation of data in Javascript and many other programming languages.

5. What are the differences between JSON and the way programmers write objects in plain Javascript?

In JSON you have to put property names in the double quotes. Comments are not allowed in JSON.

1 Like

First Part

  1. Variables like strings and integers can only hold a single type of data, and Jacques needs to keep logs of his day using a data structure that allows multiple values and data types.

  2. Arrays can be used to solve the problem of storing multiple values.

  3. Properties define the characteristics of an object or value.

  4. Null and undefined have no properties.

  5. We can access properties in a value by either using a ‘dot’ and the name of the property: string.length, or you can reference using array[x].

  6. Methos are functions that lie within a property these functions only work within their value.

  7. Objects are data structures that contain an arbitrary collection of properties. One way to create an object is by using curly braces as an expression.

  8. Objects are able to hold many different data types allowing us to " carry values together in a bag".

  9. Objects are any other variable with the value listed within braces.

  10. JS objects are mutable meaning once they are created the values within the object cannot be changed

Second Part

  1. String variables are immutable.
  2. Rest paremeters are bound to an array that contains all other arguments in the array. this uses three dots before the functions last parameter.
  3. Objects and arrays are serialized into bits holding addresses. They are stored into a flat description in memory. It is used for saving and/or tranfering data (between computers on a network).
  4. Javascript object notation. It is used to serrialize data.
  5. Properties will be surrounded in double quotes and only simple data expressions are allowed and no comments.
1 Like

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?

  • A way to represent and store information collectively in an organized way.

What variable type can be used in order to solve the problem of storing multiple values?

  • Array

What are properties in Javascript?

  • Bindings associated to some value

Which values do not have properties?

  • null and undefined

How can we access properties in a value (two ways)?

  • With a dot (".") or square brackets ("[ ]").

What are methods?

  • Methods are properties containing function values

What are objects?

  • Object 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)?

  • Objects can have one or more properties containing different value types.

How do you define an object?

  • By using braces as an expression.

What can you say about the mutability of Javascript objects?

  • With objects, you can change their properties, thus one object can have different contents at different times.

Why can’t you add new properties to a string variable?

  • Just like values of type number and Boolean, string variable are also immutable. Meaning you cannot change the values of their properties or storing new properties.

What are rest parameters?

  • It allows one to define a function to accept any number of arguments.

What is serialisation and what is a use case of serialisation of data?

  • Serialization is the process of converting an object state into a format that can be stored, transmitted, and reconstructed later. By doing serialization, one can store data then transmit the data over a network where another computer will receive it.

What is JSON?

  • JSON stands for Javascript Object Notation and it is a serialization format widely used as a data storage and communication format on the Web.

What are the differences between JSON and the way programmers write objects in plain Javascript?

  • All property names using JSON format should be surrounded by double quotes and only simple data expressions are allowed.
1 Like

PART #1

  1. The problem of storing several different types of data.
  2. Arrays
  3. Properties are characteristics of objects.
  4. Null and Undefined
  5. Either with a dot, such as in: value.x - or- with square brackets like in value[x]
  6. Methods are actions that can be performed on objects.
  7. Objects are entities that are created that have properties and types.
  8. They can store multiple types of data.
  9. You define it with braces {}
  10. They are mutable, other wise said, they can be easily changed.

PART #2

  1. It is not mutable.
  2. When the number of parameters that a function will receive is not known or can vary, we can use rest parameters.
  3. Serialization is the compacting or flattening of data to facilitate transportation across the web.
  4. JSON is a data storage and communication format for JavaScript and other languages.
  5. Double quotes only and no function calls, bindings, or computation.
1 Like

Part 1:

  1. This chapter introduces the concept of structuring and extracting data that can change over time.
  2. An array can be used to store multiple values.
  3. A property is an attribute of a particular value. For example, a value in an array can have multiple properties that help define the attributes, such as the length, min, or max, of that value.
  4. “null” and “undefined” do not have properties.
  5. We can access properties in a value using a dot or square bracket notation.
  6. Properties that contain functions are called methods.
  7. Objects are ways to aggregate data and properties of that data.
  8. Objects allow for the grouping or organizing values into separate buckets that can then be combined into a simple array. In other words, Objects allow for an easier categorization of properties so that a piece of data is more easily extractable.
  9. An object is defined using braces [ ].
  10. Mutability speaks to the ability of a piece of data to change. Whereas certain values such as numbers, strings, and booleans are immutable, objects do have properties that can be changed and hence are mutable.

Part 2:

  1. String variables are immutable, and hence, the value of those variables cannot change.
  2. Rest parameters are useful when you want to apple a function to an indefinite number of arguments.
  3. Serialisation is a way to cover data into a format that can then be stored and sent across a network.
  4. JSON, stands for JavaScript Object Notation, and is a popular serialization format that is used as a data storage and communication format on the Web.
  5. The syntax is similarly to JavaScript, but with a few differences: double quotations are used for all property names, and only simple data expressions are allowed (function calls, bindings or other computations are not allowed).
1 Like
  1. he wants to put in new data every day so he needs an array, and index his activities so he can keep track of what might be the cause of his transformation.

2.array

  1. the values of an object

4.null and undefined does not have properties

5.with a . or []

  1. its actions that can be performed on objects, like toUpperCase()

7.its an JS datatype that can store various values and methods

  1. if you want to store different datatypes and also be able to override them further down your code

  2. with {}

  3. you are able to change its values later, you can not do that with string, number or boolean

#2#

1.strings are immutable

  1. if you have an array with changing/indefinite number of arguments the rest parameter syntax allows a function to accept this changing array by typing … before calling it

  2. a process to translate objects into a format suitable to transfer over a network

4.Json library is used to format code for storage and communication on the web

5.Json properties have to be in double quotes, Json doesn’t contain function calls and bindings

1 Like
  1. Variables and Strings can only store one set of data whereas Jacques issue required him to store a large amount of different data.

  2. Array

  3. Properties are characteristics of a value in Javascript. For example, in an expression written as string.length, the length is the property of a value, string.

  4. Null and undefined.

  5. The two ways to access a property in JS is via dot and square brackets i.e. . and [ ]. Dot will give find the property with the exact name and square root will find the property after evaluating the expression within the brackets.

  6. Properties that contain functions are called methods of the value they belong to. These are special kinds of functions that only work on the value they belong to.

7)Value of the type object are arbitrary collection of properties. In an Array, it might not be sufficient just to list properties but you need to list Boolean values if you are creating a connection between a Boolean value and a specific series of properties. Objects are created using braces " " and are separated by commas , .

  1. Objects can hold different datatypes and you can use them to override your code further down the order.

  2. {}

  3. You can change the properties of an object and hence why their values are considered Mutable. Strings, indexes and Booleans values are immutable i.e. they cannot be changed.

2nd PART:

  1. String variable values are immutable and thus their properties cannot be changed.

  2. Rest parameters allow for the computation of all arguments for a particular function. They are denoted by … . When a functions i called , the rest parameter is bound to an array containing all further argument.

  3. Serialisation is converting data stored in memory to flat description of what that data is. This is done in order to do things like saving the data to a file or transferring it to another computer on a network.

  4. JSON is a type of data serialisation method. It stands for Javascript Object Notation. It is stored as. data communication and strorage method on devices and on the Web, even if Javascript is not being used.

  5. JSON differ’s from Javascript in that all property names have to be double quoted, " ", no bindings or function calls or anything that could be used for computation is allowed in JSON. Comments are not allowed in JSON.

1 Like
  1. To keep a daily log of everything he does which strings and integers cannot solve

  2. It can be solved using data structures

  3. It is a characteristic of an object, often describing attributes associated with data structure

  4. null and undefined

  5. by using dot(.) or square braces []

  6. properties that contains functions are methods

  7. object is a standalone entity, with properties and type

  8. to store different values and work with its properties

  9. Create a single object, using an object literal.
    Create a single object, with the keyword new.
    Define an object constructor, and then create objects of the constructed type.
    Create an object using Object.create().

  10. we can change properties of objects and its values at different times

  11. because strings are immutable
    2.The rest parameter syntax allows a function to accept an indefinite number of arguments as an array, providing a way to represent variadic functions in JavaScript.

  12. JavaScript Object Notation. It is a data storage and communication format on the web for JavaScript and other languages. There are two functions to work with JSON format, JSON.stringify() and JSON.parse().

  13. Serialization is the process of converting some in-memory object to another format that could be used to either store in a file or sent over the network

  14. JSON stands for JavaScript Object Notation
    JSON is a lightweight format for storing and transporting data
    JSON is often used when data is sent from a server to a web page
    JSON is “self-describing” and easy to understand

  15. The only noticeable difference is that all names in JSON must be wrapped in double quotes.

1 Like

Part 1

  1. Data Storage structures are to store information for easy retrieval and to build upon with more complex programs; suits the need to be able to accumulate and store data as new information is available
    This allows the users to change, delete and add new information that is accurate and useful.
  2. Variable types that can be used to solve problems of storage of multiple values are objects and arrays.
  3. Properties return values belonging to objects/arrays that are named collections of data. In JS arrays are implemented as objects. Example: arrayName.length. Properties tell you somethng about the array.
  4. Null and undefined.
  5. Two ways to access properties in a value are: value.X (a dot) and value[x]. brackets. There is a vague difference in interpretations and thus the two are not the same. Dot is literal. X in brackets finds the value of x.
  6. Methods are actions that usually change the arrays to make new arrays (arrays within arrays)… Methods are used to modify the data contained in an object.
  7. JS is “object based” which helps users communicate clearly and efficiently. Objects allow us to group values including other objects to create complex structures of programming.
  8. Objects are mutable and offer immense possibilities of programming that can interface with document Object Models (DOMs), APIs (while still using integers, strings booleans and arrays); can store complex programs that can be changed, deleted, added upon document elements and created new.
  9. Most definitions of objects tell us what objects can do. Objects are variables that have functions, methods, properties and languages. Objects have many defining attributes and not a simple definition and spans many areas of computer programming that use object languages.
  10. JS objects work with immutable objects such as boolean objects and also mutable ones from simple data to complex data; unchangeable valuations to highly changeable valuations.

Part 2

  1. Simple data structures such as string variables are immutable and the values are not changeable.
  2. Rest parameters are also called "Representational state transfer (REST) and is software that was created to guide design and development of the architecture for the World Wide Web.Its uses are also called variadic functions that accept a variable number of arguments which add flexibility to programs. The Rest paramenter syntax allows a function to accept an indefinite number of arguments as an array, providing a way to represent variadic functions in JS.
  3. skip.
  4. Serialization is the process of translating data structures or object statements into a format that can be stored and reconstructed later in the same or another computer environment.
  5. JSON, (JavaScript Object Notation) pronounced “Jason,” is used as data storage and communication formatted on the Web in several languages other than JS. JSON is similar to JS and writes arrays and objects with few restrictions.
  6. Comments are not allowed in JSON. Use of double quotes are used for all property names with no function calls, no computations. There are some object differences. JSON is in every language.
1 Like
  1. To save different but related data types in the same variable or string.

  2. Arrays

  3. Properties are the characteristics of the data in a data set.

  4. Null and undefined.

  5. Square brackets or a dot. array[“length”] or array.length

  6. Properties that hold function values.
    7.Values of the type object are arbitrary collections of properties

  7. Object can store values of different types.

  8. let anObject = {left: 1, right: 2}; for example. Pretty much like any variable.

  9. It means that the values the object contains can be altered.

  10. The sting is immutable because it is a not an object.

  11. Rest parameters accept any type of argument.It is bound to an array
    containing all further arguments.

  12. Data is converted into a flat description

  13. JavaScript Object Notation. A popular serialization format.

  14. 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 not allowed in
    JSON

1 Like
  1. type of variable is needed to store multiple values for easy access

  2. variable type to solve storing would be an array

  3. properties are characters of value

  4. null and undefined

  5. .x or [x]

  6. anything with dot in it like math.random

  7. object that stores properties

  8. possible to assign a value to a property
    9.by using { }

  9. it makes it not possible for other code not to change a character in a string

  10. because it’s immutable

  11. it accepts any number of arguments

  12. serialization is changing your data structure formate

  13. JSON is a way to save data in a file

  14. JSON saves file data that makes it good for websites.

1 Like

FIRST PART:

1,String variables can only store 1 type of value but what we need is to store multiple values and datatypes in order to keep information organized.

2, Arrays for storing multiple values
for example let myArray =[2, 5, 7, 9];

3, Expressions that access a property of some value.

4, null and undefined

5, There are two ways how to access a properties are with dot and with square brackets.
e.g. value.x // value[x]

6, A method is a property that holds function for a type of value.
7, Objects are arbitrary collection of properties.

8, Objects are special as they are able to store different values datatypes such as integers, booleans strings and arrays.

9, let anObject = {propertyOne: 1, propertyTwo: 2};

10, Some of the type of values such as numbers,strings and booleans are all immutable value remains the same on the other hand type of values such as object can be changed modified you can change their properties causing a single value to have different content at different times.

SECOND PART :

1,Because string variables are immutable.

2, Are the function that accepts any number of arguments to write such as function you put three dots before the functions last parameter.

3,Conversion of data stored in memory into a flat description. Use-case : If you want to save data in a file for later or send it to another computer over the network you have to convert memory address to a description.

4, Popular serialization format pronounced “JASON” which stands for JavaScript object notation it is widely used as a data storage and communication format on the web.

5,All property names have to be surrounded by double quotes and simple data expressions are allowed no function calls, bindings ,or anything that involves actual computation, also comments are not allowed in JSON.

2 Likes
  1. Jacques does not need a single variable. He will need a data structure of of his data. In order for him to use integers and strings, he would have to convert a string of numbers into integers to be used.

  2. An array is a better way to store this kind of data. It can hold any number of values. Using an array you can call any value from the array in the data set.

  3. Properties are some value of an object. These values can be accessed, changed, added and deleted.

  4. There are two: Null and undefined.

  5. The two ways are: value.x or value[x]

  6. Actions that can alter objects. They are functions stored as object properties.

  7. An arbitrary collection of properties.

  8. Objects can hold all the information in a data set.

  9. An object is one variable, that holds all the information needed for that variable. Ex:
    let car = {
    maker: “Nissan”,
    model: “Skyline”,
    year: 1995,
    color: “Black”
    };
    Car is the object, the information inside describes the car.

  10. A mutable objects can be altered after being created. Only objects and arrays are mutable in JavaScript.

Second Part
1.Primitive types can’t have properties which means they are immutable.

  1. Rest parameter is an improved way to handle function parameter , allowing us to more easily handle various input as parameters in a function. … With the help of a rest parameter a function can be called with any number of arguments, no matter how it was defined

  2. SKIPPED.

  3. Serialization is converting data into a flat description, one format is JSON. It is used as data storage and communication on the web and can transfer more than just JavaScript.

  4. (JavaScript Object Notation) is a format for storing and transferring data.

  5. There are no function calls, bindings, or forms of computation, or comments in JSON. Only property names can be in double quotes and simple data expressions allowed.

1 Like

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? The string cannot describe the activities due to it being a character. Variables are single value and vary. A integer does not have a change in data per index.
2. What variable type can be used in order to solve the problem of storing multiple values? An array stores strings and integers at multiple index positions: using square brackets with commas.
3. What are properties in Javascript? Properties are expressions that access a property of almost all Javascript value.
4. Which values do not have properties? The values null and undefined.
5. How can we access properties in a value (two ways)? with a . and a square bracket.
6. What are methods? Methods are properties that hold function values. These are special kinds of functions that only work on the value they belong to or holds function for a type of value. For example the .push method adds values to the end of an array.
7. What are objects? Objects are values of arbitrary collections of properties. Data structures that are capable of containing an arbitrary collection of properties. These are created using braces to contain a list key/value pairs separated by a comma.
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)? It ties different properties together to express a single condition. This allows programmers to better represent how a system should behave.
9. How do you define an object? Braces are used to create objects (separated by commas, named, and follow by a colon and a value. Defined as any other variable, with the value being a list contained within braces.
10. What can you say about the mutability of Javascript objects? Unlike numbers, strings and Booleans, which are immutable values, objects can be modified. Objects can have their properties changed.

SECOND PART:

1. Why can’t you add new properties to a string variable? They are not objects.
2. What are rest parameters? Bound to an array that has further arguments which helps functions to allow any number of arguments. To add a rest parameter use the three dots before the function’s last parameter:
let numbers = [5, 1, 7];
console.log(max(…numbers));
3. (Feel free to skip the sub-chapter of Math object and Destructing)
4. What is serialisation and what is a use case of serialisation of data? Objects and arrays that are stored as bits holding addresses. These objects can be serialized into a data management notation, suitable for digital communications.
5. What is JSON? JavaScript Object Notation, a standard used in data storage and communication on the web.
6. What are the differences between JSON and the way programmers write objects in plain Javascript? JSON - only simple expressions are allowed. No functions, bindings, comments or computations.

1 Like
  1. There is plenty of data to be collected and analyzed. So its not solvable with variable types such as strings, or integers.
  2. Array
  3. Properties are the values associated with a JavaScript object.
  4. String, Boolean, number, null, undefined.
  5. Using a dot or using a square bracket.
  6. Methods of a value are properties with a function.
  7. Objects are any Javascript values except primitives.
  8. An object is a collection of named values.
  9. JS objects are mutable because they are addressed by reference not by value.

SECOND PART:

  1. Its because strings don’t have properties. They are hard coded.
  2. Rest Parameters allows us to represent an indefinite number of arguments as an array.
  3. Serialization is converting array memory addresses to a simple description that can be sent or stored. This usually happens when an array has another array inside it.
  4. JSON is a data storage and communication serialization format.
  5. JSON converts all array code into simple string expressions. property names are put in quotes to make them strings and there are not function calls or bindings. No computation and comments are allowed.
1 Like

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?
Variable types like strings and integers can only hold a single type of data. In order to track the information in the log we need the ability to keep multiple types of data with multiple values.

2. What variable type can be used in order to solve the problem of storing multiple values?
Arrays and objects

3. What are properties in Javascript?
Properties describe some sort of characteristic of a value - for example the length of an array

4. Which values do not have properties?
Null and undefined

5. How can we access properties in a value (two ways)?
Properties can be accessed in two ways:
value.x - when using this method the ‘x’ is the literal name of the property
value[x] - when using this method ‘x’ is evaluated and the result, converted to a string, is used as the property name

6. What are methods?
Methods are properties that contain functions

7. What are objects?
Objects are a type of data structure that contain arbitrary collections 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 allow us to store a collection of multiple data types.

9. How do you define an object?
Objects are created by using {} as an expression. Inside the braces are a list of properties separated by commas.
Let object = {
myVal1: true,
myVal2: [a, b, c]
};

10. What can you say about the mutability of Javascript objects?
Most types of values cannot be changed. That is, they are immutable. Numbers, strings, Booleans are types of values that are immutable.

You can change the properties of Objects, they are mutable.

SECOND PART:

1. Why can’t you add new properties to a string variable?
A string is not an object and therefore immutable.

2. What are rest parameters?
A rest parameter is a parameter that is bound to an array. The elements of the array are ‘spread out’ and passed as individual arguments. A rest parameter is denoted by three dots in front of the parameter - max(…a)
3. (Feel free to skip the sub-chapter of Math object and Destructing)
4. What is serialisation and what is a use case of serialisation of data?
Serialisation is a process where data is converted to a format suitable for storage or transmission over a network.

5. What is JSON?
JSON is a serialisation format commonly used as a storage and communication format on the web.

6. What are the differences between JSON and the way programmers write objects in plain Javascript?
In a JSON property names have to be in double quotes and only simple data expressions are allowed.

1 Like
  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?
    Because strings and integers cannot contain the amount of data that Jaques need, cause it is too much.

  2. What variable type can be used in order to solve the problem of storing multiple values?
    An array

  3. What are properties in Javascript?
    Expressions that can be used to access properties of almost every JavaScript value

  4. Which values do not have properties?
    null and undefined

  5. How can we access properties in a value (two ways)?
    With a dot (.) and square brackets ([])

  6. What are methods?
    A method is a property that contain functions

  7. What are objects?
    Objects can hold lots of datatypes

  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 solves what you can’t do with more primitive values, it can store way more data.

  9. How do you define an object?
    Objects are defined as binding and the values goes within braces.
    I.e.
    let person = {name: “Wade”, age: 35];

  10. What can you say about the mutability of Javascript objects?
    Objects are mutable, unlike strings.

SECOND PART:

  1. Why can’t you add new properties to a string variable?
    A string is not an object and it’s immutable

  2. What are rest parameters?
    The rest parameter syntax allows a fuction to accept an endless array of arguments

  3. (Feel free to skip the sub-chapter of Math object and Destructing)

  4. What is serialisation and what is a use case of serialisation of data?
    Serialization is to convert data stored in memory into a flat description

  5. What is JSON?
    JSON is a serialization format

  6. What are the differences between JSON and the way programmers write objects in plain Javascript?
    The difference isn’t significant, but with JSON, all propertie names must be in double quotes and only simple data expressions are allowed, no function calls, bindings or anything that involves actual computation. And no commenting either.

1 Like
  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? It needs to store multiple values in a single variable.
  2. What variable type can be used in order to solve the problem of storing multiple values? Arrays and Objects can be used.
  3. What are properties in Javascript? They are are expressions that access a property of some value of a variable.
  4. Which values do not have properties? null and undefined
  5. How can we access properties in a value (two ways)? value.x returns the property of value named “x” . value[x] tries to evaluate the expression x and uses the result, converted to a string, as the property name.
  6. What are methods? Methods are properties that contain functions. They are generally called methods of the value they belong to, as in “to Uppercase is a method of a string".
  7. What are objects? Objects are arbitrary collections 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.)? The objects are types of variables extremely flexible to represent the entity in the real world because the structure of an object, its properties, and methods, can be freely defined so we can code using variables with a higher level of abstraction than other values types.
  9. How do you define an object? On object can be defined using braces as an expression:
let client = {
         name: "Mario",
         surname: "Rossi", 
         orders: [ ord909, ord1041, ord357] 
};
  1. What can you say about the mutability of Javascript objects? It’s possible to change an object’s property, causing a single object value to have different content at different times.

SECOND PART:

  1. Why can’t you add new properties to a string variable?

New properties can’t be added to a string variable because the values are immutable and can’t be changed.

  1. What are rest parameters?

‘Rest parameters’ are a function that calls all the arguments in an array.

  1. What is serialization and what is a use case of serialization of data?

In order for extended complex stores of files of objects to be stored, as well as send those files to other computers, a JSON file can be utilized. This converts all the memory of addresses into a small file – instead of needing to store the whole of your computer’s memory.

  1. What is JSON?

JSON stands for JavaScript Object Notation.

  1. What are the differences between JSON and the way programmers write objects in plain Javascript?

The main difference between JSON and plain Javascript written objects is that JSON’s data files only allow simplified direct expressions with no computations, functions, or bindings. Also, all property names need to be surrounded by speech marks.

1 Like