Quiz di JavaScript: 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.

Facile 10 domande ~5 minuti Superato con il 80% Node.js 22

Scegli una modalità

Stai giocando come ospite: accedi per salvare XP e serie.

Domanda di esempio

Domanda 1 di 10

What does this print?

console.log(typeof 42);
Mostra la risposta

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).

Cosa copre questo 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()

Domande frequenti

Serve un account?

No. Chiunque può giocare. Accedi per salvare XP, serie, badge e cronologia.

Posso rifarlo?

Sì. Il tuo miglior punteggio resta salvato, e domande e risposte vengono mescolate ogni volta.