0
How can I change a static element in array using variable in JS?
So I declared and array of strings with variables in it like this: Var name="John"; Var arr=["Hi"+name]; But if I change the variable and print the array element, the element is static and shows "Hi John" but I want it with the new value. Is it possible? If so, how?
1 Respuesta
0
In JavaScript not exists pointers.
Use class or functions.