回答編集履歴
2
ちょうせい
test
CHANGED
@@ -4,11 +4,7 @@
|
|
4
4
|
|
5
5
|
const log=async(text)=>{
|
6
6
|
|
7
|
-
await new Promise(resolve=>
|
7
|
+
await new Promise(resolve=>setTimeout(resolve,1000));
|
8
|
-
|
9
|
-
setTimeout(resolve,1000);
|
10
|
-
|
11
|
-
});
|
12
8
|
|
13
9
|
console.log(text);
|
14
10
|
|
1
ちょうせい
test
CHANGED
@@ -6,11 +6,7 @@
|
|
6
6
|
|
7
7
|
await new Promise(resolve=>{
|
8
8
|
|
9
|
-
setTimeout(
|
9
|
+
setTimeout(resolve,1000);
|
10
|
-
|
11
|
-
resolve();
|
12
|
-
|
13
|
-
}, 1000);
|
14
10
|
|
15
11
|
});
|
16
12
|
|