Open devSoyoung opened 5 years ago
const a = 3; const isATrue = a ? true : false; const isATrueShort = !!a;
boolean 형태가 아닌 값의 상태를 이용해서 true/false를 얻고 싶을 때 !!를 사용할 수 있다.
!!
boolean 형태가 아닌 값의 상태를 이용해서 true/false를 얻고 싶을 때
!!
를 사용할 수 있다.