About 33,000,000 results
Open links in new tab
  1. JavaScript For Loop - W3Schools

    JavaScript supports different kinds of loops: The for statement creates a loop with 3 optional expressions: Expression 1 is executed (one time) before the execution of the code block. …

  2. Using for loops and while loops in a shell script - The Shell …

    Most languages have the concept of loops: If we want to repeat a task twenty times, we don't want to have to type in the code twenty times, with maybe a slight change each time. As a …

  3. Bash Scripting - For Loop - GeeksforGeeks

    Sep 15, 2023 · To execute a for loop we can write the following syntax: echo $n. In the first iteration, n takes the value "a", and the script prints "a". In the second iteration, n takes the …

  4. 9 Examples of for Loops in Linux Bash Scripts - How-To Geek

    If you're looking to write your first for loop, these simple examples will get you started. You can run a for loop on the command line. This command creates and executes a simple for loop. …

  5. Loops and iteration - JavaScript | MDN - MDN Web Docs

    Apr 10, 2025 · Loops offer a quick and easy way to do something repeatedly. This chapter of the JavaScript Guide introduces the different iteration statements available to JavaScript. You can …

  6. How do I write a 'for' loop in Bash? - Stack Overflow

    Sep 8, 2008 · I'm looking for the basic loop like: for (int i = 0; i < MAX; i++) { doSomething(i); } but for bash.

  7. JavaScript for loop (with Examples) - Programiz

    In JavaScript, the for loop is used for iterating over a block of code a certain number of times, or to iterate over the elements of an array. Here's a quick example of the for loop. You can read the …

  8. Loops - Bash Scripting Tutorial

    Bash loops are very useful. In this section of our Bash Scripting Tutorial we'll look at while loops, until loops and for loops with plenty of sample code.

  9. PowerShell For Loop [With Examples]

    Jul 10, 2024 · In this tutorial, I will show you how to work with the PowerShell for loop with various examples. What is a for loop in PowerShell? A For loop in PowerShell is a control flow …

  10. Bash Script for Loop Explained with Examples | phoenixNAP KB

    Dec 15, 2021 · Use the for loop to iterate through a list of items to perform the instructed commands. The basic syntax for the for loop in Bash scripts is: <commands> The element, …

Refresh