What is the output of the following code snippet? console.log(typeof null); console.log(typeof undefined);

Select the correct answer: Single Choice

Key points

  • null is an object type in JS
  • undefined is its own primitive type
  • typeof is unreliable for null checks

Ready to go further?