Answer the question
In order to leave comments, you need to log in
Creating an array with variable names, perhaps?
For example, there is an array that contains the names of variables. Is it possible to make the user enter the name of a variable and get an alert(the value of this variable) in response?
const all_name = ['var0','var1','var2','var3'];
var var1 = 0;
var var2 = 1;
var var3 = 2;
var var4 = 3;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question