Data Structures (Arrays and Objects) - Reading Assignment

  1. Read the sub-chapter called The weresquirrel. What problems does this chapter introduce that cannot be solved with variable types such as strings or integers?
    They can’t store multiple values (data) for one variable (day).

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

  3. What are properties in Javascript?
    Properties can access information about a value.

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

  5. How can we access properties in a value (two ways)?
    Both value.x and value[x] access a property on value—but not necessarily the same property.
    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. 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”.
    Ex.
    let day1 = { squirrel: false, events: ["work", "touched tree", "pizza", "running"] };

  7. What are objects?
    Values of the type object are arbitrary collections of properties. One way to create an object is 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 store multiple different data types.

  9. How do you define an object?

let Object = { Name1: value1,   Name2: value2,   ....   }
  1. What can you say about the mutability of Javascript objects?
    We saw that object values can be modified. The types of values discussed in earlier chapters, such as numbers, strings, and Booleans, are all immutable.

SECOND PART:

  1. Why can’t you add new properties to a string variable?
    Values of type string, number, and Boolean are not objects, such values are immutable and cannot be changed.

  2. What are rest parameters?
    The rest parameter is bound to an array containing all arguments, If there are other parameters to either side of it, the rest parameter will take only the arguments in between.

  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 converts Data into flat description. It allows you to save data in a file for later or send it to another computer over the network

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

  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.

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?

In the weresquirrel situation we need to be able to create logs of data with
combinations of different data pairs. A different data structure than we have been
working with up until now.

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

The variable type that would be most suitable is objects. With objects we can
group values and build more complex data structures.

  1. What are properties in Javascript?

Properties are what the elements inside objects and arrays are called.

  1. Which values do not have properties?

Most all values in Js have properties. The exceptions are null and undefined.

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

properties in a value can be accessed two ways. Properties in arrays are stored
using numbers as names. In these case we must use [].
value.“x” or value[“x”]

  1. What are methods?

Methods are properties that hold functions.
.pop, .toUpperCase, .push, .unshift, .shift

  1. What are objects?

Objects are lists like arrays with keys an values but instead of numbers the
properties have labels. These are an arbitrary collection of values that can
be a combination of integers, string or bolean statements.

  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 problem that objects solve are those that cannot be solved by integer, strings, arrays
or boolean in the storing of data. The data structure of objects allows you to store,
organize and recall all these data types and values.

  1. How do you define an object?

I define an object as a sort of box that can store different elements and properties. Objects
can even hold boxes within boxes.
let object={
key: value,
key[element1, element2, element3]
}

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

Objects are viewed as immutable because the object itself can NOT be changed.
The contents may be altered but the object itself remains the same.

SECOND PART:

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

The string properties are immutable. They remain unchanged. They can have new
properties added to them but the strings property itself remains unchanged. I viewed
it as layers. The very base is the immutable property of the string. Other properties
can be placed on top of it but the very base property remains unchanged.

  1. What are rest parameters?

Rest parameter (…number) allows for an unlimited amount of arguments to be
introduced to the parameter of the function.

  1. (Feel free to skip the sub-chapter of Math object and Destructing)
    Skipped math and deconstructing.

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

Serialization is the process of translating data into a format that can transmitted
through a network, internet, and reconstructed. when it is reconstructed it should
be the same as the original. Like a stargate for data.

  1. What is JSON?

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

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

JSON and Javascript are very similar. Basically all property names must be surrounded
by double quotes. Only simple data types and no function calls, bindings or anything
that calls for computation.

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?
    It introduces the problem of collecting and storing multiple values and large amount of data

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

  3. What are properties in Javascript?
    properties define data… it provides characteristics for the data collected

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

  5. How can we access properties in a value (two ways)?
    by using square brackets or . (dot), like char.length

  6. What are methods?
    they hold functions and they can provide structure to perhaps provide specific way to capitalize words or add data to array

  7. What are objects?
    groups of datasets

  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 group the data and provide value to the entire set…

  9. How do you define an object?
    by giving it a name and providing specifics within the curly braces…

  10. What can you say about the mutability of Javascript objects?
    it allows us to change the values within an object

