Data Structures (Arrays and Objects) - Reading Assignment

1.it sort need of data structure as variables can store only one type for data
2.arrays
3.charachteristics of the values.
4.Null and undefined
5.Properties in a value can be accessed using a dot and the literal name of the property. e.g. array.length
Properties can also be accessed using square brackets, with the expression between the brackets being evaluated to get the property name. e.g. array[“length”]
6.properties that hold function values.
7.Objects are 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.ability to hold as many different datatypes as we need.
9.Objects are defined as any other variable, with the value being a list contained within braces.
10.The mutability of Javascript objects means that the values they contained can be changed. This is different to other datatypes such as strings or booleans or numbers , which will always keep the same value it was defined with.

part II.:

  1. string is a primitive not an object therefore immutable
    2.These are denoted by a function’s last parameter with 3 dots before its name and are useful for functions that accept any number of arguments. When the function is called, the rest parameter is bound to an array containing all further arguments.
    3.CONVERTING DATA THAT ARE STORED IN MEMORY INTO FLAT DECRIPTION OF WHAT THOSE DATA IS.
    4.JSOn is serialization format thats is widely used for data storage and communication .
    5.These are denoted by a function’s last parameter with 3 dots before its name and are useful for functions that accept any number of arguments. When the function is called, the rest parameter is bound to an array containing all further arguments.
2 Likes

Part 1

  1. The Chapter introduces a problem that would be better solved if you were using a more organized and readable structure graph, it would help if the journal was written with something that could hold multiple keys and values pairs.
  2. It’s good to have an array with key/value pairs in a object.
  3. Properties are characteristics associated with data structure of an object.
  4. If a property does not exists it has a nonvalue that returns null or undefined.
  5. key.value or key[“value”].
  6. A ‘method’ is actually an object reference to a function.
  7. Objects are data structures containing properties using curly braces to contain a key/value pair that
    are separated by a coma.
  8. An object can tie different properties together uniquely identifying the object allowing for the values
    to be mutable.
  9. To define an object you create properties inside braces that are separated by commas.
    let anObject = {key: value, key2 : value2};
  10. You need to have mutability in objects because life and problems are ever changing.

Part 2

  1. Strings are not objects and are immutable.
  2. With the help of a rest parameter a function can be called with any number of arguments , no matter how it was defined. It can be invoked using the ( … ) syntax.
  3. N/A
  4. Serialization is the process of converting an object into a stream of bytes and data to store the object or transmit it to memory, a database, or a file. Its main purpose is to save the state of an object in order to be able to recreate it when needed.
  5. JSON must be wrapped in double quotes. No function calls, bindings, or anything that involves actual computation. Comments are not allowed either.
2 Likes

FIRST PART

  1. Data structures that allow us to store information to group values.

  2. Array.

  3. A property is an association between a name and a value.

  4. Null and undefined.

  5. With a dot or with square brackets. ex: value.x or value[x]

  6. Properties that contain functions are generally called methods of the value they belong to.

  7. A JavaScript object is an entity having state and behavior (properties and methods). An object is a collection of properties.

  8. Objects can store all of the value types: integer, string, array, boolean.

  9. To define an object you have to use curly brackets as an expression and inside the brackets there is a list of properties separated by commas.

  10. The objects in JavaScript are mutable, so their state can be modified after they were created.

SECOND PART

  1. Immutability.

  2. Rest parameters condense multiple elements into an array. It can be useful for a function to accept any number of arguments.

  3. The process whereby an object or data structure is translated into a format suitable for transferral over a network or storage. In JavaScript you can serialize an object to a JSON string by calling the function JSON.stringfy().

  4. JSON (JavaScript Object Notation) is a standard text based format for representing structured data based on JavaScript object syntax.

  5. In JSON 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.

2 Likes

