Data Structures (Arrays and Objects) - Reading Assignment

  1. the chapter introduces variables that would require multiple types of data
  2. arrays
  3. properties are what define the characteristics of of a value
  4. null and undefined
  5. you can acces the properties by using a dot and the name of the property or by using square brackets []
  6. methods are properties that hold function values
  7. objects are a collection of properties
  8. objects can have multiple different value types at the same time expressed in one condition.
  9. multiple properties within braces for one variable, seperated by commas. for example VAR (X)= {propertyA; 1, propertyB; 2, propertyC; 3};
  10. objects are mutable. You can change the properties within an object.

part 2

  1. values of strings are immutable
  2. putting 3 dots before a functions last parameter is a rest parameter. This allows the function to allow any number of arguments.
  3. serialisation is the conversion of data into a flat description which makes it easier to save and send data
  4. JavaScript Object Notation
    6.JSON requires double quotes around all property names and the use of simple data expressions, so no comments function calls or binds etc that would involve computation
1 Like
  1. Strings or integers cannot store complex, big, sets of data

  2. Arrays solve the problem of storing multiple values

  3. Properties in Java script are features or characteristics associated with variable/object/string/integer

  4. null and undefined has no properties

  5. 1st way: value.property, 2nd way: value[property]

  6. Methods are properties which contain functions

  7. Objects are collections of properties

  8. We can store much more data in one object which we couldn’t do in integers, strings etc.

  9. We define object using curling braces let Object ={a:1, x:[“bla”,“ble”]}

  10. Objects are mutable (you can change properties so they have different values in different time)

SECOND PART:

  1. String is not an object and does not store the properties.

  2. Rest parameters are “…” we use them to allow function include any number o f arguments

  3. Serialization of data is conversion to flat description

  4. JSON is data serialization format. (JavaScript Object Notation). It’s used as data storage and communication format on the web

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

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? Storing values in a row cannot be solved by data types as strings or integers

  2. What variable type can be used in order to solve the problem of storing multiple values? An array, by using a list of values in between square brackets, separated by commas.

  3. What are properties in Javascript? Properties are the values associated with a JavaScript object.

  4. Which values do not have properties? Null and undefined, if you try you will get an error.

  5. How can we access properties in a value (two ways)? Both value.x and value[x]

  6. What are methods? Methods are functions defined inside an object

  7. What are objects? Values of the type object 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)? Objects can solve problems that involve correlation between variables

  9. How do you define an object? [ ]

  10. What can you say about the mutability of Javascript objects? such as numbers, strings, and Booleans, are all immutable— it is impossible to change values of those types. You can combine them and derive new values from them, but when you take a specific string value, that value
    will always remain the same

part 2

  1. Why can’t you add new properties to a string variable? 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.

  2. What are rest parameters? Rest parameter is an improved way to handle function parameter, allowing us to more easily handle various input as parameters in a function. The rest parameter syntax allows us to represent an indefinite number of arguments as an array. With the help of a rest parameter a function can be called with any number of arguments, no matter how it was defined.

  3. What is serialisation and what is a use case of serialisation of data? In computing, serialisation is the process of translating a data structure or object state into a format that can be stored

  4. What is JSON? avaScript Object Notation. It is widely used as a
    data storage and communication format on the Web, even in languages other
    than JavaScript.

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

1 Like

Part 1

  1. A variable type only allows us to store one variable at a time, we need a data structure that allows us to store multiple variables at once.
  2. Array
  3. Properties are values of JavaScript.
  4. Null and undefined do not have properties.
  5. The two main way we access properties in a value are with a dot and a square bracket.
  6. Properties that contain functions are called Method.
  7. Objects are the arbitrary collections of properties.
  8. Objects allow us to represent different data types.
  9. Object defined by curly braces.
  10. Mutability allow us to modify the object values.

Part 2

  1. Because string is not mutable.
  2. Rest parameter is bound to an array that containing all further arguments.
  3. None
  4. Serialization convert data into flat description. A use case that we can save data in a file for later or send it to another computer.
  5. JSON stands for Object JavaScript Notation and it is used for as a data storage and communication on the web.
  6. In JSON all property name have to be surrounded by double quotes and only simple data types are allowed, no function called, binding or anything involves with actual computing. No 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? Jacques is tyring to understand the cause of his transformations by examining several events and comparing those events to the outcome of transforming into a squirrel. So, now we’re dealing with multiple variables concurrenlty and primitive types are not sufficient to arrive at a satisfactory conclusion.

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

  3. What are properties in Javascript? Properties are the values associated with an object. Though and object can have multiple properties and property values can (but not always) change, properties describe the various features of an object.

  4. Which values do not have properties? “null” and “undefined” are values that have no properties.

  5. How can we access properties in a value (two way)? In JavaScript, properties can be accessed using a dot “.” or square brackets “[]”.

  6. What are methods? Methods are actions that an object can take. These are also referred to as functions.

  7. What are objects? In JavaScript, objects are 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 solve complex problems through the use of methods and properties that can act on collections of information we refer to as Data Sets.

  9. How do you define an object? According to the text “One way to create an object is by using braces as an expression”. But in other texts; creating an object can be accomplished using an object literal, with the keyword “new”, using a constructor, or by using object.create().

  10. What can you say about the mutability of Javascript objects? I can say that objects in JavaScript are, in fact, mutable. This means that object properties can be changed, causing a single object value ot have different content at different times.

SECOND PART:

  1. Why can’t you add new properties to a string variable? Because ‘string’ values are not objects. Such values are ‘immutable’ and cannot be changed.

  2. What are rest parameters? The rest parameter allows us to represent an indefinite number of arguments as an array. If the last argument is prefixed with ‘…’ it becomes an array whose elements are supplied by the actual arguments passed to the function.

  3. (I chose not to skip any section of this crazy chapter…)

  4. What is serialization and what is a use case of serialization of data? Serialization is the process of converting data into a flat description. JSON is such a way to leverage serialization.

  5. What is JSON? JavaScript Object Notation is a data storage and communication format.

  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. There are no function calls, or bindings in JSON. Comments are not allowed in JSON, etc.

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 type is needed that can store multiple values and make them easy to access.  
   
2. What variable type can be used in order to solve the problem of storing multiple values? Array
3. What are properties in Javascript? 

A JavaScript property is a characteristic of an object, often describing attributes associated with a data structure
4. Which values do not have properties? null and undefined.
5. How can we access properties in a value (two ways)? with value .x and value[x]
6. What are methods? Properties that contain functions are generally called methods of the value they belong to, as in “toUpperCase is a method of a string”.
7. What are objects? data structures like objects 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)? they solve the need to store different data types.
9. How do you define an object? collections of properties
10. What can you say about the mutability of Javascript objects? They are addressed by reference, not by value

Think about the following questions:
1. Why can’t you add new properties to a string variable? such values 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.
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? the process of translating a data structure or object state into a format that can be stored (for example, in a file or memory data buffer) or transmitted (for example, over a computer network) and reconstructed later (possibly in a different computer environment).
5. What is JSON? JavaScript Object Notation. 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. That a variable type like strings or integers can only be stored one at time and sometimes there is the need to store multiple variables at once.
  2. Array
  3. They are values associated with an object.
  4. Null and undefined.
  5. we can access using value.x or value[x]
  6. Methods are properties that contains functions.
  7. Objects are collections of properties.
  8. Objects can hold many values of different types and can build structures.
  9. Using braces with properties separated by commas.
  10. You can change their properties causing a single object value to have different content at different time.
    PART 2
  11. Because the variables such string, number or boolean are immutable and can´t be change.
  12. When this function is called, rest parameter is bound to array containing all further arguments. To write this function you put tree dots before function name.
  13. done
  14. Serialisation is taking some data and turning it flat for storage and send it to other user in the network.
  15. Stands for JavaScript Object Notation.
  16. Properties names have to be surrounded by doble quotes and single only single data expression are allowed -no functions calls, bindings or anything that involves actual computation. Also comments are not allowed
1 Like

