Skip to content

Commit 5f71748

Browse files
committed
Translate JSON methods, toJSON tasks and solutions
1 parent 503f759 commit 5f71748

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

1-js/05-data-types/12-json/1-serialize-object/task.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
importance: 5
1+
درجة الأهمية: 5
22

33
---
44

5-
# Turn the object into JSON and back
5+
# تحويل الكائن لجيسون وإرجاعه مرة أخرى
66

7-
Turn the `user` into JSON and then read it back into another variable.
7+
قم بتحويل الكائن `user` إلى JSON ثم قم بإضافته ككائن إلى متغير آخر.
88

99
```js
1010
let user = {

1-js/05-data-types/12-json/2-serialize-event-circular/solution.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ alert( JSON.stringify(meetup, function replacer(key, value) {
2626
*/
2727
```
2828

29-
Here we also need to test `key==""` to exclude the first call where it is normal that `value` is `meetup`.
29+
نحتاج أن نفحص أيضًا `key==""` لاستثناء أول استدعاء لأن قيمته الطبيعية هي الكائن `meetup`.
3030

1-js/05-data-types/12-json/2-serialize-event-circular/task.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
importance: 5
1+
درجة الأهمية: 5
22

33
---
44

5-
# Exclude backreferences
5+
# استثناء المراجع لكائنات أخرى
66

7-
In simple cases of circular references, we can exclude an offending property from serialization by its name.
7+
فى بعض الحالات البسيطة من المرجعية الثنائية (circular references)، يمكننا أن نستبعد الخاصية الغير مرغوبة من التحويل عن طريق اسمها.
88

9-
But sometimes we can't just use the name, as it may be used both in circular references and normal properties. So we can check the property by its value.
9+
ولكن فى بعض الأوقات لا يمكننا أن نستخدم الإسم فقط، حيث أنها يمكن أن تكون مستخدمه فى مرجعية ثنائية وفى خاصية عادية، ولذلك يمكننا أن نختبر الخاصية عن طريق اسمها.
1010

11-
Write `replacer` function to stringify everything, but remove properties that reference `meetup`:
11+
قم بإنشاء الدالة `replacer` لتحويل كل شيئ إلى نص ولكن تقوم بحذف الخصائص التى تحتوى على مرجع للكائن `meetup`:
1212

1313
```js run
1414
let room = {
@@ -28,10 +28,10 @@ meetup.self = meetup;
2828
*/!*
2929

3030
alert( JSON.stringify(meetup, function replacer(key, value) {
31-
/* your code */
31+
/* الحل الخاص بك */
3232
}));
3333

34-
/* result should be:
34+
/* يجب أن تكون النتيجة كالآتي:
3535
{
3636
"title":"Conference",
3737
"occupiedBy":[{"name":"John"},{"name":"Alice"}],

0 commit comments

Comments
 (0)