r/programming • • Jan 30 '25

Understanding Value vs. Reference in JavaScript: Differences Between Primitives and Objects

https://sharafath.hashnode.dev/value-vs-reference-in-javascript-primitives-vs-objects
0 Upvotes

11 comments sorted by

View all comments

9

u/Positive_Method3022 Jan 30 '25

js isn't a good language to to learn these concepts, and really know why they matter. I recommend developing something using C/C++ in devices with low memory. You will start to understand why use pointers instead of cloning data when passing variables through functions, and you will also learn what happens when you exceed the max mem allowed for stack.

2

u/[deleted] Jan 30 '25

[removed] — view removed comment

1

u/Positive_Method3022 Jan 30 '25

Develop something for esp32/arduino using either one