JSFiddle - React, Tailwind, and code Playground
by Sahin Deniz
JavaScript 1.7
function a(c) {
return new Promise((resolve, reject) => {
if (c) {
reject(new Error(["hata1", "detail1"]));
} else {
resolve("devam")
}
});
}
(async () => {
let b = await a(1);
console.log(b);
})();