how to stop javascript execution for some time code example
Example 1: javascript stop execution
// EXAMPLE
throw new Error("This is your custom error message");
/*
SYNTAX
throw new Error("<your-custom-message>");
*/
Example 2: javascript stop execution
return false; // or return;
// or
throw new Error("Here we stop");
// Node.js:
process.exit();