Data Structures (Arrays and Objects) - Reading Assignment

Thank you, Malik… very helpful, I am a beginner in coding so any help, helps a lot… cheers.

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?
When using variables, it only allows us to store one set of information. When daily tracking activities like problems, you are better off creating a data structure to store different types of information
2. What variable type can be used in order to solve the problem of storing multiple values?
Objects and Arrays which are specialized Objects
3. What are properties in Javascript?
.length is one properties of many. All numbers, string boleans have properties as well as elements
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)?
using the brackets after the property filled with the variable we require from the property, or using the property we want at the end of the variable using the . notation
6. What are methods?
properties which has function abilities such as .length, toUpperCase
7. What are objects?
Objects are collection of properties like classes
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)?
We can able to bundle values collection of properties in a structured manner
9. How do you define an object?
By using braces as an expression. Inside the braces we have a list of properties separated using the comma. Each property has a key/name followed by a colon and separated using a comma
10. What can you say about the mutability of Javascript objects?
Objects are mutable as their properties can be altered

SECOND PART:

1. Why can’t you add new properties to a string variable?
Because a string like boolean and number variables is immutable so that its properties cannot be changed. To add new properties will require new Objects
2. What are rest parameters?
represented by three dots and placed before a function’s last parameter. The three dot notation implies that the function is bound to an array containing all further (indefinite) arguments. Can be used to condense arrays together into one
3. (Feel free to skip the sub-chapter of Math object and Destructing)
Read it anyways
4. What is serialisation and what is a use case of serialisation of data?
Means to convert data to a simpler description which can be transported over a network quicker
5. What is JSON?
JavaScript Object Notation is widely used by other languages other than JavaScript as a data storage and communication format on the WWW
6. What are the differences between JSON and the way programmers write objects in plain Javascript?
Property names are surrounded by quotations. No functions calls, binding comments or anything that requires actual computation is 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?
    It needs a variable that stores many values.

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

  3. What are properties in Javascript?
    They define what the value is in the data structure.

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

  5. How can we access properties in a value (two ways)?
    value.t // value[t] is an example

  6. What are methods?
    Values that work only on the value they are involved with in a function.

  7. What are objects?
    a collection of of the values properties. This allows you to store different value types.

  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 can store many different data types.

  9. How do you define an object?
    The same as any other variable but using a list inside of brackets to define.

  10. What can you say about the mutability of Javascript objects?
    object properties can be changed by users.
    SECOND PART:

  11. Why can’t you add new properties to a string variable?
    they are immutable.

  12. What are rest parameters?
    the use of many arguments in a function.

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

  14. What is serialisation and what is a use case of serialisation of data?
    used to convert stored data in the memory into a flat description. //

  15. What is JSON?
    object notation that is used for communication and data storage.

  16. What are the differences between JSON and the way programmers write objects in plain Javascript?
    properties are written inside quotes and only uses simple expressions.

1 Like
  1. Variables such as strings and integers are only able to store single data. We needed variables that can store multiple multiple values.

  2. Arrays can be used to store strings and integers at different index positions.

  3. Properties are values or characteristics.

  4. Null and undefined.

  5. value.x
    value[x]

  6. Methods are functions defined inside object eg. indexOf

  7. Objects are values of groups of data.

  8. Objects can be equated which are equal in identity or reference rather than just the values.

  9. let Object {
    apple: false,
    fruits: [‘mango’, ‘banana’, ‘orange’]
    };

  10. Objects are mutable and can be changed.

Part 2

  1. Due to immutability

  2. When function is called, rest parameter is bound to array containing all further arguments. They are denoted by 3 dots before function name.

  3. To sterilise is to flatten description of data.

  4. JavaScript Object notation is standard for sterilisation of objects.

  5. All property names are surrounded by quotes and only simple data expressions are allowed i.e. no function calls, bindings are allowed in JASON.

1 Like

