조건문

[Error] Module parse failed: Unexpected token (28:51) File was processed with these loaders: * ./node_modules/babel-loader/lib/index.js 위 에러의 핵심은 ?? 이다. Nullish coalescing operator라고 불리는 ??은 ES2020에서 소개되었으며, null과 undefined인 경우 뒤의 값을 갖는 연산자이다. || 와 다른 점은 falsy값 (0 또는 '')일때는 앞에 값을 갖는 다는 것이다. const a = null ?? 'A'; // 결과: A const b = undefined ?? 'B'; // 결과: B const c = 0 ?? 'C'; // 결과: 0 const d ..
S0PH1A
'조건문' 태그의 글 목록