JavaScript & TypeScript / Quiz
null, undefined, and typeof Surprises
Empty values, typeof quirks, template literals, and which names JavaScript will accept as a variable.
- Difficulty
- Easy
- Format
- Quiz
- Points
- 100
- Estimate
- 7 min
// MISSION BRIEF
Your Mission
JavaScript has two ways to say nothing, one operator that reports types, and three kinds of quotes that do not behave the same.
For each snippet, predict exactly what Node prints. If the code throws, pick the error. Run nothing: read it the way the engine does, top to bottom.
Speed bonus active.
// FIRST CONTACT
Battle teaser
What does this print? If it throws, pick the error. let token; console.log(token); console.log(typeof token);
- Aundefined, then object
- Bundefined, then undefined
- Cnull, then object
- DReferenceError
Answers, scoring, hints, and the full battle stay sealed.
// SKILL TAGS
javascriptfundamentalstypesnulltemplate-literals