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?

28th May 2019, 10:12 AM
Roberto Sevilla Varela
Roberto Sevilla Varela - avatar
1 Réponse
0
In JavaScript not exists pointers. Use class or functions.
28th May 2019, 11:51 AM
Jônatas Araripe
Jônatas Araripe - avatar