On the first code, as shown in the following:
<meta charset="utf-8" & gt;
<meta HTTP - equiv="X - UA - Compatible" content="IE=edge" & gt;
<meta name="viewport" content="width=device - width, initial - scale=1.0" & gt;JS function serialization and deserialization of problem & lt;/title>
<script>
Let animal={
Name: "cat,"
Color: white,
Age: 3,
The run: the function () {
Document. Writeln (" the cat is running. ");
}
};
Animal. The run ();
Let the json=json. Stringify (animal);
Document. Writeln (" & lt; br>" );
Document. Writeln (json);
</script>
<body>