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
- 무료 백엔드 배포
- Express
- node
- shit-christmas
- img 확대
- css grid
- css
- express-handlebars
- Sass
- es6
- flex-basis
- Engoo
- ajax
- select by attribute
- 정규표현식
- Object.create
- css variables
- close together
- module wrapper function
- Prototype
- flexbox
- just-one-small-sip
- 디자인패턴
- flex-shrink
- improve-iq-by-up-to-10%!
- Node.js
- regExp
- JS
- flex-grow
- css 오버레이
Archives
- Today
- Total
목록static (1)
ES5에서 static 메서드를 선언하기
ES6 에서는 해당 클래스 내부에 static키워드를 이용해 static 메서드를 선언할 수 있었는데 ES5에서 똑같이 구현하려니 방법이 바로 떠오르지 않아 검색해보았다. 생성자 함수에 점 표기법을 이용하여 메서드를 바로 선언하면 된다. 아래는 모두 Store의 static 메서드들이다. // Store function Store() {} Store.getBooks = function () { let books; if (localStorage.getItem("books") === null) { books = []; } else { books = JSON.parse(localStorage.getItem("books")); } return books; }; Store.displayBooks = functio..
2021 프론트 엔드 로드맵 따라가기/JS
2021. 6. 6. 18:44