First part:

  1. Variable types such as strings or integers can’t store multiple values, whereas objects can contain many values (store multiple values in a data structure).

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

  3. Properties are characteristics of values in Javascript.

  4. “null” and “undefined”

  5. First way: value.property
    Second way : square brackets [ ] : value[property]

  6. Methods are properties that hold a function.

  7. Objects are data structures that represent a certain amount of properties.

  8. Objects can store values of different types as integers, booleans, strings and arrays (arbitrary collections of properties).

  9. You define an object using curly braces { } as an expression. Inside the braces, there is a list of properties separated by commas. Each property has a name followed by a colon and a value.

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

Second part:

  1. String variables are immutable and cannot be changed.

  2. Rest parameters allow a function to accept any number of arguments. To write such a function, we use three dots (…) before the functions last parameter.


  3. Serialization is the process of converting data structures or an object state into a format that can be stored or sent.

  4. JSON (Javascript Object Notation) is a popular serialisation format used on the web for storing and exchanging data.

  5. In JSON, comments are not allowed and 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).

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? Storing multiple values of different types, Fortunately, JavaScript provides a data type specifically for storing sequences
    of values. It is called an array and is written as a list of values between square
    brackets, separated by commas.
    l

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

Arrays

  1. What are properties in Javascript? length, Max, color

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

  3. How can we access properties in a value (two ways)? With a dot and with
    square brackets

  4. What are methods? Properties that contain functions

  5. What are objects? In JavaScript, an object is a standalone entity, with properties and type. Compare it JavaScript objects can have properties, which define their characteristics.

  6. 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)? Mutability

  7. How do you define an object? JavaScript objects are containers for named values called properties that can be changed.

  8. What can you say about the mutability of Javascript objects? Objects can change their properties, causing a single object value to have different content at different times.

1 Like

Part 1:

  1. Strings and integers can’t store multiple values, but objects can do this.
  2. Array.
  3. Properties are specific values associated with an object.
  4. Null and undefined values don’t have properties.
  5. You can access a property by either typing, for example, array.length or array[“length”] - dot or square brackets.
  6. Properties that contain functions.
  7. Arbitrary collections of properties.
  8. Object can hold many values of different types.
  9. You define an object using curly braces and separate properties with commas.
  10. Objects are not immutable. You can change their properties, causing a single object value to have different content at different times.

Part 2:

  1. Strings are immutable.
  2. A rest parameter allows a function to accept an indefinite number of arguments as an array.
  3. N/A
  4. Converting data into a flat description. Data storage and communication format on web is a common use case.
  5. JavaScript Object Notation - a popular serialization format
  6. In JSON, all property names need to be surrounded by double quotes, and only simple data expressions are allowed (i.e. no function calls, bindings or computation). Comments are also not allowed in JSON.
1 Like
  1. He needs a way to store multiple variables in a single place. This cannot be done with data types such as strings and integers. So we need something else like Arrays and Objects which can hold multiple variables under one roof and can enable our friend to be flexible in keeping his journal.

  2. Objects and Arrays

  3. Properties are expressions that help acquire particular information about a certain value.

  4. Null and Undefined.

  5. Examples of properties in J.S are Math.max(to get the maximum from a list of data) and the .length ( to get the length of a string)

  6. Methods are properties that contain functions. E.g .toUppercase() and push and pop methods.

  7. An Object refers to a collection of arbitrary properties. For example, An object can contain an Array and a Boolean in it.

  8. They combine several types of properties into a single value.

  9. I would say an object is a data type that can hold several
    different types of properties such as arrays,
    booleans and strings under a single roof.

  10. Objects values can be modified and each Object is special.

PART 2;

  1. Because it is an immutable type of value.

  2. They help functions accept any number of arguments.

  3. Ok

  4. Serialization helps you convert data into a flat description for easy movement over a network.

  5. JSON refers to Javascript Object Notation and it is a widely used data storage and communication format on the Web, even in languages other
    than JavaScript.

  6. JSON is similar to Javascript but they are a few restrictions in the way arrays and objects are written. such as there is no function calls in JSON and comments are not allowed.

1 Like

