Node.js · Junior · Question 50 of 75
What does process.exit(1) mean?
- 1Restart the process once
- ✓Correct answer: Stop the process with exit code 1, which signals an error
- 3Pause the process for 1 second
Explanation
Exit code 0 means success; any other code means failure, which CI and shells check. Prefer setting process.exitCode = 1 and letting the process finish, so pending output is not cut off.