가능한 중복 :
What is the !! operator in JavaScript?
What does !! (double exclamation point) mean?이중 느낌표는 무엇입니까 !! 연산자 뜻?
나는 일부 사용자 지정을 통해려고하고 내 직장에서 자바 스크립트 코드와 나는 다음과 같은 구조를 이해할 수 없습니다입니다.
var myThemeKey = (!!$('row') && $('row').hasClassName('green-theme')) ? 'green' : 'white';
나는 !!
연산자를 제외한 위의 줄에 모든 것을 이해합니다. 나는 그것이 NOT
연산자라고 가정하고 NOT
이 NOT
인 것은 원래 값이지만 누군가가 NOT
을 NOT
으로하는 이유는 무엇입니까?
누군가 위의 코드 줄에서 어떤 일이 벌어지고 있는지 이해할 수 있도록 도와 줄 수 있습니까?
http://stackoverflow.com/questions/784929/what-is-the-operator-in-javascript –
http://stackoverflow.com/questions/784929/what-is-the-operator-in -javascript –
http://stackoverflow.com/questions/784929/what-is-the-operator-in-javascript – Josh