논리연산자1 논리 연산자로 조건 연습문제 풀기(5줄 짜리) 논리 연산자 || or && and ! not //이름이 mimi 이거나, 초등이상이면 합격 const name = 'mimimi'; const age=30; if(name === 'tom' || age >13 { console.log('합격'); } else { console.log('불합격') } // 나이를 입력받아서 초등이하면 불합격 주기 const age = prompt('나이 몇 살'); const isStudent = age>13; if(!isStudent ) { console.log('불합격'); } 2022. 2. 10. 이전 1 다음