0 / 60 seg.

What does the following async function return?

async function getUserData(userId) {
  const response = await fetch(`https://api.example.com/users/${userId}`);
  if (response.status === 200) {
    return response.json();
  } else {
    throw new Error('Failed to fetch user data');
  }
}
getUserData(123)
  .then(data => console.log(data))
  .catch(error => console.log('Error:', error));