Part 1

  1. The problem with these variable types is that they do not allow for flexibility in our code. By flexibility I mean, for example, we can not modify, we cannot change or we cannot add data to these types of variables.

  2. Objects and Arrays.

  3. Properties are built-in functions in JS that allow us to get some information about a certain string or variable. Popular examples are the .length and Math.max/math.min properties.

  4. Null and Undefined.

  5. By using a dot(.) and the square brackets [].

  6. Methods are built-in functions within properties that can be used to manipulate the properties. For example, the push method is used to add values to the end of an array.

  7. Objects are a data type that allows us to collect different types of properties together.

  8. The problem of immutability.

  9. I would define an object as a collection of different properties relating to the same or similar category. For example, An object to display the features of a car might look like this,
    carInfo = {manufacturer: “Tesla”, year: 2018, model: “S-plaid”, transmission: “Automatic”};

  10. Javascript objects allow for mutability in that we can modify the information in an object. We can add data, change or delete data from an object.

Part 2:

  1. Because they represent a fixed input which is immutable.

  2. Rest parameter is a way that lets a function accept any number of arguments.

  3. I Read it too :slight_smile:

  4. It is a way to compress data into an easy form so it can be transferred over the web.

  5. JSON refers to Javascript Object Notation. It is a widely used method for data sharing over the web.

  6. In JSON, all property names are surrounded by double quotes. And comments are not allowed.

1 Like

Part 2

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

  2. What are rest parameters? The rest parameter syntax allows a function to accept an indefinite number of arguments as an array. 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? Data converted into a
    flat description. Converts data of memory addresses
    to a description that can be stored or sent.

  4. What is JSON? A popular serialization format which stands for JavaScript Object Notation. used for data storage and communication format on the Web.

  5. 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?
    Strings and Integers can only hold single values. In this example, we need a data structure that can hold multiple types values.

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

  3. What are properties in Javascript?
    In Javascript, properties are expressions that accesses a property of a value.

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

  5. How can we access properties in a value (two ways)?
    Two ways of accessing a property in a value are with the dot . and square brackets [ ]

  6. What are methods?
    Methods are properties that contain functions. For example, .toUpperCase 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)?
    Objects allow you to hold all different value types, and build more complex systems.

  9. How do you define an object?
    An object is defined by using braces. There is a list of properties separated by commas, and each property has a name followed by a colon and a value.

  10. What can you say about the mutability of Javascript objects?
    The properties of objects in Javascript can be changed. Unlike the immutability of strings, integers, and booleans, objects are mutable.

SECOND PART:

  1. Why can’t you add new properties to a string variable?
    String variables are immutable and they are not objects, so if you try to add a property to a string variable, the property won’t actually stick.

  2. What are rest parameters?
    A rest parameter accepts any number of arguments. It’s bound to an array containing all further 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 converting data into flat description which is transferable over the network.

  5. What is JSON?
    JSON (JavaScript Object Notation) is the most popular serialization format, not just for JavaScript but for other languages too.

  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

First Part

  1. There are two problems as follows.
    a. Store multiple values within one variable.
    b. Store multiple types of data within one variable.
  2. An array.
  3. Properties of an object or data type are specific related data about that object. For example, the elements of an array are stored as properties of the array. The number of elements in the array is also a property of the array. Properties can also be functions, which are called methods of the data type or object.
  4. These are null and undefined.
  5. Properties can be accessed by dot “ . “ or square bracket “ [ ] ”.
  6. Methods are properties that hold functions.
  7. Objects are arbitrary collections of properties.
  8. Storing multiple data types within one value.
  9. An object is created with braces “ { } “.
  10. The properties of an object can be changed and are thus mutable.

Second Part

  1. Strings are immutable. The number and types of their properties cannot be changed.
  2. The “rest parameter” is the that last parameter amongst a function’s inputs specified in such a way that it allows the function to accept any number of arguments. It is designated by writing three dots “ … “ before that last parameter.
  3. …
  4. Serialization is the conversion of data from the normal format where objects and arrays are stored as address locations of their contents to a flat description. This flat description has the content values included in a simple format which takes up less memory space.
  5. JSON is short for JavaScript Object Notation and is a popular serialization format.
  6. Differences between JSON and plain JavaScript.
    a. In JSON, all property names must be in double quotations.
    b. Only simple data expressions are allowed, with no function calls, bindings or anything requiring computation.
    c. Comments are not allowed in JSON.
1 Like

FIRST PART
Q.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.1. Use of Arrays for storing sequences of values. It would be time consuming/awkward
using strings and integers to store data arrays.

Q.2.What variable type can be used in order to solve the problem of storing multiple values?
A.2 A type called an array and is written as a list of values between square
brackets, separated by commas.

Q.3.What are properties in Javascript?
A.3. Meta data about the data, gives description/details/property of the data/value itself
examples the Math.max (property named max in the Math object)

Q.4.Which values do not have properties?
A.4. Values of type string, number, and Boolean are not objects, since
they are immutable

Q.5.How can we access properties in a value (two ways)?
A.5. (a.)dot notation example array.length
(b.)square bracket notation example array[“length”].

Q.6.What are methods?
A.6. Values (Strings and arrays) contain properties as well as hold function values.

Q.7.What are objects?
A.7. Arbitrary values that havae a collection(s) of properties.

Q.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)?
A.8. Each object can store a list of values, (strings, booleans) that
have their own set of properties.

Q.9.How do you define an object?
A.9. (a.)Values that are a arbitrary collections
(b.) Values that have arbitrary collections of properties.

Q.10.What can you say about the mutability of Javascript objects?
A.10.With objects it is possible to change their properties. A single
object value can have different content at different times.

SECOND PART:
Q.1.Why can’t you add new properties to a string variable?
A.1. In JavaScript strings are considered immutable (cannot be changed)

Q.2.What are rest parameters?
A.2. Type of function that accepts any number of arguments

Q.3.What is serialisation and what is a use case of serialisation of data?
A.3. When data means it is converted/parsed serialized/encode format then stored for later
for later use to send to another computer over a network. The data will have been
converted from these memory addresses.

Q.4.What is JSON?
JavaScript Object Notation. It is used as a data storage and communication
format on the Web.

Q.5.What are the differences between JSON and the way programmers write objects in plain Javascript?
A.5. When compared to JavaScript, JSON format has limitations:
(a.) all property names have to be surrounded by double quotes
(b.) only simple data expressions are allowed
(c.) no function calls, bindings
(d.) no computation strings
(e.) comments are not allowed

1 Like

Part 1:

  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?
    Since Jaques wants to start a log of all his activities so he can narrow down the potential causes of his problem, the problem introduced is finding a way to store multiple sets of information.

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

  3. What are properties in Javascript?
    Properties are the values associated with an object. Properties can be changed, added, and deleted. Some properties are read only

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

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

    objectName.property

    objectName[“property”]
  1. What are methods?
    Methods are actions that can be performed on objects. They are properties containing a function definition.

  2. What are objects?
    An object is a collection of unordered properties.

  3. 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 and access multiple sets of information, so we have more flexibility to use different data (eg. properties and methods) to achieve what we want.

  4. How do you define an object?
    We define it by writing a valid binding name, an = and a set of braces

    let myObject = {
      propertyName: value
    };
  1. What can you say about the mutability of Javascript objects?
    By mutability we refer to that we can change the values of an object’s properties while maintaining its unique identity.

Part 2:

  1. Why can’t you add new properties to a string variable?
    Because values of this type, along with Boolean values, are not objects . They are immutable and can’t be changed.

  2. What are rest parameters?
    The rest parameter(…) allows a function to treat an indefinite number of arguments as an array.

  3. What is serialisation and what is a use case of serialization of data?
    Serialization is converting our code, which is stored in our computer’s memory, to a format that can be stored and sent.

  4. What is JSON?
    JSON is a serialization format, a text format for storing and transporting data. It stands for JavaScript Object Notation.

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

  • all property names have to be written with double quotes
  • only simple data expressions are allowed
  • no function calls, bindings or anything that involves computation
  • no comments are allowed
  • JSON is format is text only
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 Best option is a data structure *
  2. What variable type can be used in order to solve the problem of storing multiple values?
    An array can store multiple values
  3. What are properties in Javascript?
    Properties are values associated with an object in javascript
  4. Which values do not have properties?
    null and undefined
  5. How can we access properties in a value (two ways)?
    By dot notations and bracket notation
  6. What are methods?
    Methods are actions that can be performed on objects
  7. What are objects?
    Objects are variables and can contain many values
  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 store various collections between strings and arrays
  9. How do you define an object?
    By closed curly brackets
  10. What can you say about the mutability of Javascript objects?
    An object in javascript is mutable and can be modified after it is created

