Output-Based JavaScript Questions

This JavaScript quiz collects the "what does this print?" snippets that come up again and again in interviews. You will reason about typeof, type coercion, hoisting, this, sorting and the order of timers and promises.

Mittel 10 Fragen ~6 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 null, typeof [], typeof NaN);
Lösung zeigen

A. object object number typeof null is "object", a famous historical bug. Arrays are objects (use Array.isArray() to tell them apart), and NaN is a value of type number.

Darum geht es in diesem Quiz

  • typeof surprises and floating point results
  • Coercion with + and ==
  • Hoisting of var and function expressions
  • this in regular vs arrow callbacks
  • Microtasks vs setTimeout order

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.