0

Convert the following into do while loop.

var i=0 for (i=1;i<=20;i++) { document.write(i+""); i+=2; }

17th Feb 2017, 9:51 AM
Abhinav
3 Answers
+ 2
OK thx😁
17th Feb 2017, 10:29 AM
Julian Aung
Julian Aung - avatar
+ 1
How about this.. int i=0; do (i=1;i<=20;i++) { document.write(i+""); i+=2; } while(true);
17th Feb 2017, 10:03 AM
Julian Aung
Julian Aung - avatar
0
@djthenoob That is not how to write a do...while loop. Check it, and you'll get an error. var i = 1; do { document. write(i); i += 3; } while (i <= 20)
17th Feb 2017, 10:28 AM
John Afolayan