JavaScript-Referenz
Dieses Kapitel des JavaScript-Teils auf MDN dient als JavaScript-Sprachreferenz. Mehr über diese Referenz .
Dieses Kapitel dokumentiert alle JavaScript-Standardobjekte , zusammen mit ihren Methoden und Eigenschaften.
{{page('/de/docs/Web/JavaScript/Reference/Global_Objects', 'Standardobjekte (kategorisiert)')}}
Dieses Kapitel dokumentiert alle JavaScript-Anweisungen und -Deklarationen .
Für eine alphabetische Auflistung, siehe Sidebar auf der linken Seite.
Kontrollfluss
Block
Anweisungsblöcke werden genutzt um ein oder mehrere Anweisungen zu gruppieren. Der Block wird von geschweiften Klammern umfasst.
break
Beendet die aktuelle Schleifen-, Switch-, oder mit Label versehene Anweisung und das Programm wird hinter dieser fortgesetzt.
continue
Beendet den Durchlauf der aktuellen, bzw. der mittels Label angesprochenen Schleife und fährt mit dem nächsten Schleifendurchlauf fort.
Empty
Man verwendet empty anstatt einer echten Anweisung, um keine Anweisung zu geben, an stellen an denen nach JavaScript-Syntax eine erwartet wird.
if...else
Führt eine Anweisung aus wenn eine zuvor festgelegte Bedingung erfüllt (als true gewertet) wird. Ist die Bedingung false, kann eine andere Anweisung ausgeführt werden.
switch
Nach Auswertung eines Ausdrucks, wird anhand des Ergebnisses eine Fallunterscheidung durchgeführt und die entsprechende durch ein case-Label markierte Anweisung ausgeführt.
throw
Leitet das Auswerfen eines Fehlerausdrucks ein.
try...catch
Ein Anweisungsblock wird "ausprobiert" (try) und ein eventuell auftretender Fehler abgefangen (catch) und gegebenenfalls behandelt.
Deklarationen
var
Deklariert eine Variable und initialisiert sie optional mit einem Wert.
JavaScript-Referenz - JavaScript | MDNThis is an experimental API that should not be used in production code.This is an experimental API that should not be used in production code.This is an experimental API that should not be used in production code.This deprecated API should no longer be used, but will probably still work.This API has not been standardized.This is an experimental API that should not be used in production code.This is an experimental API that should not be used in production code.This is an experimental API that should not be used in production code.This deprecated API should no longer be used, but will probably still work.This deprecated API should no longer be used, but will probably still work.This deprecated API should no longer be used, but will probably still work.This API has not been standardized.Dies ist eine veraltete API und es wird nicht mehr garantiert, dass sie funktioniert.This is an experimental API that should not be used in production code.This deprecated API should no longer be used, but will probably still work. - web.archive.org
let
Deklariert eine Blocklokale variable und initialisiert sie optional mit einem Wert.
JavaScript-Referenz - JavaScript | MDNThis is an experimental API that should not be used in production code.This is an experimental API that should not be used in production code.This is an experimental API that should not be used in production code.This deprecated API should no longer be used, but will probably still work.This API has not been standardized.This is an experimental API that should not be used in production code.This is an experimental API that should not be used in production code.This is an experimental API that should not be used in production code.This deprecated API should no longer be used, but will probably still work.This deprecated API should no longer be used, but will probably still work.This deprecated API should no longer be used, but will probably still work.This API has not been standardized.Dies ist eine veraltete API und es wird nicht mehr garantiert, dass sie funktioniert.This is an experimental API that should not be used in production code.This deprecated API should no longer be used, but will probably still work. - web.archive.org
const
Deklariert eine Konstante auf welche nur lesend zugegriffen werden kann.
Funktionen und Klassen
function
Deklariert eine Funktion mit festgelegten Parametern.
JavaScript-Referenz - JavaScript | MDNThis is an experimental API that should not be used in production code.This is an experimental API that should not be used in production code.This is an experimental API that should not be used in production code.This deprecated API should no longer be used, but will probably still work.This API has not been standardized.This is an experimental API that should not be used in production code.This is an experimental API that should not be used in production code.This is an experimental API that should not be used in production code.This deprecated API should no longer be used, but will probably still work.This deprecated API should no longer be used, but will probably still work.This deprecated API should no longer be used, but will probably still work.This API has not been standardized.Dies ist eine veraltete API und es wird nicht mehr garantiert, dass sie funktioniert.This is an experimental API that should not be used in production code.This deprecated API should no longer be used, but will probably still work. - web.archive.org
function*
Erzeugt Funktionen mit denen Schleifen leichter zu schreiben sind.
async function
Deklariert eine asynchrone Funktion mit festgelegten Parametern.
return
Legt den Rückgabewert einer Funktion fest.
class
Deklariert eine Klasse.
Schleifen
do...while
Eine Schleife die solange ausgeführt wird bis die Bedingung false ist. Die Bedingung wird erst am Ende eines Durchgangs überprüft.
for
Erstellt eine von drei unerforderlichen, zwischen Parenthesen geklammerten, durch Semikola getrennten Ausdrücken geregelte Schleife, gefolgt von einem Anweisungsblock innerhalb der Schleife.
JavaScript-Referenz - JavaScript | MDNThis is an experimental API that should not be used in production code.This is an experimental API that should not be used in production code.This is an experimental API that should not be used in production code.This deprecated API should no longer be used, but will probably still work.This API has not been standardized.This is an experimental API that should not be used in production code.This is an experimental API that should not be used in production code.This is an experimental API that should not be used in production code.This deprecated API should no longer be used, but will probably still work.This deprecated API should no longer be used, but will probably still work.This deprecated API should no longer be used, but will probably still work.This API has not been standardized.Dies ist eine veraltete API und es wird nicht mehr garantiert, dass sie funktioniert.This is an experimental API that should not be used in production code.This deprecated API should no longer be used, but will probably still work. - web.archive.org
JavaScript-Referenz - JavaScript | MDNThis is an experimental API that should not be used in production code.This is an experimental API that should not be used in production code.This is an experimental API that should not be used in production code.This deprecated API should no longer be used, but will probably still work.This API has not been standardized.This is an experimental API that should not be used in production code.This is an experimental API that should not be used in production code.This is an experimental API that should not be used in production code.This deprecated API should no longer be used, but will probably still work.This deprecated API should no longer be used, but will probably still work.This deprecated API should no longer be used, but will probably still work.This API has not been standardized.Dies ist eine veraltete API und es wird nicht mehr garantiert, dass sie funktioniert.This is an experimental API that should not be used in production code.This deprecated API should no longer be used, but will probably still work. - web.archive.org
for_each...in
Iterates a specified variable over all values of object's properties. For each distinct property, a specified statement is executed.
for...in
Stellt die aufzählbaren Eigenschaften eines Objektes in einer unbestimmten Reihenfolge zur Verfügung. Jede Eigenschaft kann durch Anweisungen in der Schleife ausgewertet werden.
JavaScript-Referenz - JavaScript | MDNThis is an experimental API that should not be used in production code.This is an experimental API that should not be used in production code.This is an experimental API that should not be used in production code.This deprecated API should no longer be used, but will probably still work.This API has not been standardized.This is an experimental API that should not be used in production code.This is an experimental API that should not be used in production code.This is an experimental API that should not be used in production code.This deprecated API should no longer be used, but will probably still work.This deprecated API should no longer be used, but will probably still work.This deprecated API should no longer be used, but will probably still work.This API has not been standardized.Dies ist eine veraltete API und es wird nicht mehr garantiert, dass sie funktioniert.This is an experimental API that should not be used in production code.This deprecated API should no longer be used, but will probably still work. - web.archive.org
for...of
Durchläuft die Werte eines iterationsfähigen Objektes, wie zum Beispiel eines arrays , eines Array-ähnlichen Objektes, oder eines Iterators oder Generators . Für jeden Wert des Objektes können Anweisungen ausgewertet werden.
while
Erstellt eine Schleife, die solange durchlaufen wird, wie die Schleifenbedingung wahr ist. Die Schleifenbedingung wird am Anfang der Schleife (vor dem ersten Durchlauf des inneren Befehlsblocks) ausgewertet.
Weiteres
debugger
Ruft irgendwelches verfügbare Fehlerentdeckungsvermögen auf. Steht keines zur Verfügung, hat dieser Befehl keine Wirkung.
JavaScript-Referenz - JavaScript | MDNThis is an experimental API that should not be used in production code.This is an experimental API that should not be used in production code.This is an experimental API that should not be used in production code.This deprecated API should no longer be used, but will probably still work.This API has not been standardized.This is an experimental API that should not be used in production code.This is an experimental API that should not be used in production code.This is an experimental API that should not be used in production code.This deprecated API should no longer be used, but will probably still work.This deprecated API should no longer be used, but will probably still work.This deprecated API should no longer be used, but will probably still work.This API has not been standardized.Dies ist eine veraltete API und es wird nicht mehr garantiert, dass sie funktioniert.This is an experimental API that should not be used in production code.This deprecated API should no longer be used, but will probably still work. - web.archive.org
export
Stellt eine Funktion zur Anwendung in anderen Modulen bereit. Dieser Ausdruck wird in dem Quellenmodul verwendet. Steht in Zusammenhang mit import auf der anderen Seite des Wechsels.
JavaScript-Referenz - JavaScript | MDNThis is an experimental API that should not be used in production code.This is an experimental API that should not be used in production code.This is an experimental API that should not be used in production code.This deprecated API should no longer be used, but will probably still work.This API has not been standardized.This is an experimental API that should not be used in production code.This is an experimental API that should not be used in production code.This is an experimental API that should not be used in production code.This deprecated API should no longer be used, but will probably still work.This deprecated API should no longer be used, but will probably still work.This deprecated API should no longer be used, but will probably still work.This API has not been standardized.Dies ist eine veraltete API und es wird nicht mehr garantiert, dass sie funktioniert.This is an experimental API that should not be used in production code.This deprecated API should no longer be used, but will probably still work. - web.archive.org
import
Importiert eine aus einem anderen Modul stammende Funktion, oder den gesamten Modul. Dieser Ausdruck wird in dem Entleihermodul verwendet, und arbeitet in Zusammenhang mit export .
label
Hängt ein Etikett an eine Anweisung an. Auf dieses Etikett können break (aussteigen) oder continue (fortsetzen) hinweisen, um den Kontrollfluss mit einer größeren Genauigkeit zu steuern.
JavaScript-Referenz - JavaScript | MDNThis is an experimental API that should not be used in production code.This is an experimental API that should not be used in production code.This is an experimental API that should not be used in production code.This deprecated API should no longer be used, but will probably still work.This API has not been standardized.This is an experimental API that should not be used in production code.This is an experimental API that should not be used in production code.This is an experimental API that should not be used in production code.This deprecated API should no longer be used, but will probably still work.This deprecated API should no longer be used, but will probably still work.This deprecated API should no longer be used, but will probably still work.This API has not been standardized.Dies ist eine veraltete API und es wird nicht mehr garantiert, dass sie funktioniert.This is an experimental API that should not be used in production code.This deprecated API should no longer be used, but will probably still work. - web.archive.org
with (en-US)
Extends the scope chain for a statement.