", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Diese Syntax lädt die externe JavaScript-Datei." } }, { "@type": "Answer", "position": 1, "text": "
", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Diese Syntax wird verwendet, um Stylesheets einzubinden." } }, { "@type": "Answer", "position": 2, "text": "", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Diese Syntax wird verwendet, um Stylesheets einzubinden." } }, { "@type": "Answer", "position": 3, "text": "
", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Diese Syntax wird verwendet, um Hyperlinks zu erstellen." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Deklaration", "text": "Welcher Unterschied besteht zwischen den Schlüsselwörtern 'let' und 'const' bei der Variablendeklaration?", "encodingFormat": "text/html", "assesses": "Deklaration", "acceptedAnswer": [ { "@type": "Answer", "position": 1, "text": "'const' deklariert unveränderliche Variablen, während 'let' veränderliche Variablen deklariert.", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "'let' deklariert unveränderliche Variablen, während 'const' veränderliche Variablen deklariert.", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "'let' deklariert veränderliche Variablen, während 'const' unveränderliche Variablen deklariert." } }, { "@type": "Answer", "position": 1, "text": "'const' deklariert unveränderliche Variablen, während 'let' veränderliche Variablen deklariert.", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Genau, 'const' deklariert unveränderliche Variablen, die nicht neu zugewiesen werden können." } }, { "@type": "Answer", "position": 2, "text": "'let' und 'const' deklarieren beide unveränderliche Variablen.", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "'let' deklariert veränderliche Variablen, während 'const' unveränderliche Variablen deklariert." } }, { "@type": "Answer", "position": 3, "text": "'let' und 'const' deklarieren beide veränderliche Variablen.", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "'let' deklariert veränderliche Variablen, während 'const' unveränderliche Variablen deklariert." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Funktionen", "text": "Welche der folgenden Optionen ist KEINE gültige Funktion in JavaScript?", "encodingFormat": "text/html", "assesses": "Funktionen", "acceptedAnswer": [ { "@type": "Answer", "position": 3, "text": "Math.PI", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "Math.pow()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Math.pow() ist eine gültige Funktion zur Berechnung von Potenzen." } }, { "@type": "Answer", "position": 1, "text": "console.log()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "console.log() ist eine gültige Funktion zur Ausgabe von Nachrichten in der Konsole." } }, { "@type": "Answer", "position": 2, "text": "document.getElementById()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "document.getElementById() ist eine gültige Funktion zum Abrufen von Elementen aus dem DOM." } }, { "@type": "Answer", "position": 3, "text": "Math.PI", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Math.PI ist eine Konstante, keine Funktion." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "DOM", "text": "Was ist der Zweck der Methode 'getElementById()' im JavaScript-DOM?", "encodingFormat": "text/html", "assesses": "DOM", "acceptedAnswer": [ { "@type": "Answer", "position": 0, "text": "Gibt das Element mit der angegebenen ID zurück.", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "Gibt das Element mit der angegebenen ID zurück.", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Genau, getElementById() gibt das Element mit der angegebenen ID zurück." } }, { "@type": "Answer", "position": 1, "text": "Erstellt ein neues Element mit der angegebenen ID.", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "createElement() wird verwendet, um ein neues Element zu erstellen." } }, { "@type": "Answer", "position": 2, "text": "Entfernt das Element mit der angegebenen ID.", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "removeChild() wird verwendet, um ein Element zu entfernen." } }, { "@type": "Answer", "position": 3, "text": "Ändert die ID des angegebenen Elements.", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "setAttribute() wird verwendet, um Attribute zu ändern." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Klassen", "text": "Welches Schlüsselwort wird verwendet, um eine Klasse in JavaScript zu definieren?", "encodingFormat": "text/html", "assesses": "Klassen", "acceptedAnswer": [ { "@type": "Answer", "position": 0, "text": "class", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "class", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Genau, 'class' wird verwendet, um eine Klasse in JavaScript zu definieren." } }, { "@type": "Answer", "position": 1, "text": "object", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Objekte werden verwendet, um Daten zu speichern, nicht um Klassen zu definieren." } }, { "@type": "Answer", "position": 2, "text": "function", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Funktionen werden verwendet, um Code auszuführen, nicht um Klassen zu definieren." } }, { "@type": "Answer", "position": 3, "text": "constructor", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Konstruktoren werden verwendet, um Objekte zu initialisieren, nicht um Klassen zu definieren." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Verkettung", "text": "Was ist das Ergebnis des folgenden JavaScript-Ausdrucks: '5' + '3'?", "encodingFormat": "text/html", "assesses": "Verkettung", "acceptedAnswer": [ { "@type": "Answer", "position": 2, "text": "'53'", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "53", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "JavaScript behandelt beide Operanden als Zeichenfolgen und verkettet sie." } }, { "@type": "Answer", "position": 1, "text": "8", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "JavaScript behandelt beide Operanden als Zeichenfolgen und verkettet sie." } }, { "@type": "Answer", "position": 2, "text": "'53'", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "JavaScript behandelt beide Operanden als Zeichenfolgen und verkettet sie." } }, { "@type": "Answer", "position": 3, "text": "Fehler", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Dieser Ausdruck führt nicht zu einem Fehler." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Definition", "text": "Welche Aussage beschreibt eine Variable in JavaScript am präzisesten?", "encodingFormat": "text/html", "assesses": "Definition", "acceptedAnswer": [ { "@type": "Answer", "position": 0, "text": "Ein benannter Speicherbereich zum Speichern von Werten", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "Ein benannter Speicherbereich zum Speichern von Werten", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Variablen speichern Werte und können später referenziert werden." } }, { "@type": "Answer", "position": 1, "text": "Eine Funktion, die Werte zurückgibt", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Funktionen führen Aktionen aus und können Werte zurückgeben, sind aber keine Variablen." } }, { "@type": "Answer", "position": 2, "text": "Ein Objekt mit Eigenschaften und Methoden", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Objekte sind komplexe Datentypen, während Variablen einfache Werte speichern." } }, { "@type": "Answer", "position": 3, "text": "Eine Anweisung, die Aktionen ausführt", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Anweisungen führen Aktionen aus, während Variablen Werte speichern." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Ganzzahlen", "text": "Welcher Datentyp dient zum Speichern ganzer Zahlen in JavaScript?", "encodingFormat": "text/html", "assesses": "Ganzzahlen", "acceptedAnswer": [ { "@type": "Answer", "position": 1, "text": "Number", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "String", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Strings speichern Text, keine ganzen Zahlen." } }, { "@type": "Answer", "position": 1, "text": "Number", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Number ist der Datentyp für ganze Zahlen und Gleitkommazahlen." } }, { "@type": "Answer", "position": 2, "text": "Boolean", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Booleans speichern Wahrheitswerte, keine ganzen Zahlen." } }, { "@type": "Answer", "position": 3, "text": "Object", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Objekte sind komplexe Datentypen, keine einfachen Datentypen wie ganze Zahlen." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Bedingte Ausführung", "text": "Welche Kontrollstruktur führt einen Codeblock nur aus, wenn eine bestimmte Bedingung zutrifft?", "encodingFormat": "text/html", "assesses": "Bedingte Ausführung", "acceptedAnswer": [ { "@type": "Answer", "position": 2, "text": "if", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "for", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die for-Schleife wird verwendet, um Codeblöcke wiederholt auszuführen." } }, { "@type": "Answer", "position": 1, "text": "while", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die while-Schleife wird verwendet, um Codeblöcke wiederholt auszuführen, solange eine Bedingung erfüllt ist." } }, { "@type": "Answer", "position": 2, "text": "if", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die if-Anweisung führt einen Codeblock nur aus, wenn eine Bedingung erfüllt ist." } }, { "@type": "Answer", "position": 3, "text": "switch", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die switch-Anweisung wird verwendet, um Codeblöcke basierend auf dem Wert einer Variablen auszuführen." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Syntax", "text": "Welches Schlüsselwort wird in JavaScript verwendet, um eine Konstante zu deklarieren?", "encodingFormat": "text/html", "assesses": "Syntax", "acceptedAnswer": [ { "@type": "Answer", "position": 2, "text": "const", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "var", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "'var' wird verwendet, um Variablen zu deklarieren, nicht Konstanten." } }, { "@type": "Answer", "position": 1, "text": "let", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "'let' wird verwendet, um Variablen mit begrenztem Gültigkeitsbereich zu deklarieren, nicht Konstanten." } }, { "@type": "Answer", "position": 2, "text": "const", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Das Schlüsselwort 'const' wird verwendet, um Konstanten in JavaScript zu deklarieren." } }, { "@type": "Answer", "position": 3, "text": "final", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Das Schlüsselwort 'final' wird in JavaScript nicht verwendet, um Konstanten zu deklarieren." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Syntax", "text": "Welche Methode ruft eine Eigenschaft eines Objekts in JavaScript ab?", "encodingFormat": "text/html", "assesses": "Syntax", "acceptedAnswer": [ { "@type": "Answer", "position": 1, "text": "get()", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "getProperty()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Diese Methode existiert in JavaScript nicht." } }, { "@type": "Answer", "position": 1, "text": "get()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die Methode 'get()' wird verwendet, um eine Eigenschaft eines Objekts abzurufen." } }, { "@type": "Answer", "position": 2, "text": "getValue()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Diese Methode existiert in JavaScript nicht." } }, { "@type": "Answer", "position": 3, "text": "getAttribute()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Diese Methode wird verwendet, um Attribute von HTML-Elementen abzurufen, nicht von JavaScript-Objekten." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Asynchrone Operationen", "text": "Welche Anweisung initiiert eine asynchrone Operation in JavaScript?", "encodingFormat": "text/html", "assesses": "Asynchrone Operationen", "acceptedAnswer": [ { "@type": "Answer", "position": 0, "text": "setTimeout()", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "setTimeout()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "setTimeout() startet eine asynchrone Operation, die nach einer bestimmten Zeitspanne ausgeführt wird." } }, { "@type": "Answer", "position": 1, "text": "setInterval()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "setInterval() startet eine asynchrone Operation, die in regelmäßigen Abständen ausgeführt wird." } }, { "@type": "Answer", "position": 2, "text": "wait()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "JavaScript verfügt nicht über eine wait()-Funktion." } }, { "@type": "Answer", "position": 3, "text": "delay()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "JavaScript verfügt nicht über eine delay()-Funktion." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Benutzerinteraktion", "text": "Welches Ereignis wird ausgelöst, wenn ein Benutzer in einer HTML-Seite auf eine Schaltfläche klickt?", "encodingFormat": "text/html", "assesses": "Benutzerinteraktion", "acceptedAnswer": [ { "@type": "Answer", "position": 0, "text": "onclick", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "onclick", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Das onclick-Ereignis wird ausgelöst, wenn ein Benutzer auf ein HTML-Element klickt." } }, { "@type": "Answer", "position": 1, "text": "onload", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Das onload-Ereignis wird ausgelöst, wenn eine Seite vollständig geladen ist." } }, { "@type": "Answer", "position": 2, "text": "onhover", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Das onhover-Ereignis wird ausgelöst, wenn ein Benutzer mit der Maus über ein HTML-Element fährt." } }, { "@type": "Answer", "position": 3, "text": "onchange", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Das onchange-Ereignis wird ausgelöst, wenn der Wert eines HTML-Formularfelds geändert wird." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Netzwerkkommunikation", "text": "Welche Methode sendet eine HTTP-Anfrage in JavaScript?", "encodingFormat": "text/html", "assesses": "Netzwerkkommunikation", "acceptedAnswer": [ { "@type": "Answer", "position": 0, "text": "fetch()", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "fetch()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die fetch()-Methode sendet eine HTTP-Anfrage an einen Server." } }, { "@type": "Answer", "position": 1, "text": "request()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "JavaScript verfügt nicht über eine request()-Methode." } }, { "@type": "Answer", "position": 2, "text": "get()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die get()-Methode ist eine Methode des fetch()-Objekts, nicht eine eigenständige Methode." } }, { "@type": "Answer", "position": 3, "text": "post()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die post()-Methode ist eine Methode des fetch()-Objekts, nicht eine eigenständige Methode." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Grundlegendes Verständnis", "text": "Welcher Datentyp wird in JavaScript zum Speichern von Textzeichenfolgen verwendet?", "encodingFormat": "text/html", "assesses": "Grundlegendes Verständnis", "acceptedAnswer": [ { "@type": "Answer", "position": 1, "text": "String", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "Integer", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Integers speichern ganze Zahlen, aber Textzeichenfolgen benötigen einen anderen Datentyp." } }, { "@type": "Answer", "position": 1, "text": "String", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Der String-Datentyp ist perfekt für die Speicherung von Text in JavaScript." } }, { "@type": "Answer", "position": 2, "text": "Boolean", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Booleans repräsentieren Wahrheitswerte (true oder false), nicht Textzeichenfolgen." } }, { "@type": "Answer", "position": 3, "text": "Float", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Floats werden für Zahlen mit Kommastellen verwendet, nicht für Text." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Deklaration von Variablen", "text": "Welche Aussage über Variablen in JavaScript trifft zu?", "encodingFormat": "text/html", "assesses": "Deklaration von Variablen", "acceptedAnswer": [ { "@type": "Answer", "position": 0, "text": "Variablen müssen vor ihrer Verwendung deklariert werden.", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "Variablen müssen vor ihrer Verwendung deklariert werden.", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Das ist richtig. In JavaScript müssen Variablen mit dem Schlüsselwort 'let' oder 'const' deklariert werden, bevor sie verwendet werden können." } }, { "@type": "Answer", "position": 1, "text": "Variablen werden automatisch als Text initialisiert.", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Falsch. Variablen in JavaScript werden nicht automatisch als Text initialisiert. Sie können verschiedene Datentypen wie Zahlen, Zeichenfolgen oder boolesche Werte speichern." } }, { "@type": "Answer", "position": 2, "text": "Variablen können in JavaScript nicht neu zugewiesen werden.", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Das ist nicht korrekt. Variablen in JavaScript können neu zugewiesen werden, indem ein neuer Wert zugewiesen wird." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Grundlagen von JavaScript", "text": "Welche der folgenden Anweisungen deklariert eine Variable mit dem Namen \"name\" und initialisiert sie mit dem Wert \"Max\"?", "encodingFormat": "text/html", "assesses": "Grundlagen von JavaScript", "acceptedAnswer": [ { "@type": "Answer", "position": 2, "text": "let name = \"Max\"", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "var name = Max", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die var-Deklaration ist veraltet. Verwenden Sie stattdessen let oder const." } }, { "@type": "Answer", "position": 1, "text": "const name: \"Max", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Const-Deklarationen erfordern einen Initialisierungswert." } }, { "@type": "Answer", "position": 2, "text": "let name = \"Max\"", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die let-Deklaration deklariert eine Variable mit dem angegebenen Namen und Wert." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Datentypbestimmung", "text": "Welcher Datentyp wird durch die Variable `const number = 123` repräsentiert?", "encodingFormat": "text/html", "assesses": "Datentypbestimmung", "acceptedAnswer": [ { "@type": "Answer", "position": 1, "text": "Zahl", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "String", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Eine Zeichenkette ist eine Folge von Zeichen, während eine Zahl ein numerischer Wert ist." } }, { "@type": "Answer", "position": 1, "text": "Zahl", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Eine Zahl ist ein numerischer Wert, und `123` ist eine Zahl." } }, { "@type": "Answer", "position": 2, "text": "Boolescher Wert", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Ein boolescher Wert ist entweder wahr oder falsch, während eine Zahl ein numerischer Wert ist." } }, { "@type": "Answer", "position": 3, "text": "Objekt", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Ein Objekt ist eine Sammlung von Schlüssel-Wert-Paaren, während eine Zahl ein numerischer Wert ist." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Ereigniserkennung", "text": "Welches Ereignis wird ausgelöst, wenn ein HTML-Element angeklickt wird?", "encodingFormat": "text/html", "assesses": "Ereigniserkennung", "acceptedAnswer": [ { "@type": "Answer", "position": 1, "text": "click", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "mouseup", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Das `mouseup`-Ereignis wird ausgelöst, wenn die Maustaste losgelassen wird, nicht wenn sie angeklickt wird." } }, { "@type": "Answer", "position": 1, "text": "click", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Das `click`-Ereignis wird ausgelöst, wenn ein Element angeklickt wird." } }, { "@type": "Answer", "position": 2, "text": "mousedown", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Das `mousedown`-Ereignis wird ausgelöst, wenn die Maustaste gedrückt wird, nicht wenn sie angeklickt wird." } }, { "@type": "Answer", "position": 3, "text": "hover", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Das `hover`-Ereignis wird ausgelöst, wenn der Mauszeiger über ein Element bewegt wird, nicht wenn es angeklickt wird." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Operatoridentifikation", "text": "Welcher Operator wird verwendet, um den booleschen Wert eines Ausdrucks umzukehren?", "encodingFormat": "text/html", "assesses": "Operatoridentifikation", "acceptedAnswer": [ { "@type": "Answer", "position": 3, "text": "!", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "&&", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Der `&&`-Operator wird verwendet, um zwei boolesche Ausdrücke zu verknüpfen, nicht um ihren Wert umzukehren." } }, { "@type": "Answer", "position": 1, "text": "==", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Der `==`-Operator wird verwendet, um zwei Werte zu vergleichen, nicht um ihren booleschen Wert umzukehren." } }, { "@type": "Answer", "position": 2, "text": "||", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Der `||`-Operator wird verwendet, um zwei boolesche Ausdrücke zu verknüpfen, nicht um ihren Wert umzukehren." } }, { "@type": "Answer", "position": 3, "text": "!", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Der `!`-Operator wird verwendet, um den booleschen Wert eines Ausdrucks umzukehren." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Ermitteln des Datentyps eines booleschen Werts in JavaScript", "text": "Welcher Datentyp wird durch den folgenden Code in JavaScript dargestellt: `true`?", "encodingFormat": "text/html", "assesses": "Ermitteln des Datentyps eines booleschen Werts in JavaScript", "acceptedAnswer": [ { "@type": "Answer", "position": 0, "text": "Boolean", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "Boolean", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "True ist ein boolescher Wert, der wahr darstellt." } }, { "@type": "Answer", "position": 1, "text": "String", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Strings sind Zeichenfolgen, keine booleschen Werte." } }, { "@type": "Answer", "position": 2, "text": "Number", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Zahlen sind numerische Werte, keine booleschen Werte." } }, { "@type": "Answer", "position": 3, "text": "Object", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Objekte sind komplexe Datentypen, keine booleschen Werte." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Hinzufügen eines Elements zum DOM anhand seiner ID in JavaScript", "text": "Welche der folgenden Anweisungen fügt dem HTML-Dokument ein Element mit der ID \"myElement\" hinzu?", "encodingFormat": "text/html", "assesses": "Hinzufügen eines Elements zum DOM anhand seiner ID in JavaScript", "acceptedAnswer": [ { "@type": "Answer", "position": 2, "text": "document.getElementById(\"myElement\").innerHTML = \"Hello\";", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "document.createElement(\"myElement\").innerHTML = \"Hello\";", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Diese Anweisung erstellt ein Element, fügt es aber nicht dem Dokument hinzu." } }, { "@type": "Answer", "position": 1, "text": "document.querySelector(\"#myElement\").innerHTML = \"Hello\";", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Diese Anweisung wählt ein vorhandenes Element aus, fügt aber keinen neuen Inhalt hinzu." } }, { "@type": "Answer", "position": 2, "text": "document.getElementById(\"myElement\").innerHTML = \"Hello\";", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Diese Anweisung wählt ein Element anhand seiner ID aus und fügt ihm neuen Inhalt hinzu." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Ermitteln des Ereignisses, das ausgelöst wird, wenn ein Element den Fokus erhält", "text": "Welches der folgenden Ereignisse wird ausgelöst, wenn ein Element den Fokus erhält?", "encodingFormat": "text/html", "assesses": "Ermitteln des Ereignisses, das ausgelöst wird, wenn ein Element den Fokus erhält", "acceptedAnswer": [ { "@type": "Answer", "position": 1, "text": "focus", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "click", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Das Click-Ereignis wird ausgelöst, wenn auf ein Element geklickt wird." } }, { "@type": "Answer", "position": 1, "text": "focus", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Das Focus-Ereignis wird ausgelöst, wenn ein Element den Fokus erhält." } }, { "@type": "Answer", "position": 2, "text": "hover", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Das Hover-Ereignis wird ausgelöst, wenn der Mauszeiger über ein Element bewegt wird." } }, { "@type": "Answer", "position": 3, "text": "change", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Das Change-Ereignis wird ausgelöst, wenn sich der Wert eines Elements ändert." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Array-Erstellung", "text": "Welche der folgenden Anweisungen gibt ein Array mit den Elementen 1, 2 und 3 in JavaScript aus?", "encodingFormat": "text/html", "assesses": "Array-Erstellung", "acceptedAnswer": [ { "@type": "Answer", "position": 1, "text": "[1, 2, 3]", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "<1, 2, 3>", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Ein Array wird mit eckigen Klammern [] definiert, nicht mit spitzen Klammern <>. Die richtige Syntax lautet [1, 2, 3]." } }, { "@type": "Answer", "position": 1, "text": "[1, 2, 3]", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Dies ist die korrekte Syntax, um ein Array mit den Elementen 1, 2 und 3 in JavaScript zu definieren." } }, { "@type": "Answer", "position": 2, "text": "(1, 2, 3)", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Ein Array wird mit eckigen Klammern [] definiert, nicht mit runden Klammern (). Die richtige Syntax lautet [1, 2, 3]." } }, { "@type": "Answer", "position": 3, "text": "{1, 2, 3}", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Ein Array wird mit eckigen Klammern [] definiert, nicht mit geschweiften Klammern {}. Die richtige Syntax lautet [1, 2, 3]." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Array-Entfernung", "text": "Welche der folgenden Anweisungen entfernt das letzte Element aus einem Array in JavaScript?", "encodingFormat": "text/html", "assesses": "Array-Entfernung", "acceptedAnswer": [ { "@type": "Answer", "position": 0, "text": "pop()", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "pop()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die pop()-Methode entfernt das letzte Element aus einem Array und gibt es zurück." } }, { "@type": "Answer", "position": 1, "text": "delete()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die delete()-Methode löscht ein Element aus einem Array, gibt es aber nicht zurück. Verwenden Sie stattdessen pop()." } }, { "@type": "Answer", "position": 2, "text": "shift()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die shift()-Methode entfernt das erste Element aus einem Array und gibt es zurück. Verwenden Sie stattdessen pop()." } }, { "@type": "Answer", "position": 3, "text": "splice()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die splice()-Methode kann verwendet werden, um Elemente aus einem Array zu entfernen, aber sie gibt die entfernten Elemente nicht zurück. Verwenden Sie stattdessen pop()." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Zeichenfolge-zu-Ganzzahl-Konvertierung", "text": "Welche der folgenden Anweisungen wandelt eine Zeichenfolge in eine Ganzzahl in JavaScript um?", "encodingFormat": "text/html", "assesses": "Zeichenfolge-zu-Ganzzahl-Konvertierung", "acceptedAnswer": [ { "@type": "Answer", "position": 0, "text": "parseInt()", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "parseInt()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die parseInt()-Funktion wandelt eine Zeichenfolge in eine Ganzzahl um." } }, { "@type": "Answer", "position": 1, "text": "toNumber()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die toNumber()-Funktion wandelt eine Zeichenfolge in eine Gleitkommazahl um, nicht in eine Ganzzahl. Verwenden Sie stattdessen parseInt()." } }, { "@type": "Answer", "position": 2, "text": "toInt()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Es gibt keine toInt()-Funktion in JavaScript. Verwenden Sie stattdessen parseInt()." } }, { "@type": "Answer", "position": 3, "text": "toFloat()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Es gibt keine toFloat()-Funktion in JavaScript. Verwenden Sie stattdessen parseFloat()." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Zeichenfolgen-Datentyp", "text": "In welchem Datentyp wird eine Zeichenfolge in JavaScript gespeichert?", "encodingFormat": "text/html", "assesses": "Zeichenfolgen-Datentyp", "acceptedAnswer": [ { "@type": "Answer", "position": 1, "text": "String", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "Array", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Zeichenfolgen werden nicht in Arrays gespeichert. Sie werden im Datentyp String gespeichert." } }, { "@type": "Answer", "position": 1, "text": "String", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Zeichenfolgen werden im Datentyp String gespeichert." } }, { "@type": "Answer", "position": 2, "text": "Number", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Zahlen werden im Datentyp Number gespeichert, nicht Zeichenfolgen." } }, { "@type": "Answer", "position": 3, "text": "Boolean", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Boolesche Werte werden im Datentyp Boolean gespeichert, nicht Zeichenfolgen." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Bedingte Anweisungen", "text": "Welche Kontrollstruktur ermöglicht die Codeausführung nur bei erfüllter Bedingung?", "encodingFormat": "text/html", "assesses": "Bedingte Anweisungen", "acceptedAnswer": [ { "@type": "Answer", "position": 1, "text": "if-Anweisung", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "switch-Anweisung", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die switch-Anweisung ermöglicht die Auswahl aus mehreren Codeblöcken basierend auf einem Wert." } }, { "@type": "Answer", "position": 1, "text": "if-Anweisung", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die if-Anweisung führt Code nur aus, wenn eine bestimmte Bedingung erfüllt ist." } }, { "@type": "Answer", "position": 2, "text": "for-Schleife", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die for-Schleife wird verwendet, um Code wiederholt für eine bestimmte Anzahl von Iterationen auszuführen." } }, { "@type": "Answer", "position": 3, "text": "while-Schleife", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die while-Schleife wird verwendet, um Code wiederholt auszuführen, solange eine bestimmte Bedingung erfüllt ist." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Konsolenausgabe", "text": "Welche Funktion gibt eine Meldung in der Konsole aus?", "encodingFormat": "text/html", "assesses": "Konsolenausgabe", "acceptedAnswer": [ { "@type": "Answer", "position": 2, "text": "console.log()", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "print()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die Funktion print() wird in JavaScript nicht verwendet, um Meldungen in der Konsole auszugeben." } }, { "@type": "Answer", "position": 1, "text": "echo()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die Funktion echo() wird in JavaScript nicht verwendet, um Meldungen in der Konsole auszugeben." } }, { "@type": "Answer", "position": 2, "text": "console.log()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die Funktion console.log() wird verwendet, um Meldungen in der Konsole des Browsers auszugeben." } }, { "@type": "Answer", "position": 3, "text": "alert()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die Funktion alert() wird verwendet, um ein Popup-Fenster mit einer Meldung anzuzeigen, nicht um Meldungen in der Konsole auszugeben." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Arithmetische Operatoren", "text": "Welcher Operator addiert zwei Werte?", "encodingFormat": "text/html", "assesses": "Arithmetische Operatoren", "acceptedAnswer": [ { "@type": "Answer", "position": 2, "text": "+", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "*", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Der Operator * wird verwendet, um zwei Werte zu multiplizieren." } }, { "@type": "Answer", "position": 1, "text": "-", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Der Operator - wird verwendet, um zwei Werte zu subtrahieren." } }, { "@type": "Answer", "position": 2, "text": "+", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Der Operator + wird verwendet, um zwei Werte zu addieren." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Array-Methoden", "text": "Welche Methode durchläuft ein Array in JavaScript?", "encodingFormat": "text/html", "assesses": "Array-Methoden", "acceptedAnswer": [ { "@type": "Answer", "position": 3, "text": "forEach()", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "map()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die Methode map() wird verwendet, um ein neues Array zu erstellen, indem eine Funktion auf jedes Element des ursprünglichen Arrays angewendet wird." } }, { "@type": "Answer", "position": 1, "text": "reduce()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die Methode reduce() wird verwendet, um einen einzelnen Wert aus einem Array zu berechnen, indem eine Funktion auf jedes Element des Arrays angewendet wird." } }, { "@type": "Answer", "position": 2, "text": "filter()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die Methode filter() wird verwendet, um ein neues Array zu erstellen, das nur die Elemente des ursprünglichen Arrays enthält, die eine bestimmte Bedingung erfüllen." } }, { "@type": "Answer", "position": 3, "text": "forEach()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die Methode forEach() wird verwendet, um eine Funktion auf jedes Element eines Arrays anzuwenden." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "mouseover-Ereignis", "text": "Welches Ereignis wird ausgelöst, wenn die Maus über ein Element fährt?", "encodingFormat": "text/html", "assesses": "mouseover-Ereignis", "acceptedAnswer": [ { "@type": "Answer", "position": 1, "text": "mouseover", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "click", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Das click-Ereignis wird ausgelöst, wenn auf ein Element geklickt wird." } }, { "@type": "Answer", "position": 1, "text": "mouseover", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Das mouseover-Ereignis wird ausgelöst, wenn die Maus über ein Element fährt." } }, { "@type": "Answer", "position": 2, "text": "load", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Das load-Ereignis wird ausgelöst, wenn ein Element vollständig geladen ist." } }, { "@type": "Answer", "position": 3, "text": "change", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Das change-Ereignis wird ausgelöst, wenn sich der Wert eines Elements ändert." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": ".style-Eigenschaft", "text": "Welche Eigenschaft ändert den Stil eines HTML-Elements?", "encodingFormat": "text/html", "assesses": ".style-Eigenschaft", "acceptedAnswer": [ { "@type": "Answer", "position": 0, "text": ".style", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": ".style", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die .style-Eigenschaft ermöglicht den Zugriff auf die CSS-Stile eines Elements." } }, { "@type": "Answer", "position": 1, "text": ".attributes", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die .attributes-Eigenschaft gibt die Attribute eines Elements zurück, nicht seine Stile." } }, { "@type": "Answer", "position": 2, "text": ".id", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die .id-Eigenschaft gibt die ID eines Elements zurück, nicht seine Stile." } }, { "@type": "Answer", "position": 3, "text": ".className", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die .className-Eigenschaft gibt den Klassennamen eines Elements zurück, nicht seine Stile." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Chrome DevTools", "text": "Welches Tool debuggt JavaScript-Code in einem Browser?", "encodingFormat": "text/html", "assesses": "Chrome DevTools", "acceptedAnswer": [ { "@type": "Answer", "position": 2, "text": "Chrome DevTools", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "Visual Studio Code", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Visual Studio Code ist ein Code-Editor, kein Debugging-Tool für Browser." } }, { "@type": "Answer", "position": 1, "text": "Node.js-Konsole", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die Node.js-Konsole dient zum Debuggen von Node.js-Code, nicht von JavaScript-Code in einem Browser." } }, { "@type": "Answer", "position": 2, "text": "Chrome DevTools", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Chrome DevTools ist ein integriertes Tool in Chrome, das zum Debuggen von JavaScript-Code verwendet wird." } }, { "@type": "Answer", "position": 3, "text": "Postman", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Postman ist ein Tool zum Testen von APIs, kein Debugging-Tool für JavaScript-Code." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "", "text": "Welche der folgenden Anweisungen deklariert eine Variable namens `name` und weist ihr den Wert `Max` zu?", "encodingFormat": "text/html", "assesses": "", "acceptedAnswer": [ { "@type": "Answer", "position": 0, "text": "const name = 'Max';", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "const name = 'Max';", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "const deklariert eine Konstante und weist ihr den Wert 'Max' zu." } }, { "@type": "Answer", "position": 1, "text": "let name, name = 'Max';", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Diese Syntax ist ungültig. let deklariert eine Variable, aber sie kann nicht zweimal deklariert werden." } }, { "@type": "Answer", "position": 2, "text": "var name = name = 'Max';", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Diese Syntax ist ungültig. var deklariert eine Variable, aber sie kann nicht zweimal deklariert werden." } }, { "@type": "Answer", "position": 3, "text": "name = 'Max';", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Diese Syntax deklariert keine Variable. Sie weist nur den Wert 'Max' an eine nicht deklarierte Variable zu." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Datentyp-Identifikation", "text": "Welcher Datentyp wird durch den folgenden JavaScript-Code repräsentiert: `[1, 2, 3]`?", "encodingFormat": "text/html", "assesses": "Datentyp-Identifikation", "acceptedAnswer": [ { "@type": "Answer", "position": 2, "text": "Array", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "Zahl", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Arrays speichern mehrere Werte, nicht nur Zahlen." } }, { "@type": "Answer", "position": 1, "text": "Objekt", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Objekte haben Schlüssel-Wert-Paare, während Arrays indizierte Elemente haben." } }, { "@type": "Answer", "position": 2, "text": "Array", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Arrays sind geordnete Sammlungen von Elementen." } }, { "@type": "Answer", "position": 3, "text": "Zeichenkette", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Zeichenketten sind Sequenzen von Zeichen, keine Sammlungen von Werten." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Kontrollstruktur-Identifikation", "text": "Welche Kontrollstruktur wird verwendet, um einen Codeblock auszuführen, wenn eine bestimmte Bedingung erfüllt ist und andernfalls einen anderen Codeblock auszuführen?", "encodingFormat": "text/html", "assesses": "Kontrollstruktur-Identifikation", "acceptedAnswer": [ { "@type": "Answer", "position": 3, "text": "if-else-Anweisung", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "switch-Anweisung", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die switch-Anweisung wird für mehrere Bedingungen verwendet, nicht für zwei." } }, { "@type": "Answer", "position": 1, "text": "for-Schleife", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "for-Schleifen werden für Iterationen verwendet, nicht für bedingte Ausführung." } }, { "@type": "Answer", "position": 2, "text": "while-Schleife", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "while-Schleifen werden für bedingte Ausführung verwendet, aber sie prüfen die Bedingung vor jeder Iteration." } }, { "@type": "Answer", "position": 3, "text": "if-else-Anweisung", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die if-else-Anweisung prüft eine Bedingung und führt den entsprechenden Codeblock aus." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Funktionsdeklaration", "text": "Wie wird eine Funktion in JavaScript deklariert und aufgerufen?", "encodingFormat": "text/html", "assesses": "Funktionsdeklaration", "acceptedAnswer": [ { "@type": "Answer", "position": 3, "text": "function Funktionsname() { ... }; Funktionsname();", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "declare Funktionsname() { ... }; Funktionsname();", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "In JavaScript wird das Schlüsselwort 'function' verwendet, nicht 'declare'." } }, { "@type": "Answer", "position": 1, "text": "def Funktionsname() { ... }; Funktionsname();", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "In JavaScript wird das Schlüsselwort 'function' verwendet, nicht 'def'." } }, { "@type": "Answer", "position": 2, "text": "func Funktionsname() { ... }; Funktionsname();", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "In JavaScript wird das Schlüsselwort 'function' verwendet, nicht 'func'." } }, { "@type": "Answer", "position": 3, "text": "function Funktionsname() { ... }; Funktionsname();", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "In JavaScript wird das Schlüsselwort 'function' verwendet, um Funktionen zu deklarieren und aufzurufen." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Operator-Identifikation", "text": "Welcher der folgenden JavaScript-Operatoren wird verwendet, um den Wert einer Variablen um eins zu erhöhen?", "encodingFormat": "text/html", "assesses": "Operator-Identifikation", "acceptedAnswer": [ { "@type": "Answer", "position": 0, "text": "++", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "++", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Der ++-Operator erhöht den Wert einer Variablen um eins." } }, { "@type": "Answer", "position": 1, "text": "--", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Der --Operator verringert den Wert einer Variablen um eins." } }, { "@type": "Answer", "position": 2, "text": "+=", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Der +=-Operator addiert einen Wert zu einer Variablen, erhöht sie aber nicht um eins." } }, { "@type": "Answer", "position": 3, "text": "-=", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Der -=-Operator subtrahiert einen Wert von einer Variablen, erhöht sie aber nicht um eins." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Datentyp von `null`", "text": "Was gibt der folgende JavaScript-Code aus: `console.log(typeof null);`?", "encodingFormat": "text/html", "assesses": "Datentyp von `null`", "acceptedAnswer": [ { "@type": "Answer", "position": 3, "text": "object", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "number", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Der Wert `null` repräsentiert in JavaScript einen leeren oder nicht existierenden Wert und ist daher kein numerischer Wert." } }, { "@type": "Answer", "position": 1, "text": "null", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Der Operator `typeof` gibt den Datentyp eines Werts zurück, nicht den Wert selbst. Daher gibt `typeof null` den Typ `object` zurück, nicht den Wert `null`." } }, { "@type": "Answer", "position": 2, "text": "undefined", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "`undefined` ist ein eigener Datentyp in JavaScript, der einen nicht initialisierten Wert darstellt. `null` hingegen ist ein Objektwert, der einen leeren oder nicht existierenden Wert darstellt." } }, { "@type": "Answer", "position": 3, "text": "object", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "In JavaScript wird `null` als Objekttyp behandelt, obwohl es sich logisch gesehen um einen leeren oder nicht existierenden Wert handelt." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Hinzufügen eines Elements an das Ende eines Arrays", "text": "Welche der folgenden Methoden wird verwendet, um ein neues Element an das Ende eines Arrays hinzuzufügen?", "encodingFormat": "text/html", "assesses": "Hinzufügen eines Elements an das Ende eines Arrays", "acceptedAnswer": [ { "@type": "Answer", "position": 2, "text": "push()", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "append()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die `append()`-Methode ist nicht für Arrays in JavaScript definiert. Verwenden Sie stattdessen die `push()`-Methode." } }, { "@type": "Answer", "position": 1, "text": "add()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die `add()`-Methode ist nicht für Arrays in JavaScript definiert. Verwenden Sie stattdessen die `push()`-Methode." } }, { "@type": "Answer", "position": 2, "text": "push()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die `push()`-Methode fügt ein neues Element an das Ende eines Arrays hinzu und gibt die neue Länge des Arrays zurück." } }, { "@type": "Answer", "position": 3, "text": "insert()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die `insert()`-Methode ist nicht für Arrays in JavaScript definiert. Verwenden Sie stattdessen die `splice()`-Methode, um Elemente an einer bestimmten Position einzufügen." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "", "text": "Welches der folgenden Ereignisse wird ausgelöst, wenn ein Benutzer mit der Maus über ein Element fährt?", "encodingFormat": "text/html", "assesses": "", "acceptedAnswer": [ { "@type": "Answer", "position": 3, "text": "mouseover", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "click", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Das `mouseover`-Ereignis wird ausgelöst, wenn der Mauszeiger über ein Element fährt." } }, { "@type": "Answer", "position": 1, "text": "focus", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Das `mouseover`-Ereignis wird ausgelöst, wenn der Mauszeiger über ein Element fährt." } }, { "@type": "Answer", "position": 2, "text": "change", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Das `mouseover`-Ereignis wird ausgelöst, wenn der Mauszeiger über ein Element fährt." } }, { "@type": "Answer", "position": 3, "text": "mouseover", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Das `mouseover`-Ereignis wird ausgelöst, wenn der Mauszeiger über ein Element fährt." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Datentyp", "text": "Welcher Datentyp ermöglicht die Speicherung mehrerer Werte in einer Sammlung?", "encodingFormat": "text/html", "assesses": "Datentyp", "acceptedAnswer": [ { "@type": "Answer", "position": 1, "text": "Array", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "Integer", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Integer ist ein Datentyp für ganze Zahlen, während ein Array eine Sammlung von Werten ist." } }, { "@type": "Answer", "position": 1, "text": "Array", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Ein Array ist ein Datentyp, der mehrere Werte in einer geordneten Sammlung speichert." } }, { "@type": "Answer", "position": 2, "text": "Boolean", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Boolean ist ein Datentyp für Wahrheitswerte (wahr oder falsch), während ein Array eine Sammlung von Werten ist." } }, { "@type": "Answer", "position": 3, "text": "String", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "String ist ein Datentyp für Text, während ein Array eine Sammlung von Werten ist." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Kontrollstruktur", "text": "Welche JavaScript-Anweisung wird verwendet, um eine Bedingung zu prüfen und dementsprechend Code auszuführen?", "encodingFormat": "text/html", "assesses": "Kontrollstruktur", "acceptedAnswer": [ { "@type": "Answer", "position": 0, "text": "if", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "if", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die if-Anweisung wird verwendet, um eine Bedingung zu prüfen und Code auszuführen, wenn die Bedingung wahr ist." } }, { "@type": "Answer", "position": 1, "text": "while", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die while-Schleife wird verwendet, um Code wiederholt auszuführen, solange eine Bedingung wahr ist, während die if-Anweisung eine einzelne Bedingung prüft." } }, { "@type": "Answer", "position": 2, "text": "do", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die do-while-Schleife ähnelt der while-Schleife, führt aber den Code mindestens einmal aus, bevor die Bedingung geprüft wird." } }, { "@type": "Answer", "position": 3, "text": "for", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die for-Schleife wird verwendet, um Code wiederholt auszuführen, basierend auf einem Initialisierungs-, Bedingungs- und Inkrementierungsausdruck." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Funktion", "text": "Wie wird eine Funktion in JavaScript aufgerufen?", "encodingFormat": "text/html", "assesses": "Funktion", "acceptedAnswer": [ { "@type": "Answer", "position": 2, "text": "Mit Klammern ()", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "Mit geschweiften Klammern {}", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Geschweifte Klammern werden verwendet, um Codeblöcke zu gruppieren, während Funktionen mit Klammern aufgerufen werden." } }, { "@type": "Answer", "position": 1, "text": "Mit einem Semikolon ;", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Semikolons werden verwendet, um Anweisungen zu beenden, während Funktionen mit Klammern aufgerufen werden." } }, { "@type": "Answer", "position": 2, "text": "Mit Klammern ()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Funktionen werden mit Klammern aufgerufen, die Argumente enthalten können." } }, { "@type": "Answer", "position": 3, "text": "Mit eckigen Klammern []", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Eckige Klammern werden verwendet, um auf Elemente in Arrays zuzugreifen, während Funktionen mit Klammern aufgerufen werden." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "", "text": "Welche Rolle spielt das 'this'-Schlüsselwort?", "encodingFormat": "text/html", "assesses": "", "acceptedAnswer": [ { "@type": "Answer", "position": 0, "text": "Referenziert das aktuelle Objekt", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "Referenziert das aktuelle Objekt", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Das 'this'-Schlüsselwort referenziert das aktuelle Objekt, in dessen Kontext der Code ausgeführt wird." } }, { "@type": "Answer", "position": 1, "text": "Referenziert das globale Objekt", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Das globale Objekt wird in JavaScript mit 'window' referenziert, während 'this' das aktuelle Objekt referenziert." } }, { "@type": "Answer", "position": 2, "text": "Referenziert das nächste Objekt", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "In JavaScript gibt es kein Konzept eines 'nächsten Objekts', während 'this' das aktuelle Objekt referenziert." } }, { "@type": "Answer", "position": 3, "text": "Referenziert das übergeordnete Objekt", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Das übergeordnete Objekt wird in JavaScript mit 'super' referenziert, während 'this' das aktuelle Objekt referenziert." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "String-Manipulation", "text": "Welche Methode wandelt eine Zeichenfolge in JavaScript in Kleinbuchstaben um?", "encodingFormat": "text/html", "assesses": "String-Manipulation", "acceptedAnswer": [ { "@type": "Answer", "position": 2, "text": "toLowerCase()", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "toCamelCase()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "toCamelCase() wird verwendet, um eine Zeichenfolge in Schreibweise mit großem Anfangsbuchstaben umzuwandeln." } }, { "@type": "Answer", "position": 1, "text": "toUppercase()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "toUppercase() wird verwendet, um eine Zeichenfolge in Großbuchstaben umzuwandeln." } }, { "@type": "Answer", "position": 2, "text": "toLowerCase()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "toLowerCase() wandelt eine Zeichenfolge in Kleinbuchstaben um." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Logik", "text": "Welcher Operator wird in JavaScript für eine logische ODER-Operation verwendet?", "encodingFormat": "text/html", "assesses": "Logik", "acceptedAnswer": [ { "@type": "Answer", "position": 1, "text": "||", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "+", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "+ wird für die Addition verwendet, nicht für logische Operationen." } }, { "@type": "Answer", "position": 1, "text": "||", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "|| ist der logische ODER-Operator." } }, { "@type": "Answer", "position": 2, "text": "&&", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "&& ist der logische UND-Operator." } }, { "@type": "Answer", "position": 3, "text": "!", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "! ist der logische NICHT-Operator." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "DOM-Zugriff", "text": "Welche Funktion ermöglicht den Zugriff auf ein DOM-Element anhand seiner ID?", "encodingFormat": "text/html", "assesses": "DOM-Zugriff", "acceptedAnswer": [ { "@type": "Answer", "position": 2, "text": "document.getElementById()", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "document.getElementsByTagName()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "getElementsByTagName() ruft Elemente anhand ihres Tag-Namens ab." } }, { "@type": "Answer", "position": 1, "text": "document.getElementsByClassName()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "getElementsByClassName() ruft Elemente anhand ihres Klassennamens ab." } }, { "@type": "Answer", "position": 2, "text": "document.getElementById()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "getElementById() ruft ein Element anhand seiner ID ab." } }, { "@type": "Answer", "position": 3, "text": "document.querySelector()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "querySelector() ruft ein Element anhand eines CSS-Selektors ab." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Ereignisse", "text": "Welcher Ereignistyp wird ausgelöst, wenn die Maus über ein Element bewegt wird?", "encodingFormat": "text/html", "assesses": "Ereignisse", "acceptedAnswer": [ { "@type": "Answer", "position": 3, "text": "mouseover", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "change", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "change wird ausgelöst, wenn sich der Wert eines Elements ändert." } }, { "@type": "Answer", "position": 1, "text": "click", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "click wird ausgelöst, wenn auf ein Element geklickt wird." } }, { "@type": "Answer", "position": 2, "text": "load", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "load wird ausgelöst, wenn eine Seite oder ein Bild geladen wird." } }, { "@type": "Answer", "position": 3, "text": "mouseover", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "mouseover wird ausgelöst, wenn die Maus über ein Element bewegt wird." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "appendChild", "text": "Welche Methode dient zum Einfügen eines neuen Elements in das DOM?", "encodingFormat": "text/html", "assesses": "appendChild", "acceptedAnswer": [ { "@type": "Answer", "position": 3, "text": "appendChild()", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "insertBefore()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die Methode zum Einfügen eines neuen Elements in das DOM ist appendChild()." } }, { "@type": "Answer", "position": 1, "text": "add()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Es gibt keine Methode namens add() zum Einfügen eines neuen Elements in das DOM." } }, { "@type": "Answer", "position": 2, "text": "insertAfter()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die Methode zum Einfügen eines neuen Elements in das DOM ist appendChild()." } }, { "@type": "Answer", "position": 3, "text": "appendChild()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die Methode appendChild() fügt ein neues Element als letztes Kind an das angegebene Element an." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Klassenselektor", "text": "Welcher Selektor wird in CSS verwendet, um alle Elemente mit der Klasse 'myClass' auszuwählen?", "encodingFormat": "text/html", "assesses": "Klassenselektor", "acceptedAnswer": [ { "@type": "Answer", "position": 2, "text": ".myClass", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "myClass", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Der richtige Selektor ist .myClass." } }, { "@type": "Answer", "position": 1, "text": "#myClass", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Der richtige Selektor ist .myClass." } }, { "@type": "Answer", "position": 2, "text": ".myClass", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Der Selektor .myClass wählt alle Elemente mit der Klasse 'myClass' aus." } }, { "@type": "Answer", "position": 3, "text": "myclass", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Der richtige Selektor ist .myClass." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Eigenschaften von JavaScript", "text": "Welche der folgenden Aussagen trifft auf JavaScript zu?", "encodingFormat": "text/html", "assesses": "Eigenschaften von JavaScript", "acceptedAnswer": [ { "@type": "Answer", "position": 0, "text": "Es ist eine clientseitige Skriptsprache, die interpretiert wird.", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "Es ist eine clientseitige Skriptsprache, die interpretiert wird.", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "JavaScript ist eine clientseitige Skriptsprache, die vom Browser interpretiert wird." } }, { "@type": "Answer", "position": 1, "text": "Es ist eine serverseitige Programmiersprache, die kompiliert wird.", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "JavaScript ist eine clientseitige Skriptsprache, keine serverseitige Programmiersprache." } }, { "@type": "Answer", "position": 2, "text": "Es ist eine deklarative Sprache, die funktional basiert.", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "JavaScript ist eine imperative Sprache, keine deklarative Sprache." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Numerische Datentypen", "text": "Welcher Datentyp speichert numerische Werte in JavaScript?", "encodingFormat": "text/html", "assesses": "Numerische Datentypen", "acceptedAnswer": [ { "@type": "Answer", "position": 1, "text": "Number", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "Array", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Arrays speichern Sammlungen von Werten, nicht einzelne numerische Werte." } }, { "@type": "Answer", "position": 1, "text": "Number", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Der Datentyp Number speichert numerische Werte." } }, { "@type": "Answer", "position": 2, "text": "String", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Strings speichern Zeichenfolgen, keine numerischen Werte." } }, { "@type": "Answer", "position": 3, "text": "Boolean", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Booleans speichern Wahrheitswerte, keine numerischen Werte." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Arrays", "text": "Welche Methode fügt ein Element am Ende eines Arrays in JavaScript hinzu?", "encodingFormat": "text/html", "assesses": "Arrays", "acceptedAnswer": [ { "@type": "Answer", "position": 2, "text": "push()", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "add()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die add()-Methode ist nicht in JavaScript-Arrays definiert." } }, { "@type": "Answer", "position": 1, "text": "append()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die append()-Methode ist nicht in JavaScript-Arrays definiert." } }, { "@type": "Answer", "position": 2, "text": "push()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die push()-Methode fügt ein Element am Ende eines Arrays hinzu und gibt die neue Länge des Arrays zurück." } }, { "@type": "Answer", "position": 3, "text": "insert()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Die insert()-Methode ist nicht in JavaScript-Arrays definiert." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "Funktionen", "text": "Welches Schlüsselwort wird zum Definieren einer Funktion in JavaScript verwendet?", "encodingFormat": "text/html", "assesses": "Funktionen", "acceptedAnswer": [ { "@type": "Answer", "position": 2, "text": "function", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "def", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Das Schlüsselwort def wird in JavaScript nicht zum Definieren von Funktionen verwendet." } }, { "@type": "Answer", "position": 1, "text": "method", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Das Schlüsselwort method wird in JavaScript nicht zum Definieren von Funktionen verwendet." } }, { "@type": "Answer", "position": 2, "text": "function", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Das Schlüsselwort function wird verwendet, um eine Funktion in JavaScript zu definieren." } }, { "@type": "Answer", "position": 3, "text": "declare", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "Das Schlüsselwort declare wird in JavaScript nicht zum Definieren von Funktionen verwendet." } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "", "text": "Welches Ereignis wird ausgelöst, wenn der Mauszeiger über ein HTML-Element bewegt wird?", "encodingFormat": "text/html", "assesses": "", "acceptedAnswer": [ { "@type": "Answer", "position": 0, "text": "mouseover", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "mouseover", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 1, "text": "mousemove", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 2, "text": "hover", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 3, "text": "onmouse", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "", "text": "Welche Methode wird in JavaScript zum Senden einer HTTP-Anfrage verwendet?", "encodingFormat": "text/html", "assesses": "", "acceptedAnswer": [ { "@type": "Answer", "position": 0, "text": "fetch()", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "fetch()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 1, "text": "ajax()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 2, "text": "request()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "", "text": "Welcher Datentyp wird verwendet, um einen Wahrheitswert zu speichern?", "encodingFormat": "text/html", "assesses": "", "acceptedAnswer": [ { "@type": "Answer", "position": 0, "text": "Boolean", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "Boolean", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 1, "text": "Number", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 2, "text": "Array", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 3, "text": "String", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "", "text": "Welche Funktion wird verwendet, um einen Funktionsaufruf zu beenden?", "encodingFormat": "text/html", "assesses": "", "acceptedAnswer": [ { "@type": "Answer", "position": 3, "text": "return", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "break", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 1, "text": "continue", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 2, "text": "throw", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 3, "text": "return", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "", "text": "Welche der folgenden Methoden wird verwendet, um ein Array zu sortieren?", "encodingFormat": "text/html", "assesses": "", "acceptedAnswer": [ { "@type": "Answer", "position": 3, "text": "sort()", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "arrange()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 1, "text": "order()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 2, "text": "sequence()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 3, "text": "sort()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "", "text": "Welches Schlüsselwort wird verwendet, um eine synchrone Ajax-Anfrage zu senden?", "encodingFormat": "text/html", "assesses": "", "acceptedAnswer": [ { "@type": "Answer", "position": 2, "text": "XMLHttpRequest", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "await", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 1, "text": "async", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 2, "text": "XMLHttpRequest", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 3, "text": "fetch()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "", "text": "Welche der folgenden Methoden wird verwendet, um ein JSON-Objekt zu analysieren?", "encodingFormat": "text/html", "assesses": "", "acceptedAnswer": [ { "@type": "Answer", "position": 1, "text": "JSON.parse()", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "JSON.convert()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 1, "text": "JSON.parse()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 2, "text": "JSON.stringify()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 3, "text": "JSON.decode()", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "", "text": "Welcher der folgenden Operatoren wird verwendet, um einen logischen UND-Vergleich durchzuführen?", "encodingFormat": "text/html", "assesses": "", "acceptedAnswer": [ { "@type": "Answer", "position": 2, "text": "&&", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "||", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 1, "text": "!=", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 2, "text": "&&", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "", "text": "Welche der folgenden Optionen ist KEIN Datentyp in JavaScript?", "encodingFormat": "text/html", "assesses": "", "acceptedAnswer": [ { "@type": "Answer", "position": 2, "text": "Integer", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "Boolean", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 1, "text": "String", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 2, "text": "Integer", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 3, "text": "Undefined", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "", "text": "Welche der folgenden Funktionen gibt die Länge eines Strings zurück?", "encodingFormat": "text/html", "assesses": "", "acceptedAnswer": [ { "@type": "Answer", "position": 1, "text": "length", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "size", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 1, "text": "length", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 2, "text": "count", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 3, "text": "dimensions", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "", "text": "Welche der folgenden Optionen ist eine gültige Variable in JavaScript?", "encodingFormat": "text/html", "assesses": "", "acceptedAnswer": [ { "@type": "Answer", "position": 3, "text": "x", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "-x", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 1, "text": "1x", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 2, "text": "$x", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 3, "text": "x", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "", "text": "Welcher der folgenden Ereignislistener wird ausgelöst, wenn auf ein Element geklickt wird?", "encodingFormat": "text/html", "assesses": "", "acceptedAnswer": [ { "@type": "Answer", "position": 1, "text": "click", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "submit", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 1, "text": "click", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 2, "text": "change", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 3, "text": "onload", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "", "text": "Welcher der folgenden Werte gibt die Position des ersten Vorkommens eines Zeichens in einem String zurück?", "encodingFormat": "text/html", "assesses": "", "acceptedAnswer": [ { "@type": "Answer", "position": 2, "text": "indexOf", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "search", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 1, "text": "contains", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 2, "text": "indexOf", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "", "text": "Welches der folgenden Konzepte ermöglicht es, Eigenschaften und Methoden von einem übergeordneten Objekt zu erben?", "encodingFormat": "text/html", "assesses": "", "acceptedAnswer": [ { "@type": "Answer", "position": 0, "text": "Vererbung", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "Vererbung", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 1, "text": "Kapselung", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 2, "text": "Aggregation", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 3, "text": "Polymorphismus", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "", "text": "Welche der folgenden Anweisungen deklariert eine Variable mit dem Namen \"x\" und weist ihr den Wert 10 zu?", "encodingFormat": "text/html", "assesses": "", "acceptedAnswer": [ { "@type": "Answer", "position": 1, "text": "let x = 10;", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "var x: 10;", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 1, "text": "let x = 10;", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 2, "text": "const x = new Number(10);", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 3, "text": "x = 10;", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "", "text": "Welcher Datentyp wird durch den folgenden Ausdruck dargestellt: \"true\"?", "encodingFormat": "text/html", "assesses": "", "acceptedAnswer": [ { "@type": "Answer", "position": 2, "text": "Boolean", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "Number", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 1, "text": "String", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 2, "text": "Boolean", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 3, "text": "Object", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "", "text": "Welche der folgenden Kontrollstrukturen wird verwendet, um einen Codeblock nur auszuführen, wenn eine bestimmte Bedingung erfüllt ist?", "encodingFormat": "text/html", "assesses": "", "acceptedAnswer": [ { "@type": "Answer", "position": 2, "text": "if-Anweisung", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "for-Schleife", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 1, "text": "switch-Anweisung", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 2, "text": "if-Anweisung", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 3, "text": "while-Schleife", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "", "text": "Wie lautet die korrekte Syntax zum Aufrufen einer Funktion mit dem Namen \"myFunction\" mit zwei Parametern?", "encodingFormat": "text/html", "assesses": "", "acceptedAnswer": [ { "@type": "Answer", "position": 1, "text": "myFunction(param1, param2);", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "myFunction: param1, param2;", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 1, "text": "myFunction(param1, param2);", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 2, "text": "myFunction(param1: param2);", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 3, "text": "myFunction {param1, param2};", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "", "text": "Welche der folgenden Anweisungen gibt den Wert der Variablen \"x\" in der Konsole aus?", "encodingFormat": "text/html", "assesses": "", "acceptedAnswer": [ { "@type": "Answer", "position": 3, "text": "console.log(x);", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "print(x);", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 1, "text": "document.write(x);", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 2, "text": "alert(x);", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 3, "text": "console.log(x);", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "", "text": "Welche der folgenden Anweisungen erstellt ein Array mit den Elementen \"1\", \"2\" und \"3\"?", "encodingFormat": "text/html", "assesses": "", "acceptedAnswer": [ { "@type": "Answer", "position": 2, "text": "let arr = [\"1\", \"2\", \"3\"];", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "let arr = new Array(\"1\", \"2\", \"3\");", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 1, "text": "let arr: [\"1\", \"2\", \"3\"];", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 2, "text": "let arr = [\"1\", \"2\", \"3\"];", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 3, "text": "let arr = (\"1\", \"2\", \"3\");", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "", "text": "Wie kann man in JavaScript auf das zweite Element eines Arrays mit dem Namen \"arr\" zugreifen?", "encodingFormat": "text/html", "assesses": "", "acceptedAnswer": [ { "@type": "Answer", "position": 0, "text": "arr[1];", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "arr[1];", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 1, "text": "arr.get(1);", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 2, "text": "arr: 1;", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 3, "text": "arr(1);", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "", "text": "Welche der folgenden Anweisungen fügt dem Ende des Arrays \"arr\" das Element \"4\" hinzu?", "encodingFormat": "text/html", "assesses": "", "acceptedAnswer": [ { "@type": "Answer", "position": 1, "text": "arr.push(\"4\");", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "arr.add(\"4\");", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 1, "text": "arr.push(\"4\");", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 2, "text": "arr[arr.length] = \"4\";", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 3, "text": "arr += \"4\";", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "", "text": "Welche der folgenden Anweisungen konvertiert die Zahl \"10\" in einen String?", "encodingFormat": "text/html", "assesses": "", "acceptedAnswer": [ { "@type": "Answer", "position": 3, "text": "String(10);", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "parseInt(\"10\");", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 1, "text": "10.toString();", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 2, "text": "parseFloat(\"10\");", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 3, "text": "String(10);", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } } ] }, { "@type": "Question", "eduQuestionType": "Multiple choice", "learningResourceType": "Exam exercise", "name": "", "text": "Welche der folgenden Anweisungen fügt ein neues Element mit dem Namen \"name\" und dem Wert \"Max\" zum Objekt \"person\" hinzu?", "encodingFormat": "text/html", "assesses": "", "acceptedAnswer": [ { "@type": "Answer", "position": 0, "text": "person.name = \"Max\";", "encodingFormat": "text/html", "comment": { "@type": "Comment" } } ], "suggestedAnswer": [ { "@type": "Answer", "position": 0, "text": "person.name = \"Max\";", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 1, "text": "person.add(\"name\", \"Max\");", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 2, "text": "person[\"name\"] = \"Max\";", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } }, { "@type": "Answer", "position": 3, "text": "person: {name: \"Max\"};", "encodingFormat": "text/html", "comment": { "@type": "Comment", "text": "" } } ] } ] }
Schlaukopf
.ai
Suche...
Passend...
Welche der folgenden Optionen ist ein gültiger Datentyp, um Text in JavaScript zu speichern?
Ganzzahl (Integer)
Liste (Array)
Wahrheitswert (Boolean)
Text (String)
Informatik Übungen werden geladen ...