PRACTICE / UNDERSTAND / REPEAT

JavaScript practice question

Practice values & types with self-contained questions. Check your answer, then use the explanation to understand the reasoning.

1 questionAnswers explainedFree · no login

Try this question

Values & types · MCQQuestion link ↗

What does `typeof null` return in JavaScript?

Choose one answer
Answer & explanation

Answer: "object"

This is a longstanding JavaScript quirk: `null` is a primitive, but `typeof null` returns `"object"`.