I need to make something like this, but I don't know how
var a = 5
function myFunction(x){
if(x != 4) {
x = 4;
}
}
myFunction(a);
//afterward, a should equal 4
The clue is, when this.x
changes, var a
should change too (I need to be able to make complicated operations on lots of variables and I want to do so by invoking a function)
Is it even possible?