label
label is a JavaScript function in the Statements category. Labels a statement for break/continue. The syntax is label: statement. A typical example: outer: for (let i=0; i<3; i++) { for (let j=0; j<3; j++) { if (j===1) break outer } }. A close sibling is if...else, which conditional execution. A close sibling is for, which loop construct. A close sibling is for...of, which iterates over values. A close sibling is while, which loops while true. More about this category: Statements and declarations. Related Statements methods: if...else, for, for...of, while, switch, try...catch, throw, const. This page is part of the free JS Reference documentation covering 1027+ methods, each with syntax, parameters, return values, examples, and common pitfalls. You can try label immediately in the JavaScript playground, look up unfamiliar terms in the glossary, or return to the JS Reference homepage.