GeezerVison is showing github.com — JavaScript specials by AlexanderK22 · Pull Request #52 · javascript-tutorial/de.javascript.info
Conversation
Translated JavaScript specials into German.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This is the first translation into German. Further changes may follow.
Correction of the initial translation
Last section had a spelling error that was fixed.
Uh oh!
There was an error while loading. Please reload this page.
|
|
Die Meisten Codestil-Leitfäden stimmen darin überein, dass wir ein Semikolon nach jeder Anweisung setzen sollten.
|
|
|
|
|
|
Semicolons are not required after code blocks `{...}` and syntax constructs with them like loops:
|
|
|
Semikolons sind nicht erforderlich nach Codeblöcken `{...}` und Syntaxgebilde mit ihnen wie Schleifen:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Semikolons sind nicht erforderlich nach Codeblöcken `{...}` und Syntaxgebilde mit ihnen wie Schleifen: |
|
Semikolons sind nach Codeblöcken und Syntaxkonstrukten mit geschweiften Klammern `{...}`, wie z.B. Schleifen, nicht erforderlich: |
Das werden wir ein bisschen umstellen müssen sonst ist es wirklich sehr lesbar.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
```
|
|
|
|
|
|
...But even if we can put an "extra" semicolon somewhere, that's not an error. It will be ignored.
|
|
|
...Aber selbst wenn wir ein "extra" Semikolon irgendwo setzen können, ist das kein Fehler. Es wird ignoriert.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
...Aber selbst wenn wir ein "extra" Semikolon irgendwo setzen können, ist das kein Fehler. Es wird ignoriert. |
|
...Aber selbst wenn wir irgendwo ein "zusätzliches" Semikolon setzen, ist das kein Fehler. Es wird ignoriert. |
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
## Strikter Modus
|
|
|
|
|
|
To fully enable all features of modern JavaScript, we should start scripts with `"use strict"`.
|
|
|
Um alle Features des modernen JavaScript zu ermöglichen, sollten wir ein ein Skript mit `"use strict"` beginnen.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Um alle Features des modernen JavaScript zu ermöglichen, sollten wir ein ein Skript mit `"use strict"` beginnen. |
|
Um alle Funktionen des modernen JavaScripts zu ermöglichen, sollten wir Skripte mit `"use strict"` beginnen. |
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
Die Direktive muss am Anfang eines Skripts oder am Anfang eines Funktionsrumpfes stehen.
|
|
|
|
|
|
Without `"use strict"`, everything still works, but some features behave in the old-fashion, "compatible" way. We'd generally prefer the modern behavior.
|
|
|
Ohne `"use strict"`, funktioniert alles weiterhin, aber einige Features verhalten sich nach dem altmodischen, "kompatiblen" Weg. Wir würden im allgemeinen das moderne Verhalten bevorzugen.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Ohne `"use strict"`, funktioniert alles weiterhin, aber einige Features verhalten sich nach dem altmodischen, "kompatiblen" Weg. Wir würden im allgemeinen das moderne Verhalten bevorzugen. |
|
Ohne `"use strict"` funktioniert alles weiterhin, aber einige Funktionen verhalten sich in der alten, "kompatiblen" Weise. Wir würden im Allgemeinen das moderne Verhalten bevorzugen. |
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
- The variable declared in `for(let...)` loop is visible only inside the loop. But we can also omit `let` and reuse an existing variable.
|
|
|
- Directives `break/continue` allow to exit the whole loop/current iteration. Use labels to break nested loops.
|
|
|
- Die Variable die in der `for(let...)`-Schleife deklariert wurde, ist nur in der Schleife sichtbar. Aber wir können `let` auch weglassen und eine vorhandene Variable wiederverwenden.
|
|
|
- Direktiven `break/continue` ermöglichen es die ganze Schleife/aktuelle Iteration zu verlassen. Benutze Labels um verschachtelte Schleifen abzubrechen.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
- Direktiven `break/continue` ermöglichen es die ganze Schleife/aktuelle Iteration zu verlassen. Benutze Labels um verschachtelte Schleifen abzubrechen. |
|
- Direktiven `break/continue` ermöglichen es die ganze Schleife/aktuelle Iteration zu verlassen. Benutze Labels, um verschachtelte Schleifen abzubrechen. |
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
Details in: <info:while-for>.
|
|
|
|
|
|
Later we'll study more types of loops to deal with objects.
|
|
|
Später lernen wir weitere Typen von Schleifen kennen, um Objekte zu behandeln.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Später lernen wir weitere Typen von Schleifen kennen, um Objekte zu behandeln. |
|
Später werden wir weitere Arten von Schleifen untersuchen, um mit Objekten zu arbeiten. |
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
## Funktionen
|
|
|
|
|
|
We covered three ways to create a function in JavaScript:
|
|
|
Wir haben drei Wege behandelt um Funktionen in JavaScript anzulegen:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Wir haben drei Wege behandelt um Funktionen in JavaScript anzulegen: |
|
Wir betrachteten drei Möglichkeiten zum Erstellen einer Funktion in JavaScript: |
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
- Functions may have local variables: those declared inside its body. Such variables are only visible inside the function.
|
|
|
- Parameters can have default values: `function sum(a = 1, b = 2) {...}`.
|
|
|
- Functions always return something. If there's no `return` statement, then the result is `undefined`.
|
|
|
- Funktionen können lokale Variablen haben: die innerhalb des Rumpfes deklariert wurden. Solche Variablen sind nur innerhalb der Funktion sichtbar.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
- Funktionen können lokale Variablen haben: die innerhalb des Rumpfes deklariert wurden. Solche Variablen sind nur innerhalb der Funktion sichtbar. |
|
- Funktionen können lokale Variablen haben: diejenigen, die innerhalb ihres Körpers deklariert sind. Solche Variablen sind nur innerhalb der Funktion sichtbar. |
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
## Da kommt noch mehr
|
|
|
|
|
|
That was a brief list of JavaScript features. As of now we've studied only basics. Further in the tutorial you'll find more specials and advanced features of JavaScript.
|
|
|
Das war eine kurze Liste von JavaScript-Features. Ab hier haben wir nur die Grundlagen gelernt. Weiter im Tutorial wirst du mehr Besonderheiten und fortgeschrittene Features von JavaScript finden.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Das war eine kurze Liste von JavaScript-Features. Ab hier haben wir nur die Grundlagen gelernt. Weiter im Tutorial wirst du mehr Besonderheiten und fortgeschrittene Features von JavaScript finden. |
|
Das war eine kurze Zusammenfassung von JavaScript-Funktionen. Bis jetzt haben wir nur die Grundlagen kennengelernt. Im weiteren Verlauf des Tutorials findest du weitere Besonderheiten und fortgeschrittene Funktionen von JavaScript. |
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Please make the requested changes. After it, add a comment "/done".
Then I'll ask for a new review 👻
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
CLAassistant
commented
Jun 8, 2022
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution. 2 out of 3 committers have signed the CLA.
✅ AlexanderK22 ✅ engag1ng ❌ alexander-kuehn-klg You have signed the CLA already but the status is still pending? Let us recheck it.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
J-Cake
commented
Nov 25, 2023
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
Hey wie sieht's hier aus? Bei erledigten Dingen, bitte abgeschlossen markieren
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|