---
title: "Discussion on \"Types of memory in JavaScript\" | Hashnode"
description: "Discussion on \"Types of memory in JavaScript\". Stackmemory :- It stores primitive data type. Size is known as compile time. It stores static data. Allocated a fixed amount of memory.\n\nLet's understand by a simple code :\n\n\nHere, if num2 is equal to num1 then when we update the value of num2, num1 ..."
url: "https://hashnode.com/posts/types-of-memory-in-javascript/66532e5f323f596cab1e3913"
---

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

Discussion

# [Types of memory in JavaScript](https://devabhinav.hashnode.dev/types-of-memory-in-javascript?utm_source=hashnode&utm_medium=feed)

Stackmemory :- It stores primitive data type. Size is known as compile time. It stores static data. Allocated a fixed amount of memory. Let's understand by a simple code : Here, if num2 is equal to num1 then when we update the value of num2, num1 ...

May 26, 2024 · 1 min read · devabhinav.hashnode.dev  
Updated Dec 14, 2025  
Read the article

-   [#heap-memory](https://hashnode.com/tag/heap-memory)
-   [#memoryinjs](https://hashnode.com/tag/memoryinjs)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#stack-memory](https://hashnode.com/tag/stack-memory)
-   [#devabhinav](https://hashnode.com/tag/devabhinav)

## Written by

[Aditya Abhinav](https://hashnode.com/@devabhinav)

@devabhinav

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

Be consistent. Everything is possible :)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
