In my javascript I have this
loopDeLoop:
while (foo !== bar) {
switch (fubar) {
case reallyFubar:
You could set a flag that determines whether or not you are done working in the loop.
var done = false;
while (foo !== bar && !done) {
switch (fubar) {
case reallyFubar:
if (anotherFoo == anotherBar) {
done = true;
}
break;
default:
break;
}
if(!done) {
//If you have more logic inside the loop, put it here
}
}