DEV Community

Discussion on: JavaScript Interview Question #40: What is the type of `undefined` in JS?

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

If typeof(undefined) == undefined, that'd mean undefined has no type, so it makes sense for the string "undefined" to be returned instead :D

Collapse
 
coderslang profile image
Coderslang: Become a Software Engineer

Hold on, typeof null is coming right after you :)

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

Hey, I never claimed JavaScript is a sane language overall :D