考虑代码:
const getUsers = async () => {
// get users from DB
// and return
}
有没有区别
const someOtherFunction = () => {
// do some stuff...
const users = await getUsers();
return users;
}
和
const someOtherFunction = async () => {
// do some stuff...
return await getUsers();
}