FIRST PART:

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?
Data structures can be used to group a sequences of values into elements.
2. What variable type can be used in order to solve the problem of storing multiple values?
Array is a data structure to enable solving this problem.
3. What are properties in Javascript?
Properties describe values such as the length of characters.
4. Which values do not have properties?
Null and defined do not have properties.
5. How can we access properties in a value (two ways)?
You can use a dot or square matrix to access properties.
6. What are methods?
Properties that contain functions.
7. What are objects?
They are values with arbitrary collections of objects.
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)?
You can group these multiple data types together into an object as a single value.
9. How do you define an object?
Objects are arbitrary collections of properties which are listed by name, colon and value.
10. What can you say about the mutability of JavaScript objects?
Objects are mutable like tentacles that grab (i.e. bind) a value and then another when changed.

SECOND PART:

1. Why can’t you add new properties to a string variable?
Strings are immutable, not objects and are not stored.
2. What are rest parameters?
It is a function that accepts any number of parameters.
4. What is serialisation and what is a use case of serialisation of data?
It is a flat description of data converted from memory addresses.
5. What is JSON?
JavaScript Object Notations
6. What are the differences between JSON and the way programmers write objects in plain Javascript?
Property names are surrounded by double quotes and only simple data expressions are allowed. No function calls, bindings, or anything that involves actual computation. Also, comments are not allowed.

3 Likes
  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 issue here is that when we need to access a sequence of values strings&integers are not effective. We need variables that are able to store more than one value!
  2. What variable type can be used in order to solve the problem of storing multiple values?
    Array’s are a great way to store several values.
  3. What are properties in Javascript?
    Properties in JavaScript are additional infos for example “string.length” here length is a property.
  4. Which values do not have properties?
    The value null and undefined don’t have any properties.
  5. How can we access properties in a value (two ways)?
    The two ways are either with a “.” or with [] brackets.
  6. What are methods?
    Methods are properties that contains functions.
  7. What are objects?
    Objects are a way oof storing different values, Objects can contain properties and methods.
  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)?
    Unlike strings, integers objects can contain as many values as needed.
  9. How do you define an object?
    You define an object by using {} brackets.
  10. What can you say about the mutability of Javascript objects?
    JavaScript objects are utuable, exept primitive objects like numbers, strings, booleans…

Part 2

  1. Why can’t you add new properties to a string variable?
    Because strings are immutable adding properties to a string doesn’t stick!
  2. What are rest parameters?
    The rest parameters is an added"…" in front of a parameter. It allows to the function to put an infinite amount of arguments and convert them into arrays.
  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?
    It’s the process of converting your data into a flat format.
  5. What is JSON?
    Json is JavaScript’s Objesct of notation. JSON is used to transfer data from the server to the web page.
  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 epressions are allowed! Comments are not allowed in JSON.
3 Likes
  1. It shows a way how to systematically store a bunch of data.
  2. Array
  3. Almost all JS values have properties.
  4. null, undefined
  5. with a dot or square brackets
  6. For example: toUpperCase() ; toLowerCase()
  7. Objects are arbitrary collection of properties.
  8. Objects can store different types of values such as integers, booleans, strings and arrays.
  9. An object is a type of variable that can have many different values. var MyObject = { value1 , value2, etc…}
  10. Object values can be modified
    SECOND PART
  11. Such values are immutable and cannot be changed
  12. Rest parameters are bound to an array.
  13. yes
  14. Data is converted into a flat description. Popular serialisation format is JSON
  15. Used as a data storage and communication format on the WEB.
  16. In JSON:
  • Property names need to be surrounded by double quotes.
  • Simple data expressions are allowed - no function calls, bindings, or actual computation.
  • Comments are not allowed in JSON.
