2023.07.04 - [💻/JS] - [Javascript] 연산자 종류와 if 조건문 [Javascript] 연산자 종류와 if 조건문 if 조건문에 비교 연산자를 사용할 수 있다. 연산자 종류 종류 기호 문법 의미 비교 연산자 == A==B A와 B가 같은가? != A!=B A와 B가 다른가? === A===B A와 B가 일치하는가? !== A!==B A와 B가 일치하지 않는 built.tistory.com 연산자의 종류는 이전글을 참고해주세요 논리 연산(logical operators) 사용시 주의할 점을 정리합니다. || (or) const value1 = false; const value2 = 4 < 2; function check() { for (let i = 0; i < 3; i++) { ..
if 조건문에 비교 연산자를 사용할 수 있다. 연산자 종류 종류 기호 문법 의미 비교 연산자 == A==B A와 B가 같은가? != A!=B A와 B가 다른가? === A===B A와 B가 일치하는가? (type까지 고려) !== A!==B A와 B가 일치하지 않는가? >, 3, A=, =3, A= 21) { return "Nice to meet you, " + name + "!" } } const output1 = checkAge('Min', 21); const output2 = checkAge('Seok', 17); console.log(output1); //Nice to meet you, Min! ex3. string 문자열이 동일하면 true, 동일하지 않으면(else) false를 반환한다. f..
- Total
- Today
- Yesterday