Feature: loop until a condition is met
See original GitHub issueIt can be useful to loop until a condition is met.
This could be done with something like a whileTrue
hook, which would call back with true
or false
to indicate whether the loop should continue and would have access to the full context
.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:12
- Comments:7 (3 by maintainers)
Top Results From Across the Web
How to repeat loop until condition is met? While or For Loop?
I wanted to create a loop until a certain condition is met, for example lets say I have constant x, that is included...
Read more >How to while loop that only run when certain condition is met
If it found a new record it will do function B and stop until the condition is met again. I'm new to programming...
Read more >Performing Actions Until a Condition is no Longer True Using ...
Javascript while loops only execute the instructions they contain if the end condition has not yet been met. Before each iteration of a...
Read more >VBA Do Until Loop - WallStreetMojo
Do Until Loop means to do something until the condition becomes TRUE. It is like a logical function that works based on TRUE...
Read more >Python While Loop (Tutorial With Examples) - Trytoprogram
Loops are either infinite or conditional. Python while loop keeps reiterating a block of code defined inside it until the desired condition is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Let’s say you have a chat room which is full and users sometimes leave the room. You might want to loop sending a join-room event until you can finally join (someone left and the room is not full anymore).
Thanks for the info @joesb. Always helpful to have some real use cases in mind when adding a feature!