Node.js - Child Processes
What will the following code print if the command
node -v runs successfully?
const { exec } = require('child_process');
exec('node -v', (error, stdout, stderr) => {
if (error) {
console.log('Error occurred');
} else if (stderr) {
console.log('Standard error output');
} else {
console.log(stdout.trim());
}
});