Node.js - Child Processes
Consider this code:
What will be printed after 100ms?
const { spawn } = require('child_process');
const child = spawn('node', ['-e', 'setTimeout(() => process.exit(2), 100)']);
child.on('exit', (code) => console.log(code));What will be printed after 100ms?
