??연산자1 ?? js문법 평소에 사용하지만 이름을 제대로 모른채, 물음표 2개로 칭했던 ?? js문법 ?? js문법 명칭은 Nullish coalescing operatior (Nullish 병합 연산자) 라고 한다. ES6(ES2015)문법이 아닌 이후 ECMAScript11(ES2020)에 만들어진 기능이다. (참고url : ES6 이후) 왼쪽에 연산자가 null이거나 undefind일 때, 오른쪽 결과를 보낸다. (참고url : Nullish 병합 연산자 MDN) const falsy = null || undefined; const nullish_coalescing_operator = falsy ?? "잘못된 값"; console.log("nullish_coalescing_operator : , nullish_coalesc.. 2023. 3. 27. 이전 1 다음