When an action needs to be repeated a large number of times, cycles are used in programming. For example, you need to display the text 📜 "Hello, World!" 🌎. Instead of repeating the same text output command 📜 two hundred times, a loop is often created that repeats 200 times what is written 🖊️ in the body of the loop. Each repetition is called an iteration.
Iteration in programming - in the broadest sense - the organization of data processing in which actions are repeated many times, without leading to calls 📞 themselves (as opposed to recursion). In a narrow sense, it is one step in an iterative, cyclical process.
while operator creates a loop that executes the specified instruction while the condition being tested is true. The logical value of the condition is calculated вычис before executing the loop body.
- MDN web doc. The article "The do ... while loop"
- MDN web doc. For Loop Article
- MDN web doc. The while loop
- While and for Loops
Thanks goes to these wonderful people (emoji key):
🐛 🎨 🖋
🖋 🐛 🎨