0

Help simple - while loop

Im trying to solve the times up challange in training with a while loop. I dont understand why this doesnt produce a list counting down from 10 to 1 var i= 10; while (i > 0) { document.write(i + "<br />"); i--; } Can anyone help explain to me

24th Mar 2021, 2:23 PM
Leanne Smith
Leanne Smith - avatar
2 odpowiedzi
+ 2
in code coaches you must do output by using console.log and "\n" for break line char...
24th Mar 2021, 2:26 PM
visph
visph - avatar
- 1
Use document. innerHTML
25th Mar 2021, 11:47 AM
Zakaria Elalaoui
Zakaria Elalaoui - avatar