Skip to content

Commit 7a15d82

Browse files
committed
Merge remote-tracking branch 'origin/new' into new
2 parents 1c036f4 + 351f221 commit 7a15d82

File tree

15 files changed

+1483
-71
lines changed

15 files changed

+1483
-71
lines changed

README.md

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

888888
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`.
889889

890-
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`.
890+
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`.
891891

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

894894
</p>
895895
</details>
@@ -1011,11 +1011,11 @@ If we click `p`, we see two logs: `p` and `div`. During event propagation, there
10111011
const person = { name: "Lydia" };
10121012

10131013
function sayHi(age) {
1014-
console.log(`${this.name} is ${age}`);
1014+
return `${this.name} is ${age}`;
10151015
}
10161016

1017-
sayHi.call(person, 21);
1018-
sayHi.bind(person, 21);
1017+
console.log(sayHi.call(person, 21));
1018+
console.log(sayHi.bind(person, 21));
10191019
```
10201020

10211021
- A: `undefined is 21` `Lydia is 21`
@@ -3294,8 +3294,8 @@ for (let item of set) {
32943294

32953295
- A: `3`, `NaN`, `NaN`
32963296
- B: `3`, `7`, `NaN`
3297-
- C: `3`, `Lydia2`, `[Object object]2`
3298-
- D: `"12"`, `Lydia2`, `[Object object]2`
3297+
- C: `3`, `Lydia2`, `[object Object]2`
3298+
- D: `"12"`, `Lydia2`, `[object Object]2`
32993299

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

33093309
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"`.
33103310

3311-
`{ 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"`.
3311+
`{ 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"`.
33123312

33133313
</p>
33143314
</details>
@@ -4081,7 +4081,7 @@ console.log(spookyItems);
40814081
- A: `["👻", "🎃", "🕸"]`
40824082
- B: `["👻", "🎃", "🕸", "💀"]`
40834083
- C: `["👻", "🎃", "🕸", { item: "💀" }]`
4084-
- D: `["👻", "🎃", "🕸", "[Object object]"]`
4084+
- D: `["👻", "🎃", "🕸", "[object Object]"]`
40854085
40864086
<details><summary><b>Answer</b></summary>
40874087
<p>

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: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -887,9 +887,9 @@ console.log(a[b]);
887887

888888
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`.
889889

890-
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`.
890+
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`.
891891

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

894894
</p>
895895
</details>
@@ -1011,11 +1011,11 @@ If we click `p`, we see two logs: `p` and `div`. During event propagation, there
10111011
const person = { name: "Lydia" };
10121012

10131013
function sayHi(age) {
1014-
console.log(`${this.name} is ${age}`);
1014+
return `${this.name} is ${age}`;
10151015
}
10161016

1017-
sayHi.call(person, 21);
1018-
sayHi.bind(person, 21);
1017+
console.log(sayHi.call(person, 21));
1018+
console.log(sayHi.bind(person, 21));
10191019
```
10201020

10211021
- A: `undefined is 21` `Lydia is 21`
@@ -3294,8 +3294,8 @@ for (let item of set) {
32943294

32953295
- A: `3`, `NaN`, `NaN`
32963296
- B: `3`, `7`, `NaN`
3297-
- C: `3`, `Lydia2`, `[Object object]2`
3298-
- D: `"12"`, `Lydia2`, `[Object object]2`
3297+
- C: `3`, `Lydia2`, `[object Object]2`
3298+
- D: `"12"`, `Lydia2`, `[object Object]2`
32993299

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

33093309
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"`.
33103310

3311-
`{ 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"`.
3311+
`{ 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"`.
33123312

33133313
</p>
33143314
</details>
@@ -4081,7 +4081,7 @@ console.log(spookyItems);
40814081
- A: `["👻", "🎃", "🕸"]`
40824082
- B: `["👻", "🎃", "🕸", "💀"]`
40834083
- C: `["👻", "🎃", "🕸", { item: "💀" }]`
4084-
- D: `["👻", "🎃", "🕸", "[Object object]"]`
4084+
- D: `["👻", "🎃", "🕸", "[object Object]"]`
40854085
40864086
<details><summary><b>Answer</b></summary>
40874087
<p>

0 commit comments

Comments
 (0)