Skip to content

Instantly share code, notes, and snippets.

async function startCallbackHell() {
try {
const res1 = await callback1(params);
const res2 = await callback2(res1);
const res3 = await callback3(res2);
const res4 = await callback4(res3);
const res5 = await callback5(res4);
} catch (error) {
// Do something with the error
} finally {