You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -879,9 +879,9 @@ console.log(a[b]);
879
879
880
880
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`.
881
881
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`.
883
883
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`.
885
885
886
886
</p>
887
887
</details>
@@ -3286,8 +3286,8 @@ for (let item of set) {
3286
3286
3287
3287
- A: `3`, `NaN`, `NaN`
3288
3288
- 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`
3291
3291
3292
3292
<details><summary><b>Answer</b></summary>
3293
3293
<p>
@@ -3300,7 +3300,7 @@ The first one is `1`, which is a numerical value. `1 + 2` returns the number 3.
3300
3300
3301
3301
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"`.
3302
3302
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"`.
Copy file name to clipboardExpand all lines: ar-EG/README_ar-EG.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -940,7 +940,7 @@ console.log(a[b]);
940
940
941
941
#### الاجابة الصحيحة: ب
942
942
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 و بالتالي دي اللي بتطبع.
Copy file name to clipboardExpand all lines: de-DE/README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -874,9 +874,9 @@ console.log(a[b]);
874
874
875
875
Objekt Keys werden automatisch in Strings umgewandelt. Wir versuchen ein Objekt mit dem Wert `123` als Key dem Objekt `a` zuzuweisen.
876
876
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.
878
878
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.
880
880
881
881
</p>
882
882
</details>
@@ -3287,8 +3287,8 @@ for (let item of set) {
3287
3287
3288
3288
- A: `3`, `NaN`, `NaN`
3289
3289
- B: `3`, `7`, `NaN`
3290
-
- C: `3`, `Lydia2`, `[Objectobject]2`
3291
-
- D: `"12"`, `Lydia2`, `[Objectobject]2`
3290
+
- C: `3`, `Lydia2`, `[objectObject]2`
3291
+
- D: `"12"`, `Lydia2`, `[objectObject]2`
3292
3292
3293
3293
<details><summary><b>Antwort</b></summary>
3294
3294
<p>
@@ -3301,7 +3301,7 @@ Der erste Wert ist `1`, was ein numerischer Wert ist. `1 + 2` ergibt die Zahl `3
3301
3301
3302
3302
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.
3303
3303
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"`.
Copy file name to clipboardExpand all lines: en-EN/README.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -879,9 +879,9 @@ console.log(a[b]);
879
879
880
880
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`.
881
881
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`.
883
883
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`.
885
885
886
886
</p>
887
887
</details>
@@ -3286,8 +3286,8 @@ for (let item of set) {
3286
3286
3287
3287
- A: `3`, `NaN`, `NaN`
3288
3288
- 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`
3291
3291
3292
3292
<details><summary><b>Answer</b></summary>
3293
3293
<p>
@@ -3300,7 +3300,7 @@ The first one is `1`, which is a numerical value. `1 + 2` returns the number 3.
3300
3300
3301
3301
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"`.
3302
3302
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"`.
Copy file name to clipboardExpand all lines: es-ES/README-ES.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -877,7 +877,7 @@ console.log(a[b]);
877
877
878
878
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`.
879
879
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`.
881
881
882
882
Para finalizar, registramos `a[b]`, que en realidad es `a["Object"]`. Acabamos de ponerlo en `456`, así que devuelve `456`.
Copy file name to clipboardExpand all lines: ko-KR/README-ko_KR.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -877,9 +877,9 @@ console.log(a[b]);
877
877
878
878
객체 키는 자동으로 문자열로 변환돼요. 객체 `a`의 키 값으로 `123`을 세팅하려고 해요.
879
879
880
-
그러나, 객체를 문자열화 하면 `"[Object object]"`가 돼요. 그래서 여기서 말하고자 하는 건 `a["Object object"] = 123`이라는 거예요. 그 후, 같은 일을 다시 시도해요. `c`는 암묵적으로 문자열화 한 다른 객체에요. 그래서 `a["Object object"] = 456`이 돼요.
880
+
그러나, 객체를 문자열화 하면 `"[object Object]"`가 돼요. 그래서 여기서 말하고자 하는 건 `a["object Object"] = 123`이라는 거예요. 그 후, 같은 일을 다시 시도해요. `c`는 암묵적으로 문자열화 한 다른 객체에요. 그래서 `a["object Object"] = 456`이 돼요.
881
881
882
-
그 후, `a[b]`는 출력하면 실제로는 `a["Object object"]`에요. 단지 `456`을 설정했기 때문에, `456`을 리턴해요.
882
+
그 후, `a[b]`는 출력하면 실제로는 `a["object Object"]`에요. 단지 `456`을 설정했기 때문에, `456`을 리턴해요.
883
883
884
884
</p>
885
885
</details>
@@ -3288,8 +3288,8 @@ for (let item of set) {
3288
3288
3289
3289
- A: `3`, `NaN`, `NaN`
3290
3290
- 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`
3293
3293
3294
3294
<details><summary><b>정답</b></summary>
3295
3295
<p>
@@ -3302,7 +3302,7 @@ for (let item of set) {
3302
3302
3303
3303
그러나, 두번째는 문자열 `"Lydia"`이에요. `"Lydia"`은 문자열이고, `2`는 숫자에요: `2`는 문자열로 강제 변환되어요. `"Lydia"`그리고 `"2"`이 연결되어, 문자열 `"Lydia2"`이 리턴되요.
3304
3304
3305
-
`{ name: "Lydia" }`은 객체에요. 객체가 아닌 숫자나 객체는 문자열이 아니므로, 둘다 문자화되어요. 정규 객체를 문자화 할때, `"[Object object]"`가 돼요. `"[Object object]"`는 `"2"`와 연결되어 `"[Object object]2"`가 돼요.
3305
+
`{ name: "Lydia" }`은 객체에요. 객체가 아닌 숫자나 객체는 문자열이 아니므로, 둘다 문자화되어요. 정규 객체를 문자화 할때, `"[object Object]"`가 돼요. `"[object Object]"`는 `"2"`와 연결되어 `"[object Object]2"`가 돼요.
Copy file name to clipboardExpand all lines: pt-BR/README_pt_BR.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -878,9 +878,9 @@ console.log(a[b]);
878
878
879
879
Chaves de objeto são automaticamente convertidas em strings. Estamos tentando usar um objeto como chave do objeto `a`, com o valor de `123`.
880
880
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`.
882
882
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.
Copy file name to clipboardExpand all lines: ru-RU/README.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -879,9 +879,9 @@ console.log(a[b]);
879
879
880
880
Ключи объекта автоматически конвертируются в строки. Мы собираемся добавить объект в качестве ключа к объекту `a` со значением `123`.
881
881
882
-
Тем не менее, когда мы приводим объект к строке, он становится `"[object Object]"`. Таким образом, мы говорим, что `a["Object object"] = 123`. Потом мы делаем то же самое. `c` это другой объект, который мы неявно приводим к строке. Поэтому `a["Object object"] = 456`.
882
+
Тем не менее, когда мы приводим объект к строке, он становится `"[object Object]"`. Таким образом, мы говорим, что `a["object Object"] = 123`. Потом мы делаем то же самое. `c` это другой объект, который мы неявно приводим к строке. Поэтому `a["object Object"] = 456`.
883
883
884
-
Затем, когда мы выводим `a[b]`, мы имеем в виду `a["Object object"]`. Мы только что установили туда значение `456`, поэтому в результате получаем `456`.
884
+
Затем, когда мы выводим `a[b]`, мы имеем в виду `a["object Object"]`. Мы только что установили туда значение `456`, поэтому в результате получаем `456`.
885
885
886
886
</p>
887
887
</details>
@@ -3286,8 +3286,8 @@ for (let item of set) {
3286
3286
3287
3287
- A: `3`, `NaN`, `NaN`
3288
3288
- 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`
3291
3291
3292
3292
<details><summary><b>Ответ</b></summary>
3293
3293
<p>
@@ -3300,7 +3300,7 @@ for (let item of set) {
3300
3300
3301
3301
Тем не менее, вторая строка `"Lydia"`. `"Lydia"` является строкой, а `2` является числом: `2` приводится к строке. `"Lydia"` и `"2"` объединяются, что приводит к результирующей строке `"Lydia2"`.
3302
3302
3303
-
`{name: "Lydia"}` является объектом. Ни число, ни объект не являются строкой, поэтому они приводятся к строке. Всякий раз, когда мы приводим обычный объект, он становится `"[Object object]"`. `"[Object object]"`, объединенный с `"2"`, становится `"[Object object]2"`.
3303
+
`{name: "Lydia"}` является объектом. Ни число, ни объект не являются строкой, поэтому они приводятся к строке. Всякий раз, когда мы приводим обычный объект, он становится `"[object Object]"`. `"[object Object]"`, объединенный с `"2"`, становится `"[object Object]2"`.
3304
3304
3305
3305
</p>
3306
3306
</details>
@@ -3750,4 +3750,4 @@ console.log(person)
3750
3750
Затем мы вызываем функцию `changeAgeAndName`, однако мы не передаем параметр. Вместо этого значение `x` равно новому объекту: `{ ... person }`. Поскольку это новый объект, он не влияет на значения свойств объекта `person`. `person` по-прежнему равен `{name: "Lydia", age: 22}`.
0 commit comments