Node.js · Junior · Question 50 of 75

What does process.exit(1) mean?

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.

Further reading

Problem with a question

Node.js · Junior · question 50

Test yourself

Take the Node.js · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz