I have an array A and a function that generates me an array B
var A = ["test"];
var B = ["hello", "world"];
var C = A;
How to make it so A = B (contains all and only the values in B) without changing its reference, so C also contains all and only the values in B.
Ato point toBafterChas already been pointed toA. So, after changing the reference, printingCwould in fact print the contents ofB. I'm fairly sure this isn't possible based on the quesiton/answer stackoverflow.com/questions/6605640/…