Найти в Дзене

return Promise 🆚 return await Promise


Что будет выведено в консоль?

async function test1() {
console.log('start-1');
return Promise.resolve();
}

async function test2() {
console.log('start-2');
return await Promise.resolve();
}

test1().then(() => console.log('done-1'));
test2().then(() => console.log('done-2'));

console.log('end');


#typescript
return Promise 🆚 return await Promise  Что будет выведено в консоль?  async function test1() { console.log('start-1'); return Promise.resolve(); }  async function test2() { console.
Около минуты