Data Structures (Arrays and Objects) - Reading Assignment Read the subchapter called The weresquirrel.

What problems does this chapter present that cannot be solved with variable types such as strings or integers? It requires storing multiple data, therefore it is recommended to use a data structure that allows organizing the information and incorporating different values.

What type of variable can be used to solve the problem of storing multiple values? We recommend using arrays, these are basically special types of objects.

What are properties in Javascript? JavaScript is designed on a simple object-based paradigm. An object is a collection of properties, and a property is an association between a name (or key) and a value. A value of a property can be a function, in which case the property is known as a method. In addition to the objects that are predefined in the browser, you can define your own objects.

What values ​​do not have properties? Values ​​that have no properties are Undefined or Null.

How can we access properties in a value (two ways)? By typing “”, you can access the properties followed by the name of a value, or they can also be accessed or set using the bracket notation [].

What are the methods? It is a little difficult to explain what a method in javascript is without a practical example.
The definition may be too technical. So let’s go to something that may be familiar to us. .alert () is a method of the window object, .log () is a method of the console object and .write () is a method of the .document object. We have actually been using them the whole time without knowing that they were methods. The methods are used to perform actions such as a pop-up window, modify the properties of an object, add elements to a list, remove them, transform a string into an integer or decimal number.

What are objects? is a property container, where a property has a name and a value. The name of a property can be a character string, even an empty one. The property value can be any value that we can use in JavaScript, except undefined.

What problem do objects that cannot be solved with other types of values ​​we have learned so far solve (such as integer, string, array, boolean, etc.)? Objects can contain different types of data in a structured way, they allow you to assign and define multiple properties.

How is an object defined? An object is a collection of related data and / or functionality (usually consisting of several variables and functions, which are called properties and methods when inside objects). As with many things in JavaScript, creating an object often begins with defining and initializing a variable. We can enter the following under the JavaScript code that is already in the file, then it is saved and updated: var person = {}; If person enters their text input and presses the button, they should get the following result: [Object object]
What can you say about the mutability of Javascript objects? They allow to change their properties, the objects are mutable, that is to say they allow to make changes.

PART TWO: Why can’t you add new properties to a string variable? Because string variables are not mutable, they do not allow changes in their properties. What are the rest parameters? The three points are called the syntax of the rest parameter. A rest parameter allows us to represent an indefinite number of arguments as an array.
What is serialization and what is a data serialization use case? It consists of a process of encoding an object in a storage medium, in order to transmit it through a network connection as a series of bytes or in a more humanly readable format such as XML or JSON, among others. Serialization is a widely used mechanism for transporting objects across a network, for persisting an object in a file or database, or for distributing identical objects to various applications or locations.

What is JSON? JavaScript Object Notation (JSON) is a standard text-based format for representing structured data in JavaScript object syntax. It is commonly used to transmit data in web applications.

What are the differences between JSON and the way programmers write objects in simple Javascript? In JSON, property values ​​are enclosed in double quotation marks. There are also no functions, links or comments, it is very similar to simple JavaScript.

1 Like
  1. Strings and integers can only hold simple and discrete individual pieces of data, hence are not sufficient in themselves to describe complex data

  2. An array can store multiple values

  3. A property is an expression which accesses a property of some value i.e. the length of a string

  4. null and undefined do not have properties

  5. We can access properties in a value using dot or square brackets i.e
    value.x - the x property is the literal name of the property
    value[x] - tries to evaluate the expression x and and uses the result converted to string as the property name

  6. When a value has a property and that property is a function, then the property is called a method i.e. string.toUpperCase()

  7. Objects are arbitrary collections of properties

  8. Objects allow meaningful data to be constructed from individual pieces of data held as strings, bools etc.

  9. An object is defined by creating a list of properties inside braces i.e. var obj = { name:“str”, id:1 }

  10. Javascript objects are mutable so the properties of an object can be changed

  11. A string variable is not an object hence we can’t add new properties

  12. A rest parameter is a single parameter in a function which can accept any number of arguments

  13. An object is serialised when all of its values are written to text

  14. Javascript Object Notation is a text file format which is used for serializing objects

  15. JSON represents the state of an object at a given time and cannot perform any functions

