Complete the code to exit the Node.js process with a success code.
process.[1](0);
The process.exit() method stops the Node.js process. Passing 0 means success.
Complete the code to exit the process with an error code 1.
process.exit([1]);Exit code 1 usually means the process ended with an error.
Fix the error in the code to properly exit the process with code 2.
process.exit = [1];You cannot assign a number to process.exit. Instead, assign a function that calls process.exit(2).
Fill both blanks to exit with code 3 after logging an error message.
console.error('Error occurred'); process.[1]([2]);
Use process.exit(3) to exit with code 3 after logging the error.
Fill all three blanks to exit with code 4 only if an error variable is true.
if ([1]) { console.log('Exiting due to error'); process.[2]([3]); }
Check if error is true, then call process.exit(4) to exit with code 4.
