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
- Endpoints
- 러스트
- elasticsearch
- optional chaining
- null 병합 연산자
- JavaScript
- 옵셔널 체이닝
- 비구조화 할당
- 온프레미스
- docker swarm
- Service
- docker
- Custom Resource
- VPC
- Await
- 구조분해 할당
- vgw
- 단축 평가
- api gateway
- On-Premise
- Proxy Resource
- cognito
- AWS
- 자바스크립트
- Kubernetes
- transit gateway
- grafana
- prometheus
- Site-to-Site VPN
- rust
Archives
- Today
- Total
목록null 병합 연산자 (1)
만자의 개발일지

null 병합 연산자(Nullish Coalescing Operator) null 병합 연산자(??)는 왼쪽 값이 null 혹은 undefined 인경우 오른쪽 값을 반환하는 연산자입니다. 언뜻 보면 OR 연산자의 단축 평가와 매우 유사하지만 두 연산자에는 중요한 차이점이 있습니다. 우선 왼쪽값이 null 혹은 undefined의 경우 OR 연산자와 똑같이 동작합니다. console.log(null || 100) console.log(null ?? 100) console.log(undefined || 200) console.log(undefined ?? 200) 100 100 200 200 하지만 null과 undefined를 제외한 false로 평가되는 모든 값의 경우 OR 연산자는 오른쪽 값을 반환하..
JavaScript
2022. 4. 15. 14:39