en.javascript.info/1-js/02-first-steps/12-while-for/2-which-value-while/task.md
Ilya Kantor 9ad9063d00 up
2016-11-28 21:35:42 +03:00

342 B

importance: 4


Which values shows the while?

For every loop, scribe down which values it shows, in your opinion.

And then compare with the answer.

  1. The prefix form ++i:

    let i = 0;
    while (++i < 5) alert( i );
    
  2. The postfix form i++

    let i = 0;
    while (i++ < 5) alert( i );