3 ms·
async/await in js exhibits the exact problem mentioned in the article.
by hsn915 5y ago
async/await in js exhibits the exact problem mentioned in the article.
- BiteCode_dev 5y agoNot really, you can call any async function in JS in sync code. It is automatically scheduled, and it will return a result immediately. This result is a Promise, that you can pass sync callbacks to, and keep the whole code away from async/await. You can also decide that async/await is nice, and just use that instead. I'm a Python dev, but that part is better in JS.