Skip to content

re: prototype, __proto__ and Prototypal inheritance in JavaScript VIEW POST

re: Just because I ran into this earlier this week I wanted to let you know that null actually is an object. Sry to be the well actually guy. Wish I co...

Hey Schuster, there's no harm with sharing information. 😄 Thanks for reading, I hope this was informative. I was not sure if I should point it in this article as this is not entirely related to prototype inheritance - (and I hate to be that guy as well 😅) null is not an Object. It is a separate primitive in JavaScript. The reason why typeof null returns Object is a legacy bug in JavaScript which can't be fixed. More on this -

code of conduct - report abuse