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 |
Tags
- Engoo
- Node.js
- flex-shrink
- Prototype
- css
- Express
- shit-christmas
- improve-iq-by-up-to-10%!
- express-handlebars
- module wrapper function
- JS
- css grid
- select by attribute
- flex-grow
- just-one-small-sip
- flex-basis
- node
- 디자인패턴
- css 오버레이
- img 확대
- regExp
- close together
- css variables
- 무료 백엔드 배포
- flexbox
- Sass
- es6
- 정규표현식
- ajax
- Object.create
Archives
- Today
- Total
목록Then (1)
ES6 Promise
비동기 작업의 다른 방법으로는 ES6에서 추가된 Promise 객체를 이용하는 방법이 있습니다. Promise라고 붙여진 이름처럼 비동기 처리를 완료한 뒤 특정한 작업을 수행하기로 '약속' 합니다. resolve 인자는 비동기요청이 끝나고 수행할 함수를 전달받기 위함이며, reject 인자는 요청 중 에러가 발생했을 때 수행할 함수를 전달받기 위해 존재합니다. resolve 인자는 Promise 객체의 then 메서드를 통해 비동기 처리완료 시 수행될 함수를 전달받고, reject 인자는 catch 메서드를 통해 함수를 전달받습니다. const posts = [ {title: "Post one", body: "this is post one"}, {title: "Post two", body: "this i..
2021 프론트 엔드 로드맵 따라가기/JS
2021. 6. 9. 03:40