2016-02-18 62 views

回答

0

不能使用車把這個樣子,還是否有工作的希望,這將打印字符串"variable_" + i

var variable_1 = "variableOne"; 
var variable_2 = "variableTwo"; 
var variable_3 = "variableThree"; 


    for (var i = 1; i <= 3; i++) { 
    console.log(window['variable_' + i]); 
    } 
相關問題