r/badcode • • Jan 01 '19

[deleted by user]

[removed]

137 Upvotes

87 comments sorted by

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.

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!