JSFiddle - React, Tailwind, and code Playground
by Prathameshsb
JavaScript
const [A, B, C] = [A, B, C]
function getA() {
return A;
}
function getB(callback) {
setTimeout(() => {
callback(B);
}, 10);
}
function getC() {
return Promise.resolve().then(() => C);
}
function getABC() {
return Promise.all([getA(), getB((val) => val), getC()]).then((value) => {
return value;
})
}
getABC().then((arr) => console.log(arr));