js stop when then code example
Example 1: in javascipt how to stop further page processing
if(someEventHappened) return; // Will prevent subsequent code from being executed
alert("This alert will never be shown.");
Example 2: how to end a javascript program
{
-------
}