"What's the typeof null?", and other confusing JavaScript Types
Read OriginalThis 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.
Comments
No comments yet
Be the first to share your thoughts!
Browser Extension
Get instant access to AllDevBlogs from your browser