Ire Aderinokun 2/21/2017

"What's the typeof null?", and other confusing JavaScript Types

Read Original

This article details the JavaScript typeof operator, listing its standard return values and then examining confusing cases. It explains why typeof null returns 'object', why NaN is considered a 'number', why arrays are 'objects', and why the result of typeof is always a string. It provides technical context for these behaviors.

"What's the typeof null?", and other confusing JavaScript Types

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

1
The Beautiful Web
Jens Oliver Meiert 2 votes
3
LLM Use in the Python Source Code
Miguel Grinberg 1 votes
4
Wagon’s algorithm in Python
John D. Cook 1 votes