JS1019: Can't have 'break' outside of loop

The break keyword appears outside a loop. The break keyword is used to terminate a loop or switch statement. It must be embedded in the body of a loop or switch statement.

To correct this error

  • Make sure the break keyword appears inside an enclosing loop or switch statement.

See Also

Concepts

Troubleshooting Your Scripts

Reference

break Statement

Other Resources

JScript Conditional Structures

JScript Reference