回调函数
fs.readFile('xxx', (err, data) => {});
Promise
readFilePromise('1.json').then(data => {
return readFilePromise('2.json')
}).then(data => {
return readFilePromise('3.json')
}).then(data => {
return readFilePromise('4.json')
});
async + await
const readFileAsync = async function () {
const f1 = await readFilePromise('1.json')
const f2 = await readFilePromise('2.json')
const f3 = await readFilePromise('3.json')
const f4 = await readFilePromise('4.json')
}