JavaScript Quiz Practice
Active Recall Drill Session
← Exit SessionQuestion 1 of 1
mediumJavaScript
What happens when fetchUser rejects?
code
async function load() {
try {
const user = await fetchUser(1);
return user;
} catch (err) {
console.log('caught:', err.message);
return null;
}
}