Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

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

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.

Join The Discussion