I have some code that uses Async / Await and works fine...Here is the code:
async function main() {
const x = await myfunction();
return x;
}
I wanted to do something like this:
async function main2() {
const x = await myfunction();
const x2 = await myfunction2();
return x;
return x2;
}
My issue is that the above code doesn't allow more that one return.
So my question is... Is there a way to have multiple returns working on main2() ?