
이번 ES2020에서 새로 추가된 Optional Chaining은 "?."를 사용하여 객체의 속성 값에 대해 접근할 수 있게 해줍니다. 이미 타입스크립트 3.7 버전에서 구현된 기능이기 때문에, 기존에 타입스크립트를 사용하시던 개발자분들은 그리 낯설지 않은 문법일 것 입니다. 참조하는 대상이 null이나 undefined가 아니라면(= nullish 하지 않다면) 속성에 대한 접근이 가능하며, 만약 nullish 할 경우 undefined를 반환합니다. function getProp(obj) { return obj?.a; } // A const obj = { a: 1 }; getProp(obj); // 1 // B const obj2 = null; getProp(obj2); // undefined 일반..
The splice() method changes the contents of an array by removing existing elements and/or adding new elements. 자바스크립트 Array의 내장 메소드인 splice()는 배열 안의 존재하는 요소들을 지우거나 새로운 요소들을 추가함으로써, 배열의 내용을 바꾼다. It allows removal (and optionally insertion) of items at an arbitrary index in the array. It will return an array of elements removed from the array. 배열의 임의적인 인덱스에서 항목을 제거 (선택적으로 삽입) 할 수 있게 한다. 배열로부터 제거된 ..
- Total
- Today
- Yesterday
- hoc test
- js debugger
- devDependencies
- vue.js
- react-hooks test
- infinite-scrolling 구현
- react-waypoint
- void 0
- ES2020
- Package
- react-infinite-scroll
- infinite-scrolling
- codility
- jest reducer test
- ES6 Module
- esModuleInterop
- react-testing-library
- 효율적인 디버깅
- dependencies
- reducer test
- react hoc 테스트
- NPM
- tsconfig.json
- jest reducer 테스트
- jest react test
- axios
- difference_1.default is not a function
- javascript
- 크롬 퍼포먼스 탭
- redux-mock-store
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |