Answers for "what is while loop"

5

while loop in python

j = 0
while j < 3:
  print("hello") # Or whatever you want
  j += 1
#This runs the loop until reaches 3 and above
Posted by: Guest on November-26-2020
1

while loop

Create a loop that runs as long as i is less than 10.

var i = 0;

while(i < 10) {
	console.log(i); i++
}
Posted by: Guest on June-10-2021
0

while loop

Create a loop that runs as long as i is less than 10, but increase i with 2 each time.

var i = 0

while(i < 10){
	console.log(i);
    i = i + 2;
}
Posted by: Guest on June-10-2021
0

while loop

var i=1;
while(i<=10){
document.write(i + "<br>");
i++;}
Posted by: Guest on April-21-2021
0

while loop

while (condition is true) {

  code to be executed;

 }
Posted by: Guest on June-08-2021
0

Example of While Loop

public class Test {

   public static void main(String args[]) {
      int x = 10;

      while( x < 20 ) {
         System.out.print("value of x : " + x );
         x++;
         System.out.print("n");
      }
   }
}
Posted by: Guest on August-31-2021

Code answers related to "what is while loop"

Python Answers by Framework

Browse Popular Code Answers by Language