javascript kill program code example
Example 1: js kill process
process.kill(process.pid, 'SIGINT');
Example 2: 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.");