@ethanlal04 @theScottyJam @lightmare @lightmare @graphemecluster @alinnert Hi all! Is it possible to do that? ternary Comparison Assignment Operators with Concurrent Async and Normal Await Evaluation Blocks.
case... my idea ... an idea:
async function sum(variable1, variable2) => {
const a = async getA(variable1);
const b = async getB(variable2);
/* ... */
return ?=== a(variable1)+b(variable2)>10 or "false";
}
sum(2, 3);// 2+3=5 // false
sum(10, 10); // 10+10=20 // true
Notes
- I use the ternary symbol inside async/await
- If the sum is greater than 10 I return true, if less than 10 I return false