【单选题】分析下面的JavaScript代码段:
A: = new Array("100","2111","41111");
for(var i = 0;i < a.length;i++ ){
document.write(a[i] + " ");
}
输出结果是(选一项)
A.100 2111 41111
B: 1 2 3
C: 0 1 2
D: 1 2 4
A: = new Array("100","2111","41111");
for(var i = 0;i < a.length;i++ ){
document.write(a[i] + " ");
}
输出结果是(选一项)
A.100 2111 41111
B: 1 2 3
C: 0 1 2
D: 1 2 4
举一反三
- 分析下面的JavaScript代码段: var a = new Array("100","2111","41111"); for(var i = 0;i < a.length;i++) { document.write(a[i]+" "); } 执行输出结果是( )。[/i] A: "100"+"2111"+"41111" B: "100211141111" C: "100+2111+41111" D: 100 2111 41111
- 分析下面的JavaScript代码段:var a = new Array("100","2111","41111");for(var i = 0;i < a.length;i++){ document.write(a[i]+" "); }执行输出结果是( )。[/i] A: "100"+"2111"+"41111" B: "100211141111" C: "100+2111+41111" D: 100 2111 41111
- 分析下面的JavaScript代码段:a=newArray("100","2111","41111");for(vari=0;i<a.length;i){document.write(a[i]"");}输出结果是()。[/i] A: 100211141111 B: 123 C: 012 D: 124
- 下面程序段的结果是()var a=["100","2111","411"];for(i in a){document.write(i); A: 100 2111 411 B: 1 2 3 C: 0 1 2 D: 1 2 4
- 【单选题】分析下面的JavaScript代码段 A: = new Array(2,3,4,5,6);<br>sum = 0;<br>for(i=1;i sum += a[i];<br>document.write(sum);<br>输出结果是(选一项)<br>A.20 B: 18 C: 14 D: 12