0
How the Result is 120 ??? And why curly braces empty here???
var x=1; for(x; x<10;x++){} x+=x+100; document.write(x); //Ans: 120
2 Respostas
+ 1
Because in the for loop you increment x 9 times, so x = 10 after the loop.
In the for loop, you do nothing except increment x 9 times.
x += x(which is 10 now) + 100
So x += 110
x = 120
0
Thanks