From 7e5e1d840c9a891f3603eda02387179177b9f726 Mon Sep 17 00:00:00 2001 From: Jeongyeon Lee 이정연 Date: Thu, 6 May 2021 16:32:02 +0900 Subject: fix: Correct Korean translation in the wrong context (#626) Corrected the Korean translation in the wrong context in nullish coalescing operator(??) --- .../reference/operators/nullish_coalescing_operator/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/ko/web/javascript/reference/operators/nullish_coalescing_operator/index.html b/files/ko/web/javascript/reference/operators/nullish_coalescing_operator/index.html index 2448052336..c9bc299a61 100644 --- a/files/ko/web/javascript/reference/operators/nullish_coalescing_operator/index.html +++ b/files/ko/web/javascript/reference/operators/nullish_coalescing_operator/index.html @@ -7,7 +7,7 @@ translation_of: Web/JavaScript/Reference/Operators/Nullish_coalescing_operator

널 병합 연산자 (??) 는 왼쪽 피연산자가 {{jsxref("null")}} 또는 {{jsxref("undefined")}}일 때 오른쪽 피연산자를 반환하고, 그렇지 않으면 왼쪽 피연산자를 반환하는 논리 연산자이다.

-

논리 연산자 OR (||)와 달리, 왼쪽 피연산자가 null 또는 undefined가 아닌 falsy 값이면 반환된다. 즉, 만약 다른 변수 foo에게 기본 값을 제공하기 위해 ||을 사용 경우, falsy 값( '' 또는 0)을 사용하는 것을 고려했다면 예기치 않는 동작이 발생할 수 있다. 더 많은 예제는 아래를 보자.

+

이는 왼쪽 피연산자가 null 또는 undefined 뿐만 아니라 falsy 값에 해당할 경우 오른쪽 피연산자를 반환하는 논리 연산자 OR (||)와는 대조된다. 다시 말해 만약 어떤 변수 foo에게 falsy 값( '' 또는 0)을 포함한 값을 제공하기 위해 ||을 사용하는 것을 고려했다면 예기치 않는 동작이 발생할 수 있다. 하단에 더 많은 예제가 있다.

{{EmbedInteractiveExample("pages/js/expressions-nullishcoalescingoperator.html")}}
-- cgit v1.2.3-54-g00ecf