Skip to main content
Journey Uncommon Logo
JourneyUncommon
easyNodeJSpromises and async awaitSingle-choice MCQ

What does this code log? It uses async/await with a try/catch around a rejected promise.

async function run() { try { const value = await Promise.reject(new Error('boom')); console.log('got', value); } catch (err) { console.log('caught', err.message); } } run();