en.javascript.info/1-js/02-first-steps/12-while-for/3-which-value-for/task.md
Ilya Kantor 0fcf9f84fa fixes
2017-03-24 17:28:37 +03:00

362 B

importance: 4


Which values get shown by the "for" loop?

For each loop write down which values it is going to show. Then compare with the answer.

Both loops alert same values or not?

  1. The postfix form:

    for (let i = 0; i < 5; i++) alert( i );
    
  2. The prefix form:

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