In my javascript I have this
loopDeLoop: while (foo !== bar) { switch (fubar) { case reallyFubar: if (anotherFoo == anotherBar) { break loopDeLoop; } break; default: break; } }
But JSLint says... lint warning: use of label
http://www.jslint.com/lint.html http://www.jslint.com/lint.html
Labels
JavaScript allows any statement to have a label, and labels have a separate name space. JSLint is more strict. JSLint expects labels only on statements that interact with break: switch, while, do, and for. JSLint expects that labels will be distinct from vars and parameters.
How do I construct the above to get rid of the warning?
Thanks,
Greg