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.
Loading...
Related Quiz
- The HTTP status code ________ indicates that the request has succeeded.
- What is a property in JavaScript objects?
- You are reading through a codebase and find that a block of code within an "else if" statement is not being executed, despite it seeming like the condition should be true. What are some steps you could take to troubleshoot this issue?
- A function declaration is hoisted to the top of the ________ in which it was defined.
- The createElement method is used to create a new element in the _________.