1 Like

part 1
1. Storing values in a row cannot be solved by data types as strings or integers.

2. Arrays are one type of variable of storing multiple values

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

4. The exceptions are null and undefined. If you try to access a property on one of these nonvalues, you get an error.

5. The two main ways to access properties in JavaScript are with a dot and with square brackets. Both value.x and value[x] access a property on value but not necessarily the same property. The difference is in how x is interpreted. 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. Whereas value.x fetches 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. A method in object-oriented programming OOP is a procedure associated with a message and an object. … This allows the sending objects to invoke behaviors and to delegate the implementation of those behaviors to the receiving object. A method in Java programming sets the behavior of a class object.

7. A javaScript object is an entity having state and behavior ( properties and method). For example: car, pen, bike, chair, glass, keyboard, monitor etc. JavaScript is an object-based language. Everything is an object in JavaScript.

8. Objects are special as they can hold many different datatypes as we need.

9. 1. Using the Object () constructor: var d = new Object (); …
2. Using Object . create() method: …
3. Using the bracket’s syntactig sugar: var b = {}; …
4. Using a function constructor. var Obj = function(name) { this. …
5. Using the function constructor + prototype: function myObj(){}; myObj. …
6. Using ES6 class syntax: …
7. Singleton pattern:

10. it allows much greater flexibility.

SECOND PART

1. string is not an object but a primitive type, so they are immutable.

2. 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. okay :ok_hand:

4. serialization US spelling or serialisation UK spelling is the process of translating a data structure or object state into a format that can be stored.

5. JSON stands for javaScriptObjectNotation

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.

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

ENDED

1 Like
  1. The problems that cannot be solved by strings or integers are data storage and organization.
  2. An array can be used to solve the problem of storing multiple values.
  3. Properties in JavaScript are values associated with an object binding.
  4. There are only two values without properties. null and undefined.
  5. There a two ways to access properties in a value. Through a direct call using dot notation (string) or an index call to the binding using square brackets (array).
  6. Methods are generally properties that contain functions.
  7. Objects are a collection of properties.
  8. Objects help solve the problem of storing values in different binding pairs, arrays, and properties.
  9. I would say that an object is like a backpack with different compartments and contents in those compartments. All being accessible through calling of the backpack name.
  10. JavaScript objects themselves are mutable. The values themselves are immutable. So you can change the contents of the object but things like the strings, boolean, and integers are immutable . Meaning that a comparison of the two will point to uniquely independent bits of information where even if the values are technically the same the results will differ on comparisons.

Second Part

  1. As a string variable is not an object the value is immutable. Therefore you cannot add new properties to it.
  2. Rest parameters are a way to allow more input to functions parameters without limiting input. They convert the rest of input into an array when prefaced with a 3 dot notation ... before the parameter name.
  3. Serialization is taking data and turning it a flat description for storage.
  4. JSON stands for JavaScript Object Notation.
  5. The difference between JSON and the way programmers write objects in plain JS is that you cannot call any computation nor add in any comments.
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?

    We have yet to handle large sets of data. Arrays and the Data Structures that bring a perspective and corresponding tools on how to perceive and relate to data.

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

    Arrays are used for data sets (Arrays), where the dot operator allows connection to Objects and the Arrays of values within them (Data Structures).

  3. What are properties in Javascript?

    All values have properties built into the nature of the structure of the language.

  4. Which values do not have properties?

    Only the nonvalues of “null” and “undefined” are without properties.

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

One example is the dot operator (myString.length). This returns the length of the string named myString.

The second way would be to use the property within square brackets (myString[“length”]).

let sequence = [1,2,3,4,5];
console.log(sequence.length);
console.log(sequence[“length”]+1);
//Output–> 5
//Output–> 6

  1. What are methods?

A method is a kind of a property like the length example above, however the property holds a function itself. Due to the nature of the structure of the language, every string has “toUpperCase” property which returns a copy of the string as ALL CAPITALIZED.

The example from the book:

let doh = “Doh”;
console.log(typeof doh.toUpperCase);
// → function
console.log(doh.toUpperCase());
// → DOH

  1. What are objects?

Objects are groupings of data. They are defined within curly braces {} by sets of values given in the format of (name : “Ivan”, rating : 100,…). The language also has built-in functions for these objects. Object.keys(); for example, gives the property names that are associated with the object passed into it.

let anObject = {Name: “Ivan”, Rating:100};
console.log(anObject);
console.log(Object.keys(anObject));
//–> {Name: “Ivan”, Rating: 100}

//–> [“Name”, “Rating”]

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

    The previous types (such as integer, string, array, boolean etc) are immutable values but are not objects and therefore structually will not have the same properties. This introduces the ability to equate two objects which is to equate their identity, not simply their value. This ability to uniquely identify objects allows for the values to be mutable or changeable, as the information is referenced through the object itself not directly to the values.

  2. How do you define an object?

    See the previous question “What are objects?”.

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

    This seems to allow for much greater flexibility.

Section 2 Questions

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

    The data type of string is not an object and does not allow for additional properties beyond that which is language based.

  2. What are rest parameters?

    Rest parameters accept any number of arguments. The notation includes the elipsis (…) to represent an array of all arguments to be included.

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

    Read the Chapter

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

    Serialization converts data into a flat description of itself. This allows us to use JSON notation to convert data between data types, from string to the value it holds and vice versa.

  5. What is JSON?

    JavaScript Object Notation is a notation for data storage and communication.

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

    JSON requires double " " quotes for all property names not single quotes ’ '.

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?
While strings and integers can only store one value. Jacques can use an array to store multiple values helping him to identify the triggers of becoming a weresquirrel more accurately.

2. What variable type can be used in order to solve the problem of storing multiple values?
Jacques can use an array which can written in 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.

5. How can we access properties in a value (two ways)?
With a Dot and also square brackets.

6. What are methods?
Properties that contain functions of the values they belong to.

7. What are objects?
Variables that can be an object in a array excluding primitive values which are hardcoded.

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 allows for multiple variables in an array. As well as recall, push and pop values.

9. How do you define an object?
Almost anything can be made into an object if it is not already coded as a function and also excluding primitive values which are hardcoded.

10. What can you say about the mutability of JavaScript objects?
Mutability in JavaScript objects is the ability to change values of a variable.

SECOND PART:

1. Why can’t you add new properties to a string variable?
A string is immutable so new properties can not be added.

2. What are rest parameters?
Written as 3 dots ( … example){} before the function’s last parameter. It is useful as it is accepted by any number of arguments and can be used to add other properties of other arrays into one another.

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

4. What is serialisation and what is a use case of serialisation of data?
Serialization is converting your data into a ‘flat description’ This is more efficient and effective for sending large amounts of data compactly.

5. What is JSON?
JSON stands for JavaScript Object Notation and is a popular way to serialize data.

6. What are the differences between JSON and the way programmers write objects in plain Javascript?
JSON is different as 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 also not allowed.

1 Like

Part One

  1. The sub-chapter called “The weresquirrel” reads that Jacques was concerned about the conditions that would cause him to transform into a squirrel and the fact that he had multiple activities in just one day. In terms of programming, the problem is that strings and integers can hold only one value and no more.

  2. The array can be used in order to solve the problem of storing multiple values.

  3. Properties in Javascript belong to almost all Javascript values.

  4. The values null and undefined do not have properties.

  5. We can access properties in a value by using either (1) a dot or (2) square brackets.

  6. Methods are properties that contain functions…

  7. Objects are arbitrary collections of properties.

  8. Objects solve the problem of immutability, a characteristic that applies to integers, strings, arrays, and Boolean expressions, for example. The term means that the values cannot be changed. (more on this in #10)

  9. You define an object in the following way, for example: let object1 = {value: 10};

  10. The mutability of Javascript objects shows that the objects’ values can be added, removed, or changed. Also, multiple values can be entered.

Part Two

  1. You can’t add new properties to a string variable because new properties don’t stick.

  2. Rest parameters are those bound to arrays when a max function, for instance, is called.

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

  4. Serialisation is the process of converting data into a flat description. JSON is a use case of serialisation of data.

  5. JSON stands for JavaScript Object Notation.

  6. These are the differences seen in JSON that are not seen in plain Javascript:
    (1) All property names have to be surrounded by double quotes.
    (2) Only simple data expressions are allowed.
    (3) Comments are not allowed.

There were a few things I did not fully understand; however, I will be able to see them in action when I watch the next video after this reading assignment.

Thank you!

1 Like

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?
-The data is not numbers or string, it is more complicated and requires a more flexible data type.
What variable type can be used in order to solve the problem of storing multiple values?
-The sequence of values can be storred in an array.
What are properties in Javascript?
-Every value has some properties, expressions like myString.length (to get
the length of a string)
Which values do not have properties?
-The only two values that have no properties are: null and undefinned.
How can we access properties in a value (two ways)?
-In JavaScript properties can be accessed with a dot and with
square brackets.
What are methods?
-Properties that contain functions are generally called methods of the value
they belong to.
What are objects?
-Values of the type 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)?
-One object can group together many vlues, of different type, together.
How do you define an object?
-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. Each
property has a name followed by a colon and a value.
What can you say about the mutability of Javascript objects?
-Two objects at some point in time may have the same values, but have different life, they can get different values at different times. If they are identical, they will always hve the same value.

Part 2:

Why can’t you add new properties to a string variable?
-The string variable is predefined, with all properties.
What are rest parameters?
-When a function abc(…numbers) function is called, the rest parameter is bound to an array
containing all further arguments.
(Feel free to skip the sub-chapter of Math object and Destructing)
What is serialisation and what is a use case of serialisation of data?
-The data structure is converted into a flat description, for the purpose of sending it.
What is JSON?
-A popular serialization format is called JSON (pronounced
“Jason”), 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.
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.

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?
    He needs to store multiple data types and values in a single data structure.
  • What variable type can be used in order to solve the problem of storing multiple values?
    An array can store multiple values of the same datatype.
  • What are properties in Javascript?
    Properties are values associated with a JS object.
  • Which values do not have properties?
    Null and undefined do not have properties.
  • How can we access properties in a value (two ways)?
    Use object.value, or object[value] notation.
  • What are methods?
    Methods are properties that hold function definitions, and can act on an object, such as string.toUpperCase()
  • What are objects?
    Objects are arbitrary collections of properties (of different datatypes) like, Person could have properties such as name (String), age (Integer), is a student (Boolean) etc.
  • 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)?
    We can group multiple data types into a single data structure and can modify the values contained in the object or add new values etc.
  • How do you define an object?
    Use curly braces, e.g. let person = {name: “Bill”, Age: 25, …}
  • What can you say about the mutability of Javascript objects?
    JS Objects are mutable.
  1. Why can’t you add new properties to a string variable?
    Strings are immutable.
  2. What are rest parameters?
    Rest parameters allow functions to accept any number of arguments. We use max(…numbers) notation to bind the rest parameter to all following arguments.
  3. What is serialisation and what is a use case of serialisation of data? Converting a data structure into a format that is easily transferred over the internet.
  4. What is JSON? It is a serialization format that allows for the efficient transfer of data structures like JS objects.
  5. What are the differences between JSON and the way programmers write objects in plain Javascript? All property names must be in " ", and there cannot be functions, bindings computation or comments in JSON files.
1 Like
  1. Problem resides in storing multiple values in a same data type. A solution is using a data structure.
  2. Array and Objects.
  3. In JavaScript properties are expression that access to some feature of data value (e.g. array[i].length).
  4. “Null” and “undefined” don’t have properties, and throw an error if it is used.
  5. x.property or x[property]
  6. Method is a property of type function.
  7. Objects are arbitrary collection of properties.
  8. Objects can store multiple datatypes.
  9. var car = { model: “Ford”, color: “Blue”, year: “2010”}
  10. Mutability represent objects that can change content at different times; e.g. arrays. Numbers, strings and booleans are immutable.

  1. A string is immutable, because are not classified as objects so they can’t take on properties.
  2. Rest parameters represents any number of arguments as an array, using “…” as notation.
  3. skip
  4. Serialize is a process that converted data into a flat description.
  5. Javascript Object Notation.
  6. In JSON all properties names must be surrounded by double quotes, and only simple data expressions are allowed ( no function calls, bindings or computation).
1 Like

PART I

  1. The problem this chapter introduces that cannot be solved is variable’s inability to store multiple values. Variable types such as strings and integers are only able to hold a single type of data. What Jacques needs is a data structure that is capable of storing multiple values and datatypes in order to keep all of the information organized as well as keep track of data to determine which factors cause transformations to occur.

  2. The variable types that can be used in order to solve the problem of storing multiple values are Arrays and Objects.

  3. Properties in JS are expressions that access a property of some value. Most JS 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. You can have values in which you can use a lot of properties already built in in JS or you can even add some properties to your values.

  4. Nonvalues do not have properties, namely ‘Null’ and ‘Undefined’.

  5. The two main ways to access properties (in a value) in JS are: (a) with a dot (value.x) where the word after the dot is the literal name of the property; and (b) with square brackets (value[x]) where the expression between the brackets is evaluated to get the property name.

  6. Methods are properties that hold function values. These are special kinds of functions that only work on the value they belong to, e.g. .push method adds value to the end of an array.

  7. Objects are data structures capable of containing an arbitrary collection of properties and storing different value types. These are created using braces as an expression to contain a list key/value pairs separated by a comma.

  8. The problem that objects solve, which cannot be solved with other value types (integer, string, array, Boolean, etc.) is that they are able 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 JS objects means that the values they contained can be changed. This is different from other datatypes (strings, numbers, Booleans), which are immutable and will always keep the same value it was defined with.

PART II

  1. You can’t add new properties to a string variable because they are immutable.

  2. Rest parameters are denoted by a function’s last parameter with the ellipsis (…) 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. Serialisation is converting data stored in memory into a flat description of what that data is. A use case of serialisation of data is saving the data in a file for later or sending it to another computer over the network.

  4. JavaScript Object Notation (JSON) is a serialization format standardly used for data storage and communication format on the web, as well as other languages.

  5. The difference between JSON and how programmers write objects in plain JS: (a) All property names have to be surrounded by double quotes; and (b) JSON only allows simple values expression, thus, no comments, function calls, bindings, or anything that involves actual computation.

1 Like
  1. A data structure that can store multiple values is needed. Strings and integers are only capable of holding a single type of data.

  2. Arrays

  3. Properties define the characteristics of values.

  4. null and undefined do not have properties.

  5. We can access properties in two main ways, with a dot or with square brackets. When using a dot the word after the dot is the literal name of the property. When using the square brackets, the expression between the brackets is evaluated to get the property name.

  6. Methods are properties that contain functions for a value.

  7. Objects are a type of value that hold a arbitrary collection of properties.

  8. Objects can group together varying types of data into a single value.

  9. Objects are defined using 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. Javascript objects are mutable in that you can change their properties, causing a single object value to have different content at different times.

