Identify the process done in the following JavaScript code snippet?
o = {x:1, y:{z:[false,null,””]}};
s = JSON.stringify(o);
p = JSON.parse(s);
a) Object Encapsulation
b) Object Serialization
c) Object Abstraction
d) Object Encoding
Answer: b
Explanation: Object serialization is the process of converting an object’s state to a string from which it can later be restored. The JSON.parse() method parses a JSON string, constructing the JavaScript value or object described by the string.
Related Posts
The ________ function can be used to create vectors of objects by concatenating things together.
What will be the output of the following R code?
> x <- vector(“numeric”, length = 10)
> xWhich of the following can be considered as object attribute?
R objects can have attributes, which are like ________ for the object.
Attributes of an object (if any) can be accessed using the ______ function.
Point out the correct statement?
If you explicitly want an integer, you need to specify the _____ suffix.
Join The Discussion