Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q181 How can I make a new variable with a name based on the value of another variable?

You are here: irt.org | FAQ | JavaScript | Misc | Q181 [ previous next ]

<SCRIPT LANGUAGE="JavaScript"><!--
var a = 'name';

eval('var ' + a + ' = "value"');

alert(name);
//--></SCRIPT>

Feedback on 'Q181 How can I make a new variable with a name based on the value of another variable?'

©2018 Martin Webb