0
⭐How to change variable name dynamically?
Example: words = {Apple, Avocado}; // will be different, different amount, i will not know them array = {}; array.fruitApple = 5; array.fruitAvocado = 20; console.log(array); I need add to array keys that starts with "fruit" and ends with different words from "words". And then output in console.
3 Respostas
0
Mirielle Thank you very very much!!!🤗
0
You cannot do this.
However :
1.You can assign a new value.
2 Nullify it
3.Garbage collect it.