Перейти к основному содержанию
Zoro
Вопросы
Таймер
Резервное копирование
Главная
/
🟢 Node.js
/
Вопросы 47
Node.js:
What is the difference between promise and async/await?
🎯
Режим фокуса
47
🟢
Node.js
🌱 junior
Снять отметку
What is the difference between promise and async/await?
Promise
— .then().
async/await
— cleaner.
javascript
Копировать
1
fetch
(
)
.
then
(
data
=>
{
}
)
;
2
const
data
=
await
fetch
(
)
;
Promise
— chains.
async/await
— sync-like.
Больше вопросов по Node.js
What is Node.js and what is it used for?
What is the event loop in Node.js?
What is the difference between process.nextTick() and setImmediate() in Node.js?
What is the difference between setTimeout() and setInterval() in Node.js?
What is the difference between callback and promise in Node.js?
What is the difference between callback and promise?
What is the difference between require() and import?
Назад к категории Node.js