JavaScript
- 2 ответа
- 0 вопросов
2
Вклад в тег
async function light_q() {
let res = 5
let promise = new Promise((resolve, reject) => {
resolve(3);
});
await promise.then(result => {
res = result;
console.log('1', res);
});
return res;
}
light_q().then(result => {
console.log('2', result);
});