강의

멘토링

커뮤니티

Inflearn Community Q&A

jonghak961513's profile image
jonghak961513

asked

Creating Nodebird SNS with Vue

5-9. Implementing Like and Unlike Screens

!! 연산자에 대해서.

Written on

·

177

0

안녕하세요, 제로초 선생님.

computed 에서 liked()를 리턴할 때, !! 를 붙이는 이유에 대해서 묻고 싶습니다.

인터넷에 검색해도 안나오는데 !(not)을 두 번 붙인 건가요?

!(not)!(not)이면 붙이기 전과 동일한데 굳이 붙이는 이유는 무엇인가요?

nodejsvuexvuejsawsmysqlssr

Answer 2

0

Jong Hak Lee님의 프로필 이미지
Jong Hak Lee
Questioner

아하! 감사합니다.

0

zerocho님의 프로필 이미지
zerocho
Instructor

!!는 !+!가 맞습니다. 빠르게 boolean값으로 바꾸는 것입니다.

'hello' 앞에 !!'hello' 하면 true가 됩니다.

jonghak961513's profile image
jonghak961513

asked

Ask a question