Second part:

  1. You can’t add new properties to a string variable because they are immutable and cannot be changed.

  2. When we want to call a function that accepts a number of arguments we can use a rest parameter which is bound to an array containing all further arguments.

  3. Serialisation of data is to convert tangles of memory addresses to a flat description. This is useful if you want to save data in a file for later or send it to another computer over the network.

  4. JSON stands for Javascript Object Notation and is a popular format of serialization. It is widely used as data storage and communication format on the web.

  5. JSON looks similar to Javascripts 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. Comments, function calls, bindings or anything that involves actual computation are not allowed in JSON.

1 Like

Part A…

  1. Has to write to many variables…

  2. An Array.

  3. Values.

  4. Undefined & Null

  5. Dot & Square brackets.

  6. Properties that contain functions.

  7. Objects are arbitrary collections of properties.

  8. Grouping unordered data together.

  9. By using braces.

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

Part B…

  1. They are immutable.

  2. Parameters are bound to an array, which contains all further arguments.

  3. Serialisation is data management notation, used in digital communications.

  4. JavaScript Object Notation.

  5. Simple data expressions, text surrounded by double quotes…

2 Likes
  1. The use of data to solve problems

  2. Array

  3. Expressions that access a property of some value

  4. null and undefined do not have properties.

  5. Users can access properties with a dot and with square brackets.

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

  7. Values of the type object are arbitrary collections of properties.

  8. Users can manipulate data on a single object.

  9. let objectName = [ {events: [“work”, “touched tree”], squirrel: false}, ];

  10. Object values can be changed.

  11. Value types string, number and Boolean are not objects as those values are immutable and cannot be changed.

  12. When a function is called, the rest parameter is bound to an array containing all further arguments.

  13. Skip

  14. Data that is converted into a flat description instead of sending the entire computer memory.

  15. JSON stands for JavaScript Object Notation and is widely used as a data storage and communication format on the Web, even in languages other than JavaScript.

  16. JSON structures are for data only and not actual computing while object in JavaScript can compute.

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?

