WLJS LogoWLJS Notebook

Abort

Abort[] generates an interrupt to abort a computation.

Example

Abort a loop early:

Do[
  If[i > 5, Abort[]];
  Print[i],
  {i, 10}
]
(* Prints 1 through 5, then aborts *)

Please visit the official Wolfram Language Reference for more details.

On this page