const fs=require("fs") let p=new Promise((resolve, reject)=>{ fs.readFile('./resource/1.html',(err,data)=>{ if(err) reject(err); resolve(data) }) }) let p2=p.then(value => { return new Promise((resolve, reject)=>{ fs.readFile('./resource/2.html',(err,data)=>{ if(err) reject(err); resolve([value,data]) }) }) },reason => { }); let p3=p2.then(value => { return new Promise((resolve, reject)=>{ fs.readFile('./resource/4.html',(err,data)=>{ if(err) reject(err); value.push(data) resolve(value) }) }) },reason => { }) p3.then(value => { console.log(value.join('')) })