Skip to content

논리 연산자 #20

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

Merged
merged 18 commits into from
Apr 17, 2019
Merged

Conversation

keehyun2
Copy link
Contributor

논리 연산자


## && (AND)
## && (그리고)
Copy link
Member

Choose a reason for hiding this comment

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

여기서 AND 는 연산자이니까 해석을 안해도 되지않을까요?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

수정완료

@@ -190,25 +187,25 @@ if (1 && 0) { // evaluated as true && false
```


## AND finds the first falsy value
## AND는 첫 번째 거짓(falsy) 값을 찾습니다.
Copy link
Member

Choose a reason for hiding this comment

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

러닝 자바스크립트 책에선 falsy는 '거짓 같은 값', truthy는 '참 같은 값'으로 번역하고 있어서, 용어집에도 일단 등록해 놓았습니다.

false와 falsy를 구분해줘야하는데, 구분을 위해 '거짓 같은 값'으로 번역하길 권유드립니다.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

수정완료


```js run
alert( !!"non-empty string" ); // true
alert( !!null ); // false
```

That is, the first NOT converts the value to boolean and returns the inverse, and the second NOT inverses it again. In the end, we have a plain value-to-boolean conversion.
즉, 첫 번째 NOT은 값을 부울로 변환하고 정반대 값을 반환하고, 두 번째 NOT은 이 값을 다시 반전합니다. 결국 단순한 논리 타입 변환을 가집니다.
Copy link
Member

Choose a reason for hiding this comment

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

boolean을 번역해주세요.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

즉, 첫 번째 NOT 연산자는 값을 논리 타입으로 변환하면서 반대되는 값을 반환하고, 두 번째 NOT 연산자는 다시 반대되는 값을 반환합니다. 결국 단순한 논리 타입 변환을 가집니다.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

요렇게 하면 될까여?

@Violet-Bora-Lee Violet-Bora-Lee merged commit 3dcc607 into javascript-tutorial:master Apr 17, 2019
@Violet-Bora-Lee
Copy link
Member

이번 커밋도 알차네요 👍
수고하셨습니다~

changbokLee pushed a commit to changbokLee/ko.javascript.info that referenced this pull request Sep 24, 2020
jintak0401 added a commit to jintak0401/ko.javascript.info that referenced this pull request Oct 24, 2020
Violet-Bora-Lee added a commit that referenced this pull request Oct 24, 2020
KimHunJin pushed a commit to KimHunJin/ko.javascript.info that referenced this pull request Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants