By value vs By Reference in JavaScript
In JavaScript, parameters are passed by value or by reference.
To understand the difference, let's understand how things are stored in memory on both the stack and the heap.
Recap of Stack
Purpose: Fast access, temporary storage
Contains:
Primitiv...
tigerabrodi.blog4 min read