

function meetAt(year, month, date) {
if (date) {
return `${year}/${month}/${date}`;
} else if (month) {
return `${year}년 ${month} 월`;
} else (year); {
return `${year}년`;
}
}
console.log(meetAt(2021, 09));
✅if (date) 를 먼저 적은 이유 -> year 를 먼저 적으면 year 에서 조건문이 충족되기 때문에 다음 else if 로 안 넘어간다.