is there a similar exit function in javascript as it is in php? For instance, when an exit function is called in php, the entire line of code below are ignored. Is there a way to accomplish this in javascript? Thanks
i guess there is no such a way you can exit(). but you may keep the code in : if(<var>!=<your desired output>){ <here goes your entire body> } and you can get your output. if the condition does not matches, the program will just end as there is no else statement and "}" is the last statement of your program.