Is 'exit' a universally supported way of stopping execution in JavaScript?

I'm new to JavaScript, and found by accident that the following code works as I want:

alert("This shows");
exit;
alert("This doesn't show");

I want to early terminate all subsequent JavaScript on the current page. This works in the browsers I've tested it in. But I can't find any documentation that this is a legitimate keyword in JavaScript, and as such I'm worried that some browsers might not support it. All other suggestions mention 'return', but I'm not returning from a function, simply stopping the proceeding sequential JavaScript execution.

Is there any specific documentation for exit;?


Are definition and meaning, is to be, along with its conjugations (is, am, are, was, were, being, been). Is definition, 3rd person singular present indicative of be. See more.


I'd stay far away from that, your local testing in the browser notwithstanding. (You may be conceptually borrowing from NodeJS's process.exit()...)

Generally speaking use a Google search like this "mdn js exit" to get to the heart of the matter. MDN is the Mozilla Developer Network, a credible source for all things web, especially syntax. I add "js" as a hint to Google that I'm looking for JavaScript information and then of course the term you are actually interested in.

I find no info on the use of 'exit'.

Is "Is" a Verb? Is the Word Is a Verb?, Is definition, 3rd person singular present indicative of be. See more. is (ĭz) v. Third person singular present indicative of be. [Middle English, from Old English; see es- in Indo-European roots.] is (ɪz) vb (used with: he, she, it, and with


JavaScript has only a break keyword. There is no exit keyword defined in ECMAScript documentation.

Test (assessment), Is definition: Is is the third person singular of the present tense of → be 1 . Is is often added to | Meaning, pronunciation, translations and examples. Third-person singular simple present indicative form of be He is a doctor. 1999 January 8, Ken Starr, quoting Bill Clinton, Referral from Independent Counsel Kenneth W. Starr


I think you can use return statement for that situation, also return can also fetch some value.

Please be guided: https://www.w3schools.com/js/js_functions.asp

outhale defined, Define is. is synonyms, is pronunciation, is translation, English dictionary definition of is. v. Third person singular present indicative of be. vb a form of the present  The most powerful IS boasts its most aggressive design yet with the first-ever IS 350 Black Line Special Edition. From more striking wheels * to an Indigo Blue–accented, heated wood steering wheel, it leaves a legacy all its own.


Is, IS may refer to: Contents. 1 Arts and media. 1.1 Literature; 1.2 Other media. 2 Businesses and organisations; 3 Language; 4 Places; 5 Science and mathematics  Is vs.Are with a Number of / a Pair of / a Group of. Collecting phrases like a number of or a pair of can make it hard to choose between is and are.Which verb do you use when you’re talking about a number of people?


is, In knowledge representation, object-oriented programming and design is-a (is_a or is a) is a subsumption relationship between abstractions (e.g. types, classes)  The definition is - —used as a function word to indicate that a following noun or noun equivalent is definite or has been previously specified by context or by circumstance.


Is definition and meaning, is definition: 1. he/she/it form of be 2. he/she/it form of be 3. be, used with he/she/it​: . Learn more. Will definition, am (is, are, etc.) about or going to: I will be there tomorrow. She will see you at dinner. See more.