Get to know MDN better
The JavaScript exception "label not found" occurs when a break or continue statement references a label that does not exist on any statement that contains the break or continue statement.
In JavaScript, labels are very limited: you can only use them with break and continue statements, and you can only jump to them from a statement contained within the labeled statement. You cannot jump to this label from anywhere in the program.
You cannot use labels as if they are goto.
Instead, you can only use labels to enhance the normal semantics of break and continue statements.
This page was last modified on Jul 8, 2025 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.