반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- VirtualBox
- 오블완
- linux
- react
- localserver
- 네트워크
- webpack
- MAC
- xcode
- IOS
- unittest
- 개발
- Chrome
- MachineLearning
- Android
- ReactNative
- PYTHON
- build
- TensorFlow
- vsCode
- 리눅스
- 센토스
- node
- 티스토리챌린지
- fastapi
- 맥
- androidstudio
- centos
- pydantic
Archives
- Today
- Total
로메오의 블로그
async await promise 본문
반응형
function play1() {
return new Promise((resolve) => {
setTimeout(() => {
console.log('play1')
resolve();
}, 1000);
})
}
function play2() {
return new Promise((resolve) => {
setTimeout(() => {
console.log('play2')
resolve();
}, 1000);
})
}
async function start() {
await play1();
await play2();
console.log('finish')
};
start();
console =>
play1
play2
finish
반응형
'Frontend > ETC' 카테고리의 다른 글
반복문 도중에 종료하기 [for of, lodash, array, 배열] (0) | 2021.11.02 |
---|---|
typescript lint 체크 제외하기 (0) | 2021.04.09 |
Git 명령어 정리 (0) | 2021.03.19 |
VSCode tab size 변경 (0) | 2021.02.13 |
자주 쓰는 GIT 명령어 정리 (0) | 2020.12.17 |
Comments