async function foo() {
return await db.collection("users").find({user_id:id}).toArray();
}
async function bar() {
await foo()
}
Do I need both awaits here or can I remove one of them? If so which await should I remove?
Blancer.com Tutorials and projects
Freelance Projects, Design and Programming Tutorials
async function foo() {
return await db.collection("users").find({user_id:id}).toArray();
}
async function bar() {
await foo()
}
Do I need both awaits here or can I remove one of them? If so which await should I remove?