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
- Engoo
- shit-christmas
- JS
- regExp
- Prototype
- 정규표현식
- img 확대
- just-one-small-sip
- 무료 백엔드 배포
- es6
- express-handlebars
- Express
- ajax
- select by attribute
- css
- close together
- css 오버레이
- Object.create
- css grid
- node
- improve-iq-by-up-to-10%!
- 디자인패턴
- flex-basis
- Sass
- Node.js
- flexbox
- flex-shrink
- module wrapper function
- css variables
- flex-grow
Archives
- Today
- Total
목록iterator (1)
ES6 Iterator & Generator
1. Iterator next라는 함수를 가진 객체를 리턴하여 인자로 전달받은 것을 반복할 수 있도록 한다. 사실 이 개념은 원래부터 존재하는 것이지만 ES6에서 이러한 형태를 하나의 프로토콜(규약)로 제공함에 의미가 있는 것 같다. 이러한 표현방법은 Generator에서도 사용된다. // Iterator Example function nameIterator(names) { let nextIndex = 0; return { next: function () { return nextIndex < names.length ? {value: names[nextIndex++], done: false} : {done: true} } } } // Create an array of names const namesArr ..
2021 프론트 엔드 로드맵 따라가기/JS
2021. 6. 15. 04:34