A

Admin • 833K Points
Coach

Q. What will be the output of the following code?

Code:
console.log(typeof null);
  • (A) object
  • (B) null
  • (C) undefined
  • (D) number
  • Correct Answer - Option(A)
  • Views: 20
  • Filed under category JavaScript
  • Hashtags:

Explanation by: Admin

In JavaScript, the typeof null is 'object'. This is a known bug in the language.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.