Skip to content

Commit 3a3785a

Browse files
committed
Async/Await
1 parent ad146f8 commit 3a3785a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

async.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,12 @@ function api(i) {
4646
setTimeout(() => {
4747
console.log("Async/Await -", i);
4848
resolve("Success.");
49-
}, 1000);
49+
}, 2000);
5050
});
5151
};
5252

5353
async function getAPIData() {
54+
await api(`Foo... ${api()}`);
5455
console.log("Getting Data - 1...");
5556
await api(1);
5657
console.log("Getting Data - 2...");

0 commit comments

Comments
 (0)