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
- 구조분해 할당
- docker swarm
- Kubernetes
- transit gateway
- Proxy Resource
- Endpoints
- JavaScript
- AWS
- 옵셔널 체이닝
- elasticsearch
- 자바스크립트
- 온프레미스
- 비구조화 할당
- Service
- Await
- api gateway
- docker
- DynamoDB
- prometheus
- null 병합 연산자
- vgw
- VPC
- Custom Resource
- On-Premise
- cognito
- 단축 평가
- grafana
- CloudFormation
- Site-to-Site VPN
- optional chaining
Archives
- Today
- Total
목록null 병합 연산자 (1)
만자의 개발일지
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/Znrln/btrzuYUv45w/ZupjTKPVEqiLijvFbt2kp1/img.png)
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