Javascript Switch Within For-loop Break; Conflicts
I have switch nested with loop in JavaScript like: for (var i = 0; i < checkBoxIds.length; i++) { if ($('#' + checkBoxIds[i]).prop('checked')) { var id = che
Solution 1:
That is exactly what labels are for:
theloop:
for (var i = 0; i < checkBoxIds.length; i++) {
...
switch (id.substring(id.length - 3)) {
...
break theloop;
// continue theloop;
Post a Comment for "Javascript Switch Within For-loop Break; Conflicts"