Node.js - Error Handling Patterns
Find the problem in this asynchronous error handling code:
const fs = require('fs');
function readFile() {
fs.readFile('file.txt', (err, data) => {
if (err) throw err;
console.log(data);
});
}
readFile();