Something went wrong. Try again.
Something went wrong. Try again.
Loop (Control Flow) #
A loop is a piece of code which will be executed multiple times, in a loop. Loops are provided by most @[imperative][imperative-programming] languages as one of the main @[control flow][] options, while @[functional][functional-programming] languages often do not provide loops, and instead rely on @[recursion][].
There are a few common forms in which loops are often available:
- @[Indexed
forloops][] - @[
whileloops][] - @[
foreachloops][] - @[Infinite loops][]