SECOND PART:

  1. Why can’t you add new properties to a string variable?
    because it’s an immutable data and thus cannot be changed. only objects can

  2. What are rest parameters?
    ability to represent specific parameters and any number of arguments to 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?
    conversion of data into flat description… helps with storing and sending data

  5. What is JSON?
    It’s JavaScript Object Notation used for data storage and communication and it’s a popular way to serialize data

  6. What are the differences between JSON and the way programmers write objects in plain Javascript?
    all data has to be in double quotation and there cannot be any functions or bindings

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 needs to store more data in a single variable. so he can have a larger scope of information in it and that he can have a bigger variety of results and sets for classifications to easily narrow the answer. this wouldn’t be possible using only strings or integers once it can hold only one value.

  2. What variable type can be used in order to solve the problem of storing multiple values?
    In JS. you can store sequences of values written as a list of values between square brackets, separated by commas, this variable is called an array.

  3. What are properties in Javascript?
    Properties are values associated with an object in an array.

  4. Which values do not have properties?
    Null and undefined does not have properties and generates the TypeError message.

  5. How can we access properties in a value (two ways)? With value dot to access the literal property name ie. value.name, and value square brackets to access the valid binding value of the name, value[name].

  6. What are methods?
    Methods are properties that hold function values such as .toUpperCase, toLowerCase, .push, .pop.

  7. What are objects?
    An object is a value type that collects properties arbitrarily, you can create an object using braces as an expression and commas to separate the items. An object can contain more than one value.

  8. What problem do objects solve that cannot be solved with other value types we’ve learned so far (such as integer, string, array, boolean etc)?
    Problems that need to hold more than one variable in an entry, being capable also of changes as input feeds different quantities and datatypes, differently of integer, string, array, and boolean that are immutable.

  9. How do you define an object?
    Using equal sign to point values, brackets that contain the values, and commas between the values.

  10. What can you say about the mutability of Javascript objects?
    With Objects, you can feed the variables with different datatypes and quantities of data, accordingly to the input. on the other hand Integers, Strings and Booleans are Immutables.

SECOND PART:

  1. Why can’t you add new properties to a string variable?
    Properties on a string are immutable, they do not store other properties, it would change the value and ultimately the meaning. Just objects can hold new properties.

  2. What are rest parameters?
    It allows an indefinite number of parameters bounded to an array containing a number of arguments.

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

  4. What is serialisation and what is a use case of serialisation of data?
    Serialization is when you convert the data into a flat description, that serves for the browser to access the information address.
    JSON is a popular serialization widely used as data storage and communication format.

  5. What is JSON?
    It is a widely used serialization, stands for JavaScript Object Notation. It is used to store data and communicate through the network.

  6. What are the differences between JSON and the way programmers write objects in plain Javascript?
    In JSON.
    All property names must be surrounded by double quotes, No functions calls, no bindings, no computation involved, no comments, only simple data expressions allowed.

1 Like

PART ONE:

To be able to deduct exactly what is causing Jacques to turn into a Weresquirrel, we need to be able to build a data structure that is capable of storing many values (arrays), unlike strings and integers.

The best way to do this would be using Arrays [1,2,3,4,5]

Properties are expressions that provide information about values.

null and undefined values.

Either with a dot(ex: value.x) or a square bracket (ex: value[x])

Methods are Properties that contain function values

Objects are collections of properties, contained in braces.

Unlike integers, stings, arrays etc, Objects can contain as many different types of values as needed.

A list of properties separated by commas, enclosed in braces.

let goToRekt = 
[first: "one" , second: "way" , 
noun: "ticket" , location: "to rekt city"]

They are capable of being changed any time and any amount of times. Unlike numbers, strings or Booleans, which are all immutable.

1 Like

SECOND PART:

Since a string is not an object, it is immutable, or not able to be changed.

a Rest Parameter is created using before the functions last parameter. It is used in cases where a function needs to have any amount of arguments.

:100:

serialisation is the act of creating a flat description of data, typically in JSON format. It is used to be able to simply share data across the web or store it.

JSON is JavaScript Object Notation, it is the most common data storage and communication format, that is used across multiple languages.

