---
title: "Discussion on \"Understanding JS Memory Allocation: Undefined vs Not Defined\" | Hashnode"
description: "Discussion on \"Understanding JS Memory Allocation: Undefined vs Not Defined\". Decoding Memory Allocation in Javascript."
url: "https://hashnode.com/posts/understanding-js-memory-allocation-undefined-vs-not-defined/65a5413d6283e36eb0cb297e"
---

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

Discussion

# [Understanding JS Memory Allocation: Undefined vs Not Defined](https://precodes.hashnode.dev/understanding-js-memory-allocation-undefined-vs-not-defined?utm_source=hashnode&utm_medium=feed)

Decoding Memory Allocation in Javascript.

Jan 15, 2024 · 2 min read · precodes.hashnode.dev  
Updated Jan 16, 2024  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#namaste-javascript](https://hashnode.com/tag/namaste-javascript)
-   [#beginners](https://hashnode.com/tag/beginners)
-   [#fundamentals](https://hashnode.com/tag/fundamentals)

## Written by

[Prerana Nawar](https://hashnode.com/@precodes)

@precodes · Mumbai, India

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

## Responses 1

Markdown supported · ⌘↵ to post

[Satish](https://hashnode.com/@techwithsatish)

[Feb 2, 2025](https://hashnode.com/posts/understanding-js-memory-allocation-undefined-vs-not-defined/65a5413d6283e36eb0cb297e/comment/679f0608cd473bfec46f0885)

[Prerana Nawar](https://hashnode.com/@precodes)Thanks for the information: 'undefined' means waiting for it to be defined, which may or may not assign other( other then defalut value : undefined) value in future. However, during memory allocation, the memory is allocated for it. On the other hand, 'not defined' is a reference error because memory space is not allocated for it, and we did not even declare the variable.
