Answers for "while syntax"

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
1

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
1

while loops python

while 10 > 8:
  print("Hello")
while not False:
  print("Hello")
while True:
    print("Hello")
Posted by: Guest on December-01-2020
0

while loop

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

while syntax

while(booleanExpression) { 
    //block of code to be executed
}
Posted by: Guest on June-25-2021
0

While loop

using System;

namespace Loop
{
	class WhileLoop
	{
		public static void Main(string[] args)
		{
			int i=1;
			while (i<=5)
			{
				Console.WriteLine("C# For Loop: Iteration {0}", i);
				i++;
			}
		}
	}
}
Posted by: Guest on October-13-2021

Browse Popular Code Answers by Language