0
Why 4
var x=new Array(1,2,3,4,5); var count=0; for (var i = 0; i < 5; i++) { if (x[i]>i) count=count+1 } alert(count)
1 Resposta
+ 2
count=0
x[0]>0? = 1>0? True, so count=1
2>1? True, count=2
3>2? count=3
4>3? count=4
5>4? count=5
alert(5)
var x=new Array(1,2,3,4,5); var count=0; for (var i = 0; i < 5; i++) { if (x[i]>i) count=count+1 } alert(count)