2 Likes
  1. Grouping values and data structures. A variable type is needed to store to store multiple values and make them easily accessible.

  2. An Array is used for storing sequences of values.

  3. Properties are the values associated with a JS object.

  4. null and undefined.
    5.The two main ways are with a dot and square brackets.

  5. A method is a property containing a function definition.

  6. Objects are containers/collections of properties. User can store different values types(methods, properties) inside the object.

  7. Objects allow us to store integers, strings arrays, booleans, as one single value, that can be manipulated as needed.

  8. Objects are like an octopus with unlimited tentacles, each with a name tattooed on it.

  9. Properties within an object can be changed, and still have the same object.

  10. Because a string variable is not an object.

  11. Rest parameters are used to create functions that accept any number of further arguments.

  12. Serialization means to convert data into a flat description.

  13. JSON is a communication and data storage format on the web.

  14. It is similar with a few restrictions. property are to be surrounded by double quotes, comments are not allowed, and only simple data expressions - no functions and complex computations.

2 Likes

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 such as strings and integers are only able to hold a single type of data. What our friend needs is a data structure that is capable of storing multiple values and datatypes in order to keep all of the information organised.

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

3. What are properties in Javascript?
Most Javascript values have properties. These define some characteristic about the values in a data structure, such as the length of an array or the index of a value.

4. Which values do not have properties?
Null and undefined are the exceptions that do not have properties.

5. How can we access properties in a value (two ways)?
Properties in a value can be accessed using a dot and the literal name of the property. e.g. array.length
Properties can also be accessed using square brackets, with the expression between the brackets being evaluated to get the property name. e.g. array[“length”]

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.

7. What are objects?
Objects are 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)?
Objects are special as they are able to hold as many different datatypes as we need.

9. How do you define an object?
Objects are 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?
The mutability of Javascript objects means that the values they contained can be changed. This is different to other datatypes such as strings, which will always keep the same value it was defined with.

SECOND PART:

1. Why can’t you add new properties to a string variable?
A string is not an object but a primitive type, so they are immutable.

2. What are rest parameters?
These are denoted by a function’s last parameter with 3 dots before its name and are useful for functions that accept any number of arguments. When the function is called, the rest parameter is bound to an array containing all further arguments.

3. What is serialisation and what is a use case of serialisation of data?
Serialisation is converting data stored in memory into a flat description of what that data is. It is useful for when we want to do things like saving the data to a file or transferring it to another computer on a network.

4. What is JSON?
JavaScript Object Notation is a serialisation format widely used for data storage and communication.

5. What are the differences between JSON and the way programmers write objects in plain Javascript?
All property names need to be surrounded in double quotes and only simple data expressions are allowed. So no function calls, bindings, or anything that involves actual computation. Also, comments are not allowed in JSON.

4 Likes

FIRST PART

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 such as strings and integers can only store one data type which will not work in this case as there are too many factors to take into account.

2. What variable type can be used in order to solve the problem of storing multiple values?
One can use an array to store multiple different values of data.

3. What are properties in Javascript?
These are expressions that access a property of a value. For example: myString.length or Math.min.

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

5. How can we access properties in a value (two ways)?
This is done with either a dot or with square brackets. When using a dot, the word after the dot is the literal name of the property. When using square brackets, the expression between the brackets is evaluated to get the property name.

6. What are methods?
Methods are properties that contain functions. These only work with the value that they are attached to.

7. What are objects?
These are arbitrary collections of properties. They are enclosed in braces(curly brackets).

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 hold as many datatypes as needed. Strings, integers, arrays can only store a single datatype.

9. How do you define an object?
You define an object within braces(curly brackets). eg. let funTimes = {events : [“swimming”, “touch rugby”, “5v5 soccer”…].

10. What can you say about the mutability of Javascript objects?
Javascript objects a mutable which means their values can be changed unlike numbers, strings, and Booleans which are immutable.

SECOND PART:

1. Why can’t you add new properties to a string variable?
Because string variables are immutable and cannot be changed.

2. What are rest parameters?
The rest parameter syntax allows us to represent an indefinite number of arguments as an array. A function’s last parameter can be prefixed with ... which will cause all remaining (user supplied) arguments to be placed within a “standard” JavaScript array. Only the last parameter can be a “rest parameter”.

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 converting data into a flat description. It is used to save files for later or send them to another computer over the network.

5. What is JSON?
Javascript Object Notation is serialisation format widely 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?
JSON looks similar to JavaScript’s way of writing arrays and objects, with a few restrictions. 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.

4 Likes

First Part

  1. Variables like strings and integers can only hold “single values.” So, by utilizing arrays, you can create a bag that holds multiple/separate values that allows you to go in and select the entire bag all at once, or individual values from it.

  2. Arrays are an option to solve this single value issue.

  3. Most values in javascript have PROPERTIES. These properties help define some of these values further. An example would be the .length property or the array[i] which extracts a specified index within an array.

  4. Values that do not have properties are “null” and “undefined.”

  5. You can access properties by utilizing the . or [ ]. The word after the dot is the literal name of the property being accessed. When using [ ], what is contained inside the brackets is evaluated to then go and get the property name.

  6. Properties that contain functions are generally called Methods. Another way of saying it, a method is a property that holds a function value. Whereas when calling for the length of a property, it tells you something about the value. A method has some kind of function that contributes to the value in one way, shape, or form.

  7. An object contains a collection of individual values that can have random information, all stored with organization within the object.

  8. Objects solve the problem that other values like integers, strings and booleans can’t by holding random information, stored with organization, all within the same object.

  9. You can create an object by using the = operator followed by { }. Within these brackets is where you store your arbitrary information that ultimately define the object.

  10. Immutability is found in values like numbers, strings, booleans, null and undefined. You cannot change the value of these. Mutability, however, is found in arrays and objects. This is because you can change the value of what is inside the object or array.

Second Part

  1. You can’t add new properties to a string variable because a string isn’t an object, it’s immutable. You cannot change its value.

  2. When a function is called, adding …word as an argument takes the entire array “word” and applies it tot eh function.

  3. Serialization means data is converted into flat description. It’s widely stored as data storage and a communication format on the web.

  4. A widely used and accepted serialisation format is called JSON (Javascript Object notation).

  5. The differences between JSON and the way javascript programmers write code in plain javascript are: 1. All property names have to be surrounded by double quotes 2. Only simple data expressions are allowed (no function calls, bindings, or anything that involves actual computation).

3 Likes
  1. The data we have is pretty complex and varied. Plus we don’t know how we will need to use that data right away. The data is unstructured, and so it won’t be useful unless we come up with a way to make it meaningful.
  2. Array
  3. Values associated with and object.
  4. Null and undefined.
  5. Dot or square brackets
  6. Properties that contain functions
  7. Objects are variables with many values
  8. They can carry varied types of information
  9. We use braces as an expression
  10. Objects can be modified, they are mutable
  11. I string is immutable
  12. Rest parameters are a way to represent many arguments as an array
  13. Serialization is a way of storing data in a more efficient manner.
    15)JSON is a serialization format
  14. Only data expressions are allowed, and it must be surrounded in double quotes.
1 Like
  1. The problem introduced by The Weresquirrel is the inability to store multiple values or data types in a string or integer variable.

  2. An array can be used to solve this problem.

  3. Properties are the characteristics of the data structure of an object, whether literal or evaluated depending on desired outcome.

  4. Values without properties are null and undefined.

  5. We can access properties in a value either with dot or square bracket notation.

  6. Methods are properties that hold function values.

  7. Objects are arbitrary collections of properties.

  8. Objects solve the problem of not being able to store multiple values in a variable.

  9. Objects are defined by using curly brackets {}, similar to variables ().

  10. Objects in JavaScript are mutable.

2.1 We can’t add new properties to a string variable because strings are immutable.

2.2 Rest parameters are a function that accepts any number of parameters.

2.3 Serialization of data is the process of streamlining/optimizing data for transmission. 1s and 0s

2.4 JSON - JavaScript Object Notation is a popular serialization format used in data communication and storage.

2.5 JSON and JavaScript look similar in arrays and objects with a few restrictions. All property names have to be surrounded by double quotes and only simple data expressions are allowed. No function calls, bindings or computation. No comments allowed in JSON.

1 Like
  1. What problems does this chapter introduce that cannot be solved with variable types such as strings or integers.
    this person needs a set of variables inside of an function.

  2. What variable type can be used in order to solve the problem of storing multiple values?
    This can be done with:
    with an array you can store multiple variables into one variable liket his:
    let listOfNumbers = [2, 3, 5, 4];

  3. What are properties in Javascript?
    Most javascript values have properties, These define some characteristic about the value in a data structure, such a s the length of an array or the index of a 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 with the square brackets

  6. What are methods?
    a method in javascript is like a little function in javascript itselfs that can do a certain action. Lets say you want to make all the text in the " … " all cap then you have to write, function.method. There also is .push, .pop, .toUpperCase, .toLowerCase etc.

  7. What are objects?
    a object is a datastructures like objects and are used to store 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)?
    with an object you can create a value with multiple values in it that you can call with certain methods. This makes a object special because Objects are special as they can hold different datatypes.

  9. How do you define an object?
    you call a variable then the name of the variable you want to give it and then parentheses with the values you want to have in there. Like this

var myCar = {
    make: 'Ford',
    model: 'Mustang',
    year: 1969
};
  1. What can you say about the mutability of Javascript objects?
    mutability of an object is that if you make an object you can kinda change the output of the first object with a different name or other values. But this doesn’t mean that the main value get changed.
    The second object you make from the first will actually save the last variable you’ve assigned it to and becomes the dominant output.

SECOND PART:

  1. Why can’t you add new properties to a string variable?
    Because they are not an object they behave like a normal string that doesn’t do a function. But if you use a property like .length it is useable because the computer recognizes that this is a function.

  2. What are rest parameters?
    Rest parameters are bound to an array wich contains all further agrguments. This allows functions to allow any number of arguments. This allows functions to allow any number of arguments. To add a rest parameter use three dots before the kfunction’s last parameter.

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

  4. What is serialisation and what is a use case of serialisation of data?
    Serialization is the process of converting data structures or a object state into a format that can be stored. It is used to save data in a file or send it to another computer over the network.

  5. What is JSON?
    JSON stands for JavaScript Object Notation. This looks a little the same as writing arrays and object in Javascript. But with a JSON file you can send a format to another computer on the web.

  6. What are the differences between JSON and the way programmers write objects in plain Javascript?
    with a JSON file you can use the double quotes(" ") an write a object in it. With plain Javascript you first have to declare it as an object.

1 Like
  1. This chapter will introduce ways to store multiple values in a data structure.

  2. The data type that JavaScript uses in order to store group several values into a single value called array

  3. Properties are expressions that access a property of some value, they define what characteristic a specific value holds in a datastructure

  4. Null and undefined are the only values that do not have properties

  5. The two ways to access properties are with a dot and with square brackets. If we know the literal name of the property we use dot before name and If we want to extract the property named by the value held, we use square brackets.

  6. Properties that contain functions are called methods of the value they belong to.

  7. Objects are values with collections of properties.

  8. The problem that objects solve is, that they can store different kinds of values in one, while other value types can store only one type of value.

  9. An object has braces with a list of named properties separated by commas inside them.

  10. Object values can be modified, they are not immutable such as numbers, strings, and Booleans, are. We can change their properties, causing a single object value to have different content at different times.

  11. Becouse string variables like string, number, and Booleans, are immutable they cannot be changed and store new properties.

  12. rest parameter allows us to represent an indefinite number of arguments as an array and is called by writing three dots before the functions name.

  13. Serialisation is the conversion of data into a flat description, which is useful for saving and sending data.

  14. JSON is a serialization format that is used as a data storage and communication format on the Web.

  15. In JSON we write all property names by using “ “.Also only simple data expressions are allowed, function calls, binding, computations and comments are not 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?

