Q:

do while javascript

let i = 0;
while (i < 3) {
	console.log(i)
    i++;
} 
/*
Console:
0
1
2
*/
3
var text = "";
var i = 0;
do {
  text += "The number is " + i;
  i++;
}
while (i < 5);
6
do {
  //whatever
} while (conditional);
4
while (i < 10) {
  text += "The number is " + i;
  i++;
}
8

New to Communities?

Join the community