Answer the question
In order to leave comments, you need to log in
Is it possible to create a variable from user-written data about it?
How to create a variable from user input? For example
var [user-entered variable name] = [user-entered variable value]
Answer the question
In order to leave comments, you need to log in
var a = 'varname';
var str = a+' = '+'123';
eval(str)
alert(varname);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question