new Promise(function (resolve) {
resolve();
}).then(function () {
console.log("");
});
await async2();
console.log("async1 end");
}
async function async2() {
console.log("async2");
}
console.log("script start");
async1();
new Promise(function (resolve) {
resolve();
}).then(function () {
console.log("promise2");
});
because "I"m just trying" is printed before async1 end. If async/await does not belong to Microtask, but belongs to Synchronize code, you should execute async1 end, first and then "I"ll just try". Is my understanding wrong