Can you directly edit a javascripts variable in memory, similar to how pointers work in C++?
I have the following example that works but just…feels unsafe to use:
const testFunction = async () => {
x = x + 20
}
I realize that the global scope is in play here, but surely there’s a better way to manipulate the memory directly?
Thank you!
I was hoping there’s a more direct way of doing the manipulation, especially if the variable needs to be referenced over several files.