Very bad mistake about using async/await.
Таймураз Кайтмазов
1

This code throw an error:

function y() {
return new Promise((resolve) => { resolve() });
}
function x() {
const x = await y();
}

This code is ok:

function y() {
return new Promise((resolve) => { resolve() });
}
async function x() {
await y();
}
One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.