Terminate Javascript without error / exception
I need to terminate the javascript from a function so that it doesn't execute the next block of codes and other functions called by the script, which follows the current function. I found this existing question in SO : How to terminate the script in Javascript , where the solution is given as to trigger an error / exception which will terminate the script immediately. But my case is different because, My purpose of terminating the script is to prevent an error which will come from the next functions, if the current function doesn't stop execution of the script. So, triggering another error to