조건식을 간결하게 나타낼 수 있다. var num = 30; var color = (num >= 20) ? "red" : "yellow"; console.log(color) //"red" /* 이와 동일 var color; if(num >= 20){ color = "red"; }else{ color = "yellow"; } */ else if문은 아래와 같이 사용한다. var num = 30; var color = (num >= 20) ? "red" : (num >= 10) ? "yellow" : "balck"; /* var num = 30; var color; if(num >= 20) { color = "red"; }else if(num >= 10){ color = "yellow"; }else{ col..