whileLoops as long as the condition is true.Syntaxwhile (condition) { }DescriptionWhen the number of repetitions is unknown. Don't forget to increment.ExampleLoading editor…▶ Try it yourselfExpected output0 1 2When to use?Indefinite repetition.Related commandsfor← for-each ( : )