Skip to content

[ko]: add translation for Logical OR assignment operator #27601

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

bunny-goorm
Copy link

Description

JavaScript의 논리 OR 할당 (||=) 연산자 문서를 한국어로 번역했습니다.
MDN 한국어 번역 가이드라인을 준수하여 번역을 진행했으며, 기술 용어의 일관성과 가독성을 고려했습니다.

Motivation

한국어를 사용하는 개발자들이 JavaScript의 논리 OR 할당 연산자를 더 쉽게 이해하고 활용할 수 있도록 돕기 위해 번역을 진행했습니다.
이 문서는 JavaScript의 주요 연산자 중 하나를 다루고 있어, 한국어로 된 정확한 설명이 필요하다고 판단했습니다.

Additional details

  • MDN 한국어 번역 가이드라인을 준수했습니다
  • 용어 일관성을 위해 "논리 OR"로 통일했습니다
  • 코드 예제의 주석과 출력 메시지만 번역하고 실제 코드는 유지했습니다
  • 원문의 구조와 줄바꿈을 보존했습니다

Related issues and pull requests

(없음)

@bunny-goorm bunny-goorm requested a review from a team as a code owner June 10, 2025 14:11
@bunny-goorm bunny-goorm requested review from sunhpark42 and removed request for a team June 10, 2025 14:11
@github-actions github-actions bot added the l10n-ko Issues related to Korean content. label Jun 10, 2025

## 설명

논리 OR 할당은 [_단축 평가_](/en-US/docs/Web/JavaScript/Reference/Operators/Operator_precedence#short-circuiting)를 수행합니다. 즉, `x ||= y`는 `x || (x = y)`와 동일하지만, 표현식 `x`는 한 번만 평가된다는 차이가 있습니다.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[mdn-linter] reported by reviewdog 🐶

Suggested change
논리 OR 할당은 [_단축 평가_](/en-US/docs/Web/JavaScript/Reference/Operators/Operator_precedence#short-circuiting)를 수행합니다. 즉, `x ||= y``x || (x = y)`와 동일하지만, 표현식 `x`는 한 번만 평가된다는 차이가 있습니다.
논리 OR 할당은 [_단축 평가_](/ko/docs/Web/JavaScript/Reference/Operators/Operator_precedence#short-circuiting)를 수행합니다. 즉, `x ||= y``x || (x = y)`와 동일하지만, 표현식 `x`는 한 번만 평가된다는 차이가 있습니다.


논리 OR 할당은 [_단축 평가_](/en-US/docs/Web/JavaScript/Reference/Operators/Operator_precedence#short-circuiting)를 수행합니다. 즉, `x ||= y`는 `x || (x = y)`와 동일하지만, 표현식 `x`는 한 번만 평가된다는 차이가 있습니다.

[논리 OR](/en-US/docs/Web/JavaScript/Reference/Operators/Logical_OR) 연산자의 단축 평가로 인해 왼쪽 피연산자가 falsy가 아닌 경우에는 할당이 수행되지 않습니다. 예를 들어, `x`가 `const`임에도 불구하고 다음 코드는 오류를 발생시키지 않습니다:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[mdn-linter] reported by reviewdog 🐶

Suggested change
[논리 OR](/en-US/docs/Web/JavaScript/Reference/Operators/Logical_OR) 연산자의 단축 평가로 인해 왼쪽 피연산자가 falsy가 아닌 경우에는 할당이 수행되지 않습니다. 예를 들어, `x``const`임에도 불구하고 다음 코드는 오류를 발생시키지 않습니다:
[논리 OR](/ko/docs/Web/JavaScript/Reference/Operators/Logical_OR) 연산자의 단축 평가로 인해 왼쪽 피연산자가 falsy가 아닌 경우에는 할당이 수행되지 않습니다. 예를 들어, `x``const`임에도 불구하고 다음 코드는 오류를 발생시키지 않습니다:


여기서 단축 평가는 특히 유용한데, 요소가 불필요하게 업데이트되지 않아 추가적인 구문 분석이나 렌더링 작업, 포커스 손실 등의 원치 않는 부작용을 방지할 수 있기 때문입니다.

참고: 확인하려는 API가 반환하는 값에 주의를 기울이세요. 빈 문자열({{Glossary("falsy")}} 값)이 반환되는 경우 `||=`를 사용해야 하며, 이 경우 빈 공간 대신 "가사가 없습니다."가 표시됩니다. 하지만 API가 빈 내용일 때 [`null`](/en-US/docs/Web/JavaScript/Reference/Operators/null) 또는 {{jsxref("undefined")}}를 반환하는 경우에는 [`??=`](/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing_assignment)를 대신 사용해야 합니다.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[mdn-linter] reported by reviewdog 🐶

Suggested change
참고: 확인하려는 API가 반환하는 값에 주의를 기울이세요. 빈 문자열({{Glossary("falsy")}} 값)이 반환되는 경우 `||=`를 사용해야 하며, 이 경우 빈 공간 대신 "가사가 없습니다."가 표시됩니다. 하지만 API가 빈 내용일 때 [`null`](/en-US/docs/Web/JavaScript/Reference/Operators/null) 또는 {{jsxref("undefined")}}를 반환하는 경우에는 [`??=`](/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing_assignment)를 대신 사용해야 합니다.
참고: 확인하려는 API가 반환하는 값에 주의를 기울이세요. 빈 문자열({{Glossary("falsy")}} 값)이 반환되는 경우 `||=`를 사용해야 하며, 이 경우 빈 공간 대신 "가사가 없습니다."가 표시됩니다. 하지만 API가 빈 내용일 때 [`null`](/ko/docs/Web/JavaScript/Reference/Operators/null) 또는 {{jsxref("undefined")}}를 반환하는 경우에는 [`??=`](/ko/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing_assignment)를 대신 사용해야 합니다.

Comment on lines 88 to 90
- [논리 OR (`||`)](/en-US/docs/Web/JavaScript/Reference/Operators/Logical_OR)
- [널 병합 연산자 (`??`)](/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing)
- [비트 OR 할당 (`|=`)](/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_OR_assignment)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[mdn-linter] reported by reviewdog 🐶

Suggested change
- [논리 OR (`||`)](/en-US/docs/Web/JavaScript/Reference/Operators/Logical_OR)
- [널 병합 연산자 (`??`)](/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing)
- [비트 OR 할당 (`|=`)](/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_OR_assignment)
- [논리 OR (`||`)](/ko/docs/Web/JavaScript/Reference/Operators/Logical_OR)
- [널 병합 연산자 (`??`)](/ko/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing)
- [비트 OR 할당 (`|=`)](/ko/docs/Web/JavaScript/Reference/Operators/Bitwise_OR_assignment)

@bunny-goorm bunny-goorm changed the title feat(ko): add translation for Logical OR assignment operator [ko]: add translation for Logical OR assignment operator Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
l10n-ko Issues related to Korean content.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant