Angus Croll 8/8/2011

Fixing the JavaScript typeof operator

Read Original

This technical article details the well-known limitations and inconsistencies of JavaScript's typeof operator, such as 'typeof null' returning 'object'. It then introduces the concept of the internal [[Class]] property as a foundation for building a more accurate and discriminating type-checking function.

Fixing the JavaScript typeof operator

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser