end javascript code example
Example 1: how to terminate a program in js
process.exit(1)
Example 2: javascript break out of loop
//break out of for loop
for (i = 0; i < 10; i++) {
if (i === 3) { break; }
}
Example 3: how to end a javascript program
{
-------
}