다트(Dart) - if else / switch case 구문

#다트 #제어문 #if #else #switch #case
홍정환's avatar
Jul 29, 2024
다트(Dart) - if else / switch case 구문

IF 구문

  • if만 쓸때 : if(조건식) {실행문}으로 표현
notion image
  • if else 구문 : if(조건식) {실행문} else if(조건식) {실행문} 으로 표현
notion image
  • if else 구문 : if(조건식) {실행문} else if(조건식) {실행문} else {실행문} 으로 표현
notion image
 
 

Switch Case 구문

  • switch (조건식) case 조건식의 결과: 실행문 break
notion image
Share article

개발자의 일상