+ 6

JS Exit()

What is the JS equivalent of python's sys.exit(0)? Is there one? Thanks!

26th Aug 2018, 1:31 PM
Paul Grasser
Paul Grasser - avatar
1 Resposta
+ 4
as I understand it sys.exit(0) will kill the current python process running the application, and as such I will assume you’re writing a NodeJS-esc appliation that will have a process on the machine. If so then node has a built in object called ‘process’ which has a method called exit. process.exit(); would kill the current node process. If you’re not writing node, then maybe you could explain what you are trying to do and I can possibly help further.
27th Aug 2018, 2:36 AM
Gabriel Jon Peery
Gabriel Jon Peery - avatar