Entry
JavaScript: How do I stop a JavaScript function once it has started?
Oct 12th, 2001 02:16
Jean-Bernard Valentaten, Knud van Eeden, Garth Donovan,
------------------------------------------------------------------------
--- Knud van Eeden - 12 October 2020 - 08:40 am ------------------------
The keyword return() can be used to stop.
- If your JavaScript function returns a result, e.g. an integer i,
then you write at the position where you want to stop in that function:
return( i );
- If your JavaScript function does not return a result, you write at
the position where you want to stop in that function:
return;
------------------------------------------------------------------------
------------------------------------------------------------------------
--- Jean-Bernard Valentaten --------------------------------------------
... or you could use the break statement
------------------------------------------------------------------------