Skip to content

Commit 1f1db60

Browse files
authored
Merge pull request lydiahallie#266 from MaheshKonne/typo-correction
Typo correction of serialisation of an object
2 parents 2c6f053 + 099ade0 commit 1f1db60

File tree

14 files changed

+49
-49
lines changed

14 files changed

+49
-49
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -879,9 +879,9 @@ console.log(a[b]);
879879

880880
Object keys are automatically converted into strings. We are trying to set an object as a key to object `a`, with the value of `123`.
881881

882-
However, when we stringify an object, it becomes `"[Object object]"`. So what we are saying here, is that `a["Object object"] = 123`. Then, we can try to do the same again. `c` is another object that we are implicitly stringifying. So then, `a["Object object"] = 456`.
882+
However, when we stringify an object, it becomes `"[object Object]"`. So what we are saying here, is that `a["object Object"] = 123`. Then, we can try to do the same again. `c` is another object that we are implicitly stringifying. So then, `a["object Object"] = 456`.
883883

884-
Then, we log `a[b]`, which is actually `a["Object object"]`. We just set that to `456`, so it returns `456`.
884+
Then, we log `a[b]`, which is actually `a["object Object"]`. We just set that to `456`, so it returns `456`.
885885

886886
</p>
887887
</details>
@@ -3286,8 +3286,8 @@ for (let item of set) {
32863286

32873287
- A: `3`, `NaN`, `NaN`
32883288
- B: `3`, `7`, `NaN`
3289-
- C: `3`, `Lydia2`, `[Object object]2`
3290-
- D: `"12"`, `Lydia2`, `[Object object]2`
3289+
- C: `3`, `Lydia2`, `[object Object]2`
3290+
- D: `"12"`, `Lydia2`, `[object Object]2`
32913291

32923292
<details><summary><b>Answer</b></summary>
32933293
<p>
@@ -3300,7 +3300,7 @@ The first one is `1`, which is a numerical value. `1 + 2` returns the number 3.
33003300

33013301
However, the second one is a string `"Lydia"`. `"Lydia"` is a string and `2` is a number: `2` gets coerced into a string. `"Lydia"` and `"2"` get concatenated, which results in the string `"Lydia2"`.
33023302

3303-
`{ name: "Lydia" }` is an object. Neither a number nor an object is a string, so it stringifies both. Whenever we stringify a regular object, it becomes `"[Object object]"`. `"[Object object]"` concatenated with `"2"` becomes `"[Object object]2"`.
3303+
`{ name: "Lydia" }` is an object. Neither a number nor an object is a string, so it stringifies both. Whenever we stringify a regular object, it becomes `"[object Object]"`. `"[object Object]"` concatenated with `"2"` becomes `"[object Object]2"`.
33043304

33053305
</p>
33063306
</details>

ar-AR/README_AR.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -910,10 +910,10 @@ console.log(a[b]);
910910

911911
مفاتيح ال object يتم تحويلها اوتوماتيكيا الى strings. نحن نحاول أن نقوم بجعل object عبارة عن مفتاح للobject `a`, و الذي يحمل القيمة `123`.
912912

913-
و لكن, عندما نقوم بمحاول جعل object الى نوع string, سيصبح `"[Object object]"`. لذا ما نحاول أن نقوله هنا, هو أن `a["Object object"] = 123`.
914-
إذا, سنحاول أن نفعل هذا مرة أخرى , `c` هو object آخر سنقوم بتحويله الى string بصورة صريحة, لذا `a["Object object"] = 456`.
913+
و لكن, عندما نقوم بمحاول جعل object الى نوع string, سيصبح `"[object Object]"`. لذا ما نحاول أن نقوله هنا, هو أن `a["object Object"] = 123`.
914+
إذا, سنحاول أن نفعل هذا مرة أخرى , `c` هو object آخر سنقوم بتحويله الى string بصورة صريحة, لذا `a["object Object"] = 456`.
915915

916-
إذاَ, نحن نقوم بعمل log ل `a[b]`, و التي هي في الحقيقة `a["Object object"]`. و نحن قبل قليل قمنا بوضع قيمتها التي تساوي `456`, لذا ستقوم بإرجاع `456`.
916+
إذاَ, نحن نقوم بعمل log ل `a[b]`, و التي هي في الحقيقة `a["object Object"]`. و نحن قبل قليل قمنا بوضع قيمتها التي تساوي `456`, لذا ستقوم بإرجاع `456`.
917917
</p>
918918
</details>
919919
</div>

ar-EG/README_ar-EG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,7 @@ console.log(a[b]);
940940

941941
#### الاجابة الصحيحة: ب
942942

943-
مفاتيح العناصر `Object keys` بيتم تحويلهم تلقائياً الى string. احنا هنا بنحاول نحط اوبجكت على انه مفتاح لأوبجكت تاني. بس المشكلة ان لما نعمل كده مش بيترجم لأسمه او لمحتوياته بل بيتحول الى `[Object object] و بالتالي احنا كنا كأننا بالظبط عاملين `a["Object object"]=123` و بنكرر كده مع `c` و بعد كده بنقوم طابعين `a[b]` اللي احنا لسه مخليين مفتاحها من شوية `a["Object object"]` و خلينا القيمة بتاعته 456 و بالتالي دي اللي بتطبع.
943+
مفاتيح العناصر `Object keys` بيتم تحويلهم تلقائياً الى string. احنا هنا بنحاول نحط اوبجكت على انه مفتاح لأوبجكت تاني. بس المشكلة ان لما نعمل كده مش بيترجم لأسمه او لمحتوياته بل بيتحول الى `[object Object] و بالتالي احنا كنا كأننا بالظبط عاملين `a["object Object"]=123` و بنكرر كده مع `c` و بعد كده بنقوم طابعين `a[b]` اللي احنا لسه مخليين مفتاحها من شوية `a["object Object"]` و خلينا القيمة بتاعته 456 و بالتالي دي اللي بتطبع.
944944

945945

946946
</p>
@@ -1403,4 +1403,4 @@ setInterval(() => console.log("Hi"), 1000);
14031403

14041404
</p>
14051405
</details>
1406-
</div>
1406+
</div>

de-DE/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -874,9 +874,9 @@ console.log(a[b]);
874874

875875
Objekt Keys werden automatisch in Strings umgewandelt. Wir versuchen ein Objekt mit dem Wert `123` als Key dem Objekt `a` zuzuweisen.
876876

877-
Allerdings wird ein Object, wenn es in einen String umgewandelt wird als `"[Object object]"` ausgegeben. Was wir hier also sagen ist, dass `a["Object object"] = 123` ist. Wir versuchen das gleiche erneut - `c` ist ein anderes Objekt, welches wir implizit zu einem String umwandeln, sodass `a["Object object"] = 456` ist.
877+
Allerdings wird ein Object, wenn es in einen String umgewandelt wird als `"[object Object]"` ausgegeben. Was wir hier also sagen ist, dass `a["object Object"] = 123` ist. Wir versuchen das gleiche erneut - `c` ist ein anderes Objekt, welches wir implizit zu einem String umwandeln, sodass `a["object Object"] = 456` ist.
878878

879-
Dann loggen wir `a[b]`, was eigentlich `a["Object object"]` ist und gerade von uns zu `456` gesetzt wurde, sodass `456` ausgegeben wird.
879+
Dann loggen wir `a[b]`, was eigentlich `a["object Object"]` ist und gerade von uns zu `456` gesetzt wurde, sodass `456` ausgegeben wird.
880880

881881
</p>
882882
</details>
@@ -3287,8 +3287,8 @@ for (let item of set) {
32873287
32883288
- A: `3`, `NaN`, `NaN`
32893289
- B: `3`, `7`, `NaN`
3290-
- C: `3`, `Lydia2`, `[Object object]2`
3291-
- D: `"12"`, `Lydia2`, `[Object object]2`
3290+
- C: `3`, `Lydia2`, `[object Object]2`
3291+
- D: `"12"`, `Lydia2`, `[object Object]2`
32923292
32933293
<details><summary><b>Antwort</b></summary>
32943294
<p>
@@ -3301,7 +3301,7 @@ Der erste Wert ist `1`, was ein numerischer Wert ist. `1 + 2` ergibt die Zahl `3
33013301
33023302
Der zweite Wert hingegen ist der String `"Lydia"`. `"Lydia"` ist ein String und `2` ist eine Nummer: `2` wird in einem String umgewandelt. `"Lydia"` und `"2"` werden zusammengesetzt, was den String `"Lydia2"` ausgibt.
33033303
3304-
`{ name: "Lydia" }` ist ein Objekt. Weder eine Nummer, noch ein Objekt sind ein String, aber beide werden zu Strings konvertiert und `"[Object object]"` wird ausgegeben. `"[Object object]"` zusammengesetzt mit `"2"` wird `"[Object object]2"`.
3304+
`{ name: "Lydia" }` ist ein Objekt. Weder eine Nummer, noch ein Objekt sind ein String, aber beide werden zu Strings konvertiert und `"[object Object]"` wird ausgegeben. `"[object Object]"` zusammengesetzt mit `"2"` wird `"[object Object]2"`.
33053305
33063306
</p>
33073307
</details>

en-EN/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -879,9 +879,9 @@ console.log(a[b]);
879879

880880
Object keys are automatically converted into strings. We are trying to set an object as a key to object `a`, with the value of `123`.
881881

882-
However, when we stringify an object, it becomes `"[Object object]"`. So what we are saying here, is that `a["Object object"] = 123`. Then, we can try to do the same again. `c` is another object that we are implicitly stringifying. So then, `a["Object object"] = 456`.
882+
However, when we stringify an object, it becomes `"[object Object]"`. So what we are saying here, is that `a["object Object"] = 123`. Then, we can try to do the same again. `c` is another object that we are implicitly stringifying. So then, `a["object Object"] = 456`.
883883

884-
Then, we log `a[b]`, which is actually `a["Object object"]`. We just set that to `456`, so it returns `456`.
884+
Then, we log `a[b]`, which is actually `a["object Object"]`. We just set that to `456`, so it returns `456`.
885885

886886
</p>
887887
</details>
@@ -3286,8 +3286,8 @@ for (let item of set) {
32863286

32873287
- A: `3`, `NaN`, `NaN`
32883288
- B: `3`, `7`, `NaN`
3289-
- C: `3`, `Lydia2`, `[Object object]2`
3290-
- D: `"12"`, `Lydia2`, `[Object object]2`
3289+
- C: `3`, `Lydia2`, `[object Object]2`
3290+
- D: `"12"`, `Lydia2`, `[object Object]2`
32913291

32923292
<details><summary><b>Answer</b></summary>
32933293
<p>
@@ -3300,7 +3300,7 @@ The first one is `1`, which is a numerical value. `1 + 2` returns the number 3.
33003300

33013301
However, the second one is a string `"Lydia"`. `"Lydia"` is a string and `2` is a number: `2` gets coerced into a string. `"Lydia"` and `"2"` get concatenated, whic hresults in the string `"Lydia2"`.
33023302

3303-
`{ name: "Lydia" }` is an object. Neither a number nor an object is a string, so it stringifies both. Whenever we stringify a regular object, it becomes `"[Object object]"`. `"[Object object]"` concatenated with `"2"` becomes `"[Object object]2"`.
3303+
`{ name: "Lydia" }` is an object. Neither a number nor an object is a string, so it stringifies both. Whenever we stringify a regular object, it becomes `"[object Object]"`. `"[object Object]"` concatenated with `"2"` becomes `"[object Object]2"`.
33043304

33053305
</p>
33063306
</details>
@@ -4203,4 +4203,4 @@ console.log(emojis.flat(1));
42034203
With the `flat` method, we can create a new, flattened array. The depth of the flattened array depends on the value that we pass. In this case, we passed the value `1` (which we didn't have to, that's the default value), meaning that only the arrays on the first depth will be concatenated. `['🥑']` and `['✨', '✨', ['🍕', '🍕']]` in this case. Concatenating these two arrays results in `['🥑', '✨', '✨', ['🍕', '🍕']]`.
42044204

42054205
</p>
4206-
</details>
4206+
</details>

es-ES/README-ES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ console.log(a[b]);
877877

878878
Las claves se convierten automáticamente en strings. Estamos tratando en este pregunta de establecer un objeto como clave para el objeto `a`, con el valor de `123`.
879879

880-
Sin embargo, cuando se _stringfy_ (compleja traducción) un objeto, se convierte en `"[Object object]"`. Así que lo que estamos diciendo aquí, es que `a["Object object"] = 123`. Entonces, podemos intentar hacer lo mismo de nuevo. `c` es otro objeto que estamos implícitamente encadenando. Entonces, `a["Object object"] = 456`.
880+
Sin embargo, cuando se _stringfy_ (compleja traducción) un objeto, se convierte en `"[object Object]"`. Así que lo que estamos diciendo aquí, es que `a["object Object"] = 123`. Entonces, podemos intentar hacer lo mismo de nuevo. `c` es otro objeto que estamos implícitamente encadenando. Entonces, `a["object Object"] = 456`.
881881

882882
Para finalizar, registramos `a[b]`, que en realidad es `a["Object"]`. Acabamos de ponerlo en `456`, así que devuelve `456`.
883883

ja-JA/README-ja_JA.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -902,11 +902,11 @@ console.log(a[b]);
902902

903903
オブジェクトキーは自動的に文字列に変換されます。オブジェクトaのキーとして、値123で設定しようとしています。
904904

905-
しかし、オブジェクトを文字列化すると、それは`"[Object object]"`​​になってしまいます。なので、ここで行っているのは、 `a["Object object"] = 123`です。
905+
しかし、オブジェクトを文字列化すると、それは`"[object Object]"`​​になってしまいます。なので、ここで行っているのは、 `a["object Object"] = 123`です。
906906

907-
その後、同じことをもう一度試みています。`c`は暗黙のうちに文字列化している別のオブジェクトです。そのため、`a["Object object"] = 456`となります。
907+
その後、同じことをもう一度試みています。`c`は暗黙のうちに文字列化している別のオブジェクトです。そのため、`a["object Object"] = 456`となります。
908908

909-
その後、`a[b]`でログ出力。実際には`a["Object object"]`です。これを `456`に設定しただけなので、`456`を返します。
909+
その後、`a[b]`でログ出力。実際には`a["object Object"]`です。これを `456`に設定しただけなので、`456`を返します。
910910

911911
</p>
912912
</details>

ko-KR/README-ko_KR.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -877,9 +877,9 @@ console.log(a[b]);
877877

878878
객체 키는 자동으로 문자열로 변환돼요. 객체 `a`의 키 값으로 `123`을 세팅하려고 해요.
879879

880-
그러나, 객체를 문자열화 하면 `"[Object object]"`가 돼요. 그래서 여기서 말하고자 하는 건 `a["Object object"] = 123`이라는 거예요. 그 후, 같은 일을 다시 시도해요. `c`는 암묵적으로 문자열화 한 다른 객체에요. 그래서 `a["Object object"] = 456`이 돼요.
880+
그러나, 객체를 문자열화 하면 `"[object Object]"`가 돼요. 그래서 여기서 말하고자 하는 건 `a["object Object"] = 123`이라는 거예요. 그 후, 같은 일을 다시 시도해요. `c`는 암묵적으로 문자열화 한 다른 객체에요. 그래서 `a["object Object"] = 456`이 돼요.
881881

882-
그 후, `a[b]`는 출력하면 실제로는 `a["Object object"]`에요. 단지 `456`을 설정했기 때문에, `456`을 리턴해요.
882+
그 후, `a[b]`는 출력하면 실제로는 `a["object Object"]`에요. 단지 `456`을 설정했기 때문에, `456`을 리턴해요.
883883

884884
</p>
885885
</details>
@@ -3288,8 +3288,8 @@ for (let item of set) {
32883288

32893289
- A: `3`, `NaN`, `NaN`
32903290
- B: `3`, `7`, `NaN`
3291-
- C: `3`, `Lydia2`, `[Object object]2`
3292-
- D: `"12"`, `Lydia2`, `[Object object]2`
3291+
- C: `3`, `Lydia2`, `[object Object]2`
3292+
- D: `"12"`, `Lydia2`, `[object Object]2`
32933293

32943294
<details><summary><b>정답</b></summary>
32953295
<p>
@@ -3302,7 +3302,7 @@ for (let item of set) {
33023302

33033303
그러나, 두번째는 문자열 `"Lydia"`이에요. `"Lydia"`은 문자열이고, `2`는 숫자에요: `2`는 문자열로 강제 변환되어요. `"Lydia"`그리고 `"2"`이 연결되어, 문자열 `"Lydia2"`이 리턴되요.
33043304

3305-
`{ name: "Lydia" }`은 객체에요. 객체가 아닌 숫자나 객체는 문자열이 아니므로, 둘다 문자화되어요. 정규 객체를 문자화 할때, `"[Object object]"`가 돼요. `"[Object object]"``"2"`와 연결되어 `"[Object object]2"`가 돼요.
3305+
`{ name: "Lydia" }`은 객체에요. 객체가 아닌 숫자나 객체는 문자열이 아니므로, 둘다 문자화되어요. 정규 객체를 문자화 할때, `"[object Object]"`가 돼요. `"[object Object]"``"2"`와 연결되어 `"[object Object]2"`가 돼요.
33063306

33073307
</p>
33083308
</details>

pt-BR/README_pt_BR.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -878,9 +878,9 @@ console.log(a[b]);
878878

879879
Chaves de objeto são automaticamente convertidas em strings. Estamos tentando usar um objeto como chave do objeto `a`, com o valor de `123`.
880880

881-
Contudo, quando transformamos um objeto em string, ele vira um `"[Object object]"`. Então, o que estamos afirmando é `a["Object object"] = 123`. Após, tentamos a mesma coisa. `c` é outro objeto que (implicitamente) convertemos para string. Então, temos `a["Object object"] = 456`.
881+
Contudo, quando transformamos um objeto em string, ele vira um `"[object Object]"`. Então, o que estamos afirmando é `a["object Object"] = 123`. Após, tentamos a mesma coisa. `c` é outro objeto que (implicitamente) convertemos para string. Então, temos `a["object Object"] = 456`.
882882

883-
Então, fazemos o log de `a[b]`, o que na verdade é `a["Object object"]`. Acabmos de definir esse valor, como `456`, e é isso que ele retorna.
883+
Então, fazemos o log de `a[b]`, o que na verdade é `a["object Object"]`. Acabmos de definir esse valor, como `456`, e é isso que ele retorna.
884884

885885
</p>
886886
</details>

ru-RU/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -879,9 +879,9 @@ console.log(a[b]);
879879

880880
Ключи объекта автоматически конвертируются в строки. Мы собираемся добавить объект в качестве ключа к объекту `a` со значением `123`.
881881

882-
Тем не менее, когда мы приводим объект к строке, он становится `"[object Object]"`. Таким образом, мы говорим, что `a["Object object"] = 123`. Потом мы делаем то же самое. `c` это другой объект, который мы неявно приводим к строке. Поэтому `a["Object object"] = 456`.
882+
Тем не менее, когда мы приводим объект к строке, он становится `"[object Object]"`. Таким образом, мы говорим, что `a["object Object"] = 123`. Потом мы делаем то же самое. `c` это другой объект, который мы неявно приводим к строке. Поэтому `a["object Object"] = 456`.
883883

884-
Затем, когда мы выводим `a[b]`, мы имеем в виду `a["Object object"]`. Мы только что установили туда значение `456`, поэтому в результате получаем `456`.
884+
Затем, когда мы выводим `a[b]`, мы имеем в виду `a["object Object"]`. Мы только что установили туда значение `456`, поэтому в результате получаем `456`.
885885

886886
</p>
887887
</details>
@@ -3286,8 +3286,8 @@ for (let item of set) {
32863286

32873287
- A: `3`, `NaN`, `NaN`
32883288
- B: `3`, `7`, `NaN`
3289-
- C: `3`, `Lydia2`, `[Object object]2`
3290-
- D: `"12"`, `Lydia2`, `[Object object]2`
3289+
- C: `3`, `Lydia2`, `[object Object]2`
3290+
- D: `"12"`, `Lydia2`, `[object Object]2`
32913291

32923292
<details><summary><b>Ответ</b></summary>
32933293
<p>
@@ -3300,7 +3300,7 @@ for (let item of set) {
33003300

33013301
Тем не менее, вторая строка `"Lydia"`. `"Lydia"` является строкой, а `2` является числом: `2` приводится к строке. `"Lydia"` и `"2"` объединяются, что приводит к результирующей строке `"Lydia2"`.
33023302

3303-
`{name: "Lydia"}` является объектом. Ни число, ни объект не являются строкой, поэтому они приводятся к строке. Всякий раз, когда мы приводим обычный объект, он становится `"[Object object]"`. `"[Object object]"`, объединенный с `"2"`, становится `"[Object object]2"`.
3303+
`{name: "Lydia"}` является объектом. Ни число, ни объект не являются строкой, поэтому они приводятся к строке. Всякий раз, когда мы приводим обычный объект, он становится `"[object Object]"`. `"[object Object]"`, объединенный с `"2"`, становится `"[object Object]2"`.
33043304

33053305
</p>
33063306
</details>
@@ -3750,4 +3750,4 @@ console.log(person)
37503750
Затем мы вызываем функцию `changeAgeAndName`, однако мы не передаем параметр. Вместо этого значение `x` равно новому объекту: `{ ... person }`. Поскольку это новый объект, он не влияет на значения свойств объекта `person`. `person` по-прежнему равен `{name: "Lydia", age: 22}`.
37513751

37523752
</p>
3753-
</details>
3753+
</details>

0 commit comments

Comments
 (0)