// 1. 回调(老写法,容易回调地狱) fs.readFile('a.txt', 'utf8', (err, data) => { if (err) return console.error(err); console.log(data); });