Im working on a project, and in an attempt to shorten the amount of code I wrote a function to call all of them at once. It looks something like this function Function(peram1) {peram1 = peram1 += 5};
And I call it like so Function(someVariable)
My issue is that I need to change the variable someVariable from inside the function, even though the value of peram1 is simply just the value of someVariable, but cant directly change it. I call multiple of these functions, so I cant simply just call the actual variable name from within.
var someVariable = 5;
var someSeperateVariable = 8;
function Function(peram1) {
peram1 = peram1 += 5;
};
Function(someVariable);
Function(someSeperateVariable);
console.log(someVariable, someSeperateVariable);