SOURCE

let num = 0;
outerfor:
for (let i = 0; i < 10; i++) {
    innerfor:
    for (let j = 0; j < 10; j++) {
        if (i == 5 && j == 5) {
            break outerfor; // outerfor / innerfor
        }
        num++;
        console.log("i=" + i, " j=" + j);
    }
}
console.log(num); // 55
console 命令行工具 X clear

                    
>
console