About 349,000 results
Open links in new tab
  1. JavaScript While Loop - W3Schools

    Example. The example below uses a do while loop. The loop will always be executed at least once, even if the condition is false, because the code block is executed before the condition is …

  2. JavaScript while Loop By Examples

    This tutorial shows how to use the JavaScript while loop statement to create a loop that executes a block as long as a condition is true.

  3. while - JavaScript | MDN - MDN Web Docs

    Mar 13, 2025 · The while statement creates a loop that executes a specified statement as long as the test condition evaluates to true. The condition is evaluated before executing the statement.

  4. JavaScript while and do...while Loop (with Examples) - Programiz

    The JavaScript while and do…while loops repeatedly execute a block of code as long as a specified condition is true. In this tutorial, you will learn about the JavaScript while and …

  5. 10 Exercises with While Loops in JavaScript - Medium

    Jul 19, 2024 · The syntax for a while loop in JavaScript is straightforward: while (condition) { // Code to be executed } condition : A Boolean expression that is evaluated before each iteration …

  6. JavaScript While Loop - GeeksforGeeks

    Nov 19, 2024 · The while loop executes a block of code as long as a specified condition is true. In JavaScript, this loop evaluates the condition before each iteration and continues running as …

  7. JavaScript - While Loops - JavaScript Control Flow - W3schools

    The while keyword tells JavaScript that we want to start a while loop. The condition is a boolean expression that's evaluated before each iteration of the loop. If the condition is true, the code …

  8. while loop in JavaScript - TutorialsTeacher.com

    JavaScript - While Loop. JavaScript includes while loop to execute code repeatedly till it satisfies a specified condition. Unlike for loop, while loop only requires condition expression.

  9. JavaScript while Loop: A Complete Tutorial with Examples

    Oct 3, 2024 · The while loop is a powerful tool in JavaScript for running a block of code as long as a specified condition remains true. It is particularly useful when you don’t know beforehand …

  10. JavaScript While - Loop Control Techniques - ZetCode

    Apr 16, 2025 · This example uses a while loop to repeatedly prompt the user for input until they type "quit". The loop condition checks the user's input. This pattern is common in command …

  11. Some results have been removed
Refresh