- 1
Why total 9
var x =1; var arr=[2,3,7]; arr[x]=arr[x+1]; alert(arr[0]+arr[1])
2 Antworten
+ 1
arr[1] = arr[1+1]
so arr[1] which was 3 becomes arr[2] which is 7
arr[0] which is 2 plus arr[1] which is 7 equals 9
0
thx so much I understand all
var x =1; var arr=[2,3,7]; arr[x]=arr[x+1]; alert(arr[0]+arr[1])