JScript  

Can't have 'break' outside of loop

[This is preliminary documentation and subject to change]

You attempted to use the break keyword outside of 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.

Exception

The break keyword can be followed by a label.

break labelname;

You only need the labeled form of the break keyword when you are using nested loops or switch statements and need to break out of a loop that is not the innermost one.

To correct this error

See Also

Break | Controlling Program Flow | Troubleshooting Your Scripts | JScript Language Reference