After request I have response in a body and it looks like [{...}]. In my browser console it is noticed as array. But console.log(users[0]) is interpreted as undefined. Why can't I get the first element of users object?
async function getUsers() {
const response = await fetch("/api/users");
const users = await response.json();
return users;
}
let users = getUsers();
console.log(users[0]);
console.log(users);