---
title: "Discussion on \"Memory Management in JS\" | Hashnode"
description: "Discussion on \"Memory Management in JS\". When you call a function in JS like this:\nfunction greet(name) {\nlet message = \"Hello, \" + name;\nreturn message;\n}\ngreet(\"Shubhradeep\");\n✅ name and message are stored in the call stack (temporary memory).\nThe reference to the heap string (\"Hello, Shu..."
url: "https://hashnode.com/posts/memory-management-in-js/6873dd3da2d980550dda684a"
---

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

Discussion

# [Memory Management in JS](https://memory-management-in-js.hashnode.dev/memory-management-in-js?utm_source=hashnode&utm_medium=feed)

When you call a function in JS like this: function greet(name) { let message = "Hello, " + name; return message; } greet("Shubhradeep"); ✅ name and message are stored in the call stack (temporary memory). The reference to the heap string ("Hello, Shu...

Jul 13, 2025 · 2 min read · memory-management-in-js.hashnode.dev  
Read the article

-   [#easytoexplain](https://hashnode.com/tag/easytoexplain)

## Written by

[Shubhradeep](https://hashnode.com/@Shubhradeep)

@Shubhradeep · Kolkata, West Bengal, IND

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

Software Engineer

Full-Stack Developer with 1.5 years of experience building scalable, secure web applications using React, Node.js, and PostgreSQL. Skilled in REST APIs, backend architecture, authentication (JWT/JWE), and modern frontend tools. Proven ability to enhance system efficiency, SEO, and user experience.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
