빈 문자열을 체크할 때
const str = "" if(str=="") console.log("빈문자열")
나도 모르게 str==""로 빈문자열인지 체크하고 있었다.
const str = "" console.log(!str&&"빈문자열")
!str로 빈문자열인지 쉽게 체크하자.