Skip to content

EasyConceptJavaScript internals

What does typeof null return and why?

What a good answer covers

It returns 'object', a historical bug in the language that was kept for compatibility. Check for null explicitly with value === null.

More on JavaScript internals

Flashcards for this topic