379 B
379 B
importance: 4
Which values shows the while?
For every loop, write down which values it shows, in your opinion. And then compare with the answer.
Both loops alert
same values or not?
-
The prefix form
++i
:let i = 0; while (++i < 5) alert( i );
-
The postfix form
i++
let i = 0; while (i++ < 5) alert( i );