O'Reilly logo
  • Ahmed Elgendy thinks this is interesting:

If undefined is a value, does it have a type?


A: Yes, it does. The type of undefined is undefined. Why? Well our logic (work with us here) is this: it isn’t an object, or a number or a string or a boolean, or really anything that is defined. So why not make the type undefined, too? This is one of those weird twilight zones of JavaScript you just have to accept.


Cover of Head First JavaScript Programming


What is the type of Undefined?