how to bundle data together like boolean and strings to create an object or an array

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

objects and array

3-What are properties in Javascript?

some caracteristics of a value (it can be from a string or a integer, all except null and undefined)

4-Which values do not have properties?

all javascript values exept null and undefined

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

with a dot and with square brackets.

6-What are methods?

Properties that contain functions are generally called methods of the value they belong to

7-What are objects?

Values of the type object are arbitrary collections of properties between braces

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 permit us to group strings, integer and boolean in the same bundle

9-How do you define an object?

by using braces around it

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

The types of values discussed in earlier chapters, such as numbers, strings, and Booleans, are all immutable —it is impossible to change values of those types. You can change their properties, causing a single object value to have different content at different times

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

It dont store the property , it doesnt stick

2-What are rest parameters?

it is all arguments bounded in an array that can be called with … before the last parameter

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?

If you want to save data in a file for later or send it to another computer over

the network, you have to somehow convert these tangles of memory addresses to a description that can be stored or sent. What we can do is serialize the data. That means it is converted into a flat description

5-What is JSON?

A popular serialization format, It is widely used as a data storage and communication format on the Web, even in languages other than JavaScript

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 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?
    The problem that he needs a data structure to store information.

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

  3. What are properties in Javascript?
    They are expressions like myString.length (to get the length of the string) or Math.max (the maximum function). There are expressions that access a property of some value.

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

  5. How can we access properties in a value (two ways)?
    The main 2 ways to access properties in javascript are with a dot and with a square brackets like value.x and value[x].

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

  7. What are objects?
    They are values, arbitrary collections of properties, it can be created by using braces as an expression.

  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 hold different kind of datatypes we may need.

  9. How do you define an object?
    By using braces as an expression.

  10. What can you say about the mutability of Javascript objects?
    Javascript objects can be modified, different than the other types of values, such as numbers, booleans, strings, are all immutable, it is possible to change values of those types.

SECOND PART:

  1. Why can’t you add new properties to a string variable?
    Because it’s an immutable value.

  2. What are rest parameters?
    Rest parameters allow a function to accept any number 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?
    Serialisation the data is converting it to a flat description. A popular serialitsation format is called JSON.

  5. What is JSON?
    JavaScript Object Notations. It is widely used as a data storage and communication format on the web, even in languages other than javascript.

  6. What are the differences between JSON and the way programmers write objects in plain Javascript?
    The way of writing looks similar of arrays and objects, with a few restriction; all property names have to be surrounded by double quotes, and only simple data expressions are allowed, no function call, bindings, or anything that involves actual computation. Comments are not allowed in JSON.

1 Like

FIRST PART

  1. In this case we require a variable that can hold multiple values
  2. Objects and Arrays
  3. It’s a characteristic that a value can have
  4. Null and Undefined
  5. “object.property” or “object[property]”
  6. Is a property that holds function for a type of value
  7. Objects is a way of grouping properties in which we can store different value types
  8. This brings the ability to the value to be mutable or changeable since it references the entity referred as object and not the value itself
  9. An entity that allow us to group information.
  10. Its main advantage is in providing flexibility

SECOND PART

  1. Since it’s not an object you can only have the predefined properties of the programming language
  2. These parameters are bound to an array containing additional arguments assigned to a function
  3. This doesn´t require an answer :sweat_smile:
  4. When we convert data structures into a format that can be stored in a file or sent to another device.
  5. It stands for JavaScript Object Notation
  6. Comments are not supported in JSON. and all property names need to be defined in quotes. Simple data expressions are allowed but no function calls, bindings or other computing processes.
1 Like