In JSON all property names have to be inside of double quotations, and only simple data expressions are allowed. No functions, bindings or anything involving computation nor comments are allowed.

1 Like

Hi Sir,
Splendid answers from your side.
However, there are some points that I would like to clear out.

In the below statement –

The way to access properties would be like -

value.x
OR
value["x"]

The extra quotes you added for the dot notation would throw a syntax error.

Also in the below statement –

The object cannot have two keys of the same name. Also, every key needs to have a colon to designate it’s value. The correct code would be –

let object = {
  key  : value,
  key1 : [element1, element2, element3]
}

Please feel free to reach out for any further questions.
Happy Learning. :slight_smile:

2 Likes

Hi sir,
Excellent answer from your side.

Would like to point out one discrepancy –

In the statement below,

Properties are basically key values inside an object. Object in an array has a totally different meaning to it. Below code would be considered as objects in an array.

let myObject1 = {
   name : "Alex", 
   age  : 20
} ;

let myObject2 = {
   name : "Shaun",
   age  : 40
};
let myArray = [ myObject1 , myObject2 ] ;

Also , another discrepancy in the below statement.

You cannot access the property by value[name], it needs to be decorated by double quotes value["name"]. By not giving double quotes, Javascript would interpret the name as a variable. Since name itself is not defined, the code will throw an error.

Please let me know if you have further questions.

Happy learning :slight_smile:

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? When working with a collection of data that includes multiple variables and data types, it requires a more elegant solution for representing that information in our machine’s memory than what strings and numbers can afford.

2. What variable type can be used in order to solve the problem of storing multiple values? An array is an example of a variable type that can store multiple values.

3. What are properties in Javascript? Properties are values inside an object.

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

5. How can we access properties in a value (two ways)? The dot notation is used if the word after the dot is the literal name of the property that you want to access. The square brackets notation is used if you want an expression to be evaluated first before deriving its property name that you want to access.

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

7. What are objects? Values of 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)? When you want to group data together and the data itself is unordered and of varying data types then an object is preferred.

9. How do you define an object? One way to define an object is by using braces as an expression.

10. What can you say about the mutability of Javascript objects? JavaScript objects are mutable in that their values can be modified. For instance you can change their properties, causing a single object value to have different content at different times.

PART 2

1. Why can’t you add new properties to a string variable? A string is not an object so it doesn’t have the ability to store new properties.

2. What are rest parameters? Rest parameters allows us to represent any number of arguments as an array.

4. What is serialisation and what is a use case of serialisation of data? Serialisation is the conversion of data into a flat description, which is useful for saving and sending data.

5. What is JSON? JSON stands for JavaScript Object Notation and is a popular serialisation format used for data storage and communication on the web.

6. What are the differences between JSON and the way programmers write objects in plain Javascript? JSON requires all property names to be surrounded by double quotes and only simple data expressions are allowed meaning no comments, function calls, binds or anything that involves actual computation are allowed.

1 Like
  1. In chapter 4 a problem is introduced where multiple values of differing types need to be stored in the same variable.

  2. A string can be used to store multiple values in the same variable.

  3. A property is a name associated with a particular value. The name describes a characteristic of the value

  4. Null and undefined values do not have properties.

  5. Properties can be accessed in 2 ways. Value.fruit where the property fruit will be obtained and value[i] where the property stored in i will be accessed.

  6. Methods of a value are the properties that contain a function.In value.findCitrus() findCitrus is referred to as the method.

  7. Values of type object have different types of properties grouped together e.g.

value= {

Citrus: True

fruit : [orange, lemon, tangerine, satsuma]

};

  1. Objects are a useful way of organizing related data regardless of its type e.g. an object called applicant could contain name, address, telephone number and gender.

  2. As shown above in 7, an object can be declared by assigning the datatypes and data inside braces.

  3. The mutability of an object refers to the ability for the object to hold different values at different times. It is different from a constant which can only have one unchangeable value.

