Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a JavaScript function like PHP‘s exit()?

I need to stop my script. I don't want to write more code like if(...) return false because I will use it many times.

My English is poor. It's my first question on this site. :)

like image 686
user1956737 Avatar asked Dec 05 '25 14:12

user1956737


1 Answers

you can simply write return false; to do so.

like image 167
Fawad Ghafoor Avatar answered Dec 07 '25 03:12

Fawad Ghafoor



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!