1. Home
  2. Computer Science MCQs
  3. Javascript
  4. What does typeof null return in JavaScript?

Added 2 Nov 2026

What does typeof null return in JavaScript?

  1. "number"
  2. "object" Correct answer
  3. "null"
  4. "undefined"

Correct answer

B. "object"

16 views

MCQSEXAM

Explanation

typeof null === "object" is a long-standing quirk from JavaScript's first implementation that was kept for backward compatibility. To check for null, use value === null.

Reference

Asked in: Frontend Developer Tests, Technical Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is B? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Javascript MCQs

Practise all Javascript MCQs

Similar MCQs