en.javascript.info/1-js/02-first-steps/13-while-for/5-replace-for-while/task.md

14 lines
238 B
Markdown

importance: 5
---
# Replace "for" with "while"
Rewrite the code changing the `for` loop to `while` without altering its behavior (the output should stay same).
```js run
for (let i = 0; i < 3; i++) {
alert( `number ${i}!` );
}
```