There are a lot of samples on running Async/Await functions. But only with one await call.
I don't find a right sample that I can run await functions one after one
async function a() {
console.log('this is function a');
// do something
}
async function b() {
console.log('this is function b');
// do something
}
async function c() {
console.log('this is function c');
// do something
}
async function main() {
await a();
await b();
await c();
}
main();
Run code snippetExpand snippet
Test with above code (hide the real code), I found it is not guaranteed, function c will be executed last.
How can I adjust it?
Node version:
$ node --version
v10.15.3
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)