SECOND PART:

  1. Why can’t you add new properties to a string variable?
    A string in Javascript is immutable,so cannot add new properties
  2. What are rest parameters?
    Rest parameters allows functions to accept unlimited number of arguments as an array
  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 the conversion of data into a description so as to save data to a file and share over the network to another user
  5. What is JSON?
    JSON means Javascript Object notation
  6. What are the differences between JSON and the way programmers write objects in plain Javascript?
    The differences are an object in javascript code is a variable that stores data in value pairs.JSON is based on objects in a format for storing and transfering data
1 Like
  1. A problem that cannot be solved with variable types were programs that were operating only on simple data types. These variable types were atoms that data structures were built from and many types of information requires more than one atom.
  2. An array can be used to solve the problem of storing multiple values.
  3. Almost all Javascript values have properties except a couple of exceptions.
  4. The values that do not have properties are null and undefined.
  5. We can access properties in Javascript with a dot and with square brackets.
  6. Methods are properties that contain functions.
  7. Objects are values of arbitrary collections of properties.
  8. Objects can store a list of activities that integers, strings, booleans cannot.
  9. An object is defined by using braces as an expression.
  10. The mutability of Javascript objects is that they work differently and the properties can be changed.

  1. You can’t add new properties to a string variable because they aren’t objects and it doesn’t actually store those properties.
  2. The rest parameter is a function that bounds to an array containing all further arguments.
  3. Done
  4. Serialize is converting data into a flat description. A use case for serialization is for data storage and communication format on the web.
  5. JSON, also known as Javascript Object Notation, is a popular serialization format.
  6. Some differences include having all property names to be surrounded by double quotes, no function calls, bindings, and no comments are allowed.
2 Likes
  • What problems does this chapter introduce that cannot be solved with variable types such as strings or integers?
    • We need to keep track of multiple types of constantly changing, interconnected data over an extended time frame.
    • We also aren’t sure of what we’re looking for specifically
  • What variable type can be used in order to solve the problem of storing multiple values?
    • Array
  • What are properties in Javascript?
    • They are identifiers for specific data w/in objects
  • Which values do not have properties?
    • Null
    • undefined
  • How can we access properties in a value (two ways)?
    • With a dot
      • Value.property
      • The word after a dot is the literal name of the property
    • With square brackets
      • Value[x]
      • This method evaluates x to get the property name
  • What are methods?
    • Properties that contain functions
  • What are objects?
    • Values that hold 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 hold multiple data types as property values
  • How do you define an object?
    • Similar to definin variables but u put the values n properties between braces
Let object = {
property: true,
Array: [“item0”, “item1”, “item2” ],
“Not Valid binding?”: “gotta use quotation”
};
  • What can you say about the mutability of Javascript objects?
    • An Object’s properties can be changed, unlike other value types like strings, numbers, booleans which r immutable
  • Why can’t you add new properties to a string variable?
    • String values r immutable. Iss not possible w/in JS to modify em
  • What are rest parameters?
    • This allows us to write out functions that accept an infinite number of arguments thru an array
  • What is serialisation and what is a use case of serialisation of data?
    • Data is converted into a “flat” description.
    • One use case is Data storage n communication
  • What is JSON?
    • JavaScript Object Notation
    • issa popular serialization format used for data storage n communication on the web
  • 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
    • Only simple data expressions r allowed. Nothin that requires actual computation
    • Comments r not permitted in JSON

@LORDKALVIN

1 Like