Can someone explain to me? JS Increment Decrement
Code 1: <script> var x = 1; for(;x<6;x+=2){ x=x*x; } document.write(x) </script> here in this code, even after the condition is false, the part that increments is executed last time. --###---####----#####-----#####------###### Code 2: <script> var x = 0; for(;x<8;x++){} document.write(x); for(;x>4;x-=2){} document.write(x); </script> here in this code, even after the condition is false, the incrementing part is no longer executed. Why does it happen? or am I wrong?