+ 3
Could someone explain me how this code works line to line? Thanks.
var x=0; var a=[3,4]; a[x]=++x; document.write(a[0]);
2 Answers
+ 8
a[x]= ++x
a[0]=1
Output: 1
+ 4
That will rewrite former value? a[0] was 3.
var x=0; var a=[3,4]; a[x]=++x; document.write(a[0]);