let str1 = 'str1 ';
const func1=(str1)=>new Promise((resolve,reject)=>{
resolve(str1 + 'str2 ');
})
const func2=(str2)=>new Promise((resolve,reject)=>{
resolve(str2 + 'str3 ');
})
const func3=(str3)=>new Promise((resolve,reject)=>{
resolve(str3 + 'str4 ');
})
func1(str1)
.then(res=>{
func2(res)
.then(res=>{
func3(res)
.then(res=>{
console.log(res);
console.log("==================");
})
})
})
func1(str1)
.then(res=>func2(res))
.then(res=>func3(res))
.then(res=>{
console.log(res);
console.log("==================");
})
console