var p1 = new Promise((res,rej)=>{ console.log("into p1 promise"); res("p1 res"); }); var p3 = new Promise((res,rej)=>{ console.log("into p3 promise"); res("p3 res"); }); p1.then(t=>{ console.log(t); var p2 = new Promise((res,rej)=>{ console.log("into p2 promise"); res("p2 res"); }); p2.then(t2=>{ console.log(t2); }); }); const str = [{"a":"3"},{"a":"b"}]; for (let word of str){ console.log(word); }