What will be the output of console.log(typeof null); in JavaScript?

  • "object"
  • "null"
  • "undefined"
  • "number"
The expression console.log(typeof null); in JavaScript will output "object." This is a quirk in JavaScript because typeof null returns "object," even though null is not an object but a special value representing the absence of a value.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *