while loop

while (10 > 1) {
  console.log("HI");
}

3
1
Delliottg 100 points

                                    var i=1;
while(i<=10){
document.write(i + "<br>");
i++;}

3 (1 Votes)
0
3.5
4
FisherInfo 95 points

                                    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;
}

3.5 (4 Votes)
0
4.25
8

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

var i = 0;

while(i < 10) {
	console.log(i); i++
}

4.25 (8 Votes)
0
3.8
9
Qubit 115 points

                                    #include<stdio.h>

int main()
{
    printf("\n\n\t\tStudytonight - Best place to learn\n\n\n");

    /* 
        always declare the variables before using them 
    */
    int i = 0;  // declaration and initialization at the same time

    printf("\nPrinting numbers using while loop from 0 to 9\n\n");

    /* 
        while i is less than 10 
    */
    while(i<10)
    {
        printf("%d\n",i);

        /* 
            Update i so the condition can be met eventually 
            to terminate the loop 
        */
        i++;    // same as i=i+1;
      }
    printf("\n\n\t\t\tCoding is Fun !\n\n\n");
    return 0;
}

3.8 (10 Votes)
0
4
2
Serj.by 125 points

                                    
while (condition is true) {

  code to be executed;

 }

4 (2 Votes)
0
Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
while loop loop use of the while loop Syntax for while loop example of do while loop how Do while loop how to code a while loop what is a while loop for loop do while loop when we use for loop and while loop while(i<10); what does a while loop do what does while(i--) do while loop != while wend loop are while loops still used for to while loop can you put ; in while loop while loop and do while loop examples while and for loop do while loop example in where we use while loop (for|while)\((.*?)\) do while loop hs why do while loop is used while do while loop while loop use what is a while loop used for while with for loops while loop in a while loop when would you use a while loop , in while loop Write the syntax of while loop? for loop in while loop for loop in whileloop for loops or while loop? What does do while loop do why ever use while loop can you do a while loop in a while loop the while loop is a loop while loop examples while loop example function how does while loop works while statements while (a--) when is a while loop used what is a do-while loop while for loop how the while loop works where would I use while loops what is a for loop and a while loop do while loop is a/an loop while loop condition should be how to use do while loop while loops i using for loop for while how not to use a while loop while loop working while( i --) while loop tutorial while(;;) while in while loop example while in whilw loop example do while loop explained how to loop in while define do while loop while(): using a while loop while loop code can we use while loop inside while loop how to do a while loop using while loop can a while loop be in a for loop What is correct syntax of for, while and do while loop? while loop hs How to properly do a while loop what's a while loop when to use the while loop can a do while loop do anything as a for loop while (!![]) explain while statement what are while loops used for while loop *= syntax of do while loop syntax of while loop do while loop examples is do while a loop how to do while loop in function when to use while loop while(i<=10); while loops and for loops what is the use of ; in while loop when to use while loops Loop While while statement. do…while statement. for statement. loop statement. while(i) while cycle while(i--) when to use do while while loop w while loop while loops in while loops while loopback loop while(!) what si a while loop can there be a do while loop inside a do while loop while and do while while(a[]) while use to loop while loops code for while loop how can a while loop be written as a for loop example of while loop while loop with while syntax when should we use while loop and for loop while(); means when to use for loop and while loop what is while loop what are while loop in programming use of do while loop while ( when to use for and while loop while loop statement for while example what is do while meaning of a do while loop how while loop works who uses while loops while and do while loop do anyone use do while loop how to use while loop can a while loop be written as a for loop? do while while do what does a while loop do? why we use while loop looping for while loop for and do while loops for loop while loop do while loop when to use a for loop and while loop while to do while while (1); ? example while loop when to use a while loop and a for loop where to use do while loop and while loop while loop programming can you put a while loop in a while loop when use while loop which loop to use while or for when do we use for loop and while loop what happens when a while loop is in a while loop What is a do while loop? Demonstrate with an example? what is a do while loop while loop in how does while loop work while for do while while(--i) while loop definition syntax of while and for loop while () { while loop to for loop when to use while and for loop whileloop for loop which is better to use can you have a while loop in a while loop why while loop is used how to use a while loop for while do while what is do while loop can you write a for loop in a while loop how does the while loop works while loop example why to use a do while loop while loop syntax should i use do while loop when to use do while loop what to use instead of while loop while do while a for loop and do while loop what not to do in a while loop while loop' for loop to while loop loop while in while do while loop syntax while function for loop or while loop while fread uses of do while loop while loop ;t syntax of do while loop while() how to use while loop in when to use a while loop how to make while loop while loop or while-loop do while loops do while syntax while example while loops Do while and while do-while loops how to syntax do while what are while loop intended for use while loop in for loop using for loop as while while do loop for loops and while loops when to use while loop and for loop how does a while loop work do while loop example while loop condition for loop and while loop while loop meaning how to use the while loop do-while loop syntax while loop while loop do while loop
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source