In real apps, async code often coordinates multiple network requests and handles partial failures gracefully.
You are given fake API helpers that return Promises:
fetchUser() resolves to { id: 1, name: "Alex" } after a short delay.fetchPosts(userId) resolves to an array of posts.fetchNotifications(userId) resolves to an array of notifications.Implement:
loadDashboard() async function that:
Promise.all.{
userName: "Alex",
postCount: 3,
unreadCount: 2
}
{
userName: "Unknown",
postCount: 0,
unreadCount: 0
}
#output: "Alex | posts: 3 | unread: 2".Use Promise.all([...]) to run promises in parallel.