解決方案:
function create_variable(num){
var name = "test_"+num; //生成函式名
window[name] = 100;
window['name'] = 200; //注意看中括號裡的內容加引號和不加引號的區別
}
參考連結:https://blog.csdn.net/qq_31238721/article/details/78257449
解決方案:
function create_variable(num){
轉載於:https://www.cnblogs.com/Neilisme/p/8757932.html