I'm setting an array equal to another array.
So let's say array B = array C.
Then, if I do operations on array B, changing it's values, does C also change?
I want to say absolutely not, but I'm having a brain fart and I feel like that what's happening in my code right now.
When you assign one array to another array the array will hold the reference so if you change the value in one array then it will surely change the value of other.
like in your example array B = array C. B will hold the reference to array C. so any changes in array B will reflect in array C.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With