[플러터] 3. 삼항 연산자

백하림's avatar
May 21, 2025
[플러터] 3. 삼항 연산자
// 삼항 연산자 void main() { int point = 60; // 표현식 (값을 출력, 리턴, 결과값을 응답해주는 것) String result = point >= 60 ? "합격" : "불합격"; print("결과 : ${result}"); }
notion image
// 삼항 연산자 void main() { int point = 50; // 표현식 (값을 출력, 리턴, 결과값을 응답해주는 것) String result = point >= 60 ? "합격" : "불합격"; print("결과 : ${result}"); }
notion image
 
Share article

harimmon