【发布时间】:2015-06-26 01:10:49
【问题描述】:
我知道还有其他类似的问题,但我觉得他们好像没有回答我的问题。我基本上想制作动态变量名称。举个例子吧:
//Take the strings "new" and "variable" and make them into a variable.
"new" + "variable" = "Hello World";
//So technically the variable name is "newvariable" and has the value "Hello World"
所以基本上它需要两个字符串,并将它们组合成一个变量名。我该怎么做呢?
附注这不组合变量的值,只是名称
【问题讨论】:
-
哦,我从未在 SO 上找到该帖子,谢谢! :)
标签: javascript jquery