조건문 [ Javascript ] [ JavaScript 문법 종합반 1주차 ]
// 문(if, else if, switch ~~) // 조건문 - if, else if, else switch // 1 if // 1-1 let x = 10; if (x > 0) { //main logic console.log("x 는 양수입니다."); } // 1-2 let y = "hello world"; if (y.length >= 5) { console.log(y.length); } // 2 if-else x = 10; if (x > 0) { console.log("x 는 양수입니다"); } else { console.log("x 는 음수입니다"); } // if - else if - else x = 10; if (x = 0 ..
2023.06.12