Which is equivalent to PHP output; in javascript / jQuery?
I need to stop my script at the beginning depending on certain conditions ... The only answers I could find from the search was to stop the forms from submitting ...
You can try:
throw "stop execution";
Using return, you will skip the current function, so metalization is more like PHP exit ();
The javascript function ends with a call to return . Usually you will be in the context of a function or something else. Also, event handlers (for example, for onclick for an element) will behave as a function and accept a return.
return
onclick
I would end the function earlier using the return statement:
return;
Source: https://habr.com/ru/post/1432239/More articles:Assembly.Load performance impact - performanceXcode Organizer Failed to Display Correct Package Display Name - iosError importing SDK to Facebook after successful import - javaRemove permissions from a Windows folder - c #Is it possible to deselect the current date in jQuery UI datepicker? - jquery-uiAndroid: loading a WebView image in the center - androidHow to add a vertical line between two tables? - htmlPassing a parameter to a Spring factory bean factory method - javaFlags in tree updated slowly - pythonIn New Relic RPM, I get reports with the Apdex index. What is the meaning of the index? - performance-testingAll Articles