whileLoops as long as the condition is true.Syntaxwhile [ condition ]; do ... doneDescriptionRepeats the block as long as the condition is met.ExampleLoading editor…▶ Try it yourselfExpected output0 1 2When to use?Indefinite repetition.Related commandsfor← for