Strings and their Properties

  1. String, number and boolean values are not objects and so new properties cannot be assigned to them.
  2. A rest parameter allows a function to be given an indefinite number of arguments in the form of an array.
  3. skipped as instructed
  4. Serialization enables data that is stored in different parts of memory to be brought together into a one long sequence. This facilitates more efficient transmission and storage of data. The whole memory does not need to be transmitted, only the parts that are used by the program.
  5. JSON, or JavaScript Object Notation, is a serialization format that is popular with web applications.
  6. Json notation differs from javascript in that property names can only be given between quotes. No variables or function calls are allowed and nore are comments.
1 Like
  1. The problem is that there is a large number of data such as events, values and outcomes, which have to be analysed. String and integers will be too tedious to be used to solve this problem.

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

  3. Properties are the hidden characteristics of values.

  4. Non-values such as null and undefined do not have properties as they are exceptionally used to define no properties and errors.

  5. Either by inputting a dot followed by the name of property (e.g. value.length) or by using square brackets and quotation marks, with the name of property inside (e.g. value[“length”]).

  6. Methods are properties which contain functions. for example (.push) is used to add values to the end of an array.

  7. Objects are variables which contain values with properties or methods.

8.Objects can store many values and their properties/methods.This solves the problem of managing large data sets and categories data for easy analysis.

  1. An object is a container for named variables called properties or methods.

  2. Javascript objects are easily mutable due to the ability to change their properties such as bindings between objects and values.

SECOND PART:

  1. String variables have fixed values once they are defined.

  2. Rest parameters are parameters which can accept any number of arguments.

  3. Math objects are a number of number-related utility functions such as Math.max and Math.sqrt. Destructing is a method used to simplify expressions so as to enable easier understand of the code.

  4. Serialisation is the process of converting code contents from the computer’s memory into a flat description so as to save the data on a file.

5.JSON stands for javascript object notation, which is a serialisation format. It is widely used to store data and communicate over the internet, even in other programming languages.

  1. Some of the differences include double quotation marks for all property names, no function calls, bindings or anything involving actual computation. Comments are also not allowed.
1 Like

Thanks for the brilliant answer sir.

Need to point out one confusion though. In the below statement, we need to decorate our property name in double quotes to access the property. – value["i"]

Please find this answer for more detail.

Please feel free to reach out if any further questions.

Happy Learning :slight_smile:

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 need a system to collect data, in order to build data structures that will help us make irregular occurances more predictable.

  2. What variable type can be used in order to solve the problem of storing multiple values?
    Multiple values can be entered in a list (ex: listOfNumbers[ ]), with an index starting with 0. These values can be called upon later by using listOfNumbers[x].

  3. What are properties in Javascript?
    Properties are the characteristic of a value, or the description (ex: length, max, min…). We can determine these characteristics of a value or a list by using the expression like value.max, value[x]…

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

  5. How can we access properties in a value (two ways)?
    value.max, value[*]…

  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”. These process the string and provide a result which is a certain property of the initial value. This is because the script passes the value through a function before providing us the property we’re asking for.

  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)?
    We group values together into a single value and then put those grouped values into an array of
    log entries.

  9. How do you define an object?
    We use braces to list the values like in this instance:
    let descriptions = {
    work: “Went to work”,
    “touched tree”: “Touched a tree”
    };

  10. What can you say about the mutability of Javascript objects?
    Objects are mutable, which gives us flexibility to update them as required by changing the values contained in the object.

  11. 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. As mentioned earlier, such values are
    immutable and cannot be changed.

  12. What are rest parameters?
    The rest parameter uses three dots (…) followed by the name of an array. This can be inserted into a new array to include the contents of the first array.

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

  14. What is serialisation and what is a use case of serialisation of data?
    Serialisation is compacting (encoding) an object of arrays into a string, which would be easier to transport. A use case is hashing we learned in Bitcoin. The information in a block is serialise into a hash.

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

  16. What are the differences between JSON and the way programmers write objects in plain Javascript?
    JSON makes it shorter and easier to transport. But we will need to decode the strings using JSON.parse to see all the details in the code.

1 Like

Objectives and arrays

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?

This log requires an array of information. To be stored for a given day, or a collection of strings and integers.

