is there a way to pass a variable itself, not a value in javascript? I remember being able to do so in flas as3 if i remember correct which was based on javascript. I'm not sure why i can't do the same here. Your help would be much appreciated.
variable1: false, function1() { this.variable1 = true //this works of course console.log(this.variable1) prints true } function2() { var temparray1 = [this.variable1] temparray1[0] = true //does not work like i want, it's the value in the array that change, not this.variable1 console.log(this.variable1) //prints still false console.log(temparray1[0]) //prints true }