Repeat Until Loop in JavaScript?
Question by Guest | Last update on 2021-06-13 | Created on 2013-03-06
I need a Repeat-Until loop in JavaScript, as it is possible, for example, in Delphi. So, I want to repeat something until a certain condition is met.
Is there such a loop in JavaScript? I've played around with different "Repeat" and "Until" combinations, but it is just not working.
Related Topics
JavaScript: Create and Use Arrays
Info | 0 Comments
jQuery: Scroll up and down with and without JavaScript
Tip | 0 Comments
JavaScript: Show and hide HTML area by clicking a link
Tutorial | 0 Comments
Is there a While-Loop in JavaScript?
Question | 1 Answer
jQuery: Disable Submit Button if no Checkbox is selected
Tutorial | 7 Comments
JavaScript: Catch Submit of Form
Tutorial | 0 Comments
HTML5: Upload Images with Client Side Resize
Tutorial | 9 Comments
Important Note
Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.
Participate
Ask your own question or write your own article on askingbox.com. That’s how it’s done.
The Repeat-Until-Loop in JavaScript is constructed with "do" and "while", for example like this:
The variable "k" will be increased as long as "k" is smaller than 10.
So, contrary to Delphi, the condition is reversed: The loop is not executed until the condition is met, but until the condition is no longer met.
Last update on 2021-06-13 | Created on 2013-03-07