4 ms·
If that is what you mean, then yes you are right. Pointers point at bits of memory (its literally an address to a physical piece of memory or virtual memory al
by a_humean 9y ago
If that is what you mean, then yes you are right.
Pointers point at bits of memory (its literally an address to a physical piece of memory or virtual memory allocated by something else - an OS for example) which store things like the 64bit floats '1' and '2' you are referring to in Javascript, and that is something someone writing C needs to think about pretty explicitly and is a source of errors. In Javascript you don't have to think about it very often in explicitly those terms as the runtime takes care of thinking about that for you.
You create all of these string, numbers, objects, etc... that the runtime has to keep track of for you using pointers, and once it thinks you are done with that memory it frees it up.
https://en.wikipedia.org/wiki/Garbage_collection_(computer_science) https://en.wikipedia.org/wiki/Garbage_collection_(computer_s...
However, as I and other have said, while someone writing JavaScript doesn't have to think much about memory, you still have to think about references and values. Its also the case that the Garbage Collector isn't perfect, and sometimes as a JavaScript programmer you can accidentally create memory problems of your own:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Memory_Management https://developer.mozilla.org/en-US/docs/Web/JavaScript/Memo...