JavaScript-Quiz: Types & typeof

This JavaScript quiz covers the primitive types and objects, and what the typeof operator says about each. You will meet the famous quirks, like typeof null and typeof NaN, and learn the right way to check for an array.

Leicht 10 Fragen ~5 Minuten Bestanden ab 80% Node.js 22

Modus wählen

Du spielst als Gast: Melde dich an, damit XP und Serie gespeichert werden.

Beispielfrage

Frage 1 von 10

What does this print?

console.log(typeof 42);
Lösung zeigen

A. number JavaScript has one number type for both whole numbers and decimals, and typeof returns lowercase strings. There is no separate integer type (except bigint for very large values).

Darum geht es in diesem Quiz

  • The primitive types and objects
  • What typeof returns for numbers, strings, functions and arrays
  • The typeof null quirk
  • undefined vs null
  • Checking for arrays with Array.isArray()

Häufige Fragen

Brauche ich ein Konto?

Nein. Jeder kann spielen. Mit Anmeldung werden XP, Serie, Abzeichen und Verlauf gespeichert.

Kann ich es wiederholen?

Ja. Dein Bestwert bleibt erhalten, und Fragen und Antworten werden jedes Mal neu gemischt.