MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/abi4hd/deleted_by_user/ee0ffdh/?context=3
r/badcode • u/[deleted] • Jan 01 '19
[removed]
87 comments sorted by
View all comments
Show parent comment
2
The main use is that it doesn't run when you break out of the loop, which makes it useful for writing e.g. searches, where you want to do something when you didn't find the result.
2 u/Tynach Jan 14 '19 Yeah, I read a bit about it on my own after getting the other person's reply. Sounds rather elegant, really, and I'm glad I know about it now!
Yeah, I read a bit about it on my own after getting the other person's reply. Sounds rather elegant, really, and I'm glad I know about it now!
View all comments
Show parent comment
2
u/raoz Jan 13 '19
The main use is that it doesn't run when you break out of the loop, which makes it useful for writing e.g. searches, where you want to do something when you didn't find the result.