DO BEST
-
for카테고리 없음 2022. 12. 21. 10:41
for(시작 1; 조건식 2; 종료식 4){ 동작 3 } ! 숫자는 작동하는 순서 적은거임 ㅇㅋ? 녜 for(let i = 0; i
-
if, switch노쉬발 킵고잉/Javascript 2022. 12. 19. 12:54
중첩 If문 let first = true; let second = false; if(first) { console.log('첫번째 조건 충족'); if(second){ console.log('두번째 조건 충족'); }else{ console.log('두번째 조건 불충족'); } } else{ console.log('첫번째 조건 불충족'); }; 하지만 이렇게 중첩을 계속 하다보면 콜백지옥에 빠질 수 있다. let first = true; let second = false; if(first && second) { //first 와 second 모두 true console.log('첫번째 조건 충족'); console.log('두번째 조건 충족'); }else if(first){ console.log('첫..
-