index

id: 9c132f2ffa20b4845d377f8d70f86d1d97934070128d6b674cab530054a70ccd

id (bech32): note1nsfj7tl6yz6gghfh07xhp7rdrktexsrsz2xkke6v4dfsq498pnxscs6c0t

sig: a4734e55e7d0e84ff73a6791161c79f04bb18ffe263a886f6ef23ca646330de81406f859dd1284960964c1186be6f2576b10dd0135accef1f41f85ba27b58edf

created_at: 2024-04-22 16:38:21 +0900

created_at (unix time): 1713771501

content:

Nostrにも残しといたろ

B→A と出る await 無しバージョン

const asyncFunc = (x) =>
new Promise((resolve, _) => {
setTimeout(() => {
console.log("A");
resolve();
}, 1000);
});

(async () => {
asyncFunc();
console.log("B");
})();

A→B と出る await ありバージョン

const asyncFunc = (x) =>
new Promise((resolve, _) => {
setTimeout(() => {
console.log("A");
resolve();
}, 1000);
});

(async () => {
await asyncFunc();
console.log("B");
})();

JSON