javascript typeof | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

javascript typeof

why does javascript return ==> typeof null //as object instead of typeof null //as null ?????

6th Oct 2017, 7:58 PM
Ilesanmi Manioc Haderibigbe
Ilesanmi Manioc Haderibigbe - avatar
1 Answer
+ 2
cause null is object. There is no such type as null. Use google to check all possible js data types.
6th Oct 2017, 8:35 PM
Rose Sevenyears
Rose  Sevenyears - avatar