Skip to content

Commit 8e945a0

Browse files
translation(de): 07-operators
1 parent 7b2b4af commit 8e945a0

File tree

7 files changed

+167
-167
lines changed

7 files changed

+167
-167
lines changed

1-js/02-first-steps/07-operators/1-increment-order/solution.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ The answer is:
99
```js run no-beautify
1010
let a = 1, b = 1;
1111

12-
alert( ++a ); // 2, prefix form returns the new value
13-
alert( b++ ); // 1, postfix form returns the old value
12+
alert( ++a ); // 2, Präfix-Form gibt den neuen Wert zurück
13+
alert( b++ ); // 1, Postfix-Form gibt den alten Wert zurück
1414

15-
alert( a ); // 2, incremented once
16-
alert( b ); // 2, incremented once
15+
alert( a ); // 2, einmal erhöht
16+
alert( b ); // 2, einmal erhöht
1717
```
1818

1-js/02-first-steps/07-operators/1-increment-order/task.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ importance: 5
22

33
---
44

5-
# The postfix and prefix forms
5+
# Die Postfix- und Präfix-Form
66

7-
What are the final values of all variables `a`, `b`, `c` and `d` after the code below?
7+
Was sind die Endwerte aller Variablen `a`, `b`, `c` und `d` nach dem folgenden Code?
88

99
```js
1010
let a = 1, b = 1;
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
The answer is:
1+
Die Antwort ist:
22

3-
- `a = 4` (multiplied by 2)
4-
- `x = 5` (calculated as 1 + 4)
3+
- `a = 4` (multipliziert mit 2)
4+
- `x = 5` (berechnet als 1 + 4)
55

1-js/02-first-steps/07-operators/2-assignment-result/task.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ importance: 3
22

33
---
44

5-
# Assignment result
5+
# Zuweisungsergebnis
66

7-
What are the values of `a` and `x` after the code below?
7+
Was sind die Werte von `a` und `x` nach dem folgenden Code?
88

99
```js
1010
let a = 2;

1-js/02-first-steps/07-operators/3-primitive-conversions-questions/solution.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ undefined + 1 = NaN // (6)
1717
" \t \n" - 2 = -2 // (7)
1818
```
1919

20-
1. The addition with a string `"" + 1` converts `1` to a string: `"" + 1 = "1"`, and then we have `"1" + 0`, the same rule is applied.
21-
2. The subtraction `-` (like most math operations) only works with numbers, it converts an empty string `""` to `0`.
22-
3. The addition with a string appends the number `5` to the string.
23-
4. The subtraction always converts to numbers, so it makes `" -9 "` a number `-9` (ignoring spaces around it).
24-
5. `null` becomes `0` after the numeric conversion.
25-
6. `undefined` becomes `NaN` after the numeric conversion.
26-
7. Space characters, are trimmed off string start and end when a string is converted to a number. Here the whole string consists of space characters, such as `\t`, `\n` and a "regular" space between them. So, similarly to an empty string, it becomes `0`.
20+
1. Die Addition mit einem String `"" + 1` konvertiert `1` in einen String: `"" + 1 = "1"`, und dann haben wir `"1" + 0`, die gleiche Regel wird angewendet.
21+
2. Die Subtraktion `-` funktioniert (wie die meisten mathematischen Operationen) nur mit Zahlen. Sie konvertiert eine leere Zeichenfolge `""` in `0`.
22+
3. Die Addition mit einem String fügt dem String die Zahl `5` hinzu.
23+
4. Die Subtraktion wird immer in Zahlen umgewandelt, so dass `" -9 "` eine Zahl `-9` wird (Leerzeichen werden ignoriert).
24+
5. `null` wird nach der numerischen Umwandlung zu `0`.
25+
6. `undefined` wird nach der numerischen Umwandlung zu `NaN`.
26+
7. Leerzeichen werden am Anfang und Ende eines Strings abgeschnitten, wenn ein String in eine Zahl umgewandelt wird. Hier besteht der gesamte String aus Leerzeichen wie `\t`, `\n` und einem "regulären" Leerzeichen dazwischen. Ähnlich wie bei einem leeren String wird sie zu `0`.

1-js/02-first-steps/07-operators/3-primitive-conversions-questions/task.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ importance: 5
22

33
---
44

5-
# Type conversions
5+
# Typumwandlungen
66

7-
What are results of these expressions?
7+
Was sind die Ergebnisse dieser Ausdrücke?
88

99
```js no-beautify
1010
"" + 1 + 0
@@ -24,4 +24,4 @@ undefined + 1
2424
" \t \n" - 2
2525
```
2626

27-
Think well, write down and then compare with the answer.
27+
Überlege gut, schreibe es auf und vergleichen es mit der Antwort.

0 commit comments

Comments
 (0)