Break Statement

Jumps out of a loop.

Example

for (var i = 0; i < 10; i++) {
  if (i === 5) {
    break;
  }
}
outer:
for (var x = 0; x < 10; x++) {
  for (var y = 0; y < 10; y++) {
    if (x === 5 && y === 5) {
      break outer;
    }
  }
}

Syntax

Syntax
BreakStatement :
   break { UnilineTrivia LabelIdentifier }?

Abstract type

TODO

{
  type: "BreakStatement";
  label: LabelIdentifier | null;
}