javascript while
snippet in javascript

js while

user9580

let i = 0;
while (i < 3) {
	console.log(i)
    i++;
} 
/*
Console:
0
1
2
*/

javascript while

user5858

var i=0;
while (i < 10) {
	console.log(i);
	i++;
}
//Alternatively, You could  break out of a loop like so:
var i=0;
while(true){
	i++;
	if(i===3){
		break;
	}
}

javascript while loop

user6090

while (i < 10) {
  text += "The number is " + i;
  i++;
}

javascript while loop

user1048

while(condition) {
  //whatever
}

boucle for in js

user9571

let panier = ['fraise', 'banane', 'poire'];

for (const fruit in panier) {
    console.log(panier[fruit]);
}

java while

user678

while (condition) {
  // code block to be executed
}