Data Structures (Arrays and Objects) - Reading Assignment.

  1. The problem that the chapter introduced that can be solved with variable types such as strings or integers is, how best possible to represent a chunk of raw data that comprise of multiple variables and their properties, sequence of events, numbers etc. to be captured and present into data for the computer memory to produce possible result we want to know.

  2. Object can be used in order to solve problems of storing multiple values.

  3. Properties in javaScript are expressions that access a property of some value.

  4. The null value and undefined are the values that do not have properties. If you try accessing a property of these nonvalues, you get an error.

  5. There are two ways you can access a property value.

  • dot (.x) eg . lastName;

  • square bracket [x] eg [“lastName”];

  1. Methods are functions that live in properties and (usually) act on the value they are a property of.

  2. Object allow us to group values - including other objects to build more complex structures.

  3. The problem that the object solve that cannot be solved with other value types is the issue of attachment to each variable in case they have the same name - the property differentiate them. objects are given attachments.

  4. Objects are arbitrary collection of properties. They are containers for named values called properties or methods.

  5. Mutability of JavaScript object is that you can change properties, causing a single object value to have different contents at different times.

String and their Properties.

  1. You cannot add properties to a string of variable because values of type string, number, and Boleans are not objects. Such values are immutable and cannot be changed.

  2. Rest Parameter is an array containing all further arguments - an indefinite number of argument as an array. With it help, a function can be called with any number of arguments, no matter how it was defined.

  3. Skipped chapter of Math Object and Destructing.

  4. Serialization is the process whereby an object or data is translated into a format suitable for transfer over to a network or storage. For example, serialzing an object to a JSON string by calling the function JSON.stringify().

  5. JSON (JavaScript Object Notation) is a data storage and communication format on the web, even in languages other than JavaScript.

  6. The difference between JSON and the way programmers write in JavaScript is that in JSON 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.
    JavaScript gives the function - JSON.stringify and JSON.parse convert data to null from this format.

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?

A variable like a string or integer only can store one information, when we need to store more than one we need data structures.

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

Arrays

  1. What are properties in Javascript?

A property is a value of an object, example: mystring.length

  1. Which values do not have properties?

Null and undefined values.

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

value.property or value[‘property’]

  1. What are methods?

A method is a function within an object, they normally use the object to operate, returns a value or do a side effect.

  1. What are objects?

An object is a data structure that can contains properties and methods.

  1. 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 different values within an object.

  1. How do you define an object?

An object is defined like a normal variable, with its property names and values, within brackets:
let object = {property: “value”}

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

Values in a javascript object can be modified as we want.

SECOND PART:

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

Because they are not objects, they only store a value, not a property name and its value.

  1. What are rest parameters?

Rest parameters are represented by 3 dots and a parameter list name and they say that the function accepts any number of arguments.

function(a, b, ...theArgs) {
  // ...
}
  1. (Feel free to skip the sub-chapter of Math object and Destructing)
  2. What is serialisation and what is a use case of serialisation of data?

Serialization is the conversion of an object data, making it readable into a format to be stored or sent.

  1. What is JSON?

JavaScript Object Notation, it’s a popular serialization format to make easier store and data exchange on the webs.

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

In JSON, properties need to be put within double quotes and it doesnt allow bindings, comments or functions.

1 Like
  1. Solving the weresquirrel problem requires using arrays and objects to find correlations between sets of data,
    something not possible with strings or integers

  2. Objects are able to store multiple values

  3. Each property has a name followed by a colon and a value, as parts of an object

  4. null or undefined do not have properties

  5. we an access it with:
    object.property
    or with:
    “property” in object
    6.A method is a function which is a property of an object.

  6. object is a group of values that may assign properties to those values

  7. They solve the problem of not being able to store multiple different types of data in one variable

  8. the same way you define a variable, using let or const

  9. You can change their properties, causing a single
    object value to have different content at different times.

  10. string are immutable

  11. using a “…” before an object to include all the values in that object to be affected by the function

  12. serialization allows us to turn data properties into a flat description, useful when you want to save data as a file
    that can be transferred to another user

  13. A popular serialization format which stands for JavaScript Object Notation. It is widely used as a
    data storage and communication format on the Web, even in languages other
    than JavaScript.

  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