Need to be able to store multiple data types. Strings and integers can only store single data types

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

Array

  1. What are properties in Javascript?

A property is a characteristic of an object, often describing attributes associated with a data structure.

  1. Which values do not have properties?

Null and undefined

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

objectName.property

objectName[“property”]

  1. What are methods?

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

  1. What are objects?

Objects are a collection of properties

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

Allows for flexibility of having multiple properties within the object.

  1. How do you define an object?

Objects are containers for named values called properties and methods

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

Numbers, strings, Booleans are immutable whereas objects are mutable. You can change an object’s properties which causes the value to have different content at different times.

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

Strings are immutable therefore cannot be changed or edited

  1. What are rest parameters?

Allows us to represent an indefinite number of arguments as an array

  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?

Serialisation is the converting of data into a flat description. It can be used as a data storage and communication format on the web.

  1. What is JSON?

Json is a popular serialisation format. It stands for Javascript Object Notation.

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

With Json, all property names have to be surrounds by double quotes, and only simple data expressions are allowed ie. No function calls, bindings or anything involving actual computations

2 Likes
  1. The chapter introduces a problem of storing sequences of values which are poorly handled by strings and integers but is used by another data type - an array.

  2. An array is used for storing multiple values.

  3. In JavaScript properties are the values associated with a JavaScript object.

  4. Null and undefined do not have properties.

  5. A value properties can be accessed with a dot or square brackets.

  6. Methods are function stored as properties.

  7. JavaScript objects are containers for named values called properties or methods.

  8. Objects provide ways to group several values into a single value.

  9. An object is defined as a variable with many values contained inside curly braces.

  10. If an object is mutable, modifying the copy also modifies the original.

SECOND PART:

  1. You can’t add properties to a string variable because it is immutable.

  2. Rest parameters allow to represent an indefinite number of arguments as an array.

  3. Serialization is the process of converting an object’s state to a string from which it can later be restored. A use case of serialization of data is saving data in a file for later or sending it to another computer over the network.

  4. JSON stands for JavaScript Object Notation used data serialization.

  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