I came across this piece of code and now I am baffled. I have never seen this outer:
(line 1) and break outer;
(line 8) before. Starting a statement with name
+ ;
and referring to it later
outer: if (oldDom == null || oldDom.parentNode !== parentDom) {
parentDom.appendChild(newDom);
} else {
sibDom = oldDom;
j = 0;
while ((sibDom = sibDom.nextSibling) && j++ < oldChildrenLength / 2) {
if (sibDom === newDom) {
break outer;
}
}
parentDom.insertBefore(newDom, oldDom);
}
can anyone explain what this is called and what it is?