Is
using labels to break loops, a good practice in javascript? Mention if it has any pros
and
cons
Ex:
var
i, j;
outer:
for(i in [0,1,2,3]) {
inner:
for(j in [0,1,2,3]) {
if(j == 1) {
break
outer;
}
}
console.log("inner")
}
console.log("outer");
No comments:
Post a Comment