renovations
This commit is contained in:
parent
c7d4c7e3ff
commit
e1948130f6
170 changed files with 1496 additions and 1161 deletions
12
1-js/7-js-misc/2-json/1-serialize-object/solution.md
Normal file
12
1-js/7-js-misc/2-json/1-serialize-object/solution.md
Normal file
|
@ -0,0 +1,12 @@
|
|||
|
||||
|
||||
```js
|
||||
var leader = {
|
||||
name: "Василий Иванович",
|
||||
age: 35
|
||||
};
|
||||
|
||||
var leaderStr = JSON.stringify(leader);
|
||||
leader = JSON.parse(leaderStr);
|
||||
```
|
||||
|
14
1-js/7-js-misc/2-json/1-serialize-object/task.md
Normal file
14
1-js/7-js-misc/2-json/1-serialize-object/task.md
Normal file
|
@ -0,0 +1,14 @@
|
|||
# Превратите объект в JSON
|
||||
|
||||
[importance 3]
|
||||
|
||||
Превратите объект `leader` из примера ниже в JSON:
|
||||
|
||||
```js
|
||||
var leader = {
|
||||
name: "Василий Иванович",
|
||||
age: 35
|
||||
};
|
||||
```
|
||||
|
||||
После этого прочитайте получившуюся строку обратно в объект.
|
Loading…
Add table
Add a link
Reference in a new issue