3 ms·
Not 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 Promis
by BiteCode_dev 5y ago
Not 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.