Memory Management in JS
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...
memory-management-in-js.hashnode.dev2 min read