I am looking for an element in multiple while loops, but if the element is found, I don't need to check the following while loops. How can I achieve something like this?
while(something) {
if (this = key) {
// break this loop and skip the next ones. Otherwise proceed to next.
}
}
while(somethingelse) {
if (this = key) {
// break this loop and skip the next ones. Otherwise proceed to next.
}
}
while(somethingthird) {
if (this = key) {
// break this loop and skip the next ones. Otherwise stop looking.
}
}