---
title: "Discussion on \"Why typeof null Returns \"object\" in JavaScript\" | Hashnode"
description: "Discussion on \"Why typeof null Returns \"object\" in JavaScript\". In JavaScript, one of the quirks that has puzzled developers for decades is the fact that:\nconsole.log(typeof null); // Outputs: \"object\"\nThis behavior is often described as a \"historical bug\" in the language, and understanding why this happens requi..."
url: "https://hashnode.com/posts/why-typeof-null-returns-object-in-javascript/676668c7a2999238936dc869"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Why typeof null Returns "object" in JavaScript](https://mypersonalblog.hashnode.dev/why-typeof-null-returns-object-in-javascript?utm_source=hashnode&utm_medium=feed)

In JavaScript, one of the quirks that has puzzled developers for decades is the fact that: console.log(typeof null); // Outputs: "object" This behavior is often described as a "historical bug" in the language, and understanding why this happens requi...

Dec 21, 2024 · 2 min read · mypersonalblog.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#webdev](https://hashnode.com/tag/webdev)
-   [#web3](https://hashnode.com/tag/web3)
-   [#software-development](https://hashnode.com/tag/software-development)
-   [#devops](https://hashnode.com/tag/devops)
-   [#computer-science](https://hashnode.com/tag/computer-science)
-   [#coding](https://hashnode.com/tag/coding)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#codenewbies](https://hashnode.com/tag/codenewbies)
-   [#nodejs](https://hashnode.com/tag/nodejs)
-   [#tutorial](https://hashnode.com/tag/tutorial)
-   [#technology](https://hashnode.com/tag/technology)
-   [#beginners](https://hashnode.com/tag/beginners)
-   [#bugs-and-errors](https://hashnode.com/tag/bugs-and-errors)

## Written by

[sujitha](https://hashnode.com/@Sujitha17)

@Sujitha17 · Vijayawada,AndhraPradesh,India

  
[View profile](https://hashnode.com/@Sujitha17)

student at SRM University AP

I am a student at SRM University, AP pursuing my BTECH in CSE.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
