← Quiz: JavaScript Basics: all 9 questions
Quiz: JavaScript Basics · Question 8 of 9
What does this print? (code)
What does this print?
console.log(typeof null, typeof undefined);
- A.null undefined
- B.object undefined
- C.object object
- D.undefined undefined
Answer & explanation
Correct answer: object undefined
typeof null is "object", a well-known historical quirk of JavaScript.
Can you get the rest right without peeking?
Take the timed Quiz: JavaScript Basics quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →