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