2.What variable type can be used in order to solve the problem of storing multiple values?
Answer: An array
const thisIsAnArray = [‘Value1’, ‘Value2’, ‘Value3’];
3.What are properties in Javascript?
Properties are values combined to objects.
4.Which values do not have properties?
Null and undefined
5.How can we access properties in a value (two ways)?
The two main way to access properties in a value are with a dot and with square brackets value.x and value[ ]
6.What are methods?
Properties that contain functions is called for methods of the value.
7.What are objects?
Objects are values that 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)?
Object can hold different datatypes

9.How do you define an object?
A Variable which can provide hold several value into a single value.
10.What can you say about the mutability of Javascript objects?
Mutability objects is a type of variable that can change value.


1.Why can’t you add new properties to a string variable?
String variable are immutable.
2.What are rest parameters?
The rest parameters allow the developer to represent indefinite number of arguments as an array.
3.-
4.What is serialisation and what is a use case of serialisation of data?
Objects and array are stored as bits and holding adresses. These objects can be serialized into data management notation, suitable for digital communications.
5.What is JSON?
JSON stands for javascript object notation, a standard used in data storage and communication on the web
6.What are the differences between JSON and the way programmers write objects in plain Javascript?
Only simple expression are allowed in JSON. There are no functions, bindings, comments, or computations.

1 Like

HI Malik,
Thank you for your feedback.

In the answer, i is not the name of the property, instead i refers to a variable that contains the value of the property.

I think there has been a misunderstanding of what I have written. Perhaps I have not been clear in what I want to say. Below is a quote from page 59 of the Eloquent JavaScript text book

So if you know that the property you are interested in is called color, you say
value.color. If you want to extract the property named by the value held in
the binding i, you say value[i]

Please do correct me if I have not fully understood the above.

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 vales within a single variable
2. What variable type can be used in order to solve the problem of storing multiple values?
Arrays, then, are just a kind of object specialized for storing sequences of things
3. What are properties in Javascript?
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)?
Both value.x and value[x] access a property on value—but not necessarily the same property.
6. What are methods?
A property that is a function
7. What are objects?
objects are variables that 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 be modified with different properties
9. How do you define an object?

var person = {firstName:"John", lastName:"Bagholder", age:30, eyeColor:"brown"};

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

SECOND PART:

1. Why can’t you add new properties to a string variable?
Strings and Variables are not objects and thus cannot be changed once they are defined
2. What are rest parameters?
allows us to represent an indefinite number of arguments as an array
4. What is serialisation and what is a use case of serialisation of data?
converting data to be sent over a network in a format that can be saved or stored
5. What is JSON?
JavaScript Object Notation. It is 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 JS
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?
Objects, numbers, strings and Booleans cannot be changed.

What variable type can be used in order to solve the problem of storing multiple values?
Objects- you can change their properties causing a single object value to have
different content at different times.
Bindings -can be changeable or constant Bindings are pointers. You can change the value that the binding points to.

What are properties in Javascript?
information about an object

Which values do not have properties?
Null and undefined
How can we access properties in a value (two ways)?
Value.prop or value[“prop”].
What are methods?
Methods are functions that live in properties and act on the value they are property of.
What are objects?
Key words that give direction to Java script
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)?

How do you define an object?
Blueprint of similar properties and methods to group and organize code without using variables and functions.
What can you say about the mutability of Javascript objects?
Mutable means able to change or modified. Const a =20
const b=hello
const c=a
const d=a
const d=d+1
If you change d, you also change a.

1 Like

That is right. In your previous answer, it was not mentioned that you stored the value in the variable i . So, I thought you had misinterpreted the notions. Nevertheless, this answer is right. :slight_smile:

Please feel free to reach out for further questions. Thank you.

1 Like

Part 2
Why can’t you add new properties to a string variable?
String variables are immutable and cannot be changed. The properties
are not stored. JS doesn’t even complain about it.

What are rest parameters?
Rest parameters will spread out the array into the function call, passing its elements as separate arguments.

(Feel free to skip the sub-chapter of Math object and Destructing)
thank you!!

What is serialisation and what is a use case of serialisation of data?
To convert data into a flat description.

What is JSON?
A popular serialization format which is widely used as a data storage and communication format on the Web, even in languages other than JS.

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. JavaScript gives us the functions JSON.stringify and JSON.parse to convert data to and from this format.

1 Like