const fs = require('fs');
fs.readFile('./1.txt', 'utf8', (err, result1) => {
console.log(result1);
fs.readFile('./2.txt', 'utf8', (err, result2) => {
console.log(result2);
fs.readFile('./3.txt', 'utf8', (err, result3) => {
console.log(result3);
});
});
})
运行结果
标签:node,fs,console,log,err,utf8,readFile,js,api From: https://www.cnblogs.com